inode_assoc_transient method

dynamic inode_assoc_transient(
  1. int shift$4,
  2. int h$4,
  3. dynamic k$5,
  4. dynamic v$3,
)

Implementation

dc.dynamic inode_assoc_transient(dc.int shift$4, dc.int h$4, dc.dynamic k$5, dc.dynamic v$3, ){
if((shift$4<32)){
final dc.int n$7=((h$4>>(31&shift$4))&31);
final dc.int bit$4=(4294967295&(1<<(31&n$7)));
final dc.int mask$4=(bit$4-1);
final dc.int idx$4=lcoc_core.u32x2_bit_count((mask$4&bitmap_hi), (mask$4&bitmap_lo), );
final dc.int hi$4=(bitmap_hi&bit$4);
final dc.int lo$4=(bitmap_lo&bit$4);
if((0==(hi$4|lo$4))){
final dc.int net_size$1=lcoc_core.u32x2_bit_count(bitmap_hi, bitmap_lo, );
final dc.int net_size$PRIME_$1=(2+net_size$1);
final dc.int idx$PRIME_$1=(1+idx$4);
final dc.List from_arr$1=arr;
if((arr.length<net_size$PRIME_$1)){
arr=lcoc_core.aresize(arr, net_size$1, (1+(7|(net_size$PRIME_$1-1))), null, );
}else{
}
dc.int i$12=(net_size$PRIME_$1-1);
dc.int j$5=(net_size$1-1);
do {
if((idx$PRIME_$1<i$12)){
final dc.dynamic v$8086_$AUTO_$18=(from_arr$1[j$5]);
arr[i$12]=v$8086_$AUTO_$18;
i$12=(i$12-1);
j$5=(j$5-1);
continue;
}else{
}
break;
} while(true);
final dc.dynamic v$8086_$AUTO_$19=k$5;
arr[idx$4]=v$8086_$AUTO_$19;
final dc.dynamic v$8086_$AUTO_$20=v$3;
arr[idx$PRIME_$1]=v$8086_$AUTO_$20;
cnt=(1+cnt);
bitmap_hi=(bitmap_hi|bit$4);
bitmap_lo=(bitmap_lo|bit$4);
}else if((0==(hi$4&lo$4))){
final lcoc_core.BitmapNode child$3=((arr[idx$4]) as lcoc_core.BitmapNode);
if((0==hi$4)){
final lcoc_core.BitmapNode child$PRIME_$1=((child$3.inode_assoc((shift$4+5), h$4, k$5, v$3, )) as lcoc_core.BitmapNode);
if(dc.identical((child$3 as dc.Object?), (child$PRIME_$1 as dc.Object?), )){
}else{
bitmap_hi=(hi$4^bitmap_hi);
bitmap_lo=(hi$4^bitmap_lo);
final lcoc_core.BitmapNode v$8086_$AUTO_$21=child$PRIME_$1;
arr[idx$4]=v$8086_$AUTO_$21;
cnt=(cnt+(child$PRIME_$1.cnt-child$3.cnt));
}
}else{
final dc.int old_cnt_child$1=child$3.cnt;
child$3.inode_assoc_transient((shift$4+5), h$4, k$5, v$3, );
cnt=(cnt+(child$3.cnt-old_cnt_child$1));
}
}else{
final dc.dynamic k$PRIME_$3=(arr[idx$4]);
final dc.dynamic v$PRIME_$2=(arr[(1+idx$4)]);
late final dc.bool $if_$4;
if((lcoc_core.$EQ_.$_invoke$2(k$PRIME_$3, k$5, ))){
$if_$4=false;
}else{
$if_$4=true;
}
if($if_$4){
final dc.int net_size$2=(lcoc_core.u32x2_bit_count(bitmap_hi, bitmap_lo, )-1);
final dc.int gross_size$1=(-8&(7+net_size$2));
final dc.int shift$PRIME_$2=(5+shift$4);
final dc.dynamic o7835$3=k$PRIME_$3;
late final dc.int cast$2;
if((o7835$3 is lcoc_core.IHash$iface)){
cast$2=(((o7835$3 as lcoc_core.IHash$iface).$_hash$0()) as dc.int);
}else{
cast$2=(((lcoc_core.IHash.extensions(o7835$3, ) as lcoc_core.IHash$ext).$_hash$0(o7835$3, )) as dc.int);
}
final dc.int $2=(cast$2>>(31&shift$PRIME_$2));
final dc.int n$PRIME_$2=($2&31);
final dc.int bit$PRIME_$2=(4294967295&(1<<(31&n$PRIME_$2)));
final dc.List<dc.dynamic> G$8921_$1=(dc.List<dc.dynamic>.filled(8, null, ));
final dc.dynamic v$8086_$AUTO_$22=k$PRIME_$3;
G$8921_$1[0]=v$8086_$AUTO_$22;
final dc.dynamic v$8086_$AUTO_$23=v$PRIME_$2;
G$8921_$1[1]=v$8086_$AUTO_$23;
final dc.dynamic new_node$2=(lcoc_core.BitmapNode(1, bit$PRIME_$2, bit$PRIME_$2, G$8921_$1, ).inode_assoc_transient(shift$PRIME_$2, h$4, k$5, v$3, ));
final dc.List from_arr$2=arr;
if((gross_size$1<arr.length)){
arr=lcoc_core.aresize(arr, idx$4, gross_size$1, null, );
}else{
}
final dc.dynamic v$8086_$AUTO_$24=new_node$2;
arr[idx$4]=v$8086_$AUTO_$24;
dc.int i$13=(1+idx$4);
dc.int j$6=(1+i$13);
do {
if((i$13<net_size$2)){
final dc.dynamic v$8086_$AUTO_$25=(from_arr$2[j$6]);
arr[i$13]=v$8086_$AUTO_$25;
i$13=(1+i$13);
j$6=(1+j$6);
continue;
}else{
}
break;
} while(true);
if((net_size$2<gross_size$1)){
arr[net_size$2]=null;
}else{
}
cnt=(1+cnt);
bitmap_lo=(bitmap_lo^lo$4);
}else if(dc.identical(v$3, v$PRIME_$2, )){
}else{
final dc.dynamic v$8086_$AUTO_$27=v$3;
arr[(1+idx$4)]=v$8086_$AUTO_$27;
}
}
return this;
}
final dc.int n$8=(2*cnt);
dc.int i$14=0;
do {
if((i$14==n$8)){
cnt=(1+cnt);
if((i$14<arr.length)){
final dc.List G$8922_$1=arr;
final dc.dynamic v$8086_$AUTO_$28=k$5;
G$8922_$1[i$14]=v$8086_$AUTO_$28;
final dc.dynamic v$8086_$AUTO_$29=v$3;
G$8922_$1[(1+i$14)]=v$8086_$AUTO_$29;
}else{
final dc.List G$8923_$1=lcoc_core.aresize(arr, i$14, (4+i$14), v$3, );
final dc.dynamic v$8086_$AUTO_$30=k$5;
G$8923_$1[i$14]=v$8086_$AUTO_$30;
arr=G$8923_$1;
}
}else if((lcoc_core.$EQ_.$_invoke$2((arr[i$14]), k$5, ))){
final dc.int i$PLUS_1$2=(1+i$14);
final dc.dynamic v$8086_$AUTO_$31=v$3;
arr[i$PLUS_1$2]=v$8086_$AUTO_$31;
}else{
i$14=(2+i$14);
continue;
}
break;
} while(true);
return this;
}