
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int vdbeRecordCompareString(int nKey1,void *pKey1,UnpackedRecord *pPKey2)

{
  size_t sVar1;
  int iVar2;
  size_t __n;
  size_t sVar3;
  int in_GS_OFFSET;
  bool bVar4;
  int serial_type;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x55489;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((char)*(byte *)((int)pKey1 + 1) < '\0') {
    sqlite3GetVarint32((uchar *)((int)pKey1 + 1),(u32 *)&serial_type);
  }
  else {
    serial_type = (int)*(byte *)((int)pKey1 + 1);
  }
  if (serial_type < 0xc) {
LAB_00055520:
    iVar2 = (int)pPKey2->r1;
  }
  else {
    if ((serial_type & 1U) != 0) {
                    /* WARNING: Load size is inaccurate */
      sVar3 = serial_type + -0xc >> 1;
      if (nKey1 < (int)(*pKey1 + sVar3)) {
        iVar2 = sqlite3CorruptError(0x13b20);
        pPKey2->errCode = (u8)iVar2;
        iVar2 = 0;
        goto LAB_00055524;
      }
      sVar1 = pPKey2->aMem->n;
      __n = sVar3;
      if ((int)sVar1 <= (int)sVar3) {
        __n = sVar1;
      }
      iVar2 = memcmp((void *)((uint)*pKey1 + (int)pKey1),pPKey2->aMem->z,__n);
      bVar4 = iVar2 == 0;
      if (bVar4) {
        iVar2 = sVar3 - sVar1;
        bVar4 = iVar2 == 0;
        if (bVar4) {
          if (pPKey2->nField < 2) {
            iVar2 = (int)pPKey2->default_rc;
            pPKey2->eqSeen = '\x01';
          }
          else {
            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);
          }
          goto LAB_00055524;
        }
      }
      if (bVar4 || iVar2 < 0) goto LAB_00055520;
    }
    iVar2 = (int)pPKey2->r2;
  }
LAB_00055524:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return iVar2;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

int FUN_00055480(int param_1,byte *param_2,int param_3)

{
  int iVar1;
  size_t sVar2;
  undefined1 uVar3;
  int iVar4;
  size_t __n;
  size_t sVar5;
  int in_GS_OFFSET;
  bool bVar6;
  uint local_24;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if ((char)param_2[1] < '\0') {
    FUN_0002a260();
  }
  else {
    local_24 = (uint)param_2[1];
  }
  if ((int)local_24 < 0xc) {
LAB_00055520:
    iVar4 = (int)*(char *)(param_3 + 0xc);
  }
  else {
    if ((local_24 & 1) != 0) {
      sVar5 = (int)(local_24 - 0xc) >> 1;
      if (param_1 < (int)(*param_2 + sVar5)) {
        uVar3 = FUN_00052b70();
        *(undefined1 *)(param_3 + 0xb) = uVar3;
        iVar4 = 0;
        goto LAB_00055524;
      }
      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);
      __n = sVar5;
      if ((int)sVar2 <= (int)sVar5) {
        __n = sVar2;
      }
      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);
      bVar6 = iVar4 == 0;
      if (bVar6) {
        iVar4 = sVar5 - sVar2;
        bVar6 = iVar4 == 0;
        if (bVar6) {
          if (*(ushort *)(param_3 + 8) < 2) {
            iVar4 = (int)*(char *)(param_3 + 10);
            *(undefined1 *)(param_3 + 0xe) = 1;
          }
          else {
            iVar4 = FUN_00054910(1);
          }
          goto LAB_00055524;
        }
      }
      if (bVar6 || iVar4 < 0) goto LAB_00055520;
    }
    iVar4 = (int)*(char *)(param_3 + 0xd);
  }
LAB_00055524:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_000f6410();
  }
  return iVar4;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014d20
ADD EBX,0xf5a4b
SUB ESP,0x2c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1c],EAX
XOR EAX,EAX
MOV EDI,dword ptr [ESP + 0x44]
MOV EBP,dword ptr [ESP + 0x48]
MOVZX EAX,byte ptr [EDI + 0x1]
TEST AL,AL
JS 0x00055540
MOVZX ESI,AL
MOV dword ptr [ESP + 0x18],ESI
CMP ESI,0xb
JLE 0x00055520
TEST ESI,0x1
JNZ 0x000554d0
MOVSX EAX,byte ptr [EBP + 0xd]
JMP 0x00055524
SUB ESI,0xc
MOVZX EAX,byte ptr [EDI]
SAR ESI,0x1
LEA EDX,[EAX + ESI*0x1]
CMP EDX,dword ptr [ESP + 0x40]
JG 0x00055558
MOV ECX,dword ptr [EBP + 0x4]
SUB ESP,0x4
MOV EDX,dword ptr [ECX + 0xc]
MOV ECX,ESI
CMP EDX,ESI
MOV dword ptr [ESP + 0x10],EDX
CMOVLE ECX,EDX
ADD EAX,EDI
PUSH ECX
MOV EDX,dword ptr [EBP + 0x4]
PUSH dword ptr [EDX + 0x10]
PUSH EAX
CALL 0x00014110
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00055515
MOV EDX,dword ptr [ESP + 0xc]
SUB ESI,EDX
TEST ESI,ESI
JZ 0x00055570
JG 0x000554c6
LEA ESI,[ESI]
NOP
MOVSX EAX,byte ptr [EBP + 0xc]
MOV ECX,dword ptr [ESP + 0x1c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x0005559f
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EDX,[ESP + 0x18]
LEA EAX,[EDI + 0x1]
CALL 0x0002a260
MOV ESI,dword ptr [ESP + 0x18]
JMP 0x000554b9
MOV EAX,0x13b20
CALL 0x00052b70
MOV byte ptr [EBP + 0xb],AL
XOR EAX,EAX
JMP 0x00055524
CMP word ptr [EBP + 0x8],0x1
JA 0x00055588
MOVSX EAX,byte ptr [EBP + 0xa]
MOV byte ptr [EBP + 0xe],0x1
JMP 0x00055524
SUB ESP,0xc
MOV ECX,EBP
MOV EDX,EDI
PUSH 0x1
MOV EAX,dword ptr [ESP + 0x50]
CALL 0x00054910
ADD ESP,0x10
JMP 0x00055524
CALL 0x000f6410
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_00055480(int param_1,byte *param_2,int param_3)\n\n{\n  int iVar1;\n  size_t sVar2;\n  undefined1 uVar3;\n  int iVar4;\n  size_t __n;\n  size_t sVar5;\n  int in_GS_OFFSET;\n  bool bVar6;\n  uint local_24;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((char)param_2[1] < '\0') {\n    FUN_0002a260();\n  }\n  else {\n    local_24 = (uint)param_2[1];\n  }\n  if ((int)local_24 < 0xc) {\nLAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);\n  }\n  else {\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }\nLAB_00055524:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000f6410();\n  }\n  return iVar4;\n}\n\n" comment (function_definition "int FUN_00055480(int param_1,byte *param_2,int param_3)\n\n{\n  int iVar1;\n  size_t sVar2;\n  undefined1 uVar3;\n  int iVar4;\n  size_t __n;\n  size_t sVar5;\n  int in_GS_OFFSET;\n  bool bVar6;\n  uint local_24;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((char)param_2[1] < '\0') {\n    FUN_0002a260();\n  }\n  else {\n    local_24 = (uint)param_2[1];\n  }\n  if ((int)local_24 < 0xc) {\nLAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);\n  }\n  else {\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }\nLAB_00055524:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000f6410();\n  }\n  return iVar4;\n}" primitive_type (function_declarator "FUN_00055480(int param_1,byte *param_2,int param_3)" identifier (parameter_list "(int param_1,byte *param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  undefined1 uVar3;\n  int iVar4;\n  size_t __n;\n  size_t sVar5;\n  int in_GS_OFFSET;\n  bool bVar6;\n  uint local_24;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((char)param_2[1] < '\0') {\n    FUN_0002a260();\n  }\n  else {\n    local_24 = (uint)param_2[1];\n  }\n  if ((int)local_24 < 0xc) {\nLAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);\n  }\n  else {\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }\nLAB_00055524:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000f6410();\n  }\n  return iVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "undefined1 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "uint local_24;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if ((char)param_2[1] < '\0') {\n    FUN_0002a260();\n  }\n  else {\n    local_24 = (uint)param_2[1];\n  }" if (parenthesized_expression "((char)param_2[1] < '\0')" ( (binary_expression "(char)param_2[1] < '\0'" (cast_expression "(char)param_2[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_2[1]" identifier [ number_literal ])) < (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    FUN_0002a260();\n  }" { (expression_statement "FUN_0002a260();" (call_expression "FUN_0002a260()" identifier (argument_list "()" ( ))) ;) }) (else_clause "else {\n    local_24 = (uint)param_2[1];\n  }" else (compound_statement "{\n    local_24 = (uint)param_2[1];\n  }" { (expression_statement "local_24 = (uint)param_2[1];" (assignment_expression "local_24 = (uint)param_2[1]" identifier = (cast_expression "(uint)param_2[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_2[1]" identifier [ number_literal ]))) ;) }))) (if_statement "if ((int)local_24 < 0xc) {\nLAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);\n  }\n  else {\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }" if (parenthesized_expression "((int)local_24 < 0xc)" ( (binary_expression "(int)local_24 < 0xc" (cast_expression "(int)local_24" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\nLAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);\n  }" { (labeled_statement "LAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);" statement_identifier : (expression_statement "iVar4 = (int)*(char *)(param_3 + 0xc);" (assignment_expression "iVar4 = (int)*(char *)(param_3 + 0xc)" identifier = (cast_expression "(int)*(char *)(param_3 + 0xc)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(char *)(param_3 + 0xc)" * (cast_expression "(char *)(param_3 + 0xc)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc)" ( (binary_expression "param_3 + 0xc" identifier + number_literal) )))))) ;)) }) (else_clause "else {\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }" else (compound_statement "{\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }" { (if_statement "if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }" if (parenthesized_expression "((local_24 & 1) != 0)" ( (binary_expression "(local_24 & 1) != 0" (parenthesized_expression "(local_24 & 1)" ( (binary_expression "local_24 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }" { (expression_statement "sVar5 = (int)(local_24 - 0xc) >> 1;" (assignment_expression "sVar5 = (int)(local_24 - 0xc) >> 1" identifier = (binary_expression "(int)(local_24 - 0xc) >> 1" (cast_expression "(int)(local_24 - 0xc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(local_24 - 0xc)" ( (binary_expression "local_24 - 0xc" identifier - number_literal) ))) >> number_literal)) ;) (if_statement "if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }" if (parenthesized_expression "(param_1 < (int)(*param_2 + sVar5))" ( (binary_expression "param_1 < (int)(*param_2 + sVar5)" identifier < (cast_expression "(int)(*param_2 + sVar5)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(*param_2 + sVar5)" ( (binary_expression "*param_2 + sVar5" (pointer_expression "*param_2" * identifier) + identifier) )))) )) (compound_statement "{\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }" { (expression_statement "uVar3 = FUN_00052b70();" (assignment_expression "uVar3 = FUN_00052b70()" identifier = (call_expression "FUN_00052b70()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(undefined1 *)(param_3 + 0xb) = uVar3;" (assignment_expression "*(undefined1 *)(param_3 + 0xb) = uVar3" (pointer_expression "*(undefined1 *)(param_3 + 0xb)" * (cast_expression "(undefined1 *)(param_3 + 0xb)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xb)" ( (binary_expression "param_3 + 0xb" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_00055524;" goto statement_identifier ;) })) (expression_statement "sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);" (assignment_expression "sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc)" identifier = (pointer_expression "*(size_t *)(*(int *)(param_3 + 4) + 0xc)" * (cast_expression "(size_t *)(*(int *)(param_3 + 4) + 0xc)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_3 + 4) + 0xc)" ( (binary_expression "*(int *)(param_3 + 4) + 0xc" (pointer_expression "*(int *)(param_3 + 4)" * (cast_expression "(int *)(param_3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "__n = sVar5;" (assignment_expression "__n = sVar5" identifier = identifier) ;) (if_statement "if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }" if (parenthesized_expression "((int)sVar2 <= (int)sVar5)" ( (binary_expression "(int)sVar2 <= (int)sVar5" (cast_expression "(int)sVar2" ( (type_descriptor "int" primitive_type) ) identifier) <= (cast_expression "(int)sVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n        __n = sVar2;\n      }" { (expression_statement "__n = sVar2;" (assignment_expression "__n = sVar2" identifier = identifier) ;) })) (expression_statement "iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);" (assignment_expression "iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n)" identifier = (call_expression "memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n)" identifier (argument_list "(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n)" ( (binary_expression "param_2 + *param_2" identifier + (pointer_expression "*param_2" * identifier)) , (pointer_expression "*(void **)(*(int *)(param_3 + 4) + 0x10)" * (cast_expression "(void **)(*(int *)(param_3 + 4) + 0x10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(param_3 + 4) + 0x10)" ( (binary_expression "*(int *)(param_3 + 4) + 0x10" (pointer_expression "*(int *)(param_3 + 4)" * (cast_expression "(int *)(param_3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) + number_literal) )))) , identifier )))) ;) (expression_statement "bVar6 = iVar4 == 0;" (assignment_expression "bVar6 = iVar4 == 0" identifier = (binary_expression "iVar4 == 0" identifier == number_literal)) ;) (if_statement "if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }" if (parenthesized_expression "(bVar6)" ( identifier )) (compound_statement "{\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }" { (expression_statement "iVar4 = sVar5 - sVar2;" (assignment_expression "iVar4 = sVar5 - sVar2" identifier = (binary_expression "sVar5 - sVar2" identifier - identifier)) ;) (expression_statement "bVar6 = iVar4 == 0;" (assignment_expression "bVar6 = iVar4 == 0" identifier = (binary_expression "iVar4 == 0" identifier == number_literal)) ;) (if_statement "if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }" if (parenthesized_expression "(bVar6)" ( identifier )) (compound_statement "{\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }" { (if_statement "if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }" if (parenthesized_expression "(*(ushort *)(param_3 + 8) < 2)" ( (binary_expression "*(ushort *)(param_3 + 8) < 2" (pointer_expression "*(ushort *)(param_3 + 8)" * (cast_expression "(ushort *)(param_3 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 8)" ( (binary_expression "param_3 + 8" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }" { (expression_statement "iVar4 = (int)*(char *)(param_3 + 10);" (assignment_expression "iVar4 = (int)*(char *)(param_3 + 10)" identifier = (cast_expression "(int)*(char *)(param_3 + 10)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(char *)(param_3 + 10)" * (cast_expression "(char *)(param_3 + 10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 10)" ( (binary_expression "param_3 + 10" identifier + number_literal) )))))) ;) (expression_statement "*(undefined1 *)(param_3 + 0xe) = 1;" (assignment_expression "*(undefined1 *)(param_3 + 0xe) = 1" (pointer_expression "*(undefined1 *)(param_3 + 0xe)" * (cast_expression "(undefined1 *)(param_3 + 0xe)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xe)" ( (binary_expression "param_3 + 0xe" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n            iVar4 = FUN_00054910(1);\n          }" else (compound_statement "{\n            iVar4 = FUN_00054910(1);\n          }" { (expression_statement "iVar4 = FUN_00054910(1);" (assignment_expression "iVar4 = FUN_00054910(1)" identifier = (call_expression "FUN_00054910(1)" identifier (argument_list "(1)" ( number_literal )))) ;) }))) (goto_statement "goto LAB_00055524;" goto statement_identifier ;) })) })) (if_statement "if (bVar6 || iVar4 < 0) goto LAB_00055520;" if (parenthesized_expression "(bVar6 || iVar4 < 0)" ( (binary_expression "bVar6 || iVar4 < 0" identifier || (binary_expression "iVar4 < 0" identifier < number_literal)) )) (goto_statement "goto LAB_00055520;" goto statement_identifier ;)) })) (expression_statement "iVar4 = (int)*(char *)(param_3 + 0xd);" (assignment_expression "iVar4 = (int)*(char *)(param_3 + 0xd)" identifier = (cast_expression "(int)*(char *)(param_3 + 0xd)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(char *)(param_3 + 0xd)" * (cast_expression "(char *)(param_3 + 0xd)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xd)" ( (binary_expression "param_3 + 0xd" identifier + number_literal) )))))) ;) }))) (labeled_statement "LAB_00055524:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000f6410();\n  }" statement_identifier : (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000f6410();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_000f6410();\n  }" { comment (expression_statement "FUN_000f6410();" (call_expression "FUN_000f6410()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint vdbeRecordCompareString(int nKey1,void *pKey1,UnpackedRecord *pPKey2)\n\n{\n  size_t sVar1;\n  int iVar2;\n  size_t __n;\n  size_t sVar3;\n  int in_GS_OFFSET;\n  bool bVar4;\n  int serial_type;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x55489;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((char)*(byte *)((int)pKey1 + 1) < '\0') {\n    sqlite3GetVarint32((uchar *)((int)pKey1 + 1),(u32 *)&serial_type);\n  }\n  else {\n    serial_type = (int)*(byte *)((int)pKey1 + 1);\n  }\n  if (serial_type < 0xc) {\nLAB_00055520:\n    iVar2 = (int)pPKey2->r1;\n  }\n  else {\n    if ((serial_type & 1U) != 0) {\n                    /* WARNING: Load size is inaccurate */\n      sVar3 = serial_type + -0xc >> 1;\n      if (nKey1 < (int)(*pKey1 + sVar3)) {\n        iVar2 = sqlite3CorruptError(0x13b20);\n        pPKey2->errCode = (u8)iVar2;\n        iVar2 = 0;\n        goto LAB_00055524;\n      }\n      sVar1 = pPKey2->aMem->n;\n      __n = sVar3;\n      if ((int)sVar1 <= (int)sVar3) {\n        __n = sVar1;\n      }\n      iVar2 = memcmp((void *)((uint)*pKey1 + (int)pKey1),pPKey2->aMem->z,__n);\n      bVar4 = iVar2 == 0;\n      if (bVar4) {\n        iVar2 = sVar3 - sVar1;\n        bVar4 = iVar2 == 0;\n        if (bVar4) {\n          if (pPKey2->nField < 2) {\n            iVar2 = (int)pPKey2->default_rc;\n            pPKey2->eqSeen = '\x01';\n          }\n          else {\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar4 || iVar2 < 0) goto LAB_00055520;\n    }\n    iVar2 = (int)pPKey2->r2;\n  }\nLAB_00055524:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar2;\n}\n\n" comment comment (function_definition "int vdbeRecordCompareString(int nKey1,void *pKey1,UnpackedRecord *pPKey2)\n\n{\n  size_t sVar1;\n  int iVar2;\n  size_t __n;\n  size_t sVar3;\n  int in_GS_OFFSET;\n  bool bVar4;\n  int serial_type;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x55489;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((char)*(byte *)((int)pKey1 + 1) < '\0') {\n    sqlite3GetVarint32((uchar *)((int)pKey1 + 1),(u32 *)&serial_type);\n  }\n  else {\n    serial_type = (int)*(byte *)((int)pKey1 + 1);\n  }\n  if (serial_type < 0xc) {\nLAB_00055520:\n    iVar2 = (int)pPKey2->r1;\n  }\n  else {\n    if ((serial_type & 1U) != 0) {\n                    /* WARNING: Load size is inaccurate */\n      sVar3 = serial_type + -0xc >> 1;\n      if (nKey1 < (int)(*pKey1 + sVar3)) {\n        iVar2 = sqlite3CorruptError(0x13b20);\n        pPKey2->errCode = (u8)iVar2;\n        iVar2 = 0;\n        goto LAB_00055524;\n      }\n      sVar1 = pPKey2->aMem->n;\n      __n = sVar3;\n      if ((int)sVar1 <= (int)sVar3) {\n        __n = sVar1;\n      }\n      iVar2 = memcmp((void *)((uint)*pKey1 + (int)pKey1),pPKey2->aMem->z,__n);\n      bVar4 = iVar2 == 0;\n      if (bVar4) {\n        iVar2 = sVar3 - sVar1;\n        bVar4 = iVar2 == 0;\n        if (bVar4) {\n          if (pPKey2->nField < 2) {\n            iVar2 = (int)pPKey2->default_rc;\n            pPKey2->eqSeen = '\x01';\n          }\n          else {\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar4 || iVar2 < 0) goto LAB_00055520;\n    }\n    iVar2 = (int)pPKey2->r2;\n  }\nLAB_00055524:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar2;\n}" primitive_type (function_declarator "vdbeRecordCompareString(int nKey1,void *pKey1,UnpackedRecord *pPKey2)" identifier (parameter_list "(int nKey1,void *pKey1,UnpackedRecord *pPKey2)" ( (parameter_declaration "int nKey1" primitive_type identifier) , (parameter_declaration "void *pKey1" primitive_type (pointer_declarator "*pKey1" * identifier)) , (parameter_declaration "UnpackedRecord *pPKey2" type_identifier (pointer_declarator "*pPKey2" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  int iVar2;\n  size_t __n;\n  size_t sVar3;\n  int in_GS_OFFSET;\n  bool bVar4;\n  int serial_type;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x55489;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((char)*(byte *)((int)pKey1 + 1) < '\0') {\n    sqlite3GetVarint32((uchar *)((int)pKey1 + 1),(u32 *)&serial_type);\n  }\n  else {\n    serial_type = (int)*(byte *)((int)pKey1 + 1);\n  }\n  if (serial_type < 0xc) {\nLAB_00055520:\n    iVar2 = (int)pPKey2->r1;\n  }\n  else {\n    if ((serial_type & 1U) != 0) {\n                    /* WARNING: Load size is inaccurate */\n      sVar3 = serial_type + -0xc >> 1;\n      if (nKey1 < (int)(*pKey1 + sVar3)) {\n        iVar2 = sqlite3CorruptError(0x13b20);\n        pPKey2->errCode = (u8)iVar2;\n        iVar2 = 0;\n        goto LAB_00055524;\n      }\n      sVar1 = pPKey2->aMem->n;\n      __n = sVar3;\n      if ((int)sVar1 <= (int)sVar3) {\n        __n = sVar1;\n      }\n      iVar2 = memcmp((void *)((uint)*pKey1 + (int)pKey1),pPKey2->aMem->z,__n);\n      bVar4 = iVar2 == 0;\n      if (bVar4) {\n        iVar2 = sVar3 - sVar1;\n        bVar4 = iVar2 == 0;\n        if (bVar4) {\n          if (pPKey2->nField < 2) {\n            iVar2 = (int)pPKey2->default_rc;\n            pPKey2->eqSeen = '\x01';\n          }\n          else {\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar4 || iVar2 < 0) goto LAB_00055520;\n    }\n    iVar2 = (int)pPKey2->r2;\n  }\nLAB_00055524:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar2;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (declaration "int serial_type;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x55489;" (assignment_expression "uStack_14 = 0x55489" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if ((char)*(byte *)((int)pKey1 + 1) < '\0') {\n    sqlite3GetVarint32((uchar *)((int)pKey1 + 1),(u32 *)&serial_type);\n  }\n  else {\n    serial_type = (int)*(byte *)((int)pKey1 + 1);\n  }" if (parenthesized_expression "((char)*(byte *)((int)pKey1 + 1) < '\0')" ( (binary_expression "(char)*(byte *)((int)pKey1 + 1) < '\0'" (cast_expression "(char)*(byte *)((int)pKey1 + 1)" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*(byte *)((int)pKey1 + 1)" * (cast_expression "(byte *)((int)pKey1 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pKey1 + 1)" ( (binary_expression "(int)pKey1 + 1" (cast_expression "(int)pKey1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) < (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    sqlite3GetVarint32((uchar *)((int)pKey1 + 1),(u32 *)&serial_type);\n  }" { (expression_statement "sqlite3GetVarint32((uchar *)((int)pKey1 + 1),(u32 *)&serial_type);" (call_expression "sqlite3GetVarint32((uchar *)((int)pKey1 + 1),(u32 *)&serial_type)" identifier (argument_list "((uchar *)((int)pKey1 + 1),(u32 *)&serial_type)" ( (cast_expression "(uchar *)((int)pKey1 + 1)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pKey1 + 1)" ( (binary_expression "(int)pKey1 + 1" (cast_expression "(int)pKey1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) , (cast_expression "(u32 *)&serial_type" ( (type_descriptor "u32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&serial_type" & identifier)) ))) ;) }) (else_clause "else {\n    serial_type = (int)*(byte *)((int)pKey1 + 1);\n  }" else (compound_statement "{\n    serial_type = (int)*(byte *)((int)pKey1 + 1);\n  }" { (expression_statement "serial_type = (int)*(byte *)((int)pKey1 + 1);" (assignment_expression "serial_type = (int)*(byte *)((int)pKey1 + 1)" identifier = (cast_expression "(int)*(byte *)((int)pKey1 + 1)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(byte *)((int)pKey1 + 1)" * (cast_expression "(byte *)((int)pKey1 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pKey1 + 1)" ( (binary_expression "(int)pKey1 + 1" (cast_expression "(int)pKey1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))))) ;) }))) (if_statement "if (serial_type < 0xc) {\nLAB_00055520:\n    iVar2 = (int)pPKey2->r1;\n  }\n  else {\n    if ((serial_type & 1U) != 0) {\n                    /* WARNING: Load size is inaccurate */\n      sVar3 = serial_type + -0xc >> 1;\n      if (nKey1 < (int)(*pKey1 + sVar3)) {\n        iVar2 = sqlite3CorruptError(0x13b20);\n        pPKey2->errCode = (u8)iVar2;\n        iVar2 = 0;\n        goto LAB_00055524;\n      }\n      sVar1 = pPKey2->aMem->n;\n      __n = sVar3;\n      if ((int)sVar1 <= (int)sVar3) {\n        __n = sVar1;\n      }\n      iVar2 = memcmp((void *)((uint)*pKey1 + (int)pKey1),pPKey2->aMem->z,__n);\n      bVar4 = iVar2 == 0;\n      if (bVar4) {\n        iVar2 = sVar3 - sVar1;\n        bVar4 = iVar2 == 0;\n        if (bVar4) {\n          if (pPKey2->nField < 2) {\n            iVar2 = (int)pPKey2->default_rc;\n            pPKey2->eqSeen = '\x01';\n          }\n          else {\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar4 || iVar2 < 0) goto LAB_00055520;\n    }\n    iVar2 = (int)pPKey2->r2;\n  }" if (parenthesized_expression "(serial_type < 0xc)" ( (binary_expression "serial_type < 0xc" identifier < number_literal) )) (compound_statement "{\nLAB_00055520:\n    iVar2 = (int)pPKey2->r1;\n  }" { (labeled_statement "LAB_00055520:\n    iVar2 = (int)pPKey2->r1;" statement_identifier : (expression_statement "iVar2 = (int)pPKey2->r1;" (assignment_expression "iVar2 = (int)pPKey2->r1" identifier = (cast_expression "(int)pPKey2->r1" ( (type_descriptor "int" primitive_type) ) (field_expression "pPKey2->r1" identifier -> field_identifier))) ;)) }) (else_clause "else {\n    if ((serial_type & 1U) != 0) {\n                    /* WARNING: Load size is inaccurate */\n      sVar3 = serial_type + -0xc >> 1;\n      if (nKey1 < (int)(*pKey1 + sVar3)) {\n        iVar2 = sqlite3CorruptError(0x13b20);\n        pPKey2->errCode = (u8)iVar2;\n        iVar2 = 0;\n        goto LAB_00055524;\n      }\n      sVar1 = pPKey2->aMem->n;\n      __n = sVar3;\n      if ((int)sVar1 <= (int)sVar3) {\n        __n = sVar1;\n      }\n      iVar2 = memcmp((void *)((uint)*pKey1 + (int)pKey1),pPKey2->aMem->z,__n);\n      bVar4 = iVar2 == 0;\n      if (bVar4) {\n        iVar2 = sVar3 - sVar1;\n        bVar4 = iVar2 == 0;\n        if (bVar4) {\n          if (pPKey2->nField < 2) {\n            iVar2 = (int)pPKey2->default_rc;\n            pPKey2->eqSeen = '\x01';\n          }\n          else {\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar4 || iVar2 < 0) goto LAB_00055520;\n    }\n    iVar2 = (int)pPKey2->r2;\n  }" else (compound_statement "{\n    if ((serial_type & 1U) != 0) {\n                    /* WARNING: Load size is inaccurate */\n      sVar3 = serial_type + -0xc >> 1;\n      if (nKey1 < (int)(*pKey1 + sVar3)) {\n        iVar2 = sqlite3CorruptError(0x13b20);\n        pPKey2->errCode = (u8)iVar2;\n        iVar2 = 0;\n        goto LAB_00055524;\n      }\n      sVar1 = pPKey2->aMem->n;\n      __n = sVar3;\n      if ((int)sVar1 <= (int)sVar3) {\n        __n = sVar1;\n      }\n      iVar2 = memcmp((void *)((uint)*pKey1 + (int)pKey1),pPKey2->aMem->z,__n);\n      bVar4 = iVar2 == 0;\n      if (bVar4) {\n        iVar2 = sVar3 - sVar1;\n        bVar4 = iVar2 == 0;\n        if (bVar4) {\n          if (pPKey2->nField < 2) {\n            iVar2 = (int)pPKey2->default_rc;\n            pPKey2->eqSeen = '\x01';\n          }\n          else {\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar4 || iVar2 < 0) goto LAB_00055520;\n    }\n    iVar2 = (int)pPKey2->r2;\n  }" { (if_statement "if ((serial_type & 1U) != 0) {\n                    /* WARNING: Load size is inaccurate */\n      sVar3 = serial_type + -0xc >> 1;\n      if (nKey1 < (int)(*pKey1 + sVar3)) {\n        iVar2 = sqlite3CorruptError(0x13b20);\n        pPKey2->errCode = (u8)iVar2;\n        iVar2 = 0;\n        goto LAB_00055524;\n      }\n      sVar1 = pPKey2->aMem->n;\n      __n = sVar3;\n      if ((int)sVar1 <= (int)sVar3) {\n        __n = sVar1;\n      }\n      iVar2 = memcmp((void *)((uint)*pKey1 + (int)pKey1),pPKey2->aMem->z,__n);\n      bVar4 = iVar2 == 0;\n      if (bVar4) {\n        iVar2 = sVar3 - sVar1;\n        bVar4 = iVar2 == 0;\n        if (bVar4) {\n          if (pPKey2->nField < 2) {\n            iVar2 = (int)pPKey2->default_rc;\n            pPKey2->eqSeen = '\x01';\n          }\n          else {\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar4 || iVar2 < 0) goto LAB_00055520;\n    }" if (parenthesized_expression "((serial_type & 1U) != 0)" ( (binary_expression "(serial_type & 1U) != 0" (parenthesized_expression "(serial_type & 1U)" ( (binary_expression "serial_type & 1U" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n                    /* WARNING: Load size is inaccurate */\n      sVar3 = serial_type + -0xc >> 1;\n      if (nKey1 < (int)(*pKey1 + sVar3)) {\n        iVar2 = sqlite3CorruptError(0x13b20);\n        pPKey2->errCode = (u8)iVar2;\n        iVar2 = 0;\n        goto LAB_00055524;\n      }\n      sVar1 = pPKey2->aMem->n;\n      __n = sVar3;\n      if ((int)sVar1 <= (int)sVar3) {\n        __n = sVar1;\n      }\n      iVar2 = memcmp((void *)((uint)*pKey1 + (int)pKey1),pPKey2->aMem->z,__n);\n      bVar4 = iVar2 == 0;\n      if (bVar4) {\n        iVar2 = sVar3 - sVar1;\n        bVar4 = iVar2 == 0;\n        if (bVar4) {\n          if (pPKey2->nField < 2) {\n            iVar2 = (int)pPKey2->default_rc;\n            pPKey2->eqSeen = '\x01';\n          }\n          else {\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar4 || iVar2 < 0) goto LAB_00055520;\n    }" { comment (expression_statement "sVar3 = serial_type + -0xc >> 1;" (assignment_expression "sVar3 = serial_type + -0xc >> 1" identifier = (binary_expression "serial_type + -0xc >> 1" (binary_expression "serial_type + -0xc" identifier + number_literal) >> number_literal)) ;) (if_statement "if (nKey1 < (int)(*pKey1 + sVar3)) {\n        iVar2 = sqlite3CorruptError(0x13b20);\n        pPKey2->errCode = (u8)iVar2;\n        iVar2 = 0;\n        goto LAB_00055524;\n      }" if (parenthesized_expression "(nKey1 < (int)(*pKey1 + sVar3))" ( (binary_expression "nKey1 < (int)(*pKey1 + sVar3)" identifier < (cast_expression "(int)(*pKey1 + sVar3)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(*pKey1 + sVar3)" ( (binary_expression "*pKey1 + sVar3" (pointer_expression "*pKey1" * identifier) + identifier) )))) )) (compound_statement "{\n        iVar2 = sqlite3CorruptError(0x13b20);\n        pPKey2->errCode = (u8)iVar2;\n        iVar2 = 0;\n        goto LAB_00055524;\n      }" { (expression_statement "iVar2 = sqlite3CorruptError(0x13b20);" (assignment_expression "iVar2 = sqlite3CorruptError(0x13b20)" identifier = (call_expression "sqlite3CorruptError(0x13b20)" identifier (argument_list "(0x13b20)" ( number_literal )))) ;) (expression_statement "pPKey2->errCode = (u8)iVar2;" (assignment_expression "pPKey2->errCode = (u8)iVar2" (field_expression "pPKey2->errCode" identifier -> field_identifier) = (cast_expression "(u8)iVar2" ( (type_descriptor "u8" type_identifier) ) identifier)) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_00055524;" goto statement_identifier ;) })) (expression_statement "sVar1 = pPKey2->aMem->n;" (assignment_expression "sVar1 = pPKey2->aMem->n" identifier = (field_expression "pPKey2->aMem->n" (field_expression "pPKey2->aMem" identifier -> field_identifier) -> field_identifier)) ;) (expression_statement "__n = sVar3;" (assignment_expression "__n = sVar3" identifier = identifier) ;) (if_statement "if ((int)sVar1 <= (int)sVar3) {\n        __n = sVar1;\n      }" if (parenthesized_expression "((int)sVar1 <= (int)sVar3)" ( (binary_expression "(int)sVar1 <= (int)sVar3" (cast_expression "(int)sVar1" ( (type_descriptor "int" primitive_type) ) identifier) <= (cast_expression "(int)sVar3" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n        __n = sVar1;\n      }" { (expression_statement "__n = sVar1;" (assignment_expression "__n = sVar1" identifier = identifier) ;) })) (expression_statement "iVar2 = memcmp((void *)((uint)*pKey1 + (int)pKey1),pPKey2->aMem->z,__n);" (assignment_expression "iVar2 = memcmp((void *)((uint)*pKey1 + (int)pKey1),pPKey2->aMem->z,__n)" identifier = (call_expression "memcmp((void *)((uint)*pKey1 + (int)pKey1),pPKey2->aMem->z,__n)" identifier (argument_list "((void *)((uint)*pKey1 + (int)pKey1),pPKey2->aMem->z,__n)" ( (cast_expression "(void *)((uint)*pKey1 + (int)pKey1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)*pKey1 + (int)pKey1)" ( (binary_expression "(uint)*pKey1 + (int)pKey1" (binary_expression "(uint)*pKey1" (parenthesized_expression "(uint)" ( identifier )) * identifier) + (cast_expression "(int)pKey1" ( (type_descriptor "int" primitive_type) ) identifier)) ))) , (field_expression "pPKey2->aMem->z" (field_expression "pPKey2->aMem" identifier -> field_identifier) -> field_identifier) , identifier )))) ;) (expression_statement "bVar4 = iVar2 == 0;" (assignment_expression "bVar4 = iVar2 == 0" identifier = (binary_expression "iVar2 == 0" identifier == number_literal)) ;) (if_statement "if (bVar4) {\n        iVar2 = sVar3 - sVar1;\n        bVar4 = iVar2 == 0;\n        if (bVar4) {\n          if (pPKey2->nField < 2) {\n            iVar2 = (int)pPKey2->default_rc;\n            pPKey2->eqSeen = '\x01';\n          }\n          else {\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }\n          goto LAB_00055524;\n        }\n      }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n        iVar2 = sVar3 - sVar1;\n        bVar4 = iVar2 == 0;\n        if (bVar4) {\n          if (pPKey2->nField < 2) {\n            iVar2 = (int)pPKey2->default_rc;\n            pPKey2->eqSeen = '\x01';\n          }\n          else {\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }\n          goto LAB_00055524;\n        }\n      }" { (expression_statement "iVar2 = sVar3 - sVar1;" (assignment_expression "iVar2 = sVar3 - sVar1" identifier = (binary_expression "sVar3 - sVar1" identifier - identifier)) ;) (expression_statement "bVar4 = iVar2 == 0;" (assignment_expression "bVar4 = iVar2 == 0" identifier = (binary_expression "iVar2 == 0" identifier == number_literal)) ;) (if_statement "if (bVar4) {\n          if (pPKey2->nField < 2) {\n            iVar2 = (int)pPKey2->default_rc;\n            pPKey2->eqSeen = '\x01';\n          }\n          else {\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }\n          goto LAB_00055524;\n        }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n          if (pPKey2->nField < 2) {\n            iVar2 = (int)pPKey2->default_rc;\n            pPKey2->eqSeen = '\x01';\n          }\n          else {\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }\n          goto LAB_00055524;\n        }" { (if_statement "if (pPKey2->nField < 2) {\n            iVar2 = (int)pPKey2->default_rc;\n            pPKey2->eqSeen = '\x01';\n          }\n          else {\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }" if (parenthesized_expression "(pPKey2->nField < 2)" ( (binary_expression "pPKey2->nField < 2" (field_expression "pPKey2->nField" identifier -> field_identifier) < number_literal) )) (compound_statement "{\n            iVar2 = (int)pPKey2->default_rc;\n            pPKey2->eqSeen = '\x01';\n          }" { (expression_statement "iVar2 = (int)pPKey2->default_rc;" (assignment_expression "iVar2 = (int)pPKey2->default_rc" identifier = (cast_expression "(int)pPKey2->default_rc" ( (type_descriptor "int" primitive_type) ) (field_expression "pPKey2->default_rc" identifier -> field_identifier))) ;) (expression_statement "pPKey2->eqSeen = '\x01';" (assignment_expression "pPKey2->eqSeen = '\x01'" (field_expression "pPKey2->eqSeen" identifier -> field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) }) (else_clause "else {\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }" else (compound_statement "{\n            iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);\n          }" { (expression_statement "iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1);" (assignment_expression "iVar2 = sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1)" identifier = (call_expression "sqlite3VdbeRecordCompareWithSkip(nKey1,pKey1,pPKey2,1)" identifier (argument_list "(nKey1,pKey1,pPKey2,1)" ( identifier , identifier , identifier , number_literal )))) ;) }))) (goto_statement "goto LAB_00055524;" goto statement_identifier ;) })) })) (if_statement "if (bVar4 || iVar2 < 0) goto LAB_00055520;" if (parenthesized_expression "(bVar4 || iVar2 < 0)" ( (binary_expression "bVar4 || iVar2 < 0" identifier || (binary_expression "iVar2 < 0" identifier < number_literal)) )) (goto_statement "goto LAB_00055520;" goto statement_identifier ;)) })) (expression_statement "iVar2 = (int)pPKey2->r2;" (assignment_expression "iVar2 = (int)pPKey2->r2" identifier = (cast_expression "(int)pPKey2->r2" ( (type_descriptor "int" primitive_type) ) (field_expression "pPKey2->r2" identifier -> field_identifier))) ;) }))) (labeled_statement "LAB_00055524:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int FUN_00055480(int param_1,byte *param_2,int param_3)\n\n{\n  int iVar1;\n  size_t sVar2;\n  undefined1 uVar3;\n  int iVar4;\n  size_t __n;\n  size_t sVar5;\n  int in_GS_OFFSET;\n  bool bVar6;\n  uint local_24;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((char)param_2[1] < '\0') {\n    FUN_0002a260();\n  }\n  else {\n    local_24 = (uint)param_2[1];\n  }\n  if ((int)local_24 < 0xc) {\nLAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);\n  }\n  else {\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }\nLAB_00055524:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }\n  return iVar4;\n}\n\n" (function_definition "int FUN_00055480(int param_1,byte *param_2,int param_3)\n\n{\n  int iVar1;\n  size_t sVar2;\n  undefined1 uVar3;\n  int iVar4;\n  size_t __n;\n  size_t sVar5;\n  int in_GS_OFFSET;\n  bool bVar6;\n  uint local_24;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((char)param_2[1] < '\0') {\n    FUN_0002a260();\n  }\n  else {\n    local_24 = (uint)param_2[1];\n  }\n  if ((int)local_24 < 0xc) {\nLAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);\n  }\n  else {\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }\nLAB_00055524:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }\n  return iVar4;\n}" primitive_type (function_declarator "FUN_00055480(int param_1,byte *param_2,int param_3)" identifier (parameter_list "(int param_1,byte *param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  undefined1 uVar3;\n  int iVar4;\n  size_t __n;\n  size_t sVar5;\n  int in_GS_OFFSET;\n  bool bVar6;\n  uint local_24;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((char)param_2[1] < '\0') {\n    FUN_0002a260();\n  }\n  else {\n    local_24 = (uint)param_2[1];\n  }\n  if ((int)local_24 < 0xc) {\nLAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);\n  }\n  else {\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }\nLAB_00055524:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }\n  return iVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "undefined1 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "uint local_24;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if ((char)param_2[1] < '\0') {\n    FUN_0002a260();\n  }\n  else {\n    local_24 = (uint)param_2[1];\n  }" if (parenthesized_expression "((char)param_2[1] < '\0')" ( (binary_expression "(char)param_2[1] < '\0'" (cast_expression "(char)param_2[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_2[1]" identifier [ number_literal ])) < (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    FUN_0002a260();\n  }" { (expression_statement "FUN_0002a260();" (call_expression "FUN_0002a260()" identifier (argument_list "()" ( ))) ;) }) (else_clause "else {\n    local_24 = (uint)param_2[1];\n  }" else (compound_statement "{\n    local_24 = (uint)param_2[1];\n  }" { (expression_statement "local_24 = (uint)param_2[1];" (assignment_expression "local_24 = (uint)param_2[1]" identifier = (cast_expression "(uint)param_2[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_2[1]" identifier [ number_literal ]))) ;) }))) (if_statement "if ((int)local_24 < 0xc) {\nLAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);\n  }\n  else {\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }" if (parenthesized_expression "((int)local_24 < 0xc)" ( (binary_expression "(int)local_24 < 0xc" (cast_expression "(int)local_24" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\nLAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);\n  }" { (labeled_statement "LAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);" statement_identifier : (expression_statement "iVar4 = (int)*(char *)(param_3 + 0xc);" (assignment_expression "iVar4 = (int)*(char *)(param_3 + 0xc)" identifier = (cast_expression "(int)*(char *)(param_3 + 0xc)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(char *)(param_3 + 0xc)" * (cast_expression "(char *)(param_3 + 0xc)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc)" ( (binary_expression "param_3 + 0xc" identifier + number_literal) )))))) ;)) }) (else_clause "else {\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }" else (compound_statement "{\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }" { (if_statement "if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }" if (parenthesized_expression "((local_24 & 1) != 0)" ( (binary_expression "(local_24 & 1) != 0" (parenthesized_expression "(local_24 & 1)" ( (binary_expression "local_24 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }" { (expression_statement "sVar5 = (int)(local_24 - 0xc) >> 1;" (assignment_expression "sVar5 = (int)(local_24 - 0xc) >> 1" identifier = (binary_expression "(int)(local_24 - 0xc) >> 1" (cast_expression "(int)(local_24 - 0xc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(local_24 - 0xc)" ( (binary_expression "local_24 - 0xc" identifier - number_literal) ))) >> number_literal)) ;) (if_statement "if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }" if (parenthesized_expression "(param_1 < (int)(*param_2 + sVar5))" ( (binary_expression "param_1 < (int)(*param_2 + sVar5)" identifier < (cast_expression "(int)(*param_2 + sVar5)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(*param_2 + sVar5)" ( (binary_expression "*param_2 + sVar5" (pointer_expression "*param_2" * identifier) + identifier) )))) )) (compound_statement "{\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }" { (expression_statement "uVar3 = FUN_00052b70();" (assignment_expression "uVar3 = FUN_00052b70()" identifier = (call_expression "FUN_00052b70()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(undefined1 *)(param_3 + 0xb) = uVar3;" (assignment_expression "*(undefined1 *)(param_3 + 0xb) = uVar3" (pointer_expression "*(undefined1 *)(param_3 + 0xb)" * (cast_expression "(undefined1 *)(param_3 + 0xb)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xb)" ( (binary_expression "param_3 + 0xb" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_00055524;" goto statement_identifier ;) })) (expression_statement "sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);" (assignment_expression "sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc)" identifier = (pointer_expression "*(size_t *)(*(int *)(param_3 + 4) + 0xc)" * (cast_expression "(size_t *)(*(int *)(param_3 + 4) + 0xc)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_3 + 4) + 0xc)" ( (binary_expression "*(int *)(param_3 + 4) + 0xc" (pointer_expression "*(int *)(param_3 + 4)" * (cast_expression "(int *)(param_3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "__n = sVar5;" (assignment_expression "__n = sVar5" identifier = identifier) ;) (if_statement "if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }" if (parenthesized_expression "((int)sVar2 <= (int)sVar5)" ( (binary_expression "(int)sVar2 <= (int)sVar5" (cast_expression "(int)sVar2" ( (type_descriptor "int" primitive_type) ) identifier) <= (cast_expression "(int)sVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n        __n = sVar2;\n      }" { (expression_statement "__n = sVar2;" (assignment_expression "__n = sVar2" identifier = identifier) ;) })) (expression_statement "iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);" (assignment_expression "iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n)" identifier = (call_expression "memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n)" identifier (argument_list "(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n)" ( (binary_expression "param_2 + *param_2" identifier + (pointer_expression "*param_2" * identifier)) , (pointer_expression "*(void **)(*(int *)(param_3 + 4) + 0x10)" * (cast_expression "(void **)(*(int *)(param_3 + 4) + 0x10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(param_3 + 4) + 0x10)" ( (binary_expression "*(int *)(param_3 + 4) + 0x10" (pointer_expression "*(int *)(param_3 + 4)" * (cast_expression "(int *)(param_3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) + number_literal) )))) , identifier )))) ;) (expression_statement "bVar6 = iVar4 == 0;" (assignment_expression "bVar6 = iVar4 == 0" identifier = (binary_expression "iVar4 == 0" identifier == number_literal)) ;) (if_statement "if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }" if (parenthesized_expression "(bVar6)" ( identifier )) (compound_statement "{\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }" { (expression_statement "iVar4 = sVar5 - sVar2;" (assignment_expression "iVar4 = sVar5 - sVar2" identifier = (binary_expression "sVar5 - sVar2" identifier - identifier)) ;) (expression_statement "bVar6 = iVar4 == 0;" (assignment_expression "bVar6 = iVar4 == 0" identifier = (binary_expression "iVar4 == 0" identifier == number_literal)) ;) (if_statement "if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }" if (parenthesized_expression "(bVar6)" ( identifier )) (compound_statement "{\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }" { (if_statement "if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }" if (parenthesized_expression "(*(ushort *)(param_3 + 8) < 2)" ( (binary_expression "*(ushort *)(param_3 + 8) < 2" (pointer_expression "*(ushort *)(param_3 + 8)" * (cast_expression "(ushort *)(param_3 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 8)" ( (binary_expression "param_3 + 8" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }" { (expression_statement "iVar4 = (int)*(char *)(param_3 + 10);" (assignment_expression "iVar4 = (int)*(char *)(param_3 + 10)" identifier = (cast_expression "(int)*(char *)(param_3 + 10)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(char *)(param_3 + 10)" * (cast_expression "(char *)(param_3 + 10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 10)" ( (binary_expression "param_3 + 10" identifier + number_literal) )))))) ;) (expression_statement "*(undefined1 *)(param_3 + 0xe) = 1;" (assignment_expression "*(undefined1 *)(param_3 + 0xe) = 1" (pointer_expression "*(undefined1 *)(param_3 + 0xe)" * (cast_expression "(undefined1 *)(param_3 + 0xe)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xe)" ( (binary_expression "param_3 + 0xe" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n            iVar4 = FUN_00054910(1);\n          }" else (compound_statement "{\n            iVar4 = FUN_00054910(1);\n          }" { (expression_statement "iVar4 = FUN_00054910(1);" (assignment_expression "iVar4 = FUN_00054910(1)" identifier = (call_expression "FUN_00054910(1)" identifier (argument_list "(1)" ( number_literal )))) ;) }))) (goto_statement "goto LAB_00055524;" goto statement_identifier ;) })) })) (if_statement "if (bVar6 || iVar4 < 0) goto LAB_00055520;" if (parenthesized_expression "(bVar6 || iVar4 < 0)" ( (binary_expression "bVar6 || iVar4 < 0" identifier || (binary_expression "iVar4 < 0" identifier < number_literal)) )) (goto_statement "goto LAB_00055520;" goto statement_identifier ;)) })) (expression_statement "iVar4 = (int)*(char *)(param_3 + 0xd);" (assignment_expression "iVar4 = (int)*(char *)(param_3 + 0xd)" identifier = (cast_expression "(int)*(char *)(param_3 + 0xd)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(char *)(param_3 + 0xd)" * (cast_expression "(char *)(param_3 + 0xd)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xd)" ( (binary_expression "param_3 + 0xd" identifier + number_literal) )))))) ;) }))) (labeled_statement "LAB_00055524:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }" statement_identifier : (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_000f6410();\n  }" { (expression_statement "FUN_000f6410();" (call_expression "FUN_000f6410()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) < (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;)) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT - LIT) ))) >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + IDENT) )))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) <= (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + (pointer_expression * IDENT)) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (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) )))) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) }))) (goto_statement goto statement_identifier ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT || (binary_expression IDENT < LIT)) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) }))) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "int FUN_00055480(int param_1,byte *param_2,int param_3)\n\n{\n  int iVar1;\n  size_t sVar2;\n  undefined1 uVar3;\n  int iVar4;\n  size_t __n;\n  size_t sVar5;\n  int in_GS_OFFSET;\n  bool bVar6;\n  uint local_24;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((char)param_2[1] < '\0') {\n    FUN_0002a260();\n  }\n  else {\n    local_24 = (uint)param_2[1];\n  }\n  if ((int)local_24 < 0xc) {\nLAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);\n  }\n  else {\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }\nLAB_00055524:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }\n  return iVar4;\n}" (primitive_type "int") (function_declarator "FUN_00055480(int param_1,byte *param_2,int param_3)" (identifier "FUN_00055480") (parameter_list "(int param_1,byte *param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "byte *param_2" (type_identifier "byte") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  undefined1 uVar3;\n  int iVar4;\n  size_t __n;\n  size_t sVar5;\n  int in_GS_OFFSET;\n  bool bVar6;\n  uint local_24;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((char)param_2[1] < '\0') {\n    FUN_0002a260();\n  }\n  else {\n    local_24 = (uint)param_2[1];\n  }\n  if ((int)local_24 < 0xc) {\nLAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);\n  }\n  else {\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }\nLAB_00055524:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }\n  return iVar4;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "undefined1 uVar3;" (type_identifier "undefined1") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "size_t sVar5;" (primitive_type "size_t") (identifier "sVar5") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "bool bVar6;" (primitive_type "bool") (identifier "bVar6") (; ";")) (declaration "uint local_24;" (type_identifier "uint") (identifier "local_24") (; ";")) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if ((char)param_2[1] < '\0') {\n    FUN_0002a260();\n  }\n  else {\n    local_24 = (uint)param_2[1];\n  }" (if "if") (parenthesized_expression "((char)param_2[1] < '\0')" (( "(") (binary_expression "(char)param_2[1] < '\0'" (cast_expression "(char)param_2[1]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))) (< "<") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    FUN_0002a260();\n  }" ({ "{") (expression_statement "FUN_0002a260();" (call_expression "FUN_0002a260()" (identifier "FUN_0002a260") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")) (else_clause "else {\n    local_24 = (uint)param_2[1];\n  }" (else "else") (compound_statement "{\n    local_24 = (uint)param_2[1];\n  }" ({ "{") (expression_statement "local_24 = (uint)param_2[1];" (assignment_expression "local_24 = (uint)param_2[1]" (identifier "local_24") (= "=") (cast_expression "(uint)param_2[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")))) (; ";")) (} "}")))) (if_statement "if ((int)local_24 < 0xc) {\nLAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);\n  }\n  else {\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }" (if "if") (parenthesized_expression "((int)local_24 < 0xc)" (( "(") (binary_expression "(int)local_24 < 0xc" (cast_expression "(int)local_24" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_24")) (< "<") (number_literal "0xc")) () ")")) (compound_statement "{\nLAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);\n  }" ({ "{") (labeled_statement "LAB_00055520:\n    iVar4 = (int)*(char *)(param_3 + 0xc);" (statement_identifier "LAB_00055520") (: ":") (expression_statement "iVar4 = (int)*(char *)(param_3 + 0xc);" (assignment_expression "iVar4 = (int)*(char *)(param_3 + 0xc)" (identifier "iVar4") (= "=") (cast_expression "(int)*(char *)(param_3 + 0xc)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*(char *)(param_3 + 0xc)" (* "*") (cast_expression "(char *)(param_3 + 0xc)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xc)" (( "(") (binary_expression "param_3 + 0xc" (identifier "param_3") (+ "+") (number_literal "0xc")) () ")")))))) (; ";"))) (} "}")) (else_clause "else {\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }" (else "else") (compound_statement "{\n    if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }\n    iVar4 = (int)*(char *)(param_3 + 0xd);\n  }" ({ "{") (if_statement "if ((local_24 & 1) != 0) {\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }" (if "if") (parenthesized_expression "((local_24 & 1) != 0)" (( "(") (binary_expression "(local_24 & 1) != 0" (parenthesized_expression "(local_24 & 1)" (( "(") (binary_expression "local_24 & 1" (identifier "local_24") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      sVar5 = (int)(local_24 - 0xc) >> 1;\n      if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }\n      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);\n      __n = sVar5;\n      if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }\n      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);\n      bVar6 = iVar4 == 0;\n      if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }\n      if (bVar6 || iVar4 < 0) goto LAB_00055520;\n    }" ({ "{") (expression_statement "sVar5 = (int)(local_24 - 0xc) >> 1;" (assignment_expression "sVar5 = (int)(local_24 - 0xc) >> 1" (identifier "sVar5") (= "=") (binary_expression "(int)(local_24 - 0xc) >> 1" (cast_expression "(int)(local_24 - 0xc)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(local_24 - 0xc)" (( "(") (binary_expression "local_24 - 0xc" (identifier "local_24") (- "-") (number_literal "0xc")) () ")"))) (>> ">>") (number_literal "1"))) (; ";")) (if_statement "if (param_1 < (int)(*param_2 + sVar5)) {\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }" (if "if") (parenthesized_expression "(param_1 < (int)(*param_2 + sVar5))" (( "(") (binary_expression "param_1 < (int)(*param_2 + sVar5)" (identifier "param_1") (< "<") (cast_expression "(int)(*param_2 + sVar5)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(*param_2 + sVar5)" (( "(") (binary_expression "*param_2 + sVar5" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (+ "+") (identifier "sVar5")) () ")")))) () ")")) (compound_statement "{\n        uVar3 = FUN_00052b70();\n        *(undefined1 *)(param_3 + 0xb) = uVar3;\n        iVar4 = 0;\n        goto LAB_00055524;\n      }" ({ "{") (expression_statement "uVar3 = FUN_00052b70();" (assignment_expression "uVar3 = FUN_00052b70()" (identifier "uVar3") (= "=") (call_expression "FUN_00052b70()" (identifier "FUN_00052b70") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*(undefined1 *)(param_3 + 0xb) = uVar3;" (assignment_expression "*(undefined1 *)(param_3 + 0xb) = uVar3" (pointer_expression "*(undefined1 *)(param_3 + 0xb)" (* "*") (cast_expression "(undefined1 *)(param_3 + 0xb)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xb)" (( "(") (binary_expression "param_3 + 0xb" (identifier "param_3") (+ "+") (number_literal "0xb")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_00055524;" (goto "goto") (statement_identifier "LAB_00055524") (; ";")) (} "}"))) (expression_statement "sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);" (assignment_expression "sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc)" (identifier "sVar2") (= "=") (pointer_expression "*(size_t *)(*(int *)(param_3 + 4) + 0xc)" (* "*") (cast_expression "(size_t *)(*(int *)(param_3 + 4) + 0xc)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_3 + 4) + 0xc)" (( "(") (binary_expression "*(int *)(param_3 + 4) + 0xc" (pointer_expression "*(int *)(param_3 + 4)" (* "*") (cast_expression "(int *)(param_3 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 4)" (( "(") (binary_expression "param_3 + 4" (identifier "param_3") (+ "+") (number_literal "4")) () ")")))) (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "__n = sVar5;" (assignment_expression "__n = sVar5" (identifier "__n") (= "=") (identifier "sVar5")) (; ";")) (if_statement "if ((int)sVar2 <= (int)sVar5) {\n        __n = sVar2;\n      }" (if "if") (parenthesized_expression "((int)sVar2 <= (int)sVar5)" (( "(") (binary_expression "(int)sVar2 <= (int)sVar5" (cast_expression "(int)sVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "sVar2")) (<= "<=") (cast_expression "(int)sVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "sVar5"))) () ")")) (compound_statement "{\n        __n = sVar2;\n      }" ({ "{") (expression_statement "__n = sVar2;" (assignment_expression "__n = sVar2" (identifier "__n") (= "=") (identifier "sVar2")) (; ";")) (} "}"))) (expression_statement "iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);" (assignment_expression "iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n)" (identifier "iVar4") (= "=") (call_expression "memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n)" (identifier "memcmp") (argument_list "(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n)" (( "(") (binary_expression "param_2 + *param_2" (identifier "param_2") (+ "+") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (, ",") (pointer_expression "*(void **)(*(int *)(param_3 + 4) + 0x10)" (* "*") (cast_expression "(void **)(*(int *)(param_3 + 4) + 0x10)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(param_3 + 4) + 0x10)" (( "(") (binary_expression "*(int *)(param_3 + 4) + 0x10" (pointer_expression "*(int *)(param_3 + 4)" (* "*") (cast_expression "(int *)(param_3 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 4)" (( "(") (binary_expression "param_3 + 4" (identifier "param_3") (+ "+") (number_literal "4")) () ")")))) (+ "+") (number_literal "0x10")) () ")")))) (, ",") (identifier "__n") () ")")))) (; ";")) (expression_statement "bVar6 = iVar4 == 0;" (assignment_expression "bVar6 = iVar4 == 0" (identifier "bVar6") (= "=") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0"))) (; ";")) (if_statement "if (bVar6) {\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }" (if "if") (parenthesized_expression "(bVar6)" (( "(") (identifier "bVar6") () ")")) (compound_statement "{\n        iVar4 = sVar5 - sVar2;\n        bVar6 = iVar4 == 0;\n        if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }\n      }" ({ "{") (expression_statement "iVar4 = sVar5 - sVar2;" (assignment_expression "iVar4 = sVar5 - sVar2" (identifier "iVar4") (= "=") (binary_expression "sVar5 - sVar2" (identifier "sVar5") (- "-") (identifier "sVar2"))) (; ";")) (expression_statement "bVar6 = iVar4 == 0;" (assignment_expression "bVar6 = iVar4 == 0" (identifier "bVar6") (= "=") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0"))) (; ";")) (if_statement "if (bVar6) {\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }" (if "if") (parenthesized_expression "(bVar6)" (( "(") (identifier "bVar6") () ")")) (compound_statement "{\n          if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }\n          goto LAB_00055524;\n        }" ({ "{") (if_statement "if (*(ushort *)(param_3 + 8) < 2) {\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }\n          else {\n            iVar4 = FUN_00054910(1);\n          }" (if "if") (parenthesized_expression "(*(ushort *)(param_3 + 8) < 2)" (( "(") (binary_expression "*(ushort *)(param_3 + 8) < 2" (pointer_expression "*(ushort *)(param_3 + 8)" (* "*") (cast_expression "(ushort *)(param_3 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 8)" (( "(") (binary_expression "param_3 + 8" (identifier "param_3") (+ "+") (number_literal "8")) () ")")))) (< "<") (number_literal "2")) () ")")) (compound_statement "{\n            iVar4 = (int)*(char *)(param_3 + 10);\n            *(undefined1 *)(param_3 + 0xe) = 1;\n          }" ({ "{") (expression_statement "iVar4 = (int)*(char *)(param_3 + 10);" (assignment_expression "iVar4 = (int)*(char *)(param_3 + 10)" (identifier "iVar4") (= "=") (cast_expression "(int)*(char *)(param_3 + 10)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*(char *)(param_3 + 10)" (* "*") (cast_expression "(char *)(param_3 + 10)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 10)" (( "(") (binary_expression "param_3 + 10" (identifier "param_3") (+ "+") (number_literal "10")) () ")")))))) (; ";")) (expression_statement "*(undefined1 *)(param_3 + 0xe) = 1;" (assignment_expression "*(undefined1 *)(param_3 + 0xe) = 1" (pointer_expression "*(undefined1 *)(param_3 + 0xe)" (* "*") (cast_expression "(undefined1 *)(param_3 + 0xe)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xe)" (( "(") (binary_expression "param_3 + 0xe" (identifier "param_3") (+ "+") (number_literal "0xe")) () ")")))) (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n            iVar4 = FUN_00054910(1);\n          }" (else "else") (compound_statement "{\n            iVar4 = FUN_00054910(1);\n          }" ({ "{") (expression_statement "iVar4 = FUN_00054910(1);" (assignment_expression "iVar4 = FUN_00054910(1)" (identifier "iVar4") (= "=") (call_expression "FUN_00054910(1)" (identifier "FUN_00054910") (argument_list "(1)" (( "(") (number_literal "1") () ")")))) (; ";")) (} "}")))) (goto_statement "goto LAB_00055524;" (goto "goto") (statement_identifier "LAB_00055524") (; ";")) (} "}"))) (} "}"))) (if_statement "if (bVar6 || iVar4 < 0) goto LAB_00055520;" (if "if") (parenthesized_expression "(bVar6 || iVar4 < 0)" (( "(") (binary_expression "bVar6 || iVar4 < 0" (identifier "bVar6") (|| "||") (binary_expression "iVar4 < 0" (identifier "iVar4") (< "<") (number_literal "0"))) () ")")) (goto_statement "goto LAB_00055520;" (goto "goto") (statement_identifier "LAB_00055520") (; ";"))) (} "}"))) (expression_statement "iVar4 = (int)*(char *)(param_3 + 0xd);" (assignment_expression "iVar4 = (int)*(char *)(param_3 + 0xd)" (identifier "iVar4") (= "=") (cast_expression "(int)*(char *)(param_3 + 0xd)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*(char *)(param_3 + 0xd)" (* "*") (cast_expression "(char *)(param_3 + 0xd)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xd)" (( "(") (binary_expression "param_3 + 0xd" (identifier "param_3") (+ "+") (number_literal "0xd")) () ")")))))) (; ";")) (} "}")))) (labeled_statement "LAB_00055524:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }" (statement_identifier "LAB_00055524") (: ":") (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }" (if "if") (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_000f6410();\n  }" ({ "{") (expression_statement "FUN_000f6410();" (call_expression "FUN_000f6410()" (identifier "FUN_000f6410") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int function_1(int var_4,void *var_8,type_1 *pPKey2)

{
  size_t var_10;
  int var_9;
  size_t __n;
  size_t var_5;
  int var_1;
  bool var_12;
  int var_3;
  int var_13;
  type_2 uStack_14;
  
  uStack_14 = 0x55489;
  var_13 = *(int *)(var_1 + 0x14);
  if ((char)*(type_3 *)((int)var_8 + 1) < '\0') {
    var_2((type_4 *)((int)var_8 + 1),(type_5 *)&var_3);
  }
  else {
    var_3 = (int)*(type_3 *)((int)var_8 + 1);
  }
  if (var_3 < 0xc) {
LAB_00055520:
    var_9 = (int)pPKey2->r1;
  }
  else {
    if ((var_3 & 1U) != 0) {
                    /* WARNING: Load size is inaccurate */
      var_5 = var_3 + -0xc >> 1;
      if (var_4 < (int)(*var_8 + var_5)) {
        var_9 = var_6(0x13b20);
        pPKey2->errCode = (type_6)var_9;
        var_9 = 0;
        goto LAB_00055524;
      }
      var_10 = pPKey2->aMem->n;
      __n = var_5;
      if ((int)var_10 <= (int)var_5) {
        __n = var_10;
      }
      var_9 = var_7((void *)((uint)*var_8 + (int)var_8),pPKey2->aMem->z,__n);
      var_12 = var_9 == 0;
      if (var_12) {
        var_9 = var_5 - var_10;
        var_12 = var_9 == 0;
        if (var_12) {
          if (pPKey2->nField < 2) {
            var_9 = (int)pPKey2->default_rc;
            pPKey2->eqSeen = '\x01';
          }
          else {
            var_9 = var_11(var_4,var_8,pPKey2,1);
          }
          goto LAB_00055524;
        }
      }
      if (var_12 || var_9 < 0) goto LAB_00055520;
    }
    var_9 = (int)pPKey2->r2;
  }
LAB_00055524:
  if (var_13 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_14();
  }
  return var_9;
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

int MASKED(int param_1,byte *param_2,int param_3)

{
  int iVar1;
  size_t sVar2;
  undefined1 uVar3;
  int iVar4;
  size_t __n;
  size_t sVar5;
  int in_GS_OFFSET;
  bool bVar6;
  uint local_24;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if ((char)param_2[1] < '\0') {
    FUN_0002a260();
  }
  else {
    local_24 = (uint)param_2[1];
  }
  if ((int)local_24 < 0xc) {
LAB_00055520:
    iVar4 = (int)*(char *)(param_3 + 0xc);
  }
  else {
    if ((local_24 & 1) != 0) {
      sVar5 = (int)(local_24 - 0xc) >> 1;
      if (param_1 < (int)(*param_2 + sVar5)) {
        uVar3 = FUN_00052b70();
        *(undefined1 *)(param_3 + 0xb) = uVar3;
        iVar4 = 0;
        goto LAB_00055524;
      }
      sVar2 = *(size_t *)(*(int *)(param_3 + 4) + 0xc);
      __n = sVar5;
      if ((int)sVar2 <= (int)sVar5) {
        __n = sVar2;
      }
      iVar4 = memcmp(param_2 + *param_2,*(void **)(*(int *)(param_3 + 4) + 0x10),__n);
      bVar6 = iVar4 == 0;
      if (bVar6) {
        iVar4 = sVar5 - sVar2;
        bVar6 = iVar4 == 0;
        if (bVar6) {
          if (*(ushort *)(param_3 + 8) < 2) {
            iVar4 = (int)*(char *)(param_3 + 10);
            *(undefined1 *)(param_3 + 0xe) = 1;
          }
          else {
            iVar4 = FUN_00054910(1);
          }
          goto LAB_00055524;
        }
      }
      if (bVar6 || iVar4 < 0) goto LAB_00055520;
    }
    iVar4 = (int)*(char *)(param_3 + 0xd);
  }
LAB_00055524:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_000f6410();
  }
  return iVar4;
}

