
/* WARNING: Unknown calling convention */

void pcache1Truncate(sqlite3_pcache *p,uint iLimit)

{
  if (*(uint *)(p + 0x24) < iLimit) {
    return;
  }
  pcache1TruncateUnsafe((PCache1 *)p,iLimit);
  *(uint *)(p + 0x24) = iLimit - 1;
  return;
}



void FUN_00047ec0(int param_1,uint param_2)

{
  if (*(uint *)(param_1 + 0x24) < param_2) {
    return;
  }
  FUN_00047680();
  *(uint *)(param_1 + 0x24) = param_2 - 1;
  return;
}


PUSH ESI
PUSH EBX
SUB ESP,0x4
MOV ESI,dword ptr [ESP + 0x10]
MOV EBX,dword ptr [ESP + 0x14]
CMP dword ptr [ESI + 0x24],EBX
JNC 0x00047ee0
ADD ESP,0x4
POP EBX
POP ESI
RET
MOV EDX,EBX
MOV EAX,ESI
SUB EBX,0x1
CALL 0x00047680
MOV dword ptr [ESI + 0x24],EBX
ADD ESP,0x4
POP EBX
POP ESI
RET
(translation_unit "void FUN_00047ec0(int param_1,uint param_2)\n\n{\n  if (*(uint *)(param_1 + 0x24) < param_2) {\n    return;\n  }\n  FUN_00047680();\n  *(uint *)(param_1 + 0x24) = param_2 - 1;\n  return;\n}\n\n" (function_definition "void FUN_00047ec0(int param_1,uint param_2)\n\n{\n  if (*(uint *)(param_1 + 0x24) < param_2) {\n    return;\n  }\n  FUN_00047680();\n  *(uint *)(param_1 + 0x24) = param_2 - 1;\n  return;\n}" primitive_type (function_declarator "FUN_00047ec0(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  if (*(uint *)(param_1 + 0x24) < param_2) {\n    return;\n  }\n  FUN_00047680();\n  *(uint *)(param_1 + 0x24) = param_2 - 1;\n  return;\n}" { (if_statement "if (*(uint *)(param_1 + 0x24) < param_2) {\n    return;\n  }" if (parenthesized_expression "(*(uint *)(param_1 + 0x24) < param_2)" ( (binary_expression "*(uint *)(param_1 + 0x24) < param_2" (pointer_expression "*(uint *)(param_1 + 0x24)" * (cast_expression "(uint *)(param_1 + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_00047680();" (call_expression "FUN_00047680()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(uint *)(param_1 + 0x24) = param_2 - 1;" (assignment_expression "*(uint *)(param_1 + 0x24) = param_2 - 1" (pointer_expression "*(uint *)(param_1 + 0x24)" * (cast_expression "(uint *)(param_1 + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) = (binary_expression "param_2 - 1" identifier - number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nvoid pcache1Truncate(sqlite3_pcache *p,uint iLimit)\n\n{\n  if (*(uint *)(p + 0x24) < iLimit) {\n    return;\n  }\n  pcache1TruncateUnsafe((PCache1 *)p,iLimit);\n  *(uint *)(p + 0x24) = iLimit - 1;\n  return;\n}\n\n" comment (function_definition "void pcache1Truncate(sqlite3_pcache *p,uint iLimit)\n\n{\n  if (*(uint *)(p + 0x24) < iLimit) {\n    return;\n  }\n  pcache1TruncateUnsafe((PCache1 *)p,iLimit);\n  *(uint *)(p + 0x24) = iLimit - 1;\n  return;\n}" primitive_type (function_declarator "pcache1Truncate(sqlite3_pcache *p,uint iLimit)" identifier (parameter_list "(sqlite3_pcache *p,uint iLimit)" ( (parameter_declaration "sqlite3_pcache *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "uint iLimit" type_identifier identifier) ))) (compound_statement "{\n  if (*(uint *)(p + 0x24) < iLimit) {\n    return;\n  }\n  pcache1TruncateUnsafe((PCache1 *)p,iLimit);\n  *(uint *)(p + 0x24) = iLimit - 1;\n  return;\n}" { (if_statement "if (*(uint *)(p + 0x24) < iLimit) {\n    return;\n  }" if (parenthesized_expression "(*(uint *)(p + 0x24) < iLimit)" ( (binary_expression "*(uint *)(p + 0x24) < iLimit" (pointer_expression "*(uint *)(p + 0x24)" * (cast_expression "(uint *)(p + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(p + 0x24)" ( (binary_expression "p + 0x24" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "pcache1TruncateUnsafe((PCache1 *)p,iLimit);" (call_expression "pcache1TruncateUnsafe((PCache1 *)p,iLimit)" identifier (argument_list "((PCache1 *)p,iLimit)" ( (cast_expression "(PCache1 *)p" ( (type_descriptor "PCache1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))) ;) (expression_statement "*(uint *)(p + 0x24) = iLimit - 1;" (assignment_expression "*(uint *)(p + 0x24) = iLimit - 1" (pointer_expression "*(uint *)(p + 0x24)" * (cast_expression "(uint *)(p + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(p + 0x24)" ( (binary_expression "p + 0x24" identifier + number_literal) )))) = (binary_expression "iLimit - 1" identifier - number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00047ec0(int param_1,uint param_2)\n\n{\n  if (*(uint *)(param_1 + 0x24) < param_2) {\n    return;\n  }\n  FUN_00047680();\n  *(uint *)(param_1 + 0x24) = param_2 - 1;\n  return;\n}\n\n" (function_definition "void FUN_00047ec0(int param_1,uint param_2)\n\n{\n  if (*(uint *)(param_1 + 0x24) < param_2) {\n    return;\n  }\n  FUN_00047680();\n  *(uint *)(param_1 + 0x24) = param_2 - 1;\n  return;\n}" primitive_type (function_declarator "FUN_00047ec0(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  if (*(uint *)(param_1 + 0x24) < param_2) {\n    return;\n  }\n  FUN_00047680();\n  *(uint *)(param_1 + 0x24) = param_2 - 1;\n  return;\n}" { (if_statement "if (*(uint *)(param_1 + 0x24) < param_2) {\n    return;\n  }" if (parenthesized_expression "(*(uint *)(param_1 + 0x24) < param_2)" ( (binary_expression "*(uint *)(param_1 + 0x24) < param_2" (pointer_expression "*(uint *)(param_1 + 0x24)" * (cast_expression "(uint *)(param_1 + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_00047680();" (call_expression "FUN_00047680()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(uint *)(param_1 + 0x24) = param_2 - 1;" (assignment_expression "*(uint *)(param_1 + 0x24) = param_2 - 1" (pointer_expression "*(uint *)(param_1 + 0x24)" * (cast_expression "(uint *)(param_1 + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) = (binary_expression "param_2 - 1" identifier - number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < IDENT) )) (compound_statement { (return_statement return ;) })) (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) )))) = (binary_expression IDENT - LIT)) ;) (return_statement return ;) })))
(function_definition "void FUN_00047ec0(int param_1,uint param_2)\n\n{\n  if (*(uint *)(param_1 + 0x24) < param_2) {\n    return;\n  }\n  FUN_00047680();\n  *(uint *)(param_1 + 0x24) = param_2 - 1;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00047ec0(int param_1,uint param_2)" (identifier "FUN_00047ec0") (parameter_list "(int param_1,uint param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  if (*(uint *)(param_1 + 0x24) < param_2) {\n    return;\n  }\n  FUN_00047680();\n  *(uint *)(param_1 + 0x24) = param_2 - 1;\n  return;\n}" ({ "{") (if_statement "if (*(uint *)(param_1 + 0x24) < param_2) {\n    return;\n  }" (if "if") (parenthesized_expression "(*(uint *)(param_1 + 0x24) < param_2)" (( "(") (binary_expression "*(uint *)(param_1 + 0x24) < param_2" (pointer_expression "*(uint *)(param_1 + 0x24)" (* "*") (cast_expression "(uint *)(param_1 + 0x24)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_00047680();" (call_expression "FUN_00047680()" (identifier "FUN_00047680") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*(uint *)(param_1 + 0x24) = param_2 - 1;" (assignment_expression "*(uint *)(param_1 + 0x24) = param_2 - 1" (pointer_expression "*(uint *)(param_1 + 0x24)" (* "*") (cast_expression "(uint *)(param_1 + 0x24)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (= "=") (binary_expression "param_2 - 1" (identifier "param_2") (- "-") (number_literal "1"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

void function_1(type_1 *var_1,type_2 var_2)

{
  if (*(type_2 *)(var_1 + 0x24) < var_2) {
    return;
  }
  var_3((type_3 *)var_1,var_2);
  *(type_2 *)(var_1 + 0x24) = var_2 - 1;
  return;
}


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

void MASKED(int param_1,uint param_2)

{
  if (*(uint *)(param_1 + 0x24) < param_2) {
    return;
  }
  FUN_00047680();
  *(uint *)(param_1 + 0x24) = param_2 - 1;
  return;
}

