tnode_partial_zip method

TreapNode tnode_partial_zip(
  1. TreapNode lnode$1,
  2. int rank$3,
  3. int krank$1,
  4. dynamic k$5,
  5. dynamic v$2,
)

Implementation

lcoc_core.TreapNode tnode_partial_zip(lcoc_core.TreapNode lnode$1, dc.int rank$3, dc.int krank$1, dc.dynamic k$5, dc.dynamic v$2, ){
assert((){
late final dc.bool $if_$6;
if((lcoc_core.$EQ_.$_invoke$2((0==rank$3), arr.length.isEven, ))){
$if_$6=true;
}else{
$if_$6=false;
}
return $if_$6;
}(), (){
final dc.List<dc.dynamic> fl$25=(dc.List<dc.dynamic>.filled(3, (lcoc_core.symbol.$_invoke$2(null, "=", )), ));
final dc.List<dc.dynamic> fl$26=(dc.List<dc.dynamic>.filled(2, (lcoc_core.symbol.$_invoke$2(null, "zero?", )), ));
fl$26[1]=(lcoc_core.symbol.$_invoke$2(null, "rank", ));
final lcoc_core.PersistentList $46=lcoc_core.$_list_lit(fl$26, );
final dc.List<dc.dynamic> fl$27=(dc.List<dc.dynamic>.filled(4, const lcoc_core.Keyword(null, "line", 878494669, ), ));
fl$27[1]=7456;
fl$27[2]=const lcoc_core.Keyword(null, "column", 3362807310, );
fl$27[3]=16;
final lcoc_core.PersistentHashMap $47=lcoc_core.$_map_lit(fl$27, );
final dc.dynamic $48=lcoc_core.with_meta($46, $47, );
fl$25[1]=$48;
final dc.List<dc.dynamic> fl$28=(dc.List<dc.dynamic>.filled(2, (lcoc_core.symbol.$_invoke$2(null, "even?", )), ));
final dc.List<dc.dynamic> fl$29=(dc.List<dc.dynamic>.filled(2, (lcoc_core.symbol.$_invoke$2(null, "alength", )), ));
fl$29[1]=(lcoc_core.symbol.$_invoke$2(null, "arr", ));
final lcoc_core.PersistentList $50=lcoc_core.$_list_lit(fl$29, );
final dc.List<dc.dynamic> fl$30=(dc.List<dc.dynamic>.filled(4, const lcoc_core.Keyword(null, "line", 878494669, ), ));
fl$30[1]=7456;
fl$30[2]=const lcoc_core.Keyword(null, "column", 3362807310, );
fl$30[3]=36;
final lcoc_core.PersistentHashMap $51=lcoc_core.$_map_lit(fl$30, );
final dc.dynamic $52=lcoc_core.with_meta($50, $51, );
fl$28[1]=$52;
final lcoc_core.PersistentList $49=lcoc_core.$_list_lit(fl$28, );
final dc.List<dc.dynamic> fl$31=(dc.List<dc.dynamic>.filled(4, const lcoc_core.Keyword(null, "line", 878494669, ), ));
fl$31[1]=7456;
fl$31[2]=const lcoc_core.Keyword(null, "column", 3362807310, );
fl$31[3]=29;
final lcoc_core.PersistentHashMap $53=lcoc_core.$_map_lit(fl$31, );
final dc.dynamic $54=lcoc_core.with_meta($49, $53, );
fl$25[2]=$54;
final lcoc_core.PersistentList $45=lcoc_core.$_list_lit(fl$25, );
final dc.List<dc.dynamic> fl$32=(dc.List<dc.dynamic>.filled(4, const lcoc_core.Keyword(null, "line", 878494669, ), ));
fl$32[1]=7456;
fl$32[2]=const lcoc_core.Keyword(null, "column", 3362807310, );
fl$32[3]=13;
final lcoc_core.PersistentHashMap $55=lcoc_core.$_map_lit(fl$32, );
final dc.dynamic $56=lcoc_core.with_meta($45, $55, );
final dc.String $57=(lcoc_core.pr_str.$_invoke$1($56, ));
final dc.String $58=(lcoc_core.str.$_invoke$2("Assert failed: ", $57, ));
return $58;
}());
assert((){
late final dc.bool $if_$7;
if((krank$1<=rank$3)){
$if_$7=true;
}else{
$if_$7=false;
}
return $if_$7;
}(), (){
final dc.List<dc.dynamic> fl$33=(dc.List<dc.dynamic>.filled(3, (lcoc_core.symbol.$_invoke$2(null, "<=", )), ));
fl$33[1]=(lcoc_core.symbol.$_invoke$2(null, "krank", ));
fl$33[2]=(lcoc_core.symbol.$_invoke$2(null, "rank", ));
final lcoc_core.PersistentList $59=lcoc_core.$_list_lit(fl$33, );
final dc.List<dc.dynamic> fl$34=(dc.List<dc.dynamic>.filled(4, const lcoc_core.Keyword(null, "line", 878494669, ), ));
fl$34[1]=7458;
fl$34[2]=const lcoc_core.Keyword(null, "column", 3362807310, );
fl$34[3]=13;
final lcoc_core.PersistentHashMap $60=lcoc_core.$_map_lit(fl$34, );
final dc.dynamic $61=lcoc_core.with_meta($59, $60, );
final dc.String $62=(lcoc_core.pr_str.$_invoke$1($61, ));
final dc.String $63=(lcoc_core.str.$_invoke$2("Assert failed: ", $62, ));
return $63;
}());
late final dc.List<dc.dynamic> $if_$8;
if((0==rank$3)){
final dc.int size$8475_$AUTO_$3=(((lnode$1.arr.length-0)+2)+(arr.length-2));
final dc.List<dc.dynamic> dest$8471_$AUTO_$3=(dc.List<dc.dynamic>.filled(size$8475_$AUTO_$3, null, ));
final dc.int to$8472_$AUTO_$3=lnode$1.arr.length;
late final dc.int pos$8470_$AUTO_$9;
dc.int i$8473_$AUTO_$3=0;
dc.int j$8474_$AUTO_$3=0;
do {
if((j$8474_$AUTO_$3<to$8472_$AUTO_$3)){
final dc.dynamic v$8086_$AUTO_$6=(lnode$1.arr[j$8474_$AUTO_$3]);
dest$8471_$AUTO_$3[i$8473_$AUTO_$3]=v$8086_$AUTO_$6;
i$8473_$AUTO_$3=(1+i$8473_$AUTO_$3);
j$8474_$AUTO_$3=(1+j$8474_$AUTO_$3);
continue;
}else{
pos$8470_$AUTO_$9=i$8473_$AUTO_$3;
}
break;
} while(true);
final dc.dynamic v$8086_$AUTO_$7=k$5;
dest$8471_$AUTO_$3[pos$8470_$AUTO_$9]=v$8086_$AUTO_$7;
final dc.int pos$8470_$AUTO_$10=(1+pos$8470_$AUTO_$9);
final dc.dynamic v$8086_$AUTO_$8=v$2;
dest$8471_$AUTO_$3[pos$8470_$AUTO_$10]=v$8086_$AUTO_$8;
final dc.int pos$8470_$AUTO_$11=(1+pos$8470_$AUTO_$10);
final dc.int to$8472_$AUTO_$4=arr.length;
late final dc.int pos$8470_$AUTO_$12;
dc.int i$8473_$AUTO_$4=pos$8470_$AUTO_$11;
dc.int j$8474_$AUTO_$4=2;
do {
if((j$8474_$AUTO_$4<to$8472_$AUTO_$4)){
final dc.dynamic v$8086_$AUTO_$9=(arr[j$8474_$AUTO_$4]);
dest$8471_$AUTO_$3[i$8473_$AUTO_$4]=v$8086_$AUTO_$9;
i$8473_$AUTO_$4=(1+i$8473_$AUTO_$4);
j$8474_$AUTO_$4=(1+j$8474_$AUTO_$4);
continue;
}else{
pos$8470_$AUTO_$12=i$8473_$AUTO_$4;
}
break;
} while(true);
$if_$8=dest$8471_$AUTO_$3;
}else if((rank$3>krank$1)){
final dc.List larr$1=lnode$1.arr;
final dc.int ln_1$1=(larr$1.length-1);
final dc.int size$8475_$AUTO_$4=(((ln_1$1-0)+1)+(arr.length-1));
final dc.List<dc.dynamic> dest$8471_$AUTO_$4=(dc.List<dc.dynamic>.filled(size$8475_$AUTO_$4, null, ));
final dc.int to$8472_$AUTO_$5=ln_1$1;
late final dc.int pos$8470_$AUTO_$14;
dc.int i$8473_$AUTO_$5=0;
dc.int j$8474_$AUTO_$5=0;
do {
if((j$8474_$AUTO_$5<to$8472_$AUTO_$5)){
final dc.dynamic v$8086_$AUTO_$10=(larr$1[j$8474_$AUTO_$5]);
dest$8471_$AUTO_$4[i$8473_$AUTO_$5]=v$8086_$AUTO_$10;
i$8473_$AUTO_$5=(1+i$8473_$AUTO_$5);
j$8474_$AUTO_$5=(1+j$8474_$AUTO_$5);
continue;
}else{
pos$8470_$AUTO_$14=i$8473_$AUTO_$5;
}
break;
} while(true);
final lcoc_core.TreapNode v$8086_$AUTO_$11=(((arr[0]) as lcoc_core.TreapNode).tnode_partial_zip(((larr$1[ln_1$1]) as lcoc_core.TreapNode), (rank$3-1), krank$1, k$5, v$2, ));
dest$8471_$AUTO_$4[pos$8470_$AUTO_$14]=v$8086_$AUTO_$11;
final dc.int pos$8470_$AUTO_$15=(1+pos$8470_$AUTO_$14);
final dc.int to$8472_$AUTO_$6=arr.length;
late final dc.int pos$8470_$AUTO_$16;
dc.int i$8473_$AUTO_$6=pos$8470_$AUTO_$15;
dc.int j$8474_$AUTO_$6=1;
do {
if((j$8474_$AUTO_$6<to$8472_$AUTO_$6)){
final dc.dynamic v$8086_$AUTO_$12=(arr[j$8474_$AUTO_$6]);
dest$8471_$AUTO_$4[i$8473_$AUTO_$6]=v$8086_$AUTO_$12;
i$8473_$AUTO_$6=(1+i$8473_$AUTO_$6);
j$8474_$AUTO_$6=(1+j$8474_$AUTO_$6);
continue;
}else{
pos$8470_$AUTO_$16=i$8473_$AUTO_$6;
}
break;
} while(true);
$if_$8=dest$8471_$AUTO_$4;
}else{
final dc.int size$8475_$AUTO_$5=(((lnode$1.arr.length-0)+2)+(arr.length-1));
final dc.List<dc.dynamic> dest$8471_$AUTO_$5=(dc.List<dc.dynamic>.filled(size$8475_$AUTO_$5, null, ));
final dc.int to$8472_$AUTO_$7=lnode$1.arr.length;
late final dc.int pos$8470_$AUTO_$18;
dc.int i$8473_$AUTO_$7=0;
dc.int j$8474_$AUTO_$7=0;
do {
if((j$8474_$AUTO_$7<to$8472_$AUTO_$7)){
final dc.dynamic v$8086_$AUTO_$13=(lnode$1.arr[j$8474_$AUTO_$7]);
dest$8471_$AUTO_$5[i$8473_$AUTO_$7]=v$8086_$AUTO_$13;
i$8473_$AUTO_$7=(1+i$8473_$AUTO_$7);
j$8474_$AUTO_$7=(1+j$8474_$AUTO_$7);
continue;
}else{
pos$8470_$AUTO_$18=i$8473_$AUTO_$7;
}
break;
} while(true);
final dc.dynamic v$8086_$AUTO_$14=k$5;
dest$8471_$AUTO_$5[pos$8470_$AUTO_$18]=v$8086_$AUTO_$14;
final dc.int pos$8470_$AUTO_$19=(1+pos$8470_$AUTO_$18);
final lcoc_core.TreapNode v$8086_$AUTO_$15=(((arr[0]) as lcoc_core.TreapNode).tnode_set_leftmost((rank$3-1), k$5, v$2, ));
dest$8471_$AUTO_$5[pos$8470_$AUTO_$19]=v$8086_$AUTO_$15;
final dc.int pos$8470_$AUTO_$20=(1+pos$8470_$AUTO_$19);
final dc.int to$8472_$AUTO_$8=arr.length;
late final dc.int pos$8470_$AUTO_$21;
dc.int i$8473_$AUTO_$8=pos$8470_$AUTO_$20;
dc.int j$8474_$AUTO_$8=1;
do {
if((j$8474_$AUTO_$8<to$8472_$AUTO_$8)){
final dc.dynamic v$8086_$AUTO_$16=(arr[j$8474_$AUTO_$8]);
dest$8471_$AUTO_$5[i$8473_$AUTO_$8]=v$8086_$AUTO_$16;
i$8473_$AUTO_$8=(1+i$8473_$AUTO_$8);
j$8474_$AUTO_$8=(1+j$8474_$AUTO_$8);
continue;
}else{
pos$8470_$AUTO_$21=i$8473_$AUTO_$8;
}
break;
} while(true);
$if_$8=dest$8471_$AUTO_$5;
}
return lcoc_core.TreapNode(cnt, $if_$8, );
}