
int sqlite3FkLocateIndex(Parse *pParse,Table *pParent,FKey *pFKey,Index **ppIdx,int **paiCol)

{
  uint uVar1;
  char *zRight;
  Index *pIVar2;
  Column *pCVar3;
  int iVar4;
  uint uVar5;
  int *piVar6;
  sColMap *psVar7;
  uint uVar8;
  char *pcVar9;
  short sVar10;
  char **ppcVar11;
  ulong uVar12;
  uint local_74;
  int *local_58;
  
  uVar1 = pFKey->nCol;
  zRight = pFKey->aCol[0].zCol;
  if (uVar1 == 1) {
    if (pParent->iPKey < 0) {
      local_58 = (int *)0x0;
    }
    else {
      if (zRight == (char *)0x0) {
        return 0;
      }
      iVar4 = sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName,zRight);
      if (iVar4 == 0) {
        return 0;
      }
      local_58 = (int *)0x0;
    }
  }
  else if (paiCol == (int **)0x0) {
    local_58 = (int *)0x0;
  }
  else {
    local_58 = (int *)sqlite3DbMallocRawNN(pParse->db,(long)(int)uVar1 << 2);
    if (local_58 == (int *)0x0) {
      return 1;
    }
    *paiCol = local_58;
  }
  pIVar2 = pParent->pIndex;
  do {
    if (pIVar2 == (Index *)0x0) goto LAB_0012ec6a;
    uVar5 = (uint)pIVar2->nKeyCol;
    if (((uVar5 == uVar1) && (pIVar2->onError != '\0')) && (pIVar2->pPartIdxWhere == (Expr *)0x0)) {
      if (zRight == (char *)0x0) {
        if ((pIVar2->field_0x63 & 3) == 2) {
          if ((local_58 != (int *)0x0) && (uVar5 != 0)) {
            psVar7 = pFKey->aCol;
            piVar6 = local_58;
            do {
              *piVar6 = psVar7->iFrom;
              psVar7 = psVar7 + 1;
              piVar6 = piVar6 + 1;
            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));
          }
LAB_0012eb17:
          if (pIVar2 != (Index *)0x0) {
            *ppIdx = pIVar2;
            return 0;
          }
LAB_0012ec6a:
          if (pParse->disableTriggers == '\0') {
            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",
                            pFKey->pFrom->zName,pFKey->zTo);
          }
          sqlite3DbFree(pParse->db,local_58);
          return 1;
        }
      }
      else {
        if ((int)uVar1 < 1) {
          local_74 = 0;
        }
        else {
          sVar10 = *pIVar2->aiColumn;
          if (sVar10 < 0) {
            local_74 = 0;
          }
          else {
            uVar12 = 0;
            while( true ) {
              local_74 = (uint)uVar12;
              pCVar3 = pParent->aCol;
              pcVar9 = pCVar3[sVar10].zColl;
              if (pcVar9 == (char *)0x0) {
                pcVar9 = "BINARY";
              }
              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);
              if (iVar4 != 0) break;
              pcVar9 = pCVar3[sVar10].zName;
              ppcVar11 = &pFKey->aCol[0].zCol;
              uVar8 = 0;
              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {
                uVar8 = uVar8 + 1;
                ppcVar11 = ppcVar11 + 2;
                if (uVar5 == uVar8) goto LAB_0012ebf1;
              }
              if (local_58 != (int *)0x0) {
                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;
              }
              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;
              uVar12 = uVar12 + 1;
              sVar10 = pIVar2->aiColumn[uVar12];
              if (sVar10 < 0) break;
            }
          }
        }
LAB_0012ebf1:
        if (uVar1 == local_74) goto LAB_0012eb17;
      }
    }
    pIVar2 = pIVar2->pNext;
  } while( true );
}



undefined8
FUN_0012e9e7(undefined8 *param_1,long param_2,undefined8 *param_3,long *param_4,undefined8 *param_5)

{
  uint uVar1;
  long lVar2;
  long lVar3;
  int iVar4;
  uint uVar5;
  undefined8 uVar6;
  undefined4 *puVar7;
  uint uVar8;
  char *pcVar9;
  short sVar10;
  undefined8 *puVar11;
  ulong uVar12;
  uint local_74;
  undefined4 *local_58;
  
  uVar1 = *(uint *)(param_3 + 5);
  lVar2 = param_3[9];
  if (uVar1 == 1) {
    if (*(short *)(param_2 + 0x44) < 0) {
      local_58 = (undefined4 *)0x0;
    }
    else {
      if (lVar2 == 0) {
        return 0;
      }
      uVar6 = FUN_0010cf97(*(undefined8 *)
                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));
      if ((int)uVar6 == 0) {
        return uVar6;
      }
      local_58 = (undefined4 *)0x0;
    }
  }
  else if (param_5 == (undefined8 *)0x0) {
    local_58 = (undefined4 *)0x0;
  }
  else {
    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);
    if (local_58 == (undefined4 *)0x0) {
      return 1;
    }
    *param_5 = local_58;
  }
  lVar3 = *(long *)(param_2 + 0x10);
  do {
    if (lVar3 == 0) goto LAB_0012ec6a;
    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);
    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {
      if (lVar2 == 0) {
        if ((*(byte *)(lVar3 + 99) & 3) == 2) {
          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {
            puVar11 = param_3 + 8;
            puVar7 = local_58;
            do {
              *puVar7 = *(undefined4 *)puVar11;
              puVar11 = puVar11 + 2;
              puVar7 = puVar7 + 1;
            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);
          }
LAB_0012eb17:
          if (lVar3 != 0) {
            *param_4 = lVar3;
            return 0;
          }
LAB_0012ec6a:
          if (*(char *)((long)param_1 + 0xd2) == '\0') {
            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",
                         *(undefined8 *)*param_3,param_3[2]);
          }
          FUN_00119825(*param_1,local_58);
          return 1;
        }
      }
      else {
        if ((int)uVar1 < 1) {
          local_74 = 0;
        }
        else {
          sVar10 = **(short **)(lVar3 + 8);
          if (sVar10 < 0) {
            local_74 = 0;
          }
          else {
            uVar12 = 0;
            while( true ) {
              local_74 = (uint)uVar12;
              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));
              pcVar9 = (char *)puVar11[2];
              if (pcVar9 == (char *)0x0) {
                pcVar9 = "BINARY";
              }
              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);
              if (iVar4 != 0) break;
              uVar6 = *puVar11;
              puVar11 = param_3 + 9;
              uVar8 = 0;
              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {
                uVar8 = uVar8 + 1;
                puVar11 = puVar11 + 2;
                if (uVar5 == uVar8) goto LAB_0012ebf1;
              }
              if (local_58 != (undefined4 *)0x0) {
                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);
              }
              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;
              uVar12 = uVar12 + 1;
              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);
              if (sVar10 < 0) break;
            }
          }
        }
LAB_0012ebf1:
        if (uVar1 == local_74) goto LAB_0012eb17;
      }
    }
    lVar3 = *(long *)(lVar3 + 0x28);
  } while( true );
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x38],RCX
MOV R13D,dword ptr [RDX + 0x28]
MOV RAX,qword ptr [RDX + 0x48]
MOV qword ptr [RSP + 0x28],RAX
CMP R13D,0x1
JZ 0x0012ea57
MOV RBX,R8
TEST R8,R8
JZ 0x0012eaab
MOVSXD RSI,R13D
SHL RSI,0x2
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX]
CALL 0x0011efd7
MOV RDX,RAX
MOV qword ptr [RSP + 0x20],RAX
MOV EAX,0x1
TEST RDX,RDX
JZ 0x0012eb2d
MOV qword ptr [RBX],RDX
JMP 0x0012eab4
MOV RDI,RSI
MOVZX EDX,word ptr [RSI + 0x44]
TEST DX,DX
JS 0x0012eaa0
MOV EAX,0x0
MOV RSI,qword ptr [RSP + 0x28]
TEST RSI,RSI
JZ 0x0012eb2d
MOVSX RDX,DX
SHL RDX,0x5
MOV RAX,RDX
ADD RAX,qword ptr [RDI + 0x8]
MOV RDI,qword ptr [RAX]
CALL 0x0010cf97
TEST EAX,EAX
JZ 0x0012eb2d
MOV qword ptr [RSP + 0x20],0x0
JMP 0x0012eab4
MOV qword ptr [RSP + 0x20],0x0
JMP 0x0012eab4
MOV qword ptr [RSP + 0x20],0x0
MOV RAX,qword ptr [RSP + 0x8]
MOV RBX,qword ptr [RAX + 0x10]
TEST RBX,RBX
JZ 0x0012ec6a
MOV dword ptr [RSP],R13D
JMP 0x0012ec07
MOVZX EDX,byte ptr [RBX + 0x63]
AND EDX,0x3
CMP DL,0x2
JNZ 0x0012ebfe
MOV RCX,qword ptr [RSP + 0x20]
TEST RCX,RCX
JZ 0x0012eb17
TEST R15D,R15D
JLE 0x0012eb17
MOV RDI,qword ptr [RSP + 0x10]
LEA RDX,[RDI + 0x40]
MOVZX EAX,AX
LEA EAX,[RAX + -0x1]
SHL RAX,0x4
LEA RSI,[RDI + RAX*0x1 + 0x50]
MOV EAX,dword ptr [RDX]
MOV dword ptr [RCX],EAX
ADD RDX,0x10
ADD RCX,0x4
CMP RDX,RSI
JNZ 0x0012eb06
TEST RBX,RBX
JZ 0x0012ec6a
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX],RBX
MOV EAX,0x0
ADD RSP,0x48
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOV RDX,qword ptr [RSP + 0x20]
TEST RDX,RDX
JZ 0x0012eb5d
MOVSXD RAX,EBP
ADD RAX,0x4
SHL RAX,0x4
MOV RDI,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RDI + RAX*0x1]
MOV dword ptr [RDX + R14*0x4],EAX
CMP dword ptr [RSP],EBP
JZ 0x0012ebf1
LEA EAX,[R14 + 0x1]
MOV dword ptr [RSP + 0x4],EAX
CMP R14,qword ptr [RSP + 0x18]
JZ 0x0012ebf1
ADD R14,0x1
MOV RAX,qword ptr [RBX + 0x8]
MOVZX R12D,word ptr [RAX + R14*0x2]
TEST R12W,R12W
JS 0x0012ebf1
MOV dword ptr [RSP + 0x4],R14D
MOVSX R12,R12W
SHL R12,0x5
MOV RAX,qword ptr [RSP + 0x8]
ADD R12,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [R12 + 0x10]
TEST RSI,RSI
LEA RAX,[0x196332]
CMOVZ RSI,RAX
MOV RAX,qword ptr [RBX + 0x40]
MOV RDI,qword ptr [RAX + R14*0x8]
CALL 0x0010cf97
MOV EBP,EAX
TEST EAX,EAX
JNZ 0x0012ebf1
MOV R13,qword ptr [R12]
MOV RAX,qword ptr [RSP + 0x10]
LEA R12,[RAX + 0x48]
MOV RSI,R13
MOV RDI,qword ptr [R12]
CALL 0x0010cf97
TEST EAX,EAX
JZ 0x0012eb3c
ADD EBP,0x1
ADD R12,0x10
CMP R15D,EBP
JNZ 0x0012ebd1
MOV EDX,dword ptr [RSP + 0x4]
CMP dword ptr [RSP],EDX
JZ 0x0012eb17
MOV RBX,qword ptr [RBX + 0x28]
TEST RBX,RBX
JZ 0x0012ec6a
MOVZX EAX,word ptr [RBX + 0x5e]
MOVZX R15D,AX
CMP R15D,dword ptr [RSP]
JNZ 0x0012ebfe
CMP byte ptr [RBX + 0x62],0x0
JZ 0x0012ebfe
CMP qword ptr [RBX + 0x48],0x0
JNZ 0x0012ebfe
CMP qword ptr [RSP + 0x28],0x0
JZ 0x0012eacf
CMP dword ptr [RSP],0x0
JLE 0x0012ec56
MOV RDX,qword ptr [RBX + 0x8]
MOVZX R12D,word ptr [RDX]
TEST R12W,R12W
JS 0x0012ec60
LEA EAX,[R15 + -0x1]
MOV qword ptr [RSP + 0x18],RAX
MOV R14D,0x0
JMP 0x0012eb88
MOV dword ptr [RSP + 0x4],0x0
JMP 0x0012ebf1
MOV dword ptr [RSP + 0x4],0x0
JMP 0x0012ebf1
MOV RAX,qword ptr [RSP + 0x30]
CMP byte ptr [RAX + 0xd2],0x0
JZ 0x0012ec94
MOV RSI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX]
CALL 0x00119825
MOV EAX,0x1
JMP 0x0012eb2d
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX]
LEA RSI,[0x196ba8]
MOV RDI,qword ptr [RSP + 0x30]
MOV EAX,0x0
CALL 0x0012c657
JMP 0x0012ec78
(translation_unit "undefined8\nFUN_0012e9e7(undefined8 *param_1,long param_2,undefined8 *param_3,long *param_4,undefined8 *param_5)\n\n{\n  uint uVar1;\n  long lVar2;\n  long lVar3;\n  int iVar4;\n  uint uVar5;\n  undefined8 uVar6;\n  undefined4 *puVar7;\n  uint uVar8;\n  char *pcVar9;\n  short sVar10;\n  undefined8 *puVar11;\n  ulong uVar12;\n  uint local_74;\n  undefined4 *local_58;\n  \n  uVar1 = *(uint *)(param_3 + 5);\n  lVar2 = param_3[9];\n  if (uVar1 == 1) {\n    if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }\n  }\n  else if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }\n  lVar3 = *(long *)(param_2 + 0x10);\n  do {\n    if (lVar3 == 0) goto LAB_0012ec6a;\n    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);\n    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    lVar3 = *(long *)(lVar3 + 0x28);\n  } while( true );\n}\n\n" (function_definition "undefined8\nFUN_0012e9e7(undefined8 *param_1,long param_2,undefined8 *param_3,long *param_4,undefined8 *param_5)\n\n{\n  uint uVar1;\n  long lVar2;\n  long lVar3;\n  int iVar4;\n  uint uVar5;\n  undefined8 uVar6;\n  undefined4 *puVar7;\n  uint uVar8;\n  char *pcVar9;\n  short sVar10;\n  undefined8 *puVar11;\n  ulong uVar12;\n  uint local_74;\n  undefined4 *local_58;\n  \n  uVar1 = *(uint *)(param_3 + 5);\n  lVar2 = param_3[9];\n  if (uVar1 == 1) {\n    if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }\n  }\n  else if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }\n  lVar3 = *(long *)(param_2 + 0x10);\n  do {\n    if (lVar3 == 0) goto LAB_0012ec6a;\n    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);\n    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    lVar3 = *(long *)(lVar3 + 0x28);\n  } while( true );\n}" type_identifier (function_declarator "FUN_0012e9e7(undefined8 *param_1,long param_2,undefined8 *param_3,long *param_4,undefined8 *param_5)" identifier (parameter_list "(undefined8 *param_1,long param_2,undefined8 *param_3,long *param_4,undefined8 *param_5)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "long *param_4" (sized_type_specifier "long" long) (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined8 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  long lVar2;\n  long lVar3;\n  int iVar4;\n  uint uVar5;\n  undefined8 uVar6;\n  undefined4 *puVar7;\n  uint uVar8;\n  char *pcVar9;\n  short sVar10;\n  undefined8 *puVar11;\n  ulong uVar12;\n  uint local_74;\n  undefined4 *local_58;\n  \n  uVar1 = *(uint *)(param_3 + 5);\n  lVar2 = param_3[9];\n  if (uVar1 == 1) {\n    if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }\n  }\n  else if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }\n  lVar3 = *(long *)(param_2 + 0x10);\n  do {\n    if (lVar3 == 0) goto LAB_0012ec6a;\n    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);\n    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    lVar3 = *(long *)(lVar3 + 0x28);\n  } while( true );\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "undefined8 uVar6;" type_identifier identifier ;) (declaration "undefined4 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "char *pcVar9;" primitive_type (pointer_declarator "*pcVar9" * identifier) ;) (declaration "short sVar10;" (sized_type_specifier "short" short) identifier ;) (declaration "undefined8 *puVar11;" type_identifier (pointer_declarator "*puVar11" * identifier) ;) (declaration "ulong uVar12;" type_identifier identifier ;) (declaration "uint local_74;" type_identifier identifier ;) (declaration "undefined4 *local_58;" type_identifier (pointer_declarator "*local_58" * identifier) ;) (expression_statement "uVar1 = *(uint *)(param_3 + 5);" (assignment_expression "uVar1 = *(uint *)(param_3 + 5)" identifier = (pointer_expression "*(uint *)(param_3 + 5)" * (cast_expression "(uint *)(param_3 + 5)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 5)" ( (binary_expression "param_3 + 5" identifier + number_literal) ))))) ;) (expression_statement "lVar2 = param_3[9];" (assignment_expression "lVar2 = param_3[9]" identifier = (subscript_expression "param_3[9]" identifier [ number_literal ])) ;) (if_statement "if (uVar1 == 1) {\n    if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }\n  }\n  else if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" if (parenthesized_expression "(uVar1 == 1)" ( (binary_expression "uVar1 == 1" identifier == number_literal) )) (compound_statement "{\n    if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }\n  }" { (if_statement "if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }" if (parenthesized_expression "(*(short *)(param_2 + 0x44) < 0)" ( (binary_expression "*(short *)(param_2 + 0x44) < 0" (pointer_expression "*(short *)(param_2 + 0x44)" * (cast_expression "(short *)(param_2 + 0x44)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x44)" ( (binary_expression "param_2 + 0x44" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n      local_58 = (undefined4 *)0x0;\n    }" { (expression_statement "local_58 = (undefined4 *)0x0;" (assignment_expression "local_58 = (undefined4 *)0x0" identifier = (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }" else (compound_statement "{\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }" { (if_statement "if (lVar2 == 0) {\n        return 0;\n      }" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));" (assignment_expression "uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)))" identifier = (call_expression "FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)))" identifier (argument_list "(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)))" ( (pointer_expression "*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8))" * (cast_expression "(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8))" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8))" ( (binary_expression "(long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)" (binary_expression "(long)*(short *)(param_2 + 0x44) * 0x20" (cast_expression "(long)*(short *)(param_2 + 0x44)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*(short *)(param_2 + 0x44)" * (cast_expression "(short *)(param_2 + 0x44)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x44)" ( (binary_expression "param_2 + 0x44" identifier + number_literal) ))))) * number_literal) + (pointer_expression "*(long *)(param_2 + 8)" * (cast_expression "(long *)(param_2 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) )))) )))) ;) (if_statement "if ((int)uVar6 == 0) {\n        return uVar6;\n      }" if (parenthesized_expression "((int)uVar6 == 0)" ( (binary_expression "(int)uVar6 == 0" (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n        return uVar6;\n      }" { (return_statement "return uVar6;" return identifier ;) })) (expression_statement "local_58 = (undefined4 *)0x0;" (assignment_expression "local_58 = (undefined4 *)0x0" identifier = (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }))) }) (else_clause "else if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" else (if_statement "if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" if (parenthesized_expression "(param_5 == (undefined8 *)0x0)" ( (binary_expression "param_5 == (undefined8 *)0x0" identifier == (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_58 = (undefined4 *)0x0;\n  }" { (expression_statement "local_58 = (undefined4 *)0x0;" (assignment_expression "local_58 = (undefined4 *)0x0" identifier = (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" else (compound_statement "{\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" { (expression_statement "local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);" (assignment_expression "local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2)" identifier = (cast_expression "(undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0011efd7(*param_1,(long)(int)uVar1 << 2)" identifier (argument_list "(*param_1,(long)(int)uVar1 << 2)" ( (pointer_expression "*param_1" * identifier) , (binary_expression "(long)(int)uVar1 << 2" (cast_expression "(long)(int)uVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier)) << number_literal) ))))) ;) (if_statement "if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }" if (parenthesized_expression "(local_58 == (undefined4 *)0x0)" ( (binary_expression "local_58 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "*param_5 = local_58;" (assignment_expression "*param_5 = local_58" (pointer_expression "*param_5" * identifier) = identifier) ;) }))))) (expression_statement "lVar3 = *(long *)(param_2 + 0x10);" (assignment_expression "lVar3 = *(long *)(param_2 + 0x10)" identifier = (pointer_expression "*(long *)(param_2 + 0x10)" * (cast_expression "(long *)(param_2 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) ))))) ;) (do_statement "do {\n    if (lVar3 == 0) goto LAB_0012ec6a;\n    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);\n    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    lVar3 = *(long *)(lVar3 + 0x28);\n  } while( true );" do (compound_statement "{\n    if (lVar3 == 0) goto LAB_0012ec6a;\n    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);\n    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    lVar3 = *(long *)(lVar3 + 0x28);\n  }" { (if_statement "if (lVar3 == 0) goto LAB_0012ec6a;" if (parenthesized_expression "(lVar3 == 0)" ( (binary_expression "lVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0012ec6a;" goto statement_identifier ;)) (expression_statement "uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);" (assignment_expression "uVar5 = (uint)*(ushort *)(lVar3 + 0x5e)" identifier = (binary_expression "(uint)*(ushort *)(lVar3 + 0x5e)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(lVar3 + 0x5e)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x5e)" ( (binary_expression "lVar3 + 0x5e" identifier + number_literal) ))))) ;) (if_statement "if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }" if (parenthesized_expression "(((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0))" ( (binary_expression "((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)" (parenthesized_expression "((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0'))" ( (binary_expression "(uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')" (parenthesized_expression "(uVar5 == uVar1)" ( (binary_expression "uVar5 == uVar1" identifier == identifier) )) && (parenthesized_expression "(*(char *)(lVar3 + 0x62) != '\0')" ( (binary_expression "*(char *)(lVar3 + 0x62) != '\0'" (pointer_expression "*(char *)(lVar3 + 0x62)" * (cast_expression "(char *)(lVar3 + 0x62)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x62)" ( (binary_expression "lVar3 + 0x62" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) ))) )) && (parenthesized_expression "(*(long *)(lVar3 + 0x48) == 0)" ( (binary_expression "*(long *)(lVar3 + 0x48) == 0" (pointer_expression "*(long *)(lVar3 + 0x48)" * (cast_expression "(long *)(lVar3 + 0x48)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x48)" ( (binary_expression "lVar3 + 0x48" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }" { (if_statement "if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }" { (if_statement "if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }" if (parenthesized_expression "((*(byte *)(lVar3 + 99) & 3) == 2)" ( (binary_expression "(*(byte *)(lVar3 + 99) & 3) == 2" (parenthesized_expression "(*(byte *)(lVar3 + 99) & 3)" ( (binary_expression "*(byte *)(lVar3 + 99) & 3" (pointer_expression "*(byte *)(lVar3 + 99)" * (cast_expression "(byte *)(lVar3 + 99)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 99)" ( (binary_expression "lVar3 + 99" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }" { (if_statement "if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }" if (parenthesized_expression "((local_58 != (undefined4 *)0x0) && (uVar5 != 0))" ( (binary_expression "(local_58 != (undefined4 *)0x0) && (uVar5 != 0)" (parenthesized_expression "(local_58 != (undefined4 *)0x0)" ( (binary_expression "local_58 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(uVar5 != 0)" ( (binary_expression "uVar5 != 0" identifier != number_literal) ))) )) (compound_statement "{\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }" { (expression_statement "puVar11 = param_3 + 8;" (assignment_expression "puVar11 = param_3 + 8" identifier = (binary_expression "param_3 + 8" identifier + number_literal)) ;) (expression_statement "puVar7 = local_58;" (assignment_expression "puVar7 = local_58" identifier = identifier) ;) (do_statement "do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);" do (compound_statement "{\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            }" { (expression_statement "*puVar7 = *(undefined4 *)puVar11;" (assignment_expression "*puVar7 = *(undefined4 *)puVar11" (pointer_expression "*puVar7" * identifier) = (pointer_expression "*(undefined4 *)puVar11" * (cast_expression "(undefined4 *)puVar11" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "puVar11 = puVar11 + 2;" (assignment_expression "puVar11 = puVar11 + 2" identifier = (binary_expression "puVar11 + 2" identifier + number_literal)) ;) (expression_statement "puVar7 = puVar7 + 1;" (assignment_expression "puVar7 = puVar7 + 1" identifier = (binary_expression "puVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10)" ( (binary_expression "puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10" identifier != (binary_expression "param_3 + (ulong)(uVar5 - 1) * 2 + 10" (binary_expression "param_3 + (ulong)(uVar5 - 1) * 2" identifier + (binary_expression "(ulong)(uVar5 - 1) * 2" (call_expression "(ulong)(uVar5 - 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar5 - 1)" ( (binary_expression "uVar5 - 1" identifier - number_literal) ))) * number_literal)) + number_literal)) )) ;) })) (labeled_statement "LAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }" statement_identifier : (if_statement "if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }" if (parenthesized_expression "(lVar3 != 0)" ( (binary_expression "lVar3 != 0" identifier != number_literal) )) (compound_statement "{\n            *param_4 = lVar3;\n            return 0;\n          }" { (expression_statement "*param_4 = lVar3;" (assignment_expression "*param_4 = lVar3" (pointer_expression "*param_4" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) }))) (labeled_statement "LAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }" statement_identifier : (if_statement "if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }" if (parenthesized_expression "(*(char *)((long)param_1 + 0xd2) == '\0')" ( (binary_expression "*(char *)((long)param_1 + 0xd2) == '\0'" (pointer_expression "*(char *)((long)param_1 + 0xd2)" * (cast_expression "(char *)((long)param_1 + 0xd2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0xd2)" ( (binary_expression "(long)param_1 + 0xd2" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }" { (expression_statement "FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);" (call_expression "FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2])" identifier (argument_list "(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2])" ( identifier , (string_literal ""foreign key mismatch - \"%w\" referencing \"%w\""" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , (pointer_expression "*(undefined8 *)*param_3" * (cast_expression "(undefined8 *)*param_3" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_3" * identifier))) , (subscript_expression "param_3[2]" identifier [ number_literal ]) ))) ;) }))) (expression_statement "FUN_00119825(*param_1,local_58);" (call_expression "FUN_00119825(*param_1,local_58)" identifier (argument_list "(*param_1,local_58)" ( (pointer_expression "*param_1" * identifier) , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) }) (else_clause "else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }" else (compound_statement "{\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }" { (if_statement "if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }" if (parenthesized_expression "((int)uVar1 < 1)" ( (binary_expression "(int)uVar1 < 1" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n          local_74 = 0;\n        }" { (expression_statement "local_74 = 0;" (assignment_expression "local_74 = 0" identifier = number_literal) ;) }) (else_clause "else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }" else (compound_statement "{\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }" { (expression_statement "sVar10 = **(short **)(lVar3 + 8);" (assignment_expression "sVar10 = **(short **)(lVar3 + 8)" identifier = (pointer_expression "**(short **)(lVar3 + 8)" * (pointer_expression "*(short **)(lVar3 + 8)" * (cast_expression "(short **)(lVar3 + 8)" ( (type_descriptor "short **" (sized_type_specifier "short" short) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar3 + 8)" ( (binary_expression "lVar3 + 8" identifier + number_literal) )))))) ;) (if_statement "if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }" if (parenthesized_expression "(sVar10 < 0)" ( (binary_expression "sVar10 < 0" identifier < number_literal) )) (compound_statement "{\n            local_74 = 0;\n          }" { (expression_statement "local_74 = 0;" (assignment_expression "local_74 = 0" identifier = number_literal) ;) }) (else_clause "else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }" else (compound_statement "{\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }" { (expression_statement "uVar12 = 0;" (assignment_expression "uVar12 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }" { (expression_statement "local_74 = (uint)uVar12;" (assignment_expression "local_74 = (uint)uVar12" identifier = (cast_expression "(uint)uVar12" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));" (assignment_expression "puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8))" identifier = (cast_expression "(undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8))" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)sVar10 * 0x20 + *(long *)(param_2 + 8))" ( (binary_expression "(long)sVar10 * 0x20 + *(long *)(param_2 + 8)" (binary_expression "(long)sVar10 * 0x20" (cast_expression "(long)sVar10" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal) + (pointer_expression "*(long *)(param_2 + 8)" * (cast_expression "(long *)(param_2 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) )))) ;) (expression_statement "pcVar9 = (char *)puVar11[2];" (assignment_expression "pcVar9 = (char *)puVar11[2]" identifier = (cast_expression "(char *)puVar11[2]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar11[2]" identifier [ number_literal ]))) ;) (if_statement "if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }" if (parenthesized_expression "(pcVar9 == (char *)0x0)" ( (binary_expression "pcVar9 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                pcVar9 = "BINARY";\n              }" { (expression_statement "pcVar9 = "BINARY";" (assignment_expression "pcVar9 = "BINARY"" identifier = (string_literal ""BINARY"" " string_content ")) ;) })) (expression_statement "iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);" (assignment_expression "iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9)" identifier = (call_expression "FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9)" identifier (argument_list "(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9)" ( (pointer_expression "*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8)" * (cast_expression "(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(lVar3 + 0x40) + uVar12 * 8)" ( (binary_expression "*(long *)(lVar3 + 0x40) + uVar12 * 8" (pointer_expression "*(long *)(lVar3 + 0x40)" * (cast_expression "(long *)(lVar3 + 0x40)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x40)" ( (binary_expression "lVar3 + 0x40" identifier + number_literal) )))) + (binary_expression "uVar12 * 8" identifier * number_literal)) )))) , identifier )))) ;) (if_statement "if (iVar4 != 0) break;" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar6 = *puVar11;" (assignment_expression "uVar6 = *puVar11" identifier = (pointer_expression "*puVar11" * identifier)) ;) (expression_statement "puVar11 = param_3 + 9;" (assignment_expression "puVar11 = param_3 + 9" identifier = (binary_expression "param_3 + 9" identifier + number_literal)) ;) (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" identifier = number_literal) ;) (while_statement "while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }" while (parenthesized_expression "(iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0)" ( (comma_expression "iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0" (assignment_expression "iVar4 = FUN_0010cf97(*puVar11,uVar6)" identifier = (call_expression "FUN_0010cf97(*puVar11,uVar6)" identifier (argument_list "(*puVar11,uVar6)" ( (pointer_expression "*puVar11" * identifier) , identifier )))) , (binary_expression "iVar4 != 0" identifier != number_literal)) )) (compound_statement "{\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }" { (expression_statement "uVar8 = uVar8 + 1;" (assignment_expression "uVar8 = uVar8 + 1" identifier = (binary_expression "uVar8 + 1" identifier + number_literal)) ;) (expression_statement "puVar11 = puVar11 + 2;" (assignment_expression "puVar11 = puVar11 + 2" identifier = (binary_expression "puVar11 + 2" identifier + number_literal)) ;) (if_statement "if (uVar5 == uVar8) goto LAB_0012ebf1;" if (parenthesized_expression "(uVar5 == uVar8)" ( (binary_expression "uVar5 == uVar8" identifier == identifier) )) (goto_statement "goto LAB_0012ebf1;" goto statement_identifier ;)) })) (if_statement "if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }" if (parenthesized_expression "(local_58 != (undefined4 *)0x0)" ( (binary_expression "local_58 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }" { (expression_statement "local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);" (assignment_expression "local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2)" (subscript_expression "local_58[uVar12]" identifier [ identifier ]) = (pointer_expression "*(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2)" * (cast_expression "(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + ((long)(int)uVar8 + 4) * 2)" ( (binary_expression "param_3 + ((long)(int)uVar8 + 4) * 2" identifier + (binary_expression "((long)(int)uVar8 + 4) * 2" (parenthesized_expression "((long)(int)uVar8 + 4)" ( (binary_expression "(long)(int)uVar8 + 4" (cast_expression "(long)(int)uVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier)) + number_literal) )) * number_literal)) ))))) ;) })) (if_statement "if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;" if (parenthesized_expression "((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1))" ( (binary_expression "(uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)" (parenthesized_expression "(uVar1 == uVar8)" ( (binary_expression "uVar1 == uVar8" identifier == identifier) )) || (parenthesized_expression "(local_74 = local_74 + 1, uVar12 == uVar5 - 1)" ( (comma_expression "local_74 = local_74 + 1, uVar12 == uVar5 - 1" (assignment_expression "local_74 = local_74 + 1" identifier = (binary_expression "local_74 + 1" identifier + number_literal)) , (binary_expression "uVar12 == uVar5 - 1" identifier == (binary_expression "uVar5 - 1" identifier - number_literal))) ))) )) (break_statement "break;" break ;)) (expression_statement "uVar12 = uVar12 + 1;" (assignment_expression "uVar12 = uVar12 + 1" identifier = (binary_expression "uVar12 + 1" identifier + number_literal)) ;) (expression_statement "sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);" (assignment_expression "sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2)" identifier = (pointer_expression "*(short *)(*(long *)(lVar3 + 8) + uVar12 * 2)" * (cast_expression "(short *)(*(long *)(lVar3 + 8) + uVar12 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(lVar3 + 8) + uVar12 * 2)" ( (binary_expression "*(long *)(lVar3 + 8) + uVar12 * 2" (pointer_expression "*(long *)(lVar3 + 8)" * (cast_expression "(long *)(lVar3 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 8)" ( (binary_expression "lVar3 + 8" identifier + number_literal) )))) + (binary_expression "uVar12 * 2" identifier * number_literal)) ))))) ;) (if_statement "if (sVar10 < 0) break;" if (parenthesized_expression "(sVar10 < 0)" ( (binary_expression "sVar10 < 0" identifier < number_literal) )) (break_statement "break;" break ;)) })) }))) }))) (labeled_statement "LAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;" statement_identifier : (if_statement "if (uVar1 == local_74) goto LAB_0012eb17;" if (parenthesized_expression "(uVar1 == local_74)" ( (binary_expression "uVar1 == local_74" identifier == identifier) )) (goto_statement "goto LAB_0012eb17;" goto statement_identifier ;))) }))) })) (expression_statement "lVar3 = *(long *)(lVar3 + 0x28);" (assignment_expression "lVar3 = *(long *)(lVar3 + 0x28)" identifier = (pointer_expression "*(long *)(lVar3 + 0x28)" * (cast_expression "(long *)(lVar3 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x28)" ( (binary_expression "lVar3 + 0x28" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "int sqlite3FkLocateIndex(Parse *pParse,Table *pParent,FKey *pFKey,Index **ppIdx,int **paiCol)\n\n{\n  uint uVar1;\n  char *zRight;\n  Index *pIVar2;\n  Column *pCVar3;\n  int iVar4;\n  uint uVar5;\n  int *piVar6;\n  sColMap *psVar7;\n  uint uVar8;\n  char *pcVar9;\n  short sVar10;\n  char **ppcVar11;\n  ulong uVar12;\n  uint local_74;\n  int *local_58;\n  \n  uVar1 = pFKey->nCol;\n  zRight = pFKey->aCol[0].zCol;\n  if (uVar1 == 1) {\n    if (pParent->iPKey < 0) {\n      local_58 = (int *)0x0;\n    }\n    else {\n      if (zRight == (char *)0x0) {\n        return 0;\n      }\n      iVar4 = sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName,zRight);\n      if (iVar4 == 0) {\n        return 0;\n      }\n      local_58 = (int *)0x0;\n    }\n  }\n  else if (paiCol == (int **)0x0) {\n    local_58 = (int *)0x0;\n  }\n  else {\n    local_58 = (int *)sqlite3DbMallocRawNN(pParse->db,(long)(int)uVar1 << 2);\n    if (local_58 == (int *)0x0) {\n      return 1;\n    }\n    *paiCol = local_58;\n  }\n  pIVar2 = pParent->pIndex;\n  do {\n    if (pIVar2 == (Index *)0x0) goto LAB_0012ec6a;\n    uVar5 = (uint)pIVar2->nKeyCol;\n    if (((uVar5 == uVar1) && (pIVar2->onError != '\0')) && (pIVar2->pPartIdxWhere == (Expr *)0x0)) {\n      if (zRight == (char *)0x0) {\n        if ((pIVar2->field_0x63 & 3) == 2) {\n          if ((local_58 != (int *)0x0) && (uVar5 != 0)) {\n            psVar7 = pFKey->aCol;\n            piVar6 = local_58;\n            do {\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));\n          }\nLAB_0012eb17:\n          if (pIVar2 != (Index *)0x0) {\n            *ppIdx = pIVar2;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (pParse->disableTriggers == '\0') {\n            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);\n          }\n          sqlite3DbFree(pParse->db,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = *pIVar2->aiColumn;\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    pIVar2 = pIVar2->pNext;\n  } while( true );\n}\n\n" (function_definition "int sqlite3FkLocateIndex(Parse *pParse,Table *pParent,FKey *pFKey,Index **ppIdx,int **paiCol)\n\n{\n  uint uVar1;\n  char *zRight;\n  Index *pIVar2;\n  Column *pCVar3;\n  int iVar4;\n  uint uVar5;\n  int *piVar6;\n  sColMap *psVar7;\n  uint uVar8;\n  char *pcVar9;\n  short sVar10;\n  char **ppcVar11;\n  ulong uVar12;\n  uint local_74;\n  int *local_58;\n  \n  uVar1 = pFKey->nCol;\n  zRight = pFKey->aCol[0].zCol;\n  if (uVar1 == 1) {\n    if (pParent->iPKey < 0) {\n      local_58 = (int *)0x0;\n    }\n    else {\n      if (zRight == (char *)0x0) {\n        return 0;\n      }\n      iVar4 = sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName,zRight);\n      if (iVar4 == 0) {\n        return 0;\n      }\n      local_58 = (int *)0x0;\n    }\n  }\n  else if (paiCol == (int **)0x0) {\n    local_58 = (int *)0x0;\n  }\n  else {\n    local_58 = (int *)sqlite3DbMallocRawNN(pParse->db,(long)(int)uVar1 << 2);\n    if (local_58 == (int *)0x0) {\n      return 1;\n    }\n    *paiCol = local_58;\n  }\n  pIVar2 = pParent->pIndex;\n  do {\n    if (pIVar2 == (Index *)0x0) goto LAB_0012ec6a;\n    uVar5 = (uint)pIVar2->nKeyCol;\n    if (((uVar5 == uVar1) && (pIVar2->onError != '\0')) && (pIVar2->pPartIdxWhere == (Expr *)0x0)) {\n      if (zRight == (char *)0x0) {\n        if ((pIVar2->field_0x63 & 3) == 2) {\n          if ((local_58 != (int *)0x0) && (uVar5 != 0)) {\n            psVar7 = pFKey->aCol;\n            piVar6 = local_58;\n            do {\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));\n          }\nLAB_0012eb17:\n          if (pIVar2 != (Index *)0x0) {\n            *ppIdx = pIVar2;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (pParse->disableTriggers == '\0') {\n            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);\n          }\n          sqlite3DbFree(pParse->db,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = *pIVar2->aiColumn;\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    pIVar2 = pIVar2->pNext;\n  } while( true );\n}" primitive_type (function_declarator "sqlite3FkLocateIndex(Parse *pParse,Table *pParent,FKey *pFKey,Index **ppIdx,int **paiCol)" identifier (parameter_list "(Parse *pParse,Table *pParent,FKey *pFKey,Index **ppIdx,int **paiCol)" ( (parameter_declaration "Parse *pParse" type_identifier (pointer_declarator "*pParse" * identifier)) , (parameter_declaration "Table *pParent" type_identifier (pointer_declarator "*pParent" * identifier)) , (parameter_declaration "FKey *pFKey" type_identifier (pointer_declarator "*pFKey" * identifier)) , (parameter_declaration "Index **ppIdx" type_identifier (pointer_declarator "**ppIdx" * (pointer_declarator "*ppIdx" * identifier))) , (parameter_declaration "int **paiCol" primitive_type (pointer_declarator "**paiCol" * (pointer_declarator "*paiCol" * identifier))) ))) (compound_statement "{\n  uint uVar1;\n  char *zRight;\n  Index *pIVar2;\n  Column *pCVar3;\n  int iVar4;\n  uint uVar5;\n  int *piVar6;\n  sColMap *psVar7;\n  uint uVar8;\n  char *pcVar9;\n  short sVar10;\n  char **ppcVar11;\n  ulong uVar12;\n  uint local_74;\n  int *local_58;\n  \n  uVar1 = pFKey->nCol;\n  zRight = pFKey->aCol[0].zCol;\n  if (uVar1 == 1) {\n    if (pParent->iPKey < 0) {\n      local_58 = (int *)0x0;\n    }\n    else {\n      if (zRight == (char *)0x0) {\n        return 0;\n      }\n      iVar4 = sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName,zRight);\n      if (iVar4 == 0) {\n        return 0;\n      }\n      local_58 = (int *)0x0;\n    }\n  }\n  else if (paiCol == (int **)0x0) {\n    local_58 = (int *)0x0;\n  }\n  else {\n    local_58 = (int *)sqlite3DbMallocRawNN(pParse->db,(long)(int)uVar1 << 2);\n    if (local_58 == (int *)0x0) {\n      return 1;\n    }\n    *paiCol = local_58;\n  }\n  pIVar2 = pParent->pIndex;\n  do {\n    if (pIVar2 == (Index *)0x0) goto LAB_0012ec6a;\n    uVar5 = (uint)pIVar2->nKeyCol;\n    if (((uVar5 == uVar1) && (pIVar2->onError != '\0')) && (pIVar2->pPartIdxWhere == (Expr *)0x0)) {\n      if (zRight == (char *)0x0) {\n        if ((pIVar2->field_0x63 & 3) == 2) {\n          if ((local_58 != (int *)0x0) && (uVar5 != 0)) {\n            psVar7 = pFKey->aCol;\n            piVar6 = local_58;\n            do {\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));\n          }\nLAB_0012eb17:\n          if (pIVar2 != (Index *)0x0) {\n            *ppIdx = pIVar2;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (pParse->disableTriggers == '\0') {\n            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);\n          }\n          sqlite3DbFree(pParse->db,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = *pIVar2->aiColumn;\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    pIVar2 = pIVar2->pNext;\n  } while( true );\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "char *zRight;" primitive_type (pointer_declarator "*zRight" * identifier) ;) (declaration "Index *pIVar2;" type_identifier (pointer_declarator "*pIVar2" * identifier) ;) (declaration "Column *pCVar3;" type_identifier (pointer_declarator "*pCVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "sColMap *psVar7;" type_identifier (pointer_declarator "*psVar7" * identifier) ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "char *pcVar9;" primitive_type (pointer_declarator "*pcVar9" * identifier) ;) (declaration "short sVar10;" (sized_type_specifier "short" short) identifier ;) (declaration "char **ppcVar11;" primitive_type (pointer_declarator "**ppcVar11" * (pointer_declarator "*ppcVar11" * identifier)) ;) (declaration "ulong uVar12;" type_identifier identifier ;) (declaration "uint local_74;" type_identifier identifier ;) (declaration "int *local_58;" primitive_type (pointer_declarator "*local_58" * identifier) ;) (expression_statement "uVar1 = pFKey->nCol;" (assignment_expression "uVar1 = pFKey->nCol" identifier = (field_expression "pFKey->nCol" identifier -> field_identifier)) ;) (expression_statement "zRight = pFKey->aCol[0].zCol;" (assignment_expression "zRight = pFKey->aCol[0].zCol" identifier = (field_expression "pFKey->aCol[0].zCol" (subscript_expression "pFKey->aCol[0]" (field_expression "pFKey->aCol" identifier -> field_identifier) [ number_literal ]) . field_identifier)) ;) (if_statement "if (uVar1 == 1) {\n    if (pParent->iPKey < 0) {\n      local_58 = (int *)0x0;\n    }\n    else {\n      if (zRight == (char *)0x0) {\n        return 0;\n      }\n      iVar4 = sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName,zRight);\n      if (iVar4 == 0) {\n        return 0;\n      }\n      local_58 = (int *)0x0;\n    }\n  }\n  else if (paiCol == (int **)0x0) {\n    local_58 = (int *)0x0;\n  }\n  else {\n    local_58 = (int *)sqlite3DbMallocRawNN(pParse->db,(long)(int)uVar1 << 2);\n    if (local_58 == (int *)0x0) {\n      return 1;\n    }\n    *paiCol = local_58;\n  }" if (parenthesized_expression "(uVar1 == 1)" ( (binary_expression "uVar1 == 1" identifier == number_literal) )) (compound_statement "{\n    if (pParent->iPKey < 0) {\n      local_58 = (int *)0x0;\n    }\n    else {\n      if (zRight == (char *)0x0) {\n        return 0;\n      }\n      iVar4 = sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName,zRight);\n      if (iVar4 == 0) {\n        return 0;\n      }\n      local_58 = (int *)0x0;\n    }\n  }" { (if_statement "if (pParent->iPKey < 0) {\n      local_58 = (int *)0x0;\n    }\n    else {\n      if (zRight == (char *)0x0) {\n        return 0;\n      }\n      iVar4 = sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName,zRight);\n      if (iVar4 == 0) {\n        return 0;\n      }\n      local_58 = (int *)0x0;\n    }" if (parenthesized_expression "(pParent->iPKey < 0)" ( (binary_expression "pParent->iPKey < 0" (field_expression "pParent->iPKey" identifier -> field_identifier) < number_literal) )) (compound_statement "{\n      local_58 = (int *)0x0;\n    }" { (expression_statement "local_58 = (int *)0x0;" (assignment_expression "local_58 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n      if (zRight == (char *)0x0) {\n        return 0;\n      }\n      iVar4 = sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName,zRight);\n      if (iVar4 == 0) {\n        return 0;\n      }\n      local_58 = (int *)0x0;\n    }" else (compound_statement "{\n      if (zRight == (char *)0x0) {\n        return 0;\n      }\n      iVar4 = sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName,zRight);\n      if (iVar4 == 0) {\n        return 0;\n      }\n      local_58 = (int *)0x0;\n    }" { (if_statement "if (zRight == (char *)0x0) {\n        return 0;\n      }" if (parenthesized_expression "(zRight == (char *)0x0)" ( (binary_expression "zRight == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar4 = sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName,zRight);" (assignment_expression "iVar4 = sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName,zRight)" identifier = (call_expression "sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName,zRight)" identifier (argument_list "(pParent->aCol[pParent->iPKey].zName,zRight)" ( (field_expression "pParent->aCol[pParent->iPKey].zName" (subscript_expression "pParent->aCol[pParent->iPKey]" (field_expression "pParent->aCol" identifier -> field_identifier) [ (field_expression "pParent->iPKey" identifier -> field_identifier) ]) . field_identifier) , identifier )))) ;) (if_statement "if (iVar4 == 0) {\n        return 0;\n      }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "local_58 = (int *)0x0;" (assignment_expression "local_58 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }))) }) (else_clause "else if (paiCol == (int **)0x0) {\n    local_58 = (int *)0x0;\n  }\n  else {\n    local_58 = (int *)sqlite3DbMallocRawNN(pParse->db,(long)(int)uVar1 << 2);\n    if (local_58 == (int *)0x0) {\n      return 1;\n    }\n    *paiCol = local_58;\n  }" else (if_statement "if (paiCol == (int **)0x0) {\n    local_58 = (int *)0x0;\n  }\n  else {\n    local_58 = (int *)sqlite3DbMallocRawNN(pParse->db,(long)(int)uVar1 << 2);\n    if (local_58 == (int *)0x0) {\n      return 1;\n    }\n    *paiCol = local_58;\n  }" if (parenthesized_expression "(paiCol == (int **)0x0)" ( (binary_expression "paiCol == (int **)0x0" identifier == (cast_expression "(int **)0x0" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n    local_58 = (int *)0x0;\n  }" { (expression_statement "local_58 = (int *)0x0;" (assignment_expression "local_58 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    local_58 = (int *)sqlite3DbMallocRawNN(pParse->db,(long)(int)uVar1 << 2);\n    if (local_58 == (int *)0x0) {\n      return 1;\n    }\n    *paiCol = local_58;\n  }" else (compound_statement "{\n    local_58 = (int *)sqlite3DbMallocRawNN(pParse->db,(long)(int)uVar1 << 2);\n    if (local_58 == (int *)0x0) {\n      return 1;\n    }\n    *paiCol = local_58;\n  }" { (expression_statement "local_58 = (int *)sqlite3DbMallocRawNN(pParse->db,(long)(int)uVar1 << 2);" (assignment_expression "local_58 = (int *)sqlite3DbMallocRawNN(pParse->db,(long)(int)uVar1 << 2)" identifier = (cast_expression "(int *)sqlite3DbMallocRawNN(pParse->db,(long)(int)uVar1 << 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3DbMallocRawNN(pParse->db,(long)(int)uVar1 << 2)" identifier (argument_list "(pParse->db,(long)(int)uVar1 << 2)" ( (field_expression "pParse->db" identifier -> field_identifier) , (binary_expression "(long)(int)uVar1 << 2" (cast_expression "(long)(int)uVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier)) << number_literal) ))))) ;) (if_statement "if (local_58 == (int *)0x0) {\n      return 1;\n    }" if (parenthesized_expression "(local_58 == (int *)0x0)" ( (binary_expression "local_58 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "*paiCol = local_58;" (assignment_expression "*paiCol = local_58" (pointer_expression "*paiCol" * identifier) = identifier) ;) }))))) (expression_statement "pIVar2 = pParent->pIndex;" (assignment_expression "pIVar2 = pParent->pIndex" identifier = (field_expression "pParent->pIndex" identifier -> field_identifier)) ;) (do_statement "do {\n    if (pIVar2 == (Index *)0x0) goto LAB_0012ec6a;\n    uVar5 = (uint)pIVar2->nKeyCol;\n    if (((uVar5 == uVar1) && (pIVar2->onError != '\0')) && (pIVar2->pPartIdxWhere == (Expr *)0x0)) {\n      if (zRight == (char *)0x0) {\n        if ((pIVar2->field_0x63 & 3) == 2) {\n          if ((local_58 != (int *)0x0) && (uVar5 != 0)) {\n            psVar7 = pFKey->aCol;\n            piVar6 = local_58;\n            do {\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));\n          }\nLAB_0012eb17:\n          if (pIVar2 != (Index *)0x0) {\n            *ppIdx = pIVar2;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (pParse->disableTriggers == '\0') {\n            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);\n          }\n          sqlite3DbFree(pParse->db,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = *pIVar2->aiColumn;\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    pIVar2 = pIVar2->pNext;\n  } while( true );" do (compound_statement "{\n    if (pIVar2 == (Index *)0x0) goto LAB_0012ec6a;\n    uVar5 = (uint)pIVar2->nKeyCol;\n    if (((uVar5 == uVar1) && (pIVar2->onError != '\0')) && (pIVar2->pPartIdxWhere == (Expr *)0x0)) {\n      if (zRight == (char *)0x0) {\n        if ((pIVar2->field_0x63 & 3) == 2) {\n          if ((local_58 != (int *)0x0) && (uVar5 != 0)) {\n            psVar7 = pFKey->aCol;\n            piVar6 = local_58;\n            do {\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));\n          }\nLAB_0012eb17:\n          if (pIVar2 != (Index *)0x0) {\n            *ppIdx = pIVar2;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (pParse->disableTriggers == '\0') {\n            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);\n          }\n          sqlite3DbFree(pParse->db,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = *pIVar2->aiColumn;\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    pIVar2 = pIVar2->pNext;\n  }" { (if_statement "if (pIVar2 == (Index *)0x0) goto LAB_0012ec6a;" if (parenthesized_expression "(pIVar2 == (Index *)0x0)" ( (binary_expression "pIVar2 == (Index *)0x0" identifier == (cast_expression "(Index *)0x0" ( (type_descriptor "Index *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0012ec6a;" goto statement_identifier ;)) (expression_statement "uVar5 = (uint)pIVar2->nKeyCol;" (assignment_expression "uVar5 = (uint)pIVar2->nKeyCol" identifier = (cast_expression "(uint)pIVar2->nKeyCol" ( (type_descriptor "uint" type_identifier) ) (field_expression "pIVar2->nKeyCol" identifier -> field_identifier))) ;) (if_statement "if (((uVar5 == uVar1) && (pIVar2->onError != '\0')) && (pIVar2->pPartIdxWhere == (Expr *)0x0)) {\n      if (zRight == (char *)0x0) {\n        if ((pIVar2->field_0x63 & 3) == 2) {\n          if ((local_58 != (int *)0x0) && (uVar5 != 0)) {\n            psVar7 = pFKey->aCol;\n            piVar6 = local_58;\n            do {\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));\n          }\nLAB_0012eb17:\n          if (pIVar2 != (Index *)0x0) {\n            *ppIdx = pIVar2;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (pParse->disableTriggers == '\0') {\n            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);\n          }\n          sqlite3DbFree(pParse->db,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = *pIVar2->aiColumn;\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }" if (parenthesized_expression "(((uVar5 == uVar1) && (pIVar2->onError != '\0')) && (pIVar2->pPartIdxWhere == (Expr *)0x0))" ( (binary_expression "((uVar5 == uVar1) && (pIVar2->onError != '\0')) && (pIVar2->pPartIdxWhere == (Expr *)0x0)" (parenthesized_expression "((uVar5 == uVar1) && (pIVar2->onError != '\0'))" ( (binary_expression "(uVar5 == uVar1) && (pIVar2->onError != '\0')" (parenthesized_expression "(uVar5 == uVar1)" ( (binary_expression "uVar5 == uVar1" identifier == identifier) )) && (parenthesized_expression "(pIVar2->onError != '\0')" ( (binary_expression "pIVar2->onError != '\0'" (field_expression "pIVar2->onError" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) ))) )) && (parenthesized_expression "(pIVar2->pPartIdxWhere == (Expr *)0x0)" ( (binary_expression "pIVar2->pPartIdxWhere == (Expr *)0x0" (field_expression "pIVar2->pPartIdxWhere" identifier -> field_identifier) == (cast_expression "(Expr *)0x0" ( (type_descriptor "Expr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n      if (zRight == (char *)0x0) {\n        if ((pIVar2->field_0x63 & 3) == 2) {\n          if ((local_58 != (int *)0x0) && (uVar5 != 0)) {\n            psVar7 = pFKey->aCol;\n            piVar6 = local_58;\n            do {\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));\n          }\nLAB_0012eb17:\n          if (pIVar2 != (Index *)0x0) {\n            *ppIdx = pIVar2;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (pParse->disableTriggers == '\0') {\n            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);\n          }\n          sqlite3DbFree(pParse->db,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = *pIVar2->aiColumn;\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }" { (if_statement "if (zRight == (char *)0x0) {\n        if ((pIVar2->field_0x63 & 3) == 2) {\n          if ((local_58 != (int *)0x0) && (uVar5 != 0)) {\n            psVar7 = pFKey->aCol;\n            piVar6 = local_58;\n            do {\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));\n          }\nLAB_0012eb17:\n          if (pIVar2 != (Index *)0x0) {\n            *ppIdx = pIVar2;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (pParse->disableTriggers == '\0') {\n            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);\n          }\n          sqlite3DbFree(pParse->db,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = *pIVar2->aiColumn;\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }" if (parenthesized_expression "(zRight == (char *)0x0)" ( (binary_expression "zRight == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        if ((pIVar2->field_0x63 & 3) == 2) {\n          if ((local_58 != (int *)0x0) && (uVar5 != 0)) {\n            psVar7 = pFKey->aCol;\n            piVar6 = local_58;\n            do {\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));\n          }\nLAB_0012eb17:\n          if (pIVar2 != (Index *)0x0) {\n            *ppIdx = pIVar2;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (pParse->disableTriggers == '\0') {\n            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);\n          }\n          sqlite3DbFree(pParse->db,local_58);\n          return 1;\n        }\n      }" { (if_statement "if ((pIVar2->field_0x63 & 3) == 2) {\n          if ((local_58 != (int *)0x0) && (uVar5 != 0)) {\n            psVar7 = pFKey->aCol;\n            piVar6 = local_58;\n            do {\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));\n          }\nLAB_0012eb17:\n          if (pIVar2 != (Index *)0x0) {\n            *ppIdx = pIVar2;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (pParse->disableTriggers == '\0') {\n            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);\n          }\n          sqlite3DbFree(pParse->db,local_58);\n          return 1;\n        }" if (parenthesized_expression "((pIVar2->field_0x63 & 3) == 2)" ( (binary_expression "(pIVar2->field_0x63 & 3) == 2" (parenthesized_expression "(pIVar2->field_0x63 & 3)" ( (binary_expression "pIVar2->field_0x63 & 3" (field_expression "pIVar2->field_0x63" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n          if ((local_58 != (int *)0x0) && (uVar5 != 0)) {\n            psVar7 = pFKey->aCol;\n            piVar6 = local_58;\n            do {\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));\n          }\nLAB_0012eb17:\n          if (pIVar2 != (Index *)0x0) {\n            *ppIdx = pIVar2;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (pParse->disableTriggers == '\0') {\n            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);\n          }\n          sqlite3DbFree(pParse->db,local_58);\n          return 1;\n        }" { (if_statement "if ((local_58 != (int *)0x0) && (uVar5 != 0)) {\n            psVar7 = pFKey->aCol;\n            piVar6 = local_58;\n            do {\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));\n          }" if (parenthesized_expression "((local_58 != (int *)0x0) && (uVar5 != 0))" ( (binary_expression "(local_58 != (int *)0x0) && (uVar5 != 0)" (parenthesized_expression "(local_58 != (int *)0x0)" ( (binary_expression "local_58 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(uVar5 != 0)" ( (binary_expression "uVar5 != 0" identifier != number_literal) ))) )) (compound_statement "{\n            psVar7 = pFKey->aCol;\n            piVar6 = local_58;\n            do {\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));\n          }" { (expression_statement "psVar7 = pFKey->aCol;" (assignment_expression "psVar7 = pFKey->aCol" identifier = (field_expression "pFKey->aCol" identifier -> field_identifier)) ;) (expression_statement "piVar6 = local_58;" (assignment_expression "piVar6 = local_58" identifier = identifier) ;) (do_statement "do {\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            } while (psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d));" do (compound_statement "{\n              *piVar6 = psVar7->iFrom;\n              psVar7 = psVar7 + 1;\n              piVar6 = piVar6 + 1;\n            }" { (expression_statement "*piVar6 = psVar7->iFrom;" (assignment_expression "*piVar6 = psVar7->iFrom" (pointer_expression "*piVar6" * identifier) = (field_expression "psVar7->iFrom" identifier -> field_identifier)) ;) (expression_statement "psVar7 = psVar7 + 1;" (assignment_expression "psVar7 = psVar7 + 1" identifier = (binary_expression "psVar7 + 1" identifier + number_literal)) ;) (expression_statement "piVar6 = piVar6 + 1;" (assignment_expression "piVar6 = piVar6 + 1" identifier = (binary_expression "piVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d))" ( (binary_expression "psVar7 != (sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d)" identifier != (cast_expression "(sColMap *)(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d)" ( (type_descriptor "sColMap *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d)" ( (binary_expression "pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10 + -0x2d" (binary_expression "pFKey[1].aAction + (ulong)(uVar5 - 1) * 0x10" (field_expression "pFKey[1].aAction" (subscript_expression "pFKey[1]" identifier [ number_literal ]) . field_identifier) + (binary_expression "(ulong)(uVar5 - 1) * 0x10" (call_expression "(ulong)(uVar5 - 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar5 - 1)" ( (binary_expression "uVar5 - 1" identifier - number_literal) ))) * number_literal)) + number_literal) )))) )) ;) })) (labeled_statement "LAB_0012eb17:\n          if (pIVar2 != (Index *)0x0) {\n            *ppIdx = pIVar2;\n            return 0;\n          }" statement_identifier : (if_statement "if (pIVar2 != (Index *)0x0) {\n            *ppIdx = pIVar2;\n            return 0;\n          }" if (parenthesized_expression "(pIVar2 != (Index *)0x0)" ( (binary_expression "pIVar2 != (Index *)0x0" identifier != (cast_expression "(Index *)0x0" ( (type_descriptor "Index *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            *ppIdx = pIVar2;\n            return 0;\n          }" { (expression_statement "*ppIdx = pIVar2;" (assignment_expression "*ppIdx = pIVar2" (pointer_expression "*ppIdx" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) }))) (labeled_statement "LAB_0012ec6a:\n          if (pParse->disableTriggers == '\0') {\n            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);\n          }" statement_identifier : (if_statement "if (pParse->disableTriggers == '\0') {\n            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);\n          }" if (parenthesized_expression "(pParse->disableTriggers == '\0')" ( (binary_expression "pParse->disableTriggers == '\0'" (field_expression "pParse->disableTriggers" identifier -> field_identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n            sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);\n          }" { (expression_statement "sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo);" (call_expression "sqlite3ErrorMsg(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo)" identifier (argument_list "(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                            pFKey->pFrom->zName,pFKey->zTo)" ( identifier , (string_literal ""foreign key mismatch - \"%w\" referencing \"%w\""" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , (field_expression "pFKey->pFrom->zName" (field_expression "pFKey->pFrom" identifier -> field_identifier) -> field_identifier) , (field_expression "pFKey->zTo" identifier -> field_identifier) ))) ;) }))) (expression_statement "sqlite3DbFree(pParse->db,local_58);" (call_expression "sqlite3DbFree(pParse->db,local_58)" identifier (argument_list "(pParse->db,local_58)" ( (field_expression "pParse->db" identifier -> field_identifier) , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) }) (else_clause "else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = *pIVar2->aiColumn;\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }" else (compound_statement "{\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = *pIVar2->aiColumn;\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }" { (if_statement "if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = *pIVar2->aiColumn;\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }\n        }" if (parenthesized_expression "((int)uVar1 < 1)" ( (binary_expression "(int)uVar1 < 1" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n          local_74 = 0;\n        }" { (expression_statement "local_74 = 0;" (assignment_expression "local_74 = 0" identifier = number_literal) ;) }) (else_clause "else {\n          sVar10 = *pIVar2->aiColumn;\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }\n        }" else (compound_statement "{\n          sVar10 = *pIVar2->aiColumn;\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }\n        }" { (expression_statement "sVar10 = *pIVar2->aiColumn;" (assignment_expression "sVar10 = *pIVar2->aiColumn" identifier = (pointer_expression "*pIVar2->aiColumn" * (field_expression "pIVar2->aiColumn" identifier -> field_identifier))) ;) (if_statement "if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }" if (parenthesized_expression "(sVar10 < 0)" ( (binary_expression "sVar10 < 0" identifier < number_literal) )) (compound_statement "{\n            local_74 = 0;\n          }" { (expression_statement "local_74 = 0;" (assignment_expression "local_74 = 0" identifier = number_literal) ;) }) (else_clause "else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }" else (compound_statement "{\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }\n          }" { (expression_statement "uVar12 = 0;" (assignment_expression "uVar12 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n              local_74 = (uint)uVar12;\n              pCVar3 = pParent->aCol;\n              pcVar9 = pCVar3[sVar10].zColl;\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);\n              if (iVar4 != 0) break;\n              pcVar9 = pCVar3[sVar10].zName;\n              ppcVar11 = &pFKey->aCol[0].zCol;\n              uVar8 = 0;\n              while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = pIVar2->aiColumn[uVar12];\n              if (sVar10 < 0) break;\n            }" { (expression_statement "local_74 = (uint)uVar12;" (assignment_expression "local_74 = (uint)uVar12" identifier = (cast_expression "(uint)uVar12" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "pCVar3 = pParent->aCol;" (assignment_expression "pCVar3 = pParent->aCol" identifier = (field_expression "pParent->aCol" identifier -> field_identifier)) ;) (expression_statement "pcVar9 = pCVar3[sVar10].zColl;" (assignment_expression "pcVar9 = pCVar3[sVar10].zColl" identifier = (field_expression "pCVar3[sVar10].zColl" (subscript_expression "pCVar3[sVar10]" identifier [ identifier ]) . field_identifier)) ;) (if_statement "if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }" if (parenthesized_expression "(pcVar9 == (char *)0x0)" ( (binary_expression "pcVar9 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                pcVar9 = "BINARY";\n              }" { (expression_statement "pcVar9 = "BINARY";" (assignment_expression "pcVar9 = "BINARY"" identifier = (string_literal ""BINARY"" " string_content ")) ;) })) (expression_statement "iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9);" (assignment_expression "iVar4 = sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9)" identifier = (call_expression "sqlite3StrICmp(pIVar2->azColl[uVar12],pcVar9)" identifier (argument_list "(pIVar2->azColl[uVar12],pcVar9)" ( (subscript_expression "pIVar2->azColl[uVar12]" (field_expression "pIVar2->azColl" identifier -> field_identifier) [ identifier ]) , identifier )))) ;) (if_statement "if (iVar4 != 0) break;" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "pcVar9 = pCVar3[sVar10].zName;" (assignment_expression "pcVar9 = pCVar3[sVar10].zName" identifier = (field_expression "pCVar3[sVar10].zName" (subscript_expression "pCVar3[sVar10]" identifier [ identifier ]) . field_identifier)) ;) (expression_statement "ppcVar11 = &pFKey->aCol[0].zCol;" (assignment_expression "ppcVar11 = &pFKey->aCol[0].zCol" identifier = (pointer_expression "&pFKey->aCol[0].zCol" & (field_expression "pFKey->aCol[0].zCol" (subscript_expression "pFKey->aCol[0]" (field_expression "pFKey->aCol" identifier -> field_identifier) [ number_literal ]) . field_identifier))) ;) (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" identifier = number_literal) ;) (while_statement "while (iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }" while (parenthesized_expression "(iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0)" ( (comma_expression "iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9), iVar4 != 0" (assignment_expression "iVar4 = sqlite3StrICmp(*ppcVar11,pcVar9)" identifier = (call_expression "sqlite3StrICmp(*ppcVar11,pcVar9)" identifier (argument_list "(*ppcVar11,pcVar9)" ( (pointer_expression "*ppcVar11" * identifier) , identifier )))) , (binary_expression "iVar4 != 0" identifier != number_literal)) )) (compound_statement "{\n                uVar8 = uVar8 + 1;\n                ppcVar11 = ppcVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }" { (expression_statement "uVar8 = uVar8 + 1;" (assignment_expression "uVar8 = uVar8 + 1" identifier = (binary_expression "uVar8 + 1" identifier + number_literal)) ;) (expression_statement "ppcVar11 = ppcVar11 + 2;" (assignment_expression "ppcVar11 = ppcVar11 + 2" identifier = (binary_expression "ppcVar11 + 2" identifier + number_literal)) ;) (if_statement "if (uVar5 == uVar8) goto LAB_0012ebf1;" if (parenthesized_expression "(uVar5 == uVar8)" ( (binary_expression "uVar5 == uVar8" identifier == identifier) )) (goto_statement "goto LAB_0012ebf1;" goto statement_identifier ;)) })) (if_statement "if (local_58 != (int *)0x0) {\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }" if (parenthesized_expression "(local_58 != (int *)0x0)" ( (binary_expression "local_58 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;\n              }" { (expression_statement "local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom;" (assignment_expression "local_58[uVar12] = pFKey->aCol[(int)uVar8].iFrom" (subscript_expression "local_58[uVar12]" identifier [ identifier ]) = (field_expression "pFKey->aCol[(int)uVar8].iFrom" (subscript_expression "pFKey->aCol[(int)uVar8]" (field_expression "pFKey->aCol" identifier -> field_identifier) [ (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier) ]) . field_identifier)) ;) })) (if_statement "if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;" if (parenthesized_expression "((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1))" ( (binary_expression "(uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)" (parenthesized_expression "(uVar1 == uVar8)" ( (binary_expression "uVar1 == uVar8" identifier == identifier) )) || (parenthesized_expression "(local_74 = local_74 + 1, uVar12 == uVar5 - 1)" ( (comma_expression "local_74 = local_74 + 1, uVar12 == uVar5 - 1" (assignment_expression "local_74 = local_74 + 1" identifier = (binary_expression "local_74 + 1" identifier + number_literal)) , (binary_expression "uVar12 == uVar5 - 1" identifier == (binary_expression "uVar5 - 1" identifier - number_literal))) ))) )) (break_statement "break;" break ;)) (expression_statement "uVar12 = uVar12 + 1;" (assignment_expression "uVar12 = uVar12 + 1" identifier = (binary_expression "uVar12 + 1" identifier + number_literal)) ;) (expression_statement "sVar10 = pIVar2->aiColumn[uVar12];" (assignment_expression "sVar10 = pIVar2->aiColumn[uVar12]" identifier = (subscript_expression "pIVar2->aiColumn[uVar12]" (field_expression "pIVar2->aiColumn" identifier -> field_identifier) [ identifier ])) ;) (if_statement "if (sVar10 < 0) break;" if (parenthesized_expression "(sVar10 < 0)" ( (binary_expression "sVar10 < 0" identifier < number_literal) )) (break_statement "break;" break ;)) })) }))) }))) (labeled_statement "LAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;" statement_identifier : (if_statement "if (uVar1 == local_74) goto LAB_0012eb17;" if (parenthesized_expression "(uVar1 == local_74)" ( (binary_expression "uVar1 == local_74" identifier == identifier) )) (goto_statement "goto LAB_0012eb17;" goto statement_identifier ;))) }))) })) (expression_statement "pIVar2 = pIVar2->pNext;" (assignment_expression "pIVar2 = pIVar2->pNext" identifier = (field_expression "pIVar2->pNext" identifier -> field_identifier)) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "undefined8\nFUN_0012e9e7(undefined8 *param_1,long param_2,undefined8 *param_3,long *param_4,undefined8 *param_5)\n\n{\n  uint uVar1;\n  long lVar2;\n  long lVar3;\n  int iVar4;\n  uint uVar5;\n  undefined8 uVar6;\n  undefined4 *puVar7;\n  uint uVar8;\n  char *pcVar9;\n  short sVar10;\n  undefined8 *puVar11;\n  ulong uVar12;\n  uint local_74;\n  undefined4 *local_58;\n  \n  uVar1 = *(uint *)(param_3 + 5);\n  lVar2 = param_3[9];\n  if (uVar1 == 1) {\n    if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }\n  }\n  else if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }\n  lVar3 = *(long *)(param_2 + 0x10);\n  do {\n    if (lVar3 == 0) goto LAB_0012ec6a;\n    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);\n    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    lVar3 = *(long *)(lVar3 + 0x28);\n  } while( true );\n}\n\n" (function_definition "undefined8\nFUN_0012e9e7(undefined8 *param_1,long param_2,undefined8 *param_3,long *param_4,undefined8 *param_5)\n\n{\n  uint uVar1;\n  long lVar2;\n  long lVar3;\n  int iVar4;\n  uint uVar5;\n  undefined8 uVar6;\n  undefined4 *puVar7;\n  uint uVar8;\n  char *pcVar9;\n  short sVar10;\n  undefined8 *puVar11;\n  ulong uVar12;\n  uint local_74;\n  undefined4 *local_58;\n  \n  uVar1 = *(uint *)(param_3 + 5);\n  lVar2 = param_3[9];\n  if (uVar1 == 1) {\n    if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }\n  }\n  else if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }\n  lVar3 = *(long *)(param_2 + 0x10);\n  do {\n    if (lVar3 == 0) goto LAB_0012ec6a;\n    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);\n    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    lVar3 = *(long *)(lVar3 + 0x28);\n  } while( true );\n}" type_identifier (function_declarator "FUN_0012e9e7(undefined8 *param_1,long param_2,undefined8 *param_3,long *param_4,undefined8 *param_5)" identifier (parameter_list "(undefined8 *param_1,long param_2,undefined8 *param_3,long *param_4,undefined8 *param_5)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "long *param_4" (sized_type_specifier "long" long) (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined8 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  long lVar2;\n  long lVar3;\n  int iVar4;\n  uint uVar5;\n  undefined8 uVar6;\n  undefined4 *puVar7;\n  uint uVar8;\n  char *pcVar9;\n  short sVar10;\n  undefined8 *puVar11;\n  ulong uVar12;\n  uint local_74;\n  undefined4 *local_58;\n  \n  uVar1 = *(uint *)(param_3 + 5);\n  lVar2 = param_3[9];\n  if (uVar1 == 1) {\n    if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }\n  }\n  else if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }\n  lVar3 = *(long *)(param_2 + 0x10);\n  do {\n    if (lVar3 == 0) goto LAB_0012ec6a;\n    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);\n    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    lVar3 = *(long *)(lVar3 + 0x28);\n  } while( true );\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "undefined8 uVar6;" type_identifier identifier ;) (declaration "undefined4 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "char *pcVar9;" primitive_type (pointer_declarator "*pcVar9" * identifier) ;) (declaration "short sVar10;" (sized_type_specifier "short" short) identifier ;) (declaration "undefined8 *puVar11;" type_identifier (pointer_declarator "*puVar11" * identifier) ;) (declaration "ulong uVar12;" type_identifier identifier ;) (declaration "uint local_74;" type_identifier identifier ;) (declaration "undefined4 *local_58;" type_identifier (pointer_declarator "*local_58" * identifier) ;) (expression_statement "uVar1 = *(uint *)(param_3 + 5);" (assignment_expression "uVar1 = *(uint *)(param_3 + 5)" identifier = (pointer_expression "*(uint *)(param_3 + 5)" * (cast_expression "(uint *)(param_3 + 5)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 5)" ( (binary_expression "param_3 + 5" identifier + number_literal) ))))) ;) (expression_statement "lVar2 = param_3[9];" (assignment_expression "lVar2 = param_3[9]" identifier = (subscript_expression "param_3[9]" identifier [ number_literal ])) ;) (if_statement "if (uVar1 == 1) {\n    if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }\n  }\n  else if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" if (parenthesized_expression "(uVar1 == 1)" ( (binary_expression "uVar1 == 1" identifier == number_literal) )) (compound_statement "{\n    if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }\n  }" { (if_statement "if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }" if (parenthesized_expression "(*(short *)(param_2 + 0x44) < 0)" ( (binary_expression "*(short *)(param_2 + 0x44) < 0" (pointer_expression "*(short *)(param_2 + 0x44)" * (cast_expression "(short *)(param_2 + 0x44)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x44)" ( (binary_expression "param_2 + 0x44" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n      local_58 = (undefined4 *)0x0;\n    }" { (expression_statement "local_58 = (undefined4 *)0x0;" (assignment_expression "local_58 = (undefined4 *)0x0" identifier = (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }" else (compound_statement "{\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }" { (if_statement "if (lVar2 == 0) {\n        return 0;\n      }" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));" (assignment_expression "uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)))" identifier = (call_expression "FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)))" identifier (argument_list "(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)))" ( (pointer_expression "*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8))" * (cast_expression "(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8))" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8))" ( (binary_expression "(long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)" (binary_expression "(long)*(short *)(param_2 + 0x44) * 0x20" (cast_expression "(long)*(short *)(param_2 + 0x44)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*(short *)(param_2 + 0x44)" * (cast_expression "(short *)(param_2 + 0x44)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x44)" ( (binary_expression "param_2 + 0x44" identifier + number_literal) ))))) * number_literal) + (pointer_expression "*(long *)(param_2 + 8)" * (cast_expression "(long *)(param_2 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) )))) )))) ;) (if_statement "if ((int)uVar6 == 0) {\n        return uVar6;\n      }" if (parenthesized_expression "((int)uVar6 == 0)" ( (binary_expression "(int)uVar6 == 0" (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n        return uVar6;\n      }" { (return_statement "return uVar6;" return identifier ;) })) (expression_statement "local_58 = (undefined4 *)0x0;" (assignment_expression "local_58 = (undefined4 *)0x0" identifier = (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }))) }) (else_clause "else if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" else (if_statement "if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" if (parenthesized_expression "(param_5 == (undefined8 *)0x0)" ( (binary_expression "param_5 == (undefined8 *)0x0" identifier == (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_58 = (undefined4 *)0x0;\n  }" { (expression_statement "local_58 = (undefined4 *)0x0;" (assignment_expression "local_58 = (undefined4 *)0x0" identifier = (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" else (compound_statement "{\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" { (expression_statement "local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);" (assignment_expression "local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2)" identifier = (cast_expression "(undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0011efd7(*param_1,(long)(int)uVar1 << 2)" identifier (argument_list "(*param_1,(long)(int)uVar1 << 2)" ( (pointer_expression "*param_1" * identifier) , (binary_expression "(long)(int)uVar1 << 2" (cast_expression "(long)(int)uVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier)) << number_literal) ))))) ;) (if_statement "if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }" if (parenthesized_expression "(local_58 == (undefined4 *)0x0)" ( (binary_expression "local_58 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "*param_5 = local_58;" (assignment_expression "*param_5 = local_58" (pointer_expression "*param_5" * identifier) = identifier) ;) }))))) (expression_statement "lVar3 = *(long *)(param_2 + 0x10);" (assignment_expression "lVar3 = *(long *)(param_2 + 0x10)" identifier = (pointer_expression "*(long *)(param_2 + 0x10)" * (cast_expression "(long *)(param_2 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) ))))) ;) (do_statement "do {\n    if (lVar3 == 0) goto LAB_0012ec6a;\n    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);\n    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    lVar3 = *(long *)(lVar3 + 0x28);\n  } while( true );" do (compound_statement "{\n    if (lVar3 == 0) goto LAB_0012ec6a;\n    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);\n    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    lVar3 = *(long *)(lVar3 + 0x28);\n  }" { (if_statement "if (lVar3 == 0) goto LAB_0012ec6a;" if (parenthesized_expression "(lVar3 == 0)" ( (binary_expression "lVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0012ec6a;" goto statement_identifier ;)) (expression_statement "uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);" (assignment_expression "uVar5 = (uint)*(ushort *)(lVar3 + 0x5e)" identifier = (binary_expression "(uint)*(ushort *)(lVar3 + 0x5e)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(lVar3 + 0x5e)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x5e)" ( (binary_expression "lVar3 + 0x5e" identifier + number_literal) ))))) ;) (if_statement "if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }" if (parenthesized_expression "(((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0))" ( (binary_expression "((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)" (parenthesized_expression "((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0'))" ( (binary_expression "(uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')" (parenthesized_expression "(uVar5 == uVar1)" ( (binary_expression "uVar5 == uVar1" identifier == identifier) )) && (parenthesized_expression "(*(char *)(lVar3 + 0x62) != '\0')" ( (binary_expression "*(char *)(lVar3 + 0x62) != '\0'" (pointer_expression "*(char *)(lVar3 + 0x62)" * (cast_expression "(char *)(lVar3 + 0x62)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x62)" ( (binary_expression "lVar3 + 0x62" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) ))) )) && (parenthesized_expression "(*(long *)(lVar3 + 0x48) == 0)" ( (binary_expression "*(long *)(lVar3 + 0x48) == 0" (pointer_expression "*(long *)(lVar3 + 0x48)" * (cast_expression "(long *)(lVar3 + 0x48)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x48)" ( (binary_expression "lVar3 + 0x48" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }" { (if_statement "if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }" { (if_statement "if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }" if (parenthesized_expression "((*(byte *)(lVar3 + 99) & 3) == 2)" ( (binary_expression "(*(byte *)(lVar3 + 99) & 3) == 2" (parenthesized_expression "(*(byte *)(lVar3 + 99) & 3)" ( (binary_expression "*(byte *)(lVar3 + 99) & 3" (pointer_expression "*(byte *)(lVar3 + 99)" * (cast_expression "(byte *)(lVar3 + 99)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 99)" ( (binary_expression "lVar3 + 99" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }" { (if_statement "if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }" if (parenthesized_expression "((local_58 != (undefined4 *)0x0) && (uVar5 != 0))" ( (binary_expression "(local_58 != (undefined4 *)0x0) && (uVar5 != 0)" (parenthesized_expression "(local_58 != (undefined4 *)0x0)" ( (binary_expression "local_58 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(uVar5 != 0)" ( (binary_expression "uVar5 != 0" identifier != number_literal) ))) )) (compound_statement "{\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }" { (expression_statement "puVar11 = param_3 + 8;" (assignment_expression "puVar11 = param_3 + 8" identifier = (binary_expression "param_3 + 8" identifier + number_literal)) ;) (expression_statement "puVar7 = local_58;" (assignment_expression "puVar7 = local_58" identifier = identifier) ;) (do_statement "do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);" do (compound_statement "{\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            }" { (expression_statement "*puVar7 = *(undefined4 *)puVar11;" (assignment_expression "*puVar7 = *(undefined4 *)puVar11" (pointer_expression "*puVar7" * identifier) = (pointer_expression "*(undefined4 *)puVar11" * (cast_expression "(undefined4 *)puVar11" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "puVar11 = puVar11 + 2;" (assignment_expression "puVar11 = puVar11 + 2" identifier = (binary_expression "puVar11 + 2" identifier + number_literal)) ;) (expression_statement "puVar7 = puVar7 + 1;" (assignment_expression "puVar7 = puVar7 + 1" identifier = (binary_expression "puVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10)" ( (binary_expression "puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10" identifier != (binary_expression "param_3 + (ulong)(uVar5 - 1) * 2 + 10" (binary_expression "param_3 + (ulong)(uVar5 - 1) * 2" identifier + (binary_expression "(ulong)(uVar5 - 1) * 2" (call_expression "(ulong)(uVar5 - 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar5 - 1)" ( (binary_expression "uVar5 - 1" identifier - number_literal) ))) * number_literal)) + number_literal)) )) ;) })) (labeled_statement "LAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }" statement_identifier : (if_statement "if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }" if (parenthesized_expression "(lVar3 != 0)" ( (binary_expression "lVar3 != 0" identifier != number_literal) )) (compound_statement "{\n            *param_4 = lVar3;\n            return 0;\n          }" { (expression_statement "*param_4 = lVar3;" (assignment_expression "*param_4 = lVar3" (pointer_expression "*param_4" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) }))) (labeled_statement "LAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }" statement_identifier : (if_statement "if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }" if (parenthesized_expression "(*(char *)((long)param_1 + 0xd2) == '\0')" ( (binary_expression "*(char *)((long)param_1 + 0xd2) == '\0'" (pointer_expression "*(char *)((long)param_1 + 0xd2)" * (cast_expression "(char *)((long)param_1 + 0xd2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0xd2)" ( (binary_expression "(long)param_1 + 0xd2" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }" { (expression_statement "FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);" (call_expression "FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2])" identifier (argument_list "(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2])" ( identifier , (string_literal ""foreign key mismatch - \"%w\" referencing \"%w\""" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , (pointer_expression "*(undefined8 *)*param_3" * (cast_expression "(undefined8 *)*param_3" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_3" * identifier))) , (subscript_expression "param_3[2]" identifier [ number_literal ]) ))) ;) }))) (expression_statement "FUN_00119825(*param_1,local_58);" (call_expression "FUN_00119825(*param_1,local_58)" identifier (argument_list "(*param_1,local_58)" ( (pointer_expression "*param_1" * identifier) , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) }) (else_clause "else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }" else (compound_statement "{\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }" { (if_statement "if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }" if (parenthesized_expression "((int)uVar1 < 1)" ( (binary_expression "(int)uVar1 < 1" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n          local_74 = 0;\n        }" { (expression_statement "local_74 = 0;" (assignment_expression "local_74 = 0" identifier = number_literal) ;) }) (else_clause "else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }" else (compound_statement "{\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }" { (expression_statement "sVar10 = **(short **)(lVar3 + 8);" (assignment_expression "sVar10 = **(short **)(lVar3 + 8)" identifier = (pointer_expression "**(short **)(lVar3 + 8)" * (pointer_expression "*(short **)(lVar3 + 8)" * (cast_expression "(short **)(lVar3 + 8)" ( (type_descriptor "short **" (sized_type_specifier "short" short) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar3 + 8)" ( (binary_expression "lVar3 + 8" identifier + number_literal) )))))) ;) (if_statement "if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }" if (parenthesized_expression "(sVar10 < 0)" ( (binary_expression "sVar10 < 0" identifier < number_literal) )) (compound_statement "{\n            local_74 = 0;\n          }" { (expression_statement "local_74 = 0;" (assignment_expression "local_74 = 0" identifier = number_literal) ;) }) (else_clause "else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }" else (compound_statement "{\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }" { (expression_statement "uVar12 = 0;" (assignment_expression "uVar12 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }" { (expression_statement "local_74 = (uint)uVar12;" (assignment_expression "local_74 = (uint)uVar12" identifier = (cast_expression "(uint)uVar12" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));" (assignment_expression "puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8))" identifier = (cast_expression "(undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8))" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)sVar10 * 0x20 + *(long *)(param_2 + 8))" ( (binary_expression "(long)sVar10 * 0x20 + *(long *)(param_2 + 8)" (binary_expression "(long)sVar10 * 0x20" (cast_expression "(long)sVar10" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal) + (pointer_expression "*(long *)(param_2 + 8)" * (cast_expression "(long *)(param_2 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) )))) ;) (expression_statement "pcVar9 = (char *)puVar11[2];" (assignment_expression "pcVar9 = (char *)puVar11[2]" identifier = (cast_expression "(char *)puVar11[2]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar11[2]" identifier [ number_literal ]))) ;) (if_statement "if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }" if (parenthesized_expression "(pcVar9 == (char *)0x0)" ( (binary_expression "pcVar9 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                pcVar9 = "BINARY";\n              }" { (expression_statement "pcVar9 = "BINARY";" (assignment_expression "pcVar9 = "BINARY"" identifier = (string_literal ""BINARY"" " string_content ")) ;) })) (expression_statement "iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);" (assignment_expression "iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9)" identifier = (call_expression "FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9)" identifier (argument_list "(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9)" ( (pointer_expression "*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8)" * (cast_expression "(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(lVar3 + 0x40) + uVar12 * 8)" ( (binary_expression "*(long *)(lVar3 + 0x40) + uVar12 * 8" (pointer_expression "*(long *)(lVar3 + 0x40)" * (cast_expression "(long *)(lVar3 + 0x40)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x40)" ( (binary_expression "lVar3 + 0x40" identifier + number_literal) )))) + (binary_expression "uVar12 * 8" identifier * number_literal)) )))) , identifier )))) ;) (if_statement "if (iVar4 != 0) break;" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar6 = *puVar11;" (assignment_expression "uVar6 = *puVar11" identifier = (pointer_expression "*puVar11" * identifier)) ;) (expression_statement "puVar11 = param_3 + 9;" (assignment_expression "puVar11 = param_3 + 9" identifier = (binary_expression "param_3 + 9" identifier + number_literal)) ;) (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" identifier = number_literal) ;) (while_statement "while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }" while (parenthesized_expression "(iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0)" ( (comma_expression "iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0" (assignment_expression "iVar4 = FUN_0010cf97(*puVar11,uVar6)" identifier = (call_expression "FUN_0010cf97(*puVar11,uVar6)" identifier (argument_list "(*puVar11,uVar6)" ( (pointer_expression "*puVar11" * identifier) , identifier )))) , (binary_expression "iVar4 != 0" identifier != number_literal)) )) (compound_statement "{\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }" { (expression_statement "uVar8 = uVar8 + 1;" (assignment_expression "uVar8 = uVar8 + 1" identifier = (binary_expression "uVar8 + 1" identifier + number_literal)) ;) (expression_statement "puVar11 = puVar11 + 2;" (assignment_expression "puVar11 = puVar11 + 2" identifier = (binary_expression "puVar11 + 2" identifier + number_literal)) ;) (if_statement "if (uVar5 == uVar8) goto LAB_0012ebf1;" if (parenthesized_expression "(uVar5 == uVar8)" ( (binary_expression "uVar5 == uVar8" identifier == identifier) )) (goto_statement "goto LAB_0012ebf1;" goto statement_identifier ;)) })) (if_statement "if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }" if (parenthesized_expression "(local_58 != (undefined4 *)0x0)" ( (binary_expression "local_58 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }" { (expression_statement "local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);" (assignment_expression "local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2)" (subscript_expression "local_58[uVar12]" identifier [ identifier ]) = (pointer_expression "*(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2)" * (cast_expression "(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + ((long)(int)uVar8 + 4) * 2)" ( (binary_expression "param_3 + ((long)(int)uVar8 + 4) * 2" identifier + (binary_expression "((long)(int)uVar8 + 4) * 2" (parenthesized_expression "((long)(int)uVar8 + 4)" ( (binary_expression "(long)(int)uVar8 + 4" (cast_expression "(long)(int)uVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier)) + number_literal) )) * number_literal)) ))))) ;) })) (if_statement "if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;" if (parenthesized_expression "((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1))" ( (binary_expression "(uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)" (parenthesized_expression "(uVar1 == uVar8)" ( (binary_expression "uVar1 == uVar8" identifier == identifier) )) || (parenthesized_expression "(local_74 = local_74 + 1, uVar12 == uVar5 - 1)" ( (comma_expression "local_74 = local_74 + 1, uVar12 == uVar5 - 1" (assignment_expression "local_74 = local_74 + 1" identifier = (binary_expression "local_74 + 1" identifier + number_literal)) , (binary_expression "uVar12 == uVar5 - 1" identifier == (binary_expression "uVar5 - 1" identifier - number_literal))) ))) )) (break_statement "break;" break ;)) (expression_statement "uVar12 = uVar12 + 1;" (assignment_expression "uVar12 = uVar12 + 1" identifier = (binary_expression "uVar12 + 1" identifier + number_literal)) ;) (expression_statement "sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);" (assignment_expression "sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2)" identifier = (pointer_expression "*(short *)(*(long *)(lVar3 + 8) + uVar12 * 2)" * (cast_expression "(short *)(*(long *)(lVar3 + 8) + uVar12 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(lVar3 + 8) + uVar12 * 2)" ( (binary_expression "*(long *)(lVar3 + 8) + uVar12 * 2" (pointer_expression "*(long *)(lVar3 + 8)" * (cast_expression "(long *)(lVar3 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 8)" ( (binary_expression "lVar3 + 8" identifier + number_literal) )))) + (binary_expression "uVar12 * 2" identifier * number_literal)) ))))) ;) (if_statement "if (sVar10 < 0) break;" if (parenthesized_expression "(sVar10 < 0)" ( (binary_expression "sVar10 < 0" identifier < number_literal) )) (break_statement "break;" break ;)) })) }))) }))) (labeled_statement "LAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;" statement_identifier : (if_statement "if (uVar1 == local_74) goto LAB_0012eb17;" if (parenthesized_expression "(uVar1 == local_74)" ( (binary_expression "uVar1 == local_74" identifier == identifier) )) (goto_statement "goto LAB_0012eb17;" goto statement_identifier ;))) }))) })) (expression_statement "lVar3 = *(long *)(lVar3 + 0x28);" (assignment_expression "lVar3 = *(long *)(lVar3 + 0x28)" identifier = (pointer_expression "*(long *)(lVar3 + 0x28)" * (cast_expression "(long *)(lVar3 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x28)" ( (binary_expression "lVar3 + 0x28" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier short) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) * LIT) + (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }))) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) << LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }))))) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == IDENT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) ))) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (binary_expression (binary_expression IDENT + (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) ))) * LIT)) + LIT)) )) ;) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return LIT ;) }))) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) , (subscript_expression IDENT [ LIT ]) ))) ;) }))) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , IDENT ))) ;) (return_statement return LIT ;) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) * LIT) + (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) )))) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , IDENT )))) , (binary_expression IDENT != LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;)) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) + LIT) )) * LIT)) ))))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == IDENT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT + LIT)) , (binary_expression IDENT == (binary_expression IDENT - LIT))) ))) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (break_statement break ;)) })) }))) }))) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;))) }))) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "undefined8\nFUN_0012e9e7(undefined8 *param_1,long param_2,undefined8 *param_3,long *param_4,undefined8 *param_5)\n\n{\n  uint uVar1;\n  long lVar2;\n  long lVar3;\n  int iVar4;\n  uint uVar5;\n  undefined8 uVar6;\n  undefined4 *puVar7;\n  uint uVar8;\n  char *pcVar9;\n  short sVar10;\n  undefined8 *puVar11;\n  ulong uVar12;\n  uint local_74;\n  undefined4 *local_58;\n  \n  uVar1 = *(uint *)(param_3 + 5);\n  lVar2 = param_3[9];\n  if (uVar1 == 1) {\n    if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }\n  }\n  else if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }\n  lVar3 = *(long *)(param_2 + 0x10);\n  do {\n    if (lVar3 == 0) goto LAB_0012ec6a;\n    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);\n    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    lVar3 = *(long *)(lVar3 + 0x28);\n  } while( true );\n}" (type_identifier "undefined8") (function_declarator "FUN_0012e9e7(undefined8 *param_1,long param_2,undefined8 *param_3,long *param_4,undefined8 *param_5)" (identifier "FUN_0012e9e7") (parameter_list "(undefined8 *param_1,long param_2,undefined8 *param_3,long *param_4,undefined8 *param_5)" (( "(") (parameter_declaration "undefined8 *param_1" (type_identifier "undefined8") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) (, ",") (parameter_declaration "undefined8 *param_3" (type_identifier "undefined8") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "long *param_4" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "undefined8 *param_5" (type_identifier "undefined8") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  long lVar2;\n  long lVar3;\n  int iVar4;\n  uint uVar5;\n  undefined8 uVar6;\n  undefined4 *puVar7;\n  uint uVar8;\n  char *pcVar9;\n  short sVar10;\n  undefined8 *puVar11;\n  ulong uVar12;\n  uint local_74;\n  undefined4 *local_58;\n  \n  uVar1 = *(uint *)(param_3 + 5);\n  lVar2 = param_3[9];\n  if (uVar1 == 1) {\n    if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }\n  }\n  else if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }\n  lVar3 = *(long *)(param_2 + 0x10);\n  do {\n    if (lVar3 == 0) goto LAB_0012ec6a;\n    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);\n    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    lVar3 = *(long *)(lVar3 + 0x28);\n  } while( true );\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "long lVar3;" (sized_type_specifier "long" (long "long")) (identifier "lVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "undefined8 uVar6;" (type_identifier "undefined8") (identifier "uVar6") (; ";")) (declaration "undefined4 *puVar7;" (type_identifier "undefined4") (pointer_declarator "*puVar7" (* "*") (identifier "puVar7")) (; ";")) (declaration "uint uVar8;" (type_identifier "uint") (identifier "uVar8") (; ";")) (declaration "char *pcVar9;" (primitive_type "char") (pointer_declarator "*pcVar9" (* "*") (identifier "pcVar9")) (; ";")) (declaration "short sVar10;" (sized_type_specifier "short" (short "short")) (identifier "sVar10") (; ";")) (declaration "undefined8 *puVar11;" (type_identifier "undefined8") (pointer_declarator "*puVar11" (* "*") (identifier "puVar11")) (; ";")) (declaration "ulong uVar12;" (type_identifier "ulong") (identifier "uVar12") (; ";")) (declaration "uint local_74;" (type_identifier "uint") (identifier "local_74") (; ";")) (declaration "undefined4 *local_58;" (type_identifier "undefined4") (pointer_declarator "*local_58" (* "*") (identifier "local_58")) (; ";")) (expression_statement "uVar1 = *(uint *)(param_3 + 5);" (assignment_expression "uVar1 = *(uint *)(param_3 + 5)" (identifier "uVar1") (= "=") (pointer_expression "*(uint *)(param_3 + 5)" (* "*") (cast_expression "(uint *)(param_3 + 5)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 5)" (( "(") (binary_expression "param_3 + 5" (identifier "param_3") (+ "+") (number_literal "5")) () ")"))))) (; ";")) (expression_statement "lVar2 = param_3[9];" (assignment_expression "lVar2 = param_3[9]" (identifier "lVar2") (= "=") (subscript_expression "param_3[9]" (identifier "param_3") ([ "[") (number_literal "9") (] "]"))) (; ";")) (if_statement "if (uVar1 == 1) {\n    if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }\n  }\n  else if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" (if "if") (parenthesized_expression "(uVar1 == 1)" (( "(") (binary_expression "uVar1 == 1" (identifier "uVar1") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }\n  }" ({ "{") (if_statement "if (*(short *)(param_2 + 0x44) < 0) {\n      local_58 = (undefined4 *)0x0;\n    }\n    else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }" (if "if") (parenthesized_expression "(*(short *)(param_2 + 0x44) < 0)" (( "(") (binary_expression "*(short *)(param_2 + 0x44) < 0" (pointer_expression "*(short *)(param_2 + 0x44)" (* "*") (cast_expression "(short *)(param_2 + 0x44)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x44)" (( "(") (binary_expression "param_2 + 0x44" (identifier "param_2") (+ "+") (number_literal "0x44")) () ")")))) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      local_58 = (undefined4 *)0x0;\n    }" ({ "{") (expression_statement "local_58 = (undefined4 *)0x0;" (assignment_expression "local_58 = (undefined4 *)0x0" (identifier "local_58") (= "=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")) (else_clause "else {\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }" (else "else") (compound_statement "{\n      if (lVar2 == 0) {\n        return 0;\n      }\n      uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));\n      if ((int)uVar6 == 0) {\n        return uVar6;\n      }\n      local_58 = (undefined4 *)0x0;\n    }" ({ "{") (if_statement "if (lVar2 == 0) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(lVar2 == 0)" (( "(") (binary_expression "lVar2 == 0" (identifier "lVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));" (assignment_expression "uVar6 = FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)))" (identifier "uVar6") (= "=") (call_expression "FUN_0010cf97(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)))" (identifier "FUN_0010cf97") (argument_list "(*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)))" (( "(") (pointer_expression "*(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8))" (* "*") (cast_expression "(undefined8 *)\n                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8))" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8))" (( "(") (binary_expression "(long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)" (binary_expression "(long)*(short *)(param_2 + 0x44) * 0x20" (cast_expression "(long)*(short *)(param_2 + 0x44)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (pointer_expression "*(short *)(param_2 + 0x44)" (* "*") (cast_expression "(short *)(param_2 + 0x44)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x44)" (( "(") (binary_expression "param_2 + 0x44" (identifier "param_2") (+ "+") (number_literal "0x44")) () ")"))))) (* "*") (number_literal "0x20")) (+ "+") (pointer_expression "*(long *)(param_2 + 8)" (* "*") (cast_expression "(long *)(param_2 + 8)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")"))))) () ")")))) () ")")))) (; ";")) (if_statement "if ((int)uVar6 == 0) {\n        return uVar6;\n      }" (if "if") (parenthesized_expression "((int)uVar6 == 0)" (( "(") (binary_expression "(int)uVar6 == 0" (cast_expression "(int)uVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar6")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return uVar6;\n      }" ({ "{") (return_statement "return uVar6;" (return "return") (identifier "uVar6") (; ";")) (} "}"))) (expression_statement "local_58 = (undefined4 *)0x0;" (assignment_expression "local_58 = (undefined4 *)0x0" (identifier "local_58") (= "=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")))) (} "}")) (else_clause "else if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" (else "else") (if_statement "if (param_5 == (undefined8 *)0x0) {\n    local_58 = (undefined4 *)0x0;\n  }\n  else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" (if "if") (parenthesized_expression "(param_5 == (undefined8 *)0x0)" (( "(") (binary_expression "param_5 == (undefined8 *)0x0" (identifier "param_5") (== "==") (cast_expression "(undefined8 *)0x0" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    local_58 = (undefined4 *)0x0;\n  }" ({ "{") (expression_statement "local_58 = (undefined4 *)0x0;" (assignment_expression "local_58 = (undefined4 *)0x0" (identifier "local_58") (= "=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")) (else_clause "else {\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" (else "else") (compound_statement "{\n    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);\n    if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }\n    *param_5 = local_58;\n  }" ({ "{") (expression_statement "local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);" (assignment_expression "local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2)" (identifier "local_58") (= "=") (cast_expression "(undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0011efd7(*param_1,(long)(int)uVar1 << 2)" (identifier "FUN_0011efd7") (argument_list "(*param_1,(long)(int)uVar1 << 2)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) (, ",") (binary_expression "(long)(int)uVar1 << 2" (cast_expression "(long)(int)uVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1"))) (<< "<<") (number_literal "2")) () ")"))))) (; ";")) (if_statement "if (local_58 == (undefined4 *)0x0) {\n      return 1;\n    }" (if "if") (parenthesized_expression "(local_58 == (undefined4 *)0x0)" (( "(") (binary_expression "local_58 == (undefined4 *)0x0" (identifier "local_58") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      return 1;\n    }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "*param_5 = local_58;" (assignment_expression "*param_5 = local_58" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "local_58")) (; ";")) (} "}")))))) (expression_statement "lVar3 = *(long *)(param_2 + 0x10);" (assignment_expression "lVar3 = *(long *)(param_2 + 0x10)" (identifier "lVar3") (= "=") (pointer_expression "*(long *)(param_2 + 0x10)" (* "*") (cast_expression "(long *)(param_2 + 0x10)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (do_statement "do {\n    if (lVar3 == 0) goto LAB_0012ec6a;\n    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);\n    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    lVar3 = *(long *)(lVar3 + 0x28);\n  } while( true );" (do "do") (compound_statement "{\n    if (lVar3 == 0) goto LAB_0012ec6a;\n    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);\n    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }\n    lVar3 = *(long *)(lVar3 + 0x28);\n  }" ({ "{") (if_statement "if (lVar3 == 0) goto LAB_0012ec6a;" (if "if") (parenthesized_expression "(lVar3 == 0)" (( "(") (binary_expression "lVar3 == 0" (identifier "lVar3") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0012ec6a;" (goto "goto") (statement_identifier "LAB_0012ec6a") (; ";"))) (expression_statement "uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);" (assignment_expression "uVar5 = (uint)*(ushort *)(lVar3 + 0x5e)" (identifier "uVar5") (= "=") (binary_expression "(uint)*(ushort *)(lVar3 + 0x5e)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(ushort *)(lVar3 + 0x5e)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x5e)" (( "(") (binary_expression "lVar3 + 0x5e" (identifier "lVar3") (+ "+") (number_literal "0x5e")) () ")"))))) (; ";")) (if_statement "if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }" (if "if") (parenthesized_expression "(((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0))" (( "(") (binary_expression "((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)" (parenthesized_expression "((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0'))" (( "(") (binary_expression "(uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')" (parenthesized_expression "(uVar5 == uVar1)" (( "(") (binary_expression "uVar5 == uVar1" (identifier "uVar5") (== "==") (identifier "uVar1")) () ")")) (&& "&&") (parenthesized_expression "(*(char *)(lVar3 + 0x62) != '\0')" (( "(") (binary_expression "*(char *)(lVar3 + 0x62) != '\0'" (pointer_expression "*(char *)(lVar3 + 0x62)" (* "*") (cast_expression "(char *)(lVar3 + 0x62)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x62)" (( "(") (binary_expression "lVar3 + 0x62" (identifier "lVar3") (+ "+") (number_literal "0x62")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(*(long *)(lVar3 + 0x48) == 0)" (( "(") (binary_expression "*(long *)(lVar3 + 0x48) == 0" (pointer_expression "*(long *)(lVar3 + 0x48)" (* "*") (cast_expression "(long *)(lVar3 + 0x48)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x48)" (( "(") (binary_expression "lVar3 + 0x48" (identifier "lVar3") (+ "+") (number_literal "0x48")) () ")")))) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }\n    }" ({ "{") (if_statement "if (lVar2 == 0) {\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }\n      else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }" (if "if") (parenthesized_expression "(lVar2 == 0)" (( "(") (binary_expression "lVar2 == 0" (identifier "lVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }\n      }" ({ "{") (if_statement "if ((*(byte *)(lVar3 + 99) & 3) == 2) {\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }" (if "if") (parenthesized_expression "((*(byte *)(lVar3 + 99) & 3) == 2)" (( "(") (binary_expression "(*(byte *)(lVar3 + 99) & 3) == 2" (parenthesized_expression "(*(byte *)(lVar3 + 99) & 3)" (( "(") (binary_expression "*(byte *)(lVar3 + 99) & 3" (pointer_expression "*(byte *)(lVar3 + 99)" (* "*") (cast_expression "(byte *)(lVar3 + 99)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 99)" (( "(") (binary_expression "lVar3 + 99" (identifier "lVar3") (+ "+") (number_literal "99")) () ")")))) (& "&") (number_literal "3")) () ")")) (== "==") (number_literal "2")) () ")")) (compound_statement "{\n          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }\nLAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }\nLAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }\n          FUN_00119825(*param_1,local_58);\n          return 1;\n        }" ({ "{") (if_statement "if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }" (if "if") (parenthesized_expression "((local_58 != (undefined4 *)0x0) && (uVar5 != 0))" (( "(") (binary_expression "(local_58 != (undefined4 *)0x0) && (uVar5 != 0)" (parenthesized_expression "(local_58 != (undefined4 *)0x0)" (( "(") (binary_expression "local_58 != (undefined4 *)0x0" (identifier "local_58") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(uVar5 != 0)" (( "(") (binary_expression "uVar5 != 0" (identifier "uVar5") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n            puVar11 = param_3 + 8;\n            puVar7 = local_58;\n            do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);\n          }" ({ "{") (expression_statement "puVar11 = param_3 + 8;" (assignment_expression "puVar11 = param_3 + 8" (identifier "puVar11") (= "=") (binary_expression "param_3 + 8" (identifier "param_3") (+ "+") (number_literal "8"))) (; ";")) (expression_statement "puVar7 = local_58;" (assignment_expression "puVar7 = local_58" (identifier "puVar7") (= "=") (identifier "local_58")) (; ";")) (do_statement "do {\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);" (do "do") (compound_statement "{\n              *puVar7 = *(undefined4 *)puVar11;\n              puVar11 = puVar11 + 2;\n              puVar7 = puVar7 + 1;\n            }" ({ "{") (expression_statement "*puVar7 = *(undefined4 *)puVar11;" (assignment_expression "*puVar7 = *(undefined4 *)puVar11" (pointer_expression "*puVar7" (* "*") (identifier "puVar7")) (= "=") (pointer_expression "*(undefined4 *)puVar11" (* "*") (cast_expression "(undefined4 *)puVar11" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar11")))) (; ";")) (expression_statement "puVar11 = puVar11 + 2;" (assignment_expression "puVar11 = puVar11 + 2" (identifier "puVar11") (= "=") (binary_expression "puVar11 + 2" (identifier "puVar11") (+ "+") (number_literal "2"))) (; ";")) (expression_statement "puVar7 = puVar7 + 1;" (assignment_expression "puVar7 = puVar7 + 1" (identifier "puVar7") (= "=") (binary_expression "puVar7 + 1" (identifier "puVar7") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10)" (( "(") (binary_expression "puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10" (identifier "puVar11") (!= "!=") (binary_expression "param_3 + (ulong)(uVar5 - 1) * 2 + 10" (binary_expression "param_3 + (ulong)(uVar5 - 1) * 2" (identifier "param_3") (+ "+") (binary_expression "(ulong)(uVar5 - 1) * 2" (call_expression "(ulong)(uVar5 - 1)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(uVar5 - 1)" (( "(") (binary_expression "uVar5 - 1" (identifier "uVar5") (- "-") (number_literal "1")) () ")"))) (* "*") (number_literal "2"))) (+ "+") (number_literal "10"))) () ")")) (; ";")) (} "}"))) (labeled_statement "LAB_0012eb17:\n          if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }" (statement_identifier "LAB_0012eb17") (: ":") (if_statement "if (lVar3 != 0) {\n            *param_4 = lVar3;\n            return 0;\n          }" (if "if") (parenthesized_expression "(lVar3 != 0)" (( "(") (binary_expression "lVar3 != 0" (identifier "lVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n            *param_4 = lVar3;\n            return 0;\n          }" ({ "{") (expression_statement "*param_4 = lVar3;" (assignment_expression "*param_4 = lVar3" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "lVar3")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))) (labeled_statement "LAB_0012ec6a:\n          if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }" (statement_identifier "LAB_0012ec6a") (: ":") (if_statement "if (*(char *)((long)param_1 + 0xd2) == '\0') {\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }" (if "if") (parenthesized_expression "(*(char *)((long)param_1 + 0xd2) == '\0')" (( "(") (binary_expression "*(char *)((long)param_1 + 0xd2) == '\0'" (pointer_expression "*(char *)((long)param_1 + 0xd2)" (* "*") (cast_expression "(char *)((long)param_1 + 0xd2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_1 + 0xd2)" (( "(") (binary_expression "(long)param_1 + 0xd2" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (+ "+") (number_literal "0xd2")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);\n          }" ({ "{") (expression_statement "FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2]);" (call_expression "FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2])" (identifier "FUN_0012c657") (argument_list "(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",\n                         *(undefined8 *)*param_3,param_3[2])" (( "(") (identifier "param_1") (, ",") (string_literal ""foreign key mismatch - \"%w\" referencing \"%w\""" (" """) (string_content "foreign key mismatch - ") (escape_sequence "\"") (string_content "%w") (escape_sequence "\"") (string_content " referencing ") (escape_sequence "\"") (string_content "%w") (escape_sequence "\"") (" """)) (, ",") (pointer_expression "*(undefined8 *)*param_3" (* "*") (cast_expression "(undefined8 *)*param_3" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_3" (* "*") (identifier "param_3")))) (, ",") (subscript_expression "param_3[2]" (identifier "param_3") ([ "[") (number_literal "2") (] "]")) () ")"))) (; ";")) (} "}")))) (expression_statement "FUN_00119825(*param_1,local_58);" (call_expression "FUN_00119825(*param_1,local_58)" (identifier "FUN_00119825") (argument_list "(*param_1,local_58)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) (, ",") (identifier "local_58") () ")"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }" (else "else") (compound_statement "{\n        if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }\nLAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;\n      }" ({ "{") (if_statement "if ((int)uVar1 < 1) {\n          local_74 = 0;\n        }\n        else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }" (if "if") (parenthesized_expression "((int)uVar1 < 1)" (( "(") (binary_expression "(int)uVar1 < 1" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (< "<") (number_literal "1")) () ")")) (compound_statement "{\n          local_74 = 0;\n        }" ({ "{") (expression_statement "local_74 = 0;" (assignment_expression "local_74 = 0" (identifier "local_74") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }" (else "else") (compound_statement "{\n          sVar10 = **(short **)(lVar3 + 8);\n          if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }\n        }" ({ "{") (expression_statement "sVar10 = **(short **)(lVar3 + 8);" (assignment_expression "sVar10 = **(short **)(lVar3 + 8)" (identifier "sVar10") (= "=") (pointer_expression "**(short **)(lVar3 + 8)" (* "*") (pointer_expression "*(short **)(lVar3 + 8)" (* "*") (cast_expression "(short **)(lVar3 + 8)" (( "(") (type_descriptor "short **" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(lVar3 + 8)" (( "(") (binary_expression "lVar3 + 8" (identifier "lVar3") (+ "+") (number_literal "8")) () ")")))))) (; ";")) (if_statement "if (sVar10 < 0) {\n            local_74 = 0;\n          }\n          else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }" (if "if") (parenthesized_expression "(sVar10 < 0)" (( "(") (binary_expression "sVar10 < 0" (identifier "sVar10") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n            local_74 = 0;\n          }" ({ "{") (expression_statement "local_74 = 0;" (assignment_expression "local_74 = 0" (identifier "local_74") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }" (else "else") (compound_statement "{\n            uVar12 = 0;\n            while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }\n          }" ({ "{") (expression_statement "uVar12 = 0;" (assignment_expression "uVar12 = 0" (identifier "uVar12") (= "=") (number_literal "0")) (; ";")) (while_statement "while( true ) {\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n              local_74 = (uint)uVar12;\n              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));\n              pcVar9 = (char *)puVar11[2];\n              if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }\n              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);\n              if (iVar4 != 0) break;\n              uVar6 = *puVar11;\n              puVar11 = param_3 + 9;\n              uVar8 = 0;\n              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }\n              if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }\n              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;\n              uVar12 = uVar12 + 1;\n              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);\n              if (sVar10 < 0) break;\n            }" ({ "{") (expression_statement "local_74 = (uint)uVar12;" (assignment_expression "local_74 = (uint)uVar12" (identifier "local_74") (= "=") (cast_expression "(uint)uVar12" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar12"))) (; ";")) (expression_statement "puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));" (assignment_expression "puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8))" (identifier "puVar11") (= "=") (cast_expression "(undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8))" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)sVar10 * 0x20 + *(long *)(param_2 + 8))" (( "(") (binary_expression "(long)sVar10 * 0x20 + *(long *)(param_2 + 8)" (binary_expression "(long)sVar10 * 0x20" (cast_expression "(long)sVar10" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "sVar10")) (* "*") (number_literal "0x20")) (+ "+") (pointer_expression "*(long *)(param_2 + 8)" (* "*") (cast_expression "(long *)(param_2 + 8)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")"))))) () ")")))) (; ";")) (expression_statement "pcVar9 = (char *)puVar11[2];" (assignment_expression "pcVar9 = (char *)puVar11[2]" (identifier "pcVar9") (= "=") (cast_expression "(char *)puVar11[2]" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar11[2]" (identifier "puVar11") ([ "[") (number_literal "2") (] "]")))) (; ";")) (if_statement "if (pcVar9 == (char *)0x0) {\n                pcVar9 = "BINARY";\n              }" (if "if") (parenthesized_expression "(pcVar9 == (char *)0x0)" (( "(") (binary_expression "pcVar9 == (char *)0x0" (identifier "pcVar9") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                pcVar9 = "BINARY";\n              }" ({ "{") (expression_statement "pcVar9 = "BINARY";" (assignment_expression "pcVar9 = "BINARY"" (identifier "pcVar9") (= "=") (string_literal ""BINARY"" (" """) (string_content "BINARY") (" """))) (; ";")) (} "}"))) (expression_statement "iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);" (assignment_expression "iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9)" (identifier "iVar4") (= "=") (call_expression "FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9)" (identifier "FUN_0010cf97") (argument_list "(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9)" (( "(") (pointer_expression "*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8)" (* "*") (cast_expression "(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(lVar3 + 0x40) + uVar12 * 8)" (( "(") (binary_expression "*(long *)(lVar3 + 0x40) + uVar12 * 8" (pointer_expression "*(long *)(lVar3 + 0x40)" (* "*") (cast_expression "(long *)(lVar3 + 0x40)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x40)" (( "(") (binary_expression "lVar3 + 0x40" (identifier "lVar3") (+ "+") (number_literal "0x40")) () ")")))) (+ "+") (binary_expression "uVar12 * 8" (identifier "uVar12") (* "*") (number_literal "8"))) () ")")))) (, ",") (identifier "pcVar9") () ")")))) (; ";")) (if_statement "if (iVar4 != 0) break;" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar6 = *puVar11;" (assignment_expression "uVar6 = *puVar11" (identifier "uVar6") (= "=") (pointer_expression "*puVar11" (* "*") (identifier "puVar11"))) (; ";")) (expression_statement "puVar11 = param_3 + 9;" (assignment_expression "puVar11 = param_3 + 9" (identifier "puVar11") (= "=") (binary_expression "param_3 + 9" (identifier "param_3") (+ "+") (number_literal "9"))) (; ";")) (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" (identifier "uVar8") (= "=") (number_literal "0")) (; ";")) (while_statement "while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }" (while "while") (parenthesized_expression "(iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0)" (( "(") (comma_expression "iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0" (assignment_expression "iVar4 = FUN_0010cf97(*puVar11,uVar6)" (identifier "iVar4") (= "=") (call_expression "FUN_0010cf97(*puVar11,uVar6)" (identifier "FUN_0010cf97") (argument_list "(*puVar11,uVar6)" (( "(") (pointer_expression "*puVar11" (* "*") (identifier "puVar11")) (, ",") (identifier "uVar6") () ")")))) (, ",") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0"))) () ")")) (compound_statement "{\n                uVar8 = uVar8 + 1;\n                puVar11 = puVar11 + 2;\n                if (uVar5 == uVar8) goto LAB_0012ebf1;\n              }" ({ "{") (expression_statement "uVar8 = uVar8 + 1;" (assignment_expression "uVar8 = uVar8 + 1" (identifier "uVar8") (= "=") (binary_expression "uVar8 + 1" (identifier "uVar8") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar11 = puVar11 + 2;" (assignment_expression "puVar11 = puVar11 + 2" (identifier "puVar11") (= "=") (binary_expression "puVar11 + 2" (identifier "puVar11") (+ "+") (number_literal "2"))) (; ";")) (if_statement "if (uVar5 == uVar8) goto LAB_0012ebf1;" (if "if") (parenthesized_expression "(uVar5 == uVar8)" (( "(") (binary_expression "uVar5 == uVar8" (identifier "uVar5") (== "==") (identifier "uVar8")) () ")")) (goto_statement "goto LAB_0012ebf1;" (goto "goto") (statement_identifier "LAB_0012ebf1") (; ";"))) (} "}"))) (if_statement "if (local_58 != (undefined4 *)0x0) {\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }" (if "if") (parenthesized_expression "(local_58 != (undefined4 *)0x0)" (( "(") (binary_expression "local_58 != (undefined4 *)0x0" (identifier "local_58") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);\n              }" ({ "{") (expression_statement "local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);" (assignment_expression "local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2)" (subscript_expression "local_58[uVar12]" (identifier "local_58") ([ "[") (identifier "uVar12") (] "]")) (= "=") (pointer_expression "*(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2)" (* "*") (cast_expression "(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + ((long)(int)uVar8 + 4) * 2)" (( "(") (binary_expression "param_3 + ((long)(int)uVar8 + 4) * 2" (identifier "param_3") (+ "+") (binary_expression "((long)(int)uVar8 + 4) * 2" (parenthesized_expression "((long)(int)uVar8 + 4)" (( "(") (binary_expression "(long)(int)uVar8 + 4" (cast_expression "(long)(int)uVar8" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)uVar8" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar8"))) (+ "+") (number_literal "4")) () ")")) (* "*") (number_literal "2"))) () ")"))))) (; ";")) (} "}"))) (if_statement "if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;" (if "if") (parenthesized_expression "((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1))" (( "(") (binary_expression "(uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)" (parenthesized_expression "(uVar1 == uVar8)" (( "(") (binary_expression "uVar1 == uVar8" (identifier "uVar1") (== "==") (identifier "uVar8")) () ")")) (|| "||") (parenthesized_expression "(local_74 = local_74 + 1, uVar12 == uVar5 - 1)" (( "(") (comma_expression "local_74 = local_74 + 1, uVar12 == uVar5 - 1" (assignment_expression "local_74 = local_74 + 1" (identifier "local_74") (= "=") (binary_expression "local_74 + 1" (identifier "local_74") (+ "+") (number_literal "1"))) (, ",") (binary_expression "uVar12 == uVar5 - 1" (identifier "uVar12") (== "==") (binary_expression "uVar5 - 1" (identifier "uVar5") (- "-") (number_literal "1")))) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar12 = uVar12 + 1;" (assignment_expression "uVar12 = uVar12 + 1" (identifier "uVar12") (= "=") (binary_expression "uVar12 + 1" (identifier "uVar12") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);" (assignment_expression "sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2)" (identifier "sVar10") (= "=") (pointer_expression "*(short *)(*(long *)(lVar3 + 8) + uVar12 * 2)" (* "*") (cast_expression "(short *)(*(long *)(lVar3 + 8) + uVar12 * 2)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(lVar3 + 8) + uVar12 * 2)" (( "(") (binary_expression "*(long *)(lVar3 + 8) + uVar12 * 2" (pointer_expression "*(long *)(lVar3 + 8)" (* "*") (cast_expression "(long *)(lVar3 + 8)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 8)" (( "(") (binary_expression "lVar3 + 8" (identifier "lVar3") (+ "+") (number_literal "8")) () ")")))) (+ "+") (binary_expression "uVar12 * 2" (identifier "uVar12") (* "*") (number_literal "2"))) () ")"))))) (; ";")) (if_statement "if (sVar10 < 0) break;" (if "if") (parenthesized_expression "(sVar10 < 0)" (( "(") (binary_expression "sVar10 < 0" (identifier "sVar10") (< "<") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}"))) (} "}")))) (} "}")))) (labeled_statement "LAB_0012ebf1:\n        if (uVar1 == local_74) goto LAB_0012eb17;" (statement_identifier "LAB_0012ebf1") (: ":") (if_statement "if (uVar1 == local_74) goto LAB_0012eb17;" (if "if") (parenthesized_expression "(uVar1 == local_74)" (( "(") (binary_expression "uVar1 == local_74" (identifier "uVar1") (== "==") (identifier "local_74")) () ")")) (goto_statement "goto LAB_0012eb17;" (goto "goto") (statement_identifier "LAB_0012eb17") (; ";")))) (} "}")))) (} "}"))) (expression_statement "lVar3 = *(long *)(lVar3 + 0x28);" (assignment_expression "lVar3 = *(long *)(lVar3 + 0x28)" (identifier "lVar3") (= "=") (pointer_expression "*(long *)(lVar3 + 0x28)" (* "*") (cast_expression "(long *)(lVar3 + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x28)" (( "(") (binary_expression "lVar3 + 0x28" (identifier "lVar3") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

int function_1(type_1 *pParse,type_2 *pParent,type_3 *pFKey,type_4 **ppIdx,int **var_5)

{
  type_5 var_1;
  char *var_2;
  type_4 *var_8;
  type_6 *pCVar3;
  int var_4;
  type_5 var_9;
  int *var_11;
  type_7 *var_10;
  type_5 var_16;
  char *var_15;
  short var_14;
  char **var_17;
  type_8 var_19;
  type_5 var_18;
  int *var_7;
  
  var_1 = pFKey->nCol;
  var_2 = pFKey->aCol[0].zCol;
  if (var_1 == 1) {
    if (pParent->iPKey < 0) {
      var_7 = (int *)0x0;
    }
    else {
      if (var_2 == (char *)0x0) {
        return 0;
      }
      var_4 = var_3(pParent->aCol[pParent->iPKey].zName,var_2);
      if (var_4 == 0) {
        return 0;
      }
      var_7 = (int *)0x0;
    }
  }
  else if (var_5 == (int **)0x0) {
    var_7 = (int *)0x0;
  }
  else {
    var_7 = (int *)var_6(pParse->db,(long)(int)var_1 << 2);
    if (var_7 == (int *)0x0) {
      return 1;
    }
    *var_5 = var_7;
  }
  var_8 = pParent->pIndex;
  do {
    if (var_8 == (type_4 *)0x0) goto LAB_0012ec6a;
    var_9 = (type_5)var_8->nKeyCol;
    if (((var_9 == var_1) && (var_8->onError != '\0')) && (var_8->pPartIdxWhere == (type_9 *)0x0)) {
      if (var_2 == (char *)0x0) {
        if ((var_8->field_0x63 & 3) == 2) {
          if ((var_7 != (int *)0x0) && (var_9 != 0)) {
            var_10 = pFKey->aCol;
            var_11 = var_7;
            do {
              *var_11 = var_10->iFrom;
              var_10 = var_10 + 1;
              var_11 = var_11 + 1;
            } while (var_10 != (type_7 *)(pFKey[1].aAction + (type_8)(var_9 - 1) * 0x10 + -0x2d));
          }
LAB_0012eb17:
          if (var_8 != (type_4 *)0x0) {
            *ppIdx = var_8;
            return 0;
          }
LAB_0012ec6a:
          if (pParse->disableTriggers == '\0') {
            var_12(pParse,"foreign key mismatch - \"%w\" referencing \"%w\"",
                            pFKey->pFrom->zName,pFKey->zTo);
          }
          var_13(pParse->db,var_7);
          return 1;
        }
      }
      else {
        if ((int)var_1 < 1) {
          var_18 = 0;
        }
        else {
          var_14 = *var_8->aiColumn;
          if (var_14 < 0) {
            var_18 = 0;
          }
          else {
            var_19 = 0;
            while( true ) {
              var_18 = (type_5)var_19;
              pCVar3 = pParent->aCol;
              var_15 = pCVar3[var_14].zColl;
              if (var_15 == (char *)0x0) {
                var_15 = "BINARY";
              }
              var_4 = var_3(var_8->azColl[var_19],var_15);
              if (var_4 != 0) break;
              var_15 = pCVar3[var_14].zName;
              var_17 = &pFKey->aCol[0].zCol;
              var_16 = 0;
              while (var_4 = var_3(*var_17,var_15), var_4 != 0) {
                var_16 = var_16 + 1;
                var_17 = var_17 + 2;
                if (var_9 == var_16) goto LAB_0012ebf1;
              }
              if (var_7 != (int *)0x0) {
                var_7[var_19] = pFKey->aCol[(int)var_16].iFrom;
              }
              if ((var_1 == var_16) || (var_18 = var_18 + 1, var_19 == var_9 - 1)) break;
              var_19 = var_19 + 1;
              var_14 = var_8->aiColumn[var_19];
              if (var_14 < 0) break;
            }
          }
        }
LAB_0012ebf1:
        if (var_1 == var_18) goto LAB_0012eb17;
      }
    }
    var_8 = var_8->pNext;
  } while( true );
}


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

undefined8
MASKED(undefined8 *param_1,long param_2,undefined8 *param_3,long *param_4,undefined8 *param_5)

{
  uint uVar1;
  long lVar2;
  long lVar3;
  int iVar4;
  uint uVar5;
  undefined8 uVar6;
  undefined4 *puVar7;
  uint uVar8;
  char *pcVar9;
  short sVar10;
  undefined8 *puVar11;
  ulong uVar12;
  uint local_74;
  undefined4 *local_58;
  
  uVar1 = *(uint *)(param_3 + 5);
  lVar2 = param_3[9];
  if (uVar1 == 1) {
    if (*(short *)(param_2 + 0x44) < 0) {
      local_58 = (undefined4 *)0x0;
    }
    else {
      if (lVar2 == 0) {
        return 0;
      }
      uVar6 = FUN_0010cf97(*(undefined8 *)
                            ((long)*(short *)(param_2 + 0x44) * 0x20 + *(long *)(param_2 + 8)));
      if ((int)uVar6 == 0) {
        return uVar6;
      }
      local_58 = (undefined4 *)0x0;
    }
  }
  else if (param_5 == (undefined8 *)0x0) {
    local_58 = (undefined4 *)0x0;
  }
  else {
    local_58 = (undefined4 *)FUN_0011efd7(*param_1,(long)(int)uVar1 << 2);
    if (local_58 == (undefined4 *)0x0) {
      return 1;
    }
    *param_5 = local_58;
  }
  lVar3 = *(long *)(param_2 + 0x10);
  do {
    if (lVar3 == 0) goto LAB_0012ec6a;
    uVar5 = (uint)*(ushort *)(lVar3 + 0x5e);
    if (((uVar5 == uVar1) && (*(char *)(lVar3 + 0x62) != '\0')) && (*(long *)(lVar3 + 0x48) == 0)) {
      if (lVar2 == 0) {
        if ((*(byte *)(lVar3 + 99) & 3) == 2) {
          if ((local_58 != (undefined4 *)0x0) && (uVar5 != 0)) {
            puVar11 = param_3 + 8;
            puVar7 = local_58;
            do {
              *puVar7 = *(undefined4 *)puVar11;
              puVar11 = puVar11 + 2;
              puVar7 = puVar7 + 1;
            } while (puVar11 != param_3 + (ulong)(uVar5 - 1) * 2 + 10);
          }
LAB_0012eb17:
          if (lVar3 != 0) {
            *param_4 = lVar3;
            return 0;
          }
LAB_0012ec6a:
          if (*(char *)((long)param_1 + 0xd2) == '\0') {
            FUN_0012c657(param_1,"foreign key mismatch - \"%w\" referencing \"%w\"",
                         *(undefined8 *)*param_3,param_3[2]);
          }
          FUN_00119825(*param_1,local_58);
          return 1;
        }
      }
      else {
        if ((int)uVar1 < 1) {
          local_74 = 0;
        }
        else {
          sVar10 = **(short **)(lVar3 + 8);
          if (sVar10 < 0) {
            local_74 = 0;
          }
          else {
            uVar12 = 0;
            while( true ) {
              local_74 = (uint)uVar12;
              puVar11 = (undefined8 *)((long)sVar10 * 0x20 + *(long *)(param_2 + 8));
              pcVar9 = (char *)puVar11[2];
              if (pcVar9 == (char *)0x0) {
                pcVar9 = "BINARY";
              }
              iVar4 = FUN_0010cf97(*(undefined8 *)(*(long *)(lVar3 + 0x40) + uVar12 * 8),pcVar9);
              if (iVar4 != 0) break;
              uVar6 = *puVar11;
              puVar11 = param_3 + 9;
              uVar8 = 0;
              while (iVar4 = FUN_0010cf97(*puVar11,uVar6), iVar4 != 0) {
                uVar8 = uVar8 + 1;
                puVar11 = puVar11 + 2;
                if (uVar5 == uVar8) goto LAB_0012ebf1;
              }
              if (local_58 != (undefined4 *)0x0) {
                local_58[uVar12] = *(undefined4 *)(param_3 + ((long)(int)uVar8 + 4) * 2);
              }
              if ((uVar1 == uVar8) || (local_74 = local_74 + 1, uVar12 == uVar5 - 1)) break;
              uVar12 = uVar12 + 1;
              sVar10 = *(short *)(*(long *)(lVar3 + 8) + uVar12 * 2);
              if (sVar10 < 0) break;
            }
          }
        }
LAB_0012ebf1:
        if (uVar1 == local_74) goto LAB_0012eb17;
      }
    }
    lVar3 = *(long *)(lVar3 + 0x28);
  } while( true );
}

