
/* WARNING: Unknown calling convention */

size_t MHD_strx_to_uint32_n_(char *str,size_t maxlen,uint32_t *out_val)

{
  size_t sVar1;
  uint uVar2;
  uint uVar3;
  uint32_t uVar4;
  
  if (((str == (char *)0x0) || (out_val == (uint32_t *)0x0)) || (uVar4 = 0, maxlen == 0)) {
    return 0;
  }
  sVar1 = 0;
  do {
    uVar3 = (uint)(byte)str[sVar1];
    uVar2 = uVar3 - 0x30 & 0xff;
    if (9 < uVar2) {
      if (uVar3 - 0x41 < 6) {
        uVar2 = uVar3 - 0x37 & 0xff;
      }
      else {
        uVar2 = uVar3 - 0x57 & 0xff;
        if (5 < uVar3 - 0x61) {
          if (sVar1 == 0) {
            return 0;
          }
          break;
        }
      }
    }
    if (0xfffffff < uVar4) {
      return 0;
    }
    sVar1 = sVar1 + 1;
    uVar4 = uVar2 + uVar4 * 0x10;
  } while (maxlen != sVar1);
  *out_val = uVar4;
  return sVar1;
}



int FUN_00021e94(int param_1,int param_2,uint *param_3)

{
  int iVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  
  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)) {
    return 0;
  }
  iVar1 = 0;
  do {
    uVar3 = (uint)*(byte *)(param_1 + iVar1);
    uVar2 = uVar3 - 0x30 & 0xff;
    if (9 < uVar2) {
      if (uVar3 - 0x41 < 6) {
        uVar2 = uVar3 - 0x37 & 0xff;
      }
      else {
        uVar2 = uVar3 - 0x57 & 0xff;
        if (5 < uVar3 - 0x61) {
          if (iVar1 == 0) {
            return 0;
          }
          break;
        }
      }
    }
    if (0xfffffff < uVar4) {
      return 0;
    }
    iVar1 = iVar1 + 1;
    uVar4 = uVar2 + uVar4 * 0x10;
  } while (param_2 != iVar1);
  *param_3 = uVar4;
  return iVar1;
}


beq a0,zero,0x00021f2c
_nop
beq a2,zero,0x00021f2c
_nop
beq a1,zero,0x00021f2c
_or t0,zero,zero
or v0,zero,zero
b 0x00021ed8
_lui t5,0x1000
beq t2,zero,0x00021f34
_andi v1,t4,0xff
sll a3,t0,0x4
sltu t0,t0,t5
beq t0,zero,0x00021f20
_addiu v0,v0,0x1
beq a1,v0,0x00021f3c
_addu t0,v1,a3
addu v1,a0,v0
lbu a3,0x0(v1)
addiu v1,a3,-0x30
addiu t1,a3,-0x41
andi v1,v1,0xff
sltiu t3,v1,0xa
addiu t2,a3,-0x61
addiu t4,a3,-0x57
bne t3,zero,0x00021ec0
_sltiu t1,t1,0x6
beq t1,zero,0x00021eb8
_sltiu t2,t2,0x6
addiu v1,a3,-0x37
sll a3,t0,0x4
sltu t0,t0,t5
andi v1,v1,0xff
bne t0,zero,0x00021ed0
_addiu v0,v0,0x1
or v0,zero,zero
jr ra
_nop
jr ra
_or v0,zero,zero
beq v0,zero,0x00021f24
_nop
jr ra
_sw t0,0x0(a2)
(translation_unit "int FUN_00021e94(int param_1,int param_2,uint *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  iVar1 = 0;\n  do {\n    uVar3 = (uint)*(byte *)(param_1 + iVar1);\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    iVar1 = iVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (param_2 != iVar1);\n  *param_3 = uVar4;\n  return iVar1;\n}\n\n" (function_definition "int FUN_00021e94(int param_1,int param_2,uint *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  iVar1 = 0;\n  do {\n    uVar3 = (uint)*(byte *)(param_1 + iVar1);\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    iVar1 = iVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (param_2 != iVar1);\n  *param_3 = uVar4;\n  return iVar1;\n}" primitive_type (function_declarator "FUN_00021e94(int param_1,int param_2,uint *param_3)" identifier (parameter_list "(int param_1,int param_2,uint *param_3)" ( (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)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  iVar1 = 0;\n  do {\n    uVar3 = (uint)*(byte *)(param_1 + iVar1);\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    iVar1 = iVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (param_2 != iVar1);\n  *param_3 = uVar4;\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (if_statement "if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)) {\n    return 0;\n  }" if (parenthesized_expression "(((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0))" ( (binary_expression "((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)" (parenthesized_expression "((param_1 == 0) || (param_3 == (uint *)0x0))" ( (binary_expression "(param_1 == 0) || (param_3 == (uint *)0x0)" (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) || (parenthesized_expression "(param_3 == (uint *)0x0)" ( (binary_expression "param_3 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) || (parenthesized_expression "(uVar4 = 0, param_2 == 0)" ( (comma_expression "uVar4 = 0, param_2 == 0" (assignment_expression "uVar4 = 0" identifier = number_literal) , (binary_expression "param_2 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n    uVar3 = (uint)*(byte *)(param_1 + iVar1);\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    iVar1 = iVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (param_2 != iVar1);" do (compound_statement "{\n    uVar3 = (uint)*(byte *)(param_1 + iVar1);\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    iVar1 = iVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  }" { (expression_statement "uVar3 = (uint)*(byte *)(param_1 + iVar1);" (assignment_expression "uVar3 = (uint)*(byte *)(param_1 + iVar1)" identifier = (binary_expression "(uint)*(byte *)(param_1 + iVar1)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(param_1 + iVar1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar1)" ( (binary_expression "param_1 + iVar1" identifier + identifier) ))))) ;) (expression_statement "uVar2 = uVar3 - 0x30 & 0xff;" (assignment_expression "uVar2 = uVar3 - 0x30 & 0xff" identifier = (binary_expression "uVar3 - 0x30 & 0xff" (binary_expression "uVar3 - 0x30" identifier - number_literal) & number_literal)) ;) (if_statement "if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }" if (parenthesized_expression "(9 < uVar2)" ( (binary_expression "9 < uVar2" number_literal < identifier) )) (compound_statement "{\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }" { (if_statement "if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }" if (parenthesized_expression "(uVar3 - 0x41 < 6)" ( (binary_expression "uVar3 - 0x41 < 6" (binary_expression "uVar3 - 0x41" identifier - number_literal) < number_literal) )) (compound_statement "{\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }" { (expression_statement "uVar2 = uVar3 - 0x37 & 0xff;" (assignment_expression "uVar2 = uVar3 - 0x37 & 0xff" identifier = (binary_expression "uVar3 - 0x37 & 0xff" (binary_expression "uVar3 - 0x37" identifier - number_literal) & number_literal)) ;) }) (else_clause "else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }" else (compound_statement "{\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }" { (expression_statement "uVar2 = uVar3 - 0x57 & 0xff;" (assignment_expression "uVar2 = uVar3 - 0x57 & 0xff" identifier = (binary_expression "uVar3 - 0x57 & 0xff" (binary_expression "uVar3 - 0x57" identifier - number_literal) & number_literal)) ;) (if_statement "if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }" if (parenthesized_expression "(5 < uVar3 - 0x61)" ( (binary_expression "5 < uVar3 - 0x61" number_literal < (binary_expression "uVar3 - 0x61" identifier - number_literal)) )) (compound_statement "{\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }" { (if_statement "if (iVar1 == 0) {\n            return 0;\n          }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n            return 0;\n          }" { (return_statement "return 0;" return number_literal ;) })) (break_statement "break;" break ;) })) }))) })) (if_statement "if (0xfffffff < uVar4) {\n      return 0;\n    }" if (parenthesized_expression "(0xfffffff < uVar4)" ( (binary_expression "0xfffffff < uVar4" number_literal < identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "uVar4 = uVar2 + uVar4 * 0x10;" (assignment_expression "uVar4 = uVar2 + uVar4 * 0x10" identifier = (binary_expression "uVar2 + uVar4 * 0x10" identifier + (binary_expression "uVar4 * 0x10" identifier * number_literal))) ;) }) while (parenthesized_expression "(param_2 != iVar1)" ( (binary_expression "param_2 != iVar1" identifier != identifier) )) ;) (expression_statement "*param_3 = uVar4;" (assignment_expression "*param_3 = uVar4" (pointer_expression "*param_3" * identifier) = identifier) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nsize_t MHD_strx_to_uint32_n_(char *str,size_t maxlen,uint32_t *out_val)\n\n{\n  size_t sVar1;\n  uint uVar2;\n  uint uVar3;\n  uint32_t uVar4;\n  \n  if (((str == (char *)0x0) || (out_val == (uint32_t *)0x0)) || (uVar4 = 0, maxlen == 0)) {\n    return 0;\n  }\n  sVar1 = 0;\n  do {\n    uVar3 = (uint)(byte)str[sVar1];\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (sVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    sVar1 = sVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (maxlen != sVar1);\n  *out_val = uVar4;\n  return sVar1;\n}\n\n" comment (function_definition "size_t MHD_strx_to_uint32_n_(char *str,size_t maxlen,uint32_t *out_val)\n\n{\n  size_t sVar1;\n  uint uVar2;\n  uint uVar3;\n  uint32_t uVar4;\n  \n  if (((str == (char *)0x0) || (out_val == (uint32_t *)0x0)) || (uVar4 = 0, maxlen == 0)) {\n    return 0;\n  }\n  sVar1 = 0;\n  do {\n    uVar3 = (uint)(byte)str[sVar1];\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (sVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    sVar1 = sVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (maxlen != sVar1);\n  *out_val = uVar4;\n  return sVar1;\n}" primitive_type (function_declarator "MHD_strx_to_uint32_n_(char *str,size_t maxlen,uint32_t *out_val)" identifier (parameter_list "(char *str,size_t maxlen,uint32_t *out_val)" ( (parameter_declaration "char *str" primitive_type (pointer_declarator "*str" * identifier)) , (parameter_declaration "size_t maxlen" primitive_type identifier) , (parameter_declaration "uint32_t *out_val" primitive_type (pointer_declarator "*out_val" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  uint uVar2;\n  uint uVar3;\n  uint32_t uVar4;\n  \n  if (((str == (char *)0x0) || (out_val == (uint32_t *)0x0)) || (uVar4 = 0, maxlen == 0)) {\n    return 0;\n  }\n  sVar1 = 0;\n  do {\n    uVar3 = (uint)(byte)str[sVar1];\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (sVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    sVar1 = sVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (maxlen != sVar1);\n  *out_val = uVar4;\n  return sVar1;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint32_t uVar4;" primitive_type identifier ;) (if_statement "if (((str == (char *)0x0) || (out_val == (uint32_t *)0x0)) || (uVar4 = 0, maxlen == 0)) {\n    return 0;\n  }" if (parenthesized_expression "(((str == (char *)0x0) || (out_val == (uint32_t *)0x0)) || (uVar4 = 0, maxlen == 0))" ( (binary_expression "((str == (char *)0x0) || (out_val == (uint32_t *)0x0)) || (uVar4 = 0, maxlen == 0)" (parenthesized_expression "((str == (char *)0x0) || (out_val == (uint32_t *)0x0))" ( (binary_expression "(str == (char *)0x0) || (out_val == (uint32_t *)0x0)" (parenthesized_expression "(str == (char *)0x0)" ( (binary_expression "str == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(out_val == (uint32_t *)0x0)" ( (binary_expression "out_val == (uint32_t *)0x0" identifier == (cast_expression "(uint32_t *)0x0" ( (type_descriptor "uint32_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) || (parenthesized_expression "(uVar4 = 0, maxlen == 0)" ( (comma_expression "uVar4 = 0, maxlen == 0" (assignment_expression "uVar4 = 0" identifier = number_literal) , (binary_expression "maxlen == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "sVar1 = 0;" (assignment_expression "sVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n    uVar3 = (uint)(byte)str[sVar1];\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (sVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    sVar1 = sVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (maxlen != sVar1);" do (compound_statement "{\n    uVar3 = (uint)(byte)str[sVar1];\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (sVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    sVar1 = sVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  }" { (expression_statement "uVar3 = (uint)(byte)str[sVar1];" (assignment_expression "uVar3 = (uint)(byte)str[sVar1]" identifier = (cast_expression "(uint)(byte)str[sVar1]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)str[sVar1]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "str[sVar1]" identifier [ identifier ])))) ;) (expression_statement "uVar2 = uVar3 - 0x30 & 0xff;" (assignment_expression "uVar2 = uVar3 - 0x30 & 0xff" identifier = (binary_expression "uVar3 - 0x30 & 0xff" (binary_expression "uVar3 - 0x30" identifier - number_literal) & number_literal)) ;) (if_statement "if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (sVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }" if (parenthesized_expression "(9 < uVar2)" ( (binary_expression "9 < uVar2" number_literal < identifier) )) (compound_statement "{\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (sVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }" { (if_statement "if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (sVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }" if (parenthesized_expression "(uVar3 - 0x41 < 6)" ( (binary_expression "uVar3 - 0x41 < 6" (binary_expression "uVar3 - 0x41" identifier - number_literal) < number_literal) )) (compound_statement "{\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }" { (expression_statement "uVar2 = uVar3 - 0x37 & 0xff;" (assignment_expression "uVar2 = uVar3 - 0x37 & 0xff" identifier = (binary_expression "uVar3 - 0x37 & 0xff" (binary_expression "uVar3 - 0x37" identifier - number_literal) & number_literal)) ;) }) (else_clause "else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (sVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }" else (compound_statement "{\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (sVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }" { (expression_statement "uVar2 = uVar3 - 0x57 & 0xff;" (assignment_expression "uVar2 = uVar3 - 0x57 & 0xff" identifier = (binary_expression "uVar3 - 0x57 & 0xff" (binary_expression "uVar3 - 0x57" identifier - number_literal) & number_literal)) ;) (if_statement "if (5 < uVar3 - 0x61) {\n          if (sVar1 == 0) {\n            return 0;\n          }\n          break;\n        }" if (parenthesized_expression "(5 < uVar3 - 0x61)" ( (binary_expression "5 < uVar3 - 0x61" number_literal < (binary_expression "uVar3 - 0x61" identifier - number_literal)) )) (compound_statement "{\n          if (sVar1 == 0) {\n            return 0;\n          }\n          break;\n        }" { (if_statement "if (sVar1 == 0) {\n            return 0;\n          }" if (parenthesized_expression "(sVar1 == 0)" ( (binary_expression "sVar1 == 0" identifier == number_literal) )) (compound_statement "{\n            return 0;\n          }" { (return_statement "return 0;" return number_literal ;) })) (break_statement "break;" break ;) })) }))) })) (if_statement "if (0xfffffff < uVar4) {\n      return 0;\n    }" if (parenthesized_expression "(0xfffffff < uVar4)" ( (binary_expression "0xfffffff < uVar4" number_literal < identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "sVar1 = sVar1 + 1;" (assignment_expression "sVar1 = sVar1 + 1" identifier = (binary_expression "sVar1 + 1" identifier + number_literal)) ;) (expression_statement "uVar4 = uVar2 + uVar4 * 0x10;" (assignment_expression "uVar4 = uVar2 + uVar4 * 0x10" identifier = (binary_expression "uVar2 + uVar4 * 0x10" identifier + (binary_expression "uVar4 * 0x10" identifier * number_literal))) ;) }) while (parenthesized_expression "(maxlen != sVar1)" ( (binary_expression "maxlen != sVar1" identifier != identifier) )) ;) (expression_statement "*out_val = uVar4;" (assignment_expression "*out_val = uVar4" (pointer_expression "*out_val" * identifier) = identifier) ;) (return_statement "return sVar1;" return identifier ;) })))
(translation_unit "int FUN_00021e94(int param_1,int param_2,uint *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  iVar1 = 0;\n  do {\n    uVar3 = (uint)*(byte *)(param_1 + iVar1);\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    iVar1 = iVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (param_2 != iVar1);\n  *param_3 = uVar4;\n  return iVar1;\n}\n\n" (function_definition "int FUN_00021e94(int param_1,int param_2,uint *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  iVar1 = 0;\n  do {\n    uVar3 = (uint)*(byte *)(param_1 + iVar1);\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    iVar1 = iVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (param_2 != iVar1);\n  *param_3 = uVar4;\n  return iVar1;\n}" primitive_type (function_declarator "FUN_00021e94(int param_1,int param_2,uint *param_3)" identifier (parameter_list "(int param_1,int param_2,uint *param_3)" ( (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)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  iVar1 = 0;\n  do {\n    uVar3 = (uint)*(byte *)(param_1 + iVar1);\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    iVar1 = iVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (param_2 != iVar1);\n  *param_3 = uVar4;\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (if_statement "if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)) {\n    return 0;\n  }" if (parenthesized_expression "(((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0))" ( (binary_expression "((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)" (parenthesized_expression "((param_1 == 0) || (param_3 == (uint *)0x0))" ( (binary_expression "(param_1 == 0) || (param_3 == (uint *)0x0)" (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) || (parenthesized_expression "(param_3 == (uint *)0x0)" ( (binary_expression "param_3 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) || (parenthesized_expression "(uVar4 = 0, param_2 == 0)" ( (comma_expression "uVar4 = 0, param_2 == 0" (assignment_expression "uVar4 = 0" identifier = number_literal) , (binary_expression "param_2 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n    uVar3 = (uint)*(byte *)(param_1 + iVar1);\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    iVar1 = iVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (param_2 != iVar1);" do (compound_statement "{\n    uVar3 = (uint)*(byte *)(param_1 + iVar1);\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    iVar1 = iVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  }" { (expression_statement "uVar3 = (uint)*(byte *)(param_1 + iVar1);" (assignment_expression "uVar3 = (uint)*(byte *)(param_1 + iVar1)" identifier = (binary_expression "(uint)*(byte *)(param_1 + iVar1)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(param_1 + iVar1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar1)" ( (binary_expression "param_1 + iVar1" identifier + identifier) ))))) ;) (expression_statement "uVar2 = uVar3 - 0x30 & 0xff;" (assignment_expression "uVar2 = uVar3 - 0x30 & 0xff" identifier = (binary_expression "uVar3 - 0x30 & 0xff" (binary_expression "uVar3 - 0x30" identifier - number_literal) & number_literal)) ;) (if_statement "if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }" if (parenthesized_expression "(9 < uVar2)" ( (binary_expression "9 < uVar2" number_literal < identifier) )) (compound_statement "{\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }" { (if_statement "if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }" if (parenthesized_expression "(uVar3 - 0x41 < 6)" ( (binary_expression "uVar3 - 0x41 < 6" (binary_expression "uVar3 - 0x41" identifier - number_literal) < number_literal) )) (compound_statement "{\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }" { (expression_statement "uVar2 = uVar3 - 0x37 & 0xff;" (assignment_expression "uVar2 = uVar3 - 0x37 & 0xff" identifier = (binary_expression "uVar3 - 0x37 & 0xff" (binary_expression "uVar3 - 0x37" identifier - number_literal) & number_literal)) ;) }) (else_clause "else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }" else (compound_statement "{\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }" { (expression_statement "uVar2 = uVar3 - 0x57 & 0xff;" (assignment_expression "uVar2 = uVar3 - 0x57 & 0xff" identifier = (binary_expression "uVar3 - 0x57 & 0xff" (binary_expression "uVar3 - 0x57" identifier - number_literal) & number_literal)) ;) (if_statement "if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }" if (parenthesized_expression "(5 < uVar3 - 0x61)" ( (binary_expression "5 < uVar3 - 0x61" number_literal < (binary_expression "uVar3 - 0x61" identifier - number_literal)) )) (compound_statement "{\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }" { (if_statement "if (iVar1 == 0) {\n            return 0;\n          }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n            return 0;\n          }" { (return_statement "return 0;" return number_literal ;) })) (break_statement "break;" break ;) })) }))) })) (if_statement "if (0xfffffff < uVar4) {\n      return 0;\n    }" if (parenthesized_expression "(0xfffffff < uVar4)" ( (binary_expression "0xfffffff < uVar4" number_literal < identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "uVar4 = uVar2 + uVar4 * 0x10;" (assignment_expression "uVar4 = uVar2 + uVar4 * 0x10" identifier = (binary_expression "uVar2 + uVar4 * 0x10" identifier + (binary_expression "uVar4 * 0x10" identifier * number_literal))) ;) }) while (parenthesized_expression "(param_2 != iVar1)" ( (binary_expression "param_2 != iVar1" identifier != identifier) )) ;) (expression_statement "*param_3 = uVar4;" (assignment_expression "*param_3 = uVar4" (pointer_expression "*param_3" * identifier) = identifier) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ))) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = LIT) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT - LIT) & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT - LIT) & LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT - LIT) & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT - LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (break_statement break ;) })) }))) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (binary_expression IDENT * LIT))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_00021e94(int param_1,int param_2,uint *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  iVar1 = 0;\n  do {\n    uVar3 = (uint)*(byte *)(param_1 + iVar1);\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    iVar1 = iVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (param_2 != iVar1);\n  *param_3 = uVar4;\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_00021e94(int param_1,int param_2,uint *param_3)" (identifier "FUN_00021e94") (parameter_list "(int param_1,int param_2,uint *param_3)" (( "(") (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"))) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  iVar1 = 0;\n  do {\n    uVar3 = (uint)*(byte *)(param_1 + iVar1);\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    iVar1 = iVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (param_2 != iVar1);\n  *param_3 = uVar4;\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (if_statement "if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0))" (( "(") (binary_expression "((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)" (parenthesized_expression "((param_1 == 0) || (param_3 == (uint *)0x0))" (( "(") (binary_expression "(param_1 == 0) || (param_3 == (uint *)0x0)" (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(param_3 == (uint *)0x0)" (( "(") (binary_expression "param_3 == (uint *)0x0" (identifier "param_3") (== "==") (cast_expression "(uint *)0x0" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")"))) () ")")) (|| "||") (parenthesized_expression "(uVar4 = 0, param_2 == 0)" (( "(") (comma_expression "uVar4 = 0, param_2 == 0" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (, ",") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    uVar3 = (uint)*(byte *)(param_1 + iVar1);\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    iVar1 = iVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  } while (param_2 != iVar1);" (do "do") (compound_statement "{\n    uVar3 = (uint)*(byte *)(param_1 + iVar1);\n    uVar2 = uVar3 - 0x30 & 0xff;\n    if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }\n    if (0xfffffff < uVar4) {\n      return 0;\n    }\n    iVar1 = iVar1 + 1;\n    uVar4 = uVar2 + uVar4 * 0x10;\n  }" ({ "{") (expression_statement "uVar3 = (uint)*(byte *)(param_1 + iVar1);" (assignment_expression "uVar3 = (uint)*(byte *)(param_1 + iVar1)" (identifier "uVar3") (= "=") (binary_expression "(uint)*(byte *)(param_1 + iVar1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(byte *)(param_1 + iVar1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + iVar1)" (( "(") (binary_expression "param_1 + iVar1" (identifier "param_1") (+ "+") (identifier "iVar1")) () ")"))))) (; ";")) (expression_statement "uVar2 = uVar3 - 0x30 & 0xff;" (assignment_expression "uVar2 = uVar3 - 0x30 & 0xff" (identifier "uVar2") (= "=") (binary_expression "uVar3 - 0x30 & 0xff" (binary_expression "uVar3 - 0x30" (identifier "uVar3") (- "-") (number_literal "0x30")) (& "&") (number_literal "0xff"))) (; ";")) (if_statement "if (9 < uVar2) {\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }" (if "if") (parenthesized_expression "(9 < uVar2)" (( "(") (binary_expression "9 < uVar2" (number_literal "9") (< "<") (identifier "uVar2")) () ")")) (compound_statement "{\n      if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }\n    }" ({ "{") (if_statement "if (uVar3 - 0x41 < 6) {\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }\n      else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }" (if "if") (parenthesized_expression "(uVar3 - 0x41 < 6)" (( "(") (binary_expression "uVar3 - 0x41 < 6" (binary_expression "uVar3 - 0x41" (identifier "uVar3") (- "-") (number_literal "0x41")) (< "<") (number_literal "6")) () ")")) (compound_statement "{\n        uVar2 = uVar3 - 0x37 & 0xff;\n      }" ({ "{") (expression_statement "uVar2 = uVar3 - 0x37 & 0xff;" (assignment_expression "uVar2 = uVar3 - 0x37 & 0xff" (identifier "uVar2") (= "=") (binary_expression "uVar3 - 0x37 & 0xff" (binary_expression "uVar3 - 0x37" (identifier "uVar3") (- "-") (number_literal "0x37")) (& "&") (number_literal "0xff"))) (; ";")) (} "}")) (else_clause "else {\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }" (else "else") (compound_statement "{\n        uVar2 = uVar3 - 0x57 & 0xff;\n        if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }\n      }" ({ "{") (expression_statement "uVar2 = uVar3 - 0x57 & 0xff;" (assignment_expression "uVar2 = uVar3 - 0x57 & 0xff" (identifier "uVar2") (= "=") (binary_expression "uVar3 - 0x57 & 0xff" (binary_expression "uVar3 - 0x57" (identifier "uVar3") (- "-") (number_literal "0x57")) (& "&") (number_literal "0xff"))) (; ";")) (if_statement "if (5 < uVar3 - 0x61) {\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }" (if "if") (parenthesized_expression "(5 < uVar3 - 0x61)" (( "(") (binary_expression "5 < uVar3 - 0x61" (number_literal "5") (< "<") (binary_expression "uVar3 - 0x61" (identifier "uVar3") (- "-") (number_literal "0x61"))) () ")")) (compound_statement "{\n          if (iVar1 == 0) {\n            return 0;\n          }\n          break;\n        }" ({ "{") (if_statement "if (iVar1 == 0) {\n            return 0;\n          }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            return 0;\n          }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (break_statement "break;" (break "break") (; ";")) (} "}"))) (} "}")))) (} "}"))) (if_statement "if (0xfffffff < uVar4) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(0xfffffff < uVar4)" (( "(") (binary_expression "0xfffffff < uVar4" (number_literal "0xfffffff") (< "<") (identifier "uVar4")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar4 = uVar2 + uVar4 * 0x10;" (assignment_expression "uVar4 = uVar2 + uVar4 * 0x10" (identifier "uVar4") (= "=") (binary_expression "uVar2 + uVar4 * 0x10" (identifier "uVar2") (+ "+") (binary_expression "uVar4 * 0x10" (identifier "uVar4") (* "*") (number_literal "0x10")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_2 != iVar1)" (( "(") (binary_expression "param_2 != iVar1" (identifier "param_2") (!= "!=") (identifier "iVar1")) () ")")) (; ";")) (expression_statement "*param_3 = uVar4;" (assignment_expression "*param_3 = uVar4" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "uVar4")) (; ";")) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

size_t function_1(char *var_1,size_t var_3,uint32_t *var_2)

{
  size_t var_6;
  type_1 var_5;
  type_1 var_4;
  uint32_t var_7;
  
  if (((var_1 == (char *)0x0) || (var_2 == (uint32_t *)0x0)) || (var_7 = 0, var_3 == 0)) {
    return 0;
  }
  var_6 = 0;
  do {
    var_4 = (type_1)(type_2)var_1[var_6];
    var_5 = var_4 - 0x30 & 0xff;
    if (9 < var_5) {
      if (var_4 - 0x41 < 6) {
        var_5 = var_4 - 0x37 & 0xff;
      }
      else {
        var_5 = var_4 - 0x57 & 0xff;
        if (5 < var_4 - 0x61) {
          if (var_6 == 0) {
            return 0;
          }
          break;
        }
      }
    }
    if (0xfffffff < var_7) {
      return 0;
    }
    var_6 = var_6 + 1;
    var_7 = var_5 + var_7 * 0x10;
  } while (var_3 != var_6);
  *var_2 = var_7;
  return var_6;
}


(translation_unit (function_definition type: (primitive_type) 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))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (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: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (break_statement)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (return_statement (identifier)))))

int MASKED(int param_1,int param_2,uint *param_3)

{
  int iVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  
  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (uVar4 = 0, param_2 == 0)) {
    return 0;
  }
  iVar1 = 0;
  do {
    uVar3 = (uint)*(byte *)(param_1 + iVar1);
    uVar2 = uVar3 - 0x30 & 0xff;
    if (9 < uVar2) {
      if (uVar3 - 0x41 < 6) {
        uVar2 = uVar3 - 0x37 & 0xff;
      }
      else {
        uVar2 = uVar3 - 0x57 & 0xff;
        if (5 < uVar3 - 0x61) {
          if (iVar1 == 0) {
            return 0;
          }
          break;
        }
      }
    }
    if (0xfffffff < uVar4) {
      return 0;
    }
    iVar1 = iVar1 + 1;
    uVar4 = uVar2 + uVar4 * 0x10;
  } while (param_2 != iVar1);
  *param_3 = uVar4;
  return iVar1;
}

