
void functionDestroy(sqlite3 *db,FuncDef *p)

{
  FuncDestructor *p_00;
  int iVar1;
  
  p_00 = (p->u).pDestructor;
  if ((p_00 != (FuncDestructor *)0x0) && (iVar1 = p_00->nRef + -1, p_00->nRef = iVar1, iVar1 == 0))
  {
    (*p_00->xDestroy)(p_00->pUserData);
    sqlite3DbFree(db,p_00);
  }
  return;
}



void FUN_00119e78(undefined8 param_1,long param_2)

{
  int iVar1;
  int *piVar2;
  
  piVar2 = *(int **)(param_2 + 0x40);
  if ((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)) {
    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));
    FUN_00119825(param_1,piVar2);
  }
  return;
}


PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,qword ptr [RSI + 0x40]
TEST RBX,RBX
JZ 0x00119ea7
MOV EAX,dword ptr [RBX]
SUB EAX,0x1
MOV dword ptr [RBX],EAX
TEST EAX,EAX
JNZ 0x00119ea7
MOV RBP,RDI
MOV RDI,qword ptr [RBX + 0x10]
CALL qword ptr [RBX + 0x8]
MOV RSI,RBX
MOV RDI,RBP
CALL 0x00119825
ADD RSP,0x8
POP RBX
POP RBP
RET
(translation_unit "void FUN_00119e78(undefined8 param_1,long param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_2 + 0x40);\n  if ((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)) {\n    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));\n    FUN_00119825(param_1,piVar2);\n  }\n  return;\n}\n\n" (function_definition "void FUN_00119e78(undefined8 param_1,long param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_2 + 0x40);\n  if ((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)) {\n    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));\n    FUN_00119825(param_1,piVar2);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00119e78(undefined8 param_1,long param_2)" identifier (parameter_list "(undefined8 param_1,long param_2)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_2 + 0x40);\n  if ((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)) {\n    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));\n    FUN_00119825(param_1,piVar2);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (expression_statement "piVar2 = *(int **)(param_2 + 0x40);" (assignment_expression "piVar2 = *(int **)(param_2 + 0x40)" identifier = (pointer_expression "*(int **)(param_2 + 0x40)" * (cast_expression "(int **)(param_2 + 0x40)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x40)" ( (binary_expression "param_2 + 0x40" identifier + number_literal) ))))) ;) (if_statement "if ((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)) {\n    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));\n    FUN_00119825(param_1,piVar2);\n  }" if (parenthesized_expression "((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0))" ( (binary_expression "(piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)" (parenthesized_expression "(piVar2 != (int *)0x0)" ( (binary_expression "piVar2 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)" ( (comma_expression "iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) , (comma_expression "*piVar2 = iVar1 + -1, iVar1 + -1 == 0" (assignment_expression "*piVar2 = iVar1 + -1" (pointer_expression "*piVar2" * identifier) = (binary_expression "iVar1 + -1" identifier + number_literal)) , (binary_expression "iVar1 + -1 == 0" (binary_expression "iVar1 + -1" identifier + number_literal) == number_literal))) ))) )) (compound_statement "{\n    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));\n    FUN_00119825(param_1,piVar2);\n  }" { (expression_statement "(**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));" (call_expression "(**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4))" (parenthesized_expression "(**(code **)(piVar2 + 2))" ( (pointer_expression "**(code **)(piVar2 + 2)" * (pointer_expression "*(code **)(piVar2 + 2)" * (cast_expression "(code **)(piVar2 + 2)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar2 + 2)" ( (binary_expression "piVar2 + 2" identifier + number_literal) ))))) )) (argument_list "(*(undefined8 *)(piVar2 + 4))" ( (pointer_expression "*(undefined8 *)(piVar2 + 4)" * (cast_expression "(undefined8 *)(piVar2 + 4)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar2 + 4)" ( (binary_expression "piVar2 + 4" identifier + number_literal) )))) ))) ;) (expression_statement "FUN_00119825(param_1,piVar2);" (call_expression "FUN_00119825(param_1,piVar2)" identifier (argument_list "(param_1,piVar2)" ( identifier , identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void functionDestroy(sqlite3 *db,FuncDef *p)\n\n{\n  FuncDestructor *p_00;\n  int iVar1;\n  \n  p_00 = (p->u).pDestructor;\n  if ((p_00 != (FuncDestructor *)0x0) && (iVar1 = p_00->nRef + -1, p_00->nRef = iVar1, iVar1 == 0))\n  {\n    (*p_00->xDestroy)(p_00->pUserData);\n    sqlite3DbFree(db,p_00);\n  }\n  return;\n}\n\n" (function_definition "void functionDestroy(sqlite3 *db,FuncDef *p)\n\n{\n  FuncDestructor *p_00;\n  int iVar1;\n  \n  p_00 = (p->u).pDestructor;\n  if ((p_00 != (FuncDestructor *)0x0) && (iVar1 = p_00->nRef + -1, p_00->nRef = iVar1, iVar1 == 0))\n  {\n    (*p_00->xDestroy)(p_00->pUserData);\n    sqlite3DbFree(db,p_00);\n  }\n  return;\n}" primitive_type (function_declarator "functionDestroy(sqlite3 *db,FuncDef *p)" identifier (parameter_list "(sqlite3 *db,FuncDef *p)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "FuncDef *p" type_identifier (pointer_declarator "*p" * identifier)) ))) (compound_statement "{\n  FuncDestructor *p_00;\n  int iVar1;\n  \n  p_00 = (p->u).pDestructor;\n  if ((p_00 != (FuncDestructor *)0x0) && (iVar1 = p_00->nRef + -1, p_00->nRef = iVar1, iVar1 == 0))\n  {\n    (*p_00->xDestroy)(p_00->pUserData);\n    sqlite3DbFree(db,p_00);\n  }\n  return;\n}" { (declaration "FuncDestructor *p_00;" type_identifier (pointer_declarator "*p_00" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "p_00 = (p->u).pDestructor;" (assignment_expression "p_00 = (p->u).pDestructor" identifier = (field_expression "(p->u).pDestructor" (parenthesized_expression "(p->u)" ( (field_expression "p->u" identifier -> field_identifier) )) . field_identifier)) ;) (if_statement "if ((p_00 != (FuncDestructor *)0x0) && (iVar1 = p_00->nRef + -1, p_00->nRef = iVar1, iVar1 == 0))\n  {\n    (*p_00->xDestroy)(p_00->pUserData);\n    sqlite3DbFree(db,p_00);\n  }" if (parenthesized_expression "((p_00 != (FuncDestructor *)0x0) && (iVar1 = p_00->nRef + -1, p_00->nRef = iVar1, iVar1 == 0))" ( (binary_expression "(p_00 != (FuncDestructor *)0x0) && (iVar1 = p_00->nRef + -1, p_00->nRef = iVar1, iVar1 == 0)" (parenthesized_expression "(p_00 != (FuncDestructor *)0x0)" ( (binary_expression "p_00 != (FuncDestructor *)0x0" identifier != (cast_expression "(FuncDestructor *)0x0" ( (type_descriptor "FuncDestructor *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar1 = p_00->nRef + -1, p_00->nRef = iVar1, iVar1 == 0)" ( (comma_expression "iVar1 = p_00->nRef + -1, p_00->nRef = iVar1, iVar1 == 0" (assignment_expression "iVar1 = p_00->nRef + -1" identifier = (binary_expression "p_00->nRef + -1" (field_expression "p_00->nRef" identifier -> field_identifier) + number_literal)) , (comma_expression "p_00->nRef = iVar1, iVar1 == 0" (assignment_expression "p_00->nRef = iVar1" (field_expression "p_00->nRef" identifier -> field_identifier) = identifier) , (binary_expression "iVar1 == 0" identifier == number_literal))) ))) )) (compound_statement "{\n    (*p_00->xDestroy)(p_00->pUserData);\n    sqlite3DbFree(db,p_00);\n  }" { (expression_statement "(*p_00->xDestroy)(p_00->pUserData);" (call_expression "(*p_00->xDestroy)(p_00->pUserData)" (parenthesized_expression "(*p_00->xDestroy)" ( (pointer_expression "*p_00->xDestroy" * (field_expression "p_00->xDestroy" identifier -> field_identifier)) )) (argument_list "(p_00->pUserData)" ( (field_expression "p_00->pUserData" identifier -> field_identifier) ))) ;) (expression_statement "sqlite3DbFree(db,p_00);" (call_expression "sqlite3DbFree(db,p_00)" identifier (argument_list "(db,p_00)" ( identifier , identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00119e78(undefined8 param_1,long param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_2 + 0x40);\n  if ((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)) {\n    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));\n    FUN_00119825(param_1,piVar2);\n  }\n  return;\n}\n\n" (function_definition "void FUN_00119e78(undefined8 param_1,long param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_2 + 0x40);\n  if ((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)) {\n    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));\n    FUN_00119825(param_1,piVar2);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00119e78(undefined8 param_1,long param_2)" identifier (parameter_list "(undefined8 param_1,long param_2)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_2 + 0x40);\n  if ((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)) {\n    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));\n    FUN_00119825(param_1,piVar2);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (expression_statement "piVar2 = *(int **)(param_2 + 0x40);" (assignment_expression "piVar2 = *(int **)(param_2 + 0x40)" identifier = (pointer_expression "*(int **)(param_2 + 0x40)" * (cast_expression "(int **)(param_2 + 0x40)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x40)" ( (binary_expression "param_2 + 0x40" identifier + number_literal) ))))) ;) (if_statement "if ((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)) {\n    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));\n    FUN_00119825(param_1,piVar2);\n  }" if (parenthesized_expression "((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0))" ( (binary_expression "(piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)" (parenthesized_expression "(piVar2 != (int *)0x0)" ( (binary_expression "piVar2 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)" ( (comma_expression "iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) , (comma_expression "*piVar2 = iVar1 + -1, iVar1 + -1 == 0" (assignment_expression "*piVar2 = iVar1 + -1" (pointer_expression "*piVar2" * identifier) = (binary_expression "iVar1 + -1" identifier + number_literal)) , (binary_expression "iVar1 + -1 == 0" (binary_expression "iVar1 + -1" identifier + number_literal) == number_literal))) ))) )) (compound_statement "{\n    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));\n    FUN_00119825(param_1,piVar2);\n  }" { (expression_statement "(**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));" (call_expression "(**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4))" (parenthesized_expression "(**(code **)(piVar2 + 2))" ( (pointer_expression "**(code **)(piVar2 + 2)" * (pointer_expression "*(code **)(piVar2 + 2)" * (cast_expression "(code **)(piVar2 + 2)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar2 + 2)" ( (binary_expression "piVar2 + 2" identifier + number_literal) ))))) )) (argument_list "(*(undefined8 *)(piVar2 + 4))" ( (pointer_expression "*(undefined8 *)(piVar2 + 4)" * (cast_expression "(undefined8 *)(piVar2 + 4)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar2 + 4)" ( (binary_expression "piVar2 + 4" identifier + number_literal) )))) ))) ;) (expression_statement "FUN_00119825(param_1,piVar2);" (call_expression "FUN_00119825(param_1,piVar2)" identifier (argument_list "(param_1,piVar2)" ( identifier , identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * IDENT)) , (comma_expression (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) , (binary_expression (binary_expression IDENT + LIT) == LIT))) ))) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })) (return_statement return ;) })))
(function_definition "void FUN_00119e78(undefined8 param_1,long param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_2 + 0x40);\n  if ((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)) {\n    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));\n    FUN_00119825(param_1,piVar2);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00119e78(undefined8 param_1,long param_2)" (identifier "FUN_00119e78") (parameter_list "(undefined8 param_1,long param_2)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  \n  piVar2 = *(int **)(param_2 + 0x40);\n  if ((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)) {\n    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));\n    FUN_00119825(param_1,piVar2);\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (expression_statement "piVar2 = *(int **)(param_2 + 0x40);" (assignment_expression "piVar2 = *(int **)(param_2 + 0x40)" (identifier "piVar2") (= "=") (pointer_expression "*(int **)(param_2 + 0x40)" (* "*") (cast_expression "(int **)(param_2 + 0x40)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 0x40)" (( "(") (binary_expression "param_2 + 0x40" (identifier "param_2") (+ "+") (number_literal "0x40")) () ")"))))) (; ";")) (if_statement "if ((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)) {\n    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));\n    FUN_00119825(param_1,piVar2);\n  }" (if "if") (parenthesized_expression "((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0))" (( "(") (binary_expression "(piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)" (parenthesized_expression "(piVar2 != (int *)0x0)" (( "(") (binary_expression "piVar2 != (int *)0x0" (identifier "piVar2") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)" (( "(") (comma_expression "iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0" (assignment_expression "iVar1 = *piVar2" (identifier "iVar1") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (, ",") (comma_expression "*piVar2 = iVar1 + -1, iVar1 + -1 == 0" (assignment_expression "*piVar2 = iVar1 + -1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (binary_expression "iVar1 + -1" (identifier "iVar1") (+ "+") (number_literal "-1"))) (, ",") (binary_expression "iVar1 + -1 == 0" (binary_expression "iVar1 + -1" (identifier "iVar1") (+ "+") (number_literal "-1")) (== "==") (number_literal "0")))) () ")"))) () ")")) (compound_statement "{\n    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));\n    FUN_00119825(param_1,piVar2);\n  }" ({ "{") (expression_statement "(**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));" (call_expression "(**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4))" (parenthesized_expression "(**(code **)(piVar2 + 2))" (( "(") (pointer_expression "**(code **)(piVar2 + 2)" (* "*") (pointer_expression "*(code **)(piVar2 + 2)" (* "*") (cast_expression "(code **)(piVar2 + 2)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(piVar2 + 2)" (( "(") (binary_expression "piVar2 + 2" (identifier "piVar2") (+ "+") (number_literal "2")) () ")"))))) () ")")) (argument_list "(*(undefined8 *)(piVar2 + 4))" (( "(") (pointer_expression "*(undefined8 *)(piVar2 + 4)" (* "*") (cast_expression "(undefined8 *)(piVar2 + 4)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar2 + 4)" (( "(") (binary_expression "piVar2 + 4" (identifier "piVar2") (+ "+") (number_literal "4")) () ")")))) () ")"))) (; ";")) (expression_statement "FUN_00119825(param_1,piVar2);" (call_expression "FUN_00119825(param_1,piVar2)" (identifier "FUN_00119825") (argument_list "(param_1,piVar2)" (( "(") (identifier "param_1") (, ",") (identifier "piVar2") () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *db,type_2 *p)

{
  type_3 *var_1;
  int var_2;
  
  var_1 = (p->u).pDestructor;
  if ((var_1 != (type_3 *)0x0) && (var_2 = var_1->nRef + -1, var_1->nRef = var_2, var_2 == 0))
  {
    (*var_1->xDestroy)(var_1->pUserData);
    var_3(db,var_1);
  }
  return;
}


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

void MASKED(undefined8 param_1,long param_2)

{
  int iVar1;
  int *piVar2;
  
  piVar2 = *(int **)(param_2 + 0x40);
  if ((piVar2 != (int *)0x0) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 + -1 == 0)) {
    (**(code **)(piVar2 + 2))(*(undefined8 *)(piVar2 + 4));
    FUN_00119825(param_1,piVar2);
  }
  return;
}

