
/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

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

{
  sqlite3_io_methods *psVar1;
  sqlite3_io_methods *psVar2;
  uint uVar3;
  size_t __n;
  int *piVar4;
  void *__src;
  int iVar5;
  int iVar6;
  void *local_2c;
  int local_28;
  
  psVar1 = id[0xd].pMethods;
  psVar2 = id[0xc].pMethods;
  if ((SBORROW4(offset._4_4_,(int)psVar1) !=
      SBORROW4(offset._4_4_ - (int)psVar1,(uint)((sqlite3_io_methods *)offset < psVar2))) !=
      (int)((offset._4_4_ - (int)psVar1) - (uint)((sqlite3_io_methods *)offset < psVar2)) < 0) {
    __src = (void *)((int)&((sqlite3_io_methods *)offset)->iVersion +
                    (int)&(id[0x12].pMethods)->iVersion);
    iVar6 = (amt >> 0x1f) + offset._4_4_ + (uint)CARRY4(amt,(uint)(sqlite3_io_methods *)offset);
    uVar3 = (uint)(psVar2 < (sqlite3_io_methods *)
                            ((int)&((sqlite3_io_methods *)offset)->iVersion + amt));
    iVar5 = (int)psVar1 - iVar6;
    if ((SBORROW4((int)psVar1,iVar6) != SBORROW4(iVar5,uVar3)) == (int)(iVar5 - uVar3) < 0) {
      memcpy(pBuf,__src,amt);
      return 0;
    }
    __n = (int)psVar2 - (int)(sqlite3_io_methods *)offset;
    memcpy(pBuf,__src,__n);
    pBuf = (void *)((int)pBuf + __n);
    amt = amt - __n;
    offset = offset + (int)__n;
  }
  local_28 = 0;
  local_2c = pBuf;
  iVar5 = amt;
LAB_00023f1c:
  do {
    iVar6 = (*aSyscall[10].pCurrent)
                      (id[3].pMethods,local_2c,iVar5,(int)offset,(int)((ulonglong)offset >> 0x20));
    if (iVar5 == iVar6) {
      local_28 = local_28 + iVar5;
      if (amt == local_28) {
        return 0;
      }
      if (local_28 < 0) {
        return 0x10a;
      }
LAB_00023ff6:
      id[5].pMethods = (sqlite3_io_methods *)0x0;
      memset((void *)(local_28 + (int)pBuf),0,amt - local_28);
      return 0x20a;
    }
    if (-1 < iVar6) {
      if (iVar6 == 0) {
        if (amt == local_28) {
          return 0;
        }
        goto LAB_00023ff6;
      }
      iVar5 = iVar5 - iVar6;
      offset = offset + iVar6;
      local_28 = local_28 + iVar6;
      local_2c = (void *)((int)local_2c + iVar6);
      goto LAB_00023f1c;
    }
    piVar4 = __errno_location();
    if ((sqlite3_io_methods *)*piVar4 != (sqlite3_io_methods *)&DAT_00000004) {
      id[5].pMethods = (sqlite3_io_methods *)*piVar4;
      if (amt != iVar6) {
        return 0x10a;
      }
      return 0;
    }
  } while( true );
}



/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

undefined4 FUN_00023e80(int param_1,void *param_2,uint param_3,uint param_4,int param_5)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  int *piVar5;
  void *__src;
  int iVar6;
  bool bVar7;
  void *local_2c;
  uint local_28;
  
  iVar1 = *(int *)(param_1 + 0x34);
  uVar3 = *(uint *)(param_1 + 0x30);
  if ((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=
      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0) {
    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);
    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);
    uVar4 = (uint)(uVar3 < param_3 + param_4);
    iVar2 = iVar1 - iVar6;
    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {
      memcpy(param_2,__src,param_3);
      return 0;
    }
    uVar3 = uVar3 - param_4;
    memcpy(param_2,__src,uVar3);
    param_2 = (void *)((int)param_2 + uVar3);
    param_3 = param_3 - uVar3;
    bVar7 = CARRY4(param_4,uVar3);
    param_4 = param_4 + uVar3;
    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;
  }
  local_28 = 0;
  local_2c = param_2;
  uVar3 = param_3;
LAB_00023f1c:
  do {
    uVar4 = (*(code *)PTR_pread64_0014c43c)
                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);
    if (uVar3 == uVar4) {
      local_28 = local_28 + uVar3;
      if (param_3 == local_28) {
        return 0;
      }
      if ((int)local_28 < 0) {
        return 0x10a;
      }
LAB_00023ff6:
      *(undefined4 *)(param_1 + 0x14) = 0;
      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);
      return 0x20a;
    }
    if (-1 < (int)uVar4) {
      if (uVar4 == 0) {
        if (param_3 == local_28) {
          return 0;
        }
        goto LAB_00023ff6;
      }
      uVar3 = uVar3 - uVar4;
      bVar7 = CARRY4(param_4,uVar4);
      param_4 = param_4 + uVar4;
      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;
      local_28 = local_28 + uVar4;
      local_2c = (void *)((int)local_2c + uVar4);
      goto LAB_00023f1c;
    }
    piVar5 = __errno_location();
    if (*piVar5 != 4) {
      *(int *)(param_1 + 0x14) = *piVar5;
      if (param_3 != uVar4) {
        return 0x10a;
      }
      return 0;
    }
  } while( true );
}


CALL 0x000f59f8
ADD EAX,0x12704f
PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x2c
MOV EBX,dword ptr [ESP + 0x40]
MOV EDI,dword ptr [ESP + 0x4c]
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,dword ptr [ESP + 0x40]
MOV EBP,dword ptr [ESP + 0x50]
MOV EDX,dword ptr [EBX + 0x34]
MOV EAX,dword ptr [EAX + 0x30]
MOV ECX,EBP
CMP EDI,EAX
SBB ECX,EDX
JGE 0x00023efe
MOV ECX,dword ptr [EBX + 0x48]
ADD ECX,EDI
MOV dword ptr [ESP + 0x10],ECX
MOV ECX,dword ptr [ESP + 0x48]
MOV EBX,ECX
SAR EBX,0x1f
ADD ECX,EDI
ADC EBX,EBP
CMP EAX,ECX
SBB EDX,EBX
JGE 0x00023fa0
SUB ESP,0x4
SUB EAX,EDI
PUSH EAX
MOV ESI,EAX
PUSH dword ptr [ESP + 0x18]
PUSH dword ptr [ESP + 0x50]
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x000140d0
MOV EAX,ESI
ADD dword ptr [ESP + 0x54],ESI
SUB dword ptr [ESP + 0x58],ESI
CDQ
ADD EDI,ESI
ADC EBP,EDX
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x44]
MOV EDX,dword ptr [ESP + 0x48]
MOV dword ptr [ESP + 0x14],0x0
MOV dword ptr [ESP + 0x10],EAX
LEA EAX,[0x14ec]
MOV dword ptr [ESP + 0x1c],EAX
SUB ESP,0xc
PUSH EBP
PUSH EDI
PUSH EDX
MOV dword ptr [ESP + 0x30],EDX
PUSH dword ptr [ESP + 0x28]
MOV EAX,dword ptr [ESP + 0x5c]
PUSH dword ptr [EAX + 0xc]
MOV EAX,dword ptr [ESP + 0x3c]
MOV EBX,dword ptr [ESP + 0x2c]
CALL dword ptr [EAX + EBX*0x1 + 0x7c]
ADD ESP,0x20
MOV EDX,dword ptr [ESP + 0x18]
MOV ESI,EAX
CMP EDX,EAX
JZ 0x00023fe0
TEST EAX,EAX
JS 0x00023f70
JZ 0x00023fc8
MOV EBX,EAX
SUB EDX,EAX
SAR EBX,0x1f
ADD EDI,EAX
ADC EBP,EBX
ADD dword ptr [ESP + 0x14],EAX
ADD dword ptr [ESP + 0x10],EAX
JMP 0x00023f1c
CALL 0x000142b0
MOV EDX,dword ptr [ESP + 0x18]
MOV EAX,dword ptr [EAX]
CMP EAX,0x4
JZ 0x00023f1c
MOV EDI,dword ptr [ESP + 0x40]
MOV dword ptr [EDI + 0x14],EAX
CMP dword ptr [ESP + 0x48],ESI
JZ 0x00023fd2
ADD ESP,0x2c
MOV EAX,0x10a
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH dword ptr [ESP + 0x4c]
PUSH dword ptr [ESP + 0x18]
PUSH dword ptr [ESP + 0x50]
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x000140d0
ADD ESP,0x10
XOR EAX,EAX
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESP + 0x14]
CMP dword ptr [ESP + 0x48],EAX
JNZ 0x00023ff6
ADD ESP,0x2c
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD dword ptr [ESP + 0x14],EDX
MOV EAX,dword ptr [ESP + 0x14]
CMP dword ptr [ESP + 0x48],EAX
JZ 0x00023fd2
MOV EAX,dword ptr [ESP + 0x14]
TEST EAX,EAX
JS 0x00023f8d
MOV EAX,dword ptr [ESP + 0x40]
MOV EDI,dword ptr [ESP + 0x14]
SUB ESP,0x4
MOV dword ptr [EAX + 0x14],0x0
MOV EAX,dword ptr [ESP + 0x4c]
SUB EAX,EDI
ADD EDI,dword ptr [ESP + 0x48]
PUSH EAX
PUSH 0x0
PUSH EDI
MOV EBX,dword ptr [ESP + 0x1c]
CALL 0x00014280
ADD ESP,0x10
MOV EAX,0x20a
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nundefined4 FUN_00023e80(int param_1,void *param_2,uint param_3,uint param_4,int param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int *piVar5;\n  void *__src;\n  int iVar6;\n  bool bVar7;\n  void *local_2c;\n  uint local_28;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  uVar3 = *(uint *)(param_1 + 0x30);\n  if ((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0) {\n    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);\n    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);\n    uVar4 = (uint)(uVar3 < param_3 + param_4);\n    iVar2 = iVar1 - iVar6;\n    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }\n    uVar3 = uVar3 - param_4;\n    memcpy(param_2,__src,uVar3);\n    param_2 = (void *)((int)param_2 + uVar3);\n    param_3 = param_3 - uVar3;\n    bVar7 = CARRY4(param_4,uVar3);\n    param_4 = param_4 + uVar3;\n    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;\n  }\n  local_28 = 0;\n  local_2c = param_2;\n  uVar3 = param_3;\nLAB_00023f1c:\n  do {\n    uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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" comment (function_definition "undefined4 FUN_00023e80(int param_1,void *param_2,uint param_3,uint param_4,int param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int *piVar5;\n  void *__src;\n  int iVar6;\n  bool bVar7;\n  void *local_2c;\n  uint local_28;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  uVar3 = *(uint *)(param_1 + 0x30);\n  if ((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0) {\n    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);\n    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);\n    uVar4 = (uint)(uVar3 < param_3 + param_4);\n    iVar2 = iVar1 - iVar6;\n    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }\n    uVar3 = uVar3 - param_4;\n    memcpy(param_2,__src,uVar3);\n    param_2 = (void *)((int)param_2 + uVar3);\n    param_3 = param_3 - uVar3;\n    bVar7 = CARRY4(param_4,uVar3);\n    param_4 = param_4 + uVar3;\n    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;\n  }\n  local_28 = 0;\n  local_2c = param_2;\n  uVar3 = param_3;\nLAB_00023f1c:\n  do {\n    uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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_00023e80(int param_1,void *param_2,uint param_3,uint param_4,int param_5)" identifier (parameter_list "(int param_1,void *param_2,uint param_3,uint param_4,int param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int *piVar5;\n  void *__src;\n  int iVar6;\n  bool bVar7;\n  void *local_2c;\n  uint local_28;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  uVar3 = *(uint *)(param_1 + 0x30);\n  if ((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0) {\n    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);\n    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);\n    uVar4 = (uint)(uVar3 < param_3 + param_4);\n    iVar2 = iVar1 - iVar6;\n    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }\n    uVar3 = uVar3 - param_4;\n    memcpy(param_2,__src,uVar3);\n    param_2 = (void *)((int)param_2 + uVar3);\n    param_3 = param_3 - uVar3;\n    bVar7 = CARRY4(param_4,uVar3);\n    param_4 = param_4 + uVar3;\n    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;\n  }\n  local_28 = 0;\n  local_2c = param_2;\n  uVar3 = param_3;\nLAB_00023f1c:\n  do {\n    uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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 "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "void *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "void *local_2c;" primitive_type (pointer_declarator "*local_2c" * identifier) ;) (declaration "uint local_28;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(param_1 + 0x34);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x34)" identifier = (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = *(uint *)(param_1 + 0x30);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x30)" identifier = (pointer_expression "*(uint *)(param_1 + 0x30)" * (cast_expression "(uint *)(param_1 + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) (if_statement "if ((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0) {\n    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);\n    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);\n    uVar4 = (uint)(uVar3 < param_3 + param_4);\n    iVar2 = iVar1 - iVar6;\n    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }\n    uVar3 = uVar3 - param_4;\n    memcpy(param_2,__src,uVar3);\n    param_2 = (void *)((int)param_2 + uVar3);\n    param_3 = param_3 - uVar3;\n    bVar7 = CARRY4(param_4,uVar3);\n    param_4 = param_4 + uVar3;\n    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;\n  }" if (parenthesized_expression "((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0)" ( (binary_expression "(SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0" (parenthesized_expression "(SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3)))" ( (binary_expression "SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))" (call_expression "SBORROW4(param_5,iVar1)" identifier (argument_list "(param_5,iVar1)" ( identifier , identifier ))) != (call_expression "SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))" identifier (argument_list "(param_5 - iVar1,(uint)(param_4 < uVar3))" ( (binary_expression "param_5 - iVar1" identifier - identifier) , (call_expression "(uint)(param_4 < uVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_4 < uVar3)" ( (binary_expression "param_4 < uVar3" identifier < identifier) ))) )))) )) != (binary_expression "(int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0" (cast_expression "(int)((param_5 - iVar1) - (uint)(param_4 < uVar3))" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((param_5 - iVar1) - (uint)(param_4 < uVar3))" ( (binary_expression "(param_5 - iVar1) - (uint)(param_4 < uVar3)" (parenthesized_expression "(param_5 - iVar1)" ( (binary_expression "param_5 - iVar1" identifier - identifier) )) - (call_expression "(uint)(param_4 < uVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_4 < uVar3)" ( (binary_expression "param_4 < uVar3" identifier < identifier) )))) ))) < number_literal)) )) (compound_statement "{\n    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);\n    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);\n    uVar4 = (uint)(uVar3 < param_3 + param_4);\n    iVar2 = iVar1 - iVar6;\n    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }\n    uVar3 = uVar3 - param_4;\n    memcpy(param_2,__src,uVar3);\n    param_2 = (void *)((int)param_2 + uVar3);\n    param_3 = param_3 - uVar3;\n    bVar7 = CARRY4(param_4,uVar3);\n    param_4 = param_4 + uVar3;\n    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;\n  }" { (expression_statement "__src = (void *)(*(int *)(param_1 + 0x48) + param_4);" (assignment_expression "__src = (void *)(*(int *)(param_1 + 0x48) + param_4)" identifier = (cast_expression "(void *)(*(int *)(param_1 + 0x48) + param_4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x48) + param_4)" ( (binary_expression "*(int *)(param_1 + 0x48) + param_4" (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) )))) ;) (expression_statement "iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);" (assignment_expression "iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4)" identifier = (binary_expression "((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4)" (binary_expression "((int)param_3 >> 0x1f) + param_5" (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) + (cast_expression "(uint)CARRY4(param_3,param_4)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY4(param_3,param_4)" identifier (argument_list "(param_3,param_4)" ( identifier , identifier )))))) ;) (expression_statement "uVar4 = (uint)(uVar3 < param_3 + param_4);" (assignment_expression "uVar4 = (uint)(uVar3 < param_3 + param_4)" identifier = (call_expression "(uint)(uVar3 < param_3 + param_4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar3 < param_3 + param_4)" ( (binary_expression "uVar3 < param_3 + param_4" identifier < (binary_expression "param_3 + param_4" identifier + identifier)) )))) ;) (expression_statement "iVar2 = iVar1 - iVar6;" (assignment_expression "iVar2 = iVar1 - iVar6" identifier = (binary_expression "iVar1 - iVar6" identifier - identifier)) ;) (if_statement "if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }" if (parenthesized_expression "((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0)" ( (binary_expression "(SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0" (parenthesized_expression "(SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4))" ( (binary_expression "SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)" (call_expression "SBORROW4(iVar1,iVar6)" identifier (argument_list "(iVar1,iVar6)" ( identifier , identifier ))) != (call_expression "SBORROW4(iVar2,uVar4)" identifier (argument_list "(iVar2,uVar4)" ( identifier , identifier )))) )) == (binary_expression "(int)(iVar2 - uVar4) < 0" (cast_expression "(int)(iVar2 - uVar4)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(iVar2 - uVar4)" ( (binary_expression "iVar2 - uVar4" identifier - identifier) ))) < number_literal)) )) (compound_statement "{\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }" { (expression_statement "memcpy(param_2,__src,param_3);" (call_expression "memcpy(param_2,__src,param_3)" identifier (argument_list "(param_2,__src,param_3)" ( identifier , identifier , identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar3 = uVar3 - param_4;" (assignment_expression "uVar3 = uVar3 - param_4" identifier = (binary_expression "uVar3 - param_4" identifier - identifier)) ;) (expression_statement "memcpy(param_2,__src,uVar3);" (call_expression "memcpy(param_2,__src,uVar3)" identifier (argument_list "(param_2,__src,uVar3)" ( identifier , identifier , identifier ))) ;) (expression_statement "param_2 = (void *)((int)param_2 + uVar3);" (assignment_expression "param_2 = (void *)((int)param_2 + uVar3)" identifier = (cast_expression "(void *)((int)param_2 + uVar3)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_2 + uVar3)" ( (binary_expression "(int)param_2 + uVar3" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "param_3 = param_3 - uVar3;" (assignment_expression "param_3 = param_3 - uVar3" identifier = (binary_expression "param_3 - uVar3" identifier - identifier)) ;) (expression_statement "bVar7 = CARRY4(param_4,uVar3);" (assignment_expression "bVar7 = CARRY4(param_4,uVar3)" identifier = (call_expression "CARRY4(param_4,uVar3)" identifier (argument_list "(param_4,uVar3)" ( identifier , identifier )))) ;) (expression_statement "param_4 = param_4 + uVar3;" (assignment_expression "param_4 = param_4 + uVar3" identifier = (binary_expression "param_4 + uVar3" identifier + identifier)) ;) (expression_statement "param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;" (assignment_expression "param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7" identifier = (binary_expression "param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7" (binary_expression "param_5 + ((int)uVar3 >> 0x1f)" identifier + (parenthesized_expression "((int)uVar3 >> 0x1f)" ( (binary_expression "(int)uVar3 >> 0x1f" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) + (cast_expression "(uint)bVar7" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) })) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "local_2c = param_2;" (assignment_expression "local_2c = param_2" identifier = identifier) ;) (expression_statement "uVar3 = param_3;" (assignment_expression "uVar3 = param_3" identifier = identifier) ;) (labeled_statement "LAB_00023f1c:\n  do {\n    uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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 *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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 *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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 *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);" (assignment_expression "uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5)" identifier = (call_expression "(*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5)" (parenthesized_expression "(*(code *)PTR_pread64_0014c43c)" ( (pointer_expression "*(code *)PTR_pread64_0014c43c" * (cast_expression "(code *)PTR_pread64_0014c43c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5)" ( (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 )))) ;) (if_statement "if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }" if (parenthesized_expression "(uVar3 == uVar4)" ( (binary_expression "uVar3 == uVar4" identifier == identifier) )) (compound_statement "{\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }" { (expression_statement "local_28 = local_28 + uVar3;" (assignment_expression "local_28 = local_28 + uVar3" identifier = (binary_expression "local_28 + uVar3" identifier + identifier)) ;) (if_statement "if (param_3 == local_28) {\n        return 0;\n      }" if (parenthesized_expression "(param_3 == local_28)" ( (binary_expression "param_3 == local_28" identifier == identifier) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((int)local_28 < 0) {\n        return 0x10a;\n      }" if (parenthesized_expression "((int)local_28 < 0)" ( (binary_expression "(int)local_28 < 0" (cast_expression "(int)local_28" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        return 0x10a;\n      }" { (return_statement "return 0x10a;" return number_literal ;) })) (labeled_statement "LAB_00023ff6:\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 "memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);" (call_expression "memset((void *)(local_28 + (int)param_2),0,param_3 - local_28)" identifier (argument_list "((void *)(local_28 + (int)param_2),0,param_3 - local_28)" ( (cast_expression "(void *)(local_28 + (int)param_2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_28 + (int)param_2)" ( (binary_expression "local_28 + (int)param_2" identifier + (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) , number_literal , (binary_expression "param_3 - local_28" identifier - identifier) ))) ;) (return_statement "return 0x20a;" return number_literal ;) })) (if_statement "if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\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 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }" { (if_statement "if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }" { (if_statement "if (param_3 == local_28) {\n          return 0;\n        }" if (parenthesized_expression "(param_3 == local_28)" ( (binary_expression "param_3 == local_28" identifier == identifier) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (goto_statement "goto LAB_00023ff6;" goto statement_identifier ;) })) (expression_statement "uVar3 = uVar3 - uVar4;" (assignment_expression "uVar3 = uVar3 - uVar4" identifier = (binary_expression "uVar3 - uVar4" identifier - identifier)) ;) (expression_statement "bVar7 = CARRY4(param_4,uVar4);" (assignment_expression "bVar7 = CARRY4(param_4,uVar4)" identifier = (call_expression "CARRY4(param_4,uVar4)" identifier (argument_list "(param_4,uVar4)" ( identifier , identifier )))) ;) (expression_statement "param_4 = param_4 + uVar4;" (assignment_expression "param_4 = param_4 + uVar4" identifier = (binary_expression "param_4 + uVar4" identifier + identifier)) ;) (expression_statement "param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;" (assignment_expression "param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7" identifier = (binary_expression "param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7" (binary_expression "param_5 + ((int)uVar4 >> 0x1f)" identifier + (parenthesized_expression "((int)uVar4 >> 0x1f)" ( (binary_expression "(int)uVar4 >> 0x1f" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) + (cast_expression "(uint)bVar7" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) (expression_statement "local_28 = local_28 + uVar4;" (assignment_expression "local_28 = local_28 + uVar4" identifier = (binary_expression "local_28 + uVar4" identifier + identifier)) ;) (expression_statement "local_2c = (void *)((int)local_2c + uVar4);" (assignment_expression "local_2c = (void *)((int)local_2c + uVar4)" identifier = (cast_expression "(void *)((int)local_2c + uVar4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)local_2c + uVar4)" ( (binary_expression "(int)local_2c + uVar4" (cast_expression "(int)local_2c" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (goto_statement "goto LAB_00023f1c;" goto statement_identifier ;) })) (expression_statement "piVar5 = __errno_location();" (assignment_expression "piVar5 = __errno_location()" identifier = (call_expression "__errno_location()" 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 "/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nint unixRead(sqlite3_file *id,void *pBuf,int amt,sqlite3_int64 offset)\n\n{\n  sqlite3_io_methods *psVar1;\n  sqlite3_io_methods *psVar2;\n  uint uVar3;\n  size_t __n;\n  int *piVar4;\n  void *__src;\n  int iVar5;\n  int iVar6;\n  void *local_2c;\n  int local_28;\n  \n  psVar1 = id[0xd].pMethods;\n  psVar2 = id[0xc].pMethods;\n  if ((SBORROW4(offset._4_4_,(int)psVar1) !=\n      SBORROW4(offset._4_4_ - (int)psVar1,(uint)((sqlite3_io_methods *)offset < psVar2))) !=\n      (int)((offset._4_4_ - (int)psVar1) - (uint)((sqlite3_io_methods *)offset < psVar2)) < 0) {\n    __src = (void *)((int)&((sqlite3_io_methods *)offset)->iVersion +\n                    (int)&(id[0x12].pMethods)->iVersion);\n    iVar6 = (amt >> 0x1f) + offset._4_4_ + (uint)CARRY4(amt,(uint)(sqlite3_io_methods *)offset);\n    uVar3 = (uint)(psVar2 < (sqlite3_io_methods *)\n                            ((int)&((sqlite3_io_methods *)offset)->iVersion + amt));\n    iVar5 = (int)psVar1 - iVar6;\n    if ((SBORROW4((int)psVar1,iVar6) != SBORROW4(iVar5,uVar3)) == (int)(iVar5 - uVar3) < 0) {\n      memcpy(pBuf,__src,amt);\n      return 0;\n    }\n    __n = (int)psVar2 - (int)(sqlite3_io_methods *)offset;\n    memcpy(pBuf,__src,__n);\n    pBuf = (void *)((int)pBuf + __n);\n    amt = amt - __n;\n    offset = offset + (int)__n;\n  }\n  local_28 = 0;\n  local_2c = pBuf;\n  iVar5 = amt;\nLAB_00023f1c:\n  do {\n    iVar6 = (*aSyscall[10].pCurrent)\n                      (id[3].pMethods,local_2c,iVar5,(int)offset,(int)((ulonglong)offset >> 0x20));\n    if (iVar5 == iVar6) {\n      local_28 = local_28 + iVar5;\n      if (amt == local_28) {\n        return 0;\n      }\n      if (local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      memset((void *)(local_28 + (int)pBuf),0,amt - local_28);\n      return 0x20a;\n    }\n    if (-1 < iVar6) {\n      if (iVar6 == 0) {\n        if (amt == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      iVar5 = iVar5 - iVar6;\n      offset = offset + iVar6;\n      local_28 = local_28 + iVar6;\n      local_2c = (void *)((int)local_2c + iVar6);\n      goto LAB_00023f1c;\n    }\n    piVar4 = __errno_location();\n    if ((sqlite3_io_methods *)*piVar4 != (sqlite3_io_methods *)&DAT_00000004) {\n      id[5].pMethods = (sqlite3_io_methods *)*piVar4;\n      if (amt != iVar6) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );\n}\n\n" comment (function_definition "int unixRead(sqlite3_file *id,void *pBuf,int amt,sqlite3_int64 offset)\n\n{\n  sqlite3_io_methods *psVar1;\n  sqlite3_io_methods *psVar2;\n  uint uVar3;\n  size_t __n;\n  int *piVar4;\n  void *__src;\n  int iVar5;\n  int iVar6;\n  void *local_2c;\n  int local_28;\n  \n  psVar1 = id[0xd].pMethods;\n  psVar2 = id[0xc].pMethods;\n  if ((SBORROW4(offset._4_4_,(int)psVar1) !=\n      SBORROW4(offset._4_4_ - (int)psVar1,(uint)((sqlite3_io_methods *)offset < psVar2))) !=\n      (int)((offset._4_4_ - (int)psVar1) - (uint)((sqlite3_io_methods *)offset < psVar2)) < 0) {\n    __src = (void *)((int)&((sqlite3_io_methods *)offset)->iVersion +\n                    (int)&(id[0x12].pMethods)->iVersion);\n    iVar6 = (amt >> 0x1f) + offset._4_4_ + (uint)CARRY4(amt,(uint)(sqlite3_io_methods *)offset);\n    uVar3 = (uint)(psVar2 < (sqlite3_io_methods *)\n                            ((int)&((sqlite3_io_methods *)offset)->iVersion + amt));\n    iVar5 = (int)psVar1 - iVar6;\n    if ((SBORROW4((int)psVar1,iVar6) != SBORROW4(iVar5,uVar3)) == (int)(iVar5 - uVar3) < 0) {\n      memcpy(pBuf,__src,amt);\n      return 0;\n    }\n    __n = (int)psVar2 - (int)(sqlite3_io_methods *)offset;\n    memcpy(pBuf,__src,__n);\n    pBuf = (void *)((int)pBuf + __n);\n    amt = amt - __n;\n    offset = offset + (int)__n;\n  }\n  local_28 = 0;\n  local_2c = pBuf;\n  iVar5 = amt;\nLAB_00023f1c:\n  do {\n    iVar6 = (*aSyscall[10].pCurrent)\n                      (id[3].pMethods,local_2c,iVar5,(int)offset,(int)((ulonglong)offset >> 0x20));\n    if (iVar5 == iVar6) {\n      local_28 = local_28 + iVar5;\n      if (amt == local_28) {\n        return 0;\n      }\n      if (local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      memset((void *)(local_28 + (int)pBuf),0,amt - local_28);\n      return 0x20a;\n    }\n    if (-1 < iVar6) {\n      if (iVar6 == 0) {\n        if (amt == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      iVar5 = iVar5 - iVar6;\n      offset = offset + iVar6;\n      local_28 = local_28 + iVar6;\n      local_2c = (void *)((int)local_2c + iVar6);\n      goto LAB_00023f1c;\n    }\n    piVar4 = __errno_location();\n    if ((sqlite3_io_methods *)*piVar4 != (sqlite3_io_methods *)&DAT_00000004) {\n      id[5].pMethods = (sqlite3_io_methods *)*piVar4;\n      if (amt != iVar6) {\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  sqlite3_io_methods *psVar1;\n  sqlite3_io_methods *psVar2;\n  uint uVar3;\n  size_t __n;\n  int *piVar4;\n  void *__src;\n  int iVar5;\n  int iVar6;\n  void *local_2c;\n  int local_28;\n  \n  psVar1 = id[0xd].pMethods;\n  psVar2 = id[0xc].pMethods;\n  if ((SBORROW4(offset._4_4_,(int)psVar1) !=\n      SBORROW4(offset._4_4_ - (int)psVar1,(uint)((sqlite3_io_methods *)offset < psVar2))) !=\n      (int)((offset._4_4_ - (int)psVar1) - (uint)((sqlite3_io_methods *)offset < psVar2)) < 0) {\n    __src = (void *)((int)&((sqlite3_io_methods *)offset)->iVersion +\n                    (int)&(id[0x12].pMethods)->iVersion);\n    iVar6 = (amt >> 0x1f) + offset._4_4_ + (uint)CARRY4(amt,(uint)(sqlite3_io_methods *)offset);\n    uVar3 = (uint)(psVar2 < (sqlite3_io_methods *)\n                            ((int)&((sqlite3_io_methods *)offset)->iVersion + amt));\n    iVar5 = (int)psVar1 - iVar6;\n    if ((SBORROW4((int)psVar1,iVar6) != SBORROW4(iVar5,uVar3)) == (int)(iVar5 - uVar3) < 0) {\n      memcpy(pBuf,__src,amt);\n      return 0;\n    }\n    __n = (int)psVar2 - (int)(sqlite3_io_methods *)offset;\n    memcpy(pBuf,__src,__n);\n    pBuf = (void *)((int)pBuf + __n);\n    amt = amt - __n;\n    offset = offset + (int)__n;\n  }\n  local_28 = 0;\n  local_2c = pBuf;\n  iVar5 = amt;\nLAB_00023f1c:\n  do {\n    iVar6 = (*aSyscall[10].pCurrent)\n                      (id[3].pMethods,local_2c,iVar5,(int)offset,(int)((ulonglong)offset >> 0x20));\n    if (iVar5 == iVar6) {\n      local_28 = local_28 + iVar5;\n      if (amt == local_28) {\n        return 0;\n      }\n      if (local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      memset((void *)(local_28 + (int)pBuf),0,amt - local_28);\n      return 0x20a;\n    }\n    if (-1 < iVar6) {\n      if (iVar6 == 0) {\n        if (amt == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      iVar5 = iVar5 - iVar6;\n      offset = offset + iVar6;\n      local_28 = local_28 + iVar6;\n      local_2c = (void *)((int)local_2c + iVar6);\n      goto LAB_00023f1c;\n    }\n    piVar4 = __errno_location();\n    if ((sqlite3_io_methods *)*piVar4 != (sqlite3_io_methods *)&DAT_00000004) {\n      id[5].pMethods = (sqlite3_io_methods *)*piVar4;\n      if (amt != iVar6) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );\n}" { (declaration "sqlite3_io_methods *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "sqlite3_io_methods *psVar2;" type_identifier (pointer_declarator "*psVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "void *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "void *local_2c;" primitive_type (pointer_declarator "*local_2c" * identifier) ;) (declaration "int local_28;" primitive_type identifier ;) (expression_statement "psVar1 = id[0xd].pMethods;" (assignment_expression "psVar1 = id[0xd].pMethods" identifier = (field_expression "id[0xd].pMethods" (subscript_expression "id[0xd]" identifier [ number_literal ]) . field_identifier)) ;) (expression_statement "psVar2 = id[0xc].pMethods;" (assignment_expression "psVar2 = id[0xc].pMethods" identifier = (field_expression "id[0xc].pMethods" (subscript_expression "id[0xc]" identifier [ number_literal ]) . field_identifier)) ;) (if_statement "if ((SBORROW4(offset._4_4_,(int)psVar1) !=\n      SBORROW4(offset._4_4_ - (int)psVar1,(uint)((sqlite3_io_methods *)offset < psVar2))) !=\n      (int)((offset._4_4_ - (int)psVar1) - (uint)((sqlite3_io_methods *)offset < psVar2)) < 0) {\n    __src = (void *)((int)&((sqlite3_io_methods *)offset)->iVersion +\n                    (int)&(id[0x12].pMethods)->iVersion);\n    iVar6 = (amt >> 0x1f) + offset._4_4_ + (uint)CARRY4(amt,(uint)(sqlite3_io_methods *)offset);\n    uVar3 = (uint)(psVar2 < (sqlite3_io_methods *)\n                            ((int)&((sqlite3_io_methods *)offset)->iVersion + amt));\n    iVar5 = (int)psVar1 - iVar6;\n    if ((SBORROW4((int)psVar1,iVar6) != SBORROW4(iVar5,uVar3)) == (int)(iVar5 - uVar3) < 0) {\n      memcpy(pBuf,__src,amt);\n      return 0;\n    }\n    __n = (int)psVar2 - (int)(sqlite3_io_methods *)offset;\n    memcpy(pBuf,__src,__n);\n    pBuf = (void *)((int)pBuf + __n);\n    amt = amt - __n;\n    offset = offset + (int)__n;\n  }" if (parenthesized_expression "((SBORROW4(offset._4_4_,(int)psVar1) !=\n      SBORROW4(offset._4_4_ - (int)psVar1,(uint)((sqlite3_io_methods *)offset < psVar2))) !=\n      (int)((offset._4_4_ - (int)psVar1) - (uint)((sqlite3_io_methods *)offset < psVar2)) < 0)" ( (binary_expression "(SBORROW4(offset._4_4_,(int)psVar1) !=\n      SBORROW4(offset._4_4_ - (int)psVar1,(uint)((sqlite3_io_methods *)offset < psVar2))) !=\n      (int)((offset._4_4_ - (int)psVar1) - (uint)((sqlite3_io_methods *)offset < psVar2)) < 0" (parenthesized_expression "(SBORROW4(offset._4_4_,(int)psVar1) !=\n      SBORROW4(offset._4_4_ - (int)psVar1,(uint)((sqlite3_io_methods *)offset < psVar2)))" ( (binary_expression "SBORROW4(offset._4_4_,(int)psVar1) !=\n      SBORROW4(offset._4_4_ - (int)psVar1,(uint)((sqlite3_io_methods *)offset < psVar2))" (call_expression "SBORROW4(offset._4_4_,(int)psVar1)" identifier (argument_list "(offset._4_4_,(int)psVar1)" ( (field_expression "offset._4_4_" identifier . field_identifier) , (cast_expression "(int)psVar1" ( (type_descriptor "int" primitive_type) ) identifier) ))) != (call_expression "SBORROW4(offset._4_4_ - (int)psVar1,(uint)((sqlite3_io_methods *)offset < psVar2))" identifier (argument_list "(offset._4_4_ - (int)psVar1,(uint)((sqlite3_io_methods *)offset < psVar2))" ( (binary_expression "offset._4_4_ - (int)psVar1" (field_expression "offset._4_4_" identifier . field_identifier) - (cast_expression "(int)psVar1" ( (type_descriptor "int" primitive_type) ) identifier)) , (call_expression "(uint)((sqlite3_io_methods *)offset < psVar2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((sqlite3_io_methods *)offset < psVar2)" ( (binary_expression "(sqlite3_io_methods *)offset < psVar2" (cast_expression "(sqlite3_io_methods *)offset" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) < identifier) ))) )))) )) != (binary_expression "(int)((offset._4_4_ - (int)psVar1) - (uint)((sqlite3_io_methods *)offset < psVar2)) < 0" (cast_expression "(int)((offset._4_4_ - (int)psVar1) - (uint)((sqlite3_io_methods *)offset < psVar2))" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((offset._4_4_ - (int)psVar1) - (uint)((sqlite3_io_methods *)offset < psVar2))" ( (binary_expression "(offset._4_4_ - (int)psVar1) - (uint)((sqlite3_io_methods *)offset < psVar2)" (parenthesized_expression "(offset._4_4_ - (int)psVar1)" ( (binary_expression "offset._4_4_ - (int)psVar1" (field_expression "offset._4_4_" identifier . field_identifier) - (cast_expression "(int)psVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )) - (call_expression "(uint)((sqlite3_io_methods *)offset < psVar2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((sqlite3_io_methods *)offset < psVar2)" ( (binary_expression "(sqlite3_io_methods *)offset < psVar2" (cast_expression "(sqlite3_io_methods *)offset" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) < identifier) )))) ))) < number_literal)) )) (compound_statement "{\n    __src = (void *)((int)&((sqlite3_io_methods *)offset)->iVersion +\n                    (int)&(id[0x12].pMethods)->iVersion);\n    iVar6 = (amt >> 0x1f) + offset._4_4_ + (uint)CARRY4(amt,(uint)(sqlite3_io_methods *)offset);\n    uVar3 = (uint)(psVar2 < (sqlite3_io_methods *)\n                            ((int)&((sqlite3_io_methods *)offset)->iVersion + amt));\n    iVar5 = (int)psVar1 - iVar6;\n    if ((SBORROW4((int)psVar1,iVar6) != SBORROW4(iVar5,uVar3)) == (int)(iVar5 - uVar3) < 0) {\n      memcpy(pBuf,__src,amt);\n      return 0;\n    }\n    __n = (int)psVar2 - (int)(sqlite3_io_methods *)offset;\n    memcpy(pBuf,__src,__n);\n    pBuf = (void *)((int)pBuf + __n);\n    amt = amt - __n;\n    offset = offset + (int)__n;\n  }" { (expression_statement "__src = (void *)((int)&((sqlite3_io_methods *)offset)->iVersion +\n                    (int)&(id[0x12].pMethods)->iVersion);" (assignment_expression "__src = (void *)((int)&((sqlite3_io_methods *)offset)->iVersion +\n                    (int)&(id[0x12].pMethods)->iVersion)" identifier = (cast_expression "(void *)((int)&((sqlite3_io_methods *)offset)->iVersion +\n                    (int)&(id[0x12].pMethods)->iVersion)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&((sqlite3_io_methods *)offset)->iVersion +\n                    (int)&(id[0x12].pMethods)->iVersion)" ( (binary_expression "(int)&((sqlite3_io_methods *)offset)->iVersion +\n                    (int)&(id[0x12].pMethods)->iVersion" (cast_expression "(int)&((sqlite3_io_methods *)offset)->iVersion" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&((sqlite3_io_methods *)offset)->iVersion" & (field_expression "((sqlite3_io_methods *)offset)->iVersion" (parenthesized_expression "((sqlite3_io_methods *)offset)" ( (cast_expression "(sqlite3_io_methods *)offset" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) 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)))) )))) ;) (expression_statement "iVar6 = (amt >> 0x1f) + offset._4_4_ + (uint)CARRY4(amt,(uint)(sqlite3_io_methods *)offset);" (assignment_expression "iVar6 = (amt >> 0x1f) + offset._4_4_ + (uint)CARRY4(amt,(uint)(sqlite3_io_methods *)offset)" identifier = (binary_expression "(amt >> 0x1f) + offset._4_4_ + (uint)CARRY4(amt,(uint)(sqlite3_io_methods *)offset)" (binary_expression "(amt >> 0x1f) + offset._4_4_" (parenthesized_expression "(amt >> 0x1f)" ( (binary_expression "amt >> 0x1f" identifier >> number_literal) )) + (field_expression "offset._4_4_" identifier . field_identifier)) + (cast_expression "(uint)CARRY4(amt,(uint)(sqlite3_io_methods *)offset)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY4(amt,(uint)(sqlite3_io_methods *)offset)" identifier (argument_list "(amt,(uint)(sqlite3_io_methods *)offset)" ( identifier , (cast_expression "(uint)(sqlite3_io_methods *)offset" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(sqlite3_io_methods *)offset" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )))))) ;) (expression_statement "uVar3 = (uint)(psVar2 < (sqlite3_io_methods *)\n                            ((int)&((sqlite3_io_methods *)offset)->iVersion + amt));" (assignment_expression "uVar3 = (uint)(psVar2 < (sqlite3_io_methods *)\n                            ((int)&((sqlite3_io_methods *)offset)->iVersion + amt))" identifier = (call_expression "(uint)(psVar2 < (sqlite3_io_methods *)\n                            ((int)&((sqlite3_io_methods *)offset)->iVersion + amt))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(psVar2 < (sqlite3_io_methods *)\n                            ((int)&((sqlite3_io_methods *)offset)->iVersion + amt))" ( (binary_expression "psVar2 < (sqlite3_io_methods *)\n                            ((int)&((sqlite3_io_methods *)offset)->iVersion + amt)" identifier < (cast_expression "(sqlite3_io_methods *)\n                            ((int)&((sqlite3_io_methods *)offset)->iVersion + amt)" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&((sqlite3_io_methods *)offset)->iVersion + amt)" ( (binary_expression "(int)&((sqlite3_io_methods *)offset)->iVersion + amt" (cast_expression "(int)&((sqlite3_io_methods *)offset)->iVersion" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&((sqlite3_io_methods *)offset)->iVersion" & (field_expression "((sqlite3_io_methods *)offset)->iVersion" (parenthesized_expression "((sqlite3_io_methods *)offset)" ( (cast_expression "(sqlite3_io_methods *)offset" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )) -> field_identifier))) + identifier) )))) )))) ;) (expression_statement "iVar5 = (int)psVar1 - iVar6;" (assignment_expression "iVar5 = (int)psVar1 - iVar6" identifier = (binary_expression "(int)psVar1 - iVar6" (cast_expression "(int)psVar1" ( (type_descriptor "int" primitive_type) ) identifier) - identifier)) ;) (if_statement "if ((SBORROW4((int)psVar1,iVar6) != SBORROW4(iVar5,uVar3)) == (int)(iVar5 - uVar3) < 0) {\n      memcpy(pBuf,__src,amt);\n      return 0;\n    }" if (parenthesized_expression "((SBORROW4((int)psVar1,iVar6) != SBORROW4(iVar5,uVar3)) == (int)(iVar5 - uVar3) < 0)" ( (binary_expression "(SBORROW4((int)psVar1,iVar6) != SBORROW4(iVar5,uVar3)) == (int)(iVar5 - uVar3) < 0" (parenthesized_expression "(SBORROW4((int)psVar1,iVar6) != SBORROW4(iVar5,uVar3))" ( (binary_expression "SBORROW4((int)psVar1,iVar6) != SBORROW4(iVar5,uVar3)" (call_expression "SBORROW4((int)psVar1,iVar6)" identifier (argument_list "((int)psVar1,iVar6)" ( (cast_expression "(int)psVar1" ( (type_descriptor "int" primitive_type) ) identifier) , identifier ))) != (call_expression "SBORROW4(iVar5,uVar3)" identifier (argument_list "(iVar5,uVar3)" ( identifier , identifier )))) )) == (binary_expression "(int)(iVar5 - uVar3) < 0" (cast_expression "(int)(iVar5 - uVar3)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(iVar5 - uVar3)" ( (binary_expression "iVar5 - uVar3" identifier - identifier) ))) < number_literal)) )) (compound_statement "{\n      memcpy(pBuf,__src,amt);\n      return 0;\n    }" { (expression_statement "memcpy(pBuf,__src,amt);" (call_expression "memcpy(pBuf,__src,amt)" identifier (argument_list "(pBuf,__src,amt)" ( identifier , identifier , identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "__n = (int)psVar2 - (int)(sqlite3_io_methods *)offset;" (assignment_expression "__n = (int)psVar2 - (int)(sqlite3_io_methods *)offset" identifier = (binary_expression "(int)psVar2 - (int)(sqlite3_io_methods *)offset" (cast_expression "(int)psVar2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)(sqlite3_io_methods *)offset" ( (type_descriptor "int" primitive_type) ) (cast_expression "(sqlite3_io_methods *)offset" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)))) ;) (expression_statement "memcpy(pBuf,__src,__n);" (call_expression "memcpy(pBuf,__src,__n)" identifier (argument_list "(pBuf,__src,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "pBuf = (void *)((int)pBuf + __n);" (assignment_expression "pBuf = (void *)((int)pBuf + __n)" identifier = (cast_expression "(void *)((int)pBuf + __n)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pBuf + __n)" ( (binary_expression "(int)pBuf + __n" (cast_expression "(int)pBuf" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "amt = amt - __n;" (assignment_expression "amt = amt - __n" identifier = (binary_expression "amt - __n" identifier - identifier)) ;) (expression_statement "offset = offset + (int)__n;" (assignment_expression "offset = offset + (int)__n" identifier = (binary_expression "offset + (int)__n" identifier + (cast_expression "(int)__n" ( (type_descriptor "int" primitive_type) ) identifier))) ;) })) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "local_2c = pBuf;" (assignment_expression "local_2c = pBuf" identifier = identifier) ;) (expression_statement "iVar5 = amt;" (assignment_expression "iVar5 = amt" identifier = identifier) ;) (labeled_statement "LAB_00023f1c:\n  do {\n    iVar6 = (*aSyscall[10].pCurrent)\n                      (id[3].pMethods,local_2c,iVar5,(int)offset,(int)((ulonglong)offset >> 0x20));\n    if (iVar5 == iVar6) {\n      local_28 = local_28 + iVar5;\n      if (amt == local_28) {\n        return 0;\n      }\n      if (local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      memset((void *)(local_28 + (int)pBuf),0,amt - local_28);\n      return 0x20a;\n    }\n    if (-1 < iVar6) {\n      if (iVar6 == 0) {\n        if (amt == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      iVar5 = iVar5 - iVar6;\n      offset = offset + iVar6;\n      local_28 = local_28 + iVar6;\n      local_2c = (void *)((int)local_2c + iVar6);\n      goto LAB_00023f1c;\n    }\n    piVar4 = __errno_location();\n    if ((sqlite3_io_methods *)*piVar4 != (sqlite3_io_methods *)&DAT_00000004) {\n      id[5].pMethods = (sqlite3_io_methods *)*piVar4;\n      if (amt != iVar6) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );" statement_identifier : (do_statement "do {\n    iVar6 = (*aSyscall[10].pCurrent)\n                      (id[3].pMethods,local_2c,iVar5,(int)offset,(int)((ulonglong)offset >> 0x20));\n    if (iVar5 == iVar6) {\n      local_28 = local_28 + iVar5;\n      if (amt == local_28) {\n        return 0;\n      }\n      if (local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      memset((void *)(local_28 + (int)pBuf),0,amt - local_28);\n      return 0x20a;\n    }\n    if (-1 < iVar6) {\n      if (iVar6 == 0) {\n        if (amt == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      iVar5 = iVar5 - iVar6;\n      offset = offset + iVar6;\n      local_28 = local_28 + iVar6;\n      local_2c = (void *)((int)local_2c + iVar6);\n      goto LAB_00023f1c;\n    }\n    piVar4 = __errno_location();\n    if ((sqlite3_io_methods *)*piVar4 != (sqlite3_io_methods *)&DAT_00000004) {\n      id[5].pMethods = (sqlite3_io_methods *)*piVar4;\n      if (amt != iVar6) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  } while( true );" do (compound_statement "{\n    iVar6 = (*aSyscall[10].pCurrent)\n                      (id[3].pMethods,local_2c,iVar5,(int)offset,(int)((ulonglong)offset >> 0x20));\n    if (iVar5 == iVar6) {\n      local_28 = local_28 + iVar5;\n      if (amt == local_28) {\n        return 0;\n      }\n      if (local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      memset((void *)(local_28 + (int)pBuf),0,amt - local_28);\n      return 0x20a;\n    }\n    if (-1 < iVar6) {\n      if (iVar6 == 0) {\n        if (amt == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      iVar5 = iVar5 - iVar6;\n      offset = offset + iVar6;\n      local_28 = local_28 + iVar6;\n      local_2c = (void *)((int)local_2c + iVar6);\n      goto LAB_00023f1c;\n    }\n    piVar4 = __errno_location();\n    if ((sqlite3_io_methods *)*piVar4 != (sqlite3_io_methods *)&DAT_00000004) {\n      id[5].pMethods = (sqlite3_io_methods *)*piVar4;\n      if (amt != iVar6) {\n        return 0x10a;\n      }\n      return 0;\n    }\n  }" { (expression_statement "iVar6 = (*aSyscall[10].pCurrent)\n                      (id[3].pMethods,local_2c,iVar5,(int)offset,(int)((ulonglong)offset >> 0x20));" (assignment_expression "iVar6 = (*aSyscall[10].pCurrent)\n                      (id[3].pMethods,local_2c,iVar5,(int)offset,(int)((ulonglong)offset >> 0x20))" identifier = (call_expression "(*aSyscall[10].pCurrent)\n                      (id[3].pMethods,local_2c,iVar5,(int)offset,(int)((ulonglong)offset >> 0x20))" (parenthesized_expression "(*aSyscall[10].pCurrent)" ( (pointer_expression "*aSyscall[10].pCurrent" * (field_expression "aSyscall[10].pCurrent" (subscript_expression "aSyscall[10]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "(id[3].pMethods,local_2c,iVar5,(int)offset,(int)((ulonglong)offset >> 0x20))" ( (field_expression "id[3].pMethods" (subscript_expression "id[3]" identifier [ number_literal ]) . field_identifier) , identifier , identifier , (cast_expression "(int)offset" ( (type_descriptor "int" primitive_type) ) identifier) , (cast_expression "(int)((ulonglong)offset >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)offset >> 0x20)" ( (binary_expression "(ulonglong)offset >> 0x20" (cast_expression "(ulonglong)offset" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) )))) ;) (if_statement "if (iVar5 == iVar6) {\n      local_28 = local_28 + iVar5;\n      if (amt == local_28) {\n        return 0;\n      }\n      if (local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      memset((void *)(local_28 + (int)pBuf),0,amt - local_28);\n      return 0x20a;\n    }" if (parenthesized_expression "(iVar5 == iVar6)" ( (binary_expression "iVar5 == iVar6" identifier == identifier) )) (compound_statement "{\n      local_28 = local_28 + iVar5;\n      if (amt == local_28) {\n        return 0;\n      }\n      if (local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      id[5].pMethods = (sqlite3_io_methods *)0x0;\n      memset((void *)(local_28 + (int)pBuf),0,amt - local_28);\n      return 0x20a;\n    }" { (expression_statement "local_28 = local_28 + iVar5;" (assignment_expression "local_28 = local_28 + iVar5" identifier = (binary_expression "local_28 + iVar5" identifier + identifier)) ;) (if_statement "if (amt == local_28) {\n        return 0;\n      }" if (parenthesized_expression "(amt == local_28)" ( (binary_expression "amt == local_28" identifier == identifier) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (local_28 < 0) {\n        return 0x10a;\n      }" if (parenthesized_expression "(local_28 < 0)" ( (binary_expression "local_28 < 0" identifier < number_literal) )) (compound_statement "{\n        return 0x10a;\n      }" { (return_statement "return 0x10a;" return number_literal ;) })) (labeled_statement "LAB_00023ff6:\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 "memset((void *)(local_28 + (int)pBuf),0,amt - local_28);" (call_expression "memset((void *)(local_28 + (int)pBuf),0,amt - local_28)" identifier (argument_list "((void *)(local_28 + (int)pBuf),0,amt - local_28)" ( (cast_expression "(void *)(local_28 + (int)pBuf)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_28 + (int)pBuf)" ( (binary_expression "local_28 + (int)pBuf" identifier + (cast_expression "(int)pBuf" ( (type_descriptor "int" primitive_type) ) identifier)) ))) , number_literal , (binary_expression "amt - local_28" identifier - identifier) ))) ;) (return_statement "return 0x20a;" return number_literal ;) })) (if_statement "if (-1 < iVar6) {\n      if (iVar6 == 0) {\n        if (amt == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      iVar5 = iVar5 - iVar6;\n      offset = offset + iVar6;\n      local_28 = local_28 + iVar6;\n      local_2c = (void *)((int)local_2c + iVar6);\n      goto LAB_00023f1c;\n    }" if (parenthesized_expression "(-1 < iVar6)" ( (binary_expression "-1 < iVar6" number_literal < identifier) )) (compound_statement "{\n      if (iVar6 == 0) {\n        if (amt == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      iVar5 = iVar5 - iVar6;\n      offset = offset + iVar6;\n      local_28 = local_28 + iVar6;\n      local_2c = (void *)((int)local_2c + iVar6);\n      goto LAB_00023f1c;\n    }" { (if_statement "if (iVar6 == 0) {\n        if (amt == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n        if (amt == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }" { (if_statement "if (amt == local_28) {\n          return 0;\n        }" if (parenthesized_expression "(amt == local_28)" ( (binary_expression "amt == local_28" identifier == identifier) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (goto_statement "goto LAB_00023ff6;" goto statement_identifier ;) })) (expression_statement "iVar5 = iVar5 - iVar6;" (assignment_expression "iVar5 = iVar5 - iVar6" identifier = (binary_expression "iVar5 - iVar6" identifier - identifier)) ;) (expression_statement "offset = offset + iVar6;" (assignment_expression "offset = offset + iVar6" identifier = (binary_expression "offset + iVar6" identifier + identifier)) ;) (expression_statement "local_28 = local_28 + iVar6;" (assignment_expression "local_28 = local_28 + iVar6" identifier = (binary_expression "local_28 + iVar6" identifier + identifier)) ;) (expression_statement "local_2c = (void *)((int)local_2c + iVar6);" (assignment_expression "local_2c = (void *)((int)local_2c + iVar6)" identifier = (cast_expression "(void *)((int)local_2c + iVar6)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)local_2c + iVar6)" ( (binary_expression "(int)local_2c + iVar6" (cast_expression "(int)local_2c" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (goto_statement "goto LAB_00023f1c;" goto statement_identifier ;) })) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((sqlite3_io_methods *)*piVar4 != (sqlite3_io_methods *)&DAT_00000004) {\n      id[5].pMethods = (sqlite3_io_methods *)*piVar4;\n      if (amt != iVar6) {\n        return 0x10a;\n      }\n      return 0;\n    }" if (parenthesized_expression "((sqlite3_io_methods *)*piVar4 != (sqlite3_io_methods *)&DAT_00000004)" ( (binary_expression "(sqlite3_io_methods *)*piVar4 != (sqlite3_io_methods *)&DAT_00000004" (cast_expression "(sqlite3_io_methods *)*piVar4" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar4" * 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 *)*piVar4;\n      if (amt != iVar6) {\n        return 0x10a;\n      }\n      return 0;\n    }" { (expression_statement "id[5].pMethods = (sqlite3_io_methods *)*piVar4;" (assignment_expression "id[5].pMethods = (sqlite3_io_methods *)*piVar4" (field_expression "id[5].pMethods" (subscript_expression "id[5]" identifier [ number_literal ]) . field_identifier) = (cast_expression "(sqlite3_io_methods *)*piVar4" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar4" * identifier))) ;) (if_statement "if (amt != iVar6) {\n        return 0x10a;\n      }" if (parenthesized_expression "(amt != iVar6)" ( (binary_expression "amt != iVar6" 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 FUN_00023e80(int param_1,void *param_2,uint param_3,uint param_4,int param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int *piVar5;\n  void *__src;\n  int iVar6;\n  bool bVar7;\n  void *local_2c;\n  uint local_28;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  uVar3 = *(uint *)(param_1 + 0x30);\n  if ((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0) {\n    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);\n    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);\n    uVar4 = (uint)(uVar3 < param_3 + param_4);\n    iVar2 = iVar1 - iVar6;\n    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }\n    uVar3 = uVar3 - param_4;\n    memcpy(param_2,__src,uVar3);\n    param_2 = (void *)((int)param_2 + uVar3);\n    param_3 = param_3 - uVar3;\n    bVar7 = CARRY4(param_4,uVar3);\n    param_4 = param_4 + uVar3;\n    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;\n  }\n  local_28 = 0;\n  local_2c = param_2;\n  uVar3 = param_3;\nLAB_00023f1c:\n  do {\n    uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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 FUN_00023e80(int param_1,void *param_2,uint param_3,uint param_4,int param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int *piVar5;\n  void *__src;\n  int iVar6;\n  bool bVar7;\n  void *local_2c;\n  uint local_28;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  uVar3 = *(uint *)(param_1 + 0x30);\n  if ((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0) {\n    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);\n    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);\n    uVar4 = (uint)(uVar3 < param_3 + param_4);\n    iVar2 = iVar1 - iVar6;\n    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }\n    uVar3 = uVar3 - param_4;\n    memcpy(param_2,__src,uVar3);\n    param_2 = (void *)((int)param_2 + uVar3);\n    param_3 = param_3 - uVar3;\n    bVar7 = CARRY4(param_4,uVar3);\n    param_4 = param_4 + uVar3;\n    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;\n  }\n  local_28 = 0;\n  local_2c = param_2;\n  uVar3 = param_3;\nLAB_00023f1c:\n  do {\n    uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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_00023e80(int param_1,void *param_2,uint param_3,uint param_4,int param_5)" identifier (parameter_list "(int param_1,void *param_2,uint param_3,uint param_4,int param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int *piVar5;\n  void *__src;\n  int iVar6;\n  bool bVar7;\n  void *local_2c;\n  uint local_28;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  uVar3 = *(uint *)(param_1 + 0x30);\n  if ((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0) {\n    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);\n    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);\n    uVar4 = (uint)(uVar3 < param_3 + param_4);\n    iVar2 = iVar1 - iVar6;\n    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }\n    uVar3 = uVar3 - param_4;\n    memcpy(param_2,__src,uVar3);\n    param_2 = (void *)((int)param_2 + uVar3);\n    param_3 = param_3 - uVar3;\n    bVar7 = CARRY4(param_4,uVar3);\n    param_4 = param_4 + uVar3;\n    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;\n  }\n  local_28 = 0;\n  local_2c = param_2;\n  uVar3 = param_3;\nLAB_00023f1c:\n  do {\n    uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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 "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "void *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "void *local_2c;" primitive_type (pointer_declarator "*local_2c" * identifier) ;) (declaration "uint local_28;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(param_1 + 0x34);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x34)" identifier = (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = *(uint *)(param_1 + 0x30);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x30)" identifier = (pointer_expression "*(uint *)(param_1 + 0x30)" * (cast_expression "(uint *)(param_1 + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) (if_statement "if ((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0) {\n    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);\n    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);\n    uVar4 = (uint)(uVar3 < param_3 + param_4);\n    iVar2 = iVar1 - iVar6;\n    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }\n    uVar3 = uVar3 - param_4;\n    memcpy(param_2,__src,uVar3);\n    param_2 = (void *)((int)param_2 + uVar3);\n    param_3 = param_3 - uVar3;\n    bVar7 = CARRY4(param_4,uVar3);\n    param_4 = param_4 + uVar3;\n    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;\n  }" if (parenthesized_expression "((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0)" ( (binary_expression "(SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0" (parenthesized_expression "(SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3)))" ( (binary_expression "SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))" (call_expression "SBORROW4(param_5,iVar1)" identifier (argument_list "(param_5,iVar1)" ( identifier , identifier ))) != (call_expression "SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))" identifier (argument_list "(param_5 - iVar1,(uint)(param_4 < uVar3))" ( (binary_expression "param_5 - iVar1" identifier - identifier) , (call_expression "(uint)(param_4 < uVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_4 < uVar3)" ( (binary_expression "param_4 < uVar3" identifier < identifier) ))) )))) )) != (binary_expression "(int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0" (cast_expression "(int)((param_5 - iVar1) - (uint)(param_4 < uVar3))" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((param_5 - iVar1) - (uint)(param_4 < uVar3))" ( (binary_expression "(param_5 - iVar1) - (uint)(param_4 < uVar3)" (parenthesized_expression "(param_5 - iVar1)" ( (binary_expression "param_5 - iVar1" identifier - identifier) )) - (call_expression "(uint)(param_4 < uVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_4 < uVar3)" ( (binary_expression "param_4 < uVar3" identifier < identifier) )))) ))) < number_literal)) )) (compound_statement "{\n    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);\n    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);\n    uVar4 = (uint)(uVar3 < param_3 + param_4);\n    iVar2 = iVar1 - iVar6;\n    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }\n    uVar3 = uVar3 - param_4;\n    memcpy(param_2,__src,uVar3);\n    param_2 = (void *)((int)param_2 + uVar3);\n    param_3 = param_3 - uVar3;\n    bVar7 = CARRY4(param_4,uVar3);\n    param_4 = param_4 + uVar3;\n    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;\n  }" { (expression_statement "__src = (void *)(*(int *)(param_1 + 0x48) + param_4);" (assignment_expression "__src = (void *)(*(int *)(param_1 + 0x48) + param_4)" identifier = (cast_expression "(void *)(*(int *)(param_1 + 0x48) + param_4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x48) + param_4)" ( (binary_expression "*(int *)(param_1 + 0x48) + param_4" (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) )))) ;) (expression_statement "iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);" (assignment_expression "iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4)" identifier = (binary_expression "((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4)" (binary_expression "((int)param_3 >> 0x1f) + param_5" (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) + (cast_expression "(uint)CARRY4(param_3,param_4)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY4(param_3,param_4)" identifier (argument_list "(param_3,param_4)" ( identifier , identifier )))))) ;) (expression_statement "uVar4 = (uint)(uVar3 < param_3 + param_4);" (assignment_expression "uVar4 = (uint)(uVar3 < param_3 + param_4)" identifier = (call_expression "(uint)(uVar3 < param_3 + param_4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar3 < param_3 + param_4)" ( (binary_expression "uVar3 < param_3 + param_4" identifier < (binary_expression "param_3 + param_4" identifier + identifier)) )))) ;) (expression_statement "iVar2 = iVar1 - iVar6;" (assignment_expression "iVar2 = iVar1 - iVar6" identifier = (binary_expression "iVar1 - iVar6" identifier - identifier)) ;) (if_statement "if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }" if (parenthesized_expression "((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0)" ( (binary_expression "(SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0" (parenthesized_expression "(SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4))" ( (binary_expression "SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)" (call_expression "SBORROW4(iVar1,iVar6)" identifier (argument_list "(iVar1,iVar6)" ( identifier , identifier ))) != (call_expression "SBORROW4(iVar2,uVar4)" identifier (argument_list "(iVar2,uVar4)" ( identifier , identifier )))) )) == (binary_expression "(int)(iVar2 - uVar4) < 0" (cast_expression "(int)(iVar2 - uVar4)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(iVar2 - uVar4)" ( (binary_expression "iVar2 - uVar4" identifier - identifier) ))) < number_literal)) )) (compound_statement "{\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }" { (expression_statement "memcpy(param_2,__src,param_3);" (call_expression "memcpy(param_2,__src,param_3)" identifier (argument_list "(param_2,__src,param_3)" ( identifier , identifier , identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar3 = uVar3 - param_4;" (assignment_expression "uVar3 = uVar3 - param_4" identifier = (binary_expression "uVar3 - param_4" identifier - identifier)) ;) (expression_statement "memcpy(param_2,__src,uVar3);" (call_expression "memcpy(param_2,__src,uVar3)" identifier (argument_list "(param_2,__src,uVar3)" ( identifier , identifier , identifier ))) ;) (expression_statement "param_2 = (void *)((int)param_2 + uVar3);" (assignment_expression "param_2 = (void *)((int)param_2 + uVar3)" identifier = (cast_expression "(void *)((int)param_2 + uVar3)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_2 + uVar3)" ( (binary_expression "(int)param_2 + uVar3" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "param_3 = param_3 - uVar3;" (assignment_expression "param_3 = param_3 - uVar3" identifier = (binary_expression "param_3 - uVar3" identifier - identifier)) ;) (expression_statement "bVar7 = CARRY4(param_4,uVar3);" (assignment_expression "bVar7 = CARRY4(param_4,uVar3)" identifier = (call_expression "CARRY4(param_4,uVar3)" identifier (argument_list "(param_4,uVar3)" ( identifier , identifier )))) ;) (expression_statement "param_4 = param_4 + uVar3;" (assignment_expression "param_4 = param_4 + uVar3" identifier = (binary_expression "param_4 + uVar3" identifier + identifier)) ;) (expression_statement "param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;" (assignment_expression "param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7" identifier = (binary_expression "param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7" (binary_expression "param_5 + ((int)uVar3 >> 0x1f)" identifier + (parenthesized_expression "((int)uVar3 >> 0x1f)" ( (binary_expression "(int)uVar3 >> 0x1f" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) + (cast_expression "(uint)bVar7" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) })) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "local_2c = param_2;" (assignment_expression "local_2c = param_2" identifier = identifier) ;) (expression_statement "uVar3 = param_3;" (assignment_expression "uVar3 = param_3" identifier = identifier) ;) (labeled_statement "LAB_00023f1c:\n  do {\n    uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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 *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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 *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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 *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);" (assignment_expression "uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5)" identifier = (call_expression "(*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5)" (parenthesized_expression "(*(code *)PTR_pread64_0014c43c)" ( (pointer_expression "*(code *)PTR_pread64_0014c43c" * (cast_expression "(code *)PTR_pread64_0014c43c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5)" ( (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 )))) ;) (if_statement "if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }" if (parenthesized_expression "(uVar3 == uVar4)" ( (binary_expression "uVar3 == uVar4" identifier == identifier) )) (compound_statement "{\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }" { (expression_statement "local_28 = local_28 + uVar3;" (assignment_expression "local_28 = local_28 + uVar3" identifier = (binary_expression "local_28 + uVar3" identifier + identifier)) ;) (if_statement "if (param_3 == local_28) {\n        return 0;\n      }" if (parenthesized_expression "(param_3 == local_28)" ( (binary_expression "param_3 == local_28" identifier == identifier) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((int)local_28 < 0) {\n        return 0x10a;\n      }" if (parenthesized_expression "((int)local_28 < 0)" ( (binary_expression "(int)local_28 < 0" (cast_expression "(int)local_28" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        return 0x10a;\n      }" { (return_statement "return 0x10a;" return number_literal ;) })) (labeled_statement "LAB_00023ff6:\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 "memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);" (call_expression "memset((void *)(local_28 + (int)param_2),0,param_3 - local_28)" identifier (argument_list "((void *)(local_28 + (int)param_2),0,param_3 - local_28)" ( (cast_expression "(void *)(local_28 + (int)param_2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_28 + (int)param_2)" ( (binary_expression "local_28 + (int)param_2" identifier + (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) , number_literal , (binary_expression "param_3 - local_28" identifier - identifier) ))) ;) (return_statement "return 0x20a;" return number_literal ;) })) (if_statement "if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\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 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }" { (if_statement "if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }" { (if_statement "if (param_3 == local_28) {\n          return 0;\n        }" if (parenthesized_expression "(param_3 == local_28)" ( (binary_expression "param_3 == local_28" identifier == identifier) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (goto_statement "goto LAB_00023ff6;" goto statement_identifier ;) })) (expression_statement "uVar3 = uVar3 - uVar4;" (assignment_expression "uVar3 = uVar3 - uVar4" identifier = (binary_expression "uVar3 - uVar4" identifier - identifier)) ;) (expression_statement "bVar7 = CARRY4(param_4,uVar4);" (assignment_expression "bVar7 = CARRY4(param_4,uVar4)" identifier = (call_expression "CARRY4(param_4,uVar4)" identifier (argument_list "(param_4,uVar4)" ( identifier , identifier )))) ;) (expression_statement "param_4 = param_4 + uVar4;" (assignment_expression "param_4 = param_4 + uVar4" identifier = (binary_expression "param_4 + uVar4" identifier + identifier)) ;) (expression_statement "param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;" (assignment_expression "param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7" identifier = (binary_expression "param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7" (binary_expression "param_5 + ((int)uVar4 >> 0x1f)" identifier + (parenthesized_expression "((int)uVar4 >> 0x1f)" ( (binary_expression "(int)uVar4 >> 0x1f" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) + (cast_expression "(uint)bVar7" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) (expression_statement "local_28 = local_28 + uVar4;" (assignment_expression "local_28 = local_28 + uVar4" identifier = (binary_expression "local_28 + uVar4" identifier + identifier)) ;) (expression_statement "local_2c = (void *)((int)local_2c + uVar4);" (assignment_expression "local_2c = (void *)((int)local_2c + uVar4)" identifier = (cast_expression "(void *)((int)local_2c + uVar4)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)local_2c + uVar4)" ( (binary_expression "(int)local_2c + uVar4" (cast_expression "(int)local_2c" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (goto_statement "goto LAB_00023f1c;" goto statement_identifier ;) })) (expression_statement "piVar5 = __errno_location();" (assignment_expression "piVar5 = __errno_location()" identifier = (call_expression "__errno_location()" 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 (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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 (call_expression IDENT (argument_list ( IDENT , IDENT ))) != (call_expression IDENT (argument_list ( (binary_expression IDENT - IDENT) , (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT < IDENT) ))) )))) )) != (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT - IDENT) )) - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT < IDENT) )))) ))) < LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )) + IDENT) + (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( IDENT , IDENT )))))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT < (binary_expression IDENT + IDENT)) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (call_expression IDENT (argument_list ( IDENT , IDENT ))) != (call_expression IDENT (argument_list ( IDENT , IDENT )))) )) == (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT - IDENT) ))) < LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) + (cast_expression ( (type_descriptor TYPE) ) 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 * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , IDENT , 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 IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) 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 IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression 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 FUN_00023e80(int param_1,void *param_2,uint param_3,uint param_4,int param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int *piVar5;\n  void *__src;\n  int iVar6;\n  bool bVar7;\n  void *local_2c;\n  uint local_28;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  uVar3 = *(uint *)(param_1 + 0x30);\n  if ((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0) {\n    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);\n    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);\n    uVar4 = (uint)(uVar3 < param_3 + param_4);\n    iVar2 = iVar1 - iVar6;\n    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }\n    uVar3 = uVar3 - param_4;\n    memcpy(param_2,__src,uVar3);\n    param_2 = (void *)((int)param_2 + uVar3);\n    param_3 = param_3 - uVar3;\n    bVar7 = CARRY4(param_4,uVar3);\n    param_4 = param_4 + uVar3;\n    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;\n  }\n  local_28 = 0;\n  local_2c = param_2;\n  uVar3 = param_3;\nLAB_00023f1c:\n  do {\n    uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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_00023e80(int param_1,void *param_2,uint param_3,uint param_4,int param_5)" (identifier "FUN_00023e80") (parameter_list "(int param_1,void *param_2,uint param_3,uint param_4,int param_5)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "void *param_2" (primitive_type "void") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int *piVar5;\n  void *__src;\n  int iVar6;\n  bool bVar7;\n  void *local_2c;\n  uint local_28;\n  \n  iVar1 = *(int *)(param_1 + 0x34);\n  uVar3 = *(uint *)(param_1 + 0x30);\n  if ((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0) {\n    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);\n    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);\n    uVar4 = (uint)(uVar3 < param_3 + param_4);\n    iVar2 = iVar1 - iVar6;\n    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }\n    uVar3 = uVar3 - param_4;\n    memcpy(param_2,__src,uVar3);\n    param_2 = (void *)((int)param_2 + uVar3);\n    param_3 = param_3 - uVar3;\n    bVar7 = CARRY4(param_4,uVar3);\n    param_4 = param_4 + uVar3;\n    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;\n  }\n  local_28 = 0;\n  local_2c = param_2;\n  uVar3 = param_3;\nLAB_00023f1c:\n  do {\n    uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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 "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "int *piVar5;" (primitive_type "int") (pointer_declarator "*piVar5" (* "*") (identifier "piVar5")) (; ";")) (declaration "void *__src;" (primitive_type "void") (pointer_declarator "*__src" (* "*") (identifier "__src")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "bool bVar7;" (primitive_type "bool") (identifier "bVar7") (; ";")) (declaration "void *local_2c;" (primitive_type "void") (pointer_declarator "*local_2c" (* "*") (identifier "local_2c")) (; ";")) (declaration "uint local_28;" (type_identifier "uint") (identifier "local_28") (; ";")) (expression_statement "iVar1 = *(int *)(param_1 + 0x34);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x34)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0x34)" (* "*") (cast_expression "(int *)(param_1 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x34)" (( "(") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34")) () ")"))))) (; ";")) (expression_statement "uVar3 = *(uint *)(param_1 + 0x30);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x30)" (identifier "uVar3") (= "=") (pointer_expression "*(uint *)(param_1 + 0x30)" (* "*") (cast_expression "(uint *)(param_1 + 0x30)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")"))))) (; ";")) (if_statement "if ((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0) {\n    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);\n    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);\n    uVar4 = (uint)(uVar3 < param_3 + param_4);\n    iVar2 = iVar1 - iVar6;\n    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }\n    uVar3 = uVar3 - param_4;\n    memcpy(param_2,__src,uVar3);\n    param_2 = (void *)((int)param_2 + uVar3);\n    param_3 = param_3 - uVar3;\n    bVar7 = CARRY4(param_4,uVar3);\n    param_4 = param_4 + uVar3;\n    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;\n  }" (if "if") (parenthesized_expression "((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0)" (( "(") (binary_expression "(SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=\n      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0" (parenthesized_expression "(SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3)))" (( "(") (binary_expression "SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))" (call_expression "SBORROW4(param_5,iVar1)" (identifier "SBORROW4") (argument_list "(param_5,iVar1)" (( "(") (identifier "param_5") (, ",") (identifier "iVar1") () ")"))) (!= "!=") (call_expression "SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))" (identifier "SBORROW4") (argument_list "(param_5 - iVar1,(uint)(param_4 < uVar3))" (( "(") (binary_expression "param_5 - iVar1" (identifier "param_5") (- "-") (identifier "iVar1")) (, ",") (call_expression "(uint)(param_4 < uVar3)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_4 < uVar3)" (( "(") (binary_expression "param_4 < uVar3" (identifier "param_4") (< "<") (identifier "uVar3")) () ")"))) () ")")))) () ")")) (!= "!=") (binary_expression "(int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0" (cast_expression "(int)((param_5 - iVar1) - (uint)(param_4 < uVar3))" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((param_5 - iVar1) - (uint)(param_4 < uVar3))" (( "(") (binary_expression "(param_5 - iVar1) - (uint)(param_4 < uVar3)" (parenthesized_expression "(param_5 - iVar1)" (( "(") (binary_expression "param_5 - iVar1" (identifier "param_5") (- "-") (identifier "iVar1")) () ")")) (- "-") (call_expression "(uint)(param_4 < uVar3)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_4 < uVar3)" (( "(") (binary_expression "param_4 < uVar3" (identifier "param_4") (< "<") (identifier "uVar3")) () ")")))) () ")"))) (< "<") (number_literal "0"))) () ")")) (compound_statement "{\n    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);\n    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);\n    uVar4 = (uint)(uVar3 < param_3 + param_4);\n    iVar2 = iVar1 - iVar6;\n    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }\n    uVar3 = uVar3 - param_4;\n    memcpy(param_2,__src,uVar3);\n    param_2 = (void *)((int)param_2 + uVar3);\n    param_3 = param_3 - uVar3;\n    bVar7 = CARRY4(param_4,uVar3);\n    param_4 = param_4 + uVar3;\n    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;\n  }" ({ "{") (expression_statement "__src = (void *)(*(int *)(param_1 + 0x48) + param_4);" (assignment_expression "__src = (void *)(*(int *)(param_1 + 0x48) + param_4)" (identifier "__src") (= "=") (cast_expression "(void *)(*(int *)(param_1 + 0x48) + param_4)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x48) + param_4)" (( "(") (binary_expression "*(int *)(param_1 + 0x48) + param_4" (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_4")) () ")")))) (; ";")) (expression_statement "iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);" (assignment_expression "iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4)" (identifier "iVar6") (= "=") (binary_expression "((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4)" (binary_expression "((int)param_3 >> 0x1f) + param_5" (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")) (+ "+") (cast_expression "(uint)CARRY4(param_3,param_4)" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (call_expression "CARRY4(param_3,param_4)" (identifier "CARRY4") (argument_list "(param_3,param_4)" (( "(") (identifier "param_3") (, ",") (identifier "param_4") () ")")))))) (; ";")) (expression_statement "uVar4 = (uint)(uVar3 < param_3 + param_4);" (assignment_expression "uVar4 = (uint)(uVar3 < param_3 + param_4)" (identifier "uVar4") (= "=") (call_expression "(uint)(uVar3 < param_3 + param_4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(uVar3 < param_3 + param_4)" (( "(") (binary_expression "uVar3 < param_3 + param_4" (identifier "uVar3") (< "<") (binary_expression "param_3 + param_4" (identifier "param_3") (+ "+") (identifier "param_4"))) () ")")))) (; ";")) (expression_statement "iVar2 = iVar1 - iVar6;" (assignment_expression "iVar2 = iVar1 - iVar6" (identifier "iVar2") (= "=") (binary_expression "iVar1 - iVar6" (identifier "iVar1") (- "-") (identifier "iVar6"))) (; ";")) (if_statement "if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }" (if "if") (parenthesized_expression "((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0)" (( "(") (binary_expression "(SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0" (parenthesized_expression "(SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4))" (( "(") (binary_expression "SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)" (call_expression "SBORROW4(iVar1,iVar6)" (identifier "SBORROW4") (argument_list "(iVar1,iVar6)" (( "(") (identifier "iVar1") (, ",") (identifier "iVar6") () ")"))) (!= "!=") (call_expression "SBORROW4(iVar2,uVar4)" (identifier "SBORROW4") (argument_list "(iVar2,uVar4)" (( "(") (identifier "iVar2") (, ",") (identifier "uVar4") () ")")))) () ")")) (== "==") (binary_expression "(int)(iVar2 - uVar4) < 0" (cast_expression "(int)(iVar2 - uVar4)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(iVar2 - uVar4)" (( "(") (binary_expression "iVar2 - uVar4" (identifier "iVar2") (- "-") (identifier "uVar4")) () ")"))) (< "<") (number_literal "0"))) () ")")) (compound_statement "{\n      memcpy(param_2,__src,param_3);\n      return 0;\n    }" ({ "{") (expression_statement "memcpy(param_2,__src,param_3);" (call_expression "memcpy(param_2,__src,param_3)" (identifier "memcpy") (argument_list "(param_2,__src,param_3)" (( "(") (identifier "param_2") (, ",") (identifier "__src") (, ",") (identifier "param_3") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar3 = uVar3 - param_4;" (assignment_expression "uVar3 = uVar3 - param_4" (identifier "uVar3") (= "=") (binary_expression "uVar3 - param_4" (identifier "uVar3") (- "-") (identifier "param_4"))) (; ";")) (expression_statement "memcpy(param_2,__src,uVar3);" (call_expression "memcpy(param_2,__src,uVar3)" (identifier "memcpy") (argument_list "(param_2,__src,uVar3)" (( "(") (identifier "param_2") (, ",") (identifier "__src") (, ",") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "param_2 = (void *)((int)param_2 + uVar3);" (assignment_expression "param_2 = (void *)((int)param_2 + uVar3)" (identifier "param_2") (= "=") (cast_expression "(void *)((int)param_2 + uVar3)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_2 + uVar3)" (( "(") (binary_expression "(int)param_2 + uVar3" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (+ "+") (identifier "uVar3")) () ")")))) (; ";")) (expression_statement "param_3 = param_3 - uVar3;" (assignment_expression "param_3 = param_3 - uVar3" (identifier "param_3") (= "=") (binary_expression "param_3 - uVar3" (identifier "param_3") (- "-") (identifier "uVar3"))) (; ";")) (expression_statement "bVar7 = CARRY4(param_4,uVar3);" (assignment_expression "bVar7 = CARRY4(param_4,uVar3)" (identifier "bVar7") (= "=") (call_expression "CARRY4(param_4,uVar3)" (identifier "CARRY4") (argument_list "(param_4,uVar3)" (( "(") (identifier "param_4") (, ",") (identifier "uVar3") () ")")))) (; ";")) (expression_statement "param_4 = param_4 + uVar3;" (assignment_expression "param_4 = param_4 + uVar3" (identifier "param_4") (= "=") (binary_expression "param_4 + uVar3" (identifier "param_4") (+ "+") (identifier "uVar3"))) (; ";")) (expression_statement "param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;" (assignment_expression "param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7" (identifier "param_5") (= "=") (binary_expression "param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7" (binary_expression "param_5 + ((int)uVar3 >> 0x1f)" (identifier "param_5") (+ "+") (parenthesized_expression "((int)uVar3 >> 0x1f)" (( "(") (binary_expression "(int)uVar3 >> 0x1f" (cast_expression "(int)uVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar3")) (>> ">>") (number_literal "0x1f")) () ")"))) (+ "+") (cast_expression "(uint)bVar7" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar7")))) (; ";")) (} "}"))) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" (identifier "local_28") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_2c = param_2;" (assignment_expression "local_2c = param_2" (identifier "local_2c") (= "=") (identifier "param_2")) (; ";")) (expression_statement "uVar3 = param_3;" (assignment_expression "uVar3 = param_3" (identifier "uVar3") (= "=") (identifier "param_3")) (; ";")) (labeled_statement "LAB_00023f1c:\n  do {\n    uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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_00023f1c") (: ":") (do_statement "do {\n    uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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 *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);\n    if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }\n    if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }\n    piVar5 = __errno_location();\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 *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);" (assignment_expression "uVar4 = (*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5)" (identifier "uVar4") (= "=") (call_expression "(*(code *)PTR_pread64_0014c43c)\n                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5)" (parenthesized_expression "(*(code *)PTR_pread64_0014c43c)" (( "(") (pointer_expression "*(code *)PTR_pread64_0014c43c" (* "*") (cast_expression "(code *)PTR_pread64_0014c43c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_pread64_0014c43c"))) () ")")) (argument_list "(*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5)" (( "(") (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 "local_2c") (, ",") (identifier "uVar3") (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")")))) (; ";")) (if_statement "if (uVar3 == uVar4) {\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }" (if "if") (parenthesized_expression "(uVar3 == uVar4)" (( "(") (binary_expression "uVar3 == uVar4" (identifier "uVar3") (== "==") (identifier "uVar4")) () ")")) (compound_statement "{\n      local_28 = local_28 + uVar3;\n      if (param_3 == local_28) {\n        return 0;\n      }\n      if ((int)local_28 < 0) {\n        return 0x10a;\n      }\nLAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;\n      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);\n      return 0x20a;\n    }" ({ "{") (expression_statement "local_28 = local_28 + uVar3;" (assignment_expression "local_28 = local_28 + uVar3" (identifier "local_28") (= "=") (binary_expression "local_28 + uVar3" (identifier "local_28") (+ "+") (identifier "uVar3"))) (; ";")) (if_statement "if (param_3 == local_28) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(param_3 == local_28)" (( "(") (binary_expression "param_3 == local_28" (identifier "param_3") (== "==") (identifier "local_28")) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if ((int)local_28 < 0) {\n        return 0x10a;\n      }" (if "if") (parenthesized_expression "((int)local_28 < 0)" (( "(") (binary_expression "(int)local_28 < 0" (cast_expression "(int)local_28" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_28")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        return 0x10a;\n      }" ({ "{") (return_statement "return 0x10a;" (return "return") (number_literal "0x10a") (; ";")) (} "}"))) (labeled_statement "LAB_00023ff6:\n      *(undefined4 *)(param_1 + 0x14) = 0;" (statement_identifier "LAB_00023ff6") (: ":") (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 "memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);" (call_expression "memset((void *)(local_28 + (int)param_2),0,param_3 - local_28)" (identifier "memset") (argument_list "((void *)(local_28 + (int)param_2),0,param_3 - local_28)" (( "(") (cast_expression "(void *)(local_28 + (int)param_2)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_28 + (int)param_2)" (( "(") (binary_expression "local_28 + (int)param_2" (identifier "local_28") (+ "+") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")"))) (, ",") (number_literal "0") (, ",") (binary_expression "param_3 - local_28" (identifier "param_3") (- "-") (identifier "local_28")) () ")"))) (; ";")) (return_statement "return 0x20a;" (return "return") (number_literal "0x20a") (; ";")) (} "}"))) (if_statement "if (-1 < (int)uVar4) {\n      if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\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 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }\n      uVar3 = uVar3 - uVar4;\n      bVar7 = CARRY4(param_4,uVar4);\n      param_4 = param_4 + uVar4;\n      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;\n      local_28 = local_28 + uVar4;\n      local_2c = (void *)((int)local_2c + uVar4);\n      goto LAB_00023f1c;\n    }" ({ "{") (if_statement "if (uVar4 == 0) {\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }" (if "if") (parenthesized_expression "(uVar4 == 0)" (( "(") (binary_expression "uVar4 == 0" (identifier "uVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        if (param_3 == local_28) {\n          return 0;\n        }\n        goto LAB_00023ff6;\n      }" ({ "{") (if_statement "if (param_3 == local_28) {\n          return 0;\n        }" (if "if") (parenthesized_expression "(param_3 == local_28)" (( "(") (binary_expression "param_3 == local_28" (identifier "param_3") (== "==") (identifier "local_28")) () ")")) (compound_statement "{\n          return 0;\n        }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (goto_statement "goto LAB_00023ff6;" (goto "goto") (statement_identifier "LAB_00023ff6") (; ";")) (} "}"))) (expression_statement "uVar3 = uVar3 - uVar4;" (assignment_expression "uVar3 = uVar3 - uVar4" (identifier "uVar3") (= "=") (binary_expression "uVar3 - uVar4" (identifier "uVar3") (- "-") (identifier "uVar4"))) (; ";")) (expression_statement "bVar7 = CARRY4(param_4,uVar4);" (assignment_expression "bVar7 = CARRY4(param_4,uVar4)" (identifier "bVar7") (= "=") (call_expression "CARRY4(param_4,uVar4)" (identifier "CARRY4") (argument_list "(param_4,uVar4)" (( "(") (identifier "param_4") (, ",") (identifier "uVar4") () ")")))) (; ";")) (expression_statement "param_4 = param_4 + uVar4;" (assignment_expression "param_4 = param_4 + uVar4" (identifier "param_4") (= "=") (binary_expression "param_4 + uVar4" (identifier "param_4") (+ "+") (identifier "uVar4"))) (; ";")) (expression_statement "param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;" (assignment_expression "param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7" (identifier "param_5") (= "=") (binary_expression "param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7" (binary_expression "param_5 + ((int)uVar4 >> 0x1f)" (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")) () ")"))) (+ "+") (cast_expression "(uint)bVar7" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar7")))) (; ";")) (expression_statement "local_28 = local_28 + uVar4;" (assignment_expression "local_28 = local_28 + uVar4" (identifier "local_28") (= "=") (binary_expression "local_28 + uVar4" (identifier "local_28") (+ "+") (identifier "uVar4"))) (; ";")) (expression_statement "local_2c = (void *)((int)local_2c + uVar4);" (assignment_expression "local_2c = (void *)((int)local_2c + uVar4)" (identifier "local_2c") (= "=") (cast_expression "(void *)((int)local_2c + uVar4)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)local_2c + uVar4)" (( "(") (binary_expression "(int)local_2c + uVar4" (cast_expression "(int)local_2c" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_2c")) (+ "+") (identifier "uVar4")) () ")")))) (; ";")) (goto_statement "goto LAB_00023f1c;" (goto "goto") (statement_identifier "LAB_00023f1c") (; ";")) (} "}"))) (expression_statement "piVar5 = __errno_location();" (assignment_expression "piVar5 = __errno_location()" (identifier "piVar5") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (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") () ")")) (; ";"))) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

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

{
  type_3 *psVar1;
  type_3 *var_2;
  type_4 var_7;
  size_t var_9;
  int *piVar4;
  void *__src;
  int var_6;
  int var_5;
  void *local_2c;
  int var_11;
  
  psVar1 = id[0xd].pMethods;
  var_2 = id[0xc].pMethods;
  if ((var_1(var_10._4_4_,(int)psVar1) !=
      var_1(var_10._4_4_ - (int)psVar1,(type_4)((type_3 *)var_10 < var_2))) !=
      (int)((var_10._4_4_ - (int)psVar1) - (type_4)((type_3 *)var_10 < var_2)) < 0) {
    __src = (void *)((int)&((type_3 *)var_10)->iVersion +
                    (int)&(id[0x12].pMethods)->iVersion);
    var_5 = (var_3 >> 0x1f) + var_10._4_4_ + (type_4)var_4(var_3,(type_4)(type_3 *)var_10);
    var_7 = (type_4)(var_2 < (type_3 *)
                            ((int)&((type_3 *)var_10)->iVersion + var_3));
    var_6 = (int)psVar1 - var_5;
    if ((var_1((int)psVar1,var_5) != var_1(var_6,var_7)) == (int)(var_6 - var_7) < 0) {
      var_8(pBuf,__src,var_3);
      return 0;
    }
    var_9 = (int)var_2 - (int)(type_3 *)var_10;
    var_8(pBuf,__src,var_9);
    pBuf = (void *)((int)pBuf + var_9);
    var_3 = var_3 - var_9;
    var_10 = var_10 + (int)var_9;
  }
  var_11 = 0;
  local_2c = pBuf;
  var_6 = var_3;
LAB_00023f1c:
  do {
    var_5 = (*aSyscall[10].pCurrent)
                      (id[3].pMethods,local_2c,var_6,(int)var_10,(int)((type_5)var_10 >> 0x20));
    if (var_6 == var_5) {
      var_11 = var_11 + var_6;
      if (var_3 == var_11) {
        return 0;
      }
      if (var_11 < 0) {
        return 0x10a;
      }
LAB_00023ff6:
      id[5].pMethods = (type_3 *)0x0;
      var_12((void *)(var_11 + (int)pBuf),0,var_3 - var_11);
      return 0x20a;
    }
    if (-1 < var_5) {
      if (var_5 == 0) {
        if (var_3 == var_11) {
          return 0;
        }
        goto LAB_00023ff6;
      }
      var_6 = var_6 - var_5;
      var_10 = var_10 + var_5;
      var_11 = var_11 + var_5;
      local_2c = (void *)((int)local_2c + var_5);
      goto LAB_00023f1c;
    }
    piVar4 = var_13();
    if ((type_3 *)*piVar4 != (type_3 *)&DAT_00000004) {
      id[5].pMethods = (type_3 *)*piVar4;
      if (var_3 != var_5) {
        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: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator 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: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))))))) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (identifier))))))) right: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) right: (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (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: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (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: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (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: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) 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))))) (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: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (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: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (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: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier)))))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (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)))))))

/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

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

{
  int iVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  int *piVar5;
  void *__src;
  int iVar6;
  bool bVar7;
  void *local_2c;
  uint local_28;
  
  iVar1 = *(int *)(param_1 + 0x34);
  uVar3 = *(uint *)(param_1 + 0x30);
  if ((SBORROW4(param_5,iVar1) != SBORROW4(param_5 - iVar1,(uint)(param_4 < uVar3))) !=
      (int)((param_5 - iVar1) - (uint)(param_4 < uVar3)) < 0) {
    __src = (void *)(*(int *)(param_1 + 0x48) + param_4);
    iVar6 = ((int)param_3 >> 0x1f) + param_5 + (uint)CARRY4(param_3,param_4);
    uVar4 = (uint)(uVar3 < param_3 + param_4);
    iVar2 = iVar1 - iVar6;
    if ((SBORROW4(iVar1,iVar6) != SBORROW4(iVar2,uVar4)) == (int)(iVar2 - uVar4) < 0) {
      memcpy(param_2,__src,param_3);
      return 0;
    }
    uVar3 = uVar3 - param_4;
    memcpy(param_2,__src,uVar3);
    param_2 = (void *)((int)param_2 + uVar3);
    param_3 = param_3 - uVar3;
    bVar7 = CARRY4(param_4,uVar3);
    param_4 = param_4 + uVar3;
    param_5 = param_5 + ((int)uVar3 >> 0x1f) + (uint)bVar7;
  }
  local_28 = 0;
  local_2c = param_2;
  uVar3 = param_3;
LAB_00023f1c:
  do {
    uVar4 = (*(code *)PTR_pread64_0014c43c)
                      (*(undefined4 *)(param_1 + 0xc),local_2c,uVar3,param_4,param_5);
    if (uVar3 == uVar4) {
      local_28 = local_28 + uVar3;
      if (param_3 == local_28) {
        return 0;
      }
      if ((int)local_28 < 0) {
        return 0x10a;
      }
LAB_00023ff6:
      *(undefined4 *)(param_1 + 0x14) = 0;
      memset((void *)(local_28 + (int)param_2),0,param_3 - local_28);
      return 0x20a;
    }
    if (-1 < (int)uVar4) {
      if (uVar4 == 0) {
        if (param_3 == local_28) {
          return 0;
        }
        goto LAB_00023ff6;
      }
      uVar3 = uVar3 - uVar4;
      bVar7 = CARRY4(param_4,uVar4);
      param_4 = param_4 + uVar4;
      param_5 = param_5 + ((int)uVar4 >> 0x1f) + (uint)bVar7;
      local_28 = local_28 + uVar4;
      local_2c = (void *)((int)local_2c + uVar4);
      goto LAB_00023f1c;
    }
    piVar5 = __errno_location();
    if (*piVar5 != 4) {
      *(int *)(param_1 + 0x14) = *piVar5;
      if (param_3 != uVar4) {
        return 0x10a;
      }
      return 0;
    }
  } while( true );
}

