
/* WARNING: Unknown calling convention */

int selectWindowRewriteSelectCb(Walker *pWalker,Select *pSelect)

{
  WindowRewrite *pWVar1;
  Select *pSVar2;
  
  pWVar1 = (pWalker->u).pRewrite;
  pSVar2 = pWVar1->pSubSelect;
  if (pSVar2 != pSelect) {
    pWVar1->pSubSelect = pSelect;
    if ((pSelect != (Select *)0x0) &&
       (pWalker->xSelectCallback != (_func_int_Walker_ptr_Select_ptr *)0x0)) {
      sqlite3WalkSelect(pWalker,pSelect);
    }
    pWVar1->pSubSelect = pSVar2;
    return 1;
  }
  return 0;
}



undefined4 FUN_0005ccf0(int param_1,int param_2)

{
  int iVar1;
  int iVar2;
  
  iVar1 = *(int *)(param_1 + 0x18);
  iVar2 = *(int *)(iVar1 + 0xc);
  if (iVar2 != param_2) {
    *(int *)(iVar1 + 0xc) = param_2;
    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {
      FUN_0005c620();
    }
    *(int *)(iVar1 + 0xc) = iVar2;
    return 1;
  }
  return 0;
}


PUSH ESI
PUSH EBX
SUB ESP,0x4
MOV EAX,dword ptr [ESP + 0x10]
MOV EDX,dword ptr [ESP + 0x14]
MOV EBX,dword ptr [EAX + 0x18]
MOV ESI,dword ptr [EBX + 0xc]
CMP ESI,EDX
JZ 0x0005cd30
MOV dword ptr [EBX + 0xc],EDX
TEST EDX,EDX
JZ 0x0005cd1a
MOV ECX,dword ptr [EAX + 0x8]
TEST ECX,ECX
JZ 0x0005cd1a
CALL 0x0005c620
MOV dword ptr [EBX + 0xc],ESI
ADD ESP,0x4
MOV EAX,0x1
POP EBX
POP ESI
RET
ADD ESP,0x4
XOR EAX,EAX
POP EBX
POP ESI
RET
(translation_unit "undefined4 FUN_0005ccf0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x18);\n  iVar2 = *(int *)(iVar1 + 0xc);\n  if (iVar2 != param_2) {\n    *(int *)(iVar1 + 0xc) = param_2;\n    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }\n    *(int *)(iVar1 + 0xc) = iVar2;\n    return 1;\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_0005ccf0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x18);\n  iVar2 = *(int *)(iVar1 + 0xc);\n  if (iVar2 != param_2) {\n    *(int *)(iVar1 + 0xc) = param_2;\n    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }\n    *(int *)(iVar1 + 0xc) = iVar2;\n    return 1;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0005ccf0(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x18);\n  iVar2 = *(int *)(iVar1 + 0xc);\n  if (iVar2 != param_2) {\n    *(int *)(iVar1 + 0xc) = param_2;\n    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }\n    *(int *)(iVar1 + 0xc) = iVar2;\n    return 1;\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(param_1 + 0x18);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x18)" identifier = (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = *(int *)(iVar1 + 0xc);" (assignment_expression "iVar2 = *(int *)(iVar1 + 0xc)" identifier = (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (iVar2 != param_2) {\n    *(int *)(iVar1 + 0xc) = param_2;\n    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }\n    *(int *)(iVar1 + 0xc) = iVar2;\n    return 1;\n  }" if (parenthesized_expression "(iVar2 != param_2)" ( (binary_expression "iVar2 != param_2" identifier != identifier) )) (compound_statement "{\n    *(int *)(iVar1 + 0xc) = param_2;\n    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }\n    *(int *)(iVar1 + 0xc) = iVar2;\n    return 1;\n  }" { (expression_statement "*(int *)(iVar1 + 0xc) = param_2;" (assignment_expression "*(int *)(iVar1 + 0xc) = param_2" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }" if (parenthesized_expression "((param_2 != 0) && (*(int *)(param_1 + 8) != 0))" ( (binary_expression "(param_2 != 0) && (*(int *)(param_1 + 8) != 0)" (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) && (parenthesized_expression "(*(int *)(param_1 + 8) != 0)" ( (binary_expression "*(int *)(param_1 + 8) != 0" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n      FUN_0005c620();\n    }" { (expression_statement "FUN_0005c620();" (call_expression "FUN_0005c620()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(int *)(iVar1 + 0xc) = iVar2;" (assignment_expression "*(int *)(iVar1 + 0xc) = iVar2" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint selectWindowRewriteSelectCb(Walker *pWalker,Select *pSelect)\n\n{\n  WindowRewrite *pWVar1;\n  Select *pSVar2;\n  \n  pWVar1 = (pWalker->u).pRewrite;\n  pSVar2 = pWVar1->pSubSelect;\n  if (pSVar2 != pSelect) {\n    pWVar1->pSubSelect = pSelect;\n    if ((pSelect != (Select *)0x0) &&\n       (pWalker->xSelectCallback != (_func_int_Walker_ptr_Select_ptr *)0x0)) {\n      sqlite3WalkSelect(pWalker,pSelect);\n    }\n    pWVar1->pSubSelect = pSVar2;\n    return 1;\n  }\n  return 0;\n}\n\n" comment (function_definition "int selectWindowRewriteSelectCb(Walker *pWalker,Select *pSelect)\n\n{\n  WindowRewrite *pWVar1;\n  Select *pSVar2;\n  \n  pWVar1 = (pWalker->u).pRewrite;\n  pSVar2 = pWVar1->pSubSelect;\n  if (pSVar2 != pSelect) {\n    pWVar1->pSubSelect = pSelect;\n    if ((pSelect != (Select *)0x0) &&\n       (pWalker->xSelectCallback != (_func_int_Walker_ptr_Select_ptr *)0x0)) {\n      sqlite3WalkSelect(pWalker,pSelect);\n    }\n    pWVar1->pSubSelect = pSVar2;\n    return 1;\n  }\n  return 0;\n}" primitive_type (function_declarator "selectWindowRewriteSelectCb(Walker *pWalker,Select *pSelect)" identifier (parameter_list "(Walker *pWalker,Select *pSelect)" ( (parameter_declaration "Walker *pWalker" type_identifier (pointer_declarator "*pWalker" * identifier)) , (parameter_declaration "Select *pSelect" type_identifier (pointer_declarator "*pSelect" * identifier)) ))) (compound_statement "{\n  WindowRewrite *pWVar1;\n  Select *pSVar2;\n  \n  pWVar1 = (pWalker->u).pRewrite;\n  pSVar2 = pWVar1->pSubSelect;\n  if (pSVar2 != pSelect) {\n    pWVar1->pSubSelect = pSelect;\n    if ((pSelect != (Select *)0x0) &&\n       (pWalker->xSelectCallback != (_func_int_Walker_ptr_Select_ptr *)0x0)) {\n      sqlite3WalkSelect(pWalker,pSelect);\n    }\n    pWVar1->pSubSelect = pSVar2;\n    return 1;\n  }\n  return 0;\n}" { (declaration "WindowRewrite *pWVar1;" type_identifier (pointer_declarator "*pWVar1" * identifier) ;) (declaration "Select *pSVar2;" type_identifier (pointer_declarator "*pSVar2" * identifier) ;) (expression_statement "pWVar1 = (pWalker->u).pRewrite;" (assignment_expression "pWVar1 = (pWalker->u).pRewrite" identifier = (field_expression "(pWalker->u).pRewrite" (parenthesized_expression "(pWalker->u)" ( (field_expression "pWalker->u" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "pSVar2 = pWVar1->pSubSelect;" (assignment_expression "pSVar2 = pWVar1->pSubSelect" identifier = (field_expression "pWVar1->pSubSelect" identifier -> field_identifier)) ;) (if_statement "if (pSVar2 != pSelect) {\n    pWVar1->pSubSelect = pSelect;\n    if ((pSelect != (Select *)0x0) &&\n       (pWalker->xSelectCallback != (_func_int_Walker_ptr_Select_ptr *)0x0)) {\n      sqlite3WalkSelect(pWalker,pSelect);\n    }\n    pWVar1->pSubSelect = pSVar2;\n    return 1;\n  }" if (parenthesized_expression "(pSVar2 != pSelect)" ( (binary_expression "pSVar2 != pSelect" identifier != identifier) )) (compound_statement "{\n    pWVar1->pSubSelect = pSelect;\n    if ((pSelect != (Select *)0x0) &&\n       (pWalker->xSelectCallback != (_func_int_Walker_ptr_Select_ptr *)0x0)) {\n      sqlite3WalkSelect(pWalker,pSelect);\n    }\n    pWVar1->pSubSelect = pSVar2;\n    return 1;\n  }" { (expression_statement "pWVar1->pSubSelect = pSelect;" (assignment_expression "pWVar1->pSubSelect = pSelect" (field_expression "pWVar1->pSubSelect" identifier -> field_identifier) = identifier) ;) (if_statement "if ((pSelect != (Select *)0x0) &&\n       (pWalker->xSelectCallback != (_func_int_Walker_ptr_Select_ptr *)0x0)) {\n      sqlite3WalkSelect(pWalker,pSelect);\n    }" if (parenthesized_expression "((pSelect != (Select *)0x0) &&\n       (pWalker->xSelectCallback != (_func_int_Walker_ptr_Select_ptr *)0x0))" ( (binary_expression "(pSelect != (Select *)0x0) &&\n       (pWalker->xSelectCallback != (_func_int_Walker_ptr_Select_ptr *)0x0)" (parenthesized_expression "(pSelect != (Select *)0x0)" ( (binary_expression "pSelect != (Select *)0x0" identifier != (cast_expression "(Select *)0x0" ( (type_descriptor "Select *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(pWalker->xSelectCallback != (_func_int_Walker_ptr_Select_ptr *)0x0)" ( (binary_expression "pWalker->xSelectCallback != (_func_int_Walker_ptr_Select_ptr *)0x0" (field_expression "pWalker->xSelectCallback" identifier -> field_identifier) != (cast_expression "(_func_int_Walker_ptr_Select_ptr *)0x0" ( (type_descriptor "_func_int_Walker_ptr_Select_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n      sqlite3WalkSelect(pWalker,pSelect);\n    }" { (expression_statement "sqlite3WalkSelect(pWalker,pSelect);" (call_expression "sqlite3WalkSelect(pWalker,pSelect)" identifier (argument_list "(pWalker,pSelect)" ( identifier , identifier ))) ;) })) (expression_statement "pWVar1->pSubSelect = pSVar2;" (assignment_expression "pWVar1->pSubSelect = pSVar2" (field_expression "pWVar1->pSubSelect" identifier -> field_identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_0005ccf0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x18);\n  iVar2 = *(int *)(iVar1 + 0xc);\n  if (iVar2 != param_2) {\n    *(int *)(iVar1 + 0xc) = param_2;\n    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }\n    *(int *)(iVar1 + 0xc) = iVar2;\n    return 1;\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_0005ccf0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x18);\n  iVar2 = *(int *)(iVar1 + 0xc);\n  if (iVar2 != param_2) {\n    *(int *)(iVar1 + 0xc) = param_2;\n    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }\n    *(int *)(iVar1 + 0xc) = iVar2;\n    return 1;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0005ccf0(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x18);\n  iVar2 = *(int *)(iVar1 + 0xc);\n  if (iVar2 != param_2) {\n    *(int *)(iVar1 + 0xc) = param_2;\n    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }\n    *(int *)(iVar1 + 0xc) = iVar2;\n    return 1;\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(param_1 + 0x18);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x18)" identifier = (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = *(int *)(iVar1 + 0xc);" (assignment_expression "iVar2 = *(int *)(iVar1 + 0xc)" identifier = (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (iVar2 != param_2) {\n    *(int *)(iVar1 + 0xc) = param_2;\n    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }\n    *(int *)(iVar1 + 0xc) = iVar2;\n    return 1;\n  }" if (parenthesized_expression "(iVar2 != param_2)" ( (binary_expression "iVar2 != param_2" identifier != identifier) )) (compound_statement "{\n    *(int *)(iVar1 + 0xc) = param_2;\n    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }\n    *(int *)(iVar1 + 0xc) = iVar2;\n    return 1;\n  }" { (expression_statement "*(int *)(iVar1 + 0xc) = param_2;" (assignment_expression "*(int *)(iVar1 + 0xc) = param_2" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }" if (parenthesized_expression "((param_2 != 0) && (*(int *)(param_1 + 8) != 0))" ( (binary_expression "(param_2 != 0) && (*(int *)(param_1 + 8) != 0)" (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) && (parenthesized_expression "(*(int *)(param_1 + 8) != 0)" ( (binary_expression "*(int *)(param_1 + 8) != 0" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n      FUN_0005c620();\n    }" { (expression_statement "FUN_0005c620();" (call_expression "FUN_0005c620()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(int *)(iVar1 + 0xc) = iVar2;" (assignment_expression "*(int *)(iVar1 + 0xc) = iVar2" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (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 = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return LIT ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_0005ccf0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x18);\n  iVar2 = *(int *)(iVar1 + 0xc);\n  if (iVar2 != param_2) {\n    *(int *)(iVar1 + 0xc) = param_2;\n    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }\n    *(int *)(iVar1 + 0xc) = iVar2;\n    return 1;\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_0005ccf0(int param_1,int param_2)" (identifier "FUN_0005ccf0") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = *(int *)(param_1 + 0x18);\n  iVar2 = *(int *)(iVar1 + 0xc);\n  if (iVar2 != param_2) {\n    *(int *)(iVar1 + 0xc) = param_2;\n    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }\n    *(int *)(iVar1 + 0xc) = iVar2;\n    return 1;\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (expression_statement "iVar1 = *(int *)(param_1 + 0x18);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x18)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0x18)" (* "*") (cast_expression "(int *)(param_1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (expression_statement "iVar2 = *(int *)(iVar1 + 0xc);" (assignment_expression "iVar2 = *(int *)(iVar1 + 0xc)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (if_statement "if (iVar2 != param_2) {\n    *(int *)(iVar1 + 0xc) = param_2;\n    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }\n    *(int *)(iVar1 + 0xc) = iVar2;\n    return 1;\n  }" (if "if") (parenthesized_expression "(iVar2 != param_2)" (( "(") (binary_expression "iVar2 != param_2" (identifier "iVar2") (!= "!=") (identifier "param_2")) () ")")) (compound_statement "{\n    *(int *)(iVar1 + 0xc) = param_2;\n    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }\n    *(int *)(iVar1 + 0xc) = iVar2;\n    return 1;\n  }" ({ "{") (expression_statement "*(int *)(iVar1 + 0xc) = param_2;" (assignment_expression "*(int *)(iVar1 + 0xc) = param_2" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (if_statement "if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {\n      FUN_0005c620();\n    }" (if "if") (parenthesized_expression "((param_2 != 0) && (*(int *)(param_1 + 8) != 0))" (( "(") (binary_expression "(param_2 != 0) && (*(int *)(param_1 + 8) != 0)" (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(*(int *)(param_1 + 8) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 8) != 0" (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      FUN_0005c620();\n    }" ({ "{") (expression_statement "FUN_0005c620();" (call_expression "FUN_0005c620()" (identifier "FUN_0005c620") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "*(int *)(iVar1 + 0xc) = iVar2;" (assignment_expression "*(int *)(iVar1 + 0xc) = iVar2" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "iVar2")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

int function_1(type_1 *pWalker,type_2 *var_2)

{
  type_3 *pWVar1;
  type_2 *var_1;
  
  pWVar1 = (pWalker->u).pRewrite;
  var_1 = pWVar1->pSubSelect;
  if (var_1 != var_2) {
    pWVar1->pSubSelect = var_2;
    if ((var_2 != (type_2 *)0x0) &&
       (pWalker->xSelectCallback != (type_4 *)0x0)) {
      var_3(pWalker,var_2);
    }
    pWVar1->pSubSelect = var_1;
    return 1;
  }
  return 0;
}


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

undefined4 MASKED(int param_1,int param_2)

{
  int iVar1;
  int iVar2;
  
  iVar1 = *(int *)(param_1 + 0x18);
  iVar2 = *(int *)(iVar1 + 0xc);
  if (iVar2 != param_2) {
    *(int *)(iVar1 + 0xc) = param_2;
    if ((param_2 != 0) && (*(int *)(param_1 + 8) != 0)) {
      FUN_0005c620();
    }
    *(int *)(iVar1 + 0xc) = iVar2;
    return 1;
  }
  return 0;
}

