
void backupUpdate(sqlite3_backup *p,Pgno iPage,u8 *aData)

{
  int iVar1;
  
  do {
    if (((p->rc - 5U < 2) || (p->rc == 0)) && (iPage < p->iNext)) {
      sqlite3_mutex_enter(p->pDestDb->mutex);
      iVar1 = backupOnePage(p,iPage,aData,1);
      sqlite3_mutex_leave(p->pDestDb->mutex);
      if (iVar1 != 0) {
        p->rc = iVar1;
      }
    }
    p = p->pNext;
  } while (p != (sqlite3_backup *)0x0);
  return;
}



void FUN_0017ea7e(long *param_1,uint param_2,undefined8 param_3)

{
  int iVar1;
  
  do {
    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))
       ) {
      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));
      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);
      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));
      if (iVar1 != 0) {
        *(int *)(param_1 + 6) = iVar1;
      }
    }
    param_1 = (long *)param_1[8];
  } while (param_1 != (long *)0x0);
  return;
}


PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV EBP,ESI
MOV R13,RDX
JMP 0x0017eaa0
CMP dword ptr [RBX + 0x18],EBP
JA 0x0017eab1
MOV RBX,qword ptr [RBX + 0x40]
TEST RBX,RBX
JZ 0x0017eae9
MOV EAX,dword ptr [RBX + 0x30]
LEA EDX,[RAX + -0x5]
CMP EDX,0x1
JBE 0x0017ea92
TEST EAX,EAX
JNZ 0x0017ea97
JMP 0x0017ea92
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x0012a8c7
MOV ECX,0x1
MOV RDX,R13
MOV ESI,EBP
MOV RDI,RBX
CALL 0x0017e8bc
MOV R12D,EAX
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x0012a8f6
TEST R12D,R12D
JZ 0x0017ea97
MOV dword ptr [RBX + 0x30],R12D
JMP 0x0017ea97
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
RET
(translation_unit "void FUN_0017ea7e(long *param_1,uint param_2,undefined8 param_3)\n\n{\n  int iVar1;\n  \n  do {\n    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }\n    param_1 = (long *)param_1[8];\n  } while (param_1 != (long *)0x0);\n  return;\n}\n\n" (function_definition "void FUN_0017ea7e(long *param_1,uint param_2,undefined8 param_3)\n\n{\n  int iVar1;\n  \n  do {\n    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }\n    param_1 = (long *)param_1[8];\n  } while (param_1 != (long *)0x0);\n  return;\n}" primitive_type (function_declarator "FUN_0017ea7e(long *param_1,uint param_2,undefined8 param_3)" identifier (parameter_list "(long *param_1,uint param_2,undefined8 param_3)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  do {\n    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }\n    param_1 = (long *)param_1[8];\n  } while (param_1 != (long *)0x0);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (do_statement "do {\n    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }\n    param_1 = (long *)param_1[8];\n  } while (param_1 != (long *)0x0);" do (compound_statement "{\n    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }\n    param_1 = (long *)param_1[8];\n  }" { (if_statement "if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }" if (parenthesized_expression "((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       )" ( (binary_expression "(((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))" (parenthesized_expression "(((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0))" ( (binary_expression "((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)" (parenthesized_expression "((int)param_1[6] - 5U < 2)" ( (binary_expression "(int)param_1[6] - 5U < 2" (binary_expression "(int)param_1[6] - 5U" (cast_expression "(int)param_1[6]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[6]" identifier [ number_literal ])) - number_literal) < number_literal) )) || (parenthesized_expression "((int)param_1[6] == 0)" ( (binary_expression "(int)param_1[6] == 0" (cast_expression "(int)param_1[6]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[6]" identifier [ number_literal ])) == number_literal) ))) )) && (parenthesized_expression "(param_2 < *(uint *)(param_1 + 3))" ( (binary_expression "param_2 < *(uint *)(param_1 + 3)" identifier < (pointer_expression "*(uint *)(param_1 + 3)" * (cast_expression "(uint *)(param_1 + 3)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 3)" ( (binary_expression "param_1 + 3" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }" { (expression_statement "FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));" (call_expression "FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(*param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(*param_1 + 0x18)" * (cast_expression "(undefined8 *)(*param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) )))) ))) ;) (expression_statement "iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);" (assignment_expression "iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1)" identifier = (call_expression "FUN_0017e8bc(param_1,param_2,param_3,1)" identifier (argument_list "(param_1,param_2,param_3,1)" ( identifier , identifier , identifier , number_literal )))) ;) (expression_statement "FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));" (call_expression "FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(*param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(*param_1 + 0x18)" * (cast_expression "(undefined8 *)(*param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) )))) ))) ;) (if_statement "if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        *(int *)(param_1 + 6) = iVar1;\n      }" { (expression_statement "*(int *)(param_1 + 6) = iVar1;" (assignment_expression "*(int *)(param_1 + 6) = iVar1" (pointer_expression "*(int *)(param_1 + 6)" * (cast_expression "(int *)(param_1 + 6)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 6)" ( (binary_expression "param_1 + 6" identifier + number_literal) )))) = identifier) ;) })) })) (expression_statement "param_1 = (long *)param_1[8];" (assignment_expression "param_1 = (long *)param_1[8]" identifier = (cast_expression "(long *)param_1[8]" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[8]" identifier [ number_literal ]))) ;) }) while (parenthesized_expression "(param_1 != (long *)0x0)" ( (binary_expression "param_1 != (long *)0x0" identifier != (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (return_statement "return;" return ;) })))
(translation_unit "void backupUpdate(sqlite3_backup *p,Pgno iPage,u8 *aData)\n\n{\n  int iVar1;\n  \n  do {\n    if (((p->rc - 5U < 2) || (p->rc == 0)) && (iPage < p->iNext)) {\n      sqlite3_mutex_enter(p->pDestDb->mutex);\n      iVar1 = backupOnePage(p,iPage,aData,1);\n      sqlite3_mutex_leave(p->pDestDb->mutex);\n      if (iVar1 != 0) {\n        p->rc = iVar1;\n      }\n    }\n    p = p->pNext;\n  } while (p != (sqlite3_backup *)0x0);\n  return;\n}\n\n" (function_definition "void backupUpdate(sqlite3_backup *p,Pgno iPage,u8 *aData)\n\n{\n  int iVar1;\n  \n  do {\n    if (((p->rc - 5U < 2) || (p->rc == 0)) && (iPage < p->iNext)) {\n      sqlite3_mutex_enter(p->pDestDb->mutex);\n      iVar1 = backupOnePage(p,iPage,aData,1);\n      sqlite3_mutex_leave(p->pDestDb->mutex);\n      if (iVar1 != 0) {\n        p->rc = iVar1;\n      }\n    }\n    p = p->pNext;\n  } while (p != (sqlite3_backup *)0x0);\n  return;\n}" primitive_type (function_declarator "backupUpdate(sqlite3_backup *p,Pgno iPage,u8 *aData)" identifier (parameter_list "(sqlite3_backup *p,Pgno iPage,u8 *aData)" ( (parameter_declaration "sqlite3_backup *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "Pgno iPage" type_identifier identifier) , (parameter_declaration "u8 *aData" type_identifier (pointer_declarator "*aData" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  do {\n    if (((p->rc - 5U < 2) || (p->rc == 0)) && (iPage < p->iNext)) {\n      sqlite3_mutex_enter(p->pDestDb->mutex);\n      iVar1 = backupOnePage(p,iPage,aData,1);\n      sqlite3_mutex_leave(p->pDestDb->mutex);\n      if (iVar1 != 0) {\n        p->rc = iVar1;\n      }\n    }\n    p = p->pNext;\n  } while (p != (sqlite3_backup *)0x0);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (do_statement "do {\n    if (((p->rc - 5U < 2) || (p->rc == 0)) && (iPage < p->iNext)) {\n      sqlite3_mutex_enter(p->pDestDb->mutex);\n      iVar1 = backupOnePage(p,iPage,aData,1);\n      sqlite3_mutex_leave(p->pDestDb->mutex);\n      if (iVar1 != 0) {\n        p->rc = iVar1;\n      }\n    }\n    p = p->pNext;\n  } while (p != (sqlite3_backup *)0x0);" do (compound_statement "{\n    if (((p->rc - 5U < 2) || (p->rc == 0)) && (iPage < p->iNext)) {\n      sqlite3_mutex_enter(p->pDestDb->mutex);\n      iVar1 = backupOnePage(p,iPage,aData,1);\n      sqlite3_mutex_leave(p->pDestDb->mutex);\n      if (iVar1 != 0) {\n        p->rc = iVar1;\n      }\n    }\n    p = p->pNext;\n  }" { (if_statement "if (((p->rc - 5U < 2) || (p->rc == 0)) && (iPage < p->iNext)) {\n      sqlite3_mutex_enter(p->pDestDb->mutex);\n      iVar1 = backupOnePage(p,iPage,aData,1);\n      sqlite3_mutex_leave(p->pDestDb->mutex);\n      if (iVar1 != 0) {\n        p->rc = iVar1;\n      }\n    }" if (parenthesized_expression "(((p->rc - 5U < 2) || (p->rc == 0)) && (iPage < p->iNext))" ( (binary_expression "((p->rc - 5U < 2) || (p->rc == 0)) && (iPage < p->iNext)" (parenthesized_expression "((p->rc - 5U < 2) || (p->rc == 0))" ( (binary_expression "(p->rc - 5U < 2) || (p->rc == 0)" (parenthesized_expression "(p->rc - 5U < 2)" ( (binary_expression "p->rc - 5U < 2" (binary_expression "p->rc - 5U" (field_expression "p->rc" identifier -> field_identifier) - number_literal) < number_literal) )) || (parenthesized_expression "(p->rc == 0)" ( (binary_expression "p->rc == 0" (field_expression "p->rc" identifier -> field_identifier) == number_literal) ))) )) && (parenthesized_expression "(iPage < p->iNext)" ( (binary_expression "iPage < p->iNext" identifier < (field_expression "p->iNext" identifier -> field_identifier)) ))) )) (compound_statement "{\n      sqlite3_mutex_enter(p->pDestDb->mutex);\n      iVar1 = backupOnePage(p,iPage,aData,1);\n      sqlite3_mutex_leave(p->pDestDb->mutex);\n      if (iVar1 != 0) {\n        p->rc = iVar1;\n      }\n    }" { (expression_statement "sqlite3_mutex_enter(p->pDestDb->mutex);" (call_expression "sqlite3_mutex_enter(p->pDestDb->mutex)" identifier (argument_list "(p->pDestDb->mutex)" ( (field_expression "p->pDestDb->mutex" (field_expression "p->pDestDb" identifier -> field_identifier) -> field_identifier) ))) ;) (expression_statement "iVar1 = backupOnePage(p,iPage,aData,1);" (assignment_expression "iVar1 = backupOnePage(p,iPage,aData,1)" identifier = (call_expression "backupOnePage(p,iPage,aData,1)" identifier (argument_list "(p,iPage,aData,1)" ( identifier , identifier , identifier , number_literal )))) ;) (expression_statement "sqlite3_mutex_leave(p->pDestDb->mutex);" (call_expression "sqlite3_mutex_leave(p->pDestDb->mutex)" identifier (argument_list "(p->pDestDb->mutex)" ( (field_expression "p->pDestDb->mutex" (field_expression "p->pDestDb" identifier -> field_identifier) -> field_identifier) ))) ;) (if_statement "if (iVar1 != 0) {\n        p->rc = iVar1;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        p->rc = iVar1;\n      }" { (expression_statement "p->rc = iVar1;" (assignment_expression "p->rc = iVar1" (field_expression "p->rc" identifier -> field_identifier) = identifier) ;) })) })) (expression_statement "p = p->pNext;" (assignment_expression "p = p->pNext" identifier = (field_expression "p->pNext" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(p != (sqlite3_backup *)0x0)" ( (binary_expression "p != (sqlite3_backup *)0x0" identifier != (cast_expression "(sqlite3_backup *)0x0" ( (type_descriptor "sqlite3_backup *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0017ea7e(long *param_1,uint param_2,undefined8 param_3)\n\n{\n  int iVar1;\n  \n  do {\n    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }\n    param_1 = (long *)param_1[8];\n  } while (param_1 != (long *)0x0);\n  return;\n}\n\n" (function_definition "void FUN_0017ea7e(long *param_1,uint param_2,undefined8 param_3)\n\n{\n  int iVar1;\n  \n  do {\n    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }\n    param_1 = (long *)param_1[8];\n  } while (param_1 != (long *)0x0);\n  return;\n}" primitive_type (function_declarator "FUN_0017ea7e(long *param_1,uint param_2,undefined8 param_3)" identifier (parameter_list "(long *param_1,uint param_2,undefined8 param_3)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  do {\n    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }\n    param_1 = (long *)param_1[8];\n  } while (param_1 != (long *)0x0);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (do_statement "do {\n    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }\n    param_1 = (long *)param_1[8];\n  } while (param_1 != (long *)0x0);" do (compound_statement "{\n    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }\n    param_1 = (long *)param_1[8];\n  }" { (if_statement "if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }" if (parenthesized_expression "((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       )" ( (binary_expression "(((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))" (parenthesized_expression "(((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0))" ( (binary_expression "((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)" (parenthesized_expression "((int)param_1[6] - 5U < 2)" ( (binary_expression "(int)param_1[6] - 5U < 2" (binary_expression "(int)param_1[6] - 5U" (cast_expression "(int)param_1[6]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[6]" identifier [ number_literal ])) - number_literal) < number_literal) )) || (parenthesized_expression "((int)param_1[6] == 0)" ( (binary_expression "(int)param_1[6] == 0" (cast_expression "(int)param_1[6]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[6]" identifier [ number_literal ])) == number_literal) ))) )) && (parenthesized_expression "(param_2 < *(uint *)(param_1 + 3))" ( (binary_expression "param_2 < *(uint *)(param_1 + 3)" identifier < (pointer_expression "*(uint *)(param_1 + 3)" * (cast_expression "(uint *)(param_1 + 3)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 3)" ( (binary_expression "param_1 + 3" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }" { (expression_statement "FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));" (call_expression "FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(*param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(*param_1 + 0x18)" * (cast_expression "(undefined8 *)(*param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) )))) ))) ;) (expression_statement "iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);" (assignment_expression "iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1)" identifier = (call_expression "FUN_0017e8bc(param_1,param_2,param_3,1)" identifier (argument_list "(param_1,param_2,param_3,1)" ( identifier , identifier , identifier , number_literal )))) ;) (expression_statement "FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));" (call_expression "FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18))" identifier (argument_list "(*(undefined8 *)(*param_1 + 0x18))" ( (pointer_expression "*(undefined8 *)(*param_1 + 0x18)" * (cast_expression "(undefined8 *)(*param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) )))) ))) ;) (if_statement "if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        *(int *)(param_1 + 6) = iVar1;\n      }" { (expression_statement "*(int *)(param_1 + 6) = iVar1;" (assignment_expression "*(int *)(param_1 + 6) = iVar1" (pointer_expression "*(int *)(param_1 + 6)" * (cast_expression "(int *)(param_1 + 6)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 6)" ( (binary_expression "param_1 + 6" identifier + number_literal) )))) = identifier) ;) })) })) (expression_statement "param_1 = (long *)param_1[8];" (assignment_expression "param_1 = (long *)param_1[8]" identifier = (cast_expression "(long *)param_1[8]" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[8]" identifier [ number_literal ]))) ;) }) while (parenthesized_expression "(param_1 != (long *)0x0)" ( (binary_expression "param_1 != (long *)0x0" identifier != (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) - LIT) < LIT) )) || (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) == LIT) ))) )) && (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) })) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) ;) (return_statement return ;) })))
(function_definition "void FUN_0017ea7e(long *param_1,uint param_2,undefined8 param_3)\n\n{\n  int iVar1;\n  \n  do {\n    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }\n    param_1 = (long *)param_1[8];\n  } while (param_1 != (long *)0x0);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0017ea7e(long *param_1,uint param_2,undefined8 param_3)" (identifier "FUN_0017ea7e") (parameter_list "(long *param_1,uint param_2,undefined8 param_3)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "undefined8 param_3" (type_identifier "undefined8") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  do {\n    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }\n    param_1 = (long *)param_1[8];\n  } while (param_1 != (long *)0x0);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (do_statement "do {\n    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }\n    param_1 = (long *)param_1[8];\n  } while (param_1 != (long *)0x0);" (do "do") (compound_statement "{\n    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }\n    param_1 = (long *)param_1[8];\n  }" ({ "{") (if_statement "if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       ) {\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }" (if "if") (parenthesized_expression "((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))\n       )" (( "(") (binary_expression "(((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))" (parenthesized_expression "(((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0))" (( "(") (binary_expression "((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)" (parenthesized_expression "((int)param_1[6] - 5U < 2)" (( "(") (binary_expression "(int)param_1[6] - 5U < 2" (binary_expression "(int)param_1[6] - 5U" (cast_expression "(int)param_1[6]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]"))) (- "-") (number_literal "5U")) (< "<") (number_literal "2")) () ")")) (|| "||") (parenthesized_expression "((int)param_1[6] == 0)" (( "(") (binary_expression "(int)param_1[6] == 0" (cast_expression "(int)param_1[6]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]"))) (== "==") (number_literal "0")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(param_2 < *(uint *)(param_1 + 3))" (( "(") (binary_expression "param_2 < *(uint *)(param_1 + 3)" (identifier "param_2") (< "<") (pointer_expression "*(uint *)(param_1 + 3)" (* "*") (cast_expression "(uint *)(param_1 + 3)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 3)" (( "(") (binary_expression "param_1 + 3" (identifier "param_1") (+ "+") (number_literal "3")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));\n      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);\n      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));\n      if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }\n    }" ({ "{") (expression_statement "FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));" (call_expression "FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18))" (identifier "FUN_0012a8c7") (argument_list "(*(undefined8 *)(*param_1 + 0x18))" (( "(") (pointer_expression "*(undefined8 *)(*param_1 + 0x18)" (* "*") (cast_expression "(undefined8 *)(*param_1 + 0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0x18)" (( "(") (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x18")) () ")")))) () ")"))) (; ";")) (expression_statement "iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);" (assignment_expression "iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1)" (identifier "iVar1") (= "=") (call_expression "FUN_0017e8bc(param_1,param_2,param_3,1)" (identifier "FUN_0017e8bc") (argument_list "(param_1,param_2,param_3,1)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));" (call_expression "FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18))" (identifier "FUN_0012a8f6") (argument_list "(*(undefined8 *)(*param_1 + 0x18))" (( "(") (pointer_expression "*(undefined8 *)(*param_1 + 0x18)" (* "*") (cast_expression "(undefined8 *)(*param_1 + 0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0x18)" (( "(") (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x18")) () ")")))) () ")"))) (; ";")) (if_statement "if (iVar1 != 0) {\n        *(int *)(param_1 + 6) = iVar1;\n      }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        *(int *)(param_1 + 6) = iVar1;\n      }" ({ "{") (expression_statement "*(int *)(param_1 + 6) = iVar1;" (assignment_expression "*(int *)(param_1 + 6) = iVar1" (pointer_expression "*(int *)(param_1 + 6)" (* "*") (cast_expression "(int *)(param_1 + 6)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 6)" (( "(") (binary_expression "param_1 + 6" (identifier "param_1") (+ "+") (number_literal "6")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (} "}"))) (} "}"))) (expression_statement "param_1 = (long *)param_1[8];" (assignment_expression "param_1 = (long *)param_1[8]" (identifier "param_1") (= "=") (cast_expression "(long *)param_1[8]" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[8]" (identifier "param_1") ([ "[") (number_literal "8") (] "]")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_1 != (long *)0x0)" (( "(") (binary_expression "param_1 != (long *)0x0" (identifier "param_1") (!= "!=") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *var_6,type_2 var_1,type_3 *aData)

{
  int var_5;
  
  do {
    if (((var_6->rc - 5U < 2) || (var_6->rc == 0)) && (var_1 < var_6->iNext)) {
      var_2(var_6->pDestDb->mutex);
      var_5 = var_3(var_6,var_1,aData,1);
      var_4(var_6->pDestDb->mutex);
      if (var_5 != 0) {
        var_6->rc = var_5;
      }
    }
    var_6 = var_6->pNext;
  } while (var_6 != (type_1 *)0x0);
  return;
}


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

void MASKED(long *param_1,uint param_2,undefined8 param_3)

{
  int iVar1;
  
  do {
    if ((((int)param_1[6] - 5U < 2) || ((int)param_1[6] == 0)) && (param_2 < *(uint *)(param_1 + 3))
       ) {
      FUN_0012a8c7(*(undefined8 *)(*param_1 + 0x18));
      iVar1 = FUN_0017e8bc(param_1,param_2,param_3,1);
      FUN_0012a8f6(*(undefined8 *)(*param_1 + 0x18));
      if (iVar1 != 0) {
        *(int *)(param_1 + 6) = iVar1;
      }
    }
    param_1 = (long *)param_1[8];
  } while (param_1 != (long *)0x0);
  return;
}

