
/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */

int __regparm3
sqlite3ResolveOrderGroupBy(Parse *pParse,Select *pSelect,ExprList *pOrderBy,char *zType)

{
  ushort uVar1;
  int *piVar2;
  sqlite3 **db;
  ExprList_item *pEVar3;
  int iVar4;
  char *in_stack_ffffffd0;
  int in_stack_ffffffd4;
  
  if (((pOrderBy != (ExprList *)0x0) && (pParse->db->mallocFailed == '\0')) &&
     (pParse->eParseMode < 2)) {
    if (pParse->db->aLimit[2] < pOrderBy->nExpr) {
      sqlite3ErrorMsg(pParse,"too many terms in %s BY clause",zType);
      return 1;
    }
    piVar2 = *(int **)pSelect;
    pEVar3 = pOrderBy->a;
    if (0 < pOrderBy->nExpr) {
      iVar4 = 0;
      do {
        uVar1 = (pEVar3->u).x.iOrderByCol;
        if (uVar1 != 0) {
          if (*piVar2 < (int)(uint)uVar1) {
            sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",
                            iVar4 + 1,zType,*piVar2);
            return 1;
          }
          resolveAlias(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,
                       in_stack_ffffffd4);
        }
        iVar4 = iVar4 + 1;
        pEVar3 = pEVar3 + 1;
      } while (iVar4 < pOrderBy->nExpr);
    }
  }
  return 0;
}



undefined4 FUN_00053b50(undefined4 param_1)

{
  int *piVar1;
  int iVar2;
  int *piVar3;
  int *extraout_ECX;
  int unaff_EBP;
  int *piVar4;
  int iVar5;
  undefined8 uVar6;
  
  uVar6 = FUN_000a9503();
  piVar3 = (int *)uVar6;
  if (((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&
     (*(byte *)(piVar3 + 0x33) < 2)) {
    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {
      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);
      return 1;
    }
    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);
    piVar4 = extraout_ECX + 1;
    if (0 < *extraout_ECX) {
      iVar5 = 0;
      do {
        if (*(ushort *)(piVar4 + 3) != 0) {
          iVar2 = *piVar1;
          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {
            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);
            return 1;
          }
          FUN_000539d0(*piVar4,param_1,0);
        }
        iVar5 = iVar5 + 1;
        piVar4 = piVar4 + 4;
      } while (iVar5 < *extraout_ECX);
    }
  }
  return 0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000a9503
ADD EBP,0x8a4a7
SUB ESP,0x1c
TEST ECX,ECX
JZ 0x00053b77
MOV ESI,dword ptr [EAX]
CMP byte ptr [ESI + 0x4d],0x0
JNZ 0x00053b77
CMP byte ptr [EAX + 0xcc],0x1
JBE 0x00053b88
XOR EAX,EAX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,dword ptr [ECX]
MOV EBX,ECX
CMP EAX,dword ptr [ESI + 0x70]
JG 0x00053be8
MOV EDI,dword ptr [EDX]
TEST EAX,EAX
LEA ESI,[ECX + 0x4]
MOV dword ptr [ESP + 0x8],EDI
JLE 0x00053b77
XOR EDI,EDI
LEA ESI,[ESI]
MOVZX ECX,word ptr [ESI + 0xc]
TEST CX,CX
JZ 0x00053bd9
MOV EAX,dword ptr [ESP + 0x8]
MOV EAX,dword ptr [EAX]
CMP ECX,EAX
JG 0x00053c10
SUB ESP,0x4
SUB ECX,0x1
PUSH 0x0
PUSH dword ptr [ESP + 0x38]
PUSH dword ptr [ESI]
MOV EDX,dword ptr [ESP + 0x18]
MOV EAX,dword ptr [ESP + 0x1c]
CALL 0x000539d0
ADD ESP,0x10
ADD EDI,0x1
ADD ESI,0x10
CMP EDI,dword ptr [EBX]
JL 0x00053ba8
JMP 0x00053b77
LEA EAX,[EBP + 0xfffceddc]
SUB ESP,0x4
PUSH dword ptr [ESP + 0x34]
PUSH EAX
PUSH dword ptr [ESP + 0x18]
CALL 0x0003c160
ADD ESP,0x10
MOV EAX,0x1
JMP 0x00053b79
SUB ESP,0xc
ADD EDI,0x1
PUSH EAX
LEA EAX,[EBP + 0xfffcedfc]
PUSH dword ptr [ESP + 0x40]
PUSH EDI
PUSH EAX
PUSH dword ptr [ESP + 0x28]
CALL 0x0003c160
ADD ESP,0x20
MOV EAX,0x1
JMP 0x00053b79
(translation_unit "undefined4 FUN_00053b50(undefined4 param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int *extraout_ECX;\n  int unaff_EBP;\n  int *piVar4;\n  int iVar5;\n  undefined8 uVar6;\n  \n  uVar6 = FUN_000a9503();\n  piVar3 = (int *)uVar6;\n  if (((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2)) {\n    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }\n    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);\n    piVar4 = extraout_ECX + 1;\n    if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00053b50(undefined4 param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int *extraout_ECX;\n  int unaff_EBP;\n  int *piVar4;\n  int iVar5;\n  undefined8 uVar6;\n  \n  uVar6 = FUN_000a9503();\n  piVar3 = (int *)uVar6;\n  if (((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2)) {\n    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }\n    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);\n    piVar4 = extraout_ECX + 1;\n    if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00053b50(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int *extraout_ECX;\n  int unaff_EBP;\n  int *piVar4;\n  int iVar5;\n  undefined8 uVar6;\n  \n  uVar6 = FUN_000a9503();\n  piVar3 = (int *)uVar6;\n  if (((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2)) {\n    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }\n    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);\n    piVar4 = extraout_ECX + 1;\n    if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }\n  }\n  return 0;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int *extraout_ECX;" primitive_type (pointer_declarator "*extraout_ECX" * identifier) ;) (declaration "int unaff_EBP;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined8 uVar6;" type_identifier identifier ;) (expression_statement "uVar6 = FUN_000a9503();" (assignment_expression "uVar6 = FUN_000a9503()" identifier = (call_expression "FUN_000a9503()" identifier (argument_list "()" ( )))) ;) (expression_statement "piVar3 = (int *)uVar6;" (assignment_expression "piVar3 = (int *)uVar6" identifier = (cast_expression "(int *)uVar6" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2)) {\n    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }\n    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);\n    piVar4 = extraout_ECX + 1;\n    if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }\n  }" if (parenthesized_expression "(((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2))" ( (binary_expression "((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2)" (parenthesized_expression "((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0'))" ( (binary_expression "(extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')" (parenthesized_expression "(extraout_ECX != (int *)0x0)" ( (binary_expression "extraout_ECX != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*(char *)(*piVar3 + 0x4d) == '\0')" ( (binary_expression "*(char *)(*piVar3 + 0x4d) == '\0'" (pointer_expression "*(char *)(*piVar3 + 0x4d)" * (cast_expression "(char *)(*piVar3 + 0x4d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar3 + 0x4d)" ( (binary_expression "*piVar3 + 0x4d" (pointer_expression "*piVar3" * identifier) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) ))) )) && (parenthesized_expression "(*(byte *)(piVar3 + 0x33) < 2)" ( (binary_expression "*(byte *)(piVar3 + 0x33) < 2" (pointer_expression "*(byte *)(piVar3 + 0x33)" * (cast_expression "(byte *)(piVar3 + 0x33)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar3 + 0x33)" ( (binary_expression "piVar3 + 0x33" identifier + number_literal) )))) < number_literal) ))) )) (compound_statement "{\n    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }\n    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);\n    piVar4 = extraout_ECX + 1;\n    if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }\n  }" { (if_statement "if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }" if (parenthesized_expression "(*(int *)(*piVar3 + 0x70) < *extraout_ECX)" ( (binary_expression "*(int *)(*piVar3 + 0x70) < *extraout_ECX" (pointer_expression "*(int *)(*piVar3 + 0x70)" * (cast_expression "(int *)(*piVar3 + 0x70)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar3 + 0x70)" ( (binary_expression "*piVar3 + 0x70" (pointer_expression "*piVar3" * identifier) + number_literal) )))) < (pointer_expression "*extraout_ECX" * identifier)) )) (compound_statement "{\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }" { (expression_statement "FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);" (call_expression "FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1)" identifier (argument_list "(piVar3,unaff_EBP + 0x59283,param_1)" ( identifier , (binary_expression "unaff_EBP + 0x59283" identifier + number_literal) , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);" (assignment_expression "piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20)" identifier = (cast_expression "(int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*(undefined4 *)((ulonglong)uVar6 >> 0x20)" * (cast_expression "(undefined4 *)((ulonglong)uVar6 >> 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulonglong)uVar6 >> 0x20)" ( (binary_expression "(ulonglong)uVar6 >> 0x20" (cast_expression "(ulonglong)uVar6" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))))) ;) (expression_statement "piVar4 = extraout_ECX + 1;" (assignment_expression "piVar4 = extraout_ECX + 1" identifier = (binary_expression "extraout_ECX + 1" identifier + number_literal)) ;) (if_statement "if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }" if (parenthesized_expression "(0 < *extraout_ECX)" ( (binary_expression "0 < *extraout_ECX" number_literal < (pointer_expression "*extraout_ECX" * identifier)) )) (compound_statement "{\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);" do (compound_statement "{\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      }" { (if_statement "if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }" if (parenthesized_expression "(*(ushort *)(piVar4 + 3) != 0)" ( (binary_expression "*(ushort *)(piVar4 + 3) != 0" (pointer_expression "*(ushort *)(piVar4 + 3)" * (cast_expression "(ushort *)(piVar4 + 3)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4 + 3)" ( (binary_expression "piVar4 + 3" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }" { (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (if_statement "if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }" if (parenthesized_expression "(iVar2 < (int)(uint)*(ushort *)(piVar4 + 3))" ( (binary_expression "iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)" identifier < (binary_expression "(int)(uint)*(ushort *)(piVar4 + 3)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(piVar4 + 3)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4 + 3)" ( (binary_expression "piVar4 + 3" identifier + number_literal) ))))) )) (compound_statement "{\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }" { (expression_statement "FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);" (call_expression "FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2)" identifier (argument_list "(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2)" ( identifier , (binary_expression "unaff_EBP + 0x592a3" identifier + number_literal) , (binary_expression "iVar5 + 1" identifier + number_literal) , identifier , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "FUN_000539d0(*piVar4,param_1,0);" (call_expression "FUN_000539d0(*piVar4,param_1,0)" identifier (argument_list "(*piVar4,param_1,0)" ( (pointer_expression "*piVar4" * identifier) , identifier , number_literal ))) ;) })) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "piVar4 = piVar4 + 4;" (assignment_expression "piVar4 = piVar4 + 4" identifier = (binary_expression "piVar4 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 < *extraout_ECX)" ( (binary_expression "iVar5 < *extraout_ECX" identifier < (pointer_expression "*extraout_ECX" * identifier)) )) ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */\n\nint __regparm3\nsqlite3ResolveOrderGroupBy(Parse *pParse,Select *pSelect,ExprList *pOrderBy,char *zType)\n\n{\n  ushort uVar1;\n  int *piVar2;\n  sqlite3 **db;\n  ExprList_item *pEVar3;\n  int iVar4;\n  char *in_stack_ffffffd0;\n  int in_stack_ffffffd4;\n  \n  if (((pOrderBy != (ExprList *)0x0) && (pParse->db->mallocFailed == '\0')) &&\n     (pParse->eParseMode < 2)) {\n    if (pParse->db->aLimit[2] < pOrderBy->nExpr) {\n      sqlite3ErrorMsg(pParse,"too many terms in %s BY clause",zType);\n      return 1;\n    }\n    piVar2 = *(int **)pSelect;\n    pEVar3 = pOrderBy->a;\n    if (0 < pOrderBy->nExpr) {\n      iVar4 = 0;\n      do {\n        uVar1 = (pEVar3->u).x.iOrderByCol;\n        if (uVar1 != 0) {\n          if (*piVar2 < (int)(uint)uVar1) {\n            sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2);\n            return 1;\n          }\n          resolveAlias(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n        }\n        iVar4 = iVar4 + 1;\n        pEVar3 = pEVar3 + 1;\n      } while (iVar4 < pOrderBy->nExpr);\n    }\n  }\n  return 0;\n}\n\n" comment (function_definition "int __regparm3\nsqlite3ResolveOrderGroupBy(Parse *pParse,Select *pSelect,ExprList *pOrderBy,char *zType)\n\n{\n  ushort uVar1;\n  int *piVar2;\n  sqlite3 **db;\n  ExprList_item *pEVar3;\n  int iVar4;\n  char *in_stack_ffffffd0;\n  int in_stack_ffffffd4;\n  \n  if (((pOrderBy != (ExprList *)0x0) && (pParse->db->mallocFailed == '\0')) &&\n     (pParse->eParseMode < 2)) {\n    if (pParse->db->aLimit[2] < pOrderBy->nExpr) {\n      sqlite3ErrorMsg(pParse,"too many terms in %s BY clause",zType);\n      return 1;\n    }\n    piVar2 = *(int **)pSelect;\n    pEVar3 = pOrderBy->a;\n    if (0 < pOrderBy->nExpr) {\n      iVar4 = 0;\n      do {\n        uVar1 = (pEVar3->u).x.iOrderByCol;\n        if (uVar1 != 0) {\n          if (*piVar2 < (int)(uint)uVar1) {\n            sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2);\n            return 1;\n          }\n          resolveAlias(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n        }\n        iVar4 = iVar4 + 1;\n        pEVar3 = pEVar3 + 1;\n      } while (iVar4 < pOrderBy->nExpr);\n    }\n  }\n  return 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "sqlite3ResolveOrderGroupBy(Parse *pParse,Select *pSelect,ExprList *pOrderBy,char *zType)" identifier (parameter_list "(Parse *pParse,Select *pSelect,ExprList *pOrderBy,char *zType)" ( (parameter_declaration "Parse *pParse" type_identifier (pointer_declarator "*pParse" * identifier)) , (parameter_declaration "Select *pSelect" type_identifier (pointer_declarator "*pSelect" * identifier)) , (parameter_declaration "ExprList *pOrderBy" type_identifier (pointer_declarator "*pOrderBy" * identifier)) , (parameter_declaration "char *zType" primitive_type (pointer_declarator "*zType" * identifier)) ))) (compound_statement "{\n  ushort uVar1;\n  int *piVar2;\n  sqlite3 **db;\n  ExprList_item *pEVar3;\n  int iVar4;\n  char *in_stack_ffffffd0;\n  int in_stack_ffffffd4;\n  \n  if (((pOrderBy != (ExprList *)0x0) && (pParse->db->mallocFailed == '\0')) &&\n     (pParse->eParseMode < 2)) {\n    if (pParse->db->aLimit[2] < pOrderBy->nExpr) {\n      sqlite3ErrorMsg(pParse,"too many terms in %s BY clause",zType);\n      return 1;\n    }\n    piVar2 = *(int **)pSelect;\n    pEVar3 = pOrderBy->a;\n    if (0 < pOrderBy->nExpr) {\n      iVar4 = 0;\n      do {\n        uVar1 = (pEVar3->u).x.iOrderByCol;\n        if (uVar1 != 0) {\n          if (*piVar2 < (int)(uint)uVar1) {\n            sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2);\n            return 1;\n          }\n          resolveAlias(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n        }\n        iVar4 = iVar4 + 1;\n        pEVar3 = pEVar3 + 1;\n      } while (iVar4 < pOrderBy->nExpr);\n    }\n  }\n  return 0;\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "sqlite3 **db;" type_identifier (pointer_declarator "**db" * (pointer_declarator "*db" * identifier)) ;) (declaration "ExprList_item *pEVar3;" type_identifier (pointer_declarator "*pEVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char *in_stack_ffffffd0;" primitive_type (pointer_declarator "*in_stack_ffffffd0" * identifier) ;) (declaration "int in_stack_ffffffd4;" primitive_type identifier ;) (if_statement "if (((pOrderBy != (ExprList *)0x0) && (pParse->db->mallocFailed == '\0')) &&\n     (pParse->eParseMode < 2)) {\n    if (pParse->db->aLimit[2] < pOrderBy->nExpr) {\n      sqlite3ErrorMsg(pParse,"too many terms in %s BY clause",zType);\n      return 1;\n    }\n    piVar2 = *(int **)pSelect;\n    pEVar3 = pOrderBy->a;\n    if (0 < pOrderBy->nExpr) {\n      iVar4 = 0;\n      do {\n        uVar1 = (pEVar3->u).x.iOrderByCol;\n        if (uVar1 != 0) {\n          if (*piVar2 < (int)(uint)uVar1) {\n            sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2);\n            return 1;\n          }\n          resolveAlias(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n        }\n        iVar4 = iVar4 + 1;\n        pEVar3 = pEVar3 + 1;\n      } while (iVar4 < pOrderBy->nExpr);\n    }\n  }" if (parenthesized_expression "(((pOrderBy != (ExprList *)0x0) && (pParse->db->mallocFailed == '\0')) &&\n     (pParse->eParseMode < 2))" ( (binary_expression "((pOrderBy != (ExprList *)0x0) && (pParse->db->mallocFailed == '\0')) &&\n     (pParse->eParseMode < 2)" (parenthesized_expression "((pOrderBy != (ExprList *)0x0) && (pParse->db->mallocFailed == '\0'))" ( (binary_expression "(pOrderBy != (ExprList *)0x0) && (pParse->db->mallocFailed == '\0')" (parenthesized_expression "(pOrderBy != (ExprList *)0x0)" ( (binary_expression "pOrderBy != (ExprList *)0x0" identifier != (cast_expression "(ExprList *)0x0" ( (type_descriptor "ExprList *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(pParse->db->mallocFailed == '\0')" ( (binary_expression "pParse->db->mallocFailed == '\0'" (field_expression "pParse->db->mallocFailed" (field_expression "pParse->db" identifier -> field_identifier) -> field_identifier) == (char_literal "'\0'" ' escape_sequence ')) ))) )) && (parenthesized_expression "(pParse->eParseMode < 2)" ( (binary_expression "pParse->eParseMode < 2" (field_expression "pParse->eParseMode" identifier -> field_identifier) < number_literal) ))) )) (compound_statement "{\n    if (pParse->db->aLimit[2] < pOrderBy->nExpr) {\n      sqlite3ErrorMsg(pParse,"too many terms in %s BY clause",zType);\n      return 1;\n    }\n    piVar2 = *(int **)pSelect;\n    pEVar3 = pOrderBy->a;\n    if (0 < pOrderBy->nExpr) {\n      iVar4 = 0;\n      do {\n        uVar1 = (pEVar3->u).x.iOrderByCol;\n        if (uVar1 != 0) {\n          if (*piVar2 < (int)(uint)uVar1) {\n            sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2);\n            return 1;\n          }\n          resolveAlias(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n        }\n        iVar4 = iVar4 + 1;\n        pEVar3 = pEVar3 + 1;\n      } while (iVar4 < pOrderBy->nExpr);\n    }\n  }" { (if_statement "if (pParse->db->aLimit[2] < pOrderBy->nExpr) {\n      sqlite3ErrorMsg(pParse,"too many terms in %s BY clause",zType);\n      return 1;\n    }" if (parenthesized_expression "(pParse->db->aLimit[2] < pOrderBy->nExpr)" ( (binary_expression "pParse->db->aLimit[2] < pOrderBy->nExpr" (subscript_expression "pParse->db->aLimit[2]" (field_expression "pParse->db->aLimit" (field_expression "pParse->db" identifier -> field_identifier) -> field_identifier) [ number_literal ]) < (field_expression "pOrderBy->nExpr" identifier -> field_identifier)) )) (compound_statement "{\n      sqlite3ErrorMsg(pParse,"too many terms in %s BY clause",zType);\n      return 1;\n    }" { (expression_statement "sqlite3ErrorMsg(pParse,"too many terms in %s BY clause",zType);" (call_expression "sqlite3ErrorMsg(pParse,"too many terms in %s BY clause",zType)" identifier (argument_list "(pParse,"too many terms in %s BY clause",zType)" ( identifier , (string_literal ""too many terms in %s BY clause"" " string_content ") , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "piVar2 = *(int **)pSelect;" (assignment_expression "piVar2 = *(int **)pSelect" identifier = (pointer_expression "*(int **)pSelect" * (cast_expression "(int **)pSelect" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "pEVar3 = pOrderBy->a;" (assignment_expression "pEVar3 = pOrderBy->a" identifier = (field_expression "pOrderBy->a" identifier -> field_identifier)) ;) (if_statement "if (0 < pOrderBy->nExpr) {\n      iVar4 = 0;\n      do {\n        uVar1 = (pEVar3->u).x.iOrderByCol;\n        if (uVar1 != 0) {\n          if (*piVar2 < (int)(uint)uVar1) {\n            sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2);\n            return 1;\n          }\n          resolveAlias(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n        }\n        iVar4 = iVar4 + 1;\n        pEVar3 = pEVar3 + 1;\n      } while (iVar4 < pOrderBy->nExpr);\n    }" if (parenthesized_expression "(0 < pOrderBy->nExpr)" ( (binary_expression "0 < pOrderBy->nExpr" number_literal < (field_expression "pOrderBy->nExpr" identifier -> field_identifier)) )) (compound_statement "{\n      iVar4 = 0;\n      do {\n        uVar1 = (pEVar3->u).x.iOrderByCol;\n        if (uVar1 != 0) {\n          if (*piVar2 < (int)(uint)uVar1) {\n            sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2);\n            return 1;\n          }\n          resolveAlias(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n        }\n        iVar4 = iVar4 + 1;\n        pEVar3 = pEVar3 + 1;\n      } while (iVar4 < pOrderBy->nExpr);\n    }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n        uVar1 = (pEVar3->u).x.iOrderByCol;\n        if (uVar1 != 0) {\n          if (*piVar2 < (int)(uint)uVar1) {\n            sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2);\n            return 1;\n          }\n          resolveAlias(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n        }\n        iVar4 = iVar4 + 1;\n        pEVar3 = pEVar3 + 1;\n      } while (iVar4 < pOrderBy->nExpr);" do (compound_statement "{\n        uVar1 = (pEVar3->u).x.iOrderByCol;\n        if (uVar1 != 0) {\n          if (*piVar2 < (int)(uint)uVar1) {\n            sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2);\n            return 1;\n          }\n          resolveAlias(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n        }\n        iVar4 = iVar4 + 1;\n        pEVar3 = pEVar3 + 1;\n      }" { (expression_statement "uVar1 = (pEVar3->u).x.iOrderByCol;" (assignment_expression "uVar1 = (pEVar3->u).x.iOrderByCol" identifier = (field_expression "(pEVar3->u).x.iOrderByCol" (field_expression "(pEVar3->u).x" (parenthesized_expression "(pEVar3->u)" ( (field_expression "pEVar3->u" identifier -> field_identifier) )) . field_identifier) . field_identifier)) ;) (if_statement "if (uVar1 != 0) {\n          if (*piVar2 < (int)(uint)uVar1) {\n            sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2);\n            return 1;\n          }\n          resolveAlias(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n        }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\n          if (*piVar2 < (int)(uint)uVar1) {\n            sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2);\n            return 1;\n          }\n          resolveAlias(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,\n                       in_stack_ffffffd4);\n        }" { (if_statement "if (*piVar2 < (int)(uint)uVar1) {\n            sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2);\n            return 1;\n          }" if (parenthesized_expression "(*piVar2 < (int)(uint)uVar1)" ( (binary_expression "*piVar2 < (int)(uint)uVar1" (pointer_expression "*piVar2" * identifier) < (cast_expression "(int)(uint)uVar1" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)uVar1" ( (type_descriptor "uint" type_identifier) ) identifier))) )) (compound_statement "{\n            sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2);\n            return 1;\n          }" { (expression_statement "sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2);" (call_expression "sqlite3ErrorMsg(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2)" identifier (argument_list "(pParse,"%r %s BY term out of range - should be between 1 and %d",\n                            iVar4 + 1,zType,*piVar2)" ( identifier , (string_literal ""%r %s BY term out of range - should be between 1 and %d"" " string_content ") , (binary_expression "iVar4 + 1" identifier + number_literal) , identifier , (pointer_expression "*piVar2" * identifier) ))) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "resolveAlias(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,\n                       in_stack_ffffffd4);" (call_expression "resolveAlias(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,\n                       in_stack_ffffffd4)" identifier (argument_list "(pParse,(ExprList *)pEVar3->pExpr,(int)zType,(Expr *)0x0,in_stack_ffffffd0,\n                       in_stack_ffffffd4)" ( identifier , (cast_expression "(ExprList *)pEVar3->pExpr" ( (type_descriptor "ExprList *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pEVar3->pExpr" identifier -> field_identifier)) , (cast_expression "(int)zType" ( (type_descriptor "int" primitive_type) ) identifier) , (cast_expression "(Expr *)0x0" ( (type_descriptor "Expr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , identifier ))) ;) })) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "pEVar3 = pEVar3 + 1;" (assignment_expression "pEVar3 = pEVar3 + 1" identifier = (binary_expression "pEVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 < pOrderBy->nExpr)" ( (binary_expression "iVar4 < pOrderBy->nExpr" identifier < (field_expression "pOrderBy->nExpr" identifier -> field_identifier)) )) ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_00053b50(undefined4 param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int *extraout_ECX;\n  int unaff_EBP;\n  int *piVar4;\n  int iVar5;\n  undefined8 uVar6;\n  \n  uVar6 = FUN_000a9503();\n  piVar3 = (int *)uVar6;\n  if (((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2)) {\n    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }\n    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);\n    piVar4 = extraout_ECX + 1;\n    if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00053b50(undefined4 param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int *extraout_ECX;\n  int unaff_EBP;\n  int *piVar4;\n  int iVar5;\n  undefined8 uVar6;\n  \n  uVar6 = FUN_000a9503();\n  piVar3 = (int *)uVar6;\n  if (((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2)) {\n    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }\n    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);\n    piVar4 = extraout_ECX + 1;\n    if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00053b50(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int *extraout_ECX;\n  int unaff_EBP;\n  int *piVar4;\n  int iVar5;\n  undefined8 uVar6;\n  \n  uVar6 = FUN_000a9503();\n  piVar3 = (int *)uVar6;\n  if (((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2)) {\n    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }\n    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);\n    piVar4 = extraout_ECX + 1;\n    if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }\n  }\n  return 0;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int *extraout_ECX;" primitive_type (pointer_declarator "*extraout_ECX" * identifier) ;) (declaration "int unaff_EBP;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined8 uVar6;" type_identifier identifier ;) (expression_statement "uVar6 = FUN_000a9503();" (assignment_expression "uVar6 = FUN_000a9503()" identifier = (call_expression "FUN_000a9503()" identifier (argument_list "()" ( )))) ;) (expression_statement "piVar3 = (int *)uVar6;" (assignment_expression "piVar3 = (int *)uVar6" identifier = (cast_expression "(int *)uVar6" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2)) {\n    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }\n    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);\n    piVar4 = extraout_ECX + 1;\n    if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }\n  }" if (parenthesized_expression "(((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2))" ( (binary_expression "((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2)" (parenthesized_expression "((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0'))" ( (binary_expression "(extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')" (parenthesized_expression "(extraout_ECX != (int *)0x0)" ( (binary_expression "extraout_ECX != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*(char *)(*piVar3 + 0x4d) == '\0')" ( (binary_expression "*(char *)(*piVar3 + 0x4d) == '\0'" (pointer_expression "*(char *)(*piVar3 + 0x4d)" * (cast_expression "(char *)(*piVar3 + 0x4d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar3 + 0x4d)" ( (binary_expression "*piVar3 + 0x4d" (pointer_expression "*piVar3" * identifier) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) ))) )) && (parenthesized_expression "(*(byte *)(piVar3 + 0x33) < 2)" ( (binary_expression "*(byte *)(piVar3 + 0x33) < 2" (pointer_expression "*(byte *)(piVar3 + 0x33)" * (cast_expression "(byte *)(piVar3 + 0x33)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar3 + 0x33)" ( (binary_expression "piVar3 + 0x33" identifier + number_literal) )))) < number_literal) ))) )) (compound_statement "{\n    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }\n    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);\n    piVar4 = extraout_ECX + 1;\n    if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }\n  }" { (if_statement "if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }" if (parenthesized_expression "(*(int *)(*piVar3 + 0x70) < *extraout_ECX)" ( (binary_expression "*(int *)(*piVar3 + 0x70) < *extraout_ECX" (pointer_expression "*(int *)(*piVar3 + 0x70)" * (cast_expression "(int *)(*piVar3 + 0x70)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar3 + 0x70)" ( (binary_expression "*piVar3 + 0x70" (pointer_expression "*piVar3" * identifier) + number_literal) )))) < (pointer_expression "*extraout_ECX" * identifier)) )) (compound_statement "{\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }" { (expression_statement "FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);" (call_expression "FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1)" identifier (argument_list "(piVar3,unaff_EBP + 0x59283,param_1)" ( identifier , (binary_expression "unaff_EBP + 0x59283" identifier + number_literal) , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);" (assignment_expression "piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20)" identifier = (cast_expression "(int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*(undefined4 *)((ulonglong)uVar6 >> 0x20)" * (cast_expression "(undefined4 *)((ulonglong)uVar6 >> 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ulonglong)uVar6 >> 0x20)" ( (binary_expression "(ulonglong)uVar6 >> 0x20" (cast_expression "(ulonglong)uVar6" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))))) ;) (expression_statement "piVar4 = extraout_ECX + 1;" (assignment_expression "piVar4 = extraout_ECX + 1" identifier = (binary_expression "extraout_ECX + 1" identifier + number_literal)) ;) (if_statement "if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }" if (parenthesized_expression "(0 < *extraout_ECX)" ( (binary_expression "0 < *extraout_ECX" number_literal < (pointer_expression "*extraout_ECX" * identifier)) )) (compound_statement "{\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);" do (compound_statement "{\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      }" { (if_statement "if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }" if (parenthesized_expression "(*(ushort *)(piVar4 + 3) != 0)" ( (binary_expression "*(ushort *)(piVar4 + 3) != 0" (pointer_expression "*(ushort *)(piVar4 + 3)" * (cast_expression "(ushort *)(piVar4 + 3)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4 + 3)" ( (binary_expression "piVar4 + 3" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }" { (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (if_statement "if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }" if (parenthesized_expression "(iVar2 < (int)(uint)*(ushort *)(piVar4 + 3))" ( (binary_expression "iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)" identifier < (binary_expression "(int)(uint)*(ushort *)(piVar4 + 3)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(piVar4 + 3)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4 + 3)" ( (binary_expression "piVar4 + 3" identifier + number_literal) ))))) )) (compound_statement "{\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }" { (expression_statement "FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);" (call_expression "FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2)" identifier (argument_list "(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2)" ( identifier , (binary_expression "unaff_EBP + 0x592a3" identifier + number_literal) , (binary_expression "iVar5 + 1" identifier + number_literal) , identifier , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "FUN_000539d0(*piVar4,param_1,0);" (call_expression "FUN_000539d0(*piVar4,param_1,0)" identifier (argument_list "(*piVar4,param_1,0)" ( (pointer_expression "*piVar4" * identifier) , identifier , number_literal ))) ;) })) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "piVar4 = piVar4 + 4;" (assignment_expression "piVar4 = piVar4 + 4" identifier = (binary_expression "piVar4 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 < *extraout_ECX)" ( (binary_expression "iVar5 < *extraout_ECX" identifier < (pointer_expression "*extraout_ECX" * identifier)) )) ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) == (char_literal ' escape_sequence ')) ))) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < LIT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) < (pointer_expression * IDENT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , IDENT ))) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( IDENT ))) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , IDENT , IDENT ))) ;) (return_statement return LIT ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , IDENT , LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * IDENT)) )) ;) })) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00053b50(undefined4 param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int *extraout_ECX;\n  int unaff_EBP;\n  int *piVar4;\n  int iVar5;\n  undefined8 uVar6;\n  \n  uVar6 = FUN_000a9503();\n  piVar3 = (int *)uVar6;\n  if (((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2)) {\n    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }\n    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);\n    piVar4 = extraout_ECX + 1;\n    if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_00053b50(undefined4 param_1)" (identifier "FUN_00053b50") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int *piVar3;\n  int *extraout_ECX;\n  int unaff_EBP;\n  int *piVar4;\n  int iVar5;\n  undefined8 uVar6;\n  \n  uVar6 = FUN_000a9503();\n  piVar3 = (int *)uVar6;\n  if (((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2)) {\n    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }\n    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);\n    piVar4 = extraout_ECX + 1;\n    if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }\n  }\n  return 0;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int *extraout_ECX;" (primitive_type "int") (pointer_declarator "*extraout_ECX" (* "*") (identifier "extraout_ECX")) (; ";")) (declaration "int unaff_EBP;" (primitive_type "int") (identifier "unaff_EBP") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "undefined8 uVar6;" (type_identifier "undefined8") (identifier "uVar6") (; ";")) (expression_statement "uVar6 = FUN_000a9503();" (assignment_expression "uVar6 = FUN_000a9503()" (identifier "uVar6") (= "=") (call_expression "FUN_000a9503()" (identifier "FUN_000a9503") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "piVar3 = (int *)uVar6;" (assignment_expression "piVar3 = (int *)uVar6" (identifier "piVar3") (= "=") (cast_expression "(int *)uVar6" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "uVar6"))) (; ";")) (if_statement "if (((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2)) {\n    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }\n    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);\n    piVar4 = extraout_ECX + 1;\n    if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }\n  }" (if "if") (parenthesized_expression "(((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2))" (( "(") (binary_expression "((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&\n     (*(byte *)(piVar3 + 0x33) < 2)" (parenthesized_expression "((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0'))" (( "(") (binary_expression "(extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')" (parenthesized_expression "(extraout_ECX != (int *)0x0)" (( "(") (binary_expression "extraout_ECX != (int *)0x0" (identifier "extraout_ECX") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(*(char *)(*piVar3 + 0x4d) == '\0')" (( "(") (binary_expression "*(char *)(*piVar3 + 0x4d) == '\0'" (pointer_expression "*(char *)(*piVar3 + 0x4d)" (* "*") (cast_expression "(char *)(*piVar3 + 0x4d)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar3 + 0x4d)" (( "(") (binary_expression "*piVar3 + 0x4d" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (+ "+") (number_literal "0x4d")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(*(byte *)(piVar3 + 0x33) < 2)" (( "(") (binary_expression "*(byte *)(piVar3 + 0x33) < 2" (pointer_expression "*(byte *)(piVar3 + 0x33)" (* "*") (cast_expression "(byte *)(piVar3 + 0x33)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar3 + 0x33)" (( "(") (binary_expression "piVar3 + 0x33" (identifier "piVar3") (+ "+") (number_literal "0x33")) () ")")))) (< "<") (number_literal "2")) () ")"))) () ")")) (compound_statement "{\n    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }\n    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);\n    piVar4 = extraout_ECX + 1;\n    if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }\n  }" ({ "{") (if_statement "if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }" (if "if") (parenthesized_expression "(*(int *)(*piVar3 + 0x70) < *extraout_ECX)" (( "(") (binary_expression "*(int *)(*piVar3 + 0x70) < *extraout_ECX" (pointer_expression "*(int *)(*piVar3 + 0x70)" (* "*") (cast_expression "(int *)(*piVar3 + 0x70)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar3 + 0x70)" (( "(") (binary_expression "*piVar3 + 0x70" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (+ "+") (number_literal "0x70")) () ")")))) (< "<") (pointer_expression "*extraout_ECX" (* "*") (identifier "extraout_ECX"))) () ")")) (compound_statement "{\n      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);\n      return 1;\n    }" ({ "{") (expression_statement "FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);" (call_expression "FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1)" (identifier "FUN_0003c160") (argument_list "(piVar3,unaff_EBP + 0x59283,param_1)" (( "(") (identifier "piVar3") (, ",") (binary_expression "unaff_EBP + 0x59283" (identifier "unaff_EBP") (+ "+") (number_literal "0x59283")) (, ",") (identifier "param_1") () ")"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);" (assignment_expression "piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20)" (identifier "piVar1") (= "=") (cast_expression "(int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*(undefined4 *)((ulonglong)uVar6 >> 0x20)" (* "*") (cast_expression "(undefined4 *)((ulonglong)uVar6 >> 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((ulonglong)uVar6 >> 0x20)" (( "(") (binary_expression "(ulonglong)uVar6 >> 0x20" (cast_expression "(ulonglong)uVar6" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar6")) (>> ">>") (number_literal "0x20")) () ")")))))) (; ";")) (expression_statement "piVar4 = extraout_ECX + 1;" (assignment_expression "piVar4 = extraout_ECX + 1" (identifier "piVar4") (= "=") (binary_expression "extraout_ECX + 1" (identifier "extraout_ECX") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (0 < *extraout_ECX) {\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }" (if "if") (parenthesized_expression "(0 < *extraout_ECX)" (( "(") (binary_expression "0 < *extraout_ECX" (number_literal "0") (< "<") (pointer_expression "*extraout_ECX" (* "*") (identifier "extraout_ECX"))) () ")")) (compound_statement "{\n      iVar5 = 0;\n      do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);\n    }" ({ "{") (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" (identifier "iVar5") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      } while (iVar5 < *extraout_ECX);" (do "do") (compound_statement "{\n        if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }\n        iVar5 = iVar5 + 1;\n        piVar4 = piVar4 + 4;\n      }" ({ "{") (if_statement "if (*(ushort *)(piVar4 + 3) != 0) {\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }" (if "if") (parenthesized_expression "(*(ushort *)(piVar4 + 3) != 0)" (( "(") (binary_expression "*(ushort *)(piVar4 + 3) != 0" (pointer_expression "*(ushort *)(piVar4 + 3)" (* "*") (cast_expression "(ushort *)(piVar4 + 3)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar4 + 3)" (( "(") (binary_expression "piVar4 + 3" (identifier "piVar4") (+ "+") (number_literal "3")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          iVar2 = *piVar1;\n          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }\n          FUN_000539d0(*piVar4,param_1,0);\n        }" ({ "{") (expression_statement "iVar2 = *piVar1;" (assignment_expression "iVar2 = *piVar1" (identifier "iVar2") (= "=") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) (; ";")) (if_statement "if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }" (if "if") (parenthesized_expression "(iVar2 < (int)(uint)*(ushort *)(piVar4 + 3))" (( "(") (binary_expression "iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)" (identifier "iVar2") (< "<") (binary_expression "(int)(uint)*(ushort *)(piVar4 + 3)" (cast_expression "(int)(uint)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")"))) (* "*") (cast_expression "(ushort *)(piVar4 + 3)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar4 + 3)" (( "(") (binary_expression "piVar4 + 3" (identifier "piVar4") (+ "+") (number_literal "3")) () ")"))))) () ")")) (compound_statement "{\n            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);\n            return 1;\n          }" ({ "{") (expression_statement "FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);" (call_expression "FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2)" (identifier "FUN_0003c160") (argument_list "(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2)" (( "(") (identifier "piVar3") (, ",") (binary_expression "unaff_EBP + 0x592a3" (identifier "unaff_EBP") (+ "+") (number_literal "0x592a3")) (, ",") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1")) (, ",") (identifier "param_1") (, ",") (identifier "iVar2") () ")"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "FUN_000539d0(*piVar4,param_1,0);" (call_expression "FUN_000539d0(*piVar4,param_1,0)" (identifier "FUN_000539d0") (argument_list "(*piVar4,param_1,0)" (( "(") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (, ",") (identifier "param_1") (, ",") (number_literal "0") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "piVar4 = piVar4 + 4;" (assignment_expression "piVar4 = piVar4 + 4" (identifier "piVar4") (= "=") (binary_expression "piVar4 + 4" (identifier "piVar4") (+ "+") (number_literal "4"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar5 < *extraout_ECX)" (( "(") (binary_expression "iVar5 < *extraout_ECX" (identifier "iVar5") (< "<") (pointer_expression "*extraout_ECX" (* "*") (identifier "extraout_ECX"))) () ")")) (; ";")) (} "}"))) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */

int __regparm3
function_1(type_1 *pParse,type_2 *pSelect,type_3 *var_1,char *zType)

{
  type_4 var_3;
  int *piVar2;
  type_5 **db;
  type_6 *var_6;
  int var_4;
  char *in_stack_ffffffd0;
  int in_stack_ffffffd4;
  
  if (((var_1 != (type_3 *)0x0) && (pParse->db->mallocFailed == '\0')) &&
     (pParse->eParseMode < 2)) {
    if (pParse->db->aLimit[2] < var_1->nExpr) {
      var_2(pParse,"too many terms in %s BY clause",zType);
      return 1;
    }
    piVar2 = *(int **)pSelect;
    var_6 = var_1->a;
    if (0 < var_1->nExpr) {
      var_4 = 0;
      do {
        var_3 = (var_6->u).x.iOrderByCol;
        if (var_3 != 0) {
          if (*piVar2 < (int)(type_7)var_3) {
            var_2(pParse,"%r %s BY term out of range - should be between 1 and %d",
                            var_4 + 1,zType,*piVar2);
            return 1;
          }
          var_5(pParse,(type_3 *)var_6->pExpr,(int)zType,(type_8 *)0x0,in_stack_ffffffd0,
                       in_stack_ffffffd4);
        }
        var_4 = var_4 + 1;
        var_6 = var_6 + 1;
      } while (var_4 < var_1->nExpr);
    }
  }
  return 0;
}


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

undefined4 MASKED(undefined4 param_1)

{
  int *piVar1;
  int iVar2;
  int *piVar3;
  int *extraout_ECX;
  int unaff_EBP;
  int *piVar4;
  int iVar5;
  undefined8 uVar6;
  
  uVar6 = FUN_000a9503();
  piVar3 = (int *)uVar6;
  if (((extraout_ECX != (int *)0x0) && (*(char *)(*piVar3 + 0x4d) == '\0')) &&
     (*(byte *)(piVar3 + 0x33) < 2)) {
    if (*(int *)(*piVar3 + 0x70) < *extraout_ECX) {
      FUN_0003c160(piVar3,unaff_EBP + 0x59283,param_1);
      return 1;
    }
    piVar1 = (int *)*(undefined4 *)((ulonglong)uVar6 >> 0x20);
    piVar4 = extraout_ECX + 1;
    if (0 < *extraout_ECX) {
      iVar5 = 0;
      do {
        if (*(ushort *)(piVar4 + 3) != 0) {
          iVar2 = *piVar1;
          if (iVar2 < (int)(uint)*(ushort *)(piVar4 + 3)) {
            FUN_0003c160(piVar3,unaff_EBP + 0x592a3,iVar5 + 1,param_1,iVar2);
            return 1;
          }
          FUN_000539d0(*piVar4,param_1,0);
        }
        iVar5 = iVar5 + 1;
        piVar4 = piVar4 + 4;
      } while (iVar5 < *extraout_ECX);
    }
  }
  return 0;
}

