
int sqlite3VdbeMemGrow(Mem *pMem,int n,int bPreserve)

{
  ushort uVar1;
  int iVar2;
  char *pcVar3;
  sqlite3 *db;
  
  if (n < 0x20) {
    n = 0x20;
  }
  db = pMem->db;
  if (0 < pMem->szMalloc) {
    if ((bPreserve != 0) && (pMem->z == pMem->zMalloc)) {
      pcVar3 = (char *)sqlite3DbReallocOrFree(db,pMem->z,(long)n);
      pMem->zMalloc = pcVar3;
      pMem->z = pcVar3;
      if (pcVar3 == (char *)0x0) goto LAB_00138560;
      iVar2 = (*sqlite3Config.m.xSize)(pcVar3);
      pMem->szMalloc = iVar2;
      goto LAB_001384fa;
    }
    sqlite3DbFreeNN(db,pMem->zMalloc);
    db = pMem->db;
  }
  pcVar3 = (char *)sqlite3DbMallocRaw(db,(long)n);
  pMem->zMalloc = pcVar3;
  if (pcVar3 == (char *)0x0) {
LAB_00138560:
    if ((pMem->flags & 0x2400) == 0) {
      pMem->flags = 1;
    }
    else {
      vdbeMemClearExternAndSetNull(pMem);
    }
    pMem->z = (char *)0x0;
    pMem->szMalloc = 0;
    return 7;
  }
  iVar2 = (*sqlite3Config.m.xSize)(pcVar3);
  pMem->szMalloc = iVar2;
  if ((bPreserve != 0) && (pMem->z != (char *)0x0)) {
    memcpy(pMem->zMalloc,pMem->z,(long)pMem->n);
  }
LAB_001384fa:
  uVar1 = pMem->flags;
  if ((uVar1 & 0x400) != 0) {
    (*pMem->xDel)(pMem->z);
    uVar1 = pMem->flags;
  }
  pMem->flags = uVar1 & 0xe3ff;
  pMem->z = pMem->zMalloc;
  return 0;
}



undefined8 FUN_00138480(long param_1,int param_2,int param_3)

{
  ushort uVar1;
  undefined4 uVar2;
  long lVar3;
  undefined8 uVar4;
  
  if (param_2 < 0x20) {
    param_2 = 0x20;
  }
  uVar4 = *(undefined8 *)(param_1 + 0x28);
  if (0 < *(int *)(param_1 + 0x20)) {
    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {
      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);
      *(long *)(param_1 + 0x18) = lVar3;
      *(long *)(param_1 + 0x10) = lVar3;
      if (lVar3 == 0) goto LAB_00138560;
      uVar2 = (*DAT_0021f288)(lVar3);
      *(undefined4 *)(param_1 + 0x20) = uVar2;
      goto LAB_001384fa;
    }
    FUN_00119e90();
    uVar4 = *(undefined8 *)(param_1 + 0x28);
  }
  lVar3 = FUN_0011b8d0(uVar4,(long)param_2);
  *(long *)(param_1 + 0x18) = lVar3;
  if (lVar3 == 0) {
LAB_00138560:
    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {
      *(undefined2 *)(param_1 + 8) = 1;
    }
    else {
      FUN_00119fd0(param_1);
    }
    *(undefined8 *)(param_1 + 0x10) = 0;
    *(undefined4 *)(param_1 + 0x20) = 0;
    return 7;
  }
  uVar2 = (*DAT_0021f288)(lVar3);
  *(undefined4 *)(param_1 + 0x20) = uVar2;
  if ((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)) {
    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));
  }
LAB_001384fa:
  uVar1 = *(ushort *)(param_1 + 8);
  if ((uVar1 & 0x400) != 0) {
    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));
    uVar1 = *(ushort *)(param_1 + 8);
  }
  *(ushort *)(param_1 + 8) = uVar1 & 0xe3ff;
  *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18);
  return 0;
}


PUSH R12
CMP ESI,0x20
MOV R12D,EDX
MOV EDX,0x20
PUSH RBP
CMOVL ESI,EDX
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x28]
MOV EDX,dword ptr [RBX + 0x20]
MOVSXD RBP,ESI
TEST EDX,EDX
JLE 0x001384be
MOV RSI,qword ptr [RBX + 0x18]
TEST R12D,R12D
JZ 0x001384b5
MOV RAX,qword ptr [RBX + 0x10]
CMP RAX,RSI
JZ 0x00138530
CALL 0x00119e90
MOV RDI,qword ptr [RBX + 0x28]
MOV RSI,RBP
CALL 0x0011b8d0
MOV qword ptr [RBX + 0x18],RAX
TEST RAX,RAX
JZ 0x00138560
MOV RDI,RAX
CALL qword ptr [0x0021f288]
MOV dword ptr [RBX + 0x20],EAX
TEST R12D,R12D
JZ 0x001384fa
MOV RSI,qword ptr [RBX + 0x10]
TEST RSI,RSI
JZ 0x001384fa
MOV RDI,qword ptr [RBX + 0x18]
MOVSXD RDX,dword ptr [RBX + 0xc]
CALL 0x0010a240
MOVZX EAX,word ptr [RBX + 0x8]
TEST AH,0x4
JNZ 0x00138520
MOV RDX,qword ptr [RBX + 0x18]
AND AH,0xe3
MOV word ptr [RBX + 0x8],AX
XOR EAX,EAX
MOV qword ptr [RBX + 0x10],RDX
POP RBX
POP RBP
POP R12
RET
MOV RDI,qword ptr [RBX + 0x10]
CALL qword ptr [RBX + 0x30]
MOVZX EAX,word ptr [RBX + 0x8]
JMP 0x00138503
MOV RDX,RBP
MOV RSI,RAX
CALL 0x00138430
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RBX + 0x10],RAX
TEST RAX,RAX
JZ 0x00138560
MOV RDI,RAX
CALL qword ptr [0x0021f288]
MOV dword ptr [RBX + 0x20],EAX
JMP 0x001384fa
TEST word ptr [RBX + 0x8],0x2400
JNZ 0x00138590
MOV EAX,0x1
MOV word ptr [RBX + 0x8],AX
MOV qword ptr [RBX + 0x10],0x0
MOV EAX,0x7
MOV dword ptr [RBX + 0x20],0x0
POP RBX
POP RBP
POP R12
RET
MOV RDI,RBX
CALL 0x00119fd0
JMP 0x00138571
(translation_unit "undefined8 FUN_00138480(long param_1,int param_2,int param_3)\n\n{\n  ushort uVar1;\n  undefined4 uVar2;\n  long lVar3;\n  undefined8 uVar4;\n  \n  if (param_2 < 0x20) {\n    param_2 = 0x20;\n  }\n  uVar4 = *(undefined8 *)(param_1 + 0x28);\n  if (0 < *(int *)(param_1 + 0x20)) {\n    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }\n    FUN_00119e90();\n    uVar4 = *(undefined8 *)(param_1 + 0x28);\n  }\n  lVar3 = FUN_0011b8d0(uVar4,(long)param_2);\n  *(long *)(param_1 + 0x18) = lVar3;\n  if (lVar3 == 0) {\nLAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }\n    *(undefined8 *)(param_1 + 0x10) = 0;\n    *(undefined4 *)(param_1 + 0x20) = 0;\n    return 7;\n  }\n  uVar2 = (*DAT_0021f288)(lVar3);\n  *(undefined4 *)(param_1 + 0x20) = uVar2;\n  if ((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)) {\n    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));\n  }\nLAB_001384fa:\n  uVar1 = *(ushort *)(param_1 + 8);\n  if ((uVar1 & 0x400) != 0) {\n    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));\n    uVar1 = *(ushort *)(param_1 + 8);\n  }\n  *(ushort *)(param_1 + 8) = uVar1 & 0xe3ff;\n  *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18);\n  return 0;\n}\n\n" (function_definition "undefined8 FUN_00138480(long param_1,int param_2,int param_3)\n\n{\n  ushort uVar1;\n  undefined4 uVar2;\n  long lVar3;\n  undefined8 uVar4;\n  \n  if (param_2 < 0x20) {\n    param_2 = 0x20;\n  }\n  uVar4 = *(undefined8 *)(param_1 + 0x28);\n  if (0 < *(int *)(param_1 + 0x20)) {\n    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }\n    FUN_00119e90();\n    uVar4 = *(undefined8 *)(param_1 + 0x28);\n  }\n  lVar3 = FUN_0011b8d0(uVar4,(long)param_2);\n  *(long *)(param_1 + 0x18) = lVar3;\n  if (lVar3 == 0) {\nLAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }\n    *(undefined8 *)(param_1 + 0x10) = 0;\n    *(undefined4 *)(param_1 + 0x20) = 0;\n    return 7;\n  }\n  uVar2 = (*DAT_0021f288)(lVar3);\n  *(undefined4 *)(param_1 + 0x20) = uVar2;\n  if ((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)) {\n    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));\n  }\nLAB_001384fa:\n  uVar1 = *(ushort *)(param_1 + 8);\n  if ((uVar1 & 0x400) != 0) {\n    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));\n    uVar1 = *(ushort *)(param_1 + 8);\n  }\n  *(ushort *)(param_1 + 8) = uVar1 & 0xe3ff;\n  *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18);\n  return 0;\n}" type_identifier (function_declarator "FUN_00138480(long param_1,int param_2,int param_3)" identifier (parameter_list "(long param_1,int param_2,int param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  ushort uVar1;\n  undefined4 uVar2;\n  long lVar3;\n  undefined8 uVar4;\n  \n  if (param_2 < 0x20) {\n    param_2 = 0x20;\n  }\n  uVar4 = *(undefined8 *)(param_1 + 0x28);\n  if (0 < *(int *)(param_1 + 0x20)) {\n    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }\n    FUN_00119e90();\n    uVar4 = *(undefined8 *)(param_1 + 0x28);\n  }\n  lVar3 = FUN_0011b8d0(uVar4,(long)param_2);\n  *(long *)(param_1 + 0x18) = lVar3;\n  if (lVar3 == 0) {\nLAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }\n    *(undefined8 *)(param_1 + 0x10) = 0;\n    *(undefined4 *)(param_1 + 0x20) = 0;\n    return 7;\n  }\n  uVar2 = (*DAT_0021f288)(lVar3);\n  *(undefined4 *)(param_1 + 0x20) = uVar2;\n  if ((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)) {\n    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));\n  }\nLAB_001384fa:\n  uVar1 = *(ushort *)(param_1 + 8);\n  if ((uVar1 & 0x400) != 0) {\n    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));\n    uVar1 = *(ushort *)(param_1 + 8);\n  }\n  *(ushort *)(param_1 + 8) = uVar1 & 0xe3ff;\n  *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18);\n  return 0;\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (if_statement "if (param_2 < 0x20) {\n    param_2 = 0x20;\n  }" if (parenthesized_expression "(param_2 < 0x20)" ( (binary_expression "param_2 < 0x20" identifier < number_literal) )) (compound_statement "{\n    param_2 = 0x20;\n  }" { (expression_statement "param_2 = 0x20;" (assignment_expression "param_2 = 0x20" identifier = number_literal) ;) })) (expression_statement "uVar4 = *(undefined8 *)(param_1 + 0x28);" (assignment_expression "uVar4 = *(undefined8 *)(param_1 + 0x28)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0x28)" * (cast_expression "(undefined8 *)(param_1 + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (0 < *(int *)(param_1 + 0x20)) {\n    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }\n    FUN_00119e90();\n    uVar4 = *(undefined8 *)(param_1 + 0x28);\n  }" if (parenthesized_expression "(0 < *(int *)(param_1 + 0x20))" ( (binary_expression "0 < *(int *)(param_1 + 0x20)" number_literal < (pointer_expression "*(int *)(param_1 + 0x20)" * (cast_expression "(int *)(param_1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) ))))) )) (compound_statement "{\n    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }\n    FUN_00119e90();\n    uVar4 = *(undefined8 *)(param_1 + 0x28);\n  }" { (if_statement "if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }" if (parenthesized_expression "((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18)))" ( (binary_expression "(param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))" (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) && (parenthesized_expression "(*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))" ( (binary_expression "*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18)" (pointer_expression "*(long *)(param_1 + 0x10)" * (cast_expression "(long *)(param_1 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) == (pointer_expression "*(long *)(param_1 + 0x18)" * (cast_expression "(long *)(param_1 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }" { (expression_statement "lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);" (assignment_expression "lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2)" identifier = (call_expression "FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2)" identifier (argument_list "(uVar4,*(long *)(param_1 + 0x10),(long)param_2)" ( identifier , (pointer_expression "*(long *)(param_1 + 0x10)" * (cast_expression "(long *)(param_1 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) , (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) )))) ;) (expression_statement "*(long *)(param_1 + 0x18) = lVar3;" (assignment_expression "*(long *)(param_1 + 0x18) = lVar3" (pointer_expression "*(long *)(param_1 + 0x18)" * (cast_expression "(long *)(param_1 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(param_1 + 0x10) = lVar3;" (assignment_expression "*(long *)(param_1 + 0x10) = lVar3" (pointer_expression "*(long *)(param_1 + 0x10)" * (cast_expression "(long *)(param_1 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) (if_statement "if (lVar3 == 0) goto LAB_00138560;" if (parenthesized_expression "(lVar3 == 0)" ( (binary_expression "lVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00138560;" goto statement_identifier ;)) (expression_statement "uVar2 = (*DAT_0021f288)(lVar3);" (assignment_expression "uVar2 = (*DAT_0021f288)(lVar3)" identifier = (call_expression "(*DAT_0021f288)(lVar3)" (parenthesized_expression "(*DAT_0021f288)" ( (pointer_expression "*DAT_0021f288" * identifier) )) (argument_list "(lVar3)" ( identifier )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x20) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) (goto_statement "goto LAB_001384fa;" goto statement_identifier ;) })) (expression_statement "FUN_00119e90();" (call_expression "FUN_00119e90()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar4 = *(undefined8 *)(param_1 + 0x28);" (assignment_expression "uVar4 = *(undefined8 *)(param_1 + 0x28)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0x28)" * (cast_expression "(undefined8 *)(param_1 + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) ;) })) (expression_statement "lVar3 = FUN_0011b8d0(uVar4,(long)param_2);" (assignment_expression "lVar3 = FUN_0011b8d0(uVar4,(long)param_2)" identifier = (call_expression "FUN_0011b8d0(uVar4,(long)param_2)" identifier (argument_list "(uVar4,(long)param_2)" ( identifier , (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) )))) ;) (expression_statement "*(long *)(param_1 + 0x18) = lVar3;" (assignment_expression "*(long *)(param_1 + 0x18) = lVar3" (pointer_expression "*(long *)(param_1 + 0x18)" * (cast_expression "(long *)(param_1 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) (if_statement "if (lVar3 == 0) {\nLAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }\n    *(undefined8 *)(param_1 + 0x10) = 0;\n    *(undefined4 *)(param_1 + 0x20) = 0;\n    return 7;\n  }" if (parenthesized_expression "(lVar3 == 0)" ( (binary_expression "lVar3 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }\n    *(undefined8 *)(param_1 + 0x10) = 0;\n    *(undefined4 *)(param_1 + 0x20) = 0;\n    return 7;\n  }" { (labeled_statement "LAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }" statement_identifier : (if_statement "if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }" if (parenthesized_expression "((*(ushort *)(param_1 + 8) & 0x2400) == 0)" ( (binary_expression "(*(ushort *)(param_1 + 8) & 0x2400) == 0" (parenthesized_expression "(*(ushort *)(param_1 + 8) & 0x2400)" ( (binary_expression "*(ushort *)(param_1 + 8) & 0x2400" (pointer_expression "*(ushort *)(param_1 + 8)" * (cast_expression "(ushort *)(param_1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      *(undefined2 *)(param_1 + 8) = 1;\n    }" { (expression_statement "*(undefined2 *)(param_1 + 8) = 1;" (assignment_expression "*(undefined2 *)(param_1 + 8) = 1" (pointer_expression "*(undefined2 *)(param_1 + 8)" * (cast_expression "(undefined2 *)(param_1 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n      FUN_00119fd0(param_1);\n    }" else (compound_statement "{\n      FUN_00119fd0(param_1);\n    }" { (expression_statement "FUN_00119fd0(param_1);" (call_expression "FUN_00119fd0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })))) (expression_statement "*(undefined8 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x10)" * (cast_expression "(undefined8 *)(param_1 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x20) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = number_literal) ;) (return_statement "return 7;" return number_literal ;) })) (expression_statement "uVar2 = (*DAT_0021f288)(lVar3);" (assignment_expression "uVar2 = (*DAT_0021f288)(lVar3)" identifier = (call_expression "(*DAT_0021f288)(lVar3)" (parenthesized_expression "(*DAT_0021f288)" ( (pointer_expression "*DAT_0021f288" * identifier) )) (argument_list "(lVar3)" ( identifier )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x20) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)) {\n    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));\n  }" if (parenthesized_expression "((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0))" ( (binary_expression "(param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)" (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) && (parenthesized_expression "(*(void **)(param_1 + 0x10) != (void *)0x0)" ( (binary_expression "*(void **)(param_1 + 0x10) != (void *)0x0" (pointer_expression "*(void **)(param_1 + 0x10)" * (cast_expression "(void **)(param_1 + 0x10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));\n  }" { (expression_statement "memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));" (call_expression "memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc))" identifier (argument_list "(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc))" ( (pointer_expression "*(void **)(param_1 + 0x18)" * (cast_expression "(void **)(param_1 + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) , (pointer_expression "*(void **)(param_1 + 0x10)" * (cast_expression "(void **)(param_1 + 0x10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) , (cast_expression "(long)*(int *)(param_1 + 0xc)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ))) ;) })) (labeled_statement "LAB_001384fa:\n  uVar1 = *(ushort *)(param_1 + 8);" statement_identifier : (expression_statement "uVar1 = *(ushort *)(param_1 + 8);" (assignment_expression "uVar1 = *(ushort *)(param_1 + 8)" identifier = (pointer_expression "*(ushort *)(param_1 + 8)" * (cast_expression "(ushort *)(param_1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;)) (if_statement "if ((uVar1 & 0x400) != 0) {\n    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));\n    uVar1 = *(ushort *)(param_1 + 8);\n  }" if (parenthesized_expression "((uVar1 & 0x400) != 0)" ( (binary_expression "(uVar1 & 0x400) != 0" (parenthesized_expression "(uVar1 & 0x400)" ( (binary_expression "uVar1 & 0x400" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));\n    uVar1 = *(ushort *)(param_1 + 8);\n  }" { (expression_statement "(**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));" (call_expression "(**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10))" (parenthesized_expression "(**(code **)(param_1 + 0x30))" ( (pointer_expression "**(code **)(param_1 + 0x30)" * (pointer_expression "*(code **)(param_1 + 0x30)" * (cast_expression "(code **)(param_1 + 0x30)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) )) (argument_list "(*(undefined8 *)(param_1 + 0x10))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x10)" * (cast_expression "(undefined8 *)(param_1 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) ))) ;) (expression_statement "uVar1 = *(ushort *)(param_1 + 8);" (assignment_expression "uVar1 = *(ushort *)(param_1 + 8)" identifier = (pointer_expression "*(ushort *)(param_1 + 8)" * (cast_expression "(ushort *)(param_1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) })) (expression_statement "*(ushort *)(param_1 + 8) = uVar1 & 0xe3ff;" (assignment_expression "*(ushort *)(param_1 + 8) = uVar1 & 0xe3ff" (pointer_expression "*(ushort *)(param_1 + 8)" * (cast_expression "(ushort *)(param_1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = (binary_expression "uVar1 & 0xe3ff" identifier & number_literal)) ;) (expression_statement "*(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18);" (assignment_expression "*(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18)" (pointer_expression "*(undefined8 *)(param_1 + 0x10)" * (cast_expression "(undefined8 *)(param_1 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = (pointer_expression "*(undefined8 *)(param_1 + 0x18)" * (cast_expression "(undefined8 *)(param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int sqlite3VdbeMemGrow(Mem *pMem,int n,int bPreserve)\n\n{\n  ushort uVar1;\n  int iVar2;\n  char *pcVar3;\n  sqlite3 *db;\n  \n  if (n < 0x20) {\n    n = 0x20;\n  }\n  db = pMem->db;\n  if (0 < pMem->szMalloc) {\n    if ((bPreserve != 0) && (pMem->z == pMem->zMalloc)) {\n      pcVar3 = (char *)sqlite3DbReallocOrFree(db,pMem->z,(long)n);\n      pMem->zMalloc = pcVar3;\n      pMem->z = pcVar3;\n      if (pcVar3 == (char *)0x0) goto LAB_00138560;\n      iVar2 = (*sqlite3Config.m.xSize)(pcVar3);\n      pMem->szMalloc = iVar2;\n      goto LAB_001384fa;\n    }\n    sqlite3DbFreeNN(db,pMem->zMalloc);\n    db = pMem->db;\n  }\n  pcVar3 = (char *)sqlite3DbMallocRaw(db,(long)n);\n  pMem->zMalloc = pcVar3;\n  if (pcVar3 == (char *)0x0) {\nLAB_00138560:\n    if ((pMem->flags & 0x2400) == 0) {\n      pMem->flags = 1;\n    }\n    else {\n      vdbeMemClearExternAndSetNull(pMem);\n    }\n    pMem->z = (char *)0x0;\n    pMem->szMalloc = 0;\n    return 7;\n  }\n  iVar2 = (*sqlite3Config.m.xSize)(pcVar3);\n  pMem->szMalloc = iVar2;\n  if ((bPreserve != 0) && (pMem->z != (char *)0x0)) {\n    memcpy(pMem->zMalloc,pMem->z,(long)pMem->n);\n  }\nLAB_001384fa:\n  uVar1 = pMem->flags;\n  if ((uVar1 & 0x400) != 0) {\n    (*pMem->xDel)(pMem->z);\n    uVar1 = pMem->flags;\n  }\n  pMem->flags = uVar1 & 0xe3ff;\n  pMem->z = pMem->zMalloc;\n  return 0;\n}\n\n" (function_definition "int sqlite3VdbeMemGrow(Mem *pMem,int n,int bPreserve)\n\n{\n  ushort uVar1;\n  int iVar2;\n  char *pcVar3;\n  sqlite3 *db;\n  \n  if (n < 0x20) {\n    n = 0x20;\n  }\n  db = pMem->db;\n  if (0 < pMem->szMalloc) {\n    if ((bPreserve != 0) && (pMem->z == pMem->zMalloc)) {\n      pcVar3 = (char *)sqlite3DbReallocOrFree(db,pMem->z,(long)n);\n      pMem->zMalloc = pcVar3;\n      pMem->z = pcVar3;\n      if (pcVar3 == (char *)0x0) goto LAB_00138560;\n      iVar2 = (*sqlite3Config.m.xSize)(pcVar3);\n      pMem->szMalloc = iVar2;\n      goto LAB_001384fa;\n    }\n    sqlite3DbFreeNN(db,pMem->zMalloc);\n    db = pMem->db;\n  }\n  pcVar3 = (char *)sqlite3DbMallocRaw(db,(long)n);\n  pMem->zMalloc = pcVar3;\n  if (pcVar3 == (char *)0x0) {\nLAB_00138560:\n    if ((pMem->flags & 0x2400) == 0) {\n      pMem->flags = 1;\n    }\n    else {\n      vdbeMemClearExternAndSetNull(pMem);\n    }\n    pMem->z = (char *)0x0;\n    pMem->szMalloc = 0;\n    return 7;\n  }\n  iVar2 = (*sqlite3Config.m.xSize)(pcVar3);\n  pMem->szMalloc = iVar2;\n  if ((bPreserve != 0) && (pMem->z != (char *)0x0)) {\n    memcpy(pMem->zMalloc,pMem->z,(long)pMem->n);\n  }\nLAB_001384fa:\n  uVar1 = pMem->flags;\n  if ((uVar1 & 0x400) != 0) {\n    (*pMem->xDel)(pMem->z);\n    uVar1 = pMem->flags;\n  }\n  pMem->flags = uVar1 & 0xe3ff;\n  pMem->z = pMem->zMalloc;\n  return 0;\n}" primitive_type (function_declarator "sqlite3VdbeMemGrow(Mem *pMem,int n,int bPreserve)" identifier (parameter_list "(Mem *pMem,int n,int bPreserve)" ( (parameter_declaration "Mem *pMem" type_identifier (pointer_declarator "*pMem" * identifier)) , (parameter_declaration "int n" primitive_type identifier) , (parameter_declaration "int bPreserve" primitive_type identifier) ))) (compound_statement "{\n  ushort uVar1;\n  int iVar2;\n  char *pcVar3;\n  sqlite3 *db;\n  \n  if (n < 0x20) {\n    n = 0x20;\n  }\n  db = pMem->db;\n  if (0 < pMem->szMalloc) {\n    if ((bPreserve != 0) && (pMem->z == pMem->zMalloc)) {\n      pcVar3 = (char *)sqlite3DbReallocOrFree(db,pMem->z,(long)n);\n      pMem->zMalloc = pcVar3;\n      pMem->z = pcVar3;\n      if (pcVar3 == (char *)0x0) goto LAB_00138560;\n      iVar2 = (*sqlite3Config.m.xSize)(pcVar3);\n      pMem->szMalloc = iVar2;\n      goto LAB_001384fa;\n    }\n    sqlite3DbFreeNN(db,pMem->zMalloc);\n    db = pMem->db;\n  }\n  pcVar3 = (char *)sqlite3DbMallocRaw(db,(long)n);\n  pMem->zMalloc = pcVar3;\n  if (pcVar3 == (char *)0x0) {\nLAB_00138560:\n    if ((pMem->flags & 0x2400) == 0) {\n      pMem->flags = 1;\n    }\n    else {\n      vdbeMemClearExternAndSetNull(pMem);\n    }\n    pMem->z = (char *)0x0;\n    pMem->szMalloc = 0;\n    return 7;\n  }\n  iVar2 = (*sqlite3Config.m.xSize)(pcVar3);\n  pMem->szMalloc = iVar2;\n  if ((bPreserve != 0) && (pMem->z != (char *)0x0)) {\n    memcpy(pMem->zMalloc,pMem->z,(long)pMem->n);\n  }\nLAB_001384fa:\n  uVar1 = pMem->flags;\n  if ((uVar1 & 0x400) != 0) {\n    (*pMem->xDel)(pMem->z);\n    uVar1 = pMem->flags;\n  }\n  pMem->flags = uVar1 & 0xe3ff;\n  pMem->z = pMem->zMalloc;\n  return 0;\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "sqlite3 *db;" type_identifier (pointer_declarator "*db" * identifier) ;) (if_statement "if (n < 0x20) {\n    n = 0x20;\n  }" if (parenthesized_expression "(n < 0x20)" ( (binary_expression "n < 0x20" identifier < number_literal) )) (compound_statement "{\n    n = 0x20;\n  }" { (expression_statement "n = 0x20;" (assignment_expression "n = 0x20" identifier = number_literal) ;) })) (expression_statement "db = pMem->db;" (assignment_expression "db = pMem->db" identifier = (field_expression "pMem->db" identifier -> field_identifier)) ;) (if_statement "if (0 < pMem->szMalloc) {\n    if ((bPreserve != 0) && (pMem->z == pMem->zMalloc)) {\n      pcVar3 = (char *)sqlite3DbReallocOrFree(db,pMem->z,(long)n);\n      pMem->zMalloc = pcVar3;\n      pMem->z = pcVar3;\n      if (pcVar3 == (char *)0x0) goto LAB_00138560;\n      iVar2 = (*sqlite3Config.m.xSize)(pcVar3);\n      pMem->szMalloc = iVar2;\n      goto LAB_001384fa;\n    }\n    sqlite3DbFreeNN(db,pMem->zMalloc);\n    db = pMem->db;\n  }" if (parenthesized_expression "(0 < pMem->szMalloc)" ( (binary_expression "0 < pMem->szMalloc" number_literal < (field_expression "pMem->szMalloc" identifier -> field_identifier)) )) (compound_statement "{\n    if ((bPreserve != 0) && (pMem->z == pMem->zMalloc)) {\n      pcVar3 = (char *)sqlite3DbReallocOrFree(db,pMem->z,(long)n);\n      pMem->zMalloc = pcVar3;\n      pMem->z = pcVar3;\n      if (pcVar3 == (char *)0x0) goto LAB_00138560;\n      iVar2 = (*sqlite3Config.m.xSize)(pcVar3);\n      pMem->szMalloc = iVar2;\n      goto LAB_001384fa;\n    }\n    sqlite3DbFreeNN(db,pMem->zMalloc);\n    db = pMem->db;\n  }" { (if_statement "if ((bPreserve != 0) && (pMem->z == pMem->zMalloc)) {\n      pcVar3 = (char *)sqlite3DbReallocOrFree(db,pMem->z,(long)n);\n      pMem->zMalloc = pcVar3;\n      pMem->z = pcVar3;\n      if (pcVar3 == (char *)0x0) goto LAB_00138560;\n      iVar2 = (*sqlite3Config.m.xSize)(pcVar3);\n      pMem->szMalloc = iVar2;\n      goto LAB_001384fa;\n    }" if (parenthesized_expression "((bPreserve != 0) && (pMem->z == pMem->zMalloc))" ( (binary_expression "(bPreserve != 0) && (pMem->z == pMem->zMalloc)" (parenthesized_expression "(bPreserve != 0)" ( (binary_expression "bPreserve != 0" identifier != number_literal) )) && (parenthesized_expression "(pMem->z == pMem->zMalloc)" ( (binary_expression "pMem->z == pMem->zMalloc" (field_expression "pMem->z" identifier -> field_identifier) == (field_expression "pMem->zMalloc" identifier -> field_identifier)) ))) )) (compound_statement "{\n      pcVar3 = (char *)sqlite3DbReallocOrFree(db,pMem->z,(long)n);\n      pMem->zMalloc = pcVar3;\n      pMem->z = pcVar3;\n      if (pcVar3 == (char *)0x0) goto LAB_00138560;\n      iVar2 = (*sqlite3Config.m.xSize)(pcVar3);\n      pMem->szMalloc = iVar2;\n      goto LAB_001384fa;\n    }" { (expression_statement "pcVar3 = (char *)sqlite3DbReallocOrFree(db,pMem->z,(long)n);" (assignment_expression "pcVar3 = (char *)sqlite3DbReallocOrFree(db,pMem->z,(long)n)" identifier = (cast_expression "(char *)sqlite3DbReallocOrFree(db,pMem->z,(long)n)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3DbReallocOrFree(db,pMem->z,(long)n)" identifier (argument_list "(db,pMem->z,(long)n)" ( identifier , (field_expression "pMem->z" identifier -> field_identifier) , (cast_expression "(long)n" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))))) ;) (expression_statement "pMem->zMalloc = pcVar3;" (assignment_expression "pMem->zMalloc = pcVar3" (field_expression "pMem->zMalloc" identifier -> field_identifier) = identifier) ;) (expression_statement "pMem->z = pcVar3;" (assignment_expression "pMem->z = pcVar3" (field_expression "pMem->z" identifier -> field_identifier) = identifier) ;) (if_statement "if (pcVar3 == (char *)0x0) goto LAB_00138560;" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00138560;" goto statement_identifier ;)) (expression_statement "iVar2 = (*sqlite3Config.m.xSize)(pcVar3);" (assignment_expression "iVar2 = (*sqlite3Config.m.xSize)(pcVar3)" identifier = (call_expression "(*sqlite3Config.m.xSize)(pcVar3)" (parenthesized_expression "(*sqlite3Config.m.xSize)" ( (pointer_expression "*sqlite3Config.m.xSize" * (field_expression "sqlite3Config.m.xSize" (field_expression "sqlite3Config.m" identifier . field_identifier) . field_identifier)) )) (argument_list "(pcVar3)" ( identifier )))) ;) (expression_statement "pMem->szMalloc = iVar2;" (assignment_expression "pMem->szMalloc = iVar2" (field_expression "pMem->szMalloc" identifier -> field_identifier) = identifier) ;) (goto_statement "goto LAB_001384fa;" goto statement_identifier ;) })) (expression_statement "sqlite3DbFreeNN(db,pMem->zMalloc);" (call_expression "sqlite3DbFreeNN(db,pMem->zMalloc)" identifier (argument_list "(db,pMem->zMalloc)" ( identifier , (field_expression "pMem->zMalloc" identifier -> field_identifier) ))) ;) (expression_statement "db = pMem->db;" (assignment_expression "db = pMem->db" identifier = (field_expression "pMem->db" identifier -> field_identifier)) ;) })) (expression_statement "pcVar3 = (char *)sqlite3DbMallocRaw(db,(long)n);" (assignment_expression "pcVar3 = (char *)sqlite3DbMallocRaw(db,(long)n)" identifier = (cast_expression "(char *)sqlite3DbMallocRaw(db,(long)n)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3DbMallocRaw(db,(long)n)" identifier (argument_list "(db,(long)n)" ( identifier , (cast_expression "(long)n" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) ))))) ;) (expression_statement "pMem->zMalloc = pcVar3;" (assignment_expression "pMem->zMalloc = pcVar3" (field_expression "pMem->zMalloc" identifier -> field_identifier) = identifier) ;) (if_statement "if (pcVar3 == (char *)0x0) {\nLAB_00138560:\n    if ((pMem->flags & 0x2400) == 0) {\n      pMem->flags = 1;\n    }\n    else {\n      vdbeMemClearExternAndSetNull(pMem);\n    }\n    pMem->z = (char *)0x0;\n    pMem->szMalloc = 0;\n    return 7;\n  }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_00138560:\n    if ((pMem->flags & 0x2400) == 0) {\n      pMem->flags = 1;\n    }\n    else {\n      vdbeMemClearExternAndSetNull(pMem);\n    }\n    pMem->z = (char *)0x0;\n    pMem->szMalloc = 0;\n    return 7;\n  }" { (labeled_statement "LAB_00138560:\n    if ((pMem->flags & 0x2400) == 0) {\n      pMem->flags = 1;\n    }\n    else {\n      vdbeMemClearExternAndSetNull(pMem);\n    }" statement_identifier : (if_statement "if ((pMem->flags & 0x2400) == 0) {\n      pMem->flags = 1;\n    }\n    else {\n      vdbeMemClearExternAndSetNull(pMem);\n    }" if (parenthesized_expression "((pMem->flags & 0x2400) == 0)" ( (binary_expression "(pMem->flags & 0x2400) == 0" (parenthesized_expression "(pMem->flags & 0x2400)" ( (binary_expression "pMem->flags & 0x2400" (field_expression "pMem->flags" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n      pMem->flags = 1;\n    }" { (expression_statement "pMem->flags = 1;" (assignment_expression "pMem->flags = 1" (field_expression "pMem->flags" identifier -> field_identifier) = number_literal) ;) }) (else_clause "else {\n      vdbeMemClearExternAndSetNull(pMem);\n    }" else (compound_statement "{\n      vdbeMemClearExternAndSetNull(pMem);\n    }" { (expression_statement "vdbeMemClearExternAndSetNull(pMem);" (call_expression "vdbeMemClearExternAndSetNull(pMem)" identifier (argument_list "(pMem)" ( identifier ))) ;) })))) (expression_statement "pMem->z = (char *)0x0;" (assignment_expression "pMem->z = (char *)0x0" (field_expression "pMem->z" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pMem->szMalloc = 0;" (assignment_expression "pMem->szMalloc = 0" (field_expression "pMem->szMalloc" identifier -> field_identifier) = number_literal) ;) (return_statement "return 7;" return number_literal ;) })) (expression_statement "iVar2 = (*sqlite3Config.m.xSize)(pcVar3);" (assignment_expression "iVar2 = (*sqlite3Config.m.xSize)(pcVar3)" identifier = (call_expression "(*sqlite3Config.m.xSize)(pcVar3)" (parenthesized_expression "(*sqlite3Config.m.xSize)" ( (pointer_expression "*sqlite3Config.m.xSize" * (field_expression "sqlite3Config.m.xSize" (field_expression "sqlite3Config.m" identifier . field_identifier) . field_identifier)) )) (argument_list "(pcVar3)" ( identifier )))) ;) (expression_statement "pMem->szMalloc = iVar2;" (assignment_expression "pMem->szMalloc = iVar2" (field_expression "pMem->szMalloc" identifier -> field_identifier) = identifier) ;) (if_statement "if ((bPreserve != 0) && (pMem->z != (char *)0x0)) {\n    memcpy(pMem->zMalloc,pMem->z,(long)pMem->n);\n  }" if (parenthesized_expression "((bPreserve != 0) && (pMem->z != (char *)0x0))" ( (binary_expression "(bPreserve != 0) && (pMem->z != (char *)0x0)" (parenthesized_expression "(bPreserve != 0)" ( (binary_expression "bPreserve != 0" identifier != number_literal) )) && (parenthesized_expression "(pMem->z != (char *)0x0)" ( (binary_expression "pMem->z != (char *)0x0" (field_expression "pMem->z" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    memcpy(pMem->zMalloc,pMem->z,(long)pMem->n);\n  }" { (expression_statement "memcpy(pMem->zMalloc,pMem->z,(long)pMem->n);" (call_expression "memcpy(pMem->zMalloc,pMem->z,(long)pMem->n)" identifier (argument_list "(pMem->zMalloc,pMem->z,(long)pMem->n)" ( (field_expression "pMem->zMalloc" identifier -> field_identifier) , (field_expression "pMem->z" identifier -> field_identifier) , (cast_expression "(long)pMem->n" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (field_expression "pMem->n" identifier -> field_identifier)) ))) ;) })) (labeled_statement "LAB_001384fa:\n  uVar1 = pMem->flags;" statement_identifier : (expression_statement "uVar1 = pMem->flags;" (assignment_expression "uVar1 = pMem->flags" identifier = (field_expression "pMem->flags" identifier -> field_identifier)) ;)) (if_statement "if ((uVar1 & 0x400) != 0) {\n    (*pMem->xDel)(pMem->z);\n    uVar1 = pMem->flags;\n  }" if (parenthesized_expression "((uVar1 & 0x400) != 0)" ( (binary_expression "(uVar1 & 0x400) != 0" (parenthesized_expression "(uVar1 & 0x400)" ( (binary_expression "uVar1 & 0x400" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    (*pMem->xDel)(pMem->z);\n    uVar1 = pMem->flags;\n  }" { (expression_statement "(*pMem->xDel)(pMem->z);" (call_expression "(*pMem->xDel)(pMem->z)" (parenthesized_expression "(*pMem->xDel)" ( (pointer_expression "*pMem->xDel" * (field_expression "pMem->xDel" identifier -> field_identifier)) )) (argument_list "(pMem->z)" ( (field_expression "pMem->z" identifier -> field_identifier) ))) ;) (expression_statement "uVar1 = pMem->flags;" (assignment_expression "uVar1 = pMem->flags" identifier = (field_expression "pMem->flags" identifier -> field_identifier)) ;) })) (expression_statement "pMem->flags = uVar1 & 0xe3ff;" (assignment_expression "pMem->flags = uVar1 & 0xe3ff" (field_expression "pMem->flags" identifier -> field_identifier) = (binary_expression "uVar1 & 0xe3ff" identifier & number_literal)) ;) (expression_statement "pMem->z = pMem->zMalloc;" (assignment_expression "pMem->z = pMem->zMalloc" (field_expression "pMem->z" identifier -> field_identifier) = (field_expression "pMem->zMalloc" identifier -> field_identifier)) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined8 FUN_00138480(long param_1,int param_2,int param_3)\n\n{\n  ushort uVar1;\n  undefined4 uVar2;\n  long lVar3;\n  undefined8 uVar4;\n  \n  if (param_2 < 0x20) {\n    param_2 = 0x20;\n  }\n  uVar4 = *(undefined8 *)(param_1 + 0x28);\n  if (0 < *(int *)(param_1 + 0x20)) {\n    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }\n    FUN_00119e90();\n    uVar4 = *(undefined8 *)(param_1 + 0x28);\n  }\n  lVar3 = FUN_0011b8d0(uVar4,(long)param_2);\n  *(long *)(param_1 + 0x18) = lVar3;\n  if (lVar3 == 0) {\nLAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }\n    *(undefined8 *)(param_1 + 0x10) = 0;\n    *(undefined4 *)(param_1 + 0x20) = 0;\n    return 7;\n  }\n  uVar2 = (*DAT_0021f288)(lVar3);\n  *(undefined4 *)(param_1 + 0x20) = uVar2;\n  if ((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)) {\n    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));\n  }\nLAB_001384fa:\n  uVar1 = *(ushort *)(param_1 + 8);\n  if ((uVar1 & 0x400) != 0) {\n    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));\n    uVar1 = *(ushort *)(param_1 + 8);\n  }\n  *(ushort *)(param_1 + 8) = uVar1 & 0xe3ff;\n  *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18);\n  return 0;\n}\n\n" (function_definition "undefined8 FUN_00138480(long param_1,int param_2,int param_3)\n\n{\n  ushort uVar1;\n  undefined4 uVar2;\n  long lVar3;\n  undefined8 uVar4;\n  \n  if (param_2 < 0x20) {\n    param_2 = 0x20;\n  }\n  uVar4 = *(undefined8 *)(param_1 + 0x28);\n  if (0 < *(int *)(param_1 + 0x20)) {\n    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }\n    FUN_00119e90();\n    uVar4 = *(undefined8 *)(param_1 + 0x28);\n  }\n  lVar3 = FUN_0011b8d0(uVar4,(long)param_2);\n  *(long *)(param_1 + 0x18) = lVar3;\n  if (lVar3 == 0) {\nLAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }\n    *(undefined8 *)(param_1 + 0x10) = 0;\n    *(undefined4 *)(param_1 + 0x20) = 0;\n    return 7;\n  }\n  uVar2 = (*DAT_0021f288)(lVar3);\n  *(undefined4 *)(param_1 + 0x20) = uVar2;\n  if ((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)) {\n    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));\n  }\nLAB_001384fa:\n  uVar1 = *(ushort *)(param_1 + 8);\n  if ((uVar1 & 0x400) != 0) {\n    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));\n    uVar1 = *(ushort *)(param_1 + 8);\n  }\n  *(ushort *)(param_1 + 8) = uVar1 & 0xe3ff;\n  *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18);\n  return 0;\n}" type_identifier (function_declarator "FUN_00138480(long param_1,int param_2,int param_3)" identifier (parameter_list "(long param_1,int param_2,int param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  ushort uVar1;\n  undefined4 uVar2;\n  long lVar3;\n  undefined8 uVar4;\n  \n  if (param_2 < 0x20) {\n    param_2 = 0x20;\n  }\n  uVar4 = *(undefined8 *)(param_1 + 0x28);\n  if (0 < *(int *)(param_1 + 0x20)) {\n    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }\n    FUN_00119e90();\n    uVar4 = *(undefined8 *)(param_1 + 0x28);\n  }\n  lVar3 = FUN_0011b8d0(uVar4,(long)param_2);\n  *(long *)(param_1 + 0x18) = lVar3;\n  if (lVar3 == 0) {\nLAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }\n    *(undefined8 *)(param_1 + 0x10) = 0;\n    *(undefined4 *)(param_1 + 0x20) = 0;\n    return 7;\n  }\n  uVar2 = (*DAT_0021f288)(lVar3);\n  *(undefined4 *)(param_1 + 0x20) = uVar2;\n  if ((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)) {\n    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));\n  }\nLAB_001384fa:\n  uVar1 = *(ushort *)(param_1 + 8);\n  if ((uVar1 & 0x400) != 0) {\n    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));\n    uVar1 = *(ushort *)(param_1 + 8);\n  }\n  *(ushort *)(param_1 + 8) = uVar1 & 0xe3ff;\n  *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18);\n  return 0;\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (if_statement "if (param_2 < 0x20) {\n    param_2 = 0x20;\n  }" if (parenthesized_expression "(param_2 < 0x20)" ( (binary_expression "param_2 < 0x20" identifier < number_literal) )) (compound_statement "{\n    param_2 = 0x20;\n  }" { (expression_statement "param_2 = 0x20;" (assignment_expression "param_2 = 0x20" identifier = number_literal) ;) })) (expression_statement "uVar4 = *(undefined8 *)(param_1 + 0x28);" (assignment_expression "uVar4 = *(undefined8 *)(param_1 + 0x28)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0x28)" * (cast_expression "(undefined8 *)(param_1 + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (0 < *(int *)(param_1 + 0x20)) {\n    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }\n    FUN_00119e90();\n    uVar4 = *(undefined8 *)(param_1 + 0x28);\n  }" if (parenthesized_expression "(0 < *(int *)(param_1 + 0x20))" ( (binary_expression "0 < *(int *)(param_1 + 0x20)" number_literal < (pointer_expression "*(int *)(param_1 + 0x20)" * (cast_expression "(int *)(param_1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) ))))) )) (compound_statement "{\n    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }\n    FUN_00119e90();\n    uVar4 = *(undefined8 *)(param_1 + 0x28);\n  }" { (if_statement "if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }" if (parenthesized_expression "((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18)))" ( (binary_expression "(param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))" (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) && (parenthesized_expression "(*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))" ( (binary_expression "*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18)" (pointer_expression "*(long *)(param_1 + 0x10)" * (cast_expression "(long *)(param_1 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) == (pointer_expression "*(long *)(param_1 + 0x18)" * (cast_expression "(long *)(param_1 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }" { (expression_statement "lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);" (assignment_expression "lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2)" identifier = (call_expression "FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2)" identifier (argument_list "(uVar4,*(long *)(param_1 + 0x10),(long)param_2)" ( identifier , (pointer_expression "*(long *)(param_1 + 0x10)" * (cast_expression "(long *)(param_1 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) , (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) )))) ;) (expression_statement "*(long *)(param_1 + 0x18) = lVar3;" (assignment_expression "*(long *)(param_1 + 0x18) = lVar3" (pointer_expression "*(long *)(param_1 + 0x18)" * (cast_expression "(long *)(param_1 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(param_1 + 0x10) = lVar3;" (assignment_expression "*(long *)(param_1 + 0x10) = lVar3" (pointer_expression "*(long *)(param_1 + 0x10)" * (cast_expression "(long *)(param_1 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) (if_statement "if (lVar3 == 0) goto LAB_00138560;" if (parenthesized_expression "(lVar3 == 0)" ( (binary_expression "lVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00138560;" goto statement_identifier ;)) (expression_statement "uVar2 = (*DAT_0021f288)(lVar3);" (assignment_expression "uVar2 = (*DAT_0021f288)(lVar3)" identifier = (call_expression "(*DAT_0021f288)(lVar3)" (parenthesized_expression "(*DAT_0021f288)" ( (pointer_expression "*DAT_0021f288" * identifier) )) (argument_list "(lVar3)" ( identifier )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x20) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) (goto_statement "goto LAB_001384fa;" goto statement_identifier ;) })) (expression_statement "FUN_00119e90();" (call_expression "FUN_00119e90()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar4 = *(undefined8 *)(param_1 + 0x28);" (assignment_expression "uVar4 = *(undefined8 *)(param_1 + 0x28)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0x28)" * (cast_expression "(undefined8 *)(param_1 + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) ;) })) (expression_statement "lVar3 = FUN_0011b8d0(uVar4,(long)param_2);" (assignment_expression "lVar3 = FUN_0011b8d0(uVar4,(long)param_2)" identifier = (call_expression "FUN_0011b8d0(uVar4,(long)param_2)" identifier (argument_list "(uVar4,(long)param_2)" ( identifier , (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) )))) ;) (expression_statement "*(long *)(param_1 + 0x18) = lVar3;" (assignment_expression "*(long *)(param_1 + 0x18) = lVar3" (pointer_expression "*(long *)(param_1 + 0x18)" * (cast_expression "(long *)(param_1 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) (if_statement "if (lVar3 == 0) {\nLAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }\n    *(undefined8 *)(param_1 + 0x10) = 0;\n    *(undefined4 *)(param_1 + 0x20) = 0;\n    return 7;\n  }" if (parenthesized_expression "(lVar3 == 0)" ( (binary_expression "lVar3 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }\n    *(undefined8 *)(param_1 + 0x10) = 0;\n    *(undefined4 *)(param_1 + 0x20) = 0;\n    return 7;\n  }" { (labeled_statement "LAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }" statement_identifier : (if_statement "if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }" if (parenthesized_expression "((*(ushort *)(param_1 + 8) & 0x2400) == 0)" ( (binary_expression "(*(ushort *)(param_1 + 8) & 0x2400) == 0" (parenthesized_expression "(*(ushort *)(param_1 + 8) & 0x2400)" ( (binary_expression "*(ushort *)(param_1 + 8) & 0x2400" (pointer_expression "*(ushort *)(param_1 + 8)" * (cast_expression "(ushort *)(param_1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      *(undefined2 *)(param_1 + 8) = 1;\n    }" { (expression_statement "*(undefined2 *)(param_1 + 8) = 1;" (assignment_expression "*(undefined2 *)(param_1 + 8) = 1" (pointer_expression "*(undefined2 *)(param_1 + 8)" * (cast_expression "(undefined2 *)(param_1 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n      FUN_00119fd0(param_1);\n    }" else (compound_statement "{\n      FUN_00119fd0(param_1);\n    }" { (expression_statement "FUN_00119fd0(param_1);" (call_expression "FUN_00119fd0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })))) (expression_statement "*(undefined8 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x10)" * (cast_expression "(undefined8 *)(param_1 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x20) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = number_literal) ;) (return_statement "return 7;" return number_literal ;) })) (expression_statement "uVar2 = (*DAT_0021f288)(lVar3);" (assignment_expression "uVar2 = (*DAT_0021f288)(lVar3)" identifier = (call_expression "(*DAT_0021f288)(lVar3)" (parenthesized_expression "(*DAT_0021f288)" ( (pointer_expression "*DAT_0021f288" * identifier) )) (argument_list "(lVar3)" ( identifier )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x20) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)) {\n    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));\n  }" if (parenthesized_expression "((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0))" ( (binary_expression "(param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)" (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) && (parenthesized_expression "(*(void **)(param_1 + 0x10) != (void *)0x0)" ( (binary_expression "*(void **)(param_1 + 0x10) != (void *)0x0" (pointer_expression "*(void **)(param_1 + 0x10)" * (cast_expression "(void **)(param_1 + 0x10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));\n  }" { (expression_statement "memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));" (call_expression "memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc))" identifier (argument_list "(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc))" ( (pointer_expression "*(void **)(param_1 + 0x18)" * (cast_expression "(void **)(param_1 + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) , (pointer_expression "*(void **)(param_1 + 0x10)" * (cast_expression "(void **)(param_1 + 0x10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) , (cast_expression "(long)*(int *)(param_1 + 0xc)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ))) ;) })) (labeled_statement "LAB_001384fa:\n  uVar1 = *(ushort *)(param_1 + 8);" statement_identifier : (expression_statement "uVar1 = *(ushort *)(param_1 + 8);" (assignment_expression "uVar1 = *(ushort *)(param_1 + 8)" identifier = (pointer_expression "*(ushort *)(param_1 + 8)" * (cast_expression "(ushort *)(param_1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;)) (if_statement "if ((uVar1 & 0x400) != 0) {\n    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));\n    uVar1 = *(ushort *)(param_1 + 8);\n  }" if (parenthesized_expression "((uVar1 & 0x400) != 0)" ( (binary_expression "(uVar1 & 0x400) != 0" (parenthesized_expression "(uVar1 & 0x400)" ( (binary_expression "uVar1 & 0x400" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));\n    uVar1 = *(ushort *)(param_1 + 8);\n  }" { (expression_statement "(**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));" (call_expression "(**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10))" (parenthesized_expression "(**(code **)(param_1 + 0x30))" ( (pointer_expression "**(code **)(param_1 + 0x30)" * (pointer_expression "*(code **)(param_1 + 0x30)" * (cast_expression "(code **)(param_1 + 0x30)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) )) (argument_list "(*(undefined8 *)(param_1 + 0x10))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x10)" * (cast_expression "(undefined8 *)(param_1 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) ))) ;) (expression_statement "uVar1 = *(ushort *)(param_1 + 8);" (assignment_expression "uVar1 = *(ushort *)(param_1 + 8)" identifier = (pointer_expression "*(ushort *)(param_1 + 8)" * (cast_expression "(ushort *)(param_1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) })) (expression_statement "*(ushort *)(param_1 + 8) = uVar1 & 0xe3ff;" (assignment_expression "*(ushort *)(param_1 + 8) = uVar1 & 0xe3ff" (pointer_expression "*(ushort *)(param_1 + 8)" * (cast_expression "(ushort *)(param_1 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = (binary_expression "uVar1 & 0xe3ff" identifier & number_literal)) ;) (expression_statement "*(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18);" (assignment_expression "*(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18)" (pointer_expression "*(undefined8 *)(param_1 + 0x10)" * (cast_expression "(undefined8 *)(param_1 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = (pointer_expression "*(undefined8 *)(param_1 + 0x18)" * (cast_expression "(undefined8 *)(param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_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 LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (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 = (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (return_statement return LIT ;) })))
(function_definition "undefined8 FUN_00138480(long param_1,int param_2,int param_3)\n\n{\n  ushort uVar1;\n  undefined4 uVar2;\n  long lVar3;\n  undefined8 uVar4;\n  \n  if (param_2 < 0x20) {\n    param_2 = 0x20;\n  }\n  uVar4 = *(undefined8 *)(param_1 + 0x28);\n  if (0 < *(int *)(param_1 + 0x20)) {\n    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }\n    FUN_00119e90();\n    uVar4 = *(undefined8 *)(param_1 + 0x28);\n  }\n  lVar3 = FUN_0011b8d0(uVar4,(long)param_2);\n  *(long *)(param_1 + 0x18) = lVar3;\n  if (lVar3 == 0) {\nLAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }\n    *(undefined8 *)(param_1 + 0x10) = 0;\n    *(undefined4 *)(param_1 + 0x20) = 0;\n    return 7;\n  }\n  uVar2 = (*DAT_0021f288)(lVar3);\n  *(undefined4 *)(param_1 + 0x20) = uVar2;\n  if ((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)) {\n    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));\n  }\nLAB_001384fa:\n  uVar1 = *(ushort *)(param_1 + 8);\n  if ((uVar1 & 0x400) != 0) {\n    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));\n    uVar1 = *(ushort *)(param_1 + 8);\n  }\n  *(ushort *)(param_1 + 8) = uVar1 & 0xe3ff;\n  *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18);\n  return 0;\n}" (type_identifier "undefined8") (function_declarator "FUN_00138480(long param_1,int param_2,int param_3)" (identifier "FUN_00138480") (parameter_list "(long param_1,int param_2,int param_3)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  ushort uVar1;\n  undefined4 uVar2;\n  long lVar3;\n  undefined8 uVar4;\n  \n  if (param_2 < 0x20) {\n    param_2 = 0x20;\n  }\n  uVar4 = *(undefined8 *)(param_1 + 0x28);\n  if (0 < *(int *)(param_1 + 0x20)) {\n    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }\n    FUN_00119e90();\n    uVar4 = *(undefined8 *)(param_1 + 0x28);\n  }\n  lVar3 = FUN_0011b8d0(uVar4,(long)param_2);\n  *(long *)(param_1 + 0x18) = lVar3;\n  if (lVar3 == 0) {\nLAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }\n    *(undefined8 *)(param_1 + 0x10) = 0;\n    *(undefined4 *)(param_1 + 0x20) = 0;\n    return 7;\n  }\n  uVar2 = (*DAT_0021f288)(lVar3);\n  *(undefined4 *)(param_1 + 0x20) = uVar2;\n  if ((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)) {\n    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));\n  }\nLAB_001384fa:\n  uVar1 = *(ushort *)(param_1 + 8);\n  if ((uVar1 & 0x400) != 0) {\n    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));\n    uVar1 = *(ushort *)(param_1 + 8);\n  }\n  *(ushort *)(param_1 + 8) = uVar1 & 0xe3ff;\n  *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18);\n  return 0;\n}" ({ "{") (declaration "ushort uVar1;" (type_identifier "ushort") (identifier "uVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "long lVar3;" (sized_type_specifier "long" (long "long")) (identifier "lVar3") (; ";")) (declaration "undefined8 uVar4;" (type_identifier "undefined8") (identifier "uVar4") (; ";")) (if_statement "if (param_2 < 0x20) {\n    param_2 = 0x20;\n  }" (if "if") (parenthesized_expression "(param_2 < 0x20)" (( "(") (binary_expression "param_2 < 0x20" (identifier "param_2") (< "<") (number_literal "0x20")) () ")")) (compound_statement "{\n    param_2 = 0x20;\n  }" ({ "{") (expression_statement "param_2 = 0x20;" (assignment_expression "param_2 = 0x20" (identifier "param_2") (= "=") (number_literal "0x20")) (; ";")) (} "}"))) (expression_statement "uVar4 = *(undefined8 *)(param_1 + 0x28);" (assignment_expression "uVar4 = *(undefined8 *)(param_1 + 0x28)" (identifier "uVar4") (= "=") (pointer_expression "*(undefined8 *)(param_1 + 0x28)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x28)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (if_statement "if (0 < *(int *)(param_1 + 0x20)) {\n    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }\n    FUN_00119e90();\n    uVar4 = *(undefined8 *)(param_1 + 0x28);\n  }" (if "if") (parenthesized_expression "(0 < *(int *)(param_1 + 0x20))" (( "(") (binary_expression "0 < *(int *)(param_1 + 0x20)" (number_literal "0") (< "<") (pointer_expression "*(int *)(param_1 + 0x20)" (* "*") (cast_expression "(int *)(param_1 + 0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")"))))) () ")")) (compound_statement "{\n    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }\n    FUN_00119e90();\n    uVar4 = *(undefined8 *)(param_1 + 0x28);\n  }" ({ "{") (if_statement "if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }" (if "if") (parenthesized_expression "((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18)))" (( "(") (binary_expression "(param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))" (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))" (( "(") (binary_expression "*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18)" (pointer_expression "*(long *)(param_1 + 0x10)" (* "*") (cast_expression "(long *)(param_1 + 0x10)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (== "==") (pointer_expression "*(long *)(param_1 + 0x18)" (* "*") (cast_expression "(long *)(param_1 + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);\n      *(long *)(param_1 + 0x18) = lVar3;\n      *(long *)(param_1 + 0x10) = lVar3;\n      if (lVar3 == 0) goto LAB_00138560;\n      uVar2 = (*DAT_0021f288)(lVar3);\n      *(undefined4 *)(param_1 + 0x20) = uVar2;\n      goto LAB_001384fa;\n    }" ({ "{") (expression_statement "lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);" (assignment_expression "lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2)" (identifier "lVar3") (= "=") (call_expression "FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2)" (identifier "FUN_00138430") (argument_list "(uVar4,*(long *)(param_1 + 0x10),(long)param_2)" (( "(") (identifier "uVar4") (, ",") (pointer_expression "*(long *)(param_1 + 0x10)" (* "*") (cast_expression "(long *)(param_1 + 0x10)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (, ",") (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2")) () ")")))) (; ";")) (expression_statement "*(long *)(param_1 + 0x18) = lVar3;" (assignment_expression "*(long *)(param_1 + 0x18) = lVar3" (pointer_expression "*(long *)(param_1 + 0x18)" (* "*") (cast_expression "(long *)(param_1 + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "lVar3")) (; ";")) (expression_statement "*(long *)(param_1 + 0x10) = lVar3;" (assignment_expression "*(long *)(param_1 + 0x10) = lVar3" (pointer_expression "*(long *)(param_1 + 0x10)" (* "*") (cast_expression "(long *)(param_1 + 0x10)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "lVar3")) (; ";")) (if_statement "if (lVar3 == 0) goto LAB_00138560;" (if "if") (parenthesized_expression "(lVar3 == 0)" (( "(") (binary_expression "lVar3 == 0" (identifier "lVar3") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00138560;" (goto "goto") (statement_identifier "LAB_00138560") (; ";"))) (expression_statement "uVar2 = (*DAT_0021f288)(lVar3);" (assignment_expression "uVar2 = (*DAT_0021f288)(lVar3)" (identifier "uVar2") (= "=") (call_expression "(*DAT_0021f288)(lVar3)" (parenthesized_expression "(*DAT_0021f288)" (( "(") (pointer_expression "*DAT_0021f288" (* "*") (identifier "DAT_0021f288")) () ")")) (argument_list "(lVar3)" (( "(") (identifier "lVar3") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x20) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (goto_statement "goto LAB_001384fa;" (goto "goto") (statement_identifier "LAB_001384fa") (; ";")) (} "}"))) (expression_statement "FUN_00119e90();" (call_expression "FUN_00119e90()" (identifier "FUN_00119e90") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "uVar4 = *(undefined8 *)(param_1 + 0x28);" (assignment_expression "uVar4 = *(undefined8 *)(param_1 + 0x28)" (identifier "uVar4") (= "=") (pointer_expression "*(undefined8 *)(param_1 + 0x28)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x28)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (} "}"))) (expression_statement "lVar3 = FUN_0011b8d0(uVar4,(long)param_2);" (assignment_expression "lVar3 = FUN_0011b8d0(uVar4,(long)param_2)" (identifier "lVar3") (= "=") (call_expression "FUN_0011b8d0(uVar4,(long)param_2)" (identifier "FUN_0011b8d0") (argument_list "(uVar4,(long)param_2)" (( "(") (identifier "uVar4") (, ",") (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2")) () ")")))) (; ";")) (expression_statement "*(long *)(param_1 + 0x18) = lVar3;" (assignment_expression "*(long *)(param_1 + 0x18) = lVar3" (pointer_expression "*(long *)(param_1 + 0x18)" (* "*") (cast_expression "(long *)(param_1 + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "lVar3")) (; ";")) (if_statement "if (lVar3 == 0) {\nLAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }\n    *(undefined8 *)(param_1 + 0x10) = 0;\n    *(undefined4 *)(param_1 + 0x20) = 0;\n    return 7;\n  }" (if "if") (parenthesized_expression "(lVar3 == 0)" (( "(") (binary_expression "lVar3 == 0" (identifier "lVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }\n    *(undefined8 *)(param_1 + 0x10) = 0;\n    *(undefined4 *)(param_1 + 0x20) = 0;\n    return 7;\n  }" ({ "{") (labeled_statement "LAB_00138560:\n    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }" (statement_identifier "LAB_00138560") (: ":") (if_statement "if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {\n      *(undefined2 *)(param_1 + 8) = 1;\n    }\n    else {\n      FUN_00119fd0(param_1);\n    }" (if "if") (parenthesized_expression "((*(ushort *)(param_1 + 8) & 0x2400) == 0)" (( "(") (binary_expression "(*(ushort *)(param_1 + 8) & 0x2400) == 0" (parenthesized_expression "(*(ushort *)(param_1 + 8) & 0x2400)" (( "(") (binary_expression "*(ushort *)(param_1 + 8) & 0x2400" (pointer_expression "*(ushort *)(param_1 + 8)" (* "*") (cast_expression "(ushort *)(param_1 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (& "&") (number_literal "0x2400")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *(undefined2 *)(param_1 + 8) = 1;\n    }" ({ "{") (expression_statement "*(undefined2 *)(param_1 + 8) = 1;" (assignment_expression "*(undefined2 *)(param_1 + 8) = 1" (pointer_expression "*(undefined2 *)(param_1 + 8)" (* "*") (cast_expression "(undefined2 *)(param_1 + 8)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n      FUN_00119fd0(param_1);\n    }" (else "else") (compound_statement "{\n      FUN_00119fd0(param_1);\n    }" ({ "{") (expression_statement "FUN_00119fd0(param_1);" (call_expression "FUN_00119fd0(param_1)" (identifier "FUN_00119fd0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (} "}"))))) (expression_statement "*(undefined8 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x20) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return 7;" (return "return") (number_literal "7") (; ";")) (} "}"))) (expression_statement "uVar2 = (*DAT_0021f288)(lVar3);" (assignment_expression "uVar2 = (*DAT_0021f288)(lVar3)" (identifier "uVar2") (= "=") (call_expression "(*DAT_0021f288)(lVar3)" (parenthesized_expression "(*DAT_0021f288)" (( "(") (pointer_expression "*DAT_0021f288" (* "*") (identifier "DAT_0021f288")) () ")")) (argument_list "(lVar3)" (( "(") (identifier "lVar3") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x20) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (if_statement "if ((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)) {\n    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));\n  }" (if "if") (parenthesized_expression "((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0))" (( "(") (binary_expression "(param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)" (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(*(void **)(param_1 + 0x10) != (void *)0x0)" (( "(") (binary_expression "*(void **)(param_1 + 0x10) != (void *)0x0" (pointer_expression "*(void **)(param_1 + 0x10)" (* "*") (cast_expression "(void **)(param_1 + 0x10)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")"))) () ")")) (compound_statement "{\n    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));\n  }" ({ "{") (expression_statement "memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));" (call_expression "memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc))" (identifier "memcpy") (argument_list "(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc))" (( "(") (pointer_expression "*(void **)(param_1 + 0x18)" (* "*") (cast_expression "(void **)(param_1 + 0x18)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (, ",") (pointer_expression "*(void **)(param_1 + 0x10)" (* "*") (cast_expression "(void **)(param_1 + 0x10)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (, ",") (cast_expression "(long)*(int *)(param_1 + 0xc)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) () ")"))) (; ";")) (} "}"))) (labeled_statement "LAB_001384fa:\n  uVar1 = *(ushort *)(param_1 + 8);" (statement_identifier "LAB_001384fa") (: ":") (expression_statement "uVar1 = *(ushort *)(param_1 + 8);" (assignment_expression "uVar1 = *(ushort *)(param_1 + 8)" (identifier "uVar1") (= "=") (pointer_expression "*(ushort *)(param_1 + 8)" (* "*") (cast_expression "(ushort *)(param_1 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";"))) (if_statement "if ((uVar1 & 0x400) != 0) {\n    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));\n    uVar1 = *(ushort *)(param_1 + 8);\n  }" (if "if") (parenthesized_expression "((uVar1 & 0x400) != 0)" (( "(") (binary_expression "(uVar1 & 0x400) != 0" (parenthesized_expression "(uVar1 & 0x400)" (( "(") (binary_expression "uVar1 & 0x400" (identifier "uVar1") (& "&") (number_literal "0x400")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));\n    uVar1 = *(ushort *)(param_1 + 8);\n  }" ({ "{") (expression_statement "(**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));" (call_expression "(**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10))" (parenthesized_expression "(**(code **)(param_1 + 0x30))" (( "(") (pointer_expression "**(code **)(param_1 + 0x30)" (* "*") (pointer_expression "*(code **)(param_1 + 0x30)" (* "*") (cast_expression "(code **)(param_1 + 0x30)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")"))))) () ")")) (argument_list "(*(undefined8 *)(param_1 + 0x10))" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) () ")"))) (; ";")) (expression_statement "uVar1 = *(ushort *)(param_1 + 8);" (assignment_expression "uVar1 = *(ushort *)(param_1 + 8)" (identifier "uVar1") (= "=") (pointer_expression "*(ushort *)(param_1 + 8)" (* "*") (cast_expression "(ushort *)(param_1 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (} "}"))) (expression_statement "*(ushort *)(param_1 + 8) = uVar1 & 0xe3ff;" (assignment_expression "*(ushort *)(param_1 + 8) = uVar1 & 0xe3ff" (pointer_expression "*(ushort *)(param_1 + 8)" (* "*") (cast_expression "(ushort *)(param_1 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (= "=") (binary_expression "uVar1 & 0xe3ff" (identifier "uVar1") (& "&") (number_literal "0xe3ff"))) (; ";")) (expression_statement "*(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18);" (assignment_expression "*(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18)" (pointer_expression "*(undefined8 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (pointer_expression "*(undefined8 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

int function_1(type_1 *pMem,int var_1,int var_2)

{
  type_2 var_9;
  int iVar2;
  char *var_4;
  type_3 *db;
  
  if (var_1 < 0x20) {
    var_1 = 0x20;
  }
  db = pMem->db;
  if (0 < pMem->szMalloc) {
    if ((var_2 != 0) && (pMem->z == pMem->zMalloc)) {
      var_4 = (char *)var_3(db,pMem->z,(long)var_1);
      pMem->zMalloc = var_4;
      pMem->z = var_4;
      if (var_4 == (char *)0x0) goto LAB_00138560;
      iVar2 = (*sqlite3Config.m.xSize)(var_4);
      pMem->szMalloc = iVar2;
      goto LAB_001384fa;
    }
    var_5(db,pMem->zMalloc);
    db = pMem->db;
  }
  var_4 = (char *)var_6(db,(long)var_1);
  pMem->zMalloc = var_4;
  if (var_4 == (char *)0x0) {
LAB_00138560:
    if ((pMem->flags & 0x2400) == 0) {
      pMem->flags = 1;
    }
    else {
      var_7(pMem);
    }
    pMem->z = (char *)0x0;
    pMem->szMalloc = 0;
    return 7;
  }
  iVar2 = (*sqlite3Config.m.xSize)(var_4);
  pMem->szMalloc = iVar2;
  if ((var_2 != 0) && (pMem->z != (char *)0x0)) {
    var_8(pMem->zMalloc,pMem->z,(long)pMem->var_1);
  }
LAB_001384fa:
  var_9 = pMem->flags;
  if ((var_9 & 0x400) != 0) {
    (*pMem->xDel)(pMem->z);
    var_9 = pMem->flags;
  }
  pMem->flags = var_9 & 0xe3ff;
  pMem->z = pMem->zMalloc;
  return 0;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_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: (number_literal) 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))))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (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: (identifier))) (goto_statement label: (statement_identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (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)))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (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: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (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))))))))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (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))))))) (return_statement (number_literal)))))

undefined8 MASKED(long param_1,int param_2,int param_3)

{
  ushort uVar1;
  undefined4 uVar2;
  long lVar3;
  undefined8 uVar4;
  
  if (param_2 < 0x20) {
    param_2 = 0x20;
  }
  uVar4 = *(undefined8 *)(param_1 + 0x28);
  if (0 < *(int *)(param_1 + 0x20)) {
    if ((param_3 != 0) && (*(long *)(param_1 + 0x10) == *(long *)(param_1 + 0x18))) {
      lVar3 = FUN_00138430(uVar4,*(long *)(param_1 + 0x10),(long)param_2);
      *(long *)(param_1 + 0x18) = lVar3;
      *(long *)(param_1 + 0x10) = lVar3;
      if (lVar3 == 0) goto LAB_00138560;
      uVar2 = (*DAT_0021f288)(lVar3);
      *(undefined4 *)(param_1 + 0x20) = uVar2;
      goto LAB_001384fa;
    }
    FUN_00119e90();
    uVar4 = *(undefined8 *)(param_1 + 0x28);
  }
  lVar3 = FUN_0011b8d0(uVar4,(long)param_2);
  *(long *)(param_1 + 0x18) = lVar3;
  if (lVar3 == 0) {
LAB_00138560:
    if ((*(ushort *)(param_1 + 8) & 0x2400) == 0) {
      *(undefined2 *)(param_1 + 8) = 1;
    }
    else {
      FUN_00119fd0(param_1);
    }
    *(undefined8 *)(param_1 + 0x10) = 0;
    *(undefined4 *)(param_1 + 0x20) = 0;
    return 7;
  }
  uVar2 = (*DAT_0021f288)(lVar3);
  *(undefined4 *)(param_1 + 0x20) = uVar2;
  if ((param_3 != 0) && (*(void **)(param_1 + 0x10) != (void *)0x0)) {
    memcpy(*(void **)(param_1 + 0x18),*(void **)(param_1 + 0x10),(long)*(int *)(param_1 + 0xc));
  }
LAB_001384fa:
  uVar1 = *(ushort *)(param_1 + 8);
  if ((uVar1 & 0x400) != 0) {
    (**(code **)(param_1 + 0x30))(*(undefined8 *)(param_1 + 0x10));
    uVar1 = *(ushort *)(param_1 + 8);
  }
  *(ushort *)(param_1 + 8) = uVar1 & 0xe3ff;
  *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(param_1 + 0x18);
  return 0;
}

