
/* WARNING: Enum "GravityType": Some values do not have unique names */
/* WARNING: Enum "DisposeType": Some values do not have unique names */
/* WARNING: Enum "ChannelType": Some values do not have unique names */
/* WARNING: Enum "PixelChannel": Some values do not have unique names */

int XBMInteger(Image *image,short *hex_digits)

{
  uint uVar1;
  uint uVar2;
  
  uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);
  while( true ) {
    if (uVar1 == 0xffffffff) {
      return -1;
    }
    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;
    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);
  }
  uVar2 = 0;
  while( true ) {
    if (uVar2 < 0x8000000) {
      uVar2 = uVar2 * 0x10;
      if (uVar2 <= 0x7ffffffeU - (int)hex_digits[uVar1 & 0xff]) {
        uVar2 = uVar2 + (int)hex_digits[uVar1 & 0xff];
      }
    }
    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);
    if (uVar1 == 0xffffffff) break;
    if (hex_digits[uVar1] < 0) {
      return uVar2;
    }
  }
  return -1;
}



uint FUN_002d0a50(undefined4 param_1,int param_2)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  
  uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);
  while( true ) {
    if (uVar1 == 0xffffffff) {
      return 0xffffffff;
    }
    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;
    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);
  }
  uVar3 = 0;
  while( true ) {
    if (uVar3 < 0x8000000) {
      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);
      uVar3 = uVar3 * 0x10;
      if (uVar3 <= 0x7ffffffeU - iVar2) {
        uVar3 = uVar3 + iVar2;
      }
    }
    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);
    if (uVar1 == 0xffffffff) break;
    if (*(short *)(param_2 + uVar1 * 2) < 0) {
      return uVar3;
    }
  }
  return 0xffffffff;
}


lui gp,0xe
addiu gp,gp,-0x1a0
addu gp,gp,t9
addiu sp,sp,-0x38
lw t9,-0x70c0(gp)
sw s0,0x1c(sp)
or s0,a0,zero
sw gp,0x10(sp)
or a0,s0,zero
sw s3,0x28(sp)
lui s3,0x80
sw s2,0x24(sp)
li s2,-0x1
sw s1,0x20(sp)
or s1,a1,zero
sw ra,0x34(sp)
addiu s3,s3,0x13
sw s5,0x30(sp)
jalr t9
_sw s4,0x2c(sp)
lw gp,0x10(sp)
beq v0,s2,0x002d0b6c
_addiu v1,v0,-0x9
srlv a0,s3,v1
sltiu v1,v1,0x18
bne v1,zero,0x002d0b50
_ext a0,a0,0x0,0x1
lui v1,0x7fff
or s3,zero,zero
lui s5,0x800
li s4,-0x1
ori s2,v1,0xfffe
andi v0,v0,0xff
lw t9,-0x70c0(gp)
sll v0,v0,0x1
sltu v1,s3,s5
or a0,s0,zero
beq v1,zero,0x002d0b04
_addu v0,s1,v0
lh v1,0x0(v0)
sll s3,s3,0x4
subu v0,s2,v1
sltu v0,v0,s3
beq v0,zero,0x002d0b94
_nop
jalr t9
_nop
lw gp,0x10(sp)
beq v0,s4,0x002d0b6c
_sll v1,v0,0x1
addu v1,s1,v1
lh v1,0x0(v1)
bgez v1,0x002d0ad4
_andi v0,v0,0xff
lw ra,0x34(sp)
or v0,s3,zero
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x38
beq a0,zero,0x002d0abc
_lw t9,-0x70c0(gp)
jalr t9
_or a0,s0,zero
lw gp,0x10(sp)
bne v0,s2,0x002d0aac
_addiu v1,v0,-0x9
lw ra,0x34(sp)
li v0,-0x1
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x38
b 0x002d0b04
_addu s3,s3,v1
(translation_unit "uint FUN_002d0a50(undefined4 param_1,int param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  }\n  uVar3 = 0;\n  while( true ) {\n    if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n    if (uVar1 == 0xffffffff) break;\n    if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "uint FUN_002d0a50(undefined4 param_1,int param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  }\n  uVar3 = 0;\n  while( true ) {\n    if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n    if (uVar1 == 0xffffffff) break;\n    if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_002d0a50(undefined4 param_1,int param_2)" identifier (parameter_list "(undefined4 param_1,int param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  }\n  uVar3 = 0;\n  while( true ) {\n    if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n    if (uVar1 == 0xffffffff) break;\n    if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);" (assignment_expression "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" identifier = (call_expression "(*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" (parenthesized_expression "(*(code *)PTR_ReadBlobByte_003a97f0)" ( (pointer_expression "*(code *)PTR_ReadBlobByte_003a97f0" * (cast_expression "(code *)PTR_ReadBlobByte_003a97f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (while_statement "while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  }" { (if_statement "if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(uVar1 == 0xffffffff)" ( (binary_expression "uVar1 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (if_statement "if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;" if (parenthesized_expression "((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)))" ( (binary_expression "(0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))" (parenthesized_expression "(0x17 < uVar1 - 9)" ( (binary_expression "0x17 < uVar1 - 9" number_literal < (binary_expression "uVar1 - 9" identifier - number_literal)) )) || (parenthesized_expression "(-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))" ( (binary_expression "-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)" number_literal < (cast_expression "(int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)" ( (binary_expression "(0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f" (parenthesized_expression "(0x800013U >> (uVar1 - 9 & 0x1f))" ( (binary_expression "0x800013U >> (uVar1 - 9 & 0x1f)" number_literal >> (parenthesized_expression "(uVar1 - 9 & 0x1f)" ( (binary_expression "uVar1 - 9 & 0x1f" (binary_expression "uVar1 - 9" identifier - number_literal) & number_literal) ))) )) << number_literal) )))) ))) )) (break_statement "break;" break ;)) (expression_statement "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);" (assignment_expression "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" identifier = (call_expression "(*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" (parenthesized_expression "(*(code *)PTR_ReadBlobByte_003a97f0)" ( (pointer_expression "*(code *)PTR_ReadBlobByte_003a97f0" * (cast_expression "(code *)PTR_ReadBlobByte_003a97f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) })) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n    if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n    if (uVar1 == 0xffffffff) break;\n    if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n    if (uVar1 == 0xffffffff) break;\n    if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }\n  }" { (if_statement "if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }" if (parenthesized_expression "(uVar3 < 0x8000000)" ( (binary_expression "uVar3 < 0x8000000" identifier < number_literal) )) (compound_statement "{\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }" { (expression_statement "iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);" (assignment_expression "iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2)" identifier = (cast_expression "(int)*(short *)(param_2 + (uVar1 & 0xff) * 2)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(short *)(param_2 + (uVar1 & 0xff) * 2)" * (cast_expression "(short *)(param_2 + (uVar1 & 0xff) * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + (uVar1 & 0xff) * 2)" ( (binary_expression "param_2 + (uVar1 & 0xff) * 2" identifier + (binary_expression "(uVar1 & 0xff) * 2" (parenthesized_expression "(uVar1 & 0xff)" ( (binary_expression "uVar1 & 0xff" identifier & number_literal) )) * number_literal)) )))))) ;) (expression_statement "uVar3 = uVar3 * 0x10;" (assignment_expression "uVar3 = uVar3 * 0x10" identifier = (binary_expression "uVar3 * 0x10" identifier * number_literal)) ;) (if_statement "if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }" if (parenthesized_expression "(uVar3 <= 0x7ffffffeU - iVar2)" ( (binary_expression "uVar3 <= 0x7ffffffeU - iVar2" identifier <= (binary_expression "0x7ffffffeU - iVar2" number_literal - identifier)) )) (compound_statement "{\n        uVar3 = uVar3 + iVar2;\n      }" { (expression_statement "uVar3 = uVar3 + iVar2;" (assignment_expression "uVar3 = uVar3 + iVar2" identifier = (binary_expression "uVar3 + iVar2" identifier + identifier)) ;) })) })) (expression_statement "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);" (assignment_expression "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" identifier = (call_expression "(*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" (parenthesized_expression "(*(code *)PTR_ReadBlobByte_003a97f0)" ( (pointer_expression "*(code *)PTR_ReadBlobByte_003a97f0" * (cast_expression "(code *)PTR_ReadBlobByte_003a97f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (uVar1 == 0xffffffff) break;" if (parenthesized_expression "(uVar1 == 0xffffffff)" ( (binary_expression "uVar1 == 0xffffffff" identifier == number_literal) )) (break_statement "break;" break ;)) (if_statement "if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }" if (parenthesized_expression "(*(short *)(param_2 + uVar1 * 2) < 0)" ( (binary_expression "*(short *)(param_2 + uVar1 * 2) < 0" (pointer_expression "*(short *)(param_2 + uVar1 * 2)" * (cast_expression "(short *)(param_2 + uVar1 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + uVar1 * 2)" ( (binary_expression "param_2 + uVar1 * 2" identifier + (binary_expression "uVar1 * 2" identifier * number_literal)) )))) < number_literal) )) (compound_statement "{\n      return uVar3;\n    }" { (return_statement "return uVar3;" return identifier ;) })) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "/* WARNING: Enum "GravityType": Some values do not have unique names */\n/* WARNING: Enum "DisposeType": Some values do not have unique names */\n/* WARNING: Enum "ChannelType": Some values do not have unique names */\n/* WARNING: Enum "PixelChannel": Some values do not have unique names */\n\nint XBMInteger(Image *image,short *hex_digits)\n\n{\n  uint uVar1;\n  uint uVar2;\n  \n  uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);\n  while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return -1;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);\n  }\n  uVar2 = 0;\n  while( true ) {\n    if (uVar2 < 0x8000000) {\n      uVar2 = uVar2 * 0x10;\n      if (uVar2 <= 0x7ffffffeU - (int)hex_digits[uVar1 & 0xff]) {\n        uVar2 = uVar2 + (int)hex_digits[uVar1 & 0xff];\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);\n    if (uVar1 == 0xffffffff) break;\n    if (hex_digits[uVar1] < 0) {\n      return uVar2;\n    }\n  }\n  return -1;\n}\n\n" comment comment comment comment (function_definition "int XBMInteger(Image *image,short *hex_digits)\n\n{\n  uint uVar1;\n  uint uVar2;\n  \n  uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);\n  while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return -1;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);\n  }\n  uVar2 = 0;\n  while( true ) {\n    if (uVar2 < 0x8000000) {\n      uVar2 = uVar2 * 0x10;\n      if (uVar2 <= 0x7ffffffeU - (int)hex_digits[uVar1 & 0xff]) {\n        uVar2 = uVar2 + (int)hex_digits[uVar1 & 0xff];\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);\n    if (uVar1 == 0xffffffff) break;\n    if (hex_digits[uVar1] < 0) {\n      return uVar2;\n    }\n  }\n  return -1;\n}" primitive_type (function_declarator "XBMInteger(Image *image,short *hex_digits)" identifier (parameter_list "(Image *image,short *hex_digits)" ( (parameter_declaration "Image *image" type_identifier (pointer_declarator "*image" * identifier)) , (parameter_declaration "short *hex_digits" (sized_type_specifier "short" short) (pointer_declarator "*hex_digits" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  \n  uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);\n  while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return -1;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);\n  }\n  uVar2 = 0;\n  while( true ) {\n    if (uVar2 < 0x8000000) {\n      uVar2 = uVar2 * 0x10;\n      if (uVar2 <= 0x7ffffffeU - (int)hex_digits[uVar1 & 0xff]) {\n        uVar2 = uVar2 + (int)hex_digits[uVar1 & 0xff];\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);\n    if (uVar1 == 0xffffffff) break;\n    if (hex_digits[uVar1] < 0) {\n      return uVar2;\n    }\n  }\n  return -1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);" (assignment_expression "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image)" identifier = (call_expression "(*(code *)PTR_ReadBlobByte_003a97f0)(image)" (parenthesized_expression "(*(code *)PTR_ReadBlobByte_003a97f0)" ( (pointer_expression "*(code *)PTR_ReadBlobByte_003a97f0" * (cast_expression "(code *)PTR_ReadBlobByte_003a97f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(image)" ( identifier )))) ;) (while_statement "while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return -1;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (uVar1 == 0xffffffff) {\n      return -1;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);\n  }" { (if_statement "if (uVar1 == 0xffffffff) {\n      return -1;\n    }" if (parenthesized_expression "(uVar1 == 0xffffffff)" ( (binary_expression "uVar1 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (if_statement "if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;" if (parenthesized_expression "((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)))" ( (binary_expression "(0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))" (parenthesized_expression "(0x17 < uVar1 - 9)" ( (binary_expression "0x17 < uVar1 - 9" number_literal < (binary_expression "uVar1 - 9" identifier - number_literal)) )) || (parenthesized_expression "(-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))" ( (binary_expression "-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)" number_literal < (cast_expression "(int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)" ( (binary_expression "(0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f" (parenthesized_expression "(0x800013U >> (uVar1 - 9 & 0x1f))" ( (binary_expression "0x800013U >> (uVar1 - 9 & 0x1f)" number_literal >> (parenthesized_expression "(uVar1 - 9 & 0x1f)" ( (binary_expression "uVar1 - 9 & 0x1f" (binary_expression "uVar1 - 9" identifier - number_literal) & number_literal) ))) )) << number_literal) )))) ))) )) (break_statement "break;" break ;)) (expression_statement "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);" (assignment_expression "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image)" identifier = (call_expression "(*(code *)PTR_ReadBlobByte_003a97f0)(image)" (parenthesized_expression "(*(code *)PTR_ReadBlobByte_003a97f0)" ( (pointer_expression "*(code *)PTR_ReadBlobByte_003a97f0" * (cast_expression "(code *)PTR_ReadBlobByte_003a97f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(image)" ( identifier )))) ;) })) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n    if (uVar2 < 0x8000000) {\n      uVar2 = uVar2 * 0x10;\n      if (uVar2 <= 0x7ffffffeU - (int)hex_digits[uVar1 & 0xff]) {\n        uVar2 = uVar2 + (int)hex_digits[uVar1 & 0xff];\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);\n    if (uVar1 == 0xffffffff) break;\n    if (hex_digits[uVar1] < 0) {\n      return uVar2;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (uVar2 < 0x8000000) {\n      uVar2 = uVar2 * 0x10;\n      if (uVar2 <= 0x7ffffffeU - (int)hex_digits[uVar1 & 0xff]) {\n        uVar2 = uVar2 + (int)hex_digits[uVar1 & 0xff];\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);\n    if (uVar1 == 0xffffffff) break;\n    if (hex_digits[uVar1] < 0) {\n      return uVar2;\n    }\n  }" { (if_statement "if (uVar2 < 0x8000000) {\n      uVar2 = uVar2 * 0x10;\n      if (uVar2 <= 0x7ffffffeU - (int)hex_digits[uVar1 & 0xff]) {\n        uVar2 = uVar2 + (int)hex_digits[uVar1 & 0xff];\n      }\n    }" if (parenthesized_expression "(uVar2 < 0x8000000)" ( (binary_expression "uVar2 < 0x8000000" identifier < number_literal) )) (compound_statement "{\n      uVar2 = uVar2 * 0x10;\n      if (uVar2 <= 0x7ffffffeU - (int)hex_digits[uVar1 & 0xff]) {\n        uVar2 = uVar2 + (int)hex_digits[uVar1 & 0xff];\n      }\n    }" { (expression_statement "uVar2 = uVar2 * 0x10;" (assignment_expression "uVar2 = uVar2 * 0x10" identifier = (binary_expression "uVar2 * 0x10" identifier * number_literal)) ;) (if_statement "if (uVar2 <= 0x7ffffffeU - (int)hex_digits[uVar1 & 0xff]) {\n        uVar2 = uVar2 + (int)hex_digits[uVar1 & 0xff];\n      }" if (parenthesized_expression "(uVar2 <= 0x7ffffffeU - (int)hex_digits[uVar1 & 0xff])" ( (binary_expression "uVar2 <= 0x7ffffffeU - (int)hex_digits[uVar1 & 0xff]" identifier <= (binary_expression "0x7ffffffeU - (int)hex_digits[uVar1 & 0xff]" number_literal - (cast_expression "(int)hex_digits[uVar1 & 0xff]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "hex_digits[uVar1 & 0xff]" identifier [ (binary_expression "uVar1 & 0xff" identifier & number_literal) ])))) )) (compound_statement "{\n        uVar2 = uVar2 + (int)hex_digits[uVar1 & 0xff];\n      }" { (expression_statement "uVar2 = uVar2 + (int)hex_digits[uVar1 & 0xff];" (assignment_expression "uVar2 = uVar2 + (int)hex_digits[uVar1 & 0xff]" identifier = (binary_expression "uVar2 + (int)hex_digits[uVar1 & 0xff]" identifier + (cast_expression "(int)hex_digits[uVar1 & 0xff]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "hex_digits[uVar1 & 0xff]" identifier [ (binary_expression "uVar1 & 0xff" identifier & number_literal) ])))) ;) })) })) (expression_statement "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image);" (assignment_expression "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(image)" identifier = (call_expression "(*(code *)PTR_ReadBlobByte_003a97f0)(image)" (parenthesized_expression "(*(code *)PTR_ReadBlobByte_003a97f0)" ( (pointer_expression "*(code *)PTR_ReadBlobByte_003a97f0" * (cast_expression "(code *)PTR_ReadBlobByte_003a97f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(image)" ( identifier )))) ;) (if_statement "if (uVar1 == 0xffffffff) break;" if (parenthesized_expression "(uVar1 == 0xffffffff)" ( (binary_expression "uVar1 == 0xffffffff" identifier == number_literal) )) (break_statement "break;" break ;)) (if_statement "if (hex_digits[uVar1] < 0) {\n      return uVar2;\n    }" if (parenthesized_expression "(hex_digits[uVar1] < 0)" ( (binary_expression "hex_digits[uVar1] < 0" (subscript_expression "hex_digits[uVar1]" identifier [ identifier ]) < number_literal) )) (compound_statement "{\n      return uVar2;\n    }" { (return_statement "return uVar2;" return identifier ;) })) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "uint FUN_002d0a50(undefined4 param_1,int param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  }\n  uVar3 = 0;\n  while( true ) {\n    if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n    if (uVar1 == 0xffffffff) break;\n    if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "uint FUN_002d0a50(undefined4 param_1,int param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  }\n  uVar3 = 0;\n  while( true ) {\n    if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n    if (uVar1 == 0xffffffff) break;\n    if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_002d0a50(undefined4 param_1,int param_2)" identifier (parameter_list "(undefined4 param_1,int param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  }\n  uVar3 = 0;\n  while( true ) {\n    if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n    if (uVar1 == 0xffffffff) break;\n    if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);" (assignment_expression "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" identifier = (call_expression "(*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" (parenthesized_expression "(*(code *)PTR_ReadBlobByte_003a97f0)" ( (pointer_expression "*(code *)PTR_ReadBlobByte_003a97f0" * (cast_expression "(code *)PTR_ReadBlobByte_003a97f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (while_statement "while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  }" { (if_statement "if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(uVar1 == 0xffffffff)" ( (binary_expression "uVar1 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (if_statement "if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;" if (parenthesized_expression "((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)))" ( (binary_expression "(0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))" (parenthesized_expression "(0x17 < uVar1 - 9)" ( (binary_expression "0x17 < uVar1 - 9" number_literal < (binary_expression "uVar1 - 9" identifier - number_literal)) )) || (parenthesized_expression "(-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))" ( (binary_expression "-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)" number_literal < (cast_expression "(int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)" ( (binary_expression "(0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f" (parenthesized_expression "(0x800013U >> (uVar1 - 9 & 0x1f))" ( (binary_expression "0x800013U >> (uVar1 - 9 & 0x1f)" number_literal >> (parenthesized_expression "(uVar1 - 9 & 0x1f)" ( (binary_expression "uVar1 - 9 & 0x1f" (binary_expression "uVar1 - 9" identifier - number_literal) & number_literal) ))) )) << number_literal) )))) ))) )) (break_statement "break;" break ;)) (expression_statement "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);" (assignment_expression "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" identifier = (call_expression "(*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" (parenthesized_expression "(*(code *)PTR_ReadBlobByte_003a97f0)" ( (pointer_expression "*(code *)PTR_ReadBlobByte_003a97f0" * (cast_expression "(code *)PTR_ReadBlobByte_003a97f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) })) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n    if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n    if (uVar1 == 0xffffffff) break;\n    if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n    if (uVar1 == 0xffffffff) break;\n    if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }\n  }" { (if_statement "if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }" if (parenthesized_expression "(uVar3 < 0x8000000)" ( (binary_expression "uVar3 < 0x8000000" identifier < number_literal) )) (compound_statement "{\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }" { (expression_statement "iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);" (assignment_expression "iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2)" identifier = (cast_expression "(int)*(short *)(param_2 + (uVar1 & 0xff) * 2)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(short *)(param_2 + (uVar1 & 0xff) * 2)" * (cast_expression "(short *)(param_2 + (uVar1 & 0xff) * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + (uVar1 & 0xff) * 2)" ( (binary_expression "param_2 + (uVar1 & 0xff) * 2" identifier + (binary_expression "(uVar1 & 0xff) * 2" (parenthesized_expression "(uVar1 & 0xff)" ( (binary_expression "uVar1 & 0xff" identifier & number_literal) )) * number_literal)) )))))) ;) (expression_statement "uVar3 = uVar3 * 0x10;" (assignment_expression "uVar3 = uVar3 * 0x10" identifier = (binary_expression "uVar3 * 0x10" identifier * number_literal)) ;) (if_statement "if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }" if (parenthesized_expression "(uVar3 <= 0x7ffffffeU - iVar2)" ( (binary_expression "uVar3 <= 0x7ffffffeU - iVar2" identifier <= (binary_expression "0x7ffffffeU - iVar2" number_literal - identifier)) )) (compound_statement "{\n        uVar3 = uVar3 + iVar2;\n      }" { (expression_statement "uVar3 = uVar3 + iVar2;" (assignment_expression "uVar3 = uVar3 + iVar2" identifier = (binary_expression "uVar3 + iVar2" identifier + identifier)) ;) })) })) (expression_statement "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);" (assignment_expression "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" identifier = (call_expression "(*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" (parenthesized_expression "(*(code *)PTR_ReadBlobByte_003a97f0)" ( (pointer_expression "*(code *)PTR_ReadBlobByte_003a97f0" * (cast_expression "(code *)PTR_ReadBlobByte_003a97f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (uVar1 == 0xffffffff) break;" if (parenthesized_expression "(uVar1 == 0xffffffff)" ( (binary_expression "uVar1 == 0xffffffff" identifier == number_literal) )) (break_statement "break;" break ;)) (if_statement "if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }" if (parenthesized_expression "(*(short *)(param_2 + uVar1 * 2) < 0)" ( (binary_expression "*(short *)(param_2 + uVar1 * 2) < 0" (pointer_expression "*(short *)(param_2 + uVar1 * 2)" * (cast_expression "(short *)(param_2 + uVar1 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + uVar1 * 2)" ( (binary_expression "param_2 + uVar1 * 2" identifier + (binary_expression "uVar1 * 2" identifier * number_literal)) )))) < number_literal) )) (compound_statement "{\n      return uVar3;\n    }" { (return_statement "return uVar3;" return identifier ;) })) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE 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 ( IDENT )))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT - LIT)) )) || (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT >> (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) & LIT) ))) )) << LIT) )))) ))) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) * LIT)) )))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (binary_expression LIT - IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) })) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) < LIT) )) (compound_statement { (return_statement return IDENT ;) })) })) (return_statement return LIT ;) })))
(function_definition "uint FUN_002d0a50(undefined4 param_1,int param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  }\n  uVar3 = 0;\n  while( true ) {\n    if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n    if (uVar1 == 0xffffffff) break;\n    if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }\n  }\n  return 0xffffffff;\n}" (type_identifier "uint") (function_declarator "FUN_002d0a50(undefined4 param_1,int param_2)" (identifier "FUN_002d0a50") (parameter_list "(undefined4 param_1,int param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  }\n  uVar3 = 0;\n  while( true ) {\n    if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n    if (uVar1 == 0xffffffff) break;\n    if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }\n  }\n  return 0xffffffff;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (expression_statement "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);" (assignment_expression "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" (identifier "uVar1") (= "=") (call_expression "(*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" (parenthesized_expression "(*(code *)PTR_ReadBlobByte_003a97f0)" (( "(") (pointer_expression "*(code *)PTR_ReadBlobByte_003a97f0" (* "*") (cast_expression "(code *)PTR_ReadBlobByte_003a97f0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_ReadBlobByte_003a97f0"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (while_statement "while( true ) {\n    if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }\n    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n  }" ({ "{") (if_statement "if (uVar1 == 0xffffffff) {\n      return 0xffffffff;\n    }" (if "if") (parenthesized_expression "(uVar1 == 0xffffffff)" (( "(") (binary_expression "uVar1 == 0xffffffff" (identifier "uVar1") (== "==") (number_literal "0xffffffff")) () ")")) (compound_statement "{\n      return 0xffffffff;\n    }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (if_statement "if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;" (if "if") (parenthesized_expression "((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)))" (( "(") (binary_expression "(0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))" (parenthesized_expression "(0x17 < uVar1 - 9)" (( "(") (binary_expression "0x17 < uVar1 - 9" (number_literal "0x17") (< "<") (binary_expression "uVar1 - 9" (identifier "uVar1") (- "-") (number_literal "9"))) () ")")) (|| "||") (parenthesized_expression "(-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))" (( "(") (binary_expression "-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)" (number_literal "-1") (< "<") (cast_expression "(int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f)" (( "(") (binary_expression "(0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f" (parenthesized_expression "(0x800013U >> (uVar1 - 9 & 0x1f))" (( "(") (binary_expression "0x800013U >> (uVar1 - 9 & 0x1f)" (number_literal "0x800013U") (>> ">>") (parenthesized_expression "(uVar1 - 9 & 0x1f)" (( "(") (binary_expression "uVar1 - 9 & 0x1f" (binary_expression "uVar1 - 9" (identifier "uVar1") (- "-") (number_literal "9")) (& "&") (number_literal "0x1f")) () ")"))) () ")")) (<< "<<") (number_literal "0x1f")) () ")")))) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);" (assignment_expression "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" (identifier "uVar1") (= "=") (call_expression "(*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" (parenthesized_expression "(*(code *)PTR_ReadBlobByte_003a97f0)" (( "(") (pointer_expression "*(code *)PTR_ReadBlobByte_003a97f0" (* "*") (cast_expression "(code *)PTR_ReadBlobByte_003a97f0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_ReadBlobByte_003a97f0"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (} "}"))) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (while_statement "while( true ) {\n    if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n    if (uVar1 == 0xffffffff) break;\n    if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }\n    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);\n    if (uVar1 == 0xffffffff) break;\n    if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }\n  }" ({ "{") (if_statement "if (uVar3 < 0x8000000) {\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }" (if "if") (parenthesized_expression "(uVar3 < 0x8000000)" (( "(") (binary_expression "uVar3 < 0x8000000" (identifier "uVar3") (< "<") (number_literal "0x8000000")) () ")")) (compound_statement "{\n      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);\n      uVar3 = uVar3 * 0x10;\n      if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }\n    }" ({ "{") (expression_statement "iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);" (assignment_expression "iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2)" (identifier "iVar2") (= "=") (cast_expression "(int)*(short *)(param_2 + (uVar1 & 0xff) * 2)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*(short *)(param_2 + (uVar1 & 0xff) * 2)" (* "*") (cast_expression "(short *)(param_2 + (uVar1 & 0xff) * 2)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + (uVar1 & 0xff) * 2)" (( "(") (binary_expression "param_2 + (uVar1 & 0xff) * 2" (identifier "param_2") (+ "+") (binary_expression "(uVar1 & 0xff) * 2" (parenthesized_expression "(uVar1 & 0xff)" (( "(") (binary_expression "uVar1 & 0xff" (identifier "uVar1") (& "&") (number_literal "0xff")) () ")")) (* "*") (number_literal "2"))) () ")")))))) (; ";")) (expression_statement "uVar3 = uVar3 * 0x10;" (assignment_expression "uVar3 = uVar3 * 0x10" (identifier "uVar3") (= "=") (binary_expression "uVar3 * 0x10" (identifier "uVar3") (* "*") (number_literal "0x10"))) (; ";")) (if_statement "if (uVar3 <= 0x7ffffffeU - iVar2) {\n        uVar3 = uVar3 + iVar2;\n      }" (if "if") (parenthesized_expression "(uVar3 <= 0x7ffffffeU - iVar2)" (( "(") (binary_expression "uVar3 <= 0x7ffffffeU - iVar2" (identifier "uVar3") (<= "<=") (binary_expression "0x7ffffffeU - iVar2" (number_literal "0x7ffffffeU") (- "-") (identifier "iVar2"))) () ")")) (compound_statement "{\n        uVar3 = uVar3 + iVar2;\n      }" ({ "{") (expression_statement "uVar3 = uVar3 + iVar2;" (assignment_expression "uVar3 = uVar3 + iVar2" (identifier "uVar3") (= "=") (binary_expression "uVar3 + iVar2" (identifier "uVar3") (+ "+") (identifier "iVar2"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);" (assignment_expression "uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" (identifier "uVar1") (= "=") (call_expression "(*(code *)PTR_ReadBlobByte_003a97f0)(param_1)" (parenthesized_expression "(*(code *)PTR_ReadBlobByte_003a97f0)" (( "(") (pointer_expression "*(code *)PTR_ReadBlobByte_003a97f0" (* "*") (cast_expression "(code *)PTR_ReadBlobByte_003a97f0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_ReadBlobByte_003a97f0"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (uVar1 == 0xffffffff) break;" (if "if") (parenthesized_expression "(uVar1 == 0xffffffff)" (( "(") (binary_expression "uVar1 == 0xffffffff" (identifier "uVar1") (== "==") (number_literal "0xffffffff")) () ")")) (break_statement "break;" (break "break") (; ";"))) (if_statement "if (*(short *)(param_2 + uVar1 * 2) < 0) {\n      return uVar3;\n    }" (if "if") (parenthesized_expression "(*(short *)(param_2 + uVar1 * 2) < 0)" (( "(") (binary_expression "*(short *)(param_2 + uVar1 * 2) < 0" (pointer_expression "*(short *)(param_2 + uVar1 * 2)" (* "*") (cast_expression "(short *)(param_2 + uVar1 * 2)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + uVar1 * 2)" (( "(") (binary_expression "param_2 + uVar1 * 2" (identifier "param_2") (+ "+") (binary_expression "uVar1 * 2" (identifier "uVar1") (* "*") (number_literal "2"))) () ")")))) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      return uVar3;\n    }" ({ "{") (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (} "}"))) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) 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 (identifier))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (binary_expression left: (identifier) right: (number_literal)))) right: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))))) right: (number_literal)))))))) consequence: (break_statement)) (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 (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (number_literal) right: (identifier)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (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 (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (number_literal))) consequence: (compound_statement (return_statement (identifier)))))) (return_statement (number_literal)))))

uint MASKED(undefined4 param_1,int param_2)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  
  uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);
  while( true ) {
    if (uVar1 == 0xffffffff) {
      return 0xffffffff;
    }
    if ((0x17 < uVar1 - 9) || (-1 < (int)((0x800013U >> (uVar1 - 9 & 0x1f)) << 0x1f))) break;
    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);
  }
  uVar3 = 0;
  while( true ) {
    if (uVar3 < 0x8000000) {
      iVar2 = (int)*(short *)(param_2 + (uVar1 & 0xff) * 2);
      uVar3 = uVar3 * 0x10;
      if (uVar3 <= 0x7ffffffeU - iVar2) {
        uVar3 = uVar3 + iVar2;
      }
    }
    uVar1 = (*(code *)PTR_ReadBlobByte_003a97f0)(param_1);
    if (uVar1 == 0xffffffff) break;
    if (*(short *)(param_2 + uVar1 * 2) < 0) {
      return uVar3;
    }
  }
  return 0xffffffff;
}

