
/* DWARF original prototype: int walWriteOneFrame(WalWriter * p, PgHdr * pPage, int nTruncate,
   sqlite3_int64 iOffset, PgHdr * pPage) */

int __regparm3
walWriteOneFrame(WalWriter *p,PgHdr *pPage,int nTruncate,sqlite3_int64 iOffset,PgHdr *pPage_1)

{
  int iVar1;
  int iVar2;
  int in_GS_OFFSET;
  u8 aFrame [24];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  walEncodeFrame(p->pWal,nTruncate,(u32)iOffset,(u8 *)pPage,aFrame);
  iVar2 = walWriteToLog(p,aFrame,0x18,CONCAT44(pPage_1,iOffset._4_4_));
  if (iVar2 == 0) {
    iVar2 = walWriteToLog(p,pPage,p->szPage,
                          CONCAT44((int)&pPage_1->pPage + (uint)(0xffffffe7 < iOffset._4_4_),
                                   iOffset._4_4_ + 0x18));
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



void __regparm2
FUN_00038570(undefined4 param_1,undefined4 param_2,undefined4 param_3,uint param_4,int param_5)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined1 local_38 [24];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  FUN_000249d0(param_2,local_38);
  iVar1 = FUN_00025a00(param_4,param_5);
  if (iVar1 == 0) {
    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000f6410();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
MOV EBX,EAX
MOV EAX,EDX
MOV EDX,ECX
SUB ESP,0x3c
MOV ESI,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x2c],ESI
XOR ESI,ESI
LEA ESI,[ESP + 0x14]
MOV EDI,dword ptr [ESP + 0x54]
MOV EBP,dword ptr [ESP + 0x58]
PUSH ESI
MOV dword ptr [ESP + 0x10],EAX
PUSH EAX
MOV EAX,dword ptr [EBX]
MOV ECX,dword ptr [ESP + 0x58]
CALL 0x000249d0
PUSH EBP
MOV ECX,0x18
MOV EDX,ESI
PUSH EDI
MOV EAX,EBX
CALL 0x00025a00
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000385de
MOV EAX,EDI
SUB ESP,0x8
MOV EDX,EBP
MOV ECX,dword ptr [EBX + 0x14]
ADD EAX,0x18
ADC EDX,0x0
PUSH EDX
PUSH EAX
MOV EDX,dword ptr [ESP + 0x1c]
MOV EAX,EBX
CALL 0x00025a00
ADD ESP,0x10
MOV EDI,dword ptr [ESP + 0x2c]
XOR EDI,dword ptr GS:[0x14]
JNZ 0x000385f3
ADD ESP,0x3c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x000f6410
(translation_unit "void __regparm2\nFUN_00038570(undefined4 param_1,undefined4 param_2,undefined4 param_3,uint param_4,int param_5)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_38 [24];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000249d0(param_2,local_38);\n  iVar1 = FUN_00025a00(param_4,param_5);\n  if (iVar1 == 0) {\n    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000f6410();\n}\n\n" (function_definition "void __regparm2\nFUN_00038570(undefined4 param_1,undefined4 param_2,undefined4 param_3,uint param_4,int param_5)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_38 [24];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000249d0(param_2,local_38);\n  iVar1 = FUN_00025a00(param_4,param_5);\n  if (iVar1 == 0) {\n    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000f6410();\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "FUN_00038570(undefined4 param_1,undefined4 param_2,undefined4 param_3,uint param_4,int param_5)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,uint param_4,int param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_38 [24];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000249d0(param_2,local_38);\n  iVar1 = FUN_00025a00(param_4,param_5);\n  if (iVar1 == 0) {\n    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000f6410();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_38 [24];" type_identifier (array_declarator "local_38 [24]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "FUN_000249d0(param_2,local_38);" (call_expression "FUN_000249d0(param_2,local_38)" identifier (argument_list "(param_2,local_38)" ( identifier , identifier ))) ;) (expression_statement "iVar1 = FUN_00025a00(param_4,param_5);" (assignment_expression "iVar1 = FUN_00025a00(param_4,param_5)" identifier = (call_expression "FUN_00025a00(param_4,param_5)" identifier (argument_list "(param_4,param_5)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));\n  }" { (expression_statement "FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));" (call_expression "FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4))" identifier (argument_list "(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4))" ( (binary_expression "param_4 + 0x18" identifier + number_literal) , (binary_expression "param_5 + (uint)(0xffffffe7 < param_4)" identifier + (call_expression "(uint)(0xffffffe7 < param_4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffe7 < param_4)" ( (binary_expression "0xffffffe7 < param_4" number_literal < identifier) )))) ))) ;) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_000f6410();" (call_expression "FUN_000f6410()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* DWARF original prototype: int walWriteOneFrame(WalWriter * p, PgHdr * pPage, int nTruncate,\n   sqlite3_int64 iOffset, PgHdr * pPage) */\n\nint __regparm3\nwalWriteOneFrame(WalWriter *p,PgHdr *pPage,int nTruncate,sqlite3_int64 iOffset,PgHdr *pPage_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  u8 aFrame [24];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  walEncodeFrame(p->pWal,nTruncate,(u32)iOffset,(u8 *)pPage,aFrame);\n  iVar2 = walWriteToLog(p,aFrame,0x18,CONCAT44(pPage_1,iOffset._4_4_));\n  if (iVar2 == 0) {\n    iVar2 = walWriteToLog(p,pPage,p->szPage,\n                          CONCAT44((int)&pPage_1->pPage + (uint)(0xffffffe7 < iOffset._4_4_),\n                                   iOffset._4_4_ + 0x18));\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "int __regparm3\nwalWriteOneFrame(WalWriter *p,PgHdr *pPage,int nTruncate,sqlite3_int64 iOffset,PgHdr *pPage_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  u8 aFrame [24];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  walEncodeFrame(p->pWal,nTruncate,(u32)iOffset,(u8 *)pPage,aFrame);\n  iVar2 = walWriteToLog(p,aFrame,0x18,CONCAT44(pPage_1,iOffset._4_4_));\n  if (iVar2 == 0) {\n    iVar2 = walWriteToLog(p,pPage,p->szPage,\n                          CONCAT44((int)&pPage_1->pPage + (uint)(0xffffffe7 < iOffset._4_4_),\n                                   iOffset._4_4_ + 0x18));\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "walWriteOneFrame(WalWriter *p,PgHdr *pPage,int nTruncate,sqlite3_int64 iOffset,PgHdr *pPage_1)" identifier (parameter_list "(WalWriter *p,PgHdr *pPage,int nTruncate,sqlite3_int64 iOffset,PgHdr *pPage_1)" ( (parameter_declaration "WalWriter *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "PgHdr *pPage" type_identifier (pointer_declarator "*pPage" * identifier)) , (parameter_declaration "int nTruncate" primitive_type identifier) , (parameter_declaration "sqlite3_int64 iOffset" type_identifier identifier) , (parameter_declaration "PgHdr *pPage_1" type_identifier (pointer_declarator "*pPage_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  u8 aFrame [24];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  walEncodeFrame(p->pWal,nTruncate,(u32)iOffset,(u8 *)pPage,aFrame);\n  iVar2 = walWriteToLog(p,aFrame,0x18,CONCAT44(pPage_1,iOffset._4_4_));\n  if (iVar2 == 0) {\n    iVar2 = walWriteToLog(p,pPage,p->szPage,\n                          CONCAT44((int)&pPage_1->pPage + (uint)(0xffffffe7 < iOffset._4_4_),\n                                   iOffset._4_4_ + 0x18));\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "u8 aFrame [24];" type_identifier (array_declarator "aFrame [24]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "walEncodeFrame(p->pWal,nTruncate,(u32)iOffset,(u8 *)pPage,aFrame);" (call_expression "walEncodeFrame(p->pWal,nTruncate,(u32)iOffset,(u8 *)pPage,aFrame)" identifier (argument_list "(p->pWal,nTruncate,(u32)iOffset,(u8 *)pPage,aFrame)" ( (field_expression "p->pWal" identifier -> field_identifier) , identifier , (cast_expression "(u32)iOffset" ( (type_descriptor "u32" type_identifier) ) identifier) , (cast_expression "(u8 *)pPage" ( (type_descriptor "u8 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))) ;) (expression_statement "iVar2 = walWriteToLog(p,aFrame,0x18,CONCAT44(pPage_1,iOffset._4_4_));" (assignment_expression "iVar2 = walWriteToLog(p,aFrame,0x18,CONCAT44(pPage_1,iOffset._4_4_))" identifier = (call_expression "walWriteToLog(p,aFrame,0x18,CONCAT44(pPage_1,iOffset._4_4_))" identifier (argument_list "(p,aFrame,0x18,CONCAT44(pPage_1,iOffset._4_4_))" ( identifier , identifier , number_literal , (call_expression "CONCAT44(pPage_1,iOffset._4_4_)" identifier (argument_list "(pPage_1,iOffset._4_4_)" ( identifier , (field_expression "iOffset._4_4_" identifier . field_identifier) ))) )))) ;) (if_statement "if (iVar2 == 0) {\n    iVar2 = walWriteToLog(p,pPage,p->szPage,\n                          CONCAT44((int)&pPage_1->pPage + (uint)(0xffffffe7 < iOffset._4_4_),\n                                   iOffset._4_4_ + 0x18));\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar2 = walWriteToLog(p,pPage,p->szPage,\n                          CONCAT44((int)&pPage_1->pPage + (uint)(0xffffffe7 < iOffset._4_4_),\n                                   iOffset._4_4_ + 0x18));\n  }" { (expression_statement "iVar2 = walWriteToLog(p,pPage,p->szPage,\n                          CONCAT44((int)&pPage_1->pPage + (uint)(0xffffffe7 < iOffset._4_4_),\n                                   iOffset._4_4_ + 0x18));" (assignment_expression "iVar2 = walWriteToLog(p,pPage,p->szPage,\n                          CONCAT44((int)&pPage_1->pPage + (uint)(0xffffffe7 < iOffset._4_4_),\n                                   iOffset._4_4_ + 0x18))" identifier = (call_expression "walWriteToLog(p,pPage,p->szPage,\n                          CONCAT44((int)&pPage_1->pPage + (uint)(0xffffffe7 < iOffset._4_4_),\n                                   iOffset._4_4_ + 0x18))" identifier (argument_list "(p,pPage,p->szPage,\n                          CONCAT44((int)&pPage_1->pPage + (uint)(0xffffffe7 < iOffset._4_4_),\n                                   iOffset._4_4_ + 0x18))" ( identifier , identifier , (field_expression "p->szPage" identifier -> field_identifier) , (call_expression "CONCAT44((int)&pPage_1->pPage + (uint)(0xffffffe7 < iOffset._4_4_),\n                                   iOffset._4_4_ + 0x18)" identifier (argument_list "((int)&pPage_1->pPage + (uint)(0xffffffe7 < iOffset._4_4_),\n                                   iOffset._4_4_ + 0x18)" ( (binary_expression "(int)&pPage_1->pPage + (uint)(0xffffffe7 < iOffset._4_4_)" (cast_expression "(int)&pPage_1->pPage" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&pPage_1->pPage" & (field_expression "pPage_1->pPage" identifier -> field_identifier))) + (call_expression "(uint)(0xffffffe7 < iOffset._4_4_)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffe7 < iOffset._4_4_)" ( (binary_expression "0xffffffe7 < iOffset._4_4_" number_literal < (field_expression "iOffset._4_4_" identifier . field_identifier)) )))) , (binary_expression "iOffset._4_4_ + 0x18" (field_expression "iOffset._4_4_" identifier . field_identifier) + number_literal) ))) )))) ;) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void __regparm2\nFUN_00038570(undefined4 param_1,undefined4 param_2,undefined4 param_3,uint param_4,int param_5)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_38 [24];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000249d0(param_2,local_38);\n  iVar1 = FUN_00025a00(param_4,param_5);\n  if (iVar1 == 0) {\n    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000f6410();\n}\n\n" (function_definition "void __regparm2\nFUN_00038570(undefined4 param_1,undefined4 param_2,undefined4 param_3,uint param_4,int param_5)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_38 [24];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000249d0(param_2,local_38);\n  iVar1 = FUN_00025a00(param_4,param_5);\n  if (iVar1 == 0) {\n    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000f6410();\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "FUN_00038570(undefined4 param_1,undefined4 param_2,undefined4 param_3,uint param_4,int param_5)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,uint param_4,int param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_38 [24];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000249d0(param_2,local_38);\n  iVar1 = FUN_00025a00(param_4,param_5);\n  if (iVar1 == 0) {\n    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000f6410();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_38 [24];" type_identifier (array_declarator "local_38 [24]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "FUN_000249d0(param_2,local_38);" (call_expression "FUN_000249d0(param_2,local_38)" identifier (argument_list "(param_2,local_38)" ( identifier , identifier ))) ;) (expression_statement "iVar1 = FUN_00025a00(param_4,param_5);" (assignment_expression "iVar1 = FUN_00025a00(param_4,param_5)" identifier = (call_expression "FUN_00025a00(param_4,param_5)" identifier (argument_list "(param_4,param_5)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));\n  }" { (expression_statement "FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));" (call_expression "FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4))" identifier (argument_list "(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4))" ( (binary_expression "param_4 + 0x18" identifier + number_literal) , (binary_expression "param_5 + (uint)(0xffffffe7 < param_4)" identifier + (call_expression "(uint)(0xffffffe7 < param_4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffe7 < param_4)" ( (binary_expression "0xffffffe7 < param_4" number_literal < identifier) )))) ))) ;) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_000f6410();" (call_expression "FUN_000f6410()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression LIT < IDENT) )))) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void __regparm2\nFUN_00038570(undefined4 param_1,undefined4 param_2,undefined4 param_3,uint param_4,int param_5)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_38 [24];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000249d0(param_2,local_38);\n  iVar1 = FUN_00025a00(param_4,param_5);\n  if (iVar1 == 0) {\n    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000f6410();\n}" (primitive_type "void") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "FUN_00038570(undefined4 param_1,undefined4 param_2,undefined4 param_3,uint param_4,int param_5)" (identifier "FUN_00038570") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,uint param_4,int param_5)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) () ")"))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_38 [24];\n  int local_20;\n  \n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  FUN_000249d0(param_2,local_38);\n  iVar1 = FUN_00025a00(param_4,param_5);\n  if (iVar1 == 0) {\n    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000f6410();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined1 local_38 [24];" (type_identifier "undefined1") (array_declarator "local_38 [24]" (identifier "local_38") ([ "[") (number_literal "24") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "FUN_000249d0(param_2,local_38);" (call_expression "FUN_000249d0(param_2,local_38)" (identifier "FUN_000249d0") (argument_list "(param_2,local_38)" (( "(") (identifier "param_2") (, ",") (identifier "local_38") () ")"))) (; ";")) (expression_statement "iVar1 = FUN_00025a00(param_4,param_5);" (assignment_expression "iVar1 = FUN_00025a00(param_4,param_5)" (identifier "iVar1") (= "=") (call_expression "FUN_00025a00(param_4,param_5)" (identifier "FUN_00025a00") (argument_list "(param_4,param_5)" (( "(") (identifier "param_4") (, ",") (identifier "param_5") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));\n  }" ({ "{") (expression_statement "FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));" (call_expression "FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4))" (identifier "FUN_00025a00") (argument_list "(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4))" (( "(") (binary_expression "param_4 + 0x18" (identifier "param_4") (+ "+") (number_literal "0x18")) (, ",") (binary_expression "param_5 + (uint)(0xffffffe7 < param_4)" (identifier "param_5") (+ "+") (call_expression "(uint)(0xffffffe7 < param_4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(0xffffffe7 < param_4)" (( "(") (binary_expression "0xffffffe7 < param_4" (number_literal "0xffffffe7") (< "<") (identifier "param_4")) () ")")))) () ")"))) (; ";")) (} "}"))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_000f6410();" (call_expression "FUN_000f6410()" (identifier "FUN_000f6410") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* DWARF original prototype: int walWriteOneFrame(WalWriter * p, PgHdr * pPage, int nTruncate,
   sqlite3_int64 iOffset, PgHdr * pPage) */

int __regparm3
function_1(type_1 *p,type_2 *pPage,int nTruncate,type_3 iOffset,type_2 *pPage_1)

{
  int var_6;
  int var_5;
  int var_1;
  type_4 aFrame [24];
  
  var_6 = *(int *)(var_1 + 0x14);
  var_2(p->pWal,nTruncate,(type_5)iOffset,(type_4 *)pPage,aFrame);
  var_5 = var_3(p,aFrame,0x18,var_4(pPage_1,iOffset._4_4_));
  if (var_5 == 0) {
    var_5 = var_3(p,pPage,p->szPage,
                          var_4((int)&pPage_1->pPage + (uint)(0xffffffe7 < iOffset._4_4_),
                                   iOffset._4_4_ + 0x18));
  }
  if (var_6 == *(int *)(var_1 + 0x14)) {
    return var_5;
  }
                    /* WARNING: Subroutine does not return */
  var_7();
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (number_literal) right: (identifier)))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

void __regparm2
MASKED(undefined4 param_1,undefined4 param_2,undefined4 param_3,uint param_4,int param_5)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined1 local_38 [24];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  FUN_000249d0(param_2,local_38);
  iVar1 = FUN_00025a00(param_4,param_5);
  if (iVar1 == 0) {
    FUN_00025a00(param_4 + 0x18,param_5 + (uint)(0xffffffe7 < param_4));
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000f6410();
}

