
int unixRead(sqlite3_file *id,void *pBuf,int amt,sqlite3_int64 offset)

{
  undefined *puVar1;
  undefined *puVar2;
  sqlite3_io_methods *psVar3;
  int iVar4;
  undefined4 *puVar5;
  sqlite3_io_methods *psVar6;
  sqlite3_io_methods *psVar7;
  undefined4 in_a3;
  sqlite3_io_methods *psVar8;
  int iVar9;
  int iVar10;
  void *pvVar11;
  
  psVar6 = id[0xc].pMethods;
  psVar8 = id[0xd].pMethods;
  if (((int)offset._0_4_ < (int)psVar6) || ((psVar6 == offset._0_4_ && (offset._4_4_ < psVar8)))) {
    psVar7 = (sqlite3_io_methods *)((int)&(offset._4_4_)->iVersion + amt);
    psVar3 = (sqlite3_io_methods *)
             ((int)&(offset._0_4_)->iVersion + (uint)(psVar7 < (uint)amt) + (amt >> 0x1f));
    iVar10 = (int)&(offset._4_4_)->iVersion + (int)&(id[0x12].pMethods)->iVersion;
    if (((int)psVar3 <= (int)psVar6) && ((psVar3 != psVar6 || (psVar7 <= psVar8)))) {
      (*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,amt);
      return 0;
    }
    iVar9 = (int)psVar8 - (int)offset._4_4_;
    (*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,iVar9);
    offset = offset + iVar9;
    pBuf = (void *)((int)pBuf + iVar9);
    amt = amt - iVar9;
  }
  puVar1 = PTR_DAT_0015b5d8;
  iVar9 = 0;
  iVar10 = amt;
  pvVar11 = pBuf;
LAB_0002791c:
  do {
    iVar4 = (**(code **)(puVar1 + -0x4b3c))(id[3].pMethods,pvVar11,iVar10,in_a3,offset);
    puVar2 = PTR_memset_0015b9b4;
    if (iVar10 == iVar4) {
      iVar9 = iVar9 + iVar10;
      if (amt == iVar9) {
        return 0;
      }
      if (iVar9 < 0) {
        return 0x10a;
      }
LAB_00027a8c:
      id[5].pMethods = (sqlite3_io_methods *)0x0;
      (*(code *)puVar2)((int)pBuf + iVar9,0,amt - iVar9);
      return 0x20a;
    }
    if (-1 < iVar4) {
      if (iVar4 == 0) {
        if (amt == iVar9) {
          return 0;
        }
        goto LAB_00027a8c;
      }
      offset = offset + iVar4;
      iVar10 = iVar10 - iVar4;
      iVar9 = iVar9 + iVar4;
      pvVar11 = (void *)((int)pvVar11 + iVar4);
      goto LAB_0002791c;
    }
    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_0015b9ac)();
    if ((sqlite3_io_methods *)*puVar5 != (sqlite3_io_methods *)&DAT_00000004) {
      id[5].pMethods = (sqlite3_io_methods *)*puVar5;
      if (amt != iVar4) {
        return 0x10a;
      }
      return 0;
    }
  } while( true );
}



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

{
  undefined *puVar1;
  undefined *puVar2;
  int iVar3;
  uint uVar4;
  int *piVar5;
  int iVar6;
  int iVar7;
  uint uVar8;
  uint uVar9;
  
  iVar6 = *(int *)(param_1 + 0x30);
  uVar8 = *(uint *)(param_1 + 0x34);
  if ((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))) {
    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;
    iVar7 = *(int *)(param_1 + 0x48) + param_6;
    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {
      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);
      return 0;
    }
    iVar6 = uVar8 - param_6;
    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);
    param_2 = param_2 + iVar6;
    param_3 = param_3 - iVar6;
    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);
    param_6 = param_6 + iVar6;
  }
  puVar1 = PTR_DAT_0015b5d8;
  uVar9 = 0;
  uVar8 = param_3;
  iVar6 = param_2;
LAB_0002791c:
  do {
    uVar4 = (**(code **)(puVar1 + -0x4b3c))
                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);
    puVar2 = PTR_memset_0015b9b4;
    if (uVar8 == uVar4) {
      uVar9 = uVar9 + uVar8;
      if (param_3 == uVar9) {
        return 0;
      }
      if ((int)uVar9 < 0) {
        return 0x10a;
      }
LAB_00027a8c:
      *(undefined4 *)(param_1 + 0x14) = 0;
      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);
      return 0x20a;
    }
    if (-1 < (int)uVar4) {
      if (uVar4 == 0) {
        if (param_3 == uVar9) {
          return 0;
        }
        goto LAB_00027a8c;
      }
      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);
      uVar8 = uVar8 - uVar4;
      uVar9 = uVar9 + uVar4;
      iVar6 = iVar6 + uVar4;
      param_6 = param_6 + uVar4;
      goto LAB_0002791c;
    }
    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();
    if (*piVar5 != 4) {
      *(int *)(param_1 + 0x14) = *piVar5;
      if (param_3 != uVar4) {
        return 0x10a;
      }
      return 0;
    }
  } while( true );
}


lui gp,0x14
addiu gp,gp,-0x4298
addu gp,gp,t9
addiu sp,sp,-0x50
sw s6,0x40(sp)
or s6,a1,zero
sw s4,0x38(sp)
or s4,a0,zero
sw s3,0x34(sp)
or s3,a2,zero
sw s2,0x30(sp)
sw s0,0x28(sp)
sw gp,0x18(sp)
sw ra,0x4c(sp)
sw s8,0x48(sp)
sw s7,0x44(sp)
sw s5,0x3c(sp)
sw s1,0x2c(sp)
lw s0,0x60(sp)
lw v1,0x30(a0)
lw s2,0x64(sp)
slt v0,s0,v1
beq v0,zero,0x00027a24
_lw s1,0x34(a0)
sra v0,s3,0x1f
lw a1,0x48(s4)
addu a2,s3,s2
addu v0,v0,s0
sltu a0,a2,s3
addu v0,a0,v0
slt a0,v1,v0
beq a0,zero,0x0002797c
_addu a1,a1,s2
subu s1,s1,s2
lw t9,-0x7b80(gp)
or a0,s6,zero
jalr t9
_or a2,s1,zero
sra v0,s1,0x1f
addu v1,s2,s1
lw gp,0x18(sp)
addu s0,s0,v0
sltu s2,v1,s2
addu s6,s6,s1
subu s3,s3,s1
addu s0,s2,s0
or s2,v1,zero
lw s7,-0x7fd8(gp)
or s8,zero,zero
or s5,s3,zero
addiu v0,s7,-0x4bb8
or s7,s6,zero
sw v0,0x24(sp)
lw v0,0x24(sp)
or a2,s5,zero
lw a0,0xc(s4)
or a1,s7,zero
lw t9,0x7c(v0)
sw s0,0x10(sp)
jalr t9
_sw s2,0x14(sp)
lw gp,0x18(sp)
beq s5,v0,0x00027a78
_or s1,v0,zero
bltz v0,0x000279d0
_lw t9,-0x7c04(gp)
beq s1,zero,0x00027a3c
_sra v0,v0,0x1f
addu a0,s2,s1
addu s0,s0,v0
sltu s2,a0,s2
addu s0,s2,s0
subu s5,s5,s1
or s2,a0,zero
addu s8,s8,s1
b 0x0002791c
_addu s7,s7,s1
bne v0,v1,0x0002798c
_sltu a2,s1,a2
bne a2,zero,0x000278d0
_subu s1,s1,s2
lw t9,-0x7b80(gp)
or a2,s3,zero
jalr t9
_or a0,s6,zero
or v0,zero,zero
lw ra,0x4c(sp)
lw s8,0x48(sp)
lw s7,0x44(sp)
lw s6,0x40(sp)
lw s5,0x3c(sp)
lw s4,0x38(sp)
lw s3,0x34(sp)
lw s2,0x30(sp)
lw s1,0x2c(sp)
lw s0,0x28(sp)
jr ra
_addiu sp,sp,0x50
jalr t9
_nop
li v1,0x4
lw v0,0x0(v0)
beq v0,v1,0x0002791c
_nop
beq s3,s1,0x00027a44
_sw v0,0x14(s4)
lw ra,0x4c(sp)
li v0,0x10a
lw s8,0x48(sp)
lw s7,0x44(sp)
lw s6,0x40(sp)
lw s5,0x3c(sp)
lw s4,0x38(sp)
lw s3,0x34(sp)
lw s2,0x30(sp)
lw s1,0x2c(sp)
lw s0,0x28(sp)
jr ra
_addiu sp,sp,0x50
bne v1,s0,0x00027904
_sltu v0,s2,s1
bne v0,zero,0x000278ac
_sra v0,s3,0x1f
b 0x00027908
_lw s7,-0x7fd8(gp)
bne s3,s8,0x00027a8c
_lw t9,-0x7bfc(gp)
lw ra,0x4c(sp)
or v0,zero,zero
lw s8,0x48(sp)
lw s7,0x44(sp)
lw s6,0x40(sp)
lw s5,0x3c(sp)
lw s4,0x38(sp)
lw s3,0x34(sp)
lw s2,0x30(sp)
lw s1,0x2c(sp)
lw s0,0x28(sp)
jr ra
_addiu sp,sp,0x50
addu s8,s8,s5
beq s3,s8,0x00027a48
_lw ra,0x4c(sp)
bltz s8,0x000279f4
_lw t9,-0x7bfc(gp)
subu a2,s3,s8
addu a0,s6,s8
sw zero,0x14(s4)
jalr t9
_or a1,zero,zero
li v0,0x20a
lw ra,0x4c(sp)
lw s8,0x48(sp)
lw s7,0x44(sp)
lw s6,0x40(sp)
lw s5,0x3c(sp)
lw s4,0x38(sp)
lw s3,0x34(sp)
lw s2,0x30(sp)
lw s1,0x2c(sp)
lw s0,0x28(sp)
jr ra
_addiu sp,sp,0x50
(translation_unit "undefined4\nFUN_00027848(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  int *piVar5;\n  int iVar6;\n  int iVar7;\n  uint uVar8;\n  uint uVar9;\n  \n  iVar6 = *(int *)(param_1 + 0x30);\n  uVar8 = *(uint *)(param_1 + 0x34);\n  if ((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))) {\n    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;\n    iVar7 = *(int *)(param_1 + 0x48) + param_6;\n    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }\n    iVar6 = uVar8 - param_6;\n    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);\n    param_2 = param_2 + iVar6;\n    param_3 = param_3 - iVar6;\n    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);\n    param_6 = param_6 + iVar6;\n  }\n  puVar1 = PTR_DAT_0015b5d8;\n  uVar9 = 0;\n  uVar8 = param_3;\n  iVar6 = param_2;\nLAB_0002791c:\n  do {\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );\n}\n\n" (function_definition "undefined4\nFUN_00027848(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  int *piVar5;\n  int iVar6;\n  int iVar7;\n  uint uVar8;\n  uint uVar9;\n  \n  iVar6 = *(int *)(param_1 + 0x30);\n  uVar8 = *(uint *)(param_1 + 0x34);\n  if ((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))) {\n    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;\n    iVar7 = *(int *)(param_1 + 0x48) + param_6;\n    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }\n    iVar6 = uVar8 - param_6;\n    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);\n    param_2 = param_2 + iVar6;\n    param_3 = param_3 - iVar6;\n    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);\n    param_6 = param_6 + iVar6;\n  }\n  puVar1 = PTR_DAT_0015b5d8;\n  uVar9 = 0;\n  uVar8 = param_3;\n  iVar6 = param_2;\nLAB_0002791c:\n  do {\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );\n}" type_identifier (function_declarator "FUN_00027848(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  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  int *piVar5;\n  int iVar6;\n  int iVar7;\n  uint uVar8;\n  uint uVar9;\n  \n  iVar6 = *(int *)(param_1 + 0x30);\n  uVar8 = *(uint *)(param_1 + 0x34);\n  if ((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))) {\n    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;\n    iVar7 = *(int *)(param_1 + 0x48) + param_6;\n    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }\n    iVar6 = uVar8 - param_6;\n    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);\n    param_2 = param_2 + iVar6;\n    param_3 = param_3 - iVar6;\n    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);\n    param_6 = param_6 + iVar6;\n  }\n  puVar1 = PTR_DAT_0015b5d8;\n  uVar9 = 0;\n  uVar8 = param_3;\n  iVar6 = param_2;\nLAB_0002791c:\n  do {\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "uint uVar9;" type_identifier identifier ;) (expression_statement "iVar6 = *(int *)(param_1 + 0x30);" (assignment_expression "iVar6 = *(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 "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "uVar8 = *(uint *)(param_1 + 0x34);" (assignment_expression "uVar8 = *(uint *)(param_1 + 0x34)" identifier = (pointer_expression "*(uint *)(param_1 + 0x34)" * (cast_expression "(uint *)(param_1 + 0x34)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) ))))) ;) (if_statement "if ((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))) {\n    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;\n    iVar7 = *(int *)(param_1 + 0x48) + param_6;\n    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }\n    iVar6 = uVar8 - param_6;\n    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);\n    param_2 = param_2 + iVar6;\n    param_3 = param_3 - iVar6;\n    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);\n    param_6 = param_6 + iVar6;\n  }" if (parenthesized_expression "((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8))))" ( (binary_expression "(param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))" (parenthesized_expression "(param_5 < iVar6)" ( (binary_expression "param_5 < iVar6" identifier < identifier) )) || (parenthesized_expression "((iVar6 == param_5 && (param_6 < uVar8)))" ( (parenthesized_expression "(iVar6 == param_5 && (param_6 < uVar8))" ( (binary_expression "iVar6 == param_5 && (param_6 < uVar8)" (binary_expression "iVar6 == param_5" identifier == identifier) && (parenthesized_expression "(param_6 < uVar8)" ( (binary_expression "param_6 < uVar8" identifier < identifier) ))) )) ))) )) (compound_statement "{\n    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;\n    iVar7 = *(int *)(param_1 + 0x48) + param_6;\n    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }\n    iVar6 = uVar8 - param_6;\n    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);\n    param_2 = param_2 + iVar6;\n    param_3 = param_3 - iVar6;\n    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);\n    param_6 = param_6 + iVar6;\n  }" { (expression_statement "iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;" (assignment_expression "iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5" identifier = (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)) ;) (expression_statement "iVar7 = *(int *)(param_1 + 0x48) + param_6;" (assignment_expression "iVar7 = *(int *)(param_1 + 0x48) + param_6" identifier = (binary_expression "*(int *)(param_1 + 0x48) + param_6" (pointer_expression "*(int *)(param_1 + 0x48)" * (cast_expression "(int *)(param_1 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) + identifier)) ;) (if_statement "if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }" if (parenthesized_expression "((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8))))" ( (binary_expression "(iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))" (parenthesized_expression "(iVar3 <= iVar6)" ( (binary_expression "iVar3 <= iVar6" identifier <= identifier) )) && (parenthesized_expression "((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))" ( (parenthesized_expression "(iVar3 != iVar6 || (param_3 + param_6 <= uVar8))" ( (binary_expression "iVar3 != iVar6 || (param_3 + param_6 <= uVar8)" (binary_expression "iVar3 != iVar6" identifier != identifier) || (parenthesized_expression "(param_3 + param_6 <= uVar8)" ( (binary_expression "param_3 + param_6 <= uVar8" (binary_expression "param_3 + param_6" identifier + identifier) <= identifier) ))) )) ))) )) (compound_statement "{\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }" { (expression_statement "(*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);" (call_expression "(*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3)" (parenthesized_expression "(*(code *)PTR_memcpy_0015ba30)" ( (pointer_expression "*(code *)PTR_memcpy_0015ba30" * (cast_expression "(code *)PTR_memcpy_0015ba30" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,iVar7,param_3)" ( identifier , identifier , identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar6 = uVar8 - param_6;" (assignment_expression "iVar6 = uVar8 - param_6" identifier = (binary_expression "uVar8 - param_6" identifier - identifier)) ;) (expression_statement "(*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);" (call_expression "(*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6)" (parenthesized_expression "(*(code *)PTR_memcpy_0015ba30)" ( (pointer_expression "*(code *)PTR_memcpy_0015ba30" * (cast_expression "(code *)PTR_memcpy_0015ba30" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,iVar7,iVar6)" ( identifier , identifier , identifier ))) ;) (expression_statement "param_2 = param_2 + iVar6;" (assignment_expression "param_2 = param_2 + iVar6" identifier = (binary_expression "param_2 + iVar6" identifier + identifier)) ;) (expression_statement "param_3 = param_3 - iVar6;" (assignment_expression "param_3 = param_3 - iVar6" identifier = (binary_expression "param_3 - iVar6" identifier - identifier)) ;) (expression_statement "param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);" (assignment_expression "param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f)" identifier = (binary_expression "(uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f)" (binary_expression "(uint)(param_6 + iVar6 < param_6) + param_5" (call_expression "(uint)(param_6 + iVar6 < param_6)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_6 + iVar6 < param_6)" ( (binary_expression "param_6 + iVar6 < param_6" (binary_expression "param_6 + iVar6" identifier + identifier) < identifier) ))) + identifier) + (parenthesized_expression "(iVar6 >> 0x1f)" ( (binary_expression "iVar6 >> 0x1f" identifier >> number_literal) )))) ;) (expression_statement "param_6 = param_6 + iVar6;" (assignment_expression "param_6 = param_6 + iVar6" identifier = (binary_expression "param_6 + iVar6" identifier + identifier)) ;) })) (expression_statement "puVar1 = PTR_DAT_0015b5d8;" (assignment_expression "puVar1 = PTR_DAT_0015b5d8" identifier = identifier) ;) (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" identifier = number_literal) ;) (expression_statement "uVar8 = param_3;" (assignment_expression "uVar8 = param_3" identifier = identifier) ;) (expression_statement "iVar6 = param_2;" (assignment_expression "iVar6 = param_2" identifier = identifier) ;) (labeled_statement "LAB_0002791c:\n  do {\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );" statement_identifier : (do_statement "do {\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );" do (compound_statement "{\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  }" { (expression_statement "uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);" (assignment_expression "uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6)" identifier = (call_expression "(**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6)" (parenthesized_expression "(**(code **)(puVar1 + -0x4b3c))" ( (pointer_expression "**(code **)(puVar1 + -0x4b3c)" * (pointer_expression "*(code **)(puVar1 + -0x4b3c)" * (cast_expression "(code **)(puVar1 + -0x4b3c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + -0x4b3c)" ( (binary_expression "puVar1 + -0x4b3c" identifier + number_literal) ))))) )) (argument_list "(*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , identifier , identifier , identifier , identifier , identifier )))) ;) (expression_statement "puVar2 = PTR_memset_0015b9b4;" (assignment_expression "puVar2 = PTR_memset_0015b9b4" identifier = identifier) ;) (if_statement "if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }" if (parenthesized_expression "(uVar8 == uVar4)" ( (binary_expression "uVar8 == uVar4" identifier == identifier) )) (compound_statement "{\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }" { (expression_statement "uVar9 = uVar9 + uVar8;" (assignment_expression "uVar9 = uVar9 + uVar8" identifier = (binary_expression "uVar9 + uVar8" identifier + identifier)) ;) (if_statement "if (param_3 == uVar9) {\n        return 0;\n      }" if (parenthesized_expression "(param_3 == uVar9)" ( (binary_expression "param_3 == uVar9" identifier == identifier) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((int)uVar9 < 0) {\n        return 0x10a;\n      }" if (parenthesized_expression "((int)uVar9 < 0)" ( (binary_expression "(int)uVar9 < 0" (cast_expression "(int)uVar9" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        return 0x10a;\n      }" { (return_statement "return 0x10a;" return number_literal ;) })) (labeled_statement "LAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;" statement_identifier : (expression_statement "*(undefined4 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = number_literal) ;)) (expression_statement "(*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);" (call_expression "(*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2 + uVar9,0,param_3 - uVar9)" ( (binary_expression "param_2 + uVar9" identifier + identifier) , number_literal , (binary_expression "param_3 - uVar9" identifier - identifier) ))) ;) (return_statement "return 0x20a;" return number_literal ;) })) (if_statement "if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }" if (parenthesized_expression "(-1 < (int)uVar4)" ( (binary_expression "-1 < (int)uVar4" number_literal < (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }" { (if_statement "if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }" { (if_statement "if (param_3 == uVar9) {\n          return 0;\n        }" if (parenthesized_expression "(param_3 == uVar9)" ( (binary_expression "param_3 == uVar9" identifier == identifier) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (goto_statement "goto LAB_00027a8c;" goto statement_identifier ;) })) (expression_statement "param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);" (assignment_expression "param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f)" identifier = (binary_expression "(uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f)" (binary_expression "(uint)(param_6 + uVar4 < param_6) + param_5" (call_expression "(uint)(param_6 + uVar4 < param_6)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_6 + uVar4 < param_6)" ( (binary_expression "param_6 + uVar4 < param_6" (binary_expression "param_6 + uVar4" identifier + identifier) < identifier) ))) + identifier) + (parenthesized_expression "((int)uVar4 >> 0x1f)" ( (binary_expression "(int)uVar4 >> 0x1f" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (expression_statement "uVar8 = uVar8 - uVar4;" (assignment_expression "uVar8 = uVar8 - uVar4" identifier = (binary_expression "uVar8 - uVar4" identifier - identifier)) ;) (expression_statement "uVar9 = uVar9 + uVar4;" (assignment_expression "uVar9 = uVar9 + uVar4" identifier = (binary_expression "uVar9 + uVar4" identifier + identifier)) ;) (expression_statement "iVar6 = iVar6 + uVar4;" (assignment_expression "iVar6 = iVar6 + uVar4" identifier = (binary_expression "iVar6 + uVar4" identifier + identifier)) ;) (expression_statement "param_6 = param_6 + uVar4;" (assignment_expression "param_6 = param_6 + uVar4" identifier = (binary_expression "param_6 + uVar4" identifier + identifier)) ;) (goto_statement "goto LAB_0002791c;" goto statement_identifier ;) })) (expression_statement "piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();" (assignment_expression "piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0015b9ac)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0015b9ac)()" (parenthesized_expression "(*(code *)PTR___errno_location_0015b9ac)" ( (pointer_expression "*(code *)PTR___errno_location_0015b9ac" * (cast_expression "(code *)PTR___errno_location_0015b9ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (if_statement "if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }" if (parenthesized_expression "(*piVar5 != 4)" ( (binary_expression "*piVar5 != 4" (pointer_expression "*piVar5" * identifier) != number_literal) )) (compound_statement "{\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }" { (expression_statement "*(int *)(param_1 + 0x14) = *piVar5;" (assignment_expression "*(int *)(param_1 + 0x14) = *piVar5" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = (pointer_expression "*piVar5" * identifier)) ;) (if_statement "if (param_3 != uVar4) {\n        return 0x10a;\n      }" if (parenthesized_expression "(param_3 != uVar4)" ( (binary_expression "param_3 != uVar4" identifier != identifier) )) (compound_statement "{\n        return 0x10a;\n      }" { (return_statement "return 0x10a;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })) }) while (parenthesized_expression "( true )" ( true )) ;)) })))
(translation_unit "int unixRead(sqlite3_file *id,void *pBuf,int amt,sqlite3_int64 offset)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  sqlite3_io_methods *psVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  sqlite3_io_methods *psVar6;\n  sqlite3_io_methods *psVar7;\n  undefined4 in_a3;\n  sqlite3_io_methods *psVar8;\n  int iVar9;\n  int iVar10;\n  void *pvVar11;\n  \n  psVar6 = id[0xc].pMethods;\n  psVar8 = id[0xd].pMethods;\n  if (((int)offset._0_4_ < (int)psVar6) || ((psVar6 == offset._0_4_ && (offset._4_4_ < psVar8)))) {\n    psVar7 = (sqlite3_io_methods *)((int)&(offset._4_4_)->iVersion + amt);\n    psVar3 = (sqlite3_io_methods *)\n             ((int)&(offset._0_4_)->iVersion + (uint)(psVar7 < (uint)amt) + (amt >> 0x1f));\n    iVar10 = (int)&(offset._4_4_)->iVersion + (int)&(id[0x12].pMethods)->iVersion;\n    if (((int)psVar3 <= (int)psVar6) && ((psVar3 != psVar6 || (psVar7 <= psVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,amt);\n      return 0;\n    }\n    iVar9 = (int)psVar8 - (int)offset._4_4_;\n    (*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,iVar9);\n    offset = offset + iVar9;\n    pBuf = (void *)((int)pBuf + iVar9);\n    amt = amt - iVar9;\n  }\n  puVar1 = PTR_DAT_0015b5d8;\n  iVar9 = 0;\n  iVar10 = amt;\n  pvVar11 = pBuf;\nLAB_0002791c:\n  do {\n    iVar4 = (**(code **)(puVar1 + -0x4b3c))(id[3].pMethods,pvVar11,iVar10,in_a3,offset);\n    puVar2 = PTR_memset_0015b9b4;\n    if (iVar10 == iVar4) {\n      iVar9 = iVar9 + iVar10;\n      if (amt == iVar9) {\n        return 0;\n      }\n      if (iVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      (*(code *)puVar2)((int)pBuf + iVar9,0,amt - iVar9);\n      return 0x20a;\n    }\n    if (-1 < iVar4) {\n      if (iVar4 == 0) {\n        if (amt == iVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      offset = offset + iVar4;\n      iVar10 = iVar10 - iVar4;\n      iVar9 = iVar9 + iVar4;\n      pvVar11 = (void *)((int)pvVar11 + iVar4);\n      goto LAB_0002791c;\n    }\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_0015b9ac)();\n    if ((sqlite3_io_methods *)*puVar5 != (sqlite3_io_methods *)&DAT_00000004) {\n      id[5].pMethods = (sqlite3_io_methods *)*puVar5;\n      if (amt != iVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );\n}\n\n" (function_definition "int unixRead(sqlite3_file *id,void *pBuf,int amt,sqlite3_int64 offset)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  sqlite3_io_methods *psVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  sqlite3_io_methods *psVar6;\n  sqlite3_io_methods *psVar7;\n  undefined4 in_a3;\n  sqlite3_io_methods *psVar8;\n  int iVar9;\n  int iVar10;\n  void *pvVar11;\n  \n  psVar6 = id[0xc].pMethods;\n  psVar8 = id[0xd].pMethods;\n  if (((int)offset._0_4_ < (int)psVar6) || ((psVar6 == offset._0_4_ && (offset._4_4_ < psVar8)))) {\n    psVar7 = (sqlite3_io_methods *)((int)&(offset._4_4_)->iVersion + amt);\n    psVar3 = (sqlite3_io_methods *)\n             ((int)&(offset._0_4_)->iVersion + (uint)(psVar7 < (uint)amt) + (amt >> 0x1f));\n    iVar10 = (int)&(offset._4_4_)->iVersion + (int)&(id[0x12].pMethods)->iVersion;\n    if (((int)psVar3 <= (int)psVar6) && ((psVar3 != psVar6 || (psVar7 <= psVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,amt);\n      return 0;\n    }\n    iVar9 = (int)psVar8 - (int)offset._4_4_;\n    (*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,iVar9);\n    offset = offset + iVar9;\n    pBuf = (void *)((int)pBuf + iVar9);\n    amt = amt - iVar9;\n  }\n  puVar1 = PTR_DAT_0015b5d8;\n  iVar9 = 0;\n  iVar10 = amt;\n  pvVar11 = pBuf;\nLAB_0002791c:\n  do {\n    iVar4 = (**(code **)(puVar1 + -0x4b3c))(id[3].pMethods,pvVar11,iVar10,in_a3,offset);\n    puVar2 = PTR_memset_0015b9b4;\n    if (iVar10 == iVar4) {\n      iVar9 = iVar9 + iVar10;\n      if (amt == iVar9) {\n        return 0;\n      }\n      if (iVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      (*(code *)puVar2)((int)pBuf + iVar9,0,amt - iVar9);\n      return 0x20a;\n    }\n    if (-1 < iVar4) {\n      if (iVar4 == 0) {\n        if (amt == iVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      offset = offset + iVar4;\n      iVar10 = iVar10 - iVar4;\n      iVar9 = iVar9 + iVar4;\n      pvVar11 = (void *)((int)pvVar11 + iVar4);\n      goto LAB_0002791c;\n    }\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_0015b9ac)();\n    if ((sqlite3_io_methods *)*puVar5 != (sqlite3_io_methods *)&DAT_00000004) {\n      id[5].pMethods = (sqlite3_io_methods *)*puVar5;\n      if (amt != iVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );\n}" primitive_type (function_declarator "unixRead(sqlite3_file *id,void *pBuf,int amt,sqlite3_int64 offset)" identifier (parameter_list "(sqlite3_file *id,void *pBuf,int amt,sqlite3_int64 offset)" ( (parameter_declaration "sqlite3_file *id" type_identifier (pointer_declarator "*id" * identifier)) , (parameter_declaration "void *pBuf" primitive_type (pointer_declarator "*pBuf" * identifier)) , (parameter_declaration "int amt" primitive_type identifier) , (parameter_declaration "sqlite3_int64 offset" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  sqlite3_io_methods *psVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  sqlite3_io_methods *psVar6;\n  sqlite3_io_methods *psVar7;\n  undefined4 in_a3;\n  sqlite3_io_methods *psVar8;\n  int iVar9;\n  int iVar10;\n  void *pvVar11;\n  \n  psVar6 = id[0xc].pMethods;\n  psVar8 = id[0xd].pMethods;\n  if (((int)offset._0_4_ < (int)psVar6) || ((psVar6 == offset._0_4_ && (offset._4_4_ < psVar8)))) {\n    psVar7 = (sqlite3_io_methods *)((int)&(offset._4_4_)->iVersion + amt);\n    psVar3 = (sqlite3_io_methods *)\n             ((int)&(offset._0_4_)->iVersion + (uint)(psVar7 < (uint)amt) + (amt >> 0x1f));\n    iVar10 = (int)&(offset._4_4_)->iVersion + (int)&(id[0x12].pMethods)->iVersion;\n    if (((int)psVar3 <= (int)psVar6) && ((psVar3 != psVar6 || (psVar7 <= psVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,amt);\n      return 0;\n    }\n    iVar9 = (int)psVar8 - (int)offset._4_4_;\n    (*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,iVar9);\n    offset = offset + iVar9;\n    pBuf = (void *)((int)pBuf + iVar9);\n    amt = amt - iVar9;\n  }\n  puVar1 = PTR_DAT_0015b5d8;\n  iVar9 = 0;\n  iVar10 = amt;\n  pvVar11 = pBuf;\nLAB_0002791c:\n  do {\n    iVar4 = (**(code **)(puVar1 + -0x4b3c))(id[3].pMethods,pvVar11,iVar10,in_a3,offset);\n    puVar2 = PTR_memset_0015b9b4;\n    if (iVar10 == iVar4) {\n      iVar9 = iVar9 + iVar10;\n      if (amt == iVar9) {\n        return 0;\n      }\n      if (iVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      (*(code *)puVar2)((int)pBuf + iVar9,0,amt - iVar9);\n      return 0x20a;\n    }\n    if (-1 < iVar4) {\n      if (iVar4 == 0) {\n        if (amt == iVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      offset = offset + iVar4;\n      iVar10 = iVar10 - iVar4;\n      iVar9 = iVar9 + iVar4;\n      pvVar11 = (void *)((int)pvVar11 + iVar4);\n      goto LAB_0002791c;\n    }\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_0015b9ac)();\n    if ((sqlite3_io_methods *)*puVar5 != (sqlite3_io_methods *)&DAT_00000004) {\n      id[5].pMethods = (sqlite3_io_methods *)*puVar5;\n      if (amt != iVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "sqlite3_io_methods *psVar3;" type_identifier (pointer_declarator "*psVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "sqlite3_io_methods *psVar6;" type_identifier (pointer_declarator "*psVar6" * identifier) ;) (declaration "sqlite3_io_methods *psVar7;" type_identifier (pointer_declarator "*psVar7" * identifier) ;) (declaration "undefined4 in_a3;" type_identifier identifier ;) (declaration "sqlite3_io_methods *psVar8;" type_identifier (pointer_declarator "*psVar8" * identifier) ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "void *pvVar11;" primitive_type (pointer_declarator "*pvVar11" * identifier) ;) (expression_statement "psVar6 = id[0xc].pMethods;" (assignment_expression "psVar6 = id[0xc].pMethods" identifier = (field_expression "id[0xc].pMethods" (subscript_expression "id[0xc]" identifier [ number_literal ]) . field_identifier)) ;) (expression_statement "psVar8 = id[0xd].pMethods;" (assignment_expression "psVar8 = id[0xd].pMethods" identifier = (field_expression "id[0xd].pMethods" (subscript_expression "id[0xd]" identifier [ number_literal ]) . field_identifier)) ;) (if_statement "if (((int)offset._0_4_ < (int)psVar6) || ((psVar6 == offset._0_4_ && (offset._4_4_ < psVar8)))) {\n    psVar7 = (sqlite3_io_methods *)((int)&(offset._4_4_)->iVersion + amt);\n    psVar3 = (sqlite3_io_methods *)\n             ((int)&(offset._0_4_)->iVersion + (uint)(psVar7 < (uint)amt) + (amt >> 0x1f));\n    iVar10 = (int)&(offset._4_4_)->iVersion + (int)&(id[0x12].pMethods)->iVersion;\n    if (((int)psVar3 <= (int)psVar6) && ((psVar3 != psVar6 || (psVar7 <= psVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,amt);\n      return 0;\n    }\n    iVar9 = (int)psVar8 - (int)offset._4_4_;\n    (*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,iVar9);\n    offset = offset + iVar9;\n    pBuf = (void *)((int)pBuf + iVar9);\n    amt = amt - iVar9;\n  }" if (parenthesized_expression "(((int)offset._0_4_ < (int)psVar6) || ((psVar6 == offset._0_4_ && (offset._4_4_ < psVar8))))" ( (binary_expression "((int)offset._0_4_ < (int)psVar6) || ((psVar6 == offset._0_4_ && (offset._4_4_ < psVar8)))" (parenthesized_expression "((int)offset._0_4_ < (int)psVar6)" ( (binary_expression "(int)offset._0_4_ < (int)psVar6" (cast_expression "(int)offset._0_4_" ( (type_descriptor "int" primitive_type) ) (field_expression "offset._0_4_" identifier . field_identifier)) < (cast_expression "(int)psVar6" ( (type_descriptor "int" primitive_type) ) identifier)) )) || (parenthesized_expression "((psVar6 == offset._0_4_ && (offset._4_4_ < psVar8)))" ( (parenthesized_expression "(psVar6 == offset._0_4_ && (offset._4_4_ < psVar8))" ( (binary_expression "psVar6 == offset._0_4_ && (offset._4_4_ < psVar8)" (binary_expression "psVar6 == offset._0_4_" identifier == (field_expression "offset._0_4_" identifier . field_identifier)) && (parenthesized_expression "(offset._4_4_ < psVar8)" ( (binary_expression "offset._4_4_ < psVar8" (field_expression "offset._4_4_" identifier . field_identifier) < identifier) ))) )) ))) )) (compound_statement "{\n    psVar7 = (sqlite3_io_methods *)((int)&(offset._4_4_)->iVersion + amt);\n    psVar3 = (sqlite3_io_methods *)\n             ((int)&(offset._0_4_)->iVersion + (uint)(psVar7 < (uint)amt) + (amt >> 0x1f));\n    iVar10 = (int)&(offset._4_4_)->iVersion + (int)&(id[0x12].pMethods)->iVersion;\n    if (((int)psVar3 <= (int)psVar6) && ((psVar3 != psVar6 || (psVar7 <= psVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,amt);\n      return 0;\n    }\n    iVar9 = (int)psVar8 - (int)offset._4_4_;\n    (*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,iVar9);\n    offset = offset + iVar9;\n    pBuf = (void *)((int)pBuf + iVar9);\n    amt = amt - iVar9;\n  }" { (expression_statement "psVar7 = (sqlite3_io_methods *)((int)&(offset._4_4_)->iVersion + amt);" (assignment_expression "psVar7 = (sqlite3_io_methods *)((int)&(offset._4_4_)->iVersion + amt)" identifier = (cast_expression "(sqlite3_io_methods *)((int)&(offset._4_4_)->iVersion + amt)" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&(offset._4_4_)->iVersion + amt)" ( (binary_expression "(int)&(offset._4_4_)->iVersion + amt" (cast_expression "(int)&(offset._4_4_)->iVersion" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&(offset._4_4_)->iVersion" & (field_expression "(offset._4_4_)->iVersion" (parenthesized_expression "(offset._4_4_)" ( (field_expression "offset._4_4_" identifier . field_identifier) )) -> field_identifier))) + identifier) )))) ;) (expression_statement "psVar3 = (sqlite3_io_methods *)\n             ((int)&(offset._0_4_)->iVersion + (uint)(psVar7 < (uint)amt) + (amt >> 0x1f));" (assignment_expression "psVar3 = (sqlite3_io_methods *)\n             ((int)&(offset._0_4_)->iVersion + (uint)(psVar7 < (uint)amt) + (amt >> 0x1f))" identifier = (cast_expression "(sqlite3_io_methods *)\n             ((int)&(offset._0_4_)->iVersion + (uint)(psVar7 < (uint)amt) + (amt >> 0x1f))" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&(offset._0_4_)->iVersion + (uint)(psVar7 < (uint)amt) + (amt >> 0x1f))" ( (binary_expression "(int)&(offset._0_4_)->iVersion + (uint)(psVar7 < (uint)amt) + (amt >> 0x1f)" (binary_expression "(int)&(offset._0_4_)->iVersion + (uint)(psVar7 < (uint)amt)" (cast_expression "(int)&(offset._0_4_)->iVersion" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&(offset._0_4_)->iVersion" & (field_expression "(offset._0_4_)->iVersion" (parenthesized_expression "(offset._0_4_)" ( (field_expression "offset._0_4_" identifier . field_identifier) )) -> field_identifier))) + (call_expression "(uint)(psVar7 < (uint)amt)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(psVar7 < (uint)amt)" ( (binary_expression "psVar7 < (uint)amt" identifier < (cast_expression "(uint)amt" ( (type_descriptor "uint" type_identifier) ) identifier)) )))) + (parenthesized_expression "(amt >> 0x1f)" ( (binary_expression "amt >> 0x1f" identifier >> number_literal) ))) )))) ;) (expression_statement "iVar10 = (int)&(offset._4_4_)->iVersion + (int)&(id[0x12].pMethods)->iVersion;" (assignment_expression "iVar10 = (int)&(offset._4_4_)->iVersion + (int)&(id[0x12].pMethods)->iVersion" identifier = (binary_expression "(int)&(offset._4_4_)->iVersion + (int)&(id[0x12].pMethods)->iVersion" (cast_expression "(int)&(offset._4_4_)->iVersion" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&(offset._4_4_)->iVersion" & (field_expression "(offset._4_4_)->iVersion" (parenthesized_expression "(offset._4_4_)" ( (field_expression "offset._4_4_" identifier . field_identifier) )) -> field_identifier))) + (cast_expression "(int)&(id[0x12].pMethods)->iVersion" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&(id[0x12].pMethods)->iVersion" & (field_expression "(id[0x12].pMethods)->iVersion" (parenthesized_expression "(id[0x12].pMethods)" ( (field_expression "id[0x12].pMethods" (subscript_expression "id[0x12]" identifier [ number_literal ]) . field_identifier) )) -> field_identifier))))) ;) (if_statement "if (((int)psVar3 <= (int)psVar6) && ((psVar3 != psVar6 || (psVar7 <= psVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,amt);\n      return 0;\n    }" if (parenthesized_expression "(((int)psVar3 <= (int)psVar6) && ((psVar3 != psVar6 || (psVar7 <= psVar8))))" ( (binary_expression "((int)psVar3 <= (int)psVar6) && ((psVar3 != psVar6 || (psVar7 <= psVar8)))" (parenthesized_expression "((int)psVar3 <= (int)psVar6)" ( (binary_expression "(int)psVar3 <= (int)psVar6" (cast_expression "(int)psVar3" ( (type_descriptor "int" primitive_type) ) identifier) <= (cast_expression "(int)psVar6" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "((psVar3 != psVar6 || (psVar7 <= psVar8)))" ( (parenthesized_expression "(psVar3 != psVar6 || (psVar7 <= psVar8))" ( (binary_expression "psVar3 != psVar6 || (psVar7 <= psVar8)" (binary_expression "psVar3 != psVar6" identifier != identifier) || (parenthesized_expression "(psVar7 <= psVar8)" ( (binary_expression "psVar7 <= psVar8" identifier <= identifier) ))) )) ))) )) (compound_statement "{\n      (*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,amt);\n      return 0;\n    }" { (expression_statement "(*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,amt);" (call_expression "(*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,amt)" (parenthesized_expression "(*(code *)PTR_memcpy_0015ba30)" ( (pointer_expression "*(code *)PTR_memcpy_0015ba30" * (cast_expression "(code *)PTR_memcpy_0015ba30" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pBuf,iVar10,amt)" ( identifier , identifier , identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar9 = (int)psVar8 - (int)offset._4_4_;" (assignment_expression "iVar9 = (int)psVar8 - (int)offset._4_4_" identifier = (binary_expression "(int)psVar8 - (int)offset._4_4_" (cast_expression "(int)psVar8" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)offset._4_4_" ( (type_descriptor "int" primitive_type) ) (field_expression "offset._4_4_" identifier . field_identifier)))) ;) (expression_statement "(*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,iVar9);" (call_expression "(*(code *)PTR_memcpy_0015ba30)(pBuf,iVar10,iVar9)" (parenthesized_expression "(*(code *)PTR_memcpy_0015ba30)" ( (pointer_expression "*(code *)PTR_memcpy_0015ba30" * (cast_expression "(code *)PTR_memcpy_0015ba30" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pBuf,iVar10,iVar9)" ( identifier , identifier , identifier ))) ;) (expression_statement "offset = offset + iVar9;" (assignment_expression "offset = offset + iVar9" identifier = (binary_expression "offset + iVar9" identifier + identifier)) ;) (expression_statement "pBuf = (void *)((int)pBuf + iVar9);" (assignment_expression "pBuf = (void *)((int)pBuf + iVar9)" identifier = (cast_expression "(void *)((int)pBuf + iVar9)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pBuf + iVar9)" ( (binary_expression "(int)pBuf + iVar9" (cast_expression "(int)pBuf" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "amt = amt - iVar9;" (assignment_expression "amt = amt - iVar9" identifier = (binary_expression "amt - iVar9" identifier - identifier)) ;) })) (expression_statement "puVar1 = PTR_DAT_0015b5d8;" (assignment_expression "puVar1 = PTR_DAT_0015b5d8" identifier = identifier) ;) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) (expression_statement "iVar10 = amt;" (assignment_expression "iVar10 = amt" identifier = identifier) ;) (expression_statement "pvVar11 = pBuf;" (assignment_expression "pvVar11 = pBuf" identifier = identifier) ;) (labeled_statement "LAB_0002791c:\n  do {\n    iVar4 = (**(code **)(puVar1 + -0x4b3c))(id[3].pMethods,pvVar11,iVar10,in_a3,offset);\n    puVar2 = PTR_memset_0015b9b4;\n    if (iVar10 == iVar4) {\n      iVar9 = iVar9 + iVar10;\n      if (amt == iVar9) {\n        return 0;\n      }\n      if (iVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      (*(code *)puVar2)((int)pBuf + iVar9,0,amt - iVar9);\n      return 0x20a;\n    }\n    if (-1 < iVar4) {\n      if (iVar4 == 0) {\n        if (amt == iVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      offset = offset + iVar4;\n      iVar10 = iVar10 - iVar4;\n      iVar9 = iVar9 + iVar4;\n      pvVar11 = (void *)((int)pvVar11 + iVar4);\n      goto LAB_0002791c;\n    }\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_0015b9ac)();\n    if ((sqlite3_io_methods *)*puVar5 != (sqlite3_io_methods *)&DAT_00000004) {\n      id[5].pMethods = (sqlite3_io_methods *)*puVar5;\n      if (amt != iVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );" statement_identifier : (do_statement "do {\n    iVar4 = (**(code **)(puVar1 + -0x4b3c))(id[3].pMethods,pvVar11,iVar10,in_a3,offset);\n    puVar2 = PTR_memset_0015b9b4;\n    if (iVar10 == iVar4) {\n      iVar9 = iVar9 + iVar10;\n      if (amt == iVar9) {\n        return 0;\n      }\n      if (iVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      (*(code *)puVar2)((int)pBuf + iVar9,0,amt - iVar9);\n      return 0x20a;\n    }\n    if (-1 < iVar4) {\n      if (iVar4 == 0) {\n        if (amt == iVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      offset = offset + iVar4;\n      iVar10 = iVar10 - iVar4;\n      iVar9 = iVar9 + iVar4;\n      pvVar11 = (void *)((int)pvVar11 + iVar4);\n      goto LAB_0002791c;\n    }\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_0015b9ac)();\n    if ((sqlite3_io_methods *)*puVar5 != (sqlite3_io_methods *)&DAT_00000004) {\n      id[5].pMethods = (sqlite3_io_methods *)*puVar5;\n      if (amt != iVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );" do (compound_statement "{\n    iVar4 = (**(code **)(puVar1 + -0x4b3c))(id[3].pMethods,pvVar11,iVar10,in_a3,offset);\n    puVar2 = PTR_memset_0015b9b4;\n    if (iVar10 == iVar4) {\n      iVar9 = iVar9 + iVar10;\n      if (amt == iVar9) {\n        return 0;\n      }\n      if (iVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      (*(code *)puVar2)((int)pBuf + iVar9,0,amt - iVar9);\n      return 0x20a;\n    }\n    if (-1 < iVar4) {\n      if (iVar4 == 0) {\n        if (amt == iVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      offset = offset + iVar4;\n      iVar10 = iVar10 - iVar4;\n      iVar9 = iVar9 + iVar4;\n      pvVar11 = (void *)((int)pvVar11 + iVar4);\n      goto LAB_0002791c;\n    }\n    puVar5 = (undefined4 *)(*(code *)PTR___errno_location_0015b9ac)();\n    if ((sqlite3_io_methods *)*puVar5 != (sqlite3_io_methods *)&DAT_00000004) {\n      id[5].pMethods = (sqlite3_io_methods *)*puVar5;\n      if (amt != iVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  }" { (expression_statement "iVar4 = (**(code **)(puVar1 + -0x4b3c))(id[3].pMethods,pvVar11,iVar10,in_a3,offset);" (assignment_expression "iVar4 = (**(code **)(puVar1 + -0x4b3c))(id[3].pMethods,pvVar11,iVar10,in_a3,offset)" identifier = (call_expression "(**(code **)(puVar1 + -0x4b3c))(id[3].pMethods,pvVar11,iVar10,in_a3,offset)" (parenthesized_expression "(**(code **)(puVar1 + -0x4b3c))" ( (pointer_expression "**(code **)(puVar1 + -0x4b3c)" * (pointer_expression "*(code **)(puVar1 + -0x4b3c)" * (cast_expression "(code **)(puVar1 + -0x4b3c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + -0x4b3c)" ( (binary_expression "puVar1 + -0x4b3c" identifier + number_literal) ))))) )) (argument_list "(id[3].pMethods,pvVar11,iVar10,in_a3,offset)" ( (field_expression "id[3].pMethods" (subscript_expression "id[3]" identifier [ number_literal ]) . field_identifier) , identifier , identifier , identifier , identifier )))) ;) (expression_statement "puVar2 = PTR_memset_0015b9b4;" (assignment_expression "puVar2 = PTR_memset_0015b9b4" identifier = identifier) ;) (if_statement "if (iVar10 == iVar4) {\n      iVar9 = iVar9 + iVar10;\n      if (amt == iVar9) {\n        return 0;\n      }\n      if (iVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      (*(code *)puVar2)((int)pBuf + iVar9,0,amt - iVar9);\n      return 0x20a;\n    }" if (parenthesized_expression "(iVar10 == iVar4)" ( (binary_expression "iVar10 == iVar4" identifier == identifier) )) (compound_statement "{\n      iVar9 = iVar9 + iVar10;\n      if (amt == iVar9) {\n        return 0;\n      }\n      if (iVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      (*(code *)puVar2)((int)pBuf + iVar9,0,amt - iVar9);\n      return 0x20a;\n    }" { (expression_statement "iVar9 = iVar9 + iVar10;" (assignment_expression "iVar9 = iVar9 + iVar10" identifier = (binary_expression "iVar9 + iVar10" identifier + identifier)) ;) (if_statement "if (amt == iVar9) {\n        return 0;\n      }" if (parenthesized_expression "(amt == iVar9)" ( (binary_expression "amt == iVar9" identifier == identifier) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (iVar9 < 0) {\n        return 0x10a;\n      }" if (parenthesized_expression "(iVar9 < 0)" ( (binary_expression "iVar9 < 0" identifier < number_literal) )) (compound_statement "{\n        return 0x10a;\n      }" { (return_statement "return 0x10a;" return number_literal ;) })) (labeled_statement "LAB_00027a8c:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;" statement_identifier : (expression_statement "id[5].pMethods = (sqlite3_io_methods *)0x0;" (assignment_expression "id[5].pMethods = (sqlite3_io_methods *)0x0" (field_expression "id[5].pMethods" (subscript_expression "id[5]" 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 "(*(code *)puVar2)((int)pBuf + iVar9,0,amt - iVar9);" (call_expression "(*(code *)puVar2)((int)pBuf + iVar9,0,amt - iVar9)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "((int)pBuf + iVar9,0,amt - iVar9)" ( (binary_expression "(int)pBuf + iVar9" (cast_expression "(int)pBuf" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) , number_literal , (binary_expression "amt - iVar9" identifier - identifier) ))) ;) (return_statement "return 0x20a;" return number_literal ;) })) (if_statement "if (-1 < iVar4) {\n      if (iVar4 == 0) {\n        if (amt == iVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      offset = offset + iVar4;\n      iVar10 = iVar10 - iVar4;\n      iVar9 = iVar9 + iVar4;\n      pvVar11 = (void *)((int)pvVar11 + iVar4);\n      goto LAB_0002791c;\n    }" if (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) (compound_statement "{\n      if (iVar4 == 0) {\n        if (amt == iVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      offset = offset + iVar4;\n      iVar10 = iVar10 - iVar4;\n      iVar9 = iVar9 + iVar4;\n      pvVar11 = (void *)((int)pvVar11 + iVar4);\n      goto LAB_0002791c;\n    }" { (if_statement "if (iVar4 == 0) {\n        if (amt == iVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        if (amt == iVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }" { (if_statement "if (amt == iVar9) {\n          return 0;\n        }" if (parenthesized_expression "(amt == iVar9)" ( (binary_expression "amt == iVar9" identifier == identifier) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (goto_statement "goto LAB_00027a8c;" goto statement_identifier ;) })) (expression_statement "offset = offset + iVar4;" (assignment_expression "offset = offset + iVar4" identifier = (binary_expression "offset + iVar4" identifier + identifier)) ;) (expression_statement "iVar10 = iVar10 - iVar4;" (assignment_expression "iVar10 = iVar10 - iVar4" identifier = (binary_expression "iVar10 - iVar4" identifier - identifier)) ;) (expression_statement "iVar9 = iVar9 + iVar4;" (assignment_expression "iVar9 = iVar9 + iVar4" identifier = (binary_expression "iVar9 + iVar4" identifier + identifier)) ;) (expression_statement "pvVar11 = (void *)((int)pvVar11 + iVar4);" (assignment_expression "pvVar11 = (void *)((int)pvVar11 + iVar4)" identifier = (cast_expression "(void *)((int)pvVar11 + iVar4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar11 + iVar4)" ( (binary_expression "(int)pvVar11 + iVar4" (cast_expression "(int)pvVar11" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (goto_statement "goto LAB_0002791c;" goto statement_identifier ;) })) (expression_statement "puVar5 = (undefined4 *)(*(code *)PTR___errno_location_0015b9ac)();" (assignment_expression "puVar5 = (undefined4 *)(*(code *)PTR___errno_location_0015b9ac)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_0015b9ac)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0015b9ac)()" (parenthesized_expression "(*(code *)PTR___errno_location_0015b9ac)" ( (pointer_expression "*(code *)PTR___errno_location_0015b9ac" * (cast_expression "(code *)PTR___errno_location_0015b9ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (if_statement "if ((sqlite3_io_methods *)*puVar5 != (sqlite3_io_methods *)&DAT_00000004) {\n      id[5].pMethods = (sqlite3_io_methods *)*puVar5;\n      if (amt != iVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }" if (parenthesized_expression "((sqlite3_io_methods *)*puVar5 != (sqlite3_io_methods *)&DAT_00000004)" ( (binary_expression "(sqlite3_io_methods *)*puVar5 != (sqlite3_io_methods *)&DAT_00000004" (cast_expression "(sqlite3_io_methods *)*puVar5" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar5" * identifier)) != (cast_expression "(sqlite3_io_methods *)&DAT_00000004" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00000004" & identifier))) )) (compound_statement "{\n      id[5].pMethods = (sqlite3_io_methods *)*puVar5;\n      if (amt != iVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }" { (expression_statement "id[5].pMethods = (sqlite3_io_methods *)*puVar5;" (assignment_expression "id[5].pMethods = (sqlite3_io_methods *)*puVar5" (field_expression "id[5].pMethods" (subscript_expression "id[5]" identifier [ number_literal ]) . field_identifier) = (cast_expression "(sqlite3_io_methods *)*puVar5" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar5" * identifier))) ;) (if_statement "if (amt != iVar4) {\n        return 0x10a;\n      }" if (parenthesized_expression "(amt != iVar4)" ( (binary_expression "amt != iVar4" identifier != identifier) )) (compound_statement "{\n        return 0x10a;\n      }" { (return_statement "return 0x10a;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })) }) while (parenthesized_expression "( true )" ( true )) ;)) })))
(translation_unit "undefined4\nFUN_00027848(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  int *piVar5;\n  int iVar6;\n  int iVar7;\n  uint uVar8;\n  uint uVar9;\n  \n  iVar6 = *(int *)(param_1 + 0x30);\n  uVar8 = *(uint *)(param_1 + 0x34);\n  if ((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))) {\n    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;\n    iVar7 = *(int *)(param_1 + 0x48) + param_6;\n    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }\n    iVar6 = uVar8 - param_6;\n    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);\n    param_2 = param_2 + iVar6;\n    param_3 = param_3 - iVar6;\n    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);\n    param_6 = param_6 + iVar6;\n  }\n  puVar1 = PTR_DAT_0015b5d8;\n  uVar9 = 0;\n  uVar8 = param_3;\n  iVar6 = param_2;\nLAB_0002791c:\n  do {\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );\n}\n\n" (function_definition "undefined4\nFUN_00027848(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  int *piVar5;\n  int iVar6;\n  int iVar7;\n  uint uVar8;\n  uint uVar9;\n  \n  iVar6 = *(int *)(param_1 + 0x30);\n  uVar8 = *(uint *)(param_1 + 0x34);\n  if ((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))) {\n    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;\n    iVar7 = *(int *)(param_1 + 0x48) + param_6;\n    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }\n    iVar6 = uVar8 - param_6;\n    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);\n    param_2 = param_2 + iVar6;\n    param_3 = param_3 - iVar6;\n    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);\n    param_6 = param_6 + iVar6;\n  }\n  puVar1 = PTR_DAT_0015b5d8;\n  uVar9 = 0;\n  uVar8 = param_3;\n  iVar6 = param_2;\nLAB_0002791c:\n  do {\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );\n}" type_identifier (function_declarator "FUN_00027848(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  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  int *piVar5;\n  int iVar6;\n  int iVar7;\n  uint uVar8;\n  uint uVar9;\n  \n  iVar6 = *(int *)(param_1 + 0x30);\n  uVar8 = *(uint *)(param_1 + 0x34);\n  if ((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))) {\n    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;\n    iVar7 = *(int *)(param_1 + 0x48) + param_6;\n    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }\n    iVar6 = uVar8 - param_6;\n    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);\n    param_2 = param_2 + iVar6;\n    param_3 = param_3 - iVar6;\n    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);\n    param_6 = param_6 + iVar6;\n  }\n  puVar1 = PTR_DAT_0015b5d8;\n  uVar9 = 0;\n  uVar8 = param_3;\n  iVar6 = param_2;\nLAB_0002791c:\n  do {\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "uint uVar9;" type_identifier identifier ;) (expression_statement "iVar6 = *(int *)(param_1 + 0x30);" (assignment_expression "iVar6 = *(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 "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "uVar8 = *(uint *)(param_1 + 0x34);" (assignment_expression "uVar8 = *(uint *)(param_1 + 0x34)" identifier = (pointer_expression "*(uint *)(param_1 + 0x34)" * (cast_expression "(uint *)(param_1 + 0x34)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) ))))) ;) (if_statement "if ((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))) {\n    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;\n    iVar7 = *(int *)(param_1 + 0x48) + param_6;\n    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }\n    iVar6 = uVar8 - param_6;\n    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);\n    param_2 = param_2 + iVar6;\n    param_3 = param_3 - iVar6;\n    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);\n    param_6 = param_6 + iVar6;\n  }" if (parenthesized_expression "((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8))))" ( (binary_expression "(param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))" (parenthesized_expression "(param_5 < iVar6)" ( (binary_expression "param_5 < iVar6" identifier < identifier) )) || (parenthesized_expression "((iVar6 == param_5 && (param_6 < uVar8)))" ( (parenthesized_expression "(iVar6 == param_5 && (param_6 < uVar8))" ( (binary_expression "iVar6 == param_5 && (param_6 < uVar8)" (binary_expression "iVar6 == param_5" identifier == identifier) && (parenthesized_expression "(param_6 < uVar8)" ( (binary_expression "param_6 < uVar8" identifier < identifier) ))) )) ))) )) (compound_statement "{\n    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;\n    iVar7 = *(int *)(param_1 + 0x48) + param_6;\n    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }\n    iVar6 = uVar8 - param_6;\n    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);\n    param_2 = param_2 + iVar6;\n    param_3 = param_3 - iVar6;\n    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);\n    param_6 = param_6 + iVar6;\n  }" { (expression_statement "iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;" (assignment_expression "iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5" identifier = (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)) ;) (expression_statement "iVar7 = *(int *)(param_1 + 0x48) + param_6;" (assignment_expression "iVar7 = *(int *)(param_1 + 0x48) + param_6" identifier = (binary_expression "*(int *)(param_1 + 0x48) + param_6" (pointer_expression "*(int *)(param_1 + 0x48)" * (cast_expression "(int *)(param_1 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) + identifier)) ;) (if_statement "if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }" if (parenthesized_expression "((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8))))" ( (binary_expression "(iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))" (parenthesized_expression "(iVar3 <= iVar6)" ( (binary_expression "iVar3 <= iVar6" identifier <= identifier) )) && (parenthesized_expression "((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))" ( (parenthesized_expression "(iVar3 != iVar6 || (param_3 + param_6 <= uVar8))" ( (binary_expression "iVar3 != iVar6 || (param_3 + param_6 <= uVar8)" (binary_expression "iVar3 != iVar6" identifier != identifier) || (parenthesized_expression "(param_3 + param_6 <= uVar8)" ( (binary_expression "param_3 + param_6 <= uVar8" (binary_expression "param_3 + param_6" identifier + identifier) <= identifier) ))) )) ))) )) (compound_statement "{\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }" { (expression_statement "(*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);" (call_expression "(*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3)" (parenthesized_expression "(*(code *)PTR_memcpy_0015ba30)" ( (pointer_expression "*(code *)PTR_memcpy_0015ba30" * (cast_expression "(code *)PTR_memcpy_0015ba30" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,iVar7,param_3)" ( identifier , identifier , identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar6 = uVar8 - param_6;" (assignment_expression "iVar6 = uVar8 - param_6" identifier = (binary_expression "uVar8 - param_6" identifier - identifier)) ;) (expression_statement "(*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);" (call_expression "(*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6)" (parenthesized_expression "(*(code *)PTR_memcpy_0015ba30)" ( (pointer_expression "*(code *)PTR_memcpy_0015ba30" * (cast_expression "(code *)PTR_memcpy_0015ba30" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,iVar7,iVar6)" ( identifier , identifier , identifier ))) ;) (expression_statement "param_2 = param_2 + iVar6;" (assignment_expression "param_2 = param_2 + iVar6" identifier = (binary_expression "param_2 + iVar6" identifier + identifier)) ;) (expression_statement "param_3 = param_3 - iVar6;" (assignment_expression "param_3 = param_3 - iVar6" identifier = (binary_expression "param_3 - iVar6" identifier - identifier)) ;) (expression_statement "param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);" (assignment_expression "param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f)" identifier = (binary_expression "(uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f)" (binary_expression "(uint)(param_6 + iVar6 < param_6) + param_5" (call_expression "(uint)(param_6 + iVar6 < param_6)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_6 + iVar6 < param_6)" ( (binary_expression "param_6 + iVar6 < param_6" (binary_expression "param_6 + iVar6" identifier + identifier) < identifier) ))) + identifier) + (parenthesized_expression "(iVar6 >> 0x1f)" ( (binary_expression "iVar6 >> 0x1f" identifier >> number_literal) )))) ;) (expression_statement "param_6 = param_6 + iVar6;" (assignment_expression "param_6 = param_6 + iVar6" identifier = (binary_expression "param_6 + iVar6" identifier + identifier)) ;) })) (expression_statement "puVar1 = PTR_DAT_0015b5d8;" (assignment_expression "puVar1 = PTR_DAT_0015b5d8" identifier = identifier) ;) (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" identifier = number_literal) ;) (expression_statement "uVar8 = param_3;" (assignment_expression "uVar8 = param_3" identifier = identifier) ;) (expression_statement "iVar6 = param_2;" (assignment_expression "iVar6 = param_2" identifier = identifier) ;) (labeled_statement "LAB_0002791c:\n  do {\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );" statement_identifier : (do_statement "do {\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );" do (compound_statement "{\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  }" { (expression_statement "uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);" (assignment_expression "uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6)" identifier = (call_expression "(**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6)" (parenthesized_expression "(**(code **)(puVar1 + -0x4b3c))" ( (pointer_expression "**(code **)(puVar1 + -0x4b3c)" * (pointer_expression "*(code **)(puVar1 + -0x4b3c)" * (cast_expression "(code **)(puVar1 + -0x4b3c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + -0x4b3c)" ( (binary_expression "puVar1 + -0x4b3c" identifier + number_literal) ))))) )) (argument_list "(*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , identifier , identifier , identifier , identifier , identifier )))) ;) (expression_statement "puVar2 = PTR_memset_0015b9b4;" (assignment_expression "puVar2 = PTR_memset_0015b9b4" identifier = identifier) ;) (if_statement "if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }" if (parenthesized_expression "(uVar8 == uVar4)" ( (binary_expression "uVar8 == uVar4" identifier == identifier) )) (compound_statement "{\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }" { (expression_statement "uVar9 = uVar9 + uVar8;" (assignment_expression "uVar9 = uVar9 + uVar8" identifier = (binary_expression "uVar9 + uVar8" identifier + identifier)) ;) (if_statement "if (param_3 == uVar9) {\n        return 0;\n      }" if (parenthesized_expression "(param_3 == uVar9)" ( (binary_expression "param_3 == uVar9" identifier == identifier) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((int)uVar9 < 0) {\n        return 0x10a;\n      }" if (parenthesized_expression "((int)uVar9 < 0)" ( (binary_expression "(int)uVar9 < 0" (cast_expression "(int)uVar9" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        return 0x10a;\n      }" { (return_statement "return 0x10a;" return number_literal ;) })) (labeled_statement "LAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;" statement_identifier : (expression_statement "*(undefined4 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = number_literal) ;)) (expression_statement "(*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);" (call_expression "(*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2 + uVar9,0,param_3 - uVar9)" ( (binary_expression "param_2 + uVar9" identifier + identifier) , number_literal , (binary_expression "param_3 - uVar9" identifier - identifier) ))) ;) (return_statement "return 0x20a;" return number_literal ;) })) (if_statement "if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }" if (parenthesized_expression "(-1 < (int)uVar4)" ( (binary_expression "-1 < (int)uVar4" number_literal < (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }" { (if_statement "if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }" { (if_statement "if (param_3 == uVar9) {\n          return 0;\n        }" if (parenthesized_expression "(param_3 == uVar9)" ( (binary_expression "param_3 == uVar9" identifier == identifier) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (goto_statement "goto LAB_00027a8c;" goto statement_identifier ;) })) (expression_statement "param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);" (assignment_expression "param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f)" identifier = (binary_expression "(uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f)" (binary_expression "(uint)(param_6 + uVar4 < param_6) + param_5" (call_expression "(uint)(param_6 + uVar4 < param_6)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_6 + uVar4 < param_6)" ( (binary_expression "param_6 + uVar4 < param_6" (binary_expression "param_6 + uVar4" identifier + identifier) < identifier) ))) + identifier) + (parenthesized_expression "((int)uVar4 >> 0x1f)" ( (binary_expression "(int)uVar4 >> 0x1f" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (expression_statement "uVar8 = uVar8 - uVar4;" (assignment_expression "uVar8 = uVar8 - uVar4" identifier = (binary_expression "uVar8 - uVar4" identifier - identifier)) ;) (expression_statement "uVar9 = uVar9 + uVar4;" (assignment_expression "uVar9 = uVar9 + uVar4" identifier = (binary_expression "uVar9 + uVar4" identifier + identifier)) ;) (expression_statement "iVar6 = iVar6 + uVar4;" (assignment_expression "iVar6 = iVar6 + uVar4" identifier = (binary_expression "iVar6 + uVar4" identifier + identifier)) ;) (expression_statement "param_6 = param_6 + uVar4;" (assignment_expression "param_6 = param_6 + uVar4" identifier = (binary_expression "param_6 + uVar4" identifier + identifier)) ;) (goto_statement "goto LAB_0002791c;" goto statement_identifier ;) })) (expression_statement "piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();" (assignment_expression "piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0015b9ac)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0015b9ac)()" (parenthesized_expression "(*(code *)PTR___errno_location_0015b9ac)" ( (pointer_expression "*(code *)PTR___errno_location_0015b9ac" * (cast_expression "(code *)PTR___errno_location_0015b9ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (if_statement "if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }" if (parenthesized_expression "(*piVar5 != 4)" ( (binary_expression "*piVar5 != 4" (pointer_expression "*piVar5" * identifier) != number_literal) )) (compound_statement "{\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }" { (expression_statement "*(int *)(param_1 + 0x14) = *piVar5;" (assignment_expression "*(int *)(param_1 + 0x14) = *piVar5" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = (pointer_expression "*piVar5" * identifier)) ;) (if_statement "if (param_3 != uVar4) {\n        return 0x10a;\n      }" if (parenthesized_expression "(param_3 != uVar4)" ( (binary_expression "param_3 != uVar4" identifier != identifier) )) (compound_statement "{\n        return 0x10a;\n      }" { (return_statement "return 0x10a;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })) }) while (parenthesized_expression "( true )" ( true )) ;)) })))
(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 (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE 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 = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT == IDENT) && (parenthesized_expression ( (binary_expression IDENT < IDENT) ))) )) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (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)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT != IDENT) || (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) <= IDENT) ))) )) ))) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT ))) ;) (return_statement return LIT ;) })) (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 , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - 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) + (parenthesized_expression ( (binary_expression IDENT >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (labeled_statement statement_identifier : (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , IDENT , IDENT , IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (return_statement return LIT ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;)) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + IDENT) , LIT , (binary_expression IDENT - IDENT) ))) ;) (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return LIT ;) })) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (binary_expression IDENT + IDENT) < IDENT) ))) + IDENT) + (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (return_statement return LIT ;) })) (return_statement return LIT ;) })) }) while (parenthesized_expression ( BOOL )) ;)) })))
(function_definition "undefined4\nFUN_00027848(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  int *piVar5;\n  int iVar6;\n  int iVar7;\n  uint uVar8;\n  uint uVar9;\n  \n  iVar6 = *(int *)(param_1 + 0x30);\n  uVar8 = *(uint *)(param_1 + 0x34);\n  if ((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))) {\n    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;\n    iVar7 = *(int *)(param_1 + 0x48) + param_6;\n    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }\n    iVar6 = uVar8 - param_6;\n    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);\n    param_2 = param_2 + iVar6;\n    param_3 = param_3 - iVar6;\n    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);\n    param_6 = param_6 + iVar6;\n  }\n  puVar1 = PTR_DAT_0015b5d8;\n  uVar9 = 0;\n  uVar8 = param_3;\n  iVar6 = param_2;\nLAB_0002791c:\n  do {\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );\n}" (type_identifier "undefined4") (function_declarator "FUN_00027848(int param_1,int param_2,uint param_3,undefined4 param_4,int param_5,uint param_6)" (identifier "FUN_00027848") (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  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  int *piVar5;\n  int iVar6;\n  int iVar7;\n  uint uVar8;\n  uint uVar9;\n  \n  iVar6 = *(int *)(param_1 + 0x30);\n  uVar8 = *(uint *)(param_1 + 0x34);\n  if ((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))) {\n    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;\n    iVar7 = *(int *)(param_1 + 0x48) + param_6;\n    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }\n    iVar6 = uVar8 - param_6;\n    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);\n    param_2 = param_2 + iVar6;\n    param_3 = param_3 - iVar6;\n    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);\n    param_6 = param_6 + iVar6;\n  }\n  puVar1 = PTR_DAT_0015b5d8;\n  uVar9 = 0;\n  uVar8 = param_3;\n  iVar6 = param_2;\nLAB_0002791c:\n  do {\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "int *piVar5;" (primitive_type "int") (pointer_declarator "*piVar5" (* "*") (identifier "piVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "uint uVar8;" (type_identifier "uint") (identifier "uVar8") (; ";")) (declaration "uint uVar9;" (type_identifier "uint") (identifier "uVar9") (; ";")) (expression_statement "iVar6 = *(int *)(param_1 + 0x30);" (assignment_expression "iVar6 = *(int *)(param_1 + 0x30)" (identifier "iVar6") (= "=") (pointer_expression "*(int *)(param_1 + 0x30)" (* "*") (cast_expression "(int *)(param_1 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")"))))) (; ";")) (expression_statement "uVar8 = *(uint *)(param_1 + 0x34);" (assignment_expression "uVar8 = *(uint *)(param_1 + 0x34)" (identifier "uVar8") (= "=") (pointer_expression "*(uint *)(param_1 + 0x34)" (* "*") (cast_expression "(uint *)(param_1 + 0x34)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x34)" (( "(") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34")) () ")"))))) (; ";")) (if_statement "if ((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))) {\n    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;\n    iVar7 = *(int *)(param_1 + 0x48) + param_6;\n    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }\n    iVar6 = uVar8 - param_6;\n    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);\n    param_2 = param_2 + iVar6;\n    param_3 = param_3 - iVar6;\n    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);\n    param_6 = param_6 + iVar6;\n  }" (if "if") (parenthesized_expression "((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8))))" (( "(") (binary_expression "(param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))" (parenthesized_expression "(param_5 < iVar6)" (( "(") (binary_expression "param_5 < iVar6" (identifier "param_5") (< "<") (identifier "iVar6")) () ")")) (|| "||") (parenthesized_expression "((iVar6 == param_5 && (param_6 < uVar8)))" (( "(") (parenthesized_expression "(iVar6 == param_5 && (param_6 < uVar8))" (( "(") (binary_expression "iVar6 == param_5 && (param_6 < uVar8)" (binary_expression "iVar6 == param_5" (identifier "iVar6") (== "==") (identifier "param_5")) (&& "&&") (parenthesized_expression "(param_6 < uVar8)" (( "(") (binary_expression "param_6 < uVar8" (identifier "param_6") (< "<") (identifier "uVar8")) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;\n    iVar7 = *(int *)(param_1 + 0x48) + param_6;\n    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }\n    iVar6 = uVar8 - param_6;\n    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);\n    param_2 = param_2 + iVar6;\n    param_3 = param_3 - iVar6;\n    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);\n    param_6 = param_6 + iVar6;\n  }" ({ "{") (expression_statement "iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;" (assignment_expression "iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5" (identifier "iVar3") (= "=") (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"))) (; ";")) (expression_statement "iVar7 = *(int *)(param_1 + 0x48) + param_6;" (assignment_expression "iVar7 = *(int *)(param_1 + 0x48) + param_6" (identifier "iVar7") (= "=") (binary_expression "*(int *)(param_1 + 0x48) + param_6" (pointer_expression "*(int *)(param_1 + 0x48)" (* "*") (cast_expression "(int *)(param_1 + 0x48)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x48)" (( "(") (binary_expression "param_1 + 0x48" (identifier "param_1") (+ "+") (number_literal "0x48")) () ")")))) (+ "+") (identifier "param_6"))) (; ";")) (if_statement "if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }" (if "if") (parenthesized_expression "((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8))))" (( "(") (binary_expression "(iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))" (parenthesized_expression "(iVar3 <= iVar6)" (( "(") (binary_expression "iVar3 <= iVar6" (identifier "iVar3") (<= "<=") (identifier "iVar6")) () ")")) (&& "&&") (parenthesized_expression "((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))" (( "(") (parenthesized_expression "(iVar3 != iVar6 || (param_3 + param_6 <= uVar8))" (( "(") (binary_expression "iVar3 != iVar6 || (param_3 + param_6 <= uVar8)" (binary_expression "iVar3 != iVar6" (identifier "iVar3") (!= "!=") (identifier "iVar6")) (|| "||") (parenthesized_expression "(param_3 + param_6 <= uVar8)" (( "(") (binary_expression "param_3 + param_6 <= uVar8" (binary_expression "param_3 + param_6" (identifier "param_3") (+ "+") (identifier "param_6")) (<= "<=") (identifier "uVar8")) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);\n      return 0;\n    }" ({ "{") (expression_statement "(*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);" (call_expression "(*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3)" (parenthesized_expression "(*(code *)PTR_memcpy_0015ba30)" (( "(") (pointer_expression "*(code *)PTR_memcpy_0015ba30" (* "*") (cast_expression "(code *)PTR_memcpy_0015ba30" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_0015ba30"))) () ")")) (argument_list "(param_2,iVar7,param_3)" (( "(") (identifier "param_2") (, ",") (identifier "iVar7") (, ",") (identifier "param_3") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar6 = uVar8 - param_6;" (assignment_expression "iVar6 = uVar8 - param_6" (identifier "iVar6") (= "=") (binary_expression "uVar8 - param_6" (identifier "uVar8") (- "-") (identifier "param_6"))) (; ";")) (expression_statement "(*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);" (call_expression "(*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6)" (parenthesized_expression "(*(code *)PTR_memcpy_0015ba30)" (( "(") (pointer_expression "*(code *)PTR_memcpy_0015ba30" (* "*") (cast_expression "(code *)PTR_memcpy_0015ba30" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_0015ba30"))) () ")")) (argument_list "(param_2,iVar7,iVar6)" (( "(") (identifier "param_2") (, ",") (identifier "iVar7") (, ",") (identifier "iVar6") () ")"))) (; ";")) (expression_statement "param_2 = param_2 + iVar6;" (assignment_expression "param_2 = param_2 + iVar6" (identifier "param_2") (= "=") (binary_expression "param_2 + iVar6" (identifier "param_2") (+ "+") (identifier "iVar6"))) (; ";")) (expression_statement "param_3 = param_3 - iVar6;" (assignment_expression "param_3 = param_3 - iVar6" (identifier "param_3") (= "=") (binary_expression "param_3 - iVar6" (identifier "param_3") (- "-") (identifier "iVar6"))) (; ";")) (expression_statement "param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);" (assignment_expression "param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f)" (identifier "param_5") (= "=") (binary_expression "(uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f)" (binary_expression "(uint)(param_6 + iVar6 < param_6) + param_5" (call_expression "(uint)(param_6 + iVar6 < param_6)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_6 + iVar6 < param_6)" (( "(") (binary_expression "param_6 + iVar6 < param_6" (binary_expression "param_6 + iVar6" (identifier "param_6") (+ "+") (identifier "iVar6")) (< "<") (identifier "param_6")) () ")"))) (+ "+") (identifier "param_5")) (+ "+") (parenthesized_expression "(iVar6 >> 0x1f)" (( "(") (binary_expression "iVar6 >> 0x1f" (identifier "iVar6") (>> ">>") (number_literal "0x1f")) () ")")))) (; ";")) (expression_statement "param_6 = param_6 + iVar6;" (assignment_expression "param_6 = param_6 + iVar6" (identifier "param_6") (= "=") (binary_expression "param_6 + iVar6" (identifier "param_6") (+ "+") (identifier "iVar6"))) (; ";")) (} "}"))) (expression_statement "puVar1 = PTR_DAT_0015b5d8;" (assignment_expression "puVar1 = PTR_DAT_0015b5d8" (identifier "puVar1") (= "=") (identifier "PTR_DAT_0015b5d8")) (; ";")) (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" (identifier "uVar9") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar8 = param_3;" (assignment_expression "uVar8 = param_3" (identifier "uVar8") (= "=") (identifier "param_3")) (; ";")) (expression_statement "iVar6 = param_2;" (assignment_expression "iVar6 = param_2" (identifier "iVar6") (= "=") (identifier "param_2")) (; ";")) (labeled_statement "LAB_0002791c:\n  do {\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );" (statement_identifier "LAB_0002791c") (: ":") (do_statement "do {\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );" (do "do") (compound_statement "{\n    uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);\n    puVar2 = PTR_memset_0015b9b4;\n    if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }\n    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();\n    if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  }" ({ "{") (expression_statement "uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);" (assignment_expression "uVar4 = (**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6)" (identifier "uVar4") (= "=") (call_expression "(**(code **)(puVar1 + -0x4b3c))\n                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6)" (parenthesized_expression "(**(code **)(puVar1 + -0x4b3c))" (( "(") (pointer_expression "**(code **)(puVar1 + -0x4b3c)" (* "*") (pointer_expression "*(code **)(puVar1 + -0x4b3c)" (* "*") (cast_expression "(code **)(puVar1 + -0x4b3c)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar1 + -0x4b3c)" (( "(") (binary_expression "puVar1 + -0x4b3c" (identifier "puVar1") (+ "+") (number_literal "-0x4b3c")) () ")"))))) () ")")) (argument_list "(*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (identifier "iVar6") (, ",") (identifier "uVar8") (, ",") (identifier "param_4") (, ",") (identifier "param_5") (, ",") (identifier "param_6") () ")")))) (; ";")) (expression_statement "puVar2 = PTR_memset_0015b9b4;" (assignment_expression "puVar2 = PTR_memset_0015b9b4" (identifier "puVar2") (= "=") (identifier "PTR_memset_0015b9b4")) (; ";")) (if_statement "if (uVar8 == uVar4) {\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }" (if "if") (parenthesized_expression "(uVar8 == uVar4)" (( "(") (binary_expression "uVar8 == uVar4" (identifier "uVar8") (== "==") (identifier "uVar4")) () ")")) (compound_statement "{\n      uVar9 = uVar9 + uVar8;\n      if (param_3 == uVar9) {\n        return 0;\n      }\n      if ((int)uVar9 < 0) {\n        return 0x10a;\n      }\nLAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);\n      return 0x20a;\n    }" ({ "{") (expression_statement "uVar9 = uVar9 + uVar8;" (assignment_expression "uVar9 = uVar9 + uVar8" (identifier "uVar9") (= "=") (binary_expression "uVar9 + uVar8" (identifier "uVar9") (+ "+") (identifier "uVar8"))) (; ";")) (if_statement "if (param_3 == uVar9) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(param_3 == uVar9)" (( "(") (binary_expression "param_3 == uVar9" (identifier "param_3") (== "==") (identifier "uVar9")) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if ((int)uVar9 < 0) {\n        return 0x10a;\n      }" (if "if") (parenthesized_expression "((int)uVar9 < 0)" (( "(") (binary_expression "(int)uVar9 < 0" (cast_expression "(int)uVar9" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar9")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        return 0x10a;\n      }" ({ "{") (return_statement "return 0x10a;" (return "return") (number_literal "0x10a") (; ";")) (} "}"))) (labeled_statement "LAB_00027a8c:\n      *(undefined4 *)(param_1 + 0x14) = 0;" (statement_identifier "LAB_00027a8c") (: ":") (expression_statement "*(undefined4 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (number_literal "0")) (; ";"))) (expression_statement "(*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);" (call_expression "(*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9)" (parenthesized_expression "(*(code *)puVar2)" (( "(") (pointer_expression "*(code *)puVar2" (* "*") (cast_expression "(code *)puVar2" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar2"))) () ")")) (argument_list "(param_2 + uVar9,0,param_3 - uVar9)" (( "(") (binary_expression "param_2 + uVar9" (identifier "param_2") (+ "+") (identifier "uVar9")) (, ",") (number_literal "0") (, ",") (binary_expression "param_3 - uVar9" (identifier "param_3") (- "-") (identifier "uVar9")) () ")"))) (; ";")) (return_statement "return 0x20a;" (return "return") (number_literal "0x20a") (; ";")) (} "}"))) (if_statement "if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }" (if "if") (parenthesized_expression "(-1 < (int)uVar4)" (( "(") (binary_expression "-1 < (int)uVar4" (number_literal "-1") (< "<") (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4"))) () ")")) (compound_statement "{\n      if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }\n      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);\n      uVar8 = uVar8 - uVar4;\n      uVar9 = uVar9 + uVar4;\n      iVar6 = iVar6 + uVar4;\n      param_6 = param_6 + uVar4;\n      goto LAB_0002791c;\n    }" ({ "{") (if_statement "if (uVar4 == 0) {\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }" (if "if") (parenthesized_expression "(uVar4 == 0)" (( "(") (binary_expression "uVar4 == 0" (identifier "uVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        if (param_3 == uVar9) {\n          return 0;\n        }\n        goto LAB_00027a8c;\n      }" ({ "{") (if_statement "if (param_3 == uVar9) {\n          return 0;\n        }" (if "if") (parenthesized_expression "(param_3 == uVar9)" (( "(") (binary_expression "param_3 == uVar9" (identifier "param_3") (== "==") (identifier "uVar9")) () ")")) (compound_statement "{\n          return 0;\n        }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (goto_statement "goto LAB_00027a8c;" (goto "goto") (statement_identifier "LAB_00027a8c") (; ";")) (} "}"))) (expression_statement "param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);" (assignment_expression "param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f)" (identifier "param_5") (= "=") (binary_expression "(uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f)" (binary_expression "(uint)(param_6 + uVar4 < param_6) + param_5" (call_expression "(uint)(param_6 + uVar4 < param_6)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_6 + uVar4 < param_6)" (( "(") (binary_expression "param_6 + uVar4 < param_6" (binary_expression "param_6 + uVar4" (identifier "param_6") (+ "+") (identifier "uVar4")) (< "<") (identifier "param_6")) () ")"))) (+ "+") (identifier "param_5")) (+ "+") (parenthesized_expression "((int)uVar4 >> 0x1f)" (( "(") (binary_expression "(int)uVar4 >> 0x1f" (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4")) (>> ">>") (number_literal "0x1f")) () ")")))) (; ";")) (expression_statement "uVar8 = uVar8 - uVar4;" (assignment_expression "uVar8 = uVar8 - uVar4" (identifier "uVar8") (= "=") (binary_expression "uVar8 - uVar4" (identifier "uVar8") (- "-") (identifier "uVar4"))) (; ";")) (expression_statement "uVar9 = uVar9 + uVar4;" (assignment_expression "uVar9 = uVar9 + uVar4" (identifier "uVar9") (= "=") (binary_expression "uVar9 + uVar4" (identifier "uVar9") (+ "+") (identifier "uVar4"))) (; ";")) (expression_statement "iVar6 = iVar6 + uVar4;" (assignment_expression "iVar6 = iVar6 + uVar4" (identifier "iVar6") (= "=") (binary_expression "iVar6 + uVar4" (identifier "iVar6") (+ "+") (identifier "uVar4"))) (; ";")) (expression_statement "param_6 = param_6 + uVar4;" (assignment_expression "param_6 = param_6 + uVar4" (identifier "param_6") (= "=") (binary_expression "param_6 + uVar4" (identifier "param_6") (+ "+") (identifier "uVar4"))) (; ";")) (goto_statement "goto LAB_0002791c;" (goto "goto") (statement_identifier "LAB_0002791c") (; ";")) (} "}"))) (expression_statement "piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();" (assignment_expression "piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)()" (identifier "piVar5") (= "=") (cast_expression "(int *)(*(code *)PTR___errno_location_0015b9ac)()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_0015b9ac)()" (parenthesized_expression "(*(code *)PTR___errno_location_0015b9ac)" (( "(") (pointer_expression "*(code *)PTR___errno_location_0015b9ac" (* "*") (cast_expression "(code *)PTR___errno_location_0015b9ac" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_0015b9ac"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (if_statement "if (*piVar5 != 4) {\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }" (if "if") (parenthesized_expression "(*piVar5 != 4)" (( "(") (binary_expression "*piVar5 != 4" (pointer_expression "*piVar5" (* "*") (identifier "piVar5")) (!= "!=") (number_literal "4")) () ")")) (compound_statement "{\n      *(int *)(param_1 + 0x14) = *piVar5;\n      if (param_3 != uVar4) {\n        return 0x10a;\n      }\n      return 0;\n    }" ({ "{") (expression_statement "*(int *)(param_1 + 0x14) = *piVar5;" (assignment_expression "*(int *)(param_1 + 0x14) = *piVar5" (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (pointer_expression "*piVar5" (* "*") (identifier "piVar5"))) (; ";")) (if_statement "if (param_3 != uVar4) {\n        return 0x10a;\n      }" (if "if") (parenthesized_expression "(param_3 != uVar4)" (( "(") (binary_expression "param_3 != uVar4" (identifier "param_3") (!= "!=") (identifier "uVar4")) () ")")) (compound_statement "{\n        return 0x10a;\n      }" ({ "{") (return_statement "return 0x10a;" (return "return") (number_literal "0x10a") (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";"))) (} "}")))

int function_1(type_1 *id,void *pBuf,int var_3,type_2 var_6)

{
  type_3 *var_8;
  type_3 *puVar2;
  type_4 *var_5;
  int var_10;
  type_5 *puVar5;
  type_4 *var_1;
  type_4 *var_4;
  type_5 in_a3;
  type_4 *var_2;
  int var_7;
  int var_9;
  void *pvVar11;
  
  var_1 = id[0xc].pMethods;
  var_2 = id[0xd].pMethods;
  if (((int)var_6._0_4_ < (int)var_1) || ((var_1 == var_6._0_4_ && (var_6._4_4_ < var_2)))) {
    var_4 = (type_4 *)((int)&(var_6._4_4_)->iVersion + var_3);
    var_5 = (type_4 *)
             ((int)&(var_6._0_4_)->iVersion + (type_6)(var_4 < (type_6)var_3) + (var_3 >> 0x1f));
    var_9 = (int)&(var_6._4_4_)->iVersion + (int)&(id[0x12].pMethods)->iVersion;
    if (((int)var_5 <= (int)var_1) && ((var_5 != var_1 || (var_4 <= var_2)))) {
      (*(type_7 *)PTR_memcpy_0015ba30)(pBuf,var_9,var_3);
      return 0;
    }
    var_7 = (int)var_2 - (int)var_6._4_4_;
    (*(type_7 *)PTR_memcpy_0015ba30)(pBuf,var_9,var_7);
    var_6 = var_6 + var_7;
    pBuf = (void *)((int)pBuf + var_7);
    var_3 = var_3 - var_7;
  }
  var_8 = PTR_DAT_0015b5d8;
  var_7 = 0;
  var_9 = var_3;
  pvVar11 = pBuf;
LAB_0002791c:
  do {
    var_10 = (**(type_7 **)(var_8 + -0x4b3c))(id[3].pMethods,pvVar11,var_9,in_a3,var_6);
    puVar2 = PTR_memset_0015b9b4;
    if (var_9 == var_10) {
      var_7 = var_7 + var_9;
      if (var_3 == var_7) {
        return 0;
      }
      if (var_7 < 0) {
        return 0x10a;
      }
LAB_00027a8c:
      id[5].pMethods = (type_4 *)0x0;
      (*(type_7 *)puVar2)((int)pBuf + var_7,0,var_3 - var_7);
      return 0x20a;
    }
    if (-1 < var_10) {
      if (var_10 == 0) {
        if (var_3 == var_7) {
          return 0;
        }
        goto LAB_00027a8c;
      }
      var_6 = var_6 + var_10;
      var_9 = var_9 - var_10;
      var_7 = var_7 + var_10;
      pvVar11 = (void *)((int)pvVar11 + var_10);
      goto LAB_0002791c;
    }
    puVar5 = (type_5 *)(*(type_7 *)PTR___errno_location_0015b9ac)();
    if ((type_4 *)*puVar5 != (type_4 *)&DAT_00000004) {
      id[5].pMethods = (type_4 *)*puVar5;
      if (var_3 != var_10) {
        return 0x10a;
      }
      return 0;
    }
  } while( true );
}


(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: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator 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)) (expression_statement (assignment_expression left: (identifier) right: (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))))))) (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: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))))) consequence: (compound_statement (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: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (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)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)))))))) consequence: (compound_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)))) (return_statement (number_literal)))) (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) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (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: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (labeled_statement label: (statement_identifier) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) arguments: (argument_list (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))))) (identifier) (identifier) (identifier) (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (labeled_statement label: (statement_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 (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 (binary_expression left: (identifier) right: (identifier)) (number_literal) (binary_expression left: (identifier) right: (identifier))))) (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (number_literal)))) (goto_statement label: (statement_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: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (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))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_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: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (number_literal)))) (return_statement (number_literal))))) condition: (parenthesized_expression (true)))))))

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

{
  undefined *puVar1;
  undefined *puVar2;
  int iVar3;
  uint uVar4;
  int *piVar5;
  int iVar6;
  int iVar7;
  uint uVar8;
  uint uVar9;
  
  iVar6 = *(int *)(param_1 + 0x30);
  uVar8 = *(uint *)(param_1 + 0x34);
  if ((param_5 < iVar6) || ((iVar6 == param_5 && (param_6 < uVar8)))) {
    iVar3 = (uint)(param_3 + param_6 < param_3) + ((int)param_3 >> 0x1f) + param_5;
    iVar7 = *(int *)(param_1 + 0x48) + param_6;
    if ((iVar3 <= iVar6) && ((iVar3 != iVar6 || (param_3 + param_6 <= uVar8)))) {
      (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,param_3);
      return 0;
    }
    iVar6 = uVar8 - param_6;
    (*(code *)PTR_memcpy_0015ba30)(param_2,iVar7,iVar6);
    param_2 = param_2 + iVar6;
    param_3 = param_3 - iVar6;
    param_5 = (uint)(param_6 + iVar6 < param_6) + param_5 + (iVar6 >> 0x1f);
    param_6 = param_6 + iVar6;
  }
  puVar1 = PTR_DAT_0015b5d8;
  uVar9 = 0;
  uVar8 = param_3;
  iVar6 = param_2;
LAB_0002791c:
  do {
    uVar4 = (**(code **)(puVar1 + -0x4b3c))
                      (*(undefined4 *)(param_1 + 0xc),iVar6,uVar8,param_4,param_5,param_6);
    puVar2 = PTR_memset_0015b9b4;
    if (uVar8 == uVar4) {
      uVar9 = uVar9 + uVar8;
      if (param_3 == uVar9) {
        return 0;
      }
      if ((int)uVar9 < 0) {
        return 0x10a;
      }
LAB_00027a8c:
      *(undefined4 *)(param_1 + 0x14) = 0;
      (*(code *)puVar2)(param_2 + uVar9,0,param_3 - uVar9);
      return 0x20a;
    }
    if (-1 < (int)uVar4) {
      if (uVar4 == 0) {
        if (param_3 == uVar9) {
          return 0;
        }
        goto LAB_00027a8c;
      }
      param_5 = (uint)(param_6 + uVar4 < param_6) + param_5 + ((int)uVar4 >> 0x1f);
      uVar8 = uVar8 - uVar4;
      uVar9 = uVar9 + uVar4;
      iVar6 = iVar6 + uVar4;
      param_6 = param_6 + uVar4;
      goto LAB_0002791c;
    }
    piVar5 = (int *)(*(code *)PTR___errno_location_0015b9ac)();
    if (*piVar5 != 4) {
      *(int *)(param_1 + 0x14) = *piVar5;
      if (param_3 != uVar4) {
        return 0x10a;
      }
      return 0;
    }
  } while( true );
}

