
png_uint_32
png_get_sCAL_s(png_const_structrp png_ptr,png_const_inforp info_ptr,int *unit,png_charpp width,
              png_charpp height)

{
  png_charp pcVar1;
  
  if ((png_ptr != (png_const_structrp)0x0) && (info_ptr != (png_const_inforp)0x0)) {
    if ((info_ptr->valid & 0x4000) == 0) {
      return 0;
    }
    *unit = (uint)info_ptr->scal_unit;
    pcVar1 = info_ptr->scal_s_height;
    *width = info_ptr->scal_s_width;
    *height = pcVar1;
    return 0x4000;
  }
  return 0;
}



undefined4
png_get_sCAL_s(int param_1,int param_2,uint *param_3,undefined4 *param_4,undefined4 *param_5)

{
  undefined4 uVar1;
  
  if ((param_1 != 0) && (param_2 != 0)) {
    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {
      return 0;
    }
    *param_3 = (uint)*(byte *)(param_2 + 0x108);
    uVar1 = *(undefined4 *)(param_2 + 0x110);
    *param_4 = *(undefined4 *)(param_2 + 0x10c);
    *param_5 = uVar1;
    return 0x4000;
  }
  return 0;
}


MOV EAX,dword ptr [ESP + 0x4]
MOV EDX,dword ptr [ESP + 0x8]
TEST EAX,EAX
JZ 0x0001b7b0
TEST EDX,EDX
JZ 0x0001b7b0
MOV EAX,dword ptr [EDX + 0x8]
AND EAX,0x4000
JNZ 0x0001b7b8
RET
XOR EAX,EAX
RET
MOVZX ECX,byte ptr [EDX + 0x108]
MOV EAX,dword ptr [ESP + 0xc]
MOV dword ptr [EAX],ECX
MOV ECX,dword ptr [EDX + 0x10c]
MOV EAX,dword ptr [ESP + 0x10]
MOV EDX,dword ptr [EDX + 0x110]
MOV dword ptr [EAX],ECX
MOV EAX,dword ptr [ESP + 0x14]
MOV dword ptr [EAX],EDX
MOV EAX,0x4000
RET
(translation_unit "undefined4\npng_get_sCAL_s(int param_1,int param_2,uint *param_3,undefined4 *param_4,undefined4 *param_5)\n\n{\n  undefined4 uVar1;\n  \n  if ((param_1 != 0) && (param_2 != 0)) {\n    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }\n    *param_3 = (uint)*(byte *)(param_2 + 0x108);\n    uVar1 = *(undefined4 *)(param_2 + 0x110);\n    *param_4 = *(undefined4 *)(param_2 + 0x10c);\n    *param_5 = uVar1;\n    return 0x4000;\n  }\n  return 0;\n}\n\n" (function_definition "undefined4\npng_get_sCAL_s(int param_1,int param_2,uint *param_3,undefined4 *param_4,undefined4 *param_5)\n\n{\n  undefined4 uVar1;\n  \n  if ((param_1 != 0) && (param_2 != 0)) {\n    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }\n    *param_3 = (uint)*(byte *)(param_2 + 0x108);\n    uVar1 = *(undefined4 *)(param_2 + 0x110);\n    *param_4 = *(undefined4 *)(param_2 + 0x10c);\n    *param_5 = uVar1;\n    return 0x4000;\n  }\n  return 0;\n}" type_identifier (function_declarator "png_get_sCAL_s(int param_1,int param_2,uint *param_3,undefined4 *param_4,undefined4 *param_5)" identifier (parameter_list "(int param_1,int param_2,uint *param_3,undefined4 *param_4,undefined4 *param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined4 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if ((param_1 != 0) && (param_2 != 0)) {\n    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }\n    *param_3 = (uint)*(byte *)(param_2 + 0x108);\n    uVar1 = *(undefined4 *)(param_2 + 0x110);\n    *param_4 = *(undefined4 *)(param_2 + 0x10c);\n    *param_5 = uVar1;\n    return 0x4000;\n  }\n  return 0;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if ((param_1 != 0) && (param_2 != 0)) {\n    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }\n    *param_3 = (uint)*(byte *)(param_2 + 0x108);\n    uVar1 = *(undefined4 *)(param_2 + 0x110);\n    *param_4 = *(undefined4 *)(param_2 + 0x10c);\n    *param_5 = uVar1;\n    return 0x4000;\n  }" if (parenthesized_expression "((param_1 != 0) && (param_2 != 0))" ( (binary_expression "(param_1 != 0) && (param_2 != 0)" (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) && (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }\n    *param_3 = (uint)*(byte *)(param_2 + 0x108);\n    uVar1 = *(undefined4 *)(param_2 + 0x110);\n    *param_4 = *(undefined4 *)(param_2 + 0x10c);\n    *param_5 = uVar1;\n    return 0x4000;\n  }" { (if_statement "if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }" if (parenthesized_expression "((*(uint *)(param_2 + 8) & 0x4000) == 0)" ( (binary_expression "(*(uint *)(param_2 + 8) & 0x4000) == 0" (parenthesized_expression "(*(uint *)(param_2 + 8) & 0x4000)" ( (binary_expression "*(uint *)(param_2 + 8) & 0x4000" (pointer_expression "*(uint *)(param_2 + 8)" * (cast_expression "(uint *)(param_2 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "*param_3 = (uint)*(byte *)(param_2 + 0x108);" (assignment_expression "*param_3 = (uint)*(byte *)(param_2 + 0x108)" (pointer_expression "*param_3" * identifier) = (binary_expression "(uint)*(byte *)(param_2 + 0x108)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(param_2 + 0x108)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x108)" ( (binary_expression "param_2 + 0x108" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = *(undefined4 *)(param_2 + 0x110);" (assignment_expression "uVar1 = *(undefined4 *)(param_2 + 0x110)" identifier = (pointer_expression "*(undefined4 *)(param_2 + 0x110)" * (cast_expression "(undefined4 *)(param_2 + 0x110)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x110)" ( (binary_expression "param_2 + 0x110" identifier + number_literal) ))))) ;) (expression_statement "*param_4 = *(undefined4 *)(param_2 + 0x10c);" (assignment_expression "*param_4 = *(undefined4 *)(param_2 + 0x10c)" (pointer_expression "*param_4" * identifier) = (pointer_expression "*(undefined4 *)(param_2 + 0x10c)" * (cast_expression "(undefined4 *)(param_2 + 0x10c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10c)" ( (binary_expression "param_2 + 0x10c" identifier + number_literal) ))))) ;) (expression_statement "*param_5 = uVar1;" (assignment_expression "*param_5 = uVar1" (pointer_expression "*param_5" * identifier) = identifier) ;) (return_statement "return 0x4000;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "png_uint_32\npng_get_sCAL_s(png_const_structrp png_ptr,png_const_inforp info_ptr,int *unit,png_charpp width,\n              png_charpp height)\n\n{\n  png_charp pcVar1;\n  \n  if ((png_ptr != (png_const_structrp)0x0) && (info_ptr != (png_const_inforp)0x0)) {\n    if ((info_ptr->valid & 0x4000) == 0) {\n      return 0;\n    }\n    *unit = (uint)info_ptr->scal_unit;\n    pcVar1 = info_ptr->scal_s_height;\n    *width = info_ptr->scal_s_width;\n    *height = pcVar1;\n    return 0x4000;\n  }\n  return 0;\n}\n\n" (function_definition "png_uint_32\npng_get_sCAL_s(png_const_structrp png_ptr,png_const_inforp info_ptr,int *unit,png_charpp width,\n              png_charpp height)\n\n{\n  png_charp pcVar1;\n  \n  if ((png_ptr != (png_const_structrp)0x0) && (info_ptr != (png_const_inforp)0x0)) {\n    if ((info_ptr->valid & 0x4000) == 0) {\n      return 0;\n    }\n    *unit = (uint)info_ptr->scal_unit;\n    pcVar1 = info_ptr->scal_s_height;\n    *width = info_ptr->scal_s_width;\n    *height = pcVar1;\n    return 0x4000;\n  }\n  return 0;\n}" type_identifier (function_declarator "png_get_sCAL_s(png_const_structrp png_ptr,png_const_inforp info_ptr,int *unit,png_charpp width,\n              png_charpp height)" identifier (parameter_list "(png_const_structrp png_ptr,png_const_inforp info_ptr,int *unit,png_charpp width,\n              png_charpp height)" ( (parameter_declaration "png_const_structrp png_ptr" type_identifier identifier) , (parameter_declaration "png_const_inforp info_ptr" type_identifier identifier) , (parameter_declaration "int *unit" primitive_type (pointer_declarator "*unit" * identifier)) , (parameter_declaration "png_charpp width" type_identifier identifier) , (parameter_declaration "png_charpp height" type_identifier identifier) ))) (compound_statement "{\n  png_charp pcVar1;\n  \n  if ((png_ptr != (png_const_structrp)0x0) && (info_ptr != (png_const_inforp)0x0)) {\n    if ((info_ptr->valid & 0x4000) == 0) {\n      return 0;\n    }\n    *unit = (uint)info_ptr->scal_unit;\n    pcVar1 = info_ptr->scal_s_height;\n    *width = info_ptr->scal_s_width;\n    *height = pcVar1;\n    return 0x4000;\n  }\n  return 0;\n}" { (declaration "png_charp pcVar1;" type_identifier identifier ;) (if_statement "if ((png_ptr != (png_const_structrp)0x0) && (info_ptr != (png_const_inforp)0x0)) {\n    if ((info_ptr->valid & 0x4000) == 0) {\n      return 0;\n    }\n    *unit = (uint)info_ptr->scal_unit;\n    pcVar1 = info_ptr->scal_s_height;\n    *width = info_ptr->scal_s_width;\n    *height = pcVar1;\n    return 0x4000;\n  }" if (parenthesized_expression "((png_ptr != (png_const_structrp)0x0) && (info_ptr != (png_const_inforp)0x0))" ( (binary_expression "(png_ptr != (png_const_structrp)0x0) && (info_ptr != (png_const_inforp)0x0)" (parenthesized_expression "(png_ptr != (png_const_structrp)0x0)" ( (binary_expression "png_ptr != (png_const_structrp)0x0" identifier != (cast_expression "(png_const_structrp)0x0" ( (type_descriptor "png_const_structrp" type_identifier) ) number_literal)) )) && (parenthesized_expression "(info_ptr != (png_const_inforp)0x0)" ( (binary_expression "info_ptr != (png_const_inforp)0x0" identifier != (cast_expression "(png_const_inforp)0x0" ( (type_descriptor "png_const_inforp" type_identifier) ) number_literal)) ))) )) (compound_statement "{\n    if ((info_ptr->valid & 0x4000) == 0) {\n      return 0;\n    }\n    *unit = (uint)info_ptr->scal_unit;\n    pcVar1 = info_ptr->scal_s_height;\n    *width = info_ptr->scal_s_width;\n    *height = pcVar1;\n    return 0x4000;\n  }" { (if_statement "if ((info_ptr->valid & 0x4000) == 0) {\n      return 0;\n    }" if (parenthesized_expression "((info_ptr->valid & 0x4000) == 0)" ( (binary_expression "(info_ptr->valid & 0x4000) == 0" (parenthesized_expression "(info_ptr->valid & 0x4000)" ( (binary_expression "info_ptr->valid & 0x4000" (field_expression "info_ptr->valid" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "*unit = (uint)info_ptr->scal_unit;" (assignment_expression "*unit = (uint)info_ptr->scal_unit" (pointer_expression "*unit" * identifier) = (cast_expression "(uint)info_ptr->scal_unit" ( (type_descriptor "uint" type_identifier) ) (field_expression "info_ptr->scal_unit" identifier -> field_identifier))) ;) (expression_statement "pcVar1 = info_ptr->scal_s_height;" (assignment_expression "pcVar1 = info_ptr->scal_s_height" identifier = (field_expression "info_ptr->scal_s_height" identifier -> field_identifier)) ;) (expression_statement "*width = info_ptr->scal_s_width;" (assignment_expression "*width = info_ptr->scal_s_width" (pointer_expression "*width" * identifier) = (field_expression "info_ptr->scal_s_width" identifier -> field_identifier)) ;) (expression_statement "*height = pcVar1;" (assignment_expression "*height = pcVar1" (pointer_expression "*height" * identifier) = identifier) ;) (return_statement "return 0x4000;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4\npng_get_sCAL_s(int param_1,int param_2,uint *param_3,undefined4 *param_4,undefined4 *param_5)\n\n{\n  undefined4 uVar1;\n  \n  if ((param_1 != 0) && (param_2 != 0)) {\n    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }\n    *param_3 = (uint)*(byte *)(param_2 + 0x108);\n    uVar1 = *(undefined4 *)(param_2 + 0x110);\n    *param_4 = *(undefined4 *)(param_2 + 0x10c);\n    *param_5 = uVar1;\n    return 0x4000;\n  }\n  return 0;\n}\n\n" (function_definition "undefined4\npng_get_sCAL_s(int param_1,int param_2,uint *param_3,undefined4 *param_4,undefined4 *param_5)\n\n{\n  undefined4 uVar1;\n  \n  if ((param_1 != 0) && (param_2 != 0)) {\n    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }\n    *param_3 = (uint)*(byte *)(param_2 + 0x108);\n    uVar1 = *(undefined4 *)(param_2 + 0x110);\n    *param_4 = *(undefined4 *)(param_2 + 0x10c);\n    *param_5 = uVar1;\n    return 0x4000;\n  }\n  return 0;\n}" type_identifier (function_declarator "png_get_sCAL_s(int param_1,int param_2,uint *param_3,undefined4 *param_4,undefined4 *param_5)" identifier (parameter_list "(int param_1,int param_2,uint *param_3,undefined4 *param_4,undefined4 *param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined4 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if ((param_1 != 0) && (param_2 != 0)) {\n    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }\n    *param_3 = (uint)*(byte *)(param_2 + 0x108);\n    uVar1 = *(undefined4 *)(param_2 + 0x110);\n    *param_4 = *(undefined4 *)(param_2 + 0x10c);\n    *param_5 = uVar1;\n    return 0x4000;\n  }\n  return 0;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if ((param_1 != 0) && (param_2 != 0)) {\n    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }\n    *param_3 = (uint)*(byte *)(param_2 + 0x108);\n    uVar1 = *(undefined4 *)(param_2 + 0x110);\n    *param_4 = *(undefined4 *)(param_2 + 0x10c);\n    *param_5 = uVar1;\n    return 0x4000;\n  }" if (parenthesized_expression "((param_1 != 0) && (param_2 != 0))" ( (binary_expression "(param_1 != 0) && (param_2 != 0)" (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) && (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }\n    *param_3 = (uint)*(byte *)(param_2 + 0x108);\n    uVar1 = *(undefined4 *)(param_2 + 0x110);\n    *param_4 = *(undefined4 *)(param_2 + 0x10c);\n    *param_5 = uVar1;\n    return 0x4000;\n  }" { (if_statement "if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }" if (parenthesized_expression "((*(uint *)(param_2 + 8) & 0x4000) == 0)" ( (binary_expression "(*(uint *)(param_2 + 8) & 0x4000) == 0" (parenthesized_expression "(*(uint *)(param_2 + 8) & 0x4000)" ( (binary_expression "*(uint *)(param_2 + 8) & 0x4000" (pointer_expression "*(uint *)(param_2 + 8)" * (cast_expression "(uint *)(param_2 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "*param_3 = (uint)*(byte *)(param_2 + 0x108);" (assignment_expression "*param_3 = (uint)*(byte *)(param_2 + 0x108)" (pointer_expression "*param_3" * identifier) = (binary_expression "(uint)*(byte *)(param_2 + 0x108)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(param_2 + 0x108)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x108)" ( (binary_expression "param_2 + 0x108" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = *(undefined4 *)(param_2 + 0x110);" (assignment_expression "uVar1 = *(undefined4 *)(param_2 + 0x110)" identifier = (pointer_expression "*(undefined4 *)(param_2 + 0x110)" * (cast_expression "(undefined4 *)(param_2 + 0x110)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x110)" ( (binary_expression "param_2 + 0x110" identifier + number_literal) ))))) ;) (expression_statement "*param_4 = *(undefined4 *)(param_2 + 0x10c);" (assignment_expression "*param_4 = *(undefined4 *)(param_2 + 0x10c)" (pointer_expression "*param_4" * identifier) = (pointer_expression "*(undefined4 *)(param_2 + 0x10c)" * (cast_expression "(undefined4 *)(param_2 + 0x10c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10c)" ( (binary_expression "param_2 + 0x10c" identifier + number_literal) ))))) ;) (expression_statement "*param_5 = uVar1;" (assignment_expression "*param_5 = uVar1" (pointer_expression "*param_5" * identifier) = identifier) ;) (return_statement "return 0x4000;" 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 IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return LIT ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4\npng_get_sCAL_s(int param_1,int param_2,uint *param_3,undefined4 *param_4,undefined4 *param_5)\n\n{\n  undefined4 uVar1;\n  \n  if ((param_1 != 0) && (param_2 != 0)) {\n    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }\n    *param_3 = (uint)*(byte *)(param_2 + 0x108);\n    uVar1 = *(undefined4 *)(param_2 + 0x110);\n    *param_4 = *(undefined4 *)(param_2 + 0x10c);\n    *param_5 = uVar1;\n    return 0x4000;\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "png_get_sCAL_s(int param_1,int param_2,uint *param_3,undefined4 *param_4,undefined4 *param_5)" (identifier "png_get_sCAL_s") (parameter_list "(int param_1,int param_2,uint *param_3,undefined4 *param_4,undefined4 *param_5)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint *param_3" (type_identifier "uint") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "undefined4 *param_4" (type_identifier "undefined4") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "undefined4 *param_5" (type_identifier "undefined4") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if ((param_1 != 0) && (param_2 != 0)) {\n    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }\n    *param_3 = (uint)*(byte *)(param_2 + 0x108);\n    uVar1 = *(undefined4 *)(param_2 + 0x110);\n    *param_4 = *(undefined4 *)(param_2 + 0x10c);\n    *param_5 = uVar1;\n    return 0x4000;\n  }\n  return 0;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (if_statement "if ((param_1 != 0) && (param_2 != 0)) {\n    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }\n    *param_3 = (uint)*(byte *)(param_2 + 0x108);\n    uVar1 = *(undefined4 *)(param_2 + 0x110);\n    *param_4 = *(undefined4 *)(param_2 + 0x10c);\n    *param_5 = uVar1;\n    return 0x4000;\n  }" (if "if") (parenthesized_expression "((param_1 != 0) && (param_2 != 0))" (( "(") (binary_expression "(param_1 != 0) && (param_2 != 0)" (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }\n    *param_3 = (uint)*(byte *)(param_2 + 0x108);\n    uVar1 = *(undefined4 *)(param_2 + 0x110);\n    *param_4 = *(undefined4 *)(param_2 + 0x10c);\n    *param_5 = uVar1;\n    return 0x4000;\n  }" ({ "{") (if_statement "if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "((*(uint *)(param_2 + 8) & 0x4000) == 0)" (( "(") (binary_expression "(*(uint *)(param_2 + 8) & 0x4000) == 0" (parenthesized_expression "(*(uint *)(param_2 + 8) & 0x4000)" (( "(") (binary_expression "*(uint *)(param_2 + 8) & 0x4000" (pointer_expression "*(uint *)(param_2 + 8)" (* "*") (cast_expression "(uint *)(param_2 + 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (& "&") (number_literal "0x4000")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "*param_3 = (uint)*(byte *)(param_2 + 0x108);" (assignment_expression "*param_3 = (uint)*(byte *)(param_2 + 0x108)" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (binary_expression "(uint)*(byte *)(param_2 + 0x108)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(byte *)(param_2 + 0x108)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x108)" (( "(") (binary_expression "param_2 + 0x108" (identifier "param_2") (+ "+") (number_literal "0x108")) () ")"))))) (; ";")) (expression_statement "uVar1 = *(undefined4 *)(param_2 + 0x110);" (assignment_expression "uVar1 = *(undefined4 *)(param_2 + 0x110)" (identifier "uVar1") (= "=") (pointer_expression "*(undefined4 *)(param_2 + 0x110)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0x110)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x110)" (( "(") (binary_expression "param_2 + 0x110" (identifier "param_2") (+ "+") (number_literal "0x110")) () ")"))))) (; ";")) (expression_statement "*param_4 = *(undefined4 *)(param_2 + 0x10c);" (assignment_expression "*param_4 = *(undefined4 *)(param_2 + 0x10c)" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (pointer_expression "*(undefined4 *)(param_2 + 0x10c)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0x10c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10c)" (( "(") (binary_expression "param_2 + 0x10c" (identifier "param_2") (+ "+") (number_literal "0x10c")) () ")"))))) (; ";")) (expression_statement "*param_5 = uVar1;" (assignment_expression "*param_5 = uVar1" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "uVar1")) (; ";")) (return_statement "return 0x4000;" (return "return") (number_literal "0x4000") (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

type_1
function_1(type_2 var_1,type_3 var_2,int *unit,type_4 width,
              type_4 height)

{
  type_5 pcVar1;
  
  if ((var_1 != (type_2)0x0) && (var_2 != (type_3)0x0)) {
    if ((var_2->valid & 0x4000) == 0) {
      return 0;
    }
    *unit = (type_6)var_2->scal_unit;
    pcVar1 = var_2->scal_s_height;
    *width = var_2->scal_s_width;
    *height = pcVar1;
    return 0x4000;
  }
  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: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (parenthesized_expression (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (return_statement (number_literal)))) (return_statement (number_literal)))))

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

{
  undefined4 uVar1;
  
  if ((param_1 != 0) && (param_2 != 0)) {
    if ((*(uint *)(param_2 + 8) & 0x4000) == 0) {
      return 0;
    }
    *param_3 = (uint)*(byte *)(param_2 + 0x108);
    uVar1 = *(undefined4 *)(param_2 + 0x110);
    *param_4 = *(undefined4 *)(param_2 + 0x10c);
    *param_5 = uVar1;
    return 0x4000;
  }
  return 0;
}

