
int walDecodeFrame(Wal *pWal,u32 *piPage,u32 *pnTruncate,u8 *aData,u8 *aFrame)

{
  int iVar1;
  u32 uVar2;
  u32 *aIn;
  uint nativeCksum;
  
  iVar1 = (*(code *)PTR_memcmp_0015ba1c)((pWal->hdr).aSalt,aFrame + 8,8);
  if (iVar1 == 0) {
    uVar2 = *(u32 *)aFrame;
    aIn = (pWal->hdr).aFrameCksum;
    if (uVar2 != 0) {
      nativeCksum = (uint)((pWal->hdr).bigEndCksum == '\x01');
      walChecksumBytes(nativeCksum,aFrame,8,aIn,aIn);
      walChecksumBytes(nativeCksum,aData,pWal->szPage,aIn,aIn);
      if ((pWal->hdr).aFrameCksum[0] != *(u32 *)(aFrame + 0x10)) {
        return 0;
      }
      if ((pWal->hdr).aFrameCksum[1] == *(u32 *)(aFrame + 0x14)) {
        *piPage = uVar2;
        *pnTruncate = *(u32 *)(aFrame + 4);
        return 1;
      }
    }
  }
  return 0;
}



undefined4 FUN_00027edc(int param_1,int *param_2,int *param_3,undefined4 param_4,int *param_5)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  
  iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8);
  if (iVar1 == 0) {
    iVar1 = *param_5;
    iVar2 = param_1 + 0x4c;
    if (iVar1 != 0) {
      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');
      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);
      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);
      if (*(int *)(param_1 + 0x4c) != param_5[4]) {
        return 0;
      }
      if (*(int *)(param_1 + 0x50) == param_5[5]) {
        *param_2 = iVar1;
        *param_3 = param_5[1];
        return 1;
      }
    }
  }
  return 0;
}


lui gp,0x14
addiu gp,gp,-0x492c
addu gp,gp,t9
addiu sp,sp,-0x40
lw t9,-0x7b94(gp)
sw s0,0x24(sp)
sw s4,0x34(sp)
or s4,a1,zero
sw s3,0x30(sp)
or s3,a2,zero
sw s1,0x28(sp)
li a2,0x8
sw gp,0x18(sp)
or s1,a0,zero
sw s2,0x2c(sp)
addiu a0,a0,0x54
sw ra,0x3c(sp)
or s2,a3,zero
sw s5,0x38(sp)
lw s0,0x50(sp)
jalr t9
_addiu a1,s0,0x8
bne v0,zero,0x00027f4c
_lw gp,0x18(sp)
lwl t7,0x0(s0)
lwr t7,0x3(s0)
bne t7,zero,0x00027f74
_addiu s5,s1,0x4c
or v0,zero,zero
lw ra,0x3c(sp)
lw s5,0x38(sp)
lw s4,0x34(sp)
lw s3,0x30(sp)
lw s2,0x2c(sp)
lw s1,0x28(sp)
lw s0,0x24(sp)
jr ra
_addiu sp,sp,0x40
lbu t8,0x41(s1)
lw t9,-0x7f54(gp)
li a2,0x8
or a3,s5,zero
sw s5,0x10(sp)
xori t8,t8,0x1
sltiu t8,t8,0x1
addiu t9,t9,-0x1c1c
or a0,t8,zero
bal 0x0001e3e4
_or a1,s0,zero
or a3,s5,zero
lw a2,0x24(s1)
or a1,s2,zero
sw s5,0x10(sp)
bal 0x0001e3e4
_or a0,t8,zero
lwl v0,0x10(s0)
lw v1,0x4c(s1)
lwr v0,0x13(s0)
bne v1,v0,0x00027f50
_or v0,zero,zero
lwl v0,0x14(s0)
lw v1,0x50(s1)
lwr v0,0x17(s0)
bne v1,v0,0x00027f4c
_li v0,0x1
sw t7,0x0(s4)
lwl v1,0x4(s0)
lwr v1,0x7(s0)
b 0x00027f50
_sw v1,0x0(s3)
(translation_unit "undefined4 FUN_00027edc(int param_1,int *param_2,int *param_3,undefined4 param_4,int *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8);\n  if (iVar1 == 0) {\n    iVar1 = *param_5;\n    iVar2 = param_1 + 0x4c;\n    if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00027edc(int param_1,int *param_2,int *param_3,undefined4 param_4,int *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8);\n  if (iVar1 == 0) {\n    iVar1 = *param_5;\n    iVar2 = param_1 + 0x4c;\n    if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00027edc(int param_1,int *param_2,int *param_3,undefined4 param_4,int *param_5)" identifier (parameter_list "(int param_1,int *param_2,int *param_3,undefined4 param_4,int *param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "int *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8);\n  if (iVar1 == 0) {\n    iVar1 = *param_5;\n    iVar2 = param_1 + 0x4c;\n    if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8);" (assignment_expression "iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8)" identifier = (call_expression "(*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8)" (parenthesized_expression "(*(code *)PTR_memcmp_0015ba1c)" ( (pointer_expression "*(code *)PTR_memcmp_0015ba1c" * (cast_expression "(code *)PTR_memcmp_0015ba1c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1 + 0x54,param_5 + 2,8)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) , (binary_expression "param_5 + 2" identifier + number_literal) , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n    iVar1 = *param_5;\n    iVar2 = param_1 + 0x4c;\n    if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = *param_5;\n    iVar2 = param_1 + 0x4c;\n    if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }\n  }" { (expression_statement "iVar1 = *param_5;" (assignment_expression "iVar1 = *param_5" identifier = (pointer_expression "*param_5" * identifier)) ;) (expression_statement "iVar2 = param_1 + 0x4c;" (assignment_expression "iVar2 = param_1 + 0x4c" identifier = (binary_expression "param_1 + 0x4c" identifier + number_literal)) ;) (if_statement "if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }" { (expression_statement "uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');" (assignment_expression "uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01')" identifier = (call_expression "(uint)(*(char *)(param_1 + 0x41) == '\x01')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(char *)(param_1 + 0x41) == '\x01')" ( (binary_expression "*(char *)(param_1 + 0x41) == '\x01'" (pointer_expression "*(char *)(param_1 + 0x41)" * (cast_expression "(char *)(param_1 + 0x41)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x41)" ( (binary_expression "param_1 + 0x41" identifier + number_literal) )))) == (char_literal "'\x01'" ' escape_sequence ')) )))) ;) (expression_statement "FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);" (call_expression "FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2)" identifier (argument_list "(uVar3,param_5,8,iVar2,iVar2)" ( identifier , identifier , number_literal , identifier , identifier ))) ;) (expression_statement "FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);" (call_expression "FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2)" identifier (argument_list "(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2)" ( identifier , identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x24)" * (cast_expression "(undefined4 *)(param_1 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) , identifier , identifier ))) ;) (if_statement "if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }" if (parenthesized_expression "(*(int *)(param_1 + 0x4c) != param_5[4])" ( (binary_expression "*(int *)(param_1 + 0x4c) != param_5[4]" (pointer_expression "*(int *)(param_1 + 0x4c)" * (cast_expression "(int *)(param_1 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c)" ( (binary_expression "param_1 + 0x4c" identifier + number_literal) )))) != (subscript_expression "param_5[4]" identifier [ number_literal ])) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }" if (parenthesized_expression "(*(int *)(param_1 + 0x50) == param_5[5])" ( (binary_expression "*(int *)(param_1 + 0x50) == param_5[5]" (pointer_expression "*(int *)(param_1 + 0x50)" * (cast_expression "(int *)(param_1 + 0x50)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) == (subscript_expression "param_5[5]" identifier [ number_literal ])) )) (compound_statement "{\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }" { (expression_statement "*param_2 = iVar1;" (assignment_expression "*param_2 = iVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "*param_3 = param_5[1];" (assignment_expression "*param_3 = param_5[1]" (pointer_expression "*param_3" * identifier) = (subscript_expression "param_5[1]" identifier [ number_literal ])) ;) (return_statement "return 1;" return number_literal ;) })) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int walDecodeFrame(Wal *pWal,u32 *piPage,u32 *pnTruncate,u8 *aData,u8 *aFrame)\n\n{\n  int iVar1;\n  u32 uVar2;\n  u32 *aIn;\n  uint nativeCksum;\n  \n  iVar1 = (*(code *)PTR_memcmp_0015ba1c)((pWal->hdr).aSalt,aFrame + 8,8);\n  if (iVar1 == 0) {\n    uVar2 = *(u32 *)aFrame;\n    aIn = (pWal->hdr).aFrameCksum;\n    if (uVar2 != 0) {\n      nativeCksum = (uint)((pWal->hdr).bigEndCksum == '\x01');\n      walChecksumBytes(nativeCksum,aFrame,8,aIn,aIn);\n      walChecksumBytes(nativeCksum,aData,pWal->szPage,aIn,aIn);\n      if ((pWal->hdr).aFrameCksum[0] != *(u32 *)(aFrame + 0x10)) {\n        return 0;\n      }\n      if ((pWal->hdr).aFrameCksum[1] == *(u32 *)(aFrame + 0x14)) {\n        *piPage = uVar2;\n        *pnTruncate = *(u32 *)(aFrame + 4);\n        return 1;\n      }\n    }\n  }\n  return 0;\n}\n\n" (function_definition "int walDecodeFrame(Wal *pWal,u32 *piPage,u32 *pnTruncate,u8 *aData,u8 *aFrame)\n\n{\n  int iVar1;\n  u32 uVar2;\n  u32 *aIn;\n  uint nativeCksum;\n  \n  iVar1 = (*(code *)PTR_memcmp_0015ba1c)((pWal->hdr).aSalt,aFrame + 8,8);\n  if (iVar1 == 0) {\n    uVar2 = *(u32 *)aFrame;\n    aIn = (pWal->hdr).aFrameCksum;\n    if (uVar2 != 0) {\n      nativeCksum = (uint)((pWal->hdr).bigEndCksum == '\x01');\n      walChecksumBytes(nativeCksum,aFrame,8,aIn,aIn);\n      walChecksumBytes(nativeCksum,aData,pWal->szPage,aIn,aIn);\n      if ((pWal->hdr).aFrameCksum[0] != *(u32 *)(aFrame + 0x10)) {\n        return 0;\n      }\n      if ((pWal->hdr).aFrameCksum[1] == *(u32 *)(aFrame + 0x14)) {\n        *piPage = uVar2;\n        *pnTruncate = *(u32 *)(aFrame + 4);\n        return 1;\n      }\n    }\n  }\n  return 0;\n}" primitive_type (function_declarator "walDecodeFrame(Wal *pWal,u32 *piPage,u32 *pnTruncate,u8 *aData,u8 *aFrame)" identifier (parameter_list "(Wal *pWal,u32 *piPage,u32 *pnTruncate,u8 *aData,u8 *aFrame)" ( (parameter_declaration "Wal *pWal" type_identifier (pointer_declarator "*pWal" * identifier)) , (parameter_declaration "u32 *piPage" type_identifier (pointer_declarator "*piPage" * identifier)) , (parameter_declaration "u32 *pnTruncate" type_identifier (pointer_declarator "*pnTruncate" * identifier)) , (parameter_declaration "u8 *aData" type_identifier (pointer_declarator "*aData" * identifier)) , (parameter_declaration "u8 *aFrame" type_identifier (pointer_declarator "*aFrame" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  u32 uVar2;\n  u32 *aIn;\n  uint nativeCksum;\n  \n  iVar1 = (*(code *)PTR_memcmp_0015ba1c)((pWal->hdr).aSalt,aFrame + 8,8);\n  if (iVar1 == 0) {\n    uVar2 = *(u32 *)aFrame;\n    aIn = (pWal->hdr).aFrameCksum;\n    if (uVar2 != 0) {\n      nativeCksum = (uint)((pWal->hdr).bigEndCksum == '\x01');\n      walChecksumBytes(nativeCksum,aFrame,8,aIn,aIn);\n      walChecksumBytes(nativeCksum,aData,pWal->szPage,aIn,aIn);\n      if ((pWal->hdr).aFrameCksum[0] != *(u32 *)(aFrame + 0x10)) {\n        return 0;\n      }\n      if ((pWal->hdr).aFrameCksum[1] == *(u32 *)(aFrame + 0x14)) {\n        *piPage = uVar2;\n        *pnTruncate = *(u32 *)(aFrame + 4);\n        return 1;\n      }\n    }\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "u32 uVar2;" type_identifier identifier ;) (declaration "u32 *aIn;" type_identifier (pointer_declarator "*aIn" * identifier) ;) (declaration "uint nativeCksum;" type_identifier identifier ;) (expression_statement "iVar1 = (*(code *)PTR_memcmp_0015ba1c)((pWal->hdr).aSalt,aFrame + 8,8);" (assignment_expression "iVar1 = (*(code *)PTR_memcmp_0015ba1c)((pWal->hdr).aSalt,aFrame + 8,8)" identifier = (call_expression "(*(code *)PTR_memcmp_0015ba1c)((pWal->hdr).aSalt,aFrame + 8,8)" (parenthesized_expression "(*(code *)PTR_memcmp_0015ba1c)" ( (pointer_expression "*(code *)PTR_memcmp_0015ba1c" * (cast_expression "(code *)PTR_memcmp_0015ba1c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "((pWal->hdr).aSalt,aFrame + 8,8)" ( (field_expression "(pWal->hdr).aSalt" (parenthesized_expression "(pWal->hdr)" ( (field_expression "pWal->hdr" identifier -> field_identifier) )) . field_identifier) , (binary_expression "aFrame + 8" identifier + number_literal) , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n    uVar2 = *(u32 *)aFrame;\n    aIn = (pWal->hdr).aFrameCksum;\n    if (uVar2 != 0) {\n      nativeCksum = (uint)((pWal->hdr).bigEndCksum == '\x01');\n      walChecksumBytes(nativeCksum,aFrame,8,aIn,aIn);\n      walChecksumBytes(nativeCksum,aData,pWal->szPage,aIn,aIn);\n      if ((pWal->hdr).aFrameCksum[0] != *(u32 *)(aFrame + 0x10)) {\n        return 0;\n      }\n      if ((pWal->hdr).aFrameCksum[1] == *(u32 *)(aFrame + 0x14)) {\n        *piPage = uVar2;\n        *pnTruncate = *(u32 *)(aFrame + 4);\n        return 1;\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar2 = *(u32 *)aFrame;\n    aIn = (pWal->hdr).aFrameCksum;\n    if (uVar2 != 0) {\n      nativeCksum = (uint)((pWal->hdr).bigEndCksum == '\x01');\n      walChecksumBytes(nativeCksum,aFrame,8,aIn,aIn);\n      walChecksumBytes(nativeCksum,aData,pWal->szPage,aIn,aIn);\n      if ((pWal->hdr).aFrameCksum[0] != *(u32 *)(aFrame + 0x10)) {\n        return 0;\n      }\n      if ((pWal->hdr).aFrameCksum[1] == *(u32 *)(aFrame + 0x14)) {\n        *piPage = uVar2;\n        *pnTruncate = *(u32 *)(aFrame + 4);\n        return 1;\n      }\n    }\n  }" { (expression_statement "uVar2 = *(u32 *)aFrame;" (assignment_expression "uVar2 = *(u32 *)aFrame" identifier = (pointer_expression "*(u32 *)aFrame" * (cast_expression "(u32 *)aFrame" ( (type_descriptor "u32 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "aIn = (pWal->hdr).aFrameCksum;" (assignment_expression "aIn = (pWal->hdr).aFrameCksum" identifier = (field_expression "(pWal->hdr).aFrameCksum" (parenthesized_expression "(pWal->hdr)" ( (field_expression "pWal->hdr" identifier -> field_identifier) )) . field_identifier)) ;) (if_statement "if (uVar2 != 0) {\n      nativeCksum = (uint)((pWal->hdr).bigEndCksum == '\x01');\n      walChecksumBytes(nativeCksum,aFrame,8,aIn,aIn);\n      walChecksumBytes(nativeCksum,aData,pWal->szPage,aIn,aIn);\n      if ((pWal->hdr).aFrameCksum[0] != *(u32 *)(aFrame + 0x10)) {\n        return 0;\n      }\n      if ((pWal->hdr).aFrameCksum[1] == *(u32 *)(aFrame + 0x14)) {\n        *piPage = uVar2;\n        *pnTruncate = *(u32 *)(aFrame + 4);\n        return 1;\n      }\n    }" if (parenthesized_expression "(uVar2 != 0)" ( (binary_expression "uVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      nativeCksum = (uint)((pWal->hdr).bigEndCksum == '\x01');\n      walChecksumBytes(nativeCksum,aFrame,8,aIn,aIn);\n      walChecksumBytes(nativeCksum,aData,pWal->szPage,aIn,aIn);\n      if ((pWal->hdr).aFrameCksum[0] != *(u32 *)(aFrame + 0x10)) {\n        return 0;\n      }\n      if ((pWal->hdr).aFrameCksum[1] == *(u32 *)(aFrame + 0x14)) {\n        *piPage = uVar2;\n        *pnTruncate = *(u32 *)(aFrame + 4);\n        return 1;\n      }\n    }" { (expression_statement "nativeCksum = (uint)((pWal->hdr).bigEndCksum == '\x01');" (assignment_expression "nativeCksum = (uint)((pWal->hdr).bigEndCksum == '\x01')" identifier = (call_expression "(uint)((pWal->hdr).bigEndCksum == '\x01')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((pWal->hdr).bigEndCksum == '\x01')" ( (binary_expression "(pWal->hdr).bigEndCksum == '\x01'" (field_expression "(pWal->hdr).bigEndCksum" (parenthesized_expression "(pWal->hdr)" ( (field_expression "pWal->hdr" identifier -> field_identifier) )) . field_identifier) == (char_literal "'\x01'" ' escape_sequence ')) )))) ;) (expression_statement "walChecksumBytes(nativeCksum,aFrame,8,aIn,aIn);" (call_expression "walChecksumBytes(nativeCksum,aFrame,8,aIn,aIn)" identifier (argument_list "(nativeCksum,aFrame,8,aIn,aIn)" ( identifier , identifier , number_literal , identifier , identifier ))) ;) (expression_statement "walChecksumBytes(nativeCksum,aData,pWal->szPage,aIn,aIn);" (call_expression "walChecksumBytes(nativeCksum,aData,pWal->szPage,aIn,aIn)" identifier (argument_list "(nativeCksum,aData,pWal->szPage,aIn,aIn)" ( identifier , identifier , (field_expression "pWal->szPage" identifier -> field_identifier) , identifier , identifier ))) ;) (if_statement "if ((pWal->hdr).aFrameCksum[0] != *(u32 *)(aFrame + 0x10)) {\n        return 0;\n      }" if (parenthesized_expression "((pWal->hdr).aFrameCksum[0] != *(u32 *)(aFrame + 0x10))" ( (binary_expression "(pWal->hdr).aFrameCksum[0] != *(u32 *)(aFrame + 0x10)" (subscript_expression "(pWal->hdr).aFrameCksum[0]" (field_expression "(pWal->hdr).aFrameCksum" (parenthesized_expression "(pWal->hdr)" ( (field_expression "pWal->hdr" identifier -> field_identifier) )) . field_identifier) [ number_literal ]) != (pointer_expression "*(u32 *)(aFrame + 0x10)" * (cast_expression "(u32 *)(aFrame + 0x10)" ( (type_descriptor "u32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(aFrame + 0x10)" ( (binary_expression "aFrame + 0x10" identifier + number_literal) ))))) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((pWal->hdr).aFrameCksum[1] == *(u32 *)(aFrame + 0x14)) {\n        *piPage = uVar2;\n        *pnTruncate = *(u32 *)(aFrame + 4);\n        return 1;\n      }" if (parenthesized_expression "((pWal->hdr).aFrameCksum[1] == *(u32 *)(aFrame + 0x14))" ( (binary_expression "(pWal->hdr).aFrameCksum[1] == *(u32 *)(aFrame + 0x14)" (subscript_expression "(pWal->hdr).aFrameCksum[1]" (field_expression "(pWal->hdr).aFrameCksum" (parenthesized_expression "(pWal->hdr)" ( (field_expression "pWal->hdr" identifier -> field_identifier) )) . field_identifier) [ number_literal ]) == (pointer_expression "*(u32 *)(aFrame + 0x14)" * (cast_expression "(u32 *)(aFrame + 0x14)" ( (type_descriptor "u32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(aFrame + 0x14)" ( (binary_expression "aFrame + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n        *piPage = uVar2;\n        *pnTruncate = *(u32 *)(aFrame + 4);\n        return 1;\n      }" { (expression_statement "*piPage = uVar2;" (assignment_expression "*piPage = uVar2" (pointer_expression "*piPage" * identifier) = identifier) ;) (expression_statement "*pnTruncate = *(u32 *)(aFrame + 4);" (assignment_expression "*pnTruncate = *(u32 *)(aFrame + 4)" (pointer_expression "*pnTruncate" * identifier) = (pointer_expression "*(u32 *)(aFrame + 4)" * (cast_expression "(u32 *)(aFrame + 4)" ( (type_descriptor "u32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(aFrame + 4)" ( (binary_expression "aFrame + 4" identifier + number_literal) ))))) ;) (return_statement "return 1;" return number_literal ;) })) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_00027edc(int param_1,int *param_2,int *param_3,undefined4 param_4,int *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8);\n  if (iVar1 == 0) {\n    iVar1 = *param_5;\n    iVar2 = param_1 + 0x4c;\n    if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00027edc(int param_1,int *param_2,int *param_3,undefined4 param_4,int *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8);\n  if (iVar1 == 0) {\n    iVar1 = *param_5;\n    iVar2 = param_1 + 0x4c;\n    if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00027edc(int param_1,int *param_2,int *param_3,undefined4 param_4,int *param_5)" identifier (parameter_list "(int param_1,int *param_2,int *param_3,undefined4 param_4,int *param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "int *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8);\n  if (iVar1 == 0) {\n    iVar1 = *param_5;\n    iVar2 = param_1 + 0x4c;\n    if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8);" (assignment_expression "iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8)" identifier = (call_expression "(*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8)" (parenthesized_expression "(*(code *)PTR_memcmp_0015ba1c)" ( (pointer_expression "*(code *)PTR_memcmp_0015ba1c" * (cast_expression "(code *)PTR_memcmp_0015ba1c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1 + 0x54,param_5 + 2,8)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) , (binary_expression "param_5 + 2" identifier + number_literal) , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n    iVar1 = *param_5;\n    iVar2 = param_1 + 0x4c;\n    if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = *param_5;\n    iVar2 = param_1 + 0x4c;\n    if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }\n  }" { (expression_statement "iVar1 = *param_5;" (assignment_expression "iVar1 = *param_5" identifier = (pointer_expression "*param_5" * identifier)) ;) (expression_statement "iVar2 = param_1 + 0x4c;" (assignment_expression "iVar2 = param_1 + 0x4c" identifier = (binary_expression "param_1 + 0x4c" identifier + number_literal)) ;) (if_statement "if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }" { (expression_statement "uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');" (assignment_expression "uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01')" identifier = (call_expression "(uint)(*(char *)(param_1 + 0x41) == '\x01')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(char *)(param_1 + 0x41) == '\x01')" ( (binary_expression "*(char *)(param_1 + 0x41) == '\x01'" (pointer_expression "*(char *)(param_1 + 0x41)" * (cast_expression "(char *)(param_1 + 0x41)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x41)" ( (binary_expression "param_1 + 0x41" identifier + number_literal) )))) == (char_literal "'\x01'" ' escape_sequence ')) )))) ;) (expression_statement "FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);" (call_expression "FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2)" identifier (argument_list "(uVar3,param_5,8,iVar2,iVar2)" ( identifier , identifier , number_literal , identifier , identifier ))) ;) (expression_statement "FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);" (call_expression "FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2)" identifier (argument_list "(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2)" ( identifier , identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x24)" * (cast_expression "(undefined4 *)(param_1 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) , identifier , identifier ))) ;) (if_statement "if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }" if (parenthesized_expression "(*(int *)(param_1 + 0x4c) != param_5[4])" ( (binary_expression "*(int *)(param_1 + 0x4c) != param_5[4]" (pointer_expression "*(int *)(param_1 + 0x4c)" * (cast_expression "(int *)(param_1 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c)" ( (binary_expression "param_1 + 0x4c" identifier + number_literal) )))) != (subscript_expression "param_5[4]" identifier [ number_literal ])) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }" if (parenthesized_expression "(*(int *)(param_1 + 0x50) == param_5[5])" ( (binary_expression "*(int *)(param_1 + 0x50) == param_5[5]" (pointer_expression "*(int *)(param_1 + 0x50)" * (cast_expression "(int *)(param_1 + 0x50)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) == (subscript_expression "param_5[5]" identifier [ number_literal ])) )) (compound_statement "{\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }" { (expression_statement "*param_2 = iVar1;" (assignment_expression "*param_2 = iVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "*param_3 = param_5[1];" (assignment_expression "*param_3 = param_5[1]" (pointer_expression "*param_3" * identifier) = (subscript_expression "param_5[1]" identifier [ number_literal ])) ;) (return_statement "return 1;" return number_literal ;) })) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (subscript_expression IDENT [ LIT ])) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (subscript_expression IDENT [ LIT ])) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ LIT ])) ;) (return_statement return LIT ;) })) })) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00027edc(int param_1,int *param_2,int *param_3,undefined4 param_4,int *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8);\n  if (iVar1 == 0) {\n    iVar1 = *param_5;\n    iVar2 = param_1 + 0x4c;\n    if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_00027edc(int param_1,int *param_2,int *param_3,undefined4 param_4,int *param_5)" (identifier "FUN_00027edc") (parameter_list "(int param_1,int *param_2,int *param_3,undefined4 param_4,int *param_5)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "int *param_5" (primitive_type "int") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8);\n  if (iVar1 == 0) {\n    iVar1 = *param_5;\n    iVar2 = param_1 + 0x4c;\n    if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (expression_statement "iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8);" (assignment_expression "iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8)" (parenthesized_expression "(*(code *)PTR_memcmp_0015ba1c)" (( "(") (pointer_expression "*(code *)PTR_memcmp_0015ba1c" (* "*") (cast_expression "(code *)PTR_memcmp_0015ba1c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcmp_0015ba1c"))) () ")")) (argument_list "(param_1 + 0x54,param_5 + 2,8)" (( "(") (binary_expression "param_1 + 0x54" (identifier "param_1") (+ "+") (number_literal "0x54")) (, ",") (binary_expression "param_5 + 2" (identifier "param_5") (+ "+") (number_literal "2")) (, ",") (number_literal "8") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    iVar1 = *param_5;\n    iVar2 = param_1 + 0x4c;\n    if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = *param_5;\n    iVar2 = param_1 + 0x4c;\n    if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }\n  }" ({ "{") (expression_statement "iVar1 = *param_5;" (assignment_expression "iVar1 = *param_5" (identifier "iVar1") (= "=") (pointer_expression "*param_5" (* "*") (identifier "param_5"))) (; ";")) (expression_statement "iVar2 = param_1 + 0x4c;" (assignment_expression "iVar2 = param_1 + 0x4c" (identifier "iVar2") (= "=") (binary_expression "param_1 + 0x4c" (identifier "param_1") (+ "+") (number_literal "0x4c"))) (; ";")) (if_statement "if (iVar1 != 0) {\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');\n      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);\n      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);\n      if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }\n      if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }\n    }" ({ "{") (expression_statement "uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');" (assignment_expression "uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01')" (identifier "uVar3") (= "=") (call_expression "(uint)(*(char *)(param_1 + 0x41) == '\x01')" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*(char *)(param_1 + 0x41) == '\x01')" (( "(") (binary_expression "*(char *)(param_1 + 0x41) == '\x01'" (pointer_expression "*(char *)(param_1 + 0x41)" (* "*") (cast_expression "(char *)(param_1 + 0x41)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x41)" (( "(") (binary_expression "param_1 + 0x41" (identifier "param_1") (+ "+") (number_literal "0x41")) () ")")))) (== "==") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) () ")")))) (; ";")) (expression_statement "FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);" (call_expression "FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2)" (identifier "FUN_0001e3e4") (argument_list "(uVar3,param_5,8,iVar2,iVar2)" (( "(") (identifier "uVar3") (, ",") (identifier "param_5") (, ",") (number_literal "8") (, ",") (identifier "iVar2") (, ",") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);" (call_expression "FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2)" (identifier "FUN_0001e3e4") (argument_list "(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2)" (( "(") (identifier "uVar3") (, ",") (identifier "param_4") (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x24)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x24)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (, ",") (identifier "iVar2") (, ",") (identifier "iVar2") () ")"))) (; ";")) (if_statement "if (*(int *)(param_1 + 0x4c) != param_5[4]) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x4c) != param_5[4])" (( "(") (binary_expression "*(int *)(param_1 + 0x4c) != param_5[4]" (pointer_expression "*(int *)(param_1 + 0x4c)" (* "*") (cast_expression "(int *)(param_1 + 0x4c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4c)" (( "(") (binary_expression "param_1 + 0x4c" (identifier "param_1") (+ "+") (number_literal "0x4c")) () ")")))) (!= "!=") (subscript_expression "param_5[4]" (identifier "param_5") ([ "[") (number_literal "4") (] "]"))) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (*(int *)(param_1 + 0x50) == param_5[5]) {\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x50) == param_5[5])" (( "(") (binary_expression "*(int *)(param_1 + 0x50) == param_5[5]" (pointer_expression "*(int *)(param_1 + 0x50)" (* "*") (cast_expression "(int *)(param_1 + 0x50)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")")))) (== "==") (subscript_expression "param_5[5]" (identifier "param_5") ([ "[") (number_literal "5") (] "]"))) () ")")) (compound_statement "{\n        *param_2 = iVar1;\n        *param_3 = param_5[1];\n        return 1;\n      }" ({ "{") (expression_statement "*param_2 = iVar1;" (assignment_expression "*param_2 = iVar1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "*param_3 = param_5[1];" (assignment_expression "*param_3 = param_5[1]" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (subscript_expression "param_5[1]" (identifier "param_5") ([ "[") (number_literal "1") (] "]"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}"))) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

int function_1(type_1 *pWal,type_2 *piPage,type_2 *pnTruncate,type_3 *aData,type_3 *var_1)

{
  int var_2;
  type_2 var_3;
  type_2 *aIn;
  type_4 nativeCksum;
  
  var_2 = (*(type_5 *)PTR_memcmp_0015ba1c)((pWal->hdr).aSalt,var_1 + 8,8);
  if (var_2 == 0) {
    var_3 = *(type_2 *)var_1;
    aIn = (pWal->hdr).aFrameCksum;
    if (var_3 != 0) {
      nativeCksum = (type_4)((pWal->hdr).bigEndCksum == '\x01');
      var_4(nativeCksum,var_1,8,aIn,aIn);
      var_4(nativeCksum,aData,pWal->szPage,aIn,aIn);
      if ((pWal->hdr).aFrameCksum[0] != *(type_2 *)(var_1 + 0x10)) {
        return 0;
      }
      if ((pWal->hdr).aFrameCksum[1] == *(type_2 *)(var_1 + 0x14)) {
        *piPage = var_3;
        *pnTruncate = *(type_2 *)(var_1 + 4);
        return 1;
      }
    }
  }
  return 0;
}


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

undefined4 MASKED(int param_1,int *param_2,int *param_3,undefined4 param_4,int *param_5)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  
  iVar1 = (*(code *)PTR_memcmp_0015ba1c)(param_1 + 0x54,param_5 + 2,8);
  if (iVar1 == 0) {
    iVar1 = *param_5;
    iVar2 = param_1 + 0x4c;
    if (iVar1 != 0) {
      uVar3 = (uint)(*(char *)(param_1 + 0x41) == '\x01');
      FUN_0001e3e4(uVar3,param_5,8,iVar2,iVar2);
      FUN_0001e3e4(uVar3,param_4,*(undefined4 *)(param_1 + 0x24),iVar2,iVar2);
      if (*(int *)(param_1 + 0x4c) != param_5[4]) {
        return 0;
      }
      if (*(int *)(param_1 + 0x50) == param_5[5]) {
        *param_2 = iVar1;
        *param_3 = param_5[1];
        return 1;
      }
    }
  }
  return 0;
}

