
/* WARNING: Removing unreachable block (ram,0x00049648) */

int memjrnlRead(sqlite3_file *pJfd,void *zBuf,int iAmt,sqlite_int64 iOfst)

{
  sqlite3_io_methods *psVar1;
  int iVar2;
  sqlite3_io_methods *psVar3;
  int extraout_v1;
  int iVar4;
  sqlite3_io_methods *psVar5;
  sqlite3_io_methods *psVar6;
  int iVar7;
  int iVar8;
  sqlite3_io_methods *psVar9;
  sqlite3_io_methods *psVar10;
  
  psVar9 = pJfd[1].pMethods;
  psVar6 = (sqlite3_io_methods *)((int)psVar9 >> 0x1f);
  if (((pJfd[10].pMethods == iOfst._0_4_) && (pJfd[0xb].pMethods == iOfst._4_4_)) && (iOfst != 0)) {
    psVar10 = pJfd[0xc].pMethods;
  }
  else {
    psVar10 = pJfd[4].pMethods;
    if ((psVar10 != (sqlite3_io_methods *)0x0) &&
       (psVar1 = psVar6, psVar3 = psVar9, (int)psVar9 <= iOfst)) {
      do {
        psVar5 = (sqlite3_io_methods *)((int)&psVar9->iVersion + (int)&psVar3->iVersion);
        psVar10 = (sqlite3_io_methods *)psVar10->iVersion;
        psVar1 = (sqlite3_io_methods *)
                 ((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion);
        if ((psVar10 == (sqlite3_io_methods *)0x0) || ((int)iOfst._0_4_ < (int)psVar1)) break;
        psVar3 = psVar5;
      } while ((psVar1 != iOfst._0_4_) || (psVar5 <= iOfst._4_4_));
    }
  }
  (*(code *)PTR___moddi3_00190b98)(iOfst._0_4_,iOfst._4_4_,psVar6,psVar9);
  iVar4 = extraout_v1;
  iVar8 = iAmt;
  while( true ) {
    iVar7 = (int)psVar9 - iVar4;
    iVar2 = iVar7;
    if (iVar8 <= iVar7) {
      iVar2 = iVar8;
    }
    iVar8 = iVar8 - iVar7;
    (*(code *)PTR_memcpy_00190e2c)(zBuf,(int)&psVar10->xClose + iVar4,iVar2);
    zBuf = (void *)((int)zBuf + iVar2);
    if (iVar8 < 0) break;
    psVar10 = (sqlite3_io_methods *)psVar10->iVersion;
    iVar4 = 0;
    if (psVar10 == (sqlite3_io_methods *)0x0) goto LAB_00049604;
    if (iVar8 == 0) goto LAB_0004958c;
    psVar9 = pJfd[1].pMethods;
  }
  if (psVar10 == (sqlite3_io_methods *)0x0) {
LAB_00049604:
    pJfd[0xc].pMethods = psVar10;
    pJfd[10].pMethods = (sqlite3_io_methods *)0x0;
    pJfd[0xb].pMethods = (sqlite3_io_methods *)0x0;
    return 0;
  }
LAB_0004958c:
  pJfd[0xc].pMethods = psVar10;
  psVar6 = (sqlite3_io_methods *)((int)&(iOfst._4_4_)->iVersion + iAmt);
  pJfd[0xb].pMethods = psVar6;
  pJfd[10].pMethods =
       (sqlite3_io_methods *)
       ((int)&(iOfst._0_4_)->iVersion + (uint)(psVar6 < (uint)iAmt) + (iAmt >> 0x1f));
  return 0;
}



undefined4
FUN_00049460(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)

{
  int iVar1;
  uint uVar2;
  int extraout_v1;
  int iVar3;
  uint uVar4;
  uint uVar5;
  int *piVar6;
  
  uVar5 = *(uint *)(param_1 + 4);
  iVar3 = (int)uVar5 >> 0x1f;
  if (((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&
     (param_5 != 0 || param_6 != 0)) {
    piVar6 = *(int **)(param_1 + 0x30);
  }
  else {
    piVar6 = *(int **)(param_1 + 0x10);
    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {
      while ((iVar1 != param_5 || (uVar4 <= param_6))) {
        piVar6 = (int *)*piVar6;
        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;
        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;
      }
    }
  }
  (*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5);
  iVar3 = extraout_v1;
  uVar4 = param_3;
  while( true ) {
    uVar5 = uVar5 - iVar3;
    uVar2 = uVar5;
    if ((int)uVar4 <= (int)uVar5) {
      uVar2 = uVar4;
    }
    uVar4 = uVar4 - uVar5;
    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);
    param_2 = param_2 + uVar2;
    if ((int)uVar4 < 0) break;
    piVar6 = (int *)*piVar6;
    iVar3 = 0;
    if (piVar6 == (int *)0x0) goto LAB_00049604;
    if (uVar4 == 0) goto LAB_0004958c;
    uVar5 = *(uint *)(param_1 + 4);
  }
  if (piVar6 == (int *)0x0) {
LAB_00049604:
    *(int **)(param_1 + 0x30) = piVar6;
    *(undefined4 *)(param_1 + 0x28) = 0;
    *(undefined4 *)(param_1 + 0x2c) = 0;
    return 0;
  }
LAB_0004958c:
  *(int **)(param_1 + 0x30) = piVar6;
  *(uint *)(param_1 + 0x2c) = param_3 + param_6;
  *(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5
  ;
  return 0;
}


lui gp,0x15
addiu gp,gp,-0xb40
addu gp,gp,t9
addiu sp,sp,-0x40
sw s7,0x38(sp)
or s7,a1,zero
sw s5,0x30(sp)
or s5,a2,zero
sw s4,0x2c(sp)
sw s3,0x28(sp)
or s3,a0,zero
sw s2,0x24(sp)
sw gp,0x10(sp)
sw ra,0x3c(sp)
sw s6,0x34(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
lw s1,0x4(a0)
lw s2,0x50(sp)
lw v0,0x28(a0)
lw s4,0x54(sp)
beq v0,s2,0x000495e8
_sra a2,s1,0x1f
lw s6,0x10(s3)
beq s6,zero,0x00049510
_slt v0,s2,a2
bne v0,zero,0x00049514
_lw t9,-0x7d88(gp)
beq a2,s2,0x00049648
_or v0,a2,zero
b 0x000494f8
_or v1,s1,zero
or v1,a0,zero
slt a0,s2,v0
bne a0,zero,0x00049514
_lw t9,-0x7d88(gp)
beq v0,s2,0x000495d8
_sltu a0,s4,v1
addu a0,v1,s1
lw s6,0x0(s6)
addu v0,v0,a2
sltu v1,a0,v1
bne s6,zero,0x000494e0
_addu v0,v1,v0
lw t9,-0x7d88(gp)
or a3,s1,zero
or a0,s2,zero
jalr t9
_or a1,s4,zero
or s0,s5,zero
b 0x00049548
_lw gp,0x10(sp)
lw s6,0x0(s6)
beq s6,zero,0x00049604
_or v1,zero,zero
beq s0,zero,0x0004958c
_sra v0,s5,0x1f
lw s1,0x4(s3)
subu a3,s1,v1
lw t9,-0x7af4(gp)
addiu a1,s6,0x4
slt s1,a3,s0
or v0,a3,zero
movz v0,s0,s1
addu a1,a1,v1
subu s0,s0,a3
or a0,s7,zero
or s1,v0,zero
jalr t9
_or a2,v0,zero
addu s7,s7,s1
bgez s0,0x00049530
_lw gp,0x10(sp)
beq s6,zero,0x00049604
_sra v0,s5,0x1f
sw s6,0x30(s3)
addu s4,s5,s4
addu s2,v0,s2
sltu s5,s4,s5
sw s4,0x2c(s3)
addu s2,s5,s2
or v0,zero,zero
sw s2,0x28(s3)
lw ra,0x3c(sp)
lw s7,0x38(sp)
lw s6,0x34(sp)
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x40
beq a0,zero,0x000494fc
_addu a0,v1,s1
b 0x00049514
_lw t9,-0x7d88(gp)
lw v0,0x2c(a0)
bne v0,s4,0x000494bc
_or v0,s2,s4
beq v0,zero,0x000494bc
_nop
b 0x00049510
_lw s6,0x30(a0)
or s2,zero,zero
sw s6,0x30(s3)
or s4,zero,zero
sw s2,0x28(s3)
or v0,zero,zero
sw s4,0x2c(s3)
lw ra,0x3c(sp)
lw s7,0x38(sp)
lw s6,0x34(sp)
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x40
sltu v0,s4,s1
beq v0,zero,0x000494d8
_or v0,a2,zero
b 0x00049514
_lw t9,-0x7d88(gp)
(translation_unit "undefined4\nFUN_00049460(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)\n\n{\n  int iVar1;\n  uint uVar2;\n  int extraout_v1;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int *piVar6;\n  \n  uVar5 = *(uint *)(param_1 + 4);\n  iVar3 = (int)uVar5 >> 0x1f;\n  if (((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0)) {\n    piVar6 = *(int **)(param_1 + 0x30);\n  }\n  else {\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }\n  (*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5);\n  iVar3 = extraout_v1;\n  uVar4 = param_3;\n  while( true ) {\n    uVar5 = uVar5 - iVar3;\n    uVar2 = uVar5;\n    if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }\n    uVar4 = uVar4 - uVar5;\n    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);\n    param_2 = param_2 + uVar2;\n    if ((int)uVar4 < 0) break;\n    piVar6 = (int *)*piVar6;\n    iVar3 = 0;\n    if (piVar6 == (int *)0x0) goto LAB_00049604;\n    if (uVar4 == 0) goto LAB_0004958c;\n    uVar5 = *(uint *)(param_1 + 4);\n  }\n  if (piVar6 == (int *)0x0) {\nLAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;\n    *(undefined4 *)(param_1 + 0x28) = 0;\n    *(undefined4 *)(param_1 + 0x2c) = 0;\n    return 0;\n  }\nLAB_0004958c:\n  *(int **)(param_1 + 0x30) = piVar6;\n  *(uint *)(param_1 + 0x2c) = param_3 + param_6;\n  *(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5\n  ;\n  return 0;\n}\n\n" (function_definition "undefined4\nFUN_00049460(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)\n\n{\n  int iVar1;\n  uint uVar2;\n  int extraout_v1;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int *piVar6;\n  \n  uVar5 = *(uint *)(param_1 + 4);\n  iVar3 = (int)uVar5 >> 0x1f;\n  if (((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0)) {\n    piVar6 = *(int **)(param_1 + 0x30);\n  }\n  else {\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }\n  (*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5);\n  iVar3 = extraout_v1;\n  uVar4 = param_3;\n  while( true ) {\n    uVar5 = uVar5 - iVar3;\n    uVar2 = uVar5;\n    if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }\n    uVar4 = uVar4 - uVar5;\n    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);\n    param_2 = param_2 + uVar2;\n    if ((int)uVar4 < 0) break;\n    piVar6 = (int *)*piVar6;\n    iVar3 = 0;\n    if (piVar6 == (int *)0x0) goto LAB_00049604;\n    if (uVar4 == 0) goto LAB_0004958c;\n    uVar5 = *(uint *)(param_1 + 4);\n  }\n  if (piVar6 == (int *)0x0) {\nLAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;\n    *(undefined4 *)(param_1 + 0x28) = 0;\n    *(undefined4 *)(param_1 + 0x2c) = 0;\n    return 0;\n  }\nLAB_0004958c:\n  *(int **)(param_1 + 0x30) = piVar6;\n  *(uint *)(param_1 + 0x2c) = param_3 + param_6;\n  *(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5\n  ;\n  return 0;\n}" type_identifier (function_declarator "FUN_00049460(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)" identifier (parameter_list "(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) , (parameter_declaration "uint param_6" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int extraout_v1;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int *piVar6;\n  \n  uVar5 = *(uint *)(param_1 + 4);\n  iVar3 = (int)uVar5 >> 0x1f;\n  if (((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0)) {\n    piVar6 = *(int **)(param_1 + 0x30);\n  }\n  else {\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }\n  (*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5);\n  iVar3 = extraout_v1;\n  uVar4 = param_3;\n  while( true ) {\n    uVar5 = uVar5 - iVar3;\n    uVar2 = uVar5;\n    if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }\n    uVar4 = uVar4 - uVar5;\n    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);\n    param_2 = param_2 + uVar2;\n    if ((int)uVar4 < 0) break;\n    piVar6 = (int *)*piVar6;\n    iVar3 = 0;\n    if (piVar6 == (int *)0x0) goto LAB_00049604;\n    if (uVar4 == 0) goto LAB_0004958c;\n    uVar5 = *(uint *)(param_1 + 4);\n  }\n  if (piVar6 == (int *)0x0) {\nLAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;\n    *(undefined4 *)(param_1 + 0x28) = 0;\n    *(undefined4 *)(param_1 + 0x2c) = 0;\n    return 0;\n  }\nLAB_0004958c:\n  *(int **)(param_1 + 0x30) = piVar6;\n  *(uint *)(param_1 + 0x2c) = param_3 + param_6;\n  *(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5\n  ;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int extraout_v1;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (expression_statement "uVar5 = *(uint *)(param_1 + 4);" (assignment_expression "uVar5 = *(uint *)(param_1 + 4)" identifier = (pointer_expression "*(uint *)(param_1 + 4)" * (cast_expression "(uint *)(param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = (int)uVar5 >> 0x1f;" (assignment_expression "iVar3 = (int)uVar5 >> 0x1f" identifier = (binary_expression "(int)uVar5 >> 0x1f" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal)) ;) (if_statement "if (((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0)) {\n    piVar6 = *(int **)(param_1 + 0x30);\n  }\n  else {\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }" if (parenthesized_expression "(((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0))" ( (binary_expression "((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0)" (parenthesized_expression "((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6))" ( (binary_expression "(*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)" (parenthesized_expression "(*(int *)(param_1 + 0x28) == param_5)" ( (binary_expression "*(int *)(param_1 + 0x28) == param_5" (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) == identifier) )) && (parenthesized_expression "(*(uint *)(param_1 + 0x2c) == param_6)" ( (binary_expression "*(uint *)(param_1 + 0x2c) == param_6" (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) == identifier) ))) )) && (parenthesized_expression "(param_5 != 0 || param_6 != 0)" ( (binary_expression "param_5 != 0 || param_6 != 0" (binary_expression "param_5 != 0" identifier != number_literal) || (binary_expression "param_6 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    piVar6 = *(int **)(param_1 + 0x30);\n  }" { (expression_statement "piVar6 = *(int **)(param_1 + 0x30);" (assignment_expression "piVar6 = *(int **)(param_1 + 0x30)" identifier = (pointer_expression "*(int **)(param_1 + 0x30)" * (cast_expression "(int **)(param_1 + 0x30)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) }) (else_clause "else {\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }" else (compound_statement "{\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }" { (expression_statement "piVar6 = *(int **)(param_1 + 0x10);" (assignment_expression "piVar6 = *(int **)(param_1 + 0x10)" identifier = (pointer_expression "*(int **)(param_1 + 0x10)" * (cast_expression "(int **)(param_1 + 0x10)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (if_statement "if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }" if (parenthesized_expression "((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5))" ( (binary_expression "(piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)" (parenthesized_expression "(piVar6 != (int *)0x0)" ( (binary_expression "piVar6 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)" ( (comma_expression "uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5" (assignment_expression "uVar4 = uVar5" identifier = identifier) , (comma_expression "iVar1 = iVar3, iVar3 <= param_5" (assignment_expression "iVar1 = iVar3" identifier = identifier) , (binary_expression "iVar3 <= param_5" identifier <= identifier))) ))) )) (compound_statement "{\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }" { (while_statement "while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }" while (parenthesized_expression "((iVar1 != param_5 || (uVar4 <= param_6)))" ( (parenthesized_expression "(iVar1 != param_5 || (uVar4 <= param_6))" ( (binary_expression "iVar1 != param_5 || (uVar4 <= param_6)" (binary_expression "iVar1 != param_5" identifier != identifier) || (parenthesized_expression "(uVar4 <= param_6)" ( (binary_expression "uVar4 <= param_6" identifier <= identifier) ))) )) )) (compound_statement "{\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }" { (expression_statement "piVar6 = (int *)*piVar6;" (assignment_expression "piVar6 = (int *)*piVar6" identifier = (cast_expression "(int *)*piVar6" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar6" * identifier))) ;) (expression_statement "iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;" (assignment_expression "iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3" identifier = (binary_expression "(uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3" (binary_expression "(uint)(uVar4 + uVar5 < uVar4) + iVar1" (call_expression "(uint)(uVar4 + uVar5 < uVar4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar4 + uVar5 < uVar4)" ( (binary_expression "uVar4 + uVar5 < uVar4" (binary_expression "uVar4 + uVar5" identifier + identifier) < identifier) ))) + identifier) + identifier)) ;) (if_statement "if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;" if (parenthesized_expression "((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1))" ( (binary_expression "(piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)" (parenthesized_expression "(piVar6 == (int *)0x0)" ( (binary_expression "piVar6 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(uVar4 = uVar4 + uVar5, param_5 < iVar1)" ( (comma_expression "uVar4 = uVar4 + uVar5, param_5 < iVar1" (assignment_expression "uVar4 = uVar4 + uVar5" identifier = (binary_expression "uVar4 + uVar5" identifier + identifier)) , (binary_expression "param_5 < iVar1" identifier < identifier)) ))) )) (break_statement "break;" break ;)) })) })) }))) (expression_statement "(*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5);" (call_expression "(*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5)" (parenthesized_expression "(*(code *)PTR_FUN_00190b98)" ( (pointer_expression "*(code *)PTR_FUN_00190b98" * (cast_expression "(code *)PTR_FUN_00190b98" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_5,param_6,iVar3,uVar5)" ( identifier , identifier , identifier , identifier ))) ;) (expression_statement "iVar3 = extraout_v1;" (assignment_expression "iVar3 = extraout_v1" identifier = identifier) ;) (expression_statement "uVar4 = param_3;" (assignment_expression "uVar4 = param_3" identifier = identifier) ;) (while_statement "while( true ) {\n    uVar5 = uVar5 - iVar3;\n    uVar2 = uVar5;\n    if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }\n    uVar4 = uVar4 - uVar5;\n    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);\n    param_2 = param_2 + uVar2;\n    if ((int)uVar4 < 0) break;\n    piVar6 = (int *)*piVar6;\n    iVar3 = 0;\n    if (piVar6 == (int *)0x0) goto LAB_00049604;\n    if (uVar4 == 0) goto LAB_0004958c;\n    uVar5 = *(uint *)(param_1 + 4);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    uVar5 = uVar5 - iVar3;\n    uVar2 = uVar5;\n    if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }\n    uVar4 = uVar4 - uVar5;\n    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);\n    param_2 = param_2 + uVar2;\n    if ((int)uVar4 < 0) break;\n    piVar6 = (int *)*piVar6;\n    iVar3 = 0;\n    if (piVar6 == (int *)0x0) goto LAB_00049604;\n    if (uVar4 == 0) goto LAB_0004958c;\n    uVar5 = *(uint *)(param_1 + 4);\n  }" { (expression_statement "uVar5 = uVar5 - iVar3;" (assignment_expression "uVar5 = uVar5 - iVar3" identifier = (binary_expression "uVar5 - iVar3" identifier - identifier)) ;) (expression_statement "uVar2 = uVar5;" (assignment_expression "uVar2 = uVar5" identifier = identifier) ;) (if_statement "if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }" if (parenthesized_expression "((int)uVar4 <= (int)uVar5)" ( (binary_expression "(int)uVar4 <= (int)uVar5" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) <= (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      uVar2 = uVar4;\n    }" { (expression_statement "uVar2 = uVar4;" (assignment_expression "uVar2 = uVar4" identifier = identifier) ;) })) (expression_statement "uVar4 = uVar4 - uVar5;" (assignment_expression "uVar4 = uVar4 - uVar5" identifier = (binary_expression "uVar4 - uVar5" identifier - identifier)) ;) (expression_statement "(*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);" (call_expression "(*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2)" (parenthesized_expression "(*(code *)PTR_memcpy_00190e2c)" ( (pointer_expression "*(code *)PTR_memcpy_00190e2c" * (cast_expression "(code *)PTR_memcpy_00190e2c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,(int)piVar6 + iVar3 + 4,uVar2)" ( identifier , (binary_expression "(int)piVar6 + iVar3 + 4" (binary_expression "(int)piVar6 + iVar3" (cast_expression "(int)piVar6" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) , identifier ))) ;) (expression_statement "param_2 = param_2 + uVar2;" (assignment_expression "param_2 = param_2 + uVar2" identifier = (binary_expression "param_2 + uVar2" identifier + identifier)) ;) (if_statement "if ((int)uVar4 < 0) break;" if (parenthesized_expression "((int)uVar4 < 0)" ( (binary_expression "(int)uVar4 < 0" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "piVar6 = (int *)*piVar6;" (assignment_expression "piVar6 = (int *)*piVar6" identifier = (cast_expression "(int *)*piVar6" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar6" * identifier))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if (piVar6 == (int *)0x0) goto LAB_00049604;" if (parenthesized_expression "(piVar6 == (int *)0x0)" ( (binary_expression "piVar6 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00049604;" goto statement_identifier ;)) (if_statement "if (uVar4 == 0) goto LAB_0004958c;" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0004958c;" goto statement_identifier ;)) (expression_statement "uVar5 = *(uint *)(param_1 + 4);" (assignment_expression "uVar5 = *(uint *)(param_1 + 4)" identifier = (pointer_expression "*(uint *)(param_1 + 4)" * (cast_expression "(uint *)(param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) })) (if_statement "if (piVar6 == (int *)0x0) {\nLAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;\n    *(undefined4 *)(param_1 + 0x28) = 0;\n    *(undefined4 *)(param_1 + 0x2c) = 0;\n    return 0;\n  }" if (parenthesized_expression "(piVar6 == (int *)0x0)" ( (binary_expression "piVar6 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;\n    *(undefined4 *)(param_1 + 0x28) = 0;\n    *(undefined4 *)(param_1 + 0x2c) = 0;\n    return 0;\n  }" { (labeled_statement "LAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;" statement_identifier : (expression_statement "*(int **)(param_1 + 0x30) = piVar6;" (assignment_expression "*(int **)(param_1 + 0x30) = piVar6" (pointer_expression "*(int **)(param_1 + 0x30)" * (cast_expression "(int **)(param_1 + 0x30)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = identifier) ;)) (expression_statement "*(undefined4 *)(param_1 + 0x28) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x28) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x28)" * (cast_expression "(undefined4 *)(param_1 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x2c) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x2c) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x2c)" * (cast_expression "(undefined4 *)(param_1 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (labeled_statement "LAB_0004958c:\n  *(int **)(param_1 + 0x30) = piVar6;" statement_identifier : (expression_statement "*(int **)(param_1 + 0x30) = piVar6;" (assignment_expression "*(int **)(param_1 + 0x30) = piVar6" (pointer_expression "*(int **)(param_1 + 0x30)" * (cast_expression "(int **)(param_1 + 0x30)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = identifier) ;)) (expression_statement "*(uint *)(param_1 + 0x2c) = param_3 + param_6;" (assignment_expression "*(uint *)(param_1 + 0x2c) = param_3 + param_6" (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) = (binary_expression "param_3 + param_6" identifier + identifier)) ;) (expression_statement "*(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5\n  ;" (assignment_expression "*(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5" (pointer_expression "*(uint *)(param_1 + 0x28)" * (cast_expression "(uint *)(param_1 + 0x28)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = (binary_expression "(uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5" (binary_expression "(uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f)" (call_expression "(uint)(param_3 + param_6 < param_3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_3 + param_6 < param_3)" ( (binary_expression "param_3 + param_6 < param_3" (binary_expression "param_3 + param_6" identifier + identifier) < identifier) ))) + (parenthesized_expression "((int)param_3 >> 0x1f)" ( (binary_expression "(int)param_3 >> 0x1f" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) + identifier)) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Removing unreachable block (ram,0x00049648) */\n\nint memjrnlRead(sqlite3_file *pJfd,void *zBuf,int iAmt,sqlite_int64 iOfst)\n\n{\n  sqlite3_io_methods *psVar1;\n  int iVar2;\n  sqlite3_io_methods *psVar3;\n  int extraout_v1;\n  int iVar4;\n  sqlite3_io_methods *psVar5;\n  sqlite3_io_methods *psVar6;\n  int iVar7;\n  int iVar8;\n  sqlite3_io_methods *psVar9;\n  sqlite3_io_methods *psVar10;\n  \n  psVar9 = pJfd[1].pMethods;\n  psVar6 = (sqlite3_io_methods *)((int)psVar9 >> 0x1f);\n  if (((pJfd[10].pMethods == iOfst._0_4_) && (pJfd[0xb].pMethods == iOfst._4_4_)) && (iOfst != 0)) {\n    psVar10 = pJfd[0xc].pMethods;\n  }\n  else {\n    psVar10 = pJfd[4].pMethods;\n    if ((psVar10 != (sqlite3_io_methods *)0x0) &&\n       (psVar1 = psVar6, psVar3 = psVar9, (int)psVar9 <= iOfst)) {\n      do {\n        psVar5 = (sqlite3_io_methods *)((int)&psVar9->iVersion + (int)&psVar3->iVersion);\n        psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n        psVar1 = (sqlite3_io_methods *)\n                 ((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion);\n        if ((psVar10 == (sqlite3_io_methods *)0x0) || ((int)iOfst._0_4_ < (int)psVar1)) break;\n        psVar3 = psVar5;\n      } while ((psVar1 != iOfst._0_4_) || (psVar5 <= iOfst._4_4_));\n    }\n  }\n  (*(code *)PTR___moddi3_00190b98)(iOfst._0_4_,iOfst._4_4_,psVar6,psVar9);\n  iVar4 = extraout_v1;\n  iVar8 = iAmt;\n  while( true ) {\n    iVar7 = (int)psVar9 - iVar4;\n    iVar2 = iVar7;\n    if (iVar8 <= iVar7) {\n      iVar2 = iVar8;\n    }\n    iVar8 = iVar8 - iVar7;\n    (*(code *)PTR_memcpy_00190e2c)(zBuf,(int)&psVar10->xClose + iVar4,iVar2);\n    zBuf = (void *)((int)zBuf + iVar2);\n    if (iVar8 < 0) break;\n    psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n    iVar4 = 0;\n    if (psVar10 == (sqlite3_io_methods *)0x0) goto LAB_00049604;\n    if (iVar8 == 0) goto LAB_0004958c;\n    psVar9 = pJfd[1].pMethods;\n  }\n  if (psVar10 == (sqlite3_io_methods *)0x0) {\nLAB_00049604:\n    pJfd[0xc].pMethods = psVar10;\n    pJfd[10].pMethods = (sqlite3_io_methods *)0x0;\n    pJfd[0xb].pMethods = (sqlite3_io_methods *)0x0;\n    return 0;\n  }\nLAB_0004958c:\n  pJfd[0xc].pMethods = psVar10;\n  psVar6 = (sqlite3_io_methods *)((int)&(iOfst._4_4_)->iVersion + iAmt);\n  pJfd[0xb].pMethods = psVar6;\n  pJfd[10].pMethods =\n       (sqlite3_io_methods *)\n       ((int)&(iOfst._0_4_)->iVersion + (uint)(psVar6 < (uint)iAmt) + (iAmt >> 0x1f));\n  return 0;\n}\n\n" comment (function_definition "int memjrnlRead(sqlite3_file *pJfd,void *zBuf,int iAmt,sqlite_int64 iOfst)\n\n{\n  sqlite3_io_methods *psVar1;\n  int iVar2;\n  sqlite3_io_methods *psVar3;\n  int extraout_v1;\n  int iVar4;\n  sqlite3_io_methods *psVar5;\n  sqlite3_io_methods *psVar6;\n  int iVar7;\n  int iVar8;\n  sqlite3_io_methods *psVar9;\n  sqlite3_io_methods *psVar10;\n  \n  psVar9 = pJfd[1].pMethods;\n  psVar6 = (sqlite3_io_methods *)((int)psVar9 >> 0x1f);\n  if (((pJfd[10].pMethods == iOfst._0_4_) && (pJfd[0xb].pMethods == iOfst._4_4_)) && (iOfst != 0)) {\n    psVar10 = pJfd[0xc].pMethods;\n  }\n  else {\n    psVar10 = pJfd[4].pMethods;\n    if ((psVar10 != (sqlite3_io_methods *)0x0) &&\n       (psVar1 = psVar6, psVar3 = psVar9, (int)psVar9 <= iOfst)) {\n      do {\n        psVar5 = (sqlite3_io_methods *)((int)&psVar9->iVersion + (int)&psVar3->iVersion);\n        psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n        psVar1 = (sqlite3_io_methods *)\n                 ((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion);\n        if ((psVar10 == (sqlite3_io_methods *)0x0) || ((int)iOfst._0_4_ < (int)psVar1)) break;\n        psVar3 = psVar5;\n      } while ((psVar1 != iOfst._0_4_) || (psVar5 <= iOfst._4_4_));\n    }\n  }\n  (*(code *)PTR___moddi3_00190b98)(iOfst._0_4_,iOfst._4_4_,psVar6,psVar9);\n  iVar4 = extraout_v1;\n  iVar8 = iAmt;\n  while( true ) {\n    iVar7 = (int)psVar9 - iVar4;\n    iVar2 = iVar7;\n    if (iVar8 <= iVar7) {\n      iVar2 = iVar8;\n    }\n    iVar8 = iVar8 - iVar7;\n    (*(code *)PTR_memcpy_00190e2c)(zBuf,(int)&psVar10->xClose + iVar4,iVar2);\n    zBuf = (void *)((int)zBuf + iVar2);\n    if (iVar8 < 0) break;\n    psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n    iVar4 = 0;\n    if (psVar10 == (sqlite3_io_methods *)0x0) goto LAB_00049604;\n    if (iVar8 == 0) goto LAB_0004958c;\n    psVar9 = pJfd[1].pMethods;\n  }\n  if (psVar10 == (sqlite3_io_methods *)0x0) {\nLAB_00049604:\n    pJfd[0xc].pMethods = psVar10;\n    pJfd[10].pMethods = (sqlite3_io_methods *)0x0;\n    pJfd[0xb].pMethods = (sqlite3_io_methods *)0x0;\n    return 0;\n  }\nLAB_0004958c:\n  pJfd[0xc].pMethods = psVar10;\n  psVar6 = (sqlite3_io_methods *)((int)&(iOfst._4_4_)->iVersion + iAmt);\n  pJfd[0xb].pMethods = psVar6;\n  pJfd[10].pMethods =\n       (sqlite3_io_methods *)\n       ((int)&(iOfst._0_4_)->iVersion + (uint)(psVar6 < (uint)iAmt) + (iAmt >> 0x1f));\n  return 0;\n}" primitive_type (function_declarator "memjrnlRead(sqlite3_file *pJfd,void *zBuf,int iAmt,sqlite_int64 iOfst)" identifier (parameter_list "(sqlite3_file *pJfd,void *zBuf,int iAmt,sqlite_int64 iOfst)" ( (parameter_declaration "sqlite3_file *pJfd" type_identifier (pointer_declarator "*pJfd" * identifier)) , (parameter_declaration "void *zBuf" primitive_type (pointer_declarator "*zBuf" * identifier)) , (parameter_declaration "int iAmt" primitive_type identifier) , (parameter_declaration "sqlite_int64 iOfst" type_identifier identifier) ))) (compound_statement "{\n  sqlite3_io_methods *psVar1;\n  int iVar2;\n  sqlite3_io_methods *psVar3;\n  int extraout_v1;\n  int iVar4;\n  sqlite3_io_methods *psVar5;\n  sqlite3_io_methods *psVar6;\n  int iVar7;\n  int iVar8;\n  sqlite3_io_methods *psVar9;\n  sqlite3_io_methods *psVar10;\n  \n  psVar9 = pJfd[1].pMethods;\n  psVar6 = (sqlite3_io_methods *)((int)psVar9 >> 0x1f);\n  if (((pJfd[10].pMethods == iOfst._0_4_) && (pJfd[0xb].pMethods == iOfst._4_4_)) && (iOfst != 0)) {\n    psVar10 = pJfd[0xc].pMethods;\n  }\n  else {\n    psVar10 = pJfd[4].pMethods;\n    if ((psVar10 != (sqlite3_io_methods *)0x0) &&\n       (psVar1 = psVar6, psVar3 = psVar9, (int)psVar9 <= iOfst)) {\n      do {\n        psVar5 = (sqlite3_io_methods *)((int)&psVar9->iVersion + (int)&psVar3->iVersion);\n        psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n        psVar1 = (sqlite3_io_methods *)\n                 ((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion);\n        if ((psVar10 == (sqlite3_io_methods *)0x0) || ((int)iOfst._0_4_ < (int)psVar1)) break;\n        psVar3 = psVar5;\n      } while ((psVar1 != iOfst._0_4_) || (psVar5 <= iOfst._4_4_));\n    }\n  }\n  (*(code *)PTR___moddi3_00190b98)(iOfst._0_4_,iOfst._4_4_,psVar6,psVar9);\n  iVar4 = extraout_v1;\n  iVar8 = iAmt;\n  while( true ) {\n    iVar7 = (int)psVar9 - iVar4;\n    iVar2 = iVar7;\n    if (iVar8 <= iVar7) {\n      iVar2 = iVar8;\n    }\n    iVar8 = iVar8 - iVar7;\n    (*(code *)PTR_memcpy_00190e2c)(zBuf,(int)&psVar10->xClose + iVar4,iVar2);\n    zBuf = (void *)((int)zBuf + iVar2);\n    if (iVar8 < 0) break;\n    psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n    iVar4 = 0;\n    if (psVar10 == (sqlite3_io_methods *)0x0) goto LAB_00049604;\n    if (iVar8 == 0) goto LAB_0004958c;\n    psVar9 = pJfd[1].pMethods;\n  }\n  if (psVar10 == (sqlite3_io_methods *)0x0) {\nLAB_00049604:\n    pJfd[0xc].pMethods = psVar10;\n    pJfd[10].pMethods = (sqlite3_io_methods *)0x0;\n    pJfd[0xb].pMethods = (sqlite3_io_methods *)0x0;\n    return 0;\n  }\nLAB_0004958c:\n  pJfd[0xc].pMethods = psVar10;\n  psVar6 = (sqlite3_io_methods *)((int)&(iOfst._4_4_)->iVersion + iAmt);\n  pJfd[0xb].pMethods = psVar6;\n  pJfd[10].pMethods =\n       (sqlite3_io_methods *)\n       ((int)&(iOfst._0_4_)->iVersion + (uint)(psVar6 < (uint)iAmt) + (iAmt >> 0x1f));\n  return 0;\n}" { (declaration "sqlite3_io_methods *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "sqlite3_io_methods *psVar3;" type_identifier (pointer_declarator "*psVar3" * identifier) ;) (declaration "int extraout_v1;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "sqlite3_io_methods *psVar5;" type_identifier (pointer_declarator "*psVar5" * identifier) ;) (declaration "sqlite3_io_methods *psVar6;" type_identifier (pointer_declarator "*psVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "sqlite3_io_methods *psVar9;" type_identifier (pointer_declarator "*psVar9" * identifier) ;) (declaration "sqlite3_io_methods *psVar10;" type_identifier (pointer_declarator "*psVar10" * identifier) ;) (expression_statement "psVar9 = pJfd[1].pMethods;" (assignment_expression "psVar9 = pJfd[1].pMethods" identifier = (field_expression "pJfd[1].pMethods" (subscript_expression "pJfd[1]" identifier [ number_literal ]) . field_identifier)) ;) (expression_statement "psVar6 = (sqlite3_io_methods *)((int)psVar9 >> 0x1f);" (assignment_expression "psVar6 = (sqlite3_io_methods *)((int)psVar9 >> 0x1f)" identifier = (cast_expression "(sqlite3_io_methods *)((int)psVar9 >> 0x1f)" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)psVar9 >> 0x1f)" ( (binary_expression "(int)psVar9 >> 0x1f" (cast_expression "(int)psVar9" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (if_statement "if (((pJfd[10].pMethods == iOfst._0_4_) && (pJfd[0xb].pMethods == iOfst._4_4_)) && (iOfst != 0)) {\n    psVar10 = pJfd[0xc].pMethods;\n  }\n  else {\n    psVar10 = pJfd[4].pMethods;\n    if ((psVar10 != (sqlite3_io_methods *)0x0) &&\n       (psVar1 = psVar6, psVar3 = psVar9, (int)psVar9 <= iOfst)) {\n      do {\n        psVar5 = (sqlite3_io_methods *)((int)&psVar9->iVersion + (int)&psVar3->iVersion);\n        psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n        psVar1 = (sqlite3_io_methods *)\n                 ((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion);\n        if ((psVar10 == (sqlite3_io_methods *)0x0) || ((int)iOfst._0_4_ < (int)psVar1)) break;\n        psVar3 = psVar5;\n      } while ((psVar1 != iOfst._0_4_) || (psVar5 <= iOfst._4_4_));\n    }\n  }" if (parenthesized_expression "(((pJfd[10].pMethods == iOfst._0_4_) && (pJfd[0xb].pMethods == iOfst._4_4_)) && (iOfst != 0))" ( (binary_expression "((pJfd[10].pMethods == iOfst._0_4_) && (pJfd[0xb].pMethods == iOfst._4_4_)) && (iOfst != 0)" (parenthesized_expression "((pJfd[10].pMethods == iOfst._0_4_) && (pJfd[0xb].pMethods == iOfst._4_4_))" ( (binary_expression "(pJfd[10].pMethods == iOfst._0_4_) && (pJfd[0xb].pMethods == iOfst._4_4_)" (parenthesized_expression "(pJfd[10].pMethods == iOfst._0_4_)" ( (binary_expression "pJfd[10].pMethods == iOfst._0_4_" (field_expression "pJfd[10].pMethods" (subscript_expression "pJfd[10]" identifier [ number_literal ]) . field_identifier) == (field_expression "iOfst._0_4_" identifier . field_identifier)) )) && (parenthesized_expression "(pJfd[0xb].pMethods == iOfst._4_4_)" ( (binary_expression "pJfd[0xb].pMethods == iOfst._4_4_" (field_expression "pJfd[0xb].pMethods" (subscript_expression "pJfd[0xb]" identifier [ number_literal ]) . field_identifier) == (field_expression "iOfst._4_4_" identifier . field_identifier)) ))) )) && (parenthesized_expression "(iOfst != 0)" ( (binary_expression "iOfst != 0" identifier != number_literal) ))) )) (compound_statement "{\n    psVar10 = pJfd[0xc].pMethods;\n  }" { (expression_statement "psVar10 = pJfd[0xc].pMethods;" (assignment_expression "psVar10 = pJfd[0xc].pMethods" identifier = (field_expression "pJfd[0xc].pMethods" (subscript_expression "pJfd[0xc]" identifier [ number_literal ]) . field_identifier)) ;) }) (else_clause "else {\n    psVar10 = pJfd[4].pMethods;\n    if ((psVar10 != (sqlite3_io_methods *)0x0) &&\n       (psVar1 = psVar6, psVar3 = psVar9, (int)psVar9 <= iOfst)) {\n      do {\n        psVar5 = (sqlite3_io_methods *)((int)&psVar9->iVersion + (int)&psVar3->iVersion);\n        psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n        psVar1 = (sqlite3_io_methods *)\n                 ((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion);\n        if ((psVar10 == (sqlite3_io_methods *)0x0) || ((int)iOfst._0_4_ < (int)psVar1)) break;\n        psVar3 = psVar5;\n      } while ((psVar1 != iOfst._0_4_) || (psVar5 <= iOfst._4_4_));\n    }\n  }" else (compound_statement "{\n    psVar10 = pJfd[4].pMethods;\n    if ((psVar10 != (sqlite3_io_methods *)0x0) &&\n       (psVar1 = psVar6, psVar3 = psVar9, (int)psVar9 <= iOfst)) {\n      do {\n        psVar5 = (sqlite3_io_methods *)((int)&psVar9->iVersion + (int)&psVar3->iVersion);\n        psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n        psVar1 = (sqlite3_io_methods *)\n                 ((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion);\n        if ((psVar10 == (sqlite3_io_methods *)0x0) || ((int)iOfst._0_4_ < (int)psVar1)) break;\n        psVar3 = psVar5;\n      } while ((psVar1 != iOfst._0_4_) || (psVar5 <= iOfst._4_4_));\n    }\n  }" { (expression_statement "psVar10 = pJfd[4].pMethods;" (assignment_expression "psVar10 = pJfd[4].pMethods" identifier = (field_expression "pJfd[4].pMethods" (subscript_expression "pJfd[4]" identifier [ number_literal ]) . field_identifier)) ;) (if_statement "if ((psVar10 != (sqlite3_io_methods *)0x0) &&\n       (psVar1 = psVar6, psVar3 = psVar9, (int)psVar9 <= iOfst)) {\n      do {\n        psVar5 = (sqlite3_io_methods *)((int)&psVar9->iVersion + (int)&psVar3->iVersion);\n        psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n        psVar1 = (sqlite3_io_methods *)\n                 ((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion);\n        if ((psVar10 == (sqlite3_io_methods *)0x0) || ((int)iOfst._0_4_ < (int)psVar1)) break;\n        psVar3 = psVar5;\n      } while ((psVar1 != iOfst._0_4_) || (psVar5 <= iOfst._4_4_));\n    }" if (parenthesized_expression "((psVar10 != (sqlite3_io_methods *)0x0) &&\n       (psVar1 = psVar6, psVar3 = psVar9, (int)psVar9 <= iOfst))" ( (binary_expression "(psVar10 != (sqlite3_io_methods *)0x0) &&\n       (psVar1 = psVar6, psVar3 = psVar9, (int)psVar9 <= iOfst)" (parenthesized_expression "(psVar10 != (sqlite3_io_methods *)0x0)" ( (binary_expression "psVar10 != (sqlite3_io_methods *)0x0" identifier != (cast_expression "(sqlite3_io_methods *)0x0" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(psVar1 = psVar6, psVar3 = psVar9, (int)psVar9 <= iOfst)" ( (comma_expression "psVar1 = psVar6, psVar3 = psVar9, (int)psVar9 <= iOfst" (assignment_expression "psVar1 = psVar6" identifier = identifier) , (comma_expression "psVar3 = psVar9, (int)psVar9 <= iOfst" (assignment_expression "psVar3 = psVar9" identifier = identifier) , (binary_expression "(int)psVar9 <= iOfst" (cast_expression "(int)psVar9" ( (type_descriptor "int" primitive_type) ) identifier) <= identifier))) ))) )) (compound_statement "{\n      do {\n        psVar5 = (sqlite3_io_methods *)((int)&psVar9->iVersion + (int)&psVar3->iVersion);\n        psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n        psVar1 = (sqlite3_io_methods *)\n                 ((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion);\n        if ((psVar10 == (sqlite3_io_methods *)0x0) || ((int)iOfst._0_4_ < (int)psVar1)) break;\n        psVar3 = psVar5;\n      } while ((psVar1 != iOfst._0_4_) || (psVar5 <= iOfst._4_4_));\n    }" { (do_statement "do {\n        psVar5 = (sqlite3_io_methods *)((int)&psVar9->iVersion + (int)&psVar3->iVersion);\n        psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n        psVar1 = (sqlite3_io_methods *)\n                 ((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion);\n        if ((psVar10 == (sqlite3_io_methods *)0x0) || ((int)iOfst._0_4_ < (int)psVar1)) break;\n        psVar3 = psVar5;\n      } while ((psVar1 != iOfst._0_4_) || (psVar5 <= iOfst._4_4_));" do (compound_statement "{\n        psVar5 = (sqlite3_io_methods *)((int)&psVar9->iVersion + (int)&psVar3->iVersion);\n        psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n        psVar1 = (sqlite3_io_methods *)\n                 ((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion);\n        if ((psVar10 == (sqlite3_io_methods *)0x0) || ((int)iOfst._0_4_ < (int)psVar1)) break;\n        psVar3 = psVar5;\n      }" { (expression_statement "psVar5 = (sqlite3_io_methods *)((int)&psVar9->iVersion + (int)&psVar3->iVersion);" (assignment_expression "psVar5 = (sqlite3_io_methods *)((int)&psVar9->iVersion + (int)&psVar3->iVersion)" identifier = (cast_expression "(sqlite3_io_methods *)((int)&psVar9->iVersion + (int)&psVar3->iVersion)" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&psVar9->iVersion + (int)&psVar3->iVersion)" ( (binary_expression "(int)&psVar9->iVersion + (int)&psVar3->iVersion" (cast_expression "(int)&psVar9->iVersion" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&psVar9->iVersion" & (field_expression "psVar9->iVersion" identifier -> field_identifier))) + (cast_expression "(int)&psVar3->iVersion" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&psVar3->iVersion" & (field_expression "psVar3->iVersion" identifier -> field_identifier)))) )))) ;) (expression_statement "psVar10 = (sqlite3_io_methods *)psVar10->iVersion;" (assignment_expression "psVar10 = (sqlite3_io_methods *)psVar10->iVersion" identifier = (cast_expression "(sqlite3_io_methods *)psVar10->iVersion" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "psVar10->iVersion" identifier -> field_identifier))) ;) (expression_statement "psVar1 = (sqlite3_io_methods *)\n                 ((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion);" (assignment_expression "psVar1 = (sqlite3_io_methods *)\n                 ((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion)" identifier = (cast_expression "(sqlite3_io_methods *)\n                 ((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion)" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion)" ( (binary_expression "(int)&psVar6->iVersion + (uint)(psVar5 < psVar3) + (int)&psVar1->iVersion" (binary_expression "(int)&psVar6->iVersion + (uint)(psVar5 < psVar3)" (cast_expression "(int)&psVar6->iVersion" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&psVar6->iVersion" & (field_expression "psVar6->iVersion" identifier -> field_identifier))) + (call_expression "(uint)(psVar5 < psVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(psVar5 < psVar3)" ( (binary_expression "psVar5 < psVar3" identifier < identifier) )))) + (cast_expression "(int)&psVar1->iVersion" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&psVar1->iVersion" & (field_expression "psVar1->iVersion" identifier -> field_identifier)))) )))) ;) (if_statement "if ((psVar10 == (sqlite3_io_methods *)0x0) || ((int)iOfst._0_4_ < (int)psVar1)) break;" if (parenthesized_expression "((psVar10 == (sqlite3_io_methods *)0x0) || ((int)iOfst._0_4_ < (int)psVar1))" ( (binary_expression "(psVar10 == (sqlite3_io_methods *)0x0) || ((int)iOfst._0_4_ < (int)psVar1)" (parenthesized_expression "(psVar10 == (sqlite3_io_methods *)0x0)" ( (binary_expression "psVar10 == (sqlite3_io_methods *)0x0" identifier == (cast_expression "(sqlite3_io_methods *)0x0" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "((int)iOfst._0_4_ < (int)psVar1)" ( (binary_expression "(int)iOfst._0_4_ < (int)psVar1" (cast_expression "(int)iOfst._0_4_" ( (type_descriptor "int" primitive_type) ) (field_expression "iOfst._0_4_" identifier . field_identifier)) < (cast_expression "(int)psVar1" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )) (break_statement "break;" break ;)) (expression_statement "psVar3 = psVar5;" (assignment_expression "psVar3 = psVar5" identifier = identifier) ;) }) while (parenthesized_expression "((psVar1 != iOfst._0_4_) || (psVar5 <= iOfst._4_4_))" ( (binary_expression "(psVar1 != iOfst._0_4_) || (psVar5 <= iOfst._4_4_)" (parenthesized_expression "(psVar1 != iOfst._0_4_)" ( (binary_expression "psVar1 != iOfst._0_4_" identifier != (field_expression "iOfst._0_4_" identifier . field_identifier)) )) || (parenthesized_expression "(psVar5 <= iOfst._4_4_)" ( (binary_expression "psVar5 <= iOfst._4_4_" identifier <= (field_expression "iOfst._4_4_" identifier . field_identifier)) ))) )) ;) })) }))) (expression_statement "(*(code *)PTR___moddi3_00190b98)(iOfst._0_4_,iOfst._4_4_,psVar6,psVar9);" (call_expression "(*(code *)PTR___moddi3_00190b98)(iOfst._0_4_,iOfst._4_4_,psVar6,psVar9)" (parenthesized_expression "(*(code *)PTR___moddi3_00190b98)" ( (pointer_expression "*(code *)PTR___moddi3_00190b98" * (cast_expression "(code *)PTR___moddi3_00190b98" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iOfst._0_4_,iOfst._4_4_,psVar6,psVar9)" ( (field_expression "iOfst._0_4_" identifier . field_identifier) , (field_expression "iOfst._4_4_" identifier . field_identifier) , identifier , identifier ))) ;) (expression_statement "iVar4 = extraout_v1;" (assignment_expression "iVar4 = extraout_v1" identifier = identifier) ;) (expression_statement "iVar8 = iAmt;" (assignment_expression "iVar8 = iAmt" identifier = identifier) ;) (while_statement "while( true ) {\n    iVar7 = (int)psVar9 - iVar4;\n    iVar2 = iVar7;\n    if (iVar8 <= iVar7) {\n      iVar2 = iVar8;\n    }\n    iVar8 = iVar8 - iVar7;\n    (*(code *)PTR_memcpy_00190e2c)(zBuf,(int)&psVar10->xClose + iVar4,iVar2);\n    zBuf = (void *)((int)zBuf + iVar2);\n    if (iVar8 < 0) break;\n    psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n    iVar4 = 0;\n    if (psVar10 == (sqlite3_io_methods *)0x0) goto LAB_00049604;\n    if (iVar8 == 0) goto LAB_0004958c;\n    psVar9 = pJfd[1].pMethods;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar7 = (int)psVar9 - iVar4;\n    iVar2 = iVar7;\n    if (iVar8 <= iVar7) {\n      iVar2 = iVar8;\n    }\n    iVar8 = iVar8 - iVar7;\n    (*(code *)PTR_memcpy_00190e2c)(zBuf,(int)&psVar10->xClose + iVar4,iVar2);\n    zBuf = (void *)((int)zBuf + iVar2);\n    if (iVar8 < 0) break;\n    psVar10 = (sqlite3_io_methods *)psVar10->iVersion;\n    iVar4 = 0;\n    if (psVar10 == (sqlite3_io_methods *)0x0) goto LAB_00049604;\n    if (iVar8 == 0) goto LAB_0004958c;\n    psVar9 = pJfd[1].pMethods;\n  }" { (expression_statement "iVar7 = (int)psVar9 - iVar4;" (assignment_expression "iVar7 = (int)psVar9 - iVar4" identifier = (binary_expression "(int)psVar9 - iVar4" (cast_expression "(int)psVar9" ( (type_descriptor "int" primitive_type) ) identifier) - identifier)) ;) (expression_statement "iVar2 = iVar7;" (assignment_expression "iVar2 = iVar7" identifier = identifier) ;) (if_statement "if (iVar8 <= iVar7) {\n      iVar2 = iVar8;\n    }" if (parenthesized_expression "(iVar8 <= iVar7)" ( (binary_expression "iVar8 <= iVar7" identifier <= identifier) )) (compound_statement "{\n      iVar2 = iVar8;\n    }" { (expression_statement "iVar2 = iVar8;" (assignment_expression "iVar2 = iVar8" identifier = identifier) ;) })) (expression_statement "iVar8 = iVar8 - iVar7;" (assignment_expression "iVar8 = iVar8 - iVar7" identifier = (binary_expression "iVar8 - iVar7" identifier - identifier)) ;) (expression_statement "(*(code *)PTR_memcpy_00190e2c)(zBuf,(int)&psVar10->xClose + iVar4,iVar2);" (call_expression "(*(code *)PTR_memcpy_00190e2c)(zBuf,(int)&psVar10->xClose + iVar4,iVar2)" (parenthesized_expression "(*(code *)PTR_memcpy_00190e2c)" ( (pointer_expression "*(code *)PTR_memcpy_00190e2c" * (cast_expression "(code *)PTR_memcpy_00190e2c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(zBuf,(int)&psVar10->xClose + iVar4,iVar2)" ( identifier , (binary_expression "(int)&psVar10->xClose + iVar4" (cast_expression "(int)&psVar10->xClose" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&psVar10->xClose" & (field_expression "psVar10->xClose" identifier -> field_identifier))) + identifier) , identifier ))) ;) (expression_statement "zBuf = (void *)((int)zBuf + iVar2);" (assignment_expression "zBuf = (void *)((int)zBuf + iVar2)" identifier = (cast_expression "(void *)((int)zBuf + iVar2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)zBuf + iVar2)" ( (binary_expression "(int)zBuf + iVar2" (cast_expression "(int)zBuf" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (if_statement "if (iVar8 < 0) break;" if (parenthesized_expression "(iVar8 < 0)" ( (binary_expression "iVar8 < 0" identifier < number_literal) )) (break_statement "break;" break ;)) (expression_statement "psVar10 = (sqlite3_io_methods *)psVar10->iVersion;" (assignment_expression "psVar10 = (sqlite3_io_methods *)psVar10->iVersion" identifier = (cast_expression "(sqlite3_io_methods *)psVar10->iVersion" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "psVar10->iVersion" identifier -> field_identifier))) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (if_statement "if (psVar10 == (sqlite3_io_methods *)0x0) goto LAB_00049604;" if (parenthesized_expression "(psVar10 == (sqlite3_io_methods *)0x0)" ( (binary_expression "psVar10 == (sqlite3_io_methods *)0x0" identifier == (cast_expression "(sqlite3_io_methods *)0x0" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00049604;" goto statement_identifier ;)) (if_statement "if (iVar8 == 0) goto LAB_0004958c;" if (parenthesized_expression "(iVar8 == 0)" ( (binary_expression "iVar8 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0004958c;" goto statement_identifier ;)) (expression_statement "psVar9 = pJfd[1].pMethods;" (assignment_expression "psVar9 = pJfd[1].pMethods" identifier = (field_expression "pJfd[1].pMethods" (subscript_expression "pJfd[1]" identifier [ number_literal ]) . field_identifier)) ;) })) (if_statement "if (psVar10 == (sqlite3_io_methods *)0x0) {\nLAB_00049604:\n    pJfd[0xc].pMethods = psVar10;\n    pJfd[10].pMethods = (sqlite3_io_methods *)0x0;\n    pJfd[0xb].pMethods = (sqlite3_io_methods *)0x0;\n    return 0;\n  }" if (parenthesized_expression "(psVar10 == (sqlite3_io_methods *)0x0)" ( (binary_expression "psVar10 == (sqlite3_io_methods *)0x0" identifier == (cast_expression "(sqlite3_io_methods *)0x0" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_00049604:\n    pJfd[0xc].pMethods = psVar10;\n    pJfd[10].pMethods = (sqlite3_io_methods *)0x0;\n    pJfd[0xb].pMethods = (sqlite3_io_methods *)0x0;\n    return 0;\n  }" { (labeled_statement "LAB_00049604:\n    pJfd[0xc].pMethods = psVar10;" statement_identifier : (expression_statement "pJfd[0xc].pMethods = psVar10;" (assignment_expression "pJfd[0xc].pMethods = psVar10" (field_expression "pJfd[0xc].pMethods" (subscript_expression "pJfd[0xc]" identifier [ number_literal ]) . field_identifier) = identifier) ;)) (expression_statement "pJfd[10].pMethods = (sqlite3_io_methods *)0x0;" (assignment_expression "pJfd[10].pMethods = (sqlite3_io_methods *)0x0" (field_expression "pJfd[10].pMethods" (subscript_expression "pJfd[10]" identifier [ number_literal ]) . field_identifier) = (cast_expression "(sqlite3_io_methods *)0x0" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pJfd[0xb].pMethods = (sqlite3_io_methods *)0x0;" (assignment_expression "pJfd[0xb].pMethods = (sqlite3_io_methods *)0x0" (field_expression "pJfd[0xb].pMethods" (subscript_expression "pJfd[0xb]" identifier [ number_literal ]) . field_identifier) = (cast_expression "(sqlite3_io_methods *)0x0" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (return_statement "return 0;" return number_literal ;) })) (labeled_statement "LAB_0004958c:\n  pJfd[0xc].pMethods = psVar10;" statement_identifier : (expression_statement "pJfd[0xc].pMethods = psVar10;" (assignment_expression "pJfd[0xc].pMethods = psVar10" (field_expression "pJfd[0xc].pMethods" (subscript_expression "pJfd[0xc]" identifier [ number_literal ]) . field_identifier) = identifier) ;)) (expression_statement "psVar6 = (sqlite3_io_methods *)((int)&(iOfst._4_4_)->iVersion + iAmt);" (assignment_expression "psVar6 = (sqlite3_io_methods *)((int)&(iOfst._4_4_)->iVersion + iAmt)" identifier = (cast_expression "(sqlite3_io_methods *)((int)&(iOfst._4_4_)->iVersion + iAmt)" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&(iOfst._4_4_)->iVersion + iAmt)" ( (binary_expression "(int)&(iOfst._4_4_)->iVersion + iAmt" (cast_expression "(int)&(iOfst._4_4_)->iVersion" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&(iOfst._4_4_)->iVersion" & (field_expression "(iOfst._4_4_)->iVersion" (parenthesized_expression "(iOfst._4_4_)" ( (field_expression "iOfst._4_4_" identifier . field_identifier) )) -> field_identifier))) + identifier) )))) ;) (expression_statement "pJfd[0xb].pMethods = psVar6;" (assignment_expression "pJfd[0xb].pMethods = psVar6" (field_expression "pJfd[0xb].pMethods" (subscript_expression "pJfd[0xb]" identifier [ number_literal ]) . field_identifier) = identifier) ;) (expression_statement "pJfd[10].pMethods =\n       (sqlite3_io_methods *)\n       ((int)&(iOfst._0_4_)->iVersion + (uint)(psVar6 < (uint)iAmt) + (iAmt >> 0x1f));" (assignment_expression "pJfd[10].pMethods =\n       (sqlite3_io_methods *)\n       ((int)&(iOfst._0_4_)->iVersion + (uint)(psVar6 < (uint)iAmt) + (iAmt >> 0x1f))" (field_expression "pJfd[10].pMethods" (subscript_expression "pJfd[10]" identifier [ number_literal ]) . field_identifier) = (cast_expression "(sqlite3_io_methods *)\n       ((int)&(iOfst._0_4_)->iVersion + (uint)(psVar6 < (uint)iAmt) + (iAmt >> 0x1f))" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&(iOfst._0_4_)->iVersion + (uint)(psVar6 < (uint)iAmt) + (iAmt >> 0x1f))" ( (binary_expression "(int)&(iOfst._0_4_)->iVersion + (uint)(psVar6 < (uint)iAmt) + (iAmt >> 0x1f)" (binary_expression "(int)&(iOfst._0_4_)->iVersion + (uint)(psVar6 < (uint)iAmt)" (cast_expression "(int)&(iOfst._0_4_)->iVersion" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&(iOfst._0_4_)->iVersion" & (field_expression "(iOfst._0_4_)->iVersion" (parenthesized_expression "(iOfst._0_4_)" ( (field_expression "iOfst._0_4_" identifier . field_identifier) )) -> field_identifier))) + (call_expression "(uint)(psVar6 < (uint)iAmt)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(psVar6 < (uint)iAmt)" ( (binary_expression "psVar6 < (uint)iAmt" identifier < (cast_expression "(uint)iAmt" ( (type_descriptor "uint" type_identifier) ) identifier)) )))) + (parenthesized_expression "(iAmt >> 0x1f)" ( (binary_expression "iAmt >> 0x1f" identifier >> number_literal) ))) )))) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4\nFUN_00049460(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)\n\n{\n  int iVar1;\n  uint uVar2;\n  int extraout_v1;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int *piVar6;\n  \n  uVar5 = *(uint *)(param_1 + 4);\n  iVar3 = (int)uVar5 >> 0x1f;\n  if (((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0)) {\n    piVar6 = *(int **)(param_1 + 0x30);\n  }\n  else {\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }\n  (*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5);\n  iVar3 = extraout_v1;\n  uVar4 = param_3;\n  while( true ) {\n    uVar5 = uVar5 - iVar3;\n    uVar2 = uVar5;\n    if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }\n    uVar4 = uVar4 - uVar5;\n    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);\n    param_2 = param_2 + uVar2;\n    if ((int)uVar4 < 0) break;\n    piVar6 = (int *)*piVar6;\n    iVar3 = 0;\n    if (piVar6 == (int *)0x0) goto LAB_00049604;\n    if (uVar4 == 0) goto LAB_0004958c;\n    uVar5 = *(uint *)(param_1 + 4);\n  }\n  if (piVar6 == (int *)0x0) {\nLAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;\n    *(undefined4 *)(param_1 + 0x28) = 0;\n    *(undefined4 *)(param_1 + 0x2c) = 0;\n    return 0;\n  }\nLAB_0004958c:\n  *(int **)(param_1 + 0x30) = piVar6;\n  *(uint *)(param_1 + 0x2c) = param_3 + param_6;\n  *(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5\n  ;\n  return 0;\n}\n\n" (function_definition "undefined4\nFUN_00049460(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)\n\n{\n  int iVar1;\n  uint uVar2;\n  int extraout_v1;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int *piVar6;\n  \n  uVar5 = *(uint *)(param_1 + 4);\n  iVar3 = (int)uVar5 >> 0x1f;\n  if (((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0)) {\n    piVar6 = *(int **)(param_1 + 0x30);\n  }\n  else {\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }\n  (*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5);\n  iVar3 = extraout_v1;\n  uVar4 = param_3;\n  while( true ) {\n    uVar5 = uVar5 - iVar3;\n    uVar2 = uVar5;\n    if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }\n    uVar4 = uVar4 - uVar5;\n    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);\n    param_2 = param_2 + uVar2;\n    if ((int)uVar4 < 0) break;\n    piVar6 = (int *)*piVar6;\n    iVar3 = 0;\n    if (piVar6 == (int *)0x0) goto LAB_00049604;\n    if (uVar4 == 0) goto LAB_0004958c;\n    uVar5 = *(uint *)(param_1 + 4);\n  }\n  if (piVar6 == (int *)0x0) {\nLAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;\n    *(undefined4 *)(param_1 + 0x28) = 0;\n    *(undefined4 *)(param_1 + 0x2c) = 0;\n    return 0;\n  }\nLAB_0004958c:\n  *(int **)(param_1 + 0x30) = piVar6;\n  *(uint *)(param_1 + 0x2c) = param_3 + param_6;\n  *(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5\n  ;\n  return 0;\n}" type_identifier (function_declarator "FUN_00049460(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)" identifier (parameter_list "(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) , (parameter_declaration "uint param_6" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int extraout_v1;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int *piVar6;\n  \n  uVar5 = *(uint *)(param_1 + 4);\n  iVar3 = (int)uVar5 >> 0x1f;\n  if (((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0)) {\n    piVar6 = *(int **)(param_1 + 0x30);\n  }\n  else {\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }\n  (*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5);\n  iVar3 = extraout_v1;\n  uVar4 = param_3;\n  while( true ) {\n    uVar5 = uVar5 - iVar3;\n    uVar2 = uVar5;\n    if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }\n    uVar4 = uVar4 - uVar5;\n    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);\n    param_2 = param_2 + uVar2;\n    if ((int)uVar4 < 0) break;\n    piVar6 = (int *)*piVar6;\n    iVar3 = 0;\n    if (piVar6 == (int *)0x0) goto LAB_00049604;\n    if (uVar4 == 0) goto LAB_0004958c;\n    uVar5 = *(uint *)(param_1 + 4);\n  }\n  if (piVar6 == (int *)0x0) {\nLAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;\n    *(undefined4 *)(param_1 + 0x28) = 0;\n    *(undefined4 *)(param_1 + 0x2c) = 0;\n    return 0;\n  }\nLAB_0004958c:\n  *(int **)(param_1 + 0x30) = piVar6;\n  *(uint *)(param_1 + 0x2c) = param_3 + param_6;\n  *(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5\n  ;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int extraout_v1;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (expression_statement "uVar5 = *(uint *)(param_1 + 4);" (assignment_expression "uVar5 = *(uint *)(param_1 + 4)" identifier = (pointer_expression "*(uint *)(param_1 + 4)" * (cast_expression "(uint *)(param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = (int)uVar5 >> 0x1f;" (assignment_expression "iVar3 = (int)uVar5 >> 0x1f" identifier = (binary_expression "(int)uVar5 >> 0x1f" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal)) ;) (if_statement "if (((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0)) {\n    piVar6 = *(int **)(param_1 + 0x30);\n  }\n  else {\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }" if (parenthesized_expression "(((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0))" ( (binary_expression "((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0)" (parenthesized_expression "((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6))" ( (binary_expression "(*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)" (parenthesized_expression "(*(int *)(param_1 + 0x28) == param_5)" ( (binary_expression "*(int *)(param_1 + 0x28) == param_5" (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) == identifier) )) && (parenthesized_expression "(*(uint *)(param_1 + 0x2c) == param_6)" ( (binary_expression "*(uint *)(param_1 + 0x2c) == param_6" (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) == identifier) ))) )) && (parenthesized_expression "(param_5 != 0 || param_6 != 0)" ( (binary_expression "param_5 != 0 || param_6 != 0" (binary_expression "param_5 != 0" identifier != number_literal) || (binary_expression "param_6 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    piVar6 = *(int **)(param_1 + 0x30);\n  }" { (expression_statement "piVar6 = *(int **)(param_1 + 0x30);" (assignment_expression "piVar6 = *(int **)(param_1 + 0x30)" identifier = (pointer_expression "*(int **)(param_1 + 0x30)" * (cast_expression "(int **)(param_1 + 0x30)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) }) (else_clause "else {\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }" else (compound_statement "{\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }" { (expression_statement "piVar6 = *(int **)(param_1 + 0x10);" (assignment_expression "piVar6 = *(int **)(param_1 + 0x10)" identifier = (pointer_expression "*(int **)(param_1 + 0x10)" * (cast_expression "(int **)(param_1 + 0x10)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (if_statement "if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }" if (parenthesized_expression "((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5))" ( (binary_expression "(piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)" (parenthesized_expression "(piVar6 != (int *)0x0)" ( (binary_expression "piVar6 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)" ( (comma_expression "uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5" (assignment_expression "uVar4 = uVar5" identifier = identifier) , (comma_expression "iVar1 = iVar3, iVar3 <= param_5" (assignment_expression "iVar1 = iVar3" identifier = identifier) , (binary_expression "iVar3 <= param_5" identifier <= identifier))) ))) )) (compound_statement "{\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }" { (while_statement "while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }" while (parenthesized_expression "((iVar1 != param_5 || (uVar4 <= param_6)))" ( (parenthesized_expression "(iVar1 != param_5 || (uVar4 <= param_6))" ( (binary_expression "iVar1 != param_5 || (uVar4 <= param_6)" (binary_expression "iVar1 != param_5" identifier != identifier) || (parenthesized_expression "(uVar4 <= param_6)" ( (binary_expression "uVar4 <= param_6" identifier <= identifier) ))) )) )) (compound_statement "{\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }" { (expression_statement "piVar6 = (int *)*piVar6;" (assignment_expression "piVar6 = (int *)*piVar6" identifier = (cast_expression "(int *)*piVar6" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar6" * identifier))) ;) (expression_statement "iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;" (assignment_expression "iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3" identifier = (binary_expression "(uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3" (binary_expression "(uint)(uVar4 + uVar5 < uVar4) + iVar1" (call_expression "(uint)(uVar4 + uVar5 < uVar4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar4 + uVar5 < uVar4)" ( (binary_expression "uVar4 + uVar5 < uVar4" (binary_expression "uVar4 + uVar5" identifier + identifier) < identifier) ))) + identifier) + identifier)) ;) (if_statement "if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;" if (parenthesized_expression "((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1))" ( (binary_expression "(piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)" (parenthesized_expression "(piVar6 == (int *)0x0)" ( (binary_expression "piVar6 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(uVar4 = uVar4 + uVar5, param_5 < iVar1)" ( (comma_expression "uVar4 = uVar4 + uVar5, param_5 < iVar1" (assignment_expression "uVar4 = uVar4 + uVar5" identifier = (binary_expression "uVar4 + uVar5" identifier + identifier)) , (binary_expression "param_5 < iVar1" identifier < identifier)) ))) )) (break_statement "break;" break ;)) })) })) }))) (expression_statement "(*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5);" (call_expression "(*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5)" (parenthesized_expression "(*(code *)PTR_FUN_00190b98)" ( (pointer_expression "*(code *)PTR_FUN_00190b98" * (cast_expression "(code *)PTR_FUN_00190b98" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_5,param_6,iVar3,uVar5)" ( identifier , identifier , identifier , identifier ))) ;) (expression_statement "iVar3 = extraout_v1;" (assignment_expression "iVar3 = extraout_v1" identifier = identifier) ;) (expression_statement "uVar4 = param_3;" (assignment_expression "uVar4 = param_3" identifier = identifier) ;) (while_statement "while( true ) {\n    uVar5 = uVar5 - iVar3;\n    uVar2 = uVar5;\n    if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }\n    uVar4 = uVar4 - uVar5;\n    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);\n    param_2 = param_2 + uVar2;\n    if ((int)uVar4 < 0) break;\n    piVar6 = (int *)*piVar6;\n    iVar3 = 0;\n    if (piVar6 == (int *)0x0) goto LAB_00049604;\n    if (uVar4 == 0) goto LAB_0004958c;\n    uVar5 = *(uint *)(param_1 + 4);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    uVar5 = uVar5 - iVar3;\n    uVar2 = uVar5;\n    if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }\n    uVar4 = uVar4 - uVar5;\n    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);\n    param_2 = param_2 + uVar2;\n    if ((int)uVar4 < 0) break;\n    piVar6 = (int *)*piVar6;\n    iVar3 = 0;\n    if (piVar6 == (int *)0x0) goto LAB_00049604;\n    if (uVar4 == 0) goto LAB_0004958c;\n    uVar5 = *(uint *)(param_1 + 4);\n  }" { (expression_statement "uVar5 = uVar5 - iVar3;" (assignment_expression "uVar5 = uVar5 - iVar3" identifier = (binary_expression "uVar5 - iVar3" identifier - identifier)) ;) (expression_statement "uVar2 = uVar5;" (assignment_expression "uVar2 = uVar5" identifier = identifier) ;) (if_statement "if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }" if (parenthesized_expression "((int)uVar4 <= (int)uVar5)" ( (binary_expression "(int)uVar4 <= (int)uVar5" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) <= (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      uVar2 = uVar4;\n    }" { (expression_statement "uVar2 = uVar4;" (assignment_expression "uVar2 = uVar4" identifier = identifier) ;) })) (expression_statement "uVar4 = uVar4 - uVar5;" (assignment_expression "uVar4 = uVar4 - uVar5" identifier = (binary_expression "uVar4 - uVar5" identifier - identifier)) ;) (expression_statement "(*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);" (call_expression "(*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2)" (parenthesized_expression "(*(code *)PTR_memcpy_00190e2c)" ( (pointer_expression "*(code *)PTR_memcpy_00190e2c" * (cast_expression "(code *)PTR_memcpy_00190e2c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,(int)piVar6 + iVar3 + 4,uVar2)" ( identifier , (binary_expression "(int)piVar6 + iVar3 + 4" (binary_expression "(int)piVar6 + iVar3" (cast_expression "(int)piVar6" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) , identifier ))) ;) (expression_statement "param_2 = param_2 + uVar2;" (assignment_expression "param_2 = param_2 + uVar2" identifier = (binary_expression "param_2 + uVar2" identifier + identifier)) ;) (if_statement "if ((int)uVar4 < 0) break;" if (parenthesized_expression "((int)uVar4 < 0)" ( (binary_expression "(int)uVar4 < 0" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "piVar6 = (int *)*piVar6;" (assignment_expression "piVar6 = (int *)*piVar6" identifier = (cast_expression "(int *)*piVar6" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar6" * identifier))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if (piVar6 == (int *)0x0) goto LAB_00049604;" if (parenthesized_expression "(piVar6 == (int *)0x0)" ( (binary_expression "piVar6 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00049604;" goto statement_identifier ;)) (if_statement "if (uVar4 == 0) goto LAB_0004958c;" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0004958c;" goto statement_identifier ;)) (expression_statement "uVar5 = *(uint *)(param_1 + 4);" (assignment_expression "uVar5 = *(uint *)(param_1 + 4)" identifier = (pointer_expression "*(uint *)(param_1 + 4)" * (cast_expression "(uint *)(param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) })) (if_statement "if (piVar6 == (int *)0x0) {\nLAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;\n    *(undefined4 *)(param_1 + 0x28) = 0;\n    *(undefined4 *)(param_1 + 0x2c) = 0;\n    return 0;\n  }" if (parenthesized_expression "(piVar6 == (int *)0x0)" ( (binary_expression "piVar6 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;\n    *(undefined4 *)(param_1 + 0x28) = 0;\n    *(undefined4 *)(param_1 + 0x2c) = 0;\n    return 0;\n  }" { (labeled_statement "LAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;" statement_identifier : (expression_statement "*(int **)(param_1 + 0x30) = piVar6;" (assignment_expression "*(int **)(param_1 + 0x30) = piVar6" (pointer_expression "*(int **)(param_1 + 0x30)" * (cast_expression "(int **)(param_1 + 0x30)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = identifier) ;)) (expression_statement "*(undefined4 *)(param_1 + 0x28) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x28) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x28)" * (cast_expression "(undefined4 *)(param_1 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x2c) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x2c) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x2c)" * (cast_expression "(undefined4 *)(param_1 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (labeled_statement "LAB_0004958c:\n  *(int **)(param_1 + 0x30) = piVar6;" statement_identifier : (expression_statement "*(int **)(param_1 + 0x30) = piVar6;" (assignment_expression "*(int **)(param_1 + 0x30) = piVar6" (pointer_expression "*(int **)(param_1 + 0x30)" * (cast_expression "(int **)(param_1 + 0x30)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = identifier) ;)) (expression_statement "*(uint *)(param_1 + 0x2c) = param_3 + param_6;" (assignment_expression "*(uint *)(param_1 + 0x2c) = param_3 + param_6" (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) = (binary_expression "param_3 + param_6" identifier + identifier)) ;) (expression_statement "*(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5\n  ;" (assignment_expression "*(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5" (pointer_expression "*(uint *)(param_1 + 0x28)" * (cast_expression "(uint *)(param_1 + 0x28)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = (binary_expression "(uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5" (binary_expression "(uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f)" (call_expression "(uint)(param_3 + param_6 < param_3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_3 + param_6 < param_3)" ( (binary_expression "param_3 + param_6 < param_3" (binary_expression "param_3 + param_6" identifier + identifier) < identifier) ))) + (parenthesized_expression "((int)param_3 >> 0x1f)" ( (binary_expression "(int)param_3 >> 0x1f" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) + identifier)) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == IDENT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == IDENT) ))) )) && (parenthesized_expression ( (binary_expression (binary_expression IDENT != LIT) || (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = IDENT) , (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression IDENT <= IDENT))) ))) )) (compound_statement { (while_statement while (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT != IDENT) || (parenthesized_expression ( (binary_expression IDENT <= IDENT) ))) )) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (binary_expression IDENT + IDENT) < IDENT) ))) + IDENT) + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT + IDENT)) , (binary_expression IDENT < IDENT)) ))) )) (break_statement break ;)) })) })) }))) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) <= (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + LIT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return LIT ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (binary_expression IDENT + IDENT) < IDENT) ))) + (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) + IDENT)) ;) (return_statement return LIT ;) })))
(function_definition "undefined4\nFUN_00049460(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)\n\n{\n  int iVar1;\n  uint uVar2;\n  int extraout_v1;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int *piVar6;\n  \n  uVar5 = *(uint *)(param_1 + 4);\n  iVar3 = (int)uVar5 >> 0x1f;\n  if (((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0)) {\n    piVar6 = *(int **)(param_1 + 0x30);\n  }\n  else {\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }\n  (*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5);\n  iVar3 = extraout_v1;\n  uVar4 = param_3;\n  while( true ) {\n    uVar5 = uVar5 - iVar3;\n    uVar2 = uVar5;\n    if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }\n    uVar4 = uVar4 - uVar5;\n    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);\n    param_2 = param_2 + uVar2;\n    if ((int)uVar4 < 0) break;\n    piVar6 = (int *)*piVar6;\n    iVar3 = 0;\n    if (piVar6 == (int *)0x0) goto LAB_00049604;\n    if (uVar4 == 0) goto LAB_0004958c;\n    uVar5 = *(uint *)(param_1 + 4);\n  }\n  if (piVar6 == (int *)0x0) {\nLAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;\n    *(undefined4 *)(param_1 + 0x28) = 0;\n    *(undefined4 *)(param_1 + 0x2c) = 0;\n    return 0;\n  }\nLAB_0004958c:\n  *(int **)(param_1 + 0x30) = piVar6;\n  *(uint *)(param_1 + 0x2c) = param_3 + param_6;\n  *(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5\n  ;\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_00049460(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)" (identifier "FUN_00049460") (parameter_list "(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) (, ",") (parameter_declaration "uint param_6" (type_identifier "uint") (identifier "param_6")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int extraout_v1;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int *piVar6;\n  \n  uVar5 = *(uint *)(param_1 + 4);\n  iVar3 = (int)uVar5 >> 0x1f;\n  if (((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0)) {\n    piVar6 = *(int **)(param_1 + 0x30);\n  }\n  else {\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }\n  (*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5);\n  iVar3 = extraout_v1;\n  uVar4 = param_3;\n  while( true ) {\n    uVar5 = uVar5 - iVar3;\n    uVar2 = uVar5;\n    if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }\n    uVar4 = uVar4 - uVar5;\n    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);\n    param_2 = param_2 + uVar2;\n    if ((int)uVar4 < 0) break;\n    piVar6 = (int *)*piVar6;\n    iVar3 = 0;\n    if (piVar6 == (int *)0x0) goto LAB_00049604;\n    if (uVar4 == 0) goto LAB_0004958c;\n    uVar5 = *(uint *)(param_1 + 4);\n  }\n  if (piVar6 == (int *)0x0) {\nLAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;\n    *(undefined4 *)(param_1 + 0x28) = 0;\n    *(undefined4 *)(param_1 + 0x2c) = 0;\n    return 0;\n  }\nLAB_0004958c:\n  *(int **)(param_1 + 0x30) = piVar6;\n  *(uint *)(param_1 + 0x2c) = param_3 + param_6;\n  *(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5\n  ;\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int extraout_v1;" (primitive_type "int") (identifier "extraout_v1") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int *piVar6;" (primitive_type "int") (pointer_declarator "*piVar6" (* "*") (identifier "piVar6")) (; ";")) (expression_statement "uVar5 = *(uint *)(param_1 + 4);" (assignment_expression "uVar5 = *(uint *)(param_1 + 4)" (identifier "uVar5") (= "=") (pointer_expression "*(uint *)(param_1 + 4)" (* "*") (cast_expression "(uint *)(param_1 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "iVar3 = (int)uVar5 >> 0x1f;" (assignment_expression "iVar3 = (int)uVar5 >> 0x1f" (identifier "iVar3") (= "=") (binary_expression "(int)uVar5 >> 0x1f" (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5")) (>> ">>") (number_literal "0x1f"))) (; ";")) (if_statement "if (((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0)) {\n    piVar6 = *(int **)(param_1 + 0x30);\n  }\n  else {\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0))" (( "(") (binary_expression "((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&\n     (param_5 != 0 || param_6 != 0)" (parenthesized_expression "((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6))" (( "(") (binary_expression "(*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)" (parenthesized_expression "(*(int *)(param_1 + 0x28) == param_5)" (( "(") (binary_expression "*(int *)(param_1 + 0x28) == param_5" (pointer_expression "*(int *)(param_1 + 0x28)" (* "*") (cast_expression "(int *)(param_1 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (== "==") (identifier "param_5")) () ")")) (&& "&&") (parenthesized_expression "(*(uint *)(param_1 + 0x2c) == param_6)" (( "(") (binary_expression "*(uint *)(param_1 + 0x2c) == param_6" (pointer_expression "*(uint *)(param_1 + 0x2c)" (* "*") (cast_expression "(uint *)(param_1 + 0x2c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")")))) (== "==") (identifier "param_6")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(param_5 != 0 || param_6 != 0)" (( "(") (binary_expression "param_5 != 0 || param_6 != 0" (binary_expression "param_5 != 0" (identifier "param_5") (!= "!=") (number_literal "0")) (|| "||") (binary_expression "param_6 != 0" (identifier "param_6") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    piVar6 = *(int **)(param_1 + 0x30);\n  }" ({ "{") (expression_statement "piVar6 = *(int **)(param_1 + 0x30);" (assignment_expression "piVar6 = *(int **)(param_1 + 0x30)" (identifier "piVar6") (= "=") (pointer_expression "*(int **)(param_1 + 0x30)" (* "*") (cast_expression "(int **)(param_1 + 0x30)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }" (else "else") (compound_statement "{\n    piVar6 = *(int **)(param_1 + 0x10);\n    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }\n  }" ({ "{") (expression_statement "piVar6 = *(int **)(param_1 + 0x10);" (assignment_expression "piVar6 = *(int **)(param_1 + 0x10)" (identifier "piVar6") (= "=") (pointer_expression "*(int **)(param_1 + 0x10)" (* "*") (cast_expression "(int **)(param_1 + 0x10)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (if_statement "if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }" (if "if") (parenthesized_expression "((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5))" (( "(") (binary_expression "(piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)" (parenthesized_expression "(piVar6 != (int *)0x0)" (( "(") (binary_expression "piVar6 != (int *)0x0" (identifier "piVar6") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)" (( "(") (comma_expression "uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5" (assignment_expression "uVar4 = uVar5" (identifier "uVar4") (= "=") (identifier "uVar5")) (, ",") (comma_expression "iVar1 = iVar3, iVar3 <= param_5" (assignment_expression "iVar1 = iVar3" (identifier "iVar1") (= "=") (identifier "iVar3")) (, ",") (binary_expression "iVar3 <= param_5" (identifier "iVar3") (<= "<=") (identifier "param_5")))) () ")"))) () ")")) (compound_statement "{\n      while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }\n    }" ({ "{") (while_statement "while ((iVar1 != param_5 || (uVar4 <= param_6))) {\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }" (while "while") (parenthesized_expression "((iVar1 != param_5 || (uVar4 <= param_6)))" (( "(") (parenthesized_expression "(iVar1 != param_5 || (uVar4 <= param_6))" (( "(") (binary_expression "iVar1 != param_5 || (uVar4 <= param_6)" (binary_expression "iVar1 != param_5" (identifier "iVar1") (!= "!=") (identifier "param_5")) (|| "||") (parenthesized_expression "(uVar4 <= param_6)" (( "(") (binary_expression "uVar4 <= param_6" (identifier "uVar4") (<= "<=") (identifier "param_6")) () ")"))) () ")")) () ")")) (compound_statement "{\n        piVar6 = (int *)*piVar6;\n        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;\n        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;\n      }" ({ "{") (expression_statement "piVar6 = (int *)*piVar6;" (assignment_expression "piVar6 = (int *)*piVar6" (identifier "piVar6") (= "=") (cast_expression "(int *)*piVar6" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar6" (* "*") (identifier "piVar6")))) (; ";")) (expression_statement "iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;" (assignment_expression "iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3" (identifier "iVar1") (= "=") (binary_expression "(uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3" (binary_expression "(uint)(uVar4 + uVar5 < uVar4) + iVar1" (call_expression "(uint)(uVar4 + uVar5 < uVar4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(uVar4 + uVar5 < uVar4)" (( "(") (binary_expression "uVar4 + uVar5 < uVar4" (binary_expression "uVar4 + uVar5" (identifier "uVar4") (+ "+") (identifier "uVar5")) (< "<") (identifier "uVar4")) () ")"))) (+ "+") (identifier "iVar1")) (+ "+") (identifier "iVar3"))) (; ";")) (if_statement "if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;" (if "if") (parenthesized_expression "((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1))" (( "(") (binary_expression "(piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)" (parenthesized_expression "(piVar6 == (int *)0x0)" (( "(") (binary_expression "piVar6 == (int *)0x0" (identifier "piVar6") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (|| "||") (parenthesized_expression "(uVar4 = uVar4 + uVar5, param_5 < iVar1)" (( "(") (comma_expression "uVar4 = uVar4 + uVar5, param_5 < iVar1" (assignment_expression "uVar4 = uVar4 + uVar5" (identifier "uVar4") (= "=") (binary_expression "uVar4 + uVar5" (identifier "uVar4") (+ "+") (identifier "uVar5"))) (, ",") (binary_expression "param_5 < iVar1" (identifier "param_5") (< "<") (identifier "iVar1"))) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}"))) (} "}"))) (} "}")))) (expression_statement "(*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5);" (call_expression "(*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5)" (parenthesized_expression "(*(code *)PTR_FUN_00190b98)" (( "(") (pointer_expression "*(code *)PTR_FUN_00190b98" (* "*") (cast_expression "(code *)PTR_FUN_00190b98" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_00190b98"))) () ")")) (argument_list "(param_5,param_6,iVar3,uVar5)" (( "(") (identifier "param_5") (, ",") (identifier "param_6") (, ",") (identifier "iVar3") (, ",") (identifier "uVar5") () ")"))) (; ";")) (expression_statement "iVar3 = extraout_v1;" (assignment_expression "iVar3 = extraout_v1" (identifier "iVar3") (= "=") (identifier "extraout_v1")) (; ";")) (expression_statement "uVar4 = param_3;" (assignment_expression "uVar4 = param_3" (identifier "uVar4") (= "=") (identifier "param_3")) (; ";")) (while_statement "while( true ) {\n    uVar5 = uVar5 - iVar3;\n    uVar2 = uVar5;\n    if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }\n    uVar4 = uVar4 - uVar5;\n    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);\n    param_2 = param_2 + uVar2;\n    if ((int)uVar4 < 0) break;\n    piVar6 = (int *)*piVar6;\n    iVar3 = 0;\n    if (piVar6 == (int *)0x0) goto LAB_00049604;\n    if (uVar4 == 0) goto LAB_0004958c;\n    uVar5 = *(uint *)(param_1 + 4);\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    uVar5 = uVar5 - iVar3;\n    uVar2 = uVar5;\n    if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }\n    uVar4 = uVar4 - uVar5;\n    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);\n    param_2 = param_2 + uVar2;\n    if ((int)uVar4 < 0) break;\n    piVar6 = (int *)*piVar6;\n    iVar3 = 0;\n    if (piVar6 == (int *)0x0) goto LAB_00049604;\n    if (uVar4 == 0) goto LAB_0004958c;\n    uVar5 = *(uint *)(param_1 + 4);\n  }" ({ "{") (expression_statement "uVar5 = uVar5 - iVar3;" (assignment_expression "uVar5 = uVar5 - iVar3" (identifier "uVar5") (= "=") (binary_expression "uVar5 - iVar3" (identifier "uVar5") (- "-") (identifier "iVar3"))) (; ";")) (expression_statement "uVar2 = uVar5;" (assignment_expression "uVar2 = uVar5" (identifier "uVar2") (= "=") (identifier "uVar5")) (; ";")) (if_statement "if ((int)uVar4 <= (int)uVar5) {\n      uVar2 = uVar4;\n    }" (if "if") (parenthesized_expression "((int)uVar4 <= (int)uVar5)" (( "(") (binary_expression "(int)uVar4 <= (int)uVar5" (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4")) (<= "<=") (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5"))) () ")")) (compound_statement "{\n      uVar2 = uVar4;\n    }" ({ "{") (expression_statement "uVar2 = uVar4;" (assignment_expression "uVar2 = uVar4" (identifier "uVar2") (= "=") (identifier "uVar4")) (; ";")) (} "}"))) (expression_statement "uVar4 = uVar4 - uVar5;" (assignment_expression "uVar4 = uVar4 - uVar5" (identifier "uVar4") (= "=") (binary_expression "uVar4 - uVar5" (identifier "uVar4") (- "-") (identifier "uVar5"))) (; ";")) (expression_statement "(*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);" (call_expression "(*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2)" (parenthesized_expression "(*(code *)PTR_memcpy_00190e2c)" (( "(") (pointer_expression "*(code *)PTR_memcpy_00190e2c" (* "*") (cast_expression "(code *)PTR_memcpy_00190e2c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_00190e2c"))) () ")")) (argument_list "(param_2,(int)piVar6 + iVar3 + 4,uVar2)" (( "(") (identifier "param_2") (, ",") (binary_expression "(int)piVar6 + iVar3 + 4" (binary_expression "(int)piVar6 + iVar3" (cast_expression "(int)piVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar6")) (+ "+") (identifier "iVar3")) (+ "+") (number_literal "4")) (, ",") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "param_2 = param_2 + uVar2;" (assignment_expression "param_2 = param_2 + uVar2" (identifier "param_2") (= "=") (binary_expression "param_2 + uVar2" (identifier "param_2") (+ "+") (identifier "uVar2"))) (; ";")) (if_statement "if ((int)uVar4 < 0) break;" (if "if") (parenthesized_expression "((int)uVar4 < 0)" (( "(") (binary_expression "(int)uVar4 < 0" (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4")) (< "<") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "piVar6 = (int *)*piVar6;" (assignment_expression "piVar6 = (int *)*piVar6" (identifier "piVar6") (= "=") (cast_expression "(int *)*piVar6" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar6" (* "*") (identifier "piVar6")))) (; ";")) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (if_statement "if (piVar6 == (int *)0x0) goto LAB_00049604;" (if "if") (parenthesized_expression "(piVar6 == (int *)0x0)" (( "(") (binary_expression "piVar6 == (int *)0x0" (identifier "piVar6") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_00049604;" (goto "goto") (statement_identifier "LAB_00049604") (; ";"))) (if_statement "if (uVar4 == 0) goto LAB_0004958c;" (if "if") (parenthesized_expression "(uVar4 == 0)" (( "(") (binary_expression "uVar4 == 0" (identifier "uVar4") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0004958c;" (goto "goto") (statement_identifier "LAB_0004958c") (; ";"))) (expression_statement "uVar5 = *(uint *)(param_1 + 4);" (assignment_expression "uVar5 = *(uint *)(param_1 + 4)" (identifier "uVar5") (= "=") (pointer_expression "*(uint *)(param_1 + 4)" (* "*") (cast_expression "(uint *)(param_1 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (} "}"))) (if_statement "if (piVar6 == (int *)0x0) {\nLAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;\n    *(undefined4 *)(param_1 + 0x28) = 0;\n    *(undefined4 *)(param_1 + 0x2c) = 0;\n    return 0;\n  }" (if "if") (parenthesized_expression "(piVar6 == (int *)0x0)" (( "(") (binary_expression "piVar6 == (int *)0x0" (identifier "piVar6") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\nLAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;\n    *(undefined4 *)(param_1 + 0x28) = 0;\n    *(undefined4 *)(param_1 + 0x2c) = 0;\n    return 0;\n  }" ({ "{") (labeled_statement "LAB_00049604:\n    *(int **)(param_1 + 0x30) = piVar6;" (statement_identifier "LAB_00049604") (: ":") (expression_statement "*(int **)(param_1 + 0x30) = piVar6;" (assignment_expression "*(int **)(param_1 + 0x30) = piVar6" (pointer_expression "*(int **)(param_1 + 0x30)" (* "*") (cast_expression "(int **)(param_1 + 0x30)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (identifier "piVar6")) (; ";"))) (expression_statement "*(undefined4 *)(param_1 + 0x28) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x28) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x28)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x28)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x2c) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x2c) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x2c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x2c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (labeled_statement "LAB_0004958c:\n  *(int **)(param_1 + 0x30) = piVar6;" (statement_identifier "LAB_0004958c") (: ":") (expression_statement "*(int **)(param_1 + 0x30) = piVar6;" (assignment_expression "*(int **)(param_1 + 0x30) = piVar6" (pointer_expression "*(int **)(param_1 + 0x30)" (* "*") (cast_expression "(int **)(param_1 + 0x30)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (identifier "piVar6")) (; ";"))) (expression_statement "*(uint *)(param_1 + 0x2c) = param_3 + param_6;" (assignment_expression "*(uint *)(param_1 + 0x2c) = param_3 + param_6" (pointer_expression "*(uint *)(param_1 + 0x2c)" (* "*") (cast_expression "(uint *)(param_1 + 0x2c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")")))) (= "=") (binary_expression "param_3 + param_6" (identifier "param_3") (+ "+") (identifier "param_6"))) (; ";")) (expression_statement "*(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5\n  ;" (assignment_expression "*(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5" (pointer_expression "*(uint *)(param_1 + 0x28)" (* "*") (cast_expression "(uint *)(param_1 + 0x28)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (= "=") (binary_expression "(uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5" (binary_expression "(uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f)" (call_expression "(uint)(param_3 + param_6 < param_3)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_3 + param_6 < param_3)" (( "(") (binary_expression "param_3 + param_6 < param_3" (binary_expression "param_3 + param_6" (identifier "param_3") (+ "+") (identifier "param_6")) (< "<") (identifier "param_3")) () ")"))) (+ "+") (parenthesized_expression "((int)param_3 >> 0x1f)" (( "(") (binary_expression "(int)param_3 >> 0x1f" (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")) (>> ">>") (number_literal "0x1f")) () ")"))) (+ "+") (identifier "param_5"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Removing unreachable block (ram,0x00049648) */

int function_1(type_1 *pJfd,void *zBuf,int var_10,type_2 var_1)

{
  type_3 *var_5;
  int var_9;
  type_3 *var_4;
  int extraout_v1;
  int var_6;
  type_3 *var_3;
  type_3 *var_11;
  int var_8;
  int var_7;
  type_3 *psVar9;
  type_3 *var_2;
  
  psVar9 = pJfd[1].pMethods;
  var_11 = (type_3 *)((int)psVar9 >> 0x1f);
  if (((pJfd[10].pMethods == var_1._0_4_) && (pJfd[0xb].pMethods == var_1._4_4_)) && (var_1 != 0)) {
    var_2 = pJfd[0xc].pMethods;
  }
  else {
    var_2 = pJfd[4].pMethods;
    if ((var_2 != (type_3 *)0x0) &&
       (var_5 = var_11, var_4 = psVar9, (int)psVar9 <= var_1)) {
      do {
        var_3 = (type_3 *)((int)&psVar9->iVersion + (int)&var_4->iVersion);
        var_2 = (type_3 *)var_2->iVersion;
        var_5 = (type_3 *)
                 ((int)&var_11->iVersion + (type_5)(var_3 < var_4) + (int)&var_5->iVersion);
        if ((var_2 == (type_3 *)0x0) || ((int)var_1._0_4_ < (int)var_5)) break;
        var_4 = var_3;
      } while ((var_5 != var_1._0_4_) || (var_3 <= var_1._4_4_));
    }
  }
  (*(type_4 *)PTR___moddi3_00190b98)(var_1._0_4_,var_1._4_4_,var_11,psVar9);
  var_6 = extraout_v1;
  var_7 = var_10;
  while( true ) {
    var_8 = (int)psVar9 - var_6;
    var_9 = var_8;
    if (var_7 <= var_8) {
      var_9 = var_7;
    }
    var_7 = var_7 - var_8;
    (*(type_4 *)PTR_memcpy_00190e2c)(zBuf,(int)&var_2->xClose + var_6,var_9);
    zBuf = (void *)((int)zBuf + var_9);
    if (var_7 < 0) break;
    var_2 = (type_3 *)var_2->iVersion;
    var_6 = 0;
    if (var_2 == (type_3 *)0x0) goto LAB_00049604;
    if (var_7 == 0) goto LAB_0004958c;
    psVar9 = pJfd[1].pMethods;
  }
  if (var_2 == (type_3 *)0x0) {
LAB_00049604:
    pJfd[0xc].pMethods = var_2;
    pJfd[10].pMethods = (type_3 *)0x0;
    pJfd[0xb].pMethods = (type_3 *)0x0;
    return 0;
  }
LAB_0004958c:
  pJfd[0xc].pMethods = var_2;
  var_11 = (type_3 *)((int)&(var_1._4_4_)->iVersion + var_10);
  pJfd[0xb].pMethods = var_11;
  pJfd[10].pMethods =
       (type_3 *)
       ((int)&(var_1._0_4_)->iVersion + (type_5)(var_11 < (type_5)var_10) + (var_10 >> 0x1f));
  return 0;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (identifier)) right: (comma_expression left: (assignment_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier))))))) consequence: (compound_statement (while_statement condition: (parenthesized_expression (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)))) right: (identifier)) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))) right: (binary_expression left: (identifier) right: (identifier)))))) consequence: (break_statement))))))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier)) right: (number_literal)) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement (number_literal)))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)))) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))) right: (identifier)))) (return_statement (number_literal)))))

undefined4
MASKED(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)

{
  int iVar1;
  uint uVar2;
  int extraout_v1;
  int iVar3;
  uint uVar4;
  uint uVar5;
  int *piVar6;
  
  uVar5 = *(uint *)(param_1 + 4);
  iVar3 = (int)uVar5 >> 0x1f;
  if (((*(int *)(param_1 + 0x28) == param_5) && (*(uint *)(param_1 + 0x2c) == param_6)) &&
     (param_5 != 0 || param_6 != 0)) {
    piVar6 = *(int **)(param_1 + 0x30);
  }
  else {
    piVar6 = *(int **)(param_1 + 0x10);
    if ((piVar6 != (int *)0x0) && (uVar4 = uVar5, iVar1 = iVar3, iVar3 <= param_5)) {
      while ((iVar1 != param_5 || (uVar4 <= param_6))) {
        piVar6 = (int *)*piVar6;
        iVar1 = (uint)(uVar4 + uVar5 < uVar4) + iVar1 + iVar3;
        if ((piVar6 == (int *)0x0) || (uVar4 = uVar4 + uVar5, param_5 < iVar1)) break;
      }
    }
  }
  (*(code *)PTR_FUN_00190b98)(param_5,param_6,iVar3,uVar5);
  iVar3 = extraout_v1;
  uVar4 = param_3;
  while( true ) {
    uVar5 = uVar5 - iVar3;
    uVar2 = uVar5;
    if ((int)uVar4 <= (int)uVar5) {
      uVar2 = uVar4;
    }
    uVar4 = uVar4 - uVar5;
    (*(code *)PTR_memcpy_00190e2c)(param_2,(int)piVar6 + iVar3 + 4,uVar2);
    param_2 = param_2 + uVar2;
    if ((int)uVar4 < 0) break;
    piVar6 = (int *)*piVar6;
    iVar3 = 0;
    if (piVar6 == (int *)0x0) goto LAB_00049604;
    if (uVar4 == 0) goto LAB_0004958c;
    uVar5 = *(uint *)(param_1 + 4);
  }
  if (piVar6 == (int *)0x0) {
LAB_00049604:
    *(int **)(param_1 + 0x30) = piVar6;
    *(undefined4 *)(param_1 + 0x28) = 0;
    *(undefined4 *)(param_1 + 0x2c) = 0;
    return 0;
  }
LAB_0004958c:
  *(int **)(param_1 + 0x30) = piVar6;
  *(uint *)(param_1 + 0x2c) = param_3 + param_6;
  *(uint *)(param_1 + 0x28) = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5
  ;
  return 0;
}

