
/* WARNING: Function: __x86.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

int __regparm3 sqlite3ExpandSubquery(Parse *pParse,SrcList_item *pFrom)

{
  Table *pTVar1;
  char *pcVar2;
  Select *pSVar3;
  char *in_stack_ffffffc8;
  Column **in_stack_ffffffcc;
  u64 in_stack_ffffffd4;
  
  pSVar3 = pFrom->pSelect;
  pTVar1 = (Table *)sqlite3DbMallocZero(pParse->db,in_stack_ffffffd4);
  pFrom->pTab = pTVar1;
  if (pTVar1 == (Table *)0x0) {
    return 7;
  }
  pTVar1->nTabRef = 1;
  if (pFrom->zAlias == (char *)0x0) {
    in_stack_ffffffcc = (Column **)pSVar3->selId;
    in_stack_ffffffc8 = "subquery_%u";
    pcVar2 = sqlite3MPrintf(pParse->db,"subquery_%u");
    pTVar1->zName = pcVar2;
  }
  else {
    pcVar2 = sqlite3DbStrDup(pParse->db,pFrom->zAlias);
    pTVar1->zName = pcVar2;
  }
  do {
    pSVar3 = pSVar3->pPrior;
  } while (pSVar3 != (Select *)0x0);
  sqlite3ColumnsFromExprList
            ((Parse *)pParse->db,(ExprList *)&pTVar1->aCol,(i16 *)in_stack_ffffffc8,
             in_stack_ffffffcc);
  pTVar1->tabFlags = pTVar1->tabFlags | 2;
  pTVar1->iPKey = -1;
  pTVar1->nRowLogEst = 200;
  return 0;
}



/* WARNING: Function: __i686.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

undefined4 __regparm3 FUN_000ae800(undefined4 *param_1,int param_2)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  int iVar3;
  
  iVar3 = *(int *)(param_2 + 0x14);
  puVar1 = (undefined4 *)FUN_00044520();
  *(undefined4 **)(param_2 + 0x10) = puVar1;
  if (puVar1 == (undefined4 *)0x0) {
    return 7;
  }
  puVar1[8] = 1;
  if (*(int *)(param_2 + 0xc) == 0) {
    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));
    *puVar1 = uVar2;
  }
  else {
    uVar2 = FUN_00044980();
    *puVar1 = uVar2;
  }
  do {
    iVar3 = *(int *)(iVar3 + 0x34);
  } while (iVar3 != 0);
  FUN_000ae410(puVar1 + 1);
  puVar1[9] = puVar1[9] | 2;
  *(undefined2 *)(puVar1 + 10) = 0xffff;
  *(undefined2 *)(puVar1 + 0xb) = 200;
  return 0;
}


CALL 0x00036ac1
ADD ECX,0xcd623
PUSH EBP
MOV EBP,EAX
PUSH EDI
MOV EDI,EDX
PUSH ESI
PUSH EBX
SUB ESP,0x1c
MOV EAX,dword ptr [EAX]
MOV EBX,dword ptr [EDX + 0x14]
MOV EDX,0x50
MOV dword ptr [ESP + 0xc],ECX
XOR ECX,ECX
CALL 0x00044520
MOV dword ptr [EDI + 0x10],EAX
TEST EAX,EAX
JZ 0x000ae8b0
MOV dword ptr [EAX + 0x20],0x1
MOV EDX,dword ptr [EDI + 0xc]
MOV ESI,EAX
TEST EDX,EDX
JZ 0x000ae890
MOV EAX,dword ptr [EBP]
CALL 0x00044980
MOV dword ptr [ESI],EAX
JMP 0x000ae852
MOV EBX,EAX
MOV EAX,dword ptr [EBX + 0x34]
TEST EAX,EAX
JNZ 0x000ae850
SUB ESP,0xc
LEA EAX,[ESI + 0x4]
LEA ECX,[ESI + 0x2a]
PUSH EAX
MOV EAX,dword ptr [EBP]
MOV EDX,dword ptr [EBX]
CALL 0x000ae410
MOV EAX,0xffffffff
ADD ESP,0x10
OR dword ptr [ESI + 0x24],0x2
MOV EDX,0xc8
MOV word ptr [ESI + 0x28],AX
XOR EAX,EAX
MOV word ptr [ESI + 0x2c],DX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH dword ptr [EBX + 0x14]
MOV EAX,dword ptr [ESP + 0x14]
LEA EAX,[EAX + 0xfffa490e]
PUSH EAX
PUSH dword ptr [EBP]
CALL 0x0007a820
ADD ESP,0x10
MOV dword ptr [ESI],EAX
JMP 0x000ae852
ADD ESP,0x1c
MOV EAX,0x7
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */\n\nundefined4 __regparm3 FUN_000ae800(undefined4 *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar3 = *(int *)(param_2 + 0x14);\n  puVar1 = (undefined4 *)FUN_00044520();\n  *(undefined4 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined4 *)0x0) {\n    return 7;\n  }\n  puVar1[8] = 1;\n  if (*(int *)(param_2 + 0xc) == 0) {\n    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));\n    *puVar1 = uVar2;\n  }\n  else {\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }\n  do {\n    iVar3 = *(int *)(iVar3 + 0x34);\n  } while (iVar3 != 0);\n  FUN_000ae410(puVar1 + 1);\n  puVar1[9] = puVar1[9] | 2;\n  *(undefined2 *)(puVar1 + 10) = 0xffff;\n  *(undefined2 *)(puVar1 + 0xb) = 200;\n  return 0;\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_000ae800(undefined4 *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar3 = *(int *)(param_2 + 0x14);\n  puVar1 = (undefined4 *)FUN_00044520();\n  *(undefined4 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined4 *)0x0) {\n    return 7;\n  }\n  puVar1[8] = 1;\n  if (*(int *)(param_2 + 0xc) == 0) {\n    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));\n    *puVar1 = uVar2;\n  }\n  else {\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }\n  do {\n    iVar3 = *(int *)(iVar3 + 0x34);\n  } while (iVar3 != 0);\n  FUN_000ae410(puVar1 + 1);\n  puVar1[9] = puVar1[9] | 2;\n  *(undefined2 *)(puVar1 + 10) = 0xffff;\n  *(undefined2 *)(puVar1 + 0xb) = 200;\n  return 0;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_000ae800(undefined4 *param_1,int param_2)" identifier (parameter_list "(undefined4 *param_1,int param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar3 = *(int *)(param_2 + 0x14);\n  puVar1 = (undefined4 *)FUN_00044520();\n  *(undefined4 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined4 *)0x0) {\n    return 7;\n  }\n  puVar1[8] = 1;\n  if (*(int *)(param_2 + 0xc) == 0) {\n    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));\n    *puVar1 = uVar2;\n  }\n  else {\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }\n  do {\n    iVar3 = *(int *)(iVar3 + 0x34);\n  } while (iVar3 != 0);\n  FUN_000ae410(puVar1 + 1);\n  puVar1[9] = puVar1[9] | 2;\n  *(undefined2 *)(puVar1 + 10) = 0xffff;\n  *(undefined2 *)(puVar1 + 0xb) = 200;\n  return 0;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar3 = *(int *)(param_2 + 0x14);" (assignment_expression "iVar3 = *(int *)(param_2 + 0x14)" identifier = (pointer_expression "*(int *)(param_2 + 0x14)" * (cast_expression "(int *)(param_2 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x14)" ( (binary_expression "param_2 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = (undefined4 *)FUN_00044520();" (assignment_expression "puVar1 = (undefined4 *)FUN_00044520()" identifier = (cast_expression "(undefined4 *)FUN_00044520()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00044520()" identifier (argument_list "()" ( ))))) ;) (expression_statement "*(undefined4 **)(param_2 + 0x10) = puVar1;" (assignment_expression "*(undefined4 **)(param_2 + 0x10) = puVar1" (pointer_expression "*(undefined4 **)(param_2 + 0x10)" * (cast_expression "(undefined4 **)(param_2 + 0x10)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) = identifier) ;) (if_statement "if (puVar1 == (undefined4 *)0x0) {\n    return 7;\n  }" if (parenthesized_expression "(puVar1 == (undefined4 *)0x0)" ( (binary_expression "puVar1 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 7;\n  }" { (return_statement "return 7;" return number_literal ;) })) (expression_statement "puVar1[8] = 1;" (assignment_expression "puVar1[8] = 1" (subscript_expression "puVar1[8]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (*(int *)(param_2 + 0xc) == 0) {\n    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));\n    *puVar1 = uVar2;\n  }\n  else {\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }" if (parenthesized_expression "(*(int *)(param_2 + 0xc) == 0)" ( (binary_expression "*(int *)(param_2 + 0xc) == 0" (pointer_expression "*(int *)(param_2 + 0xc)" * (cast_expression "(int *)(param_2 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xc)" ( (binary_expression "param_2 + 0xc" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));\n    *puVar1 = uVar2;\n  }" { (expression_statement "uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));" (assignment_expression "uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14))" identifier = (call_expression "FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14))" identifier (argument_list "(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14))" ( (pointer_expression "*param_1" * identifier) , (string_literal ""subquery_%u"" " string_content ") , (pointer_expression "*(undefined4 *)(iVar3 + 0x14)" * (cast_expression "(undefined4 *)(iVar3 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x14)" ( (binary_expression "iVar3 + 0x14" identifier + number_literal) )))) )))) ;) (expression_statement "*puVar1 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" * identifier) = identifier) ;) }) (else_clause "else {\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }" else (compound_statement "{\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }" { (expression_statement "uVar2 = FUN_00044980();" (assignment_expression "uVar2 = FUN_00044980()" identifier = (call_expression "FUN_00044980()" identifier (argument_list "()" ( )))) ;) (expression_statement "*puVar1 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" * identifier) = identifier) ;) }))) (do_statement "do {\n    iVar3 = *(int *)(iVar3 + 0x34);\n  } while (iVar3 != 0);" do (compound_statement "{\n    iVar3 = *(int *)(iVar3 + 0x34);\n  }" { (expression_statement "iVar3 = *(int *)(iVar3 + 0x34);" (assignment_expression "iVar3 = *(int *)(iVar3 + 0x34)" identifier = (pointer_expression "*(int *)(iVar3 + 0x34)" * (cast_expression "(int *)(iVar3 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x34)" ( (binary_expression "iVar3 + 0x34" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) ;) (expression_statement "FUN_000ae410(puVar1 + 1);" (call_expression "FUN_000ae410(puVar1 + 1)" identifier (argument_list "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))) ;) (expression_statement "puVar1[9] = puVar1[9] | 2;" (assignment_expression "puVar1[9] = puVar1[9] | 2" (subscript_expression "puVar1[9]" identifier [ number_literal ]) = (binary_expression "puVar1[9] | 2" (subscript_expression "puVar1[9]" identifier [ number_literal ]) | number_literal)) ;) (expression_statement "*(undefined2 *)(puVar1 + 10) = 0xffff;" (assignment_expression "*(undefined2 *)(puVar1 + 10) = 0xffff" (pointer_expression "*(undefined2 *)(puVar1 + 10)" * (cast_expression "(undefined2 *)(puVar1 + 10)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 10)" ( (binary_expression "puVar1 + 10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined2 *)(puVar1 + 0xb) = 200;" (assignment_expression "*(undefined2 *)(puVar1 + 0xb) = 200" (pointer_expression "*(undefined2 *)(puVar1 + 0xb)" * (cast_expression "(undefined2 *)(puVar1 + 0xb)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 0xb)" ( (binary_expression "puVar1 + 0xb" identifier + number_literal) )))) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */\n\nint __regparm3 sqlite3ExpandSubquery(Parse *pParse,SrcList_item *pFrom)\n\n{\n  Table *pTVar1;\n  char *pcVar2;\n  Select *pSVar3;\n  char *in_stack_ffffffc8;\n  Column **in_stack_ffffffcc;\n  u64 in_stack_ffffffd4;\n  \n  pSVar3 = pFrom->pSelect;\n  pTVar1 = (Table *)sqlite3DbMallocZero(pParse->db,in_stack_ffffffd4);\n  pFrom->pTab = pTVar1;\n  if (pTVar1 == (Table *)0x0) {\n    return 7;\n  }\n  pTVar1->nTabRef = 1;\n  if (pFrom->zAlias == (char *)0x0) {\n    in_stack_ffffffcc = (Column **)pSVar3->selId;\n    in_stack_ffffffc8 = "subquery_%u";\n    pcVar2 = sqlite3MPrintf(pParse->db,"subquery_%u");\n    pTVar1->zName = pcVar2;\n  }\n  else {\n    pcVar2 = sqlite3DbStrDup(pParse->db,pFrom->zAlias);\n    pTVar1->zName = pcVar2;\n  }\n  do {\n    pSVar3 = pSVar3->pPrior;\n  } while (pSVar3 != (Select *)0x0);\n  sqlite3ColumnsFromExprList\n            ((Parse *)pParse->db,(ExprList *)&pTVar1->aCol,(i16 *)in_stack_ffffffc8,\n             in_stack_ffffffcc);\n  pTVar1->tabFlags = pTVar1->tabFlags | 2;\n  pTVar1->iPKey = -1;\n  pTVar1->nRowLogEst = 200;\n  return 0;\n}\n\n" comment (function_definition "int __regparm3 sqlite3ExpandSubquery(Parse *pParse,SrcList_item *pFrom)\n\n{\n  Table *pTVar1;\n  char *pcVar2;\n  Select *pSVar3;\n  char *in_stack_ffffffc8;\n  Column **in_stack_ffffffcc;\n  u64 in_stack_ffffffd4;\n  \n  pSVar3 = pFrom->pSelect;\n  pTVar1 = (Table *)sqlite3DbMallocZero(pParse->db,in_stack_ffffffd4);\n  pFrom->pTab = pTVar1;\n  if (pTVar1 == (Table *)0x0) {\n    return 7;\n  }\n  pTVar1->nTabRef = 1;\n  if (pFrom->zAlias == (char *)0x0) {\n    in_stack_ffffffcc = (Column **)pSVar3->selId;\n    in_stack_ffffffc8 = "subquery_%u";\n    pcVar2 = sqlite3MPrintf(pParse->db,"subquery_%u");\n    pTVar1->zName = pcVar2;\n  }\n  else {\n    pcVar2 = sqlite3DbStrDup(pParse->db,pFrom->zAlias);\n    pTVar1->zName = pcVar2;\n  }\n  do {\n    pSVar3 = pSVar3->pPrior;\n  } while (pSVar3 != (Select *)0x0);\n  sqlite3ColumnsFromExprList\n            ((Parse *)pParse->db,(ExprList *)&pTVar1->aCol,(i16 *)in_stack_ffffffc8,\n             in_stack_ffffffcc);\n  pTVar1->tabFlags = pTVar1->tabFlags | 2;\n  pTVar1->iPKey = -1;\n  pTVar1->nRowLogEst = 200;\n  return 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "sqlite3ExpandSubquery(Parse *pParse,SrcList_item *pFrom)" identifier (parameter_list "(Parse *pParse,SrcList_item *pFrom)" ( (parameter_declaration "Parse *pParse" type_identifier (pointer_declarator "*pParse" * identifier)) , (parameter_declaration "SrcList_item *pFrom" type_identifier (pointer_declarator "*pFrom" * identifier)) ))) (compound_statement "{\n  Table *pTVar1;\n  char *pcVar2;\n  Select *pSVar3;\n  char *in_stack_ffffffc8;\n  Column **in_stack_ffffffcc;\n  u64 in_stack_ffffffd4;\n  \n  pSVar3 = pFrom->pSelect;\n  pTVar1 = (Table *)sqlite3DbMallocZero(pParse->db,in_stack_ffffffd4);\n  pFrom->pTab = pTVar1;\n  if (pTVar1 == (Table *)0x0) {\n    return 7;\n  }\n  pTVar1->nTabRef = 1;\n  if (pFrom->zAlias == (char *)0x0) {\n    in_stack_ffffffcc = (Column **)pSVar3->selId;\n    in_stack_ffffffc8 = "subquery_%u";\n    pcVar2 = sqlite3MPrintf(pParse->db,"subquery_%u");\n    pTVar1->zName = pcVar2;\n  }\n  else {\n    pcVar2 = sqlite3DbStrDup(pParse->db,pFrom->zAlias);\n    pTVar1->zName = pcVar2;\n  }\n  do {\n    pSVar3 = pSVar3->pPrior;\n  } while (pSVar3 != (Select *)0x0);\n  sqlite3ColumnsFromExprList\n            ((Parse *)pParse->db,(ExprList *)&pTVar1->aCol,(i16 *)in_stack_ffffffc8,\n             in_stack_ffffffcc);\n  pTVar1->tabFlags = pTVar1->tabFlags | 2;\n  pTVar1->iPKey = -1;\n  pTVar1->nRowLogEst = 200;\n  return 0;\n}" { (declaration "Table *pTVar1;" type_identifier (pointer_declarator "*pTVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "Select *pSVar3;" type_identifier (pointer_declarator "*pSVar3" * identifier) ;) (declaration "char *in_stack_ffffffc8;" primitive_type (pointer_declarator "*in_stack_ffffffc8" * identifier) ;) (declaration "Column **in_stack_ffffffcc;" type_identifier (pointer_declarator "**in_stack_ffffffcc" * (pointer_declarator "*in_stack_ffffffcc" * identifier)) ;) (declaration "u64 in_stack_ffffffd4;" type_identifier identifier ;) (expression_statement "pSVar3 = pFrom->pSelect;" (assignment_expression "pSVar3 = pFrom->pSelect" identifier = (field_expression "pFrom->pSelect" identifier -> field_identifier)) ;) (expression_statement "pTVar1 = (Table *)sqlite3DbMallocZero(pParse->db,in_stack_ffffffd4);" (assignment_expression "pTVar1 = (Table *)sqlite3DbMallocZero(pParse->db,in_stack_ffffffd4)" identifier = (cast_expression "(Table *)sqlite3DbMallocZero(pParse->db,in_stack_ffffffd4)" ( (type_descriptor "Table *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3DbMallocZero(pParse->db,in_stack_ffffffd4)" identifier (argument_list "(pParse->db,in_stack_ffffffd4)" ( (field_expression "pParse->db" identifier -> field_identifier) , identifier ))))) ;) (expression_statement "pFrom->pTab = pTVar1;" (assignment_expression "pFrom->pTab = pTVar1" (field_expression "pFrom->pTab" identifier -> field_identifier) = identifier) ;) (if_statement "if (pTVar1 == (Table *)0x0) {\n    return 7;\n  }" if (parenthesized_expression "(pTVar1 == (Table *)0x0)" ( (binary_expression "pTVar1 == (Table *)0x0" identifier == (cast_expression "(Table *)0x0" ( (type_descriptor "Table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 7;\n  }" { (return_statement "return 7;" return number_literal ;) })) (expression_statement "pTVar1->nTabRef = 1;" (assignment_expression "pTVar1->nTabRef = 1" (field_expression "pTVar1->nTabRef" identifier -> field_identifier) = number_literal) ;) (if_statement "if (pFrom->zAlias == (char *)0x0) {\n    in_stack_ffffffcc = (Column **)pSVar3->selId;\n    in_stack_ffffffc8 = "subquery_%u";\n    pcVar2 = sqlite3MPrintf(pParse->db,"subquery_%u");\n    pTVar1->zName = pcVar2;\n  }\n  else {\n    pcVar2 = sqlite3DbStrDup(pParse->db,pFrom->zAlias);\n    pTVar1->zName = pcVar2;\n  }" if (parenthesized_expression "(pFrom->zAlias == (char *)0x0)" ( (binary_expression "pFrom->zAlias == (char *)0x0" (field_expression "pFrom->zAlias" identifier -> field_identifier) == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    in_stack_ffffffcc = (Column **)pSVar3->selId;\n    in_stack_ffffffc8 = "subquery_%u";\n    pcVar2 = sqlite3MPrintf(pParse->db,"subquery_%u");\n    pTVar1->zName = pcVar2;\n  }" { (expression_statement "in_stack_ffffffcc = (Column **)pSVar3->selId;" (assignment_expression "in_stack_ffffffcc = (Column **)pSVar3->selId" identifier = (cast_expression "(Column **)pSVar3->selId" ( (type_descriptor "Column **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (field_expression "pSVar3->selId" identifier -> field_identifier))) ;) (expression_statement "in_stack_ffffffc8 = "subquery_%u";" (assignment_expression "in_stack_ffffffc8 = "subquery_%u"" identifier = (string_literal ""subquery_%u"" " string_content ")) ;) (expression_statement "pcVar2 = sqlite3MPrintf(pParse->db,"subquery_%u");" (assignment_expression "pcVar2 = sqlite3MPrintf(pParse->db,"subquery_%u")" identifier = (call_expression "sqlite3MPrintf(pParse->db,"subquery_%u")" identifier (argument_list "(pParse->db,"subquery_%u")" ( (field_expression "pParse->db" identifier -> field_identifier) , (string_literal ""subquery_%u"" " string_content ") )))) ;) (expression_statement "pTVar1->zName = pcVar2;" (assignment_expression "pTVar1->zName = pcVar2" (field_expression "pTVar1->zName" identifier -> field_identifier) = identifier) ;) }) (else_clause "else {\n    pcVar2 = sqlite3DbStrDup(pParse->db,pFrom->zAlias);\n    pTVar1->zName = pcVar2;\n  }" else (compound_statement "{\n    pcVar2 = sqlite3DbStrDup(pParse->db,pFrom->zAlias);\n    pTVar1->zName = pcVar2;\n  }" { (expression_statement "pcVar2 = sqlite3DbStrDup(pParse->db,pFrom->zAlias);" (assignment_expression "pcVar2 = sqlite3DbStrDup(pParse->db,pFrom->zAlias)" identifier = (call_expression "sqlite3DbStrDup(pParse->db,pFrom->zAlias)" identifier (argument_list "(pParse->db,pFrom->zAlias)" ( (field_expression "pParse->db" identifier -> field_identifier) , (field_expression "pFrom->zAlias" identifier -> field_identifier) )))) ;) (expression_statement "pTVar1->zName = pcVar2;" (assignment_expression "pTVar1->zName = pcVar2" (field_expression "pTVar1->zName" identifier -> field_identifier) = identifier) ;) }))) (do_statement "do {\n    pSVar3 = pSVar3->pPrior;\n  } while (pSVar3 != (Select *)0x0);" do (compound_statement "{\n    pSVar3 = pSVar3->pPrior;\n  }" { (expression_statement "pSVar3 = pSVar3->pPrior;" (assignment_expression "pSVar3 = pSVar3->pPrior" identifier = (field_expression "pSVar3->pPrior" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(pSVar3 != (Select *)0x0)" ( (binary_expression "pSVar3 != (Select *)0x0" identifier != (cast_expression "(Select *)0x0" ( (type_descriptor "Select *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (expression_statement "sqlite3ColumnsFromExprList\n            ((Parse *)pParse->db,(ExprList *)&pTVar1->aCol,(i16 *)in_stack_ffffffc8,\n             in_stack_ffffffcc);" (call_expression "sqlite3ColumnsFromExprList\n            ((Parse *)pParse->db,(ExprList *)&pTVar1->aCol,(i16 *)in_stack_ffffffc8,\n             in_stack_ffffffcc)" identifier (argument_list "((Parse *)pParse->db,(ExprList *)&pTVar1->aCol,(i16 *)in_stack_ffffffc8,\n             in_stack_ffffffcc)" ( (cast_expression "(Parse *)pParse->db" ( (type_descriptor "Parse *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pParse->db" identifier -> field_identifier)) , (cast_expression "(ExprList *)&pTVar1->aCol" ( (type_descriptor "ExprList *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pTVar1->aCol" & (field_expression "pTVar1->aCol" identifier -> field_identifier))) , (cast_expression "(i16 *)in_stack_ffffffc8" ( (type_descriptor "i16 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))) ;) (expression_statement "pTVar1->tabFlags = pTVar1->tabFlags | 2;" (assignment_expression "pTVar1->tabFlags = pTVar1->tabFlags | 2" (field_expression "pTVar1->tabFlags" identifier -> field_identifier) = (binary_expression "pTVar1->tabFlags | 2" (field_expression "pTVar1->tabFlags" identifier -> field_identifier) | number_literal)) ;) (expression_statement "pTVar1->iPKey = -1;" (assignment_expression "pTVar1->iPKey = -1" (field_expression "pTVar1->iPKey" identifier -> field_identifier) = number_literal) ;) (expression_statement "pTVar1->nRowLogEst = 200;" (assignment_expression "pTVar1->nRowLogEst = 200" (field_expression "pTVar1->nRowLogEst" identifier -> field_identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 __regparm3 FUN_000ae800(undefined4 *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar3 = *(int *)(param_2 + 0x14);\n  puVar1 = (undefined4 *)FUN_00044520();\n  *(undefined4 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined4 *)0x0) {\n    return 7;\n  }\n  puVar1[8] = 1;\n  if (*(int *)(param_2 + 0xc) == 0) {\n    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));\n    *puVar1 = uVar2;\n  }\n  else {\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }\n  do {\n    iVar3 = *(int *)(iVar3 + 0x34);\n  } while (iVar3 != 0);\n  FUN_000ae410(puVar1 + 1);\n  puVar1[9] = puVar1[9] | 2;\n  *(undefined2 *)(puVar1 + 10) = 0xffff;\n  *(undefined2 *)(puVar1 + 0xb) = 200;\n  return 0;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_000ae800(undefined4 *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar3 = *(int *)(param_2 + 0x14);\n  puVar1 = (undefined4 *)FUN_00044520();\n  *(undefined4 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined4 *)0x0) {\n    return 7;\n  }\n  puVar1[8] = 1;\n  if (*(int *)(param_2 + 0xc) == 0) {\n    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));\n    *puVar1 = uVar2;\n  }\n  else {\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }\n  do {\n    iVar3 = *(int *)(iVar3 + 0x34);\n  } while (iVar3 != 0);\n  FUN_000ae410(puVar1 + 1);\n  puVar1[9] = puVar1[9] | 2;\n  *(undefined2 *)(puVar1 + 10) = 0xffff;\n  *(undefined2 *)(puVar1 + 0xb) = 200;\n  return 0;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_000ae800(undefined4 *param_1,int param_2)" identifier (parameter_list "(undefined4 *param_1,int param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar3 = *(int *)(param_2 + 0x14);\n  puVar1 = (undefined4 *)FUN_00044520();\n  *(undefined4 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined4 *)0x0) {\n    return 7;\n  }\n  puVar1[8] = 1;\n  if (*(int *)(param_2 + 0xc) == 0) {\n    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));\n    *puVar1 = uVar2;\n  }\n  else {\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }\n  do {\n    iVar3 = *(int *)(iVar3 + 0x34);\n  } while (iVar3 != 0);\n  FUN_000ae410(puVar1 + 1);\n  puVar1[9] = puVar1[9] | 2;\n  *(undefined2 *)(puVar1 + 10) = 0xffff;\n  *(undefined2 *)(puVar1 + 0xb) = 200;\n  return 0;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar3 = *(int *)(param_2 + 0x14);" (assignment_expression "iVar3 = *(int *)(param_2 + 0x14)" identifier = (pointer_expression "*(int *)(param_2 + 0x14)" * (cast_expression "(int *)(param_2 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x14)" ( (binary_expression "param_2 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = (undefined4 *)FUN_00044520();" (assignment_expression "puVar1 = (undefined4 *)FUN_00044520()" identifier = (cast_expression "(undefined4 *)FUN_00044520()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00044520()" identifier (argument_list "()" ( ))))) ;) (expression_statement "*(undefined4 **)(param_2 + 0x10) = puVar1;" (assignment_expression "*(undefined4 **)(param_2 + 0x10) = puVar1" (pointer_expression "*(undefined4 **)(param_2 + 0x10)" * (cast_expression "(undefined4 **)(param_2 + 0x10)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) = identifier) ;) (if_statement "if (puVar1 == (undefined4 *)0x0) {\n    return 7;\n  }" if (parenthesized_expression "(puVar1 == (undefined4 *)0x0)" ( (binary_expression "puVar1 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 7;\n  }" { (return_statement "return 7;" return number_literal ;) })) (expression_statement "puVar1[8] = 1;" (assignment_expression "puVar1[8] = 1" (subscript_expression "puVar1[8]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (*(int *)(param_2 + 0xc) == 0) {\n    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));\n    *puVar1 = uVar2;\n  }\n  else {\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }" if (parenthesized_expression "(*(int *)(param_2 + 0xc) == 0)" ( (binary_expression "*(int *)(param_2 + 0xc) == 0" (pointer_expression "*(int *)(param_2 + 0xc)" * (cast_expression "(int *)(param_2 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xc)" ( (binary_expression "param_2 + 0xc" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));\n    *puVar1 = uVar2;\n  }" { (expression_statement "uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));" (assignment_expression "uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14))" identifier = (call_expression "FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14))" identifier (argument_list "(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14))" ( (pointer_expression "*param_1" * identifier) , (string_literal ""subquery_%u"" " string_content ") , (pointer_expression "*(undefined4 *)(iVar3 + 0x14)" * (cast_expression "(undefined4 *)(iVar3 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x14)" ( (binary_expression "iVar3 + 0x14" identifier + number_literal) )))) )))) ;) (expression_statement "*puVar1 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" * identifier) = identifier) ;) }) (else_clause "else {\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }" else (compound_statement "{\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }" { (expression_statement "uVar2 = FUN_00044980();" (assignment_expression "uVar2 = FUN_00044980()" identifier = (call_expression "FUN_00044980()" identifier (argument_list "()" ( )))) ;) (expression_statement "*puVar1 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" * identifier) = identifier) ;) }))) (do_statement "do {\n    iVar3 = *(int *)(iVar3 + 0x34);\n  } while (iVar3 != 0);" do (compound_statement "{\n    iVar3 = *(int *)(iVar3 + 0x34);\n  }" { (expression_statement "iVar3 = *(int *)(iVar3 + 0x34);" (assignment_expression "iVar3 = *(int *)(iVar3 + 0x34)" identifier = (pointer_expression "*(int *)(iVar3 + 0x34)" * (cast_expression "(int *)(iVar3 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x34)" ( (binary_expression "iVar3 + 0x34" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) ;) (expression_statement "FUN_000ae410(puVar1 + 1);" (call_expression "FUN_000ae410(puVar1 + 1)" identifier (argument_list "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))) ;) (expression_statement "puVar1[9] = puVar1[9] | 2;" (assignment_expression "puVar1[9] = puVar1[9] | 2" (subscript_expression "puVar1[9]" identifier [ number_literal ]) = (binary_expression "puVar1[9] | 2" (subscript_expression "puVar1[9]" identifier [ number_literal ]) | number_literal)) ;) (expression_statement "*(undefined2 *)(puVar1 + 10) = 0xffff;" (assignment_expression "*(undefined2 *)(puVar1 + 10) = 0xffff" (pointer_expression "*(undefined2 *)(puVar1 + 10)" * (cast_expression "(undefined2 *)(puVar1 + 10)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 10)" ( (binary_expression "puVar1 + 10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined2 *)(puVar1 + 0xb) = 200;" (assignment_expression "*(undefined2 *)(puVar1 + 0xb) = 200" (pointer_expression "*(undefined2 *)(puVar1 + 0xb)" * (cast_expression "(undefined2 *)(puVar1 + 0xb)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 0xb)" ( (binary_expression "puVar1 + 0xb" identifier + number_literal) )))) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (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 (subscript_expression IDENT [ LIT ]) = LIT) ;) (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 = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (string_literal " string_content ") , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }))) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) | LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 __regparm3 FUN_000ae800(undefined4 *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar3 = *(int *)(param_2 + 0x14);\n  puVar1 = (undefined4 *)FUN_00044520();\n  *(undefined4 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined4 *)0x0) {\n    return 7;\n  }\n  puVar1[8] = 1;\n  if (*(int *)(param_2 + 0xc) == 0) {\n    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));\n    *puVar1 = uVar2;\n  }\n  else {\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }\n  do {\n    iVar3 = *(int *)(iVar3 + 0x34);\n  } while (iVar3 != 0);\n  FUN_000ae410(puVar1 + 1);\n  puVar1[9] = puVar1[9] | 2;\n  *(undefined2 *)(puVar1 + 10) = 0xffff;\n  *(undefined2 *)(puVar1 + 0xb) = 200;\n  return 0;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000ae800(undefined4 *param_1,int param_2)" (identifier "FUN_000ae800") (parameter_list "(undefined4 *param_1,int param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar3 = *(int *)(param_2 + 0x14);\n  puVar1 = (undefined4 *)FUN_00044520();\n  *(undefined4 **)(param_2 + 0x10) = puVar1;\n  if (puVar1 == (undefined4 *)0x0) {\n    return 7;\n  }\n  puVar1[8] = 1;\n  if (*(int *)(param_2 + 0xc) == 0) {\n    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));\n    *puVar1 = uVar2;\n  }\n  else {\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }\n  do {\n    iVar3 = *(int *)(iVar3 + 0x34);\n  } while (iVar3 != 0);\n  FUN_000ae410(puVar1 + 1);\n  puVar1[9] = puVar1[9] | 2;\n  *(undefined2 *)(puVar1 + 10) = 0xffff;\n  *(undefined2 *)(puVar1 + 0xb) = 200;\n  return 0;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "iVar3 = *(int *)(param_2 + 0x14);" (assignment_expression "iVar3 = *(int *)(param_2 + 0x14)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_2 + 0x14)" (* "*") (cast_expression "(int *)(param_2 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x14)" (( "(") (binary_expression "param_2 + 0x14" (identifier "param_2") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "puVar1 = (undefined4 *)FUN_00044520();" (assignment_expression "puVar1 = (undefined4 *)FUN_00044520()" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)FUN_00044520()" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00044520()" (identifier "FUN_00044520") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "*(undefined4 **)(param_2 + 0x10) = puVar1;" (assignment_expression "*(undefined4 **)(param_2 + 0x10) = puVar1" (pointer_expression "*(undefined4 **)(param_2 + 0x10)" (* "*") (cast_expression "(undefined4 **)(param_2 + 0x10)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "puVar1")) (; ";")) (if_statement "if (puVar1 == (undefined4 *)0x0) {\n    return 7;\n  }" (if "if") (parenthesized_expression "(puVar1 == (undefined4 *)0x0)" (( "(") (binary_expression "puVar1 == (undefined4 *)0x0" (identifier "puVar1") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    return 7;\n  }" ({ "{") (return_statement "return 7;" (return "return") (number_literal "7") (; ";")) (} "}"))) (expression_statement "puVar1[8] = 1;" (assignment_expression "puVar1[8] = 1" (subscript_expression "puVar1[8]" (identifier "puVar1") ([ "[") (number_literal "8") (] "]")) (= "=") (number_literal "1")) (; ";")) (if_statement "if (*(int *)(param_2 + 0xc) == 0) {\n    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));\n    *puVar1 = uVar2;\n  }\n  else {\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_2 + 0xc) == 0)" (( "(") (binary_expression "*(int *)(param_2 + 0xc) == 0" (pointer_expression "*(int *)(param_2 + 0xc)" (* "*") (cast_expression "(int *)(param_2 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xc)" (( "(") (binary_expression "param_2 + 0xc" (identifier "param_2") (+ "+") (number_literal "0xc")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));\n    *puVar1 = uVar2;\n  }" ({ "{") (expression_statement "uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));" (assignment_expression "uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14))" (identifier "uVar2") (= "=") (call_expression "FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14))" (identifier "FUN_0007a820") (argument_list "(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14))" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) (, ",") (string_literal ""subquery_%u"" (" """) (string_content "subquery_%u") (" """)) (, ",") (pointer_expression "*(undefined4 *)(iVar3 + 0x14)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x14)" (( "(") (binary_expression "iVar3 + 0x14" (identifier "iVar3") (+ "+") (number_literal "0x14")) () ")")))) () ")")))) (; ";")) (expression_statement "*puVar1 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "uVar2")) (; ";")) (} "}")) (else_clause "else {\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }" (else "else") (compound_statement "{\n    uVar2 = FUN_00044980();\n    *puVar1 = uVar2;\n  }" ({ "{") (expression_statement "uVar2 = FUN_00044980();" (assignment_expression "uVar2 = FUN_00044980()" (identifier "uVar2") (= "=") (call_expression "FUN_00044980()" (identifier "FUN_00044980") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*puVar1 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "uVar2")) (; ";")) (} "}")))) (do_statement "do {\n    iVar3 = *(int *)(iVar3 + 0x34);\n  } while (iVar3 != 0);" (do "do") (compound_statement "{\n    iVar3 = *(int *)(iVar3 + 0x34);\n  }" ({ "{") (expression_statement "iVar3 = *(int *)(iVar3 + 0x34);" (assignment_expression "iVar3 = *(int *)(iVar3 + 0x34)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(iVar3 + 0x34)" (* "*") (cast_expression "(int *)(iVar3 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x34)" (( "(") (binary_expression "iVar3 + 0x34" (identifier "iVar3") (+ "+") (number_literal "0x34")) () ")"))))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "FUN_000ae410(puVar1 + 1);" (call_expression "FUN_000ae410(puVar1 + 1)" (identifier "FUN_000ae410") (argument_list "(puVar1 + 1)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) () ")"))) (; ";")) (expression_statement "puVar1[9] = puVar1[9] | 2;" (assignment_expression "puVar1[9] = puVar1[9] | 2" (subscript_expression "puVar1[9]" (identifier "puVar1") ([ "[") (number_literal "9") (] "]")) (= "=") (binary_expression "puVar1[9] | 2" (subscript_expression "puVar1[9]" (identifier "puVar1") ([ "[") (number_literal "9") (] "]")) (| "|") (number_literal "2"))) (; ";")) (expression_statement "*(undefined2 *)(puVar1 + 10) = 0xffff;" (assignment_expression "*(undefined2 *)(puVar1 + 10) = 0xffff" (pointer_expression "*(undefined2 *)(puVar1 + 10)" (* "*") (cast_expression "(undefined2 *)(puVar1 + 10)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 10)" (( "(") (binary_expression "puVar1 + 10" (identifier "puVar1") (+ "+") (number_literal "10")) () ")")))) (= "=") (number_literal "0xffff")) (; ";")) (expression_statement "*(undefined2 *)(puVar1 + 0xb) = 200;" (assignment_expression "*(undefined2 *)(puVar1 + 0xb) = 200" (pointer_expression "*(undefined2 *)(puVar1 + 0xb)" (* "*") (cast_expression "(undefined2 *)(puVar1 + 0xb)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 0xb)" (( "(") (binary_expression "puVar1 + 0xb" (identifier "puVar1") (+ "+") (number_literal "0xb")) () ")")))) (= "=") (number_literal "200")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

int __regparm3 function_1(type_1 *pParse,type_2 *pFrom)

{
  type_3 *var_2;
  char *pcVar2;
  type_4 *var_5;
  char *in_stack_ffffffc8;
  type_5 **in_stack_ffffffcc;
  type_6 in_stack_ffffffd4;
  
  var_5 = pFrom->pSelect;
  var_2 = (type_3 *)var_1(pParse->db,in_stack_ffffffd4);
  pFrom->pTab = var_2;
  if (var_2 == (type_3 *)0x0) {
    return 7;
  }
  var_2->nTabRef = 1;
  if (pFrom->zAlias == (char *)0x0) {
    in_stack_ffffffcc = (type_5 **)var_5->selId;
    in_stack_ffffffc8 = "subquery_%u";
    pcVar2 = var_3(pParse->db,"subquery_%u");
    var_2->zName = pcVar2;
  }
  else {
    pcVar2 = var_4(pParse->db,pFrom->zAlias);
    var_2->zName = pcVar2;
  }
  do {
    var_5 = var_5->pPrior;
  } while (var_5 != (type_4 *)0x0);
  var_6
            ((type_1 *)pParse->db,(type_7 *)&var_2->aCol,(type_8 *)in_stack_ffffffc8,
             in_stack_ffffffcc);
  var_2->tabFlags = var_2->tabFlags | 2;
  var_2->iPKey = -1;
  var_2->nRowLogEst = 200;
  return 0;
}


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

/* WARNING: Function: __i686.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

undefined4 __regparm3 MASKED(undefined4 *param_1,int param_2)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  int iVar3;
  
  iVar3 = *(int *)(param_2 + 0x14);
  puVar1 = (undefined4 *)FUN_00044520();
  *(undefined4 **)(param_2 + 0x10) = puVar1;
  if (puVar1 == (undefined4 *)0x0) {
    return 7;
  }
  puVar1[8] = 1;
  if (*(int *)(param_2 + 0xc) == 0) {
    uVar2 = FUN_0007a820(*param_1,"subquery_%u",*(undefined4 *)(iVar3 + 0x14));
    *puVar1 = uVar2;
  }
  else {
    uVar2 = FUN_00044980();
    *puVar1 = uVar2;
  }
  do {
    iVar3 = *(int *)(iVar3 + 0x34);
  } while (iVar3 != 0);
  FUN_000ae410(puVar1 + 1);
  puVar1[9] = puVar1[9] | 2;
  *(undefined2 *)(puVar1 + 10) = 0xffff;
  *(undefined2 *)(puVar1 + 0xb) = 200;
  return 0;
}

