
int sqlite3ThreadCreate(SQLiteThread **ppThread,_func_void_ptr_void_ptr *xTask,void *pIn)

{
  int iVar1;
  SQLiteThread *__newthread;
  void *pvVar2;
  
  *ppThread = (SQLiteThread *)0x0;
  __newthread = (SQLiteThread *)sqlite3Malloc(0x28);
  if (__newthread != (SQLiteThread *)0x0) {
    __newthread->pOut = (void *)0x0;
    __newthread->tid = 0;
    __newthread->done = 0;
    *(undefined4 *)&__newthread->field_0xc = 0;
    __newthread->xTask = xTask;
    __newthread->pIn = pIn;
    if (((sqlite3Config.xTestCallback != (_func_int_int *)0x0) &&
        (iVar1 = (*sqlite3Config.xTestCallback)(200), iVar1 != 0)) ||
       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,
                               (__start_routine *)xTask,pIn), iVar1 != 0)) {
      __newthread->done = 1;
      pvVar2 = (*xTask)(pIn);
      __newthread->pOut = pvVar2;
    }
    *ppThread = __newthread;
    return 0;
  }
  return 7;
}



undefined8 FUN_00119d50(undefined8 *param_1,__start_routine *param_2,void *param_3)

{
  int iVar1;
  undefined1 (*__newthread) [16];
  void *pvVar2;
  
  *param_1 = 0;
  __newthread = (undefined1 (*) [16])FUN_00119a00(0x28);
  if (__newthread != (undefined1 (*) [16])0x0) {
    *(undefined8 *)__newthread[1] = 0;
    *__newthread = (undefined1  [16])0x0;
    *(__start_routine **)(__newthread[1] + 8) = param_2;
    *(void **)__newthread[2] = param_3;
    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||
       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),
       iVar1 != 0)) {
      *(undefined4 *)(*__newthread + 8) = 1;
      pvVar2 = (*param_2)(param_3);
      *(void **)__newthread[1] = pvVar2;
    }
    *param_1 = __newthread;
    return 0;
  }
  return 7;
}


PUSH R13
MOV R13,RDI
PUSH R12
MOV R12,RDX
PUSH RBP
MOV RBP,RSI
PUSH RBX
SUB RSP,0x8
MOV qword ptr [RDI],0x0
MOV EDI,0x28
CALL 0x00119a00
TEST RAX,RAX
JZ 0x00119df0
PXOR XMM0,XMM0
MOV RBX,RAX
MOV qword ptr [RAX + 0x10],0x0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x18],RBP
MOV qword ptr [RAX + 0x20],R12
MOV RAX,qword ptr [0x0021f3d8]
TEST RAX,RAX
JZ 0x00119dd0
MOV EDI,0xc8
CALL RAX
TEST EAX,EAX
JZ 0x00119dd0
MOV dword ptr [RBX + 0x8],0x1
MOV RDI,R12
CALL RBP
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [R13],RBX
ADD RSP,0x8
XOR EAX,EAX
POP RBX
POP RBP
POP R12
POP R13
RET
XOR ESI,ESI
MOV RCX,R12
MOV RDX,RBP
MOV RDI,RBX
CALL 0x0010a070
TEST EAX,EAX
JNZ 0x00119daa
JMP 0x00119dba
ADD RSP,0x8
MOV EAX,0x7
POP RBX
POP RBP
POP R12
POP R13
RET
(translation_unit "undefined8 FUN_00119d50(undefined8 *param_1,__start_routine *param_2,void *param_3)\n\n{\n  int iVar1;\n  undefined1 (*__newthread) [16];\n  void *pvVar2;\n  \n  *param_1 = 0;\n  __newthread = (undefined1 (*) [16])FUN_00119a00(0x28);\n  if (__newthread != (undefined1 (*) [16])0x0) {\n    *(undefined8 *)__newthread[1] = 0;\n    *__newthread = (undefined1  [16])0x0;\n    *(__start_routine **)(__newthread[1] + 8) = param_2;\n    *(void **)__newthread[2] = param_3;\n    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }\n    *param_1 = __newthread;\n    return 0;\n  }\n  return 7;\n}\n\n" (function_definition "undefined8 FUN_00119d50(undefined8 *param_1,__start_routine *param_2,void *param_3)\n\n{\n  int iVar1;\n  undefined1 (*__newthread) [16];\n  void *pvVar2;\n  \n  *param_1 = 0;\n  __newthread = (undefined1 (*) [16])FUN_00119a00(0x28);\n  if (__newthread != (undefined1 (*) [16])0x0) {\n    *(undefined8 *)__newthread[1] = 0;\n    *__newthread = (undefined1  [16])0x0;\n    *(__start_routine **)(__newthread[1] + 8) = param_2;\n    *(void **)__newthread[2] = param_3;\n    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }\n    *param_1 = __newthread;\n    return 0;\n  }\n  return 7;\n}" type_identifier (function_declarator "FUN_00119d50(undefined8 *param_1,__start_routine *param_2,void *param_3)" identifier (parameter_list "(undefined8 *param_1,__start_routine *param_2,void *param_3)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "__start_routine *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "void *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined1 (*__newthread) [16];\n  void *pvVar2;\n  \n  *param_1 = 0;\n  __newthread = (undefined1 (*) [16])FUN_00119a00(0x28);\n  if (__newthread != (undefined1 (*) [16])0x0) {\n    *(undefined8 *)__newthread[1] = 0;\n    *__newthread = (undefined1  [16])0x0;\n    *(__start_routine **)(__newthread[1] + 8) = param_2;\n    *(void **)__newthread[2] = param_3;\n    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }\n    *param_1 = __newthread;\n    return 0;\n  }\n  return 7;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "undefined1 (*__newthread) [16];" (subscript_expression "undefined1 (*__newthread) [16]" (call_expression "undefined1 (*__newthread)" identifier (argument_list "(*__newthread)" ( (pointer_expression "*__newthread" * identifier) ))) [ number_literal ]) ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "__newthread = (undefined1 (*) [16])FUN_00119a00(0x28);" (assignment_expression "__newthread = (undefined1 (*) [16])FUN_00119a00(0x28)" identifier = (cast_expression "(undefined1 (*) [16])FUN_00119a00(0x28)" ( (type_descriptor "undefined1 (*) [16]" type_identifier (abstract_array_declarator "(*) [16]" (abstract_parenthesized_declarator "(*)" ( (abstract_pointer_declarator "*" *) )) [ number_literal ])) ) (call_expression "FUN_00119a00(0x28)" identifier (argument_list "(0x28)" ( number_literal ))))) ;) (if_statement "if (__newthread != (undefined1 (*) [16])0x0) {\n    *(undefined8 *)__newthread[1] = 0;\n    *__newthread = (undefined1  [16])0x0;\n    *(__start_routine **)(__newthread[1] + 8) = param_2;\n    *(void **)__newthread[2] = param_3;\n    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }\n    *param_1 = __newthread;\n    return 0;\n  }" if (parenthesized_expression "(__newthread != (undefined1 (*) [16])0x0)" ( (binary_expression "__newthread != (undefined1 (*) [16])0x0" identifier != (cast_expression "(undefined1 (*) [16])0x0" ( (type_descriptor "undefined1 (*) [16]" type_identifier (abstract_array_declarator "(*) [16]" (abstract_parenthesized_declarator "(*)" ( (abstract_pointer_declarator "*" *) )) [ number_literal ])) ) number_literal)) )) (compound_statement "{\n    *(undefined8 *)__newthread[1] = 0;\n    *__newthread = (undefined1  [16])0x0;\n    *(__start_routine **)(__newthread[1] + 8) = param_2;\n    *(void **)__newthread[2] = param_3;\n    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }\n    *param_1 = __newthread;\n    return 0;\n  }" { (expression_statement "*(undefined8 *)__newthread[1] = 0;" (assignment_expression "*(undefined8 *)__newthread[1] = 0" (pointer_expression "*(undefined8 *)__newthread[1]" * (cast_expression "(undefined8 *)__newthread[1]" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "__newthread[1]" identifier [ number_literal ]))) = number_literal) ;) (expression_statement "*__newthread = (undefined1  [16])0x0;" (assignment_expression "*__newthread = (undefined1  [16])0x0" (pointer_expression "*__newthread" * identifier) = (cast_expression "(undefined1  [16])0x0" ( (type_descriptor "undefined1  [16]" type_identifier (abstract_array_declarator "[16]" [ number_literal ])) ) number_literal)) ;) (expression_statement "*(__start_routine **)(__newthread[1] + 8) = param_2;" (assignment_expression "*(__start_routine **)(__newthread[1] + 8) = param_2" (pointer_expression "*(__start_routine **)(__newthread[1] + 8)" * (cast_expression "(__start_routine **)(__newthread[1] + 8)" ( (type_descriptor "__start_routine **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(__newthread[1] + 8)" ( (binary_expression "__newthread[1] + 8" (subscript_expression "__newthread[1]" identifier [ number_literal ]) + number_literal) )))) = identifier) ;) (expression_statement "*(void **)__newthread[2] = param_3;" (assignment_expression "*(void **)__newthread[2] = param_3" (pointer_expression "*(void **)__newthread[2]" * (cast_expression "(void **)__newthread[2]" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (subscript_expression "__newthread[2]" identifier [ number_literal ]))) = identifier) ;) (if_statement "if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }" if (parenthesized_expression "(((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0))" ( (binary_expression "((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)" (parenthesized_expression "((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0))" ( (binary_expression "(DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)" (parenthesized_expression "(DAT_0021f3d8 != (code *)0x0)" ( (binary_expression "DAT_0021f3d8 != (code *)0x0" identifier != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)" ( (comma_expression "iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0" (assignment_expression "iVar1 = (*DAT_0021f3d8)(200)" identifier = (call_expression "(*DAT_0021f3d8)(200)" (parenthesized_expression "(*DAT_0021f3d8)" ( (pointer_expression "*DAT_0021f3d8" * identifier) )) (argument_list "(200)" ( number_literal )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) || (parenthesized_expression "(iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)" ( (comma_expression "iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0" (assignment_expression "iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3)" identifier = (call_expression "pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3)" identifier (argument_list "((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3)" ( (cast_expression "(pthread_t *)__newthread" ( (type_descriptor "pthread_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (cast_expression "(pthread_attr_t *)0x0" ( (type_descriptor "pthread_attr_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , identifier )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }" { (expression_statement "*(undefined4 *)(*__newthread + 8) = 1;" (assignment_expression "*(undefined4 *)(*__newthread + 8) = 1" (pointer_expression "*(undefined4 *)(*__newthread + 8)" * (cast_expression "(undefined4 *)(*__newthread + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*__newthread + 8)" ( (binary_expression "*__newthread + 8" (pointer_expression "*__newthread" * identifier) + number_literal) )))) = number_literal) ;) (expression_statement "pvVar2 = (*param_2)(param_3);" (assignment_expression "pvVar2 = (*param_2)(param_3)" identifier = (call_expression "(*param_2)(param_3)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "*(void **)__newthread[1] = pvVar2;" (assignment_expression "*(void **)__newthread[1] = pvVar2" (pointer_expression "*(void **)__newthread[1]" * (cast_expression "(void **)__newthread[1]" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (subscript_expression "__newthread[1]" identifier [ number_literal ]))) = identifier) ;) })) (expression_statement "*param_1 = __newthread;" (assignment_expression "*param_1 = __newthread" (pointer_expression "*param_1" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })) (return_statement "return 7;" return number_literal ;) })))
(translation_unit "int sqlite3ThreadCreate(SQLiteThread **ppThread,_func_void_ptr_void_ptr *xTask,void *pIn)\n\n{\n  int iVar1;\n  SQLiteThread *__newthread;\n  void *pvVar2;\n  \n  *ppThread = (SQLiteThread *)0x0;\n  __newthread = (SQLiteThread *)sqlite3Malloc(0x28);\n  if (__newthread != (SQLiteThread *)0x0) {\n    __newthread->pOut = (void *)0x0;\n    __newthread->tid = 0;\n    __newthread->done = 0;\n    *(undefined4 *)&__newthread->field_0xc = 0;\n    __newthread->xTask = xTask;\n    __newthread->pIn = pIn;\n    if (((sqlite3Config.xTestCallback != (_func_int_int *)0x0) &&\n        (iVar1 = (*sqlite3Config.xTestCallback)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,\n                               (__start_routine *)xTask,pIn), iVar1 != 0)) {\n      __newthread->done = 1;\n      pvVar2 = (*xTask)(pIn);\n      __newthread->pOut = pvVar2;\n    }\n    *ppThread = __newthread;\n    return 0;\n  }\n  return 7;\n}\n\n" (function_definition "int sqlite3ThreadCreate(SQLiteThread **ppThread,_func_void_ptr_void_ptr *xTask,void *pIn)\n\n{\n  int iVar1;\n  SQLiteThread *__newthread;\n  void *pvVar2;\n  \n  *ppThread = (SQLiteThread *)0x0;\n  __newthread = (SQLiteThread *)sqlite3Malloc(0x28);\n  if (__newthread != (SQLiteThread *)0x0) {\n    __newthread->pOut = (void *)0x0;\n    __newthread->tid = 0;\n    __newthread->done = 0;\n    *(undefined4 *)&__newthread->field_0xc = 0;\n    __newthread->xTask = xTask;\n    __newthread->pIn = pIn;\n    if (((sqlite3Config.xTestCallback != (_func_int_int *)0x0) &&\n        (iVar1 = (*sqlite3Config.xTestCallback)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,\n                               (__start_routine *)xTask,pIn), iVar1 != 0)) {\n      __newthread->done = 1;\n      pvVar2 = (*xTask)(pIn);\n      __newthread->pOut = pvVar2;\n    }\n    *ppThread = __newthread;\n    return 0;\n  }\n  return 7;\n}" primitive_type (function_declarator "sqlite3ThreadCreate(SQLiteThread **ppThread,_func_void_ptr_void_ptr *xTask,void *pIn)" identifier (parameter_list "(SQLiteThread **ppThread,_func_void_ptr_void_ptr *xTask,void *pIn)" ( (parameter_declaration "SQLiteThread **ppThread" type_identifier (pointer_declarator "**ppThread" * (pointer_declarator "*ppThread" * identifier))) , (parameter_declaration "_func_void_ptr_void_ptr *xTask" type_identifier (pointer_declarator "*xTask" * identifier)) , (parameter_declaration "void *pIn" primitive_type (pointer_declarator "*pIn" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  SQLiteThread *__newthread;\n  void *pvVar2;\n  \n  *ppThread = (SQLiteThread *)0x0;\n  __newthread = (SQLiteThread *)sqlite3Malloc(0x28);\n  if (__newthread != (SQLiteThread *)0x0) {\n    __newthread->pOut = (void *)0x0;\n    __newthread->tid = 0;\n    __newthread->done = 0;\n    *(undefined4 *)&__newthread->field_0xc = 0;\n    __newthread->xTask = xTask;\n    __newthread->pIn = pIn;\n    if (((sqlite3Config.xTestCallback != (_func_int_int *)0x0) &&\n        (iVar1 = (*sqlite3Config.xTestCallback)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,\n                               (__start_routine *)xTask,pIn), iVar1 != 0)) {\n      __newthread->done = 1;\n      pvVar2 = (*xTask)(pIn);\n      __newthread->pOut = pvVar2;\n    }\n    *ppThread = __newthread;\n    return 0;\n  }\n  return 7;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "SQLiteThread *__newthread;" type_identifier (pointer_declarator "*__newthread" * identifier) ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (expression_statement "*ppThread = (SQLiteThread *)0x0;" (assignment_expression "*ppThread = (SQLiteThread *)0x0" (pointer_expression "*ppThread" * identifier) = (cast_expression "(SQLiteThread *)0x0" ( (type_descriptor "SQLiteThread *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "__newthread = (SQLiteThread *)sqlite3Malloc(0x28);" (assignment_expression "__newthread = (SQLiteThread *)sqlite3Malloc(0x28)" identifier = (cast_expression "(SQLiteThread *)sqlite3Malloc(0x28)" ( (type_descriptor "SQLiteThread *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3Malloc(0x28)" identifier (argument_list "(0x28)" ( number_literal ))))) ;) (if_statement "if (__newthread != (SQLiteThread *)0x0) {\n    __newthread->pOut = (void *)0x0;\n    __newthread->tid = 0;\n    __newthread->done = 0;\n    *(undefined4 *)&__newthread->field_0xc = 0;\n    __newthread->xTask = xTask;\n    __newthread->pIn = pIn;\n    if (((sqlite3Config.xTestCallback != (_func_int_int *)0x0) &&\n        (iVar1 = (*sqlite3Config.xTestCallback)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,\n                               (__start_routine *)xTask,pIn), iVar1 != 0)) {\n      __newthread->done = 1;\n      pvVar2 = (*xTask)(pIn);\n      __newthread->pOut = pvVar2;\n    }\n    *ppThread = __newthread;\n    return 0;\n  }" if (parenthesized_expression "(__newthread != (SQLiteThread *)0x0)" ( (binary_expression "__newthread != (SQLiteThread *)0x0" identifier != (cast_expression "(SQLiteThread *)0x0" ( (type_descriptor "SQLiteThread *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    __newthread->pOut = (void *)0x0;\n    __newthread->tid = 0;\n    __newthread->done = 0;\n    *(undefined4 *)&__newthread->field_0xc = 0;\n    __newthread->xTask = xTask;\n    __newthread->pIn = pIn;\n    if (((sqlite3Config.xTestCallback != (_func_int_int *)0x0) &&\n        (iVar1 = (*sqlite3Config.xTestCallback)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,\n                               (__start_routine *)xTask,pIn), iVar1 != 0)) {\n      __newthread->done = 1;\n      pvVar2 = (*xTask)(pIn);\n      __newthread->pOut = pvVar2;\n    }\n    *ppThread = __newthread;\n    return 0;\n  }" { (expression_statement "__newthread->pOut = (void *)0x0;" (assignment_expression "__newthread->pOut = (void *)0x0" (field_expression "__newthread->pOut" identifier -> field_identifier) = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "__newthread->tid = 0;" (assignment_expression "__newthread->tid = 0" (field_expression "__newthread->tid" identifier -> field_identifier) = number_literal) ;) (expression_statement "__newthread->done = 0;" (assignment_expression "__newthread->done = 0" (field_expression "__newthread->done" identifier -> field_identifier) = number_literal) ;) (expression_statement "*(undefined4 *)&__newthread->field_0xc = 0;" (assignment_expression "*(undefined4 *)&__newthread->field_0xc = 0" (pointer_expression "*(undefined4 *)&__newthread->field_0xc" * (cast_expression "(undefined4 *)&__newthread->field_0xc" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&__newthread->field_0xc" & (field_expression "__newthread->field_0xc" identifier -> field_identifier)))) = number_literal) ;) (expression_statement "__newthread->xTask = xTask;" (assignment_expression "__newthread->xTask = xTask" (field_expression "__newthread->xTask" identifier -> field_identifier) = identifier) ;) (expression_statement "__newthread->pIn = pIn;" (assignment_expression "__newthread->pIn = pIn" (field_expression "__newthread->pIn" identifier -> field_identifier) = identifier) ;) (if_statement "if (((sqlite3Config.xTestCallback != (_func_int_int *)0x0) &&\n        (iVar1 = (*sqlite3Config.xTestCallback)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,\n                               (__start_routine *)xTask,pIn), iVar1 != 0)) {\n      __newthread->done = 1;\n      pvVar2 = (*xTask)(pIn);\n      __newthread->pOut = pvVar2;\n    }" if (parenthesized_expression "(((sqlite3Config.xTestCallback != (_func_int_int *)0x0) &&\n        (iVar1 = (*sqlite3Config.xTestCallback)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,\n                               (__start_routine *)xTask,pIn), iVar1 != 0))" ( (binary_expression "((sqlite3Config.xTestCallback != (_func_int_int *)0x0) &&\n        (iVar1 = (*sqlite3Config.xTestCallback)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,\n                               (__start_routine *)xTask,pIn), iVar1 != 0)" (parenthesized_expression "((sqlite3Config.xTestCallback != (_func_int_int *)0x0) &&\n        (iVar1 = (*sqlite3Config.xTestCallback)(200), iVar1 != 0))" ( (binary_expression "(sqlite3Config.xTestCallback != (_func_int_int *)0x0) &&\n        (iVar1 = (*sqlite3Config.xTestCallback)(200), iVar1 != 0)" (parenthesized_expression "(sqlite3Config.xTestCallback != (_func_int_int *)0x0)" ( (binary_expression "sqlite3Config.xTestCallback != (_func_int_int *)0x0" (field_expression "sqlite3Config.xTestCallback" identifier . field_identifier) != (cast_expression "(_func_int_int *)0x0" ( (type_descriptor "_func_int_int *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar1 = (*sqlite3Config.xTestCallback)(200), iVar1 != 0)" ( (comma_expression "iVar1 = (*sqlite3Config.xTestCallback)(200), iVar1 != 0" (assignment_expression "iVar1 = (*sqlite3Config.xTestCallback)(200)" identifier = (call_expression "(*sqlite3Config.xTestCallback)(200)" (parenthesized_expression "(*sqlite3Config.xTestCallback)" ( (pointer_expression "*sqlite3Config.xTestCallback" * (field_expression "sqlite3Config.xTestCallback" identifier . field_identifier)) )) (argument_list "(200)" ( number_literal )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) || (parenthesized_expression "(iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,\n                               (__start_routine *)xTask,pIn), iVar1 != 0)" ( (comma_expression "iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,\n                               (__start_routine *)xTask,pIn), iVar1 != 0" (assignment_expression "iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,\n                               (__start_routine *)xTask,pIn)" identifier = (call_expression "pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,\n                               (__start_routine *)xTask,pIn)" identifier (argument_list "((pthread_t *)__newthread,(pthread_attr_t *)0x0,\n                               (__start_routine *)xTask,pIn)" ( (cast_expression "(pthread_t *)__newthread" ( (type_descriptor "pthread_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (cast_expression "(pthread_attr_t *)0x0" ( (type_descriptor "pthread_attr_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(__start_routine *)xTask" ( (type_descriptor "__start_routine *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n      __newthread->done = 1;\n      pvVar2 = (*xTask)(pIn);\n      __newthread->pOut = pvVar2;\n    }" { (expression_statement "__newthread->done = 1;" (assignment_expression "__newthread->done = 1" (field_expression "__newthread->done" identifier -> field_identifier) = number_literal) ;) (expression_statement "pvVar2 = (*xTask)(pIn);" (assignment_expression "pvVar2 = (*xTask)(pIn)" identifier = (call_expression "(*xTask)(pIn)" (parenthesized_expression "(*xTask)" ( (pointer_expression "*xTask" * identifier) )) (argument_list "(pIn)" ( identifier )))) ;) (expression_statement "__newthread->pOut = pvVar2;" (assignment_expression "__newthread->pOut = pvVar2" (field_expression "__newthread->pOut" identifier -> field_identifier) = identifier) ;) })) (expression_statement "*ppThread = __newthread;" (assignment_expression "*ppThread = __newthread" (pointer_expression "*ppThread" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })) (return_statement "return 7;" return number_literal ;) })))
(translation_unit "undefined8 FUN_00119d50(undefined8 *param_1,__start_routine *param_2,void *param_3)\n\n{\n  int iVar1;\n  undefined1 (*__newthread) [16];\n  void *pvVar2;\n  \n  *param_1 = 0;\n  __newthread = (undefined1 (*) [16])FUN_00119a00(0x28);\n  if (__newthread != (undefined1 (*) [16])0x0) {\n    *(undefined8 *)__newthread[1] = 0;\n    *__newthread = (undefined1  [16])0x0;\n    *(__start_routine **)(__newthread[1] + 8) = param_2;\n    *(void **)__newthread[2] = param_3;\n    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }\n    *param_1 = __newthread;\n    return 0;\n  }\n  return 7;\n}\n\n" (function_definition "undefined8 FUN_00119d50(undefined8 *param_1,__start_routine *param_2,void *param_3)\n\n{\n  int iVar1;\n  undefined1 (*__newthread) [16];\n  void *pvVar2;\n  \n  *param_1 = 0;\n  __newthread = (undefined1 (*) [16])FUN_00119a00(0x28);\n  if (__newthread != (undefined1 (*) [16])0x0) {\n    *(undefined8 *)__newthread[1] = 0;\n    *__newthread = (undefined1  [16])0x0;\n    *(__start_routine **)(__newthread[1] + 8) = param_2;\n    *(void **)__newthread[2] = param_3;\n    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }\n    *param_1 = __newthread;\n    return 0;\n  }\n  return 7;\n}" type_identifier (function_declarator "FUN_00119d50(undefined8 *param_1,__start_routine *param_2,void *param_3)" identifier (parameter_list "(undefined8 *param_1,__start_routine *param_2,void *param_3)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "__start_routine *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "void *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined1 (*__newthread) [16];\n  void *pvVar2;\n  \n  *param_1 = 0;\n  __newthread = (undefined1 (*) [16])FUN_00119a00(0x28);\n  if (__newthread != (undefined1 (*) [16])0x0) {\n    *(undefined8 *)__newthread[1] = 0;\n    *__newthread = (undefined1  [16])0x0;\n    *(__start_routine **)(__newthread[1] + 8) = param_2;\n    *(void **)__newthread[2] = param_3;\n    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }\n    *param_1 = __newthread;\n    return 0;\n  }\n  return 7;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "undefined1 (*__newthread) [16];" (subscript_expression "undefined1 (*__newthread) [16]" (call_expression "undefined1 (*__newthread)" identifier (argument_list "(*__newthread)" ( (pointer_expression "*__newthread" * identifier) ))) [ number_literal ]) ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "__newthread = (undefined1 (*) [16])FUN_00119a00(0x28);" (assignment_expression "__newthread = (undefined1 (*) [16])FUN_00119a00(0x28)" identifier = (cast_expression "(undefined1 (*) [16])FUN_00119a00(0x28)" ( (type_descriptor "undefined1 (*) [16]" type_identifier (abstract_array_declarator "(*) [16]" (abstract_parenthesized_declarator "(*)" ( (abstract_pointer_declarator "*" *) )) [ number_literal ])) ) (call_expression "FUN_00119a00(0x28)" identifier (argument_list "(0x28)" ( number_literal ))))) ;) (if_statement "if (__newthread != (undefined1 (*) [16])0x0) {\n    *(undefined8 *)__newthread[1] = 0;\n    *__newthread = (undefined1  [16])0x0;\n    *(__start_routine **)(__newthread[1] + 8) = param_2;\n    *(void **)__newthread[2] = param_3;\n    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }\n    *param_1 = __newthread;\n    return 0;\n  }" if (parenthesized_expression "(__newthread != (undefined1 (*) [16])0x0)" ( (binary_expression "__newthread != (undefined1 (*) [16])0x0" identifier != (cast_expression "(undefined1 (*) [16])0x0" ( (type_descriptor "undefined1 (*) [16]" type_identifier (abstract_array_declarator "(*) [16]" (abstract_parenthesized_declarator "(*)" ( (abstract_pointer_declarator "*" *) )) [ number_literal ])) ) number_literal)) )) (compound_statement "{\n    *(undefined8 *)__newthread[1] = 0;\n    *__newthread = (undefined1  [16])0x0;\n    *(__start_routine **)(__newthread[1] + 8) = param_2;\n    *(void **)__newthread[2] = param_3;\n    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }\n    *param_1 = __newthread;\n    return 0;\n  }" { (expression_statement "*(undefined8 *)__newthread[1] = 0;" (assignment_expression "*(undefined8 *)__newthread[1] = 0" (pointer_expression "*(undefined8 *)__newthread[1]" * (cast_expression "(undefined8 *)__newthread[1]" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "__newthread[1]" identifier [ number_literal ]))) = number_literal) ;) (expression_statement "*__newthread = (undefined1  [16])0x0;" (assignment_expression "*__newthread = (undefined1  [16])0x0" (pointer_expression "*__newthread" * identifier) = (cast_expression "(undefined1  [16])0x0" ( (type_descriptor "undefined1  [16]" type_identifier (abstract_array_declarator "[16]" [ number_literal ])) ) number_literal)) ;) (expression_statement "*(__start_routine **)(__newthread[1] + 8) = param_2;" (assignment_expression "*(__start_routine **)(__newthread[1] + 8) = param_2" (pointer_expression "*(__start_routine **)(__newthread[1] + 8)" * (cast_expression "(__start_routine **)(__newthread[1] + 8)" ( (type_descriptor "__start_routine **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(__newthread[1] + 8)" ( (binary_expression "__newthread[1] + 8" (subscript_expression "__newthread[1]" identifier [ number_literal ]) + number_literal) )))) = identifier) ;) (expression_statement "*(void **)__newthread[2] = param_3;" (assignment_expression "*(void **)__newthread[2] = param_3" (pointer_expression "*(void **)__newthread[2]" * (cast_expression "(void **)__newthread[2]" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (subscript_expression "__newthread[2]" identifier [ number_literal ]))) = identifier) ;) (if_statement "if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }" if (parenthesized_expression "(((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0))" ( (binary_expression "((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)" (parenthesized_expression "((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0))" ( (binary_expression "(DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)" (parenthesized_expression "(DAT_0021f3d8 != (code *)0x0)" ( (binary_expression "DAT_0021f3d8 != (code *)0x0" identifier != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)" ( (comma_expression "iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0" (assignment_expression "iVar1 = (*DAT_0021f3d8)(200)" identifier = (call_expression "(*DAT_0021f3d8)(200)" (parenthesized_expression "(*DAT_0021f3d8)" ( (pointer_expression "*DAT_0021f3d8" * identifier) )) (argument_list "(200)" ( number_literal )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) || (parenthesized_expression "(iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)" ( (comma_expression "iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0" (assignment_expression "iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3)" identifier = (call_expression "pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3)" identifier (argument_list "((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3)" ( (cast_expression "(pthread_t *)__newthread" ( (type_descriptor "pthread_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (cast_expression "(pthread_attr_t *)0x0" ( (type_descriptor "pthread_attr_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , identifier )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }" { (expression_statement "*(undefined4 *)(*__newthread + 8) = 1;" (assignment_expression "*(undefined4 *)(*__newthread + 8) = 1" (pointer_expression "*(undefined4 *)(*__newthread + 8)" * (cast_expression "(undefined4 *)(*__newthread + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*__newthread + 8)" ( (binary_expression "*__newthread + 8" (pointer_expression "*__newthread" * identifier) + number_literal) )))) = number_literal) ;) (expression_statement "pvVar2 = (*param_2)(param_3);" (assignment_expression "pvVar2 = (*param_2)(param_3)" identifier = (call_expression "(*param_2)(param_3)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "*(void **)__newthread[1] = pvVar2;" (assignment_expression "*(void **)__newthread[1] = pvVar2" (pointer_expression "*(void **)__newthread[1]" * (cast_expression "(void **)__newthread[1]" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (subscript_expression "__newthread[1]" identifier [ number_literal ]))) = identifier) ;) })) (expression_statement "*param_1 = __newthread;" (assignment_expression "*param_1 = __newthread" (pointer_expression "*param_1" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })) (return_statement "return 7;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (subscript_expression (call_expression IDENT (argument_list ( (pointer_expression * IDENT) ))) [ LIT ]) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_array_declarator (abstract_parenthesized_declarator ( (abstract_pointer_declarator *) )) [ LIT ])) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_array_declarator (abstract_parenthesized_declarator ( (abstract_pointer_declarator *) )) [ LIT ])) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE (abstract_array_declarator [ LIT ])) ) LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (subscript_expression IDENT [ LIT ]))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (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 = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( LIT )))) , (binary_expression IDENT != LIT)) ))) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) , IDENT , IDENT )))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (subscript_expression IDENT [ LIT ]))) = IDENT) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return LIT ;) })) (return_statement return LIT ;) })))
(function_definition "undefined8 FUN_00119d50(undefined8 *param_1,__start_routine *param_2,void *param_3)\n\n{\n  int iVar1;\n  undefined1 (*__newthread) [16];\n  void *pvVar2;\n  \n  *param_1 = 0;\n  __newthread = (undefined1 (*) [16])FUN_00119a00(0x28);\n  if (__newthread != (undefined1 (*) [16])0x0) {\n    *(undefined8 *)__newthread[1] = 0;\n    *__newthread = (undefined1  [16])0x0;\n    *(__start_routine **)(__newthread[1] + 8) = param_2;\n    *(void **)__newthread[2] = param_3;\n    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }\n    *param_1 = __newthread;\n    return 0;\n  }\n  return 7;\n}" (type_identifier "undefined8") (function_declarator "FUN_00119d50(undefined8 *param_1,__start_routine *param_2,void *param_3)" (identifier "FUN_00119d50") (parameter_list "(undefined8 *param_1,__start_routine *param_2,void *param_3)" (( "(") (parameter_declaration "undefined8 *param_1" (type_identifier "undefined8") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "__start_routine *param_2" (type_identifier "__start_routine") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "void *param_3" (primitive_type "void") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined1 (*__newthread) [16];\n  void *pvVar2;\n  \n  *param_1 = 0;\n  __newthread = (undefined1 (*) [16])FUN_00119a00(0x28);\n  if (__newthread != (undefined1 (*) [16])0x0) {\n    *(undefined8 *)__newthread[1] = 0;\n    *__newthread = (undefined1  [16])0x0;\n    *(__start_routine **)(__newthread[1] + 8) = param_2;\n    *(void **)__newthread[2] = param_3;\n    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }\n    *param_1 = __newthread;\n    return 0;\n  }\n  return 7;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "undefined1 (*__newthread) [16];" (subscript_expression "undefined1 (*__newthread) [16]" (call_expression "undefined1 (*__newthread)" (identifier "undefined1") (argument_list "(*__newthread)" (( "(") (pointer_expression "*__newthread" (* "*") (identifier "__newthread")) () ")"))) ([ "[") (number_literal "16") (] "]")) (; ";")) (declaration "void *pvVar2;" (primitive_type "void") (pointer_declarator "*pvVar2" (* "*") (identifier "pvVar2")) (; ";")) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "0")) (; ";")) (expression_statement "__newthread = (undefined1 (*) [16])FUN_00119a00(0x28);" (assignment_expression "__newthread = (undefined1 (*) [16])FUN_00119a00(0x28)" (identifier "__newthread") (= "=") (cast_expression "(undefined1 (*) [16])FUN_00119a00(0x28)" (( "(") (type_descriptor "undefined1 (*) [16]" (type_identifier "undefined1") (abstract_array_declarator "(*) [16]" (abstract_parenthesized_declarator "(*)" (( "(") (abstract_pointer_declarator "*" (* "*")) () ")")) ([ "[") (number_literal "16") (] "]"))) () ")") (call_expression "FUN_00119a00(0x28)" (identifier "FUN_00119a00") (argument_list "(0x28)" (( "(") (number_literal "0x28") () ")"))))) (; ";")) (if_statement "if (__newthread != (undefined1 (*) [16])0x0) {\n    *(undefined8 *)__newthread[1] = 0;\n    *__newthread = (undefined1  [16])0x0;\n    *(__start_routine **)(__newthread[1] + 8) = param_2;\n    *(void **)__newthread[2] = param_3;\n    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }\n    *param_1 = __newthread;\n    return 0;\n  }" (if "if") (parenthesized_expression "(__newthread != (undefined1 (*) [16])0x0)" (( "(") (binary_expression "__newthread != (undefined1 (*) [16])0x0" (identifier "__newthread") (!= "!=") (cast_expression "(undefined1 (*) [16])0x0" (( "(") (type_descriptor "undefined1 (*) [16]" (type_identifier "undefined1") (abstract_array_declarator "(*) [16]" (abstract_parenthesized_declarator "(*)" (( "(") (abstract_pointer_declarator "*" (* "*")) () ")")) ([ "[") (number_literal "16") (] "]"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    *(undefined8 *)__newthread[1] = 0;\n    *__newthread = (undefined1  [16])0x0;\n    *(__start_routine **)(__newthread[1] + 8) = param_2;\n    *(void **)__newthread[2] = param_3;\n    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }\n    *param_1 = __newthread;\n    return 0;\n  }" ({ "{") (expression_statement "*(undefined8 *)__newthread[1] = 0;" (assignment_expression "*(undefined8 *)__newthread[1] = 0" (pointer_expression "*(undefined8 *)__newthread[1]" (* "*") (cast_expression "(undefined8 *)__newthread[1]" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "__newthread[1]" (identifier "__newthread") ([ "[") (number_literal "1") (] "]")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*__newthread = (undefined1  [16])0x0;" (assignment_expression "*__newthread = (undefined1  [16])0x0" (pointer_expression "*__newthread" (* "*") (identifier "__newthread")) (= "=") (cast_expression "(undefined1  [16])0x0" (( "(") (type_descriptor "undefined1  [16]" (type_identifier "undefined1") (abstract_array_declarator "[16]" ([ "[") (number_literal "16") (] "]"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "*(__start_routine **)(__newthread[1] + 8) = param_2;" (assignment_expression "*(__start_routine **)(__newthread[1] + 8) = param_2" (pointer_expression "*(__start_routine **)(__newthread[1] + 8)" (* "*") (cast_expression "(__start_routine **)(__newthread[1] + 8)" (( "(") (type_descriptor "__start_routine **" (type_identifier "__start_routine") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(__newthread[1] + 8)" (( "(") (binary_expression "__newthread[1] + 8" (subscript_expression "__newthread[1]" (identifier "__newthread") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*(void **)__newthread[2] = param_3;" (assignment_expression "*(void **)__newthread[2] = param_3" (pointer_expression "*(void **)__newthread[2]" (* "*") (cast_expression "(void **)__newthread[2]" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (subscript_expression "__newthread[2]" (identifier "__newthread") ([ "[") (number_literal "2") (] "]")))) (= "=") (identifier "param_3")) (; ";")) (if_statement "if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)) {\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }" (if "if") (parenthesized_expression "(((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0))" (( "(") (binary_expression "((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||\n       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)" (parenthesized_expression "((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0))" (( "(") (binary_expression "(DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)" (parenthesized_expression "(DAT_0021f3d8 != (code *)0x0)" (( "(") (binary_expression "DAT_0021f3d8 != (code *)0x0" (identifier "DAT_0021f3d8") (!= "!=") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)" (( "(") (comma_expression "iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0" (assignment_expression "iVar1 = (*DAT_0021f3d8)(200)" (identifier "iVar1") (= "=") (call_expression "(*DAT_0021f3d8)(200)" (parenthesized_expression "(*DAT_0021f3d8)" (( "(") (pointer_expression "*DAT_0021f3d8" (* "*") (identifier "DAT_0021f3d8")) () ")")) (argument_list "(200)" (( "(") (number_literal "200") () ")")))) (, ",") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (|| "||") (parenthesized_expression "(iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0)" (( "(") (comma_expression "iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),\n       iVar1 != 0" (assignment_expression "iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3)" (identifier "iVar1") (= "=") (call_expression "pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3)" (identifier "pthread_create") (argument_list "((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3)" (( "(") (cast_expression "(pthread_t *)__newthread" (( "(") (type_descriptor "pthread_t *" (type_identifier "pthread_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "__newthread")) (, ",") (cast_expression "(pthread_attr_t *)0x0" (( "(") (type_descriptor "pthread_attr_t *" (type_identifier "pthread_attr_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (, ",") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n      *(undefined4 *)(*__newthread + 8) = 1;\n      pvVar2 = (*param_2)(param_3);\n      *(void **)__newthread[1] = pvVar2;\n    }" ({ "{") (expression_statement "*(undefined4 *)(*__newthread + 8) = 1;" (assignment_expression "*(undefined4 *)(*__newthread + 8) = 1" (pointer_expression "*(undefined4 *)(*__newthread + 8)" (* "*") (cast_expression "(undefined4 *)(*__newthread + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*__newthread + 8)" (( "(") (binary_expression "*__newthread + 8" (pointer_expression "*__newthread" (* "*") (identifier "__newthread")) (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "pvVar2 = (*param_2)(param_3);" (assignment_expression "pvVar2 = (*param_2)(param_3)" (identifier "pvVar2") (= "=") (call_expression "(*param_2)(param_3)" (parenthesized_expression "(*param_2)" (( "(") (pointer_expression "*param_2" (* "*") (identifier "param_2")) () ")")) (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (expression_statement "*(void **)__newthread[1] = pvVar2;" (assignment_expression "*(void **)__newthread[1] = pvVar2" (pointer_expression "*(void **)__newthread[1]" (* "*") (cast_expression "(void **)__newthread[1]" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (subscript_expression "__newthread[1]" (identifier "__newthread") ([ "[") (number_literal "1") (] "]")))) (= "=") (identifier "pvVar2")) (; ";")) (} "}"))) (expression_statement "*param_1 = __newthread;" (assignment_expression "*param_1 = __newthread" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "__newthread")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (return_statement "return 7;" (return "return") (number_literal "7") (; ";")) (} "}")))

int function_1(type_1 **ppThread,type_2 *xTask,void *pIn)

{
  int var_3;
  type_1 *var_2;
  void *pvVar2;
  
  *ppThread = (type_1 *)0x0;
  var_2 = (type_1 *)var_1(0x28);
  if (var_2 != (type_1 *)0x0) {
    var_2->pOut = (void *)0x0;
    var_2->tid = 0;
    var_2->done = 0;
    *(type_3 *)&var_2->field_0xc = 0;
    var_2->xTask = xTask;
    var_2->pIn = pIn;
    if (((sqlite3Config.xTestCallback != (type_4 *)0x0) &&
        (var_3 = (*sqlite3Config.xTestCallback)(200), var_3 != 0)) ||
       (var_3 = var_4((type_5 *)var_2,(type_6 *)0x0,
                               (type_7 *)xTask,pIn), var_3 != 0)) {
      var_2->done = 1;
      pvVar2 = (*xTask)(pIn);
      var_2->pOut = pvVar2;
    }
    *ppThread = var_2;
    return 0;
  }
  return 7;
}


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

undefined8 MASKED(undefined8 *param_1,__start_routine *param_2,void *param_3)

{
  int iVar1;
  undefined1 (*__newthread) [16];
  void *pvVar2;
  
  *param_1 = 0;
  __newthread = (undefined1 (*) [16])FUN_00119a00(0x28);
  if (__newthread != (undefined1 (*) [16])0x0) {
    *(undefined8 *)__newthread[1] = 0;
    *__newthread = (undefined1  [16])0x0;
    *(__start_routine **)(__newthread[1] + 8) = param_2;
    *(void **)__newthread[2] = param_3;
    if (((DAT_0021f3d8 != (code *)0x0) && (iVar1 = (*DAT_0021f3d8)(200), iVar1 != 0)) ||
       (iVar1 = pthread_create((pthread_t *)__newthread,(pthread_attr_t *)0x0,param_2,param_3),
       iVar1 != 0)) {
      *(undefined4 *)(*__newthread + 8) = 1;
      pvVar2 = (*param_2)(param_3);
      *(void **)__newthread[1] = pvVar2;
    }
    *param_1 = __newthread;
    return 0;
  }
  return 7;
}

