
/* WARNING: Unknown calling convention */

size_t MHD_strx_to_uint64_n_(char *str,size_t maxlen,uint64_t *out_val)

{
  byte bVar1;
  char cVar2;
  uint uVar3;
  size_t sVar4;
  uint uVar5;
  uint local_1c;
  uint local_18;
  
  if (((str == (char *)0x0) || (out_val == (uint64_t *)0x0)) || (sVar4 = 0, maxlen == 0)) {
    return 0;
  }
  local_1c = 0;
  local_18 = 0;
  do {
    cVar2 = str[sVar4];
    bVar1 = cVar2 - 0x30;
    if (9 < bVar1) {
      if ((byte)(cVar2 + 0xbfU) < 6) {
        bVar1 = cVar2 - 0x37;
      }
      else {
        if (5 < (byte)(cVar2 + 0x9fU)) {
          if (sVar4 == 0) {
            return 0;
          }
          break;
        }
        bVar1 = cVar2 + 0xa9;
      }
    }
    if (0xfffffff < local_18) {
      return 0;
    }
    uVar3 = local_1c >> 0x1c;
    uVar5 = local_1c * 0x10;
    local_1c = uVar5 + bVar1;
    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);
    sVar4 = sVar4 + 1;
  } while (maxlen != sVar4);
  *(uint *)out_val = local_1c;
  *(uint *)((int)out_val + 4) = local_18;
  return sVar4;
}



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

{
  byte bVar1;
  char cVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  uint local_1c;
  uint local_18;
  
  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0)) {
    return 0;
  }
  local_1c = 0;
  local_18 = 0;
  do {
    cVar2 = *(char *)(param_1 + iVar4);
    bVar1 = cVar2 - 0x30;
    if (9 < bVar1) {
      if ((byte)(cVar2 + 0xbfU) < 6) {
        bVar1 = cVar2 - 0x37;
      }
      else {
        if (5 < (byte)(cVar2 + 0x9fU)) {
          if (iVar4 == 0) {
            return 0;
          }
          break;
        }
        bVar1 = cVar2 + 0xa9;
      }
    }
    if (0xfffffff < local_18) {
      return 0;
    }
    uVar3 = local_1c >> 0x1c;
    uVar5 = local_1c * 0x10;
    local_1c = uVar5 + bVar1;
    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);
    iVar4 = iVar4 + 1;
  } while (param_2 != iVar4);
  *param_3 = local_1c;
  param_3[1] = local_18;
  return iVar4;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0xc
MOV EDX,dword ptr [ESP + 0x20]
TEST EDX,EDX
JZ 0x00021950
MOV EAX,dword ptr [ESP + 0x28]
TEST EAX,EAX
JZ 0x00021950
MOV EBP,dword ptr [ESP + 0x24]
XOR ECX,ECX
XOR EBX,EBX
XOR EAX,EAX
TEST EBP,EBP
JZ 0x00021952
MOV dword ptr [ESP],ECX
MOV EBP,dword ptr [ESP + 0x24]
MOV dword ptr [ESP + 0x4],EBX
JMP 0x00021925
LEA ESI,[EDI + -0x61]
MOV EBX,ESI
CMP BL,0x5
JA 0x00021980
LEA ESI,[EDI + -0x57]
MOV EBX,ESI
CMP dword ptr [ESP + 0x4],0xfffffff
MOVZX ESI,BL
JA 0x00021950
MOV ECX,dword ptr [ESP]
MOV EBX,dword ptr [ESP + 0x4]
MOV EDI,ESI
SAR EDI,0x1f
SHLD EBX,ECX,0x4
SHL ECX,0x4
ADD ECX,ESI
ADC EBX,EDI
ADD EAX,0x1
MOV dword ptr [ESP],ECX
MOV dword ptr [ESP + 0x4],EBX
CMP EBP,EAX
JZ 0x00021960
MOVZX EDI,byte ptr [EDX + EAX*0x1]
LEA ESI,[EDI + -0x30]
MOV EBX,ESI
CMP BL,0x9
JBE 0x000218f3
LEA ESI,[EDI + -0x41]
MOV EBX,ESI
CMP BL,0x5
JA 0x000218e0
LEA ESI,[EDI + -0x37]
CMP dword ptr [ESP + 0x4],0xfffffff
MOV ECX,ESI
MOVZX ESI,CL
JBE 0x00021900
NOP
XOR EAX,EAX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV ECX,dword ptr [ESP]
MOV EBX,dword ptr [ESP + 0x4]
MOV EDX,dword ptr [ESP + 0x28]
MOV dword ptr [EDX],ECX
MOV dword ptr [EDX + 0x4],EBX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV ECX,dword ptr [ESP]
MOV EBX,dword ptr [ESP + 0x4]
TEST EAX,EAX
JNZ 0x00021967
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "int FUN_000218a0(int param_1,int param_2,uint *param_3)\n\n{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint local_1c;\n  uint local_18;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  local_1c = 0;\n  local_18 = 0;\n  do {\n    cVar2 = *(char *)(param_1 + iVar4);\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    iVar4 = iVar4 + 1;\n  } while (param_2 != iVar4);\n  *param_3 = local_1c;\n  param_3[1] = local_18;\n  return iVar4;\n}\n\n" (function_definition "int FUN_000218a0(int param_1,int param_2,uint *param_3)\n\n{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint local_1c;\n  uint local_18;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  local_1c = 0;\n  local_18 = 0;\n  do {\n    cVar2 = *(char *)(param_1 + iVar4);\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    iVar4 = iVar4 + 1;\n  } while (param_2 != iVar4);\n  *param_3 = local_1c;\n  param_3[1] = local_18;\n  return iVar4;\n}" primitive_type (function_declarator "FUN_000218a0(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  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint local_1c;\n  uint local_18;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  local_1c = 0;\n  local_18 = 0;\n  do {\n    cVar2 = *(char *)(param_1 + iVar4);\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    iVar4 = iVar4 + 1;\n  } while (param_2 != iVar4);\n  *param_3 = local_1c;\n  param_3[1] = local_18;\n  return iVar4;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint local_1c;" type_identifier identifier ;) (declaration "uint local_18;" type_identifier identifier ;) (if_statement "if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0)) {\n    return 0;\n  }" if (parenthesized_expression "(((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0))" ( (binary_expression "((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 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 "(iVar4 = 0, param_2 == 0)" ( (comma_expression "iVar4 = 0, param_2 == 0" (assignment_expression "iVar4 = 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 "local_1c = 0;" (assignment_expression "local_1c = 0" identifier = number_literal) ;) (expression_statement "local_18 = 0;" (assignment_expression "local_18 = 0" identifier = number_literal) ;) (do_statement "do {\n    cVar2 = *(char *)(param_1 + iVar4);\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    iVar4 = iVar4 + 1;\n  } while (param_2 != iVar4);" do (compound_statement "{\n    cVar2 = *(char *)(param_1 + iVar4);\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    iVar4 = iVar4 + 1;\n  }" { (expression_statement "cVar2 = *(char *)(param_1 + iVar4);" (assignment_expression "cVar2 = *(char *)(param_1 + iVar4)" identifier = (pointer_expression "*(char *)(param_1 + iVar4)" * (cast_expression "(char *)(param_1 + iVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar4)" ( (binary_expression "param_1 + iVar4" identifier + identifier) ))))) ;) (expression_statement "bVar1 = cVar2 - 0x30;" (assignment_expression "bVar1 = cVar2 - 0x30" identifier = (binary_expression "cVar2 - 0x30" identifier - number_literal)) ;) (if_statement "if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }" if (parenthesized_expression "(9 < bVar1)" ( (binary_expression "9 < bVar1" number_literal < identifier) )) (compound_statement "{\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }" { (if_statement "if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }" if (parenthesized_expression "((byte)(cVar2 + 0xbfU) < 6)" ( (binary_expression "(byte)(cVar2 + 0xbfU) < 6" (call_expression "(byte)(cVar2 + 0xbfU)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(cVar2 + 0xbfU)" ( (binary_expression "cVar2 + 0xbfU" identifier + number_literal) ))) < number_literal) )) (compound_statement "{\n        bVar1 = cVar2 - 0x37;\n      }" { (expression_statement "bVar1 = cVar2 - 0x37;" (assignment_expression "bVar1 = cVar2 - 0x37" identifier = (binary_expression "cVar2 - 0x37" identifier - number_literal)) ;) }) (else_clause "else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }" else (compound_statement "{\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }" { (if_statement "if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }" if (parenthesized_expression "(5 < (byte)(cVar2 + 0x9fU))" ( (binary_expression "5 < (byte)(cVar2 + 0x9fU)" number_literal < (call_expression "(byte)(cVar2 + 0x9fU)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(cVar2 + 0x9fU)" ( (binary_expression "cVar2 + 0x9fU" identifier + number_literal) )))) )) (compound_statement "{\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }" { (if_statement "if (iVar4 == 0) {\n            return 0;\n          }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n            return 0;\n          }" { (return_statement "return 0;" return number_literal ;) })) (break_statement "break;" break ;) })) (expression_statement "bVar1 = cVar2 + 0xa9;" (assignment_expression "bVar1 = cVar2 + 0xa9" identifier = (binary_expression "cVar2 + 0xa9" identifier + number_literal)) ;) }))) })) (if_statement "if (0xfffffff < local_18) {\n      return 0;\n    }" if (parenthesized_expression "(0xfffffff < local_18)" ( (binary_expression "0xfffffff < local_18" number_literal < identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar3 = local_1c >> 0x1c;" (assignment_expression "uVar3 = local_1c >> 0x1c" identifier = (binary_expression "local_1c >> 0x1c" identifier >> number_literal)) ;) (expression_statement "uVar5 = local_1c * 0x10;" (assignment_expression "uVar5 = local_1c * 0x10" identifier = (binary_expression "local_1c * 0x10" identifier * number_literal)) ;) (expression_statement "local_1c = uVar5 + bVar1;" (assignment_expression "local_1c = uVar5 + bVar1" identifier = (binary_expression "uVar5 + bVar1" identifier + identifier)) ;) (expression_statement "local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);" (assignment_expression "local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1)" identifier = (binary_expression "(local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1)" (parenthesized_expression "(local_18 << 4 | uVar3)" ( (binary_expression "local_18 << 4 | uVar3" (binary_expression "local_18 << 4" identifier << number_literal) | identifier) )) + (cast_expression "(uint)CARRY4(uVar5,(uint)bVar1)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY4(uVar5,(uint)bVar1)" identifier (argument_list "(uVar5,(uint)bVar1)" ( identifier , (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier) )))))) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 != iVar4)" ( (binary_expression "param_2 != iVar4" identifier != identifier) )) ;) (expression_statement "*param_3 = local_1c;" (assignment_expression "*param_3 = local_1c" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "param_3[1] = local_18;" (assignment_expression "param_3[1] = local_18" (subscript_expression "param_3[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nsize_t MHD_strx_to_uint64_n_(char *str,size_t maxlen,uint64_t *out_val)\n\n{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  size_t sVar4;\n  uint uVar5;\n  uint local_1c;\n  uint local_18;\n  \n  if (((str == (char *)0x0) || (out_val == (uint64_t *)0x0)) || (sVar4 = 0, maxlen == 0)) {\n    return 0;\n  }\n  local_1c = 0;\n  local_18 = 0;\n  do {\n    cVar2 = str[sVar4];\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (sVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    sVar4 = sVar4 + 1;\n  } while (maxlen != sVar4);\n  *(uint *)out_val = local_1c;\n  *(uint *)((int)out_val + 4) = local_18;\n  return sVar4;\n}\n\n" comment (function_definition "size_t MHD_strx_to_uint64_n_(char *str,size_t maxlen,uint64_t *out_val)\n\n{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  size_t sVar4;\n  uint uVar5;\n  uint local_1c;\n  uint local_18;\n  \n  if (((str == (char *)0x0) || (out_val == (uint64_t *)0x0)) || (sVar4 = 0, maxlen == 0)) {\n    return 0;\n  }\n  local_1c = 0;\n  local_18 = 0;\n  do {\n    cVar2 = str[sVar4];\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (sVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    sVar4 = sVar4 + 1;\n  } while (maxlen != sVar4);\n  *(uint *)out_val = local_1c;\n  *(uint *)((int)out_val + 4) = local_18;\n  return sVar4;\n}" primitive_type (function_declarator "MHD_strx_to_uint64_n_(char *str,size_t maxlen,uint64_t *out_val)" identifier (parameter_list "(char *str,size_t maxlen,uint64_t *out_val)" ( (parameter_declaration "char *str" primitive_type (pointer_declarator "*str" * identifier)) , (parameter_declaration "size_t maxlen" primitive_type identifier) , (parameter_declaration "uint64_t *out_val" primitive_type (pointer_declarator "*out_val" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  size_t sVar4;\n  uint uVar5;\n  uint local_1c;\n  uint local_18;\n  \n  if (((str == (char *)0x0) || (out_val == (uint64_t *)0x0)) || (sVar4 = 0, maxlen == 0)) {\n    return 0;\n  }\n  local_1c = 0;\n  local_18 = 0;\n  do {\n    cVar2 = str[sVar4];\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (sVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    sVar4 = sVar4 + 1;\n  } while (maxlen != sVar4);\n  *(uint *)out_val = local_1c;\n  *(uint *)((int)out_val + 4) = local_18;\n  return sVar4;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint local_1c;" type_identifier identifier ;) (declaration "uint local_18;" type_identifier identifier ;) (if_statement "if (((str == (char *)0x0) || (out_val == (uint64_t *)0x0)) || (sVar4 = 0, maxlen == 0)) {\n    return 0;\n  }" if (parenthesized_expression "(((str == (char *)0x0) || (out_val == (uint64_t *)0x0)) || (sVar4 = 0, maxlen == 0))" ( (binary_expression "((str == (char *)0x0) || (out_val == (uint64_t *)0x0)) || (sVar4 = 0, maxlen == 0)" (parenthesized_expression "((str == (char *)0x0) || (out_val == (uint64_t *)0x0))" ( (binary_expression "(str == (char *)0x0) || (out_val == (uint64_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 == (uint64_t *)0x0)" ( (binary_expression "out_val == (uint64_t *)0x0" identifier == (cast_expression "(uint64_t *)0x0" ( (type_descriptor "uint64_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) || (parenthesized_expression "(sVar4 = 0, maxlen == 0)" ( (comma_expression "sVar4 = 0, maxlen == 0" (assignment_expression "sVar4 = 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 "local_1c = 0;" (assignment_expression "local_1c = 0" identifier = number_literal) ;) (expression_statement "local_18 = 0;" (assignment_expression "local_18 = 0" identifier = number_literal) ;) (do_statement "do {\n    cVar2 = str[sVar4];\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (sVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    sVar4 = sVar4 + 1;\n  } while (maxlen != sVar4);" do (compound_statement "{\n    cVar2 = str[sVar4];\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (sVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    sVar4 = sVar4 + 1;\n  }" { (expression_statement "cVar2 = str[sVar4];" (assignment_expression "cVar2 = str[sVar4]" identifier = (subscript_expression "str[sVar4]" identifier [ identifier ])) ;) (expression_statement "bVar1 = cVar2 - 0x30;" (assignment_expression "bVar1 = cVar2 - 0x30" identifier = (binary_expression "cVar2 - 0x30" identifier - number_literal)) ;) (if_statement "if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (sVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }" if (parenthesized_expression "(9 < bVar1)" ( (binary_expression "9 < bVar1" number_literal < identifier) )) (compound_statement "{\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (sVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }" { (if_statement "if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (sVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }" if (parenthesized_expression "((byte)(cVar2 + 0xbfU) < 6)" ( (binary_expression "(byte)(cVar2 + 0xbfU) < 6" (call_expression "(byte)(cVar2 + 0xbfU)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(cVar2 + 0xbfU)" ( (binary_expression "cVar2 + 0xbfU" identifier + number_literal) ))) < number_literal) )) (compound_statement "{\n        bVar1 = cVar2 - 0x37;\n      }" { (expression_statement "bVar1 = cVar2 - 0x37;" (assignment_expression "bVar1 = cVar2 - 0x37" identifier = (binary_expression "cVar2 - 0x37" identifier - number_literal)) ;) }) (else_clause "else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (sVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }" else (compound_statement "{\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (sVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }" { (if_statement "if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (sVar4 == 0) {\n            return 0;\n          }\n          break;\n        }" if (parenthesized_expression "(5 < (byte)(cVar2 + 0x9fU))" ( (binary_expression "5 < (byte)(cVar2 + 0x9fU)" number_literal < (call_expression "(byte)(cVar2 + 0x9fU)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(cVar2 + 0x9fU)" ( (binary_expression "cVar2 + 0x9fU" identifier + number_literal) )))) )) (compound_statement "{\n          if (sVar4 == 0) {\n            return 0;\n          }\n          break;\n        }" { (if_statement "if (sVar4 == 0) {\n            return 0;\n          }" if (parenthesized_expression "(sVar4 == 0)" ( (binary_expression "sVar4 == 0" identifier == number_literal) )) (compound_statement "{\n            return 0;\n          }" { (return_statement "return 0;" return number_literal ;) })) (break_statement "break;" break ;) })) (expression_statement "bVar1 = cVar2 + 0xa9;" (assignment_expression "bVar1 = cVar2 + 0xa9" identifier = (binary_expression "cVar2 + 0xa9" identifier + number_literal)) ;) }))) })) (if_statement "if (0xfffffff < local_18) {\n      return 0;\n    }" if (parenthesized_expression "(0xfffffff < local_18)" ( (binary_expression "0xfffffff < local_18" number_literal < identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar3 = local_1c >> 0x1c;" (assignment_expression "uVar3 = local_1c >> 0x1c" identifier = (binary_expression "local_1c >> 0x1c" identifier >> number_literal)) ;) (expression_statement "uVar5 = local_1c * 0x10;" (assignment_expression "uVar5 = local_1c * 0x10" identifier = (binary_expression "local_1c * 0x10" identifier * number_literal)) ;) (expression_statement "local_1c = uVar5 + bVar1;" (assignment_expression "local_1c = uVar5 + bVar1" identifier = (binary_expression "uVar5 + bVar1" identifier + identifier)) ;) (expression_statement "local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);" (assignment_expression "local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1)" identifier = (binary_expression "(local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1)" (parenthesized_expression "(local_18 << 4 | uVar3)" ( (binary_expression "local_18 << 4 | uVar3" (binary_expression "local_18 << 4" identifier << number_literal) | identifier) )) + (cast_expression "(uint)CARRY4(uVar5,(uint)bVar1)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY4(uVar5,(uint)bVar1)" identifier (argument_list "(uVar5,(uint)bVar1)" ( identifier , (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier) )))))) ;) (expression_statement "sVar4 = sVar4 + 1;" (assignment_expression "sVar4 = sVar4 + 1" identifier = (binary_expression "sVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(maxlen != sVar4)" ( (binary_expression "maxlen != sVar4" identifier != identifier) )) ;) (expression_statement "*(uint *)out_val = local_1c;" (assignment_expression "*(uint *)out_val = local_1c" (pointer_expression "*(uint *)out_val" * (cast_expression "(uint *)out_val" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;) (expression_statement "*(uint *)((int)out_val + 4) = local_18;" (assignment_expression "*(uint *)((int)out_val + 4) = local_18" (pointer_expression "*(uint *)((int)out_val + 4)" * (cast_expression "(uint *)((int)out_val + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)out_val + 4)" ( (binary_expression "(int)out_val + 4" (cast_expression "(int)out_val" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (return_statement "return sVar4;" return identifier ;) })))
(translation_unit "int FUN_000218a0(int param_1,int param_2,uint *param_3)\n\n{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint local_1c;\n  uint local_18;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  local_1c = 0;\n  local_18 = 0;\n  do {\n    cVar2 = *(char *)(param_1 + iVar4);\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    iVar4 = iVar4 + 1;\n  } while (param_2 != iVar4);\n  *param_3 = local_1c;\n  param_3[1] = local_18;\n  return iVar4;\n}\n\n" (function_definition "int FUN_000218a0(int param_1,int param_2,uint *param_3)\n\n{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint local_1c;\n  uint local_18;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  local_1c = 0;\n  local_18 = 0;\n  do {\n    cVar2 = *(char *)(param_1 + iVar4);\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    iVar4 = iVar4 + 1;\n  } while (param_2 != iVar4);\n  *param_3 = local_1c;\n  param_3[1] = local_18;\n  return iVar4;\n}" primitive_type (function_declarator "FUN_000218a0(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  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint local_1c;\n  uint local_18;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  local_1c = 0;\n  local_18 = 0;\n  do {\n    cVar2 = *(char *)(param_1 + iVar4);\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    iVar4 = iVar4 + 1;\n  } while (param_2 != iVar4);\n  *param_3 = local_1c;\n  param_3[1] = local_18;\n  return iVar4;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint local_1c;" type_identifier identifier ;) (declaration "uint local_18;" type_identifier identifier ;) (if_statement "if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0)) {\n    return 0;\n  }" if (parenthesized_expression "(((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0))" ( (binary_expression "((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 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 "(iVar4 = 0, param_2 == 0)" ( (comma_expression "iVar4 = 0, param_2 == 0" (assignment_expression "iVar4 = 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 "local_1c = 0;" (assignment_expression "local_1c = 0" identifier = number_literal) ;) (expression_statement "local_18 = 0;" (assignment_expression "local_18 = 0" identifier = number_literal) ;) (do_statement "do {\n    cVar2 = *(char *)(param_1 + iVar4);\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    iVar4 = iVar4 + 1;\n  } while (param_2 != iVar4);" do (compound_statement "{\n    cVar2 = *(char *)(param_1 + iVar4);\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    iVar4 = iVar4 + 1;\n  }" { (expression_statement "cVar2 = *(char *)(param_1 + iVar4);" (assignment_expression "cVar2 = *(char *)(param_1 + iVar4)" identifier = (pointer_expression "*(char *)(param_1 + iVar4)" * (cast_expression "(char *)(param_1 + iVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar4)" ( (binary_expression "param_1 + iVar4" identifier + identifier) ))))) ;) (expression_statement "bVar1 = cVar2 - 0x30;" (assignment_expression "bVar1 = cVar2 - 0x30" identifier = (binary_expression "cVar2 - 0x30" identifier - number_literal)) ;) (if_statement "if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }" if (parenthesized_expression "(9 < bVar1)" ( (binary_expression "9 < bVar1" number_literal < identifier) )) (compound_statement "{\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }" { (if_statement "if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }" if (parenthesized_expression "((byte)(cVar2 + 0xbfU) < 6)" ( (binary_expression "(byte)(cVar2 + 0xbfU) < 6" (call_expression "(byte)(cVar2 + 0xbfU)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(cVar2 + 0xbfU)" ( (binary_expression "cVar2 + 0xbfU" identifier + number_literal) ))) < number_literal) )) (compound_statement "{\n        bVar1 = cVar2 - 0x37;\n      }" { (expression_statement "bVar1 = cVar2 - 0x37;" (assignment_expression "bVar1 = cVar2 - 0x37" identifier = (binary_expression "cVar2 - 0x37" identifier - number_literal)) ;) }) (else_clause "else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }" else (compound_statement "{\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }" { (if_statement "if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }" if (parenthesized_expression "(5 < (byte)(cVar2 + 0x9fU))" ( (binary_expression "5 < (byte)(cVar2 + 0x9fU)" number_literal < (call_expression "(byte)(cVar2 + 0x9fU)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(cVar2 + 0x9fU)" ( (binary_expression "cVar2 + 0x9fU" identifier + number_literal) )))) )) (compound_statement "{\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }" { (if_statement "if (iVar4 == 0) {\n            return 0;\n          }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n            return 0;\n          }" { (return_statement "return 0;" return number_literal ;) })) (break_statement "break;" break ;) })) (expression_statement "bVar1 = cVar2 + 0xa9;" (assignment_expression "bVar1 = cVar2 + 0xa9" identifier = (binary_expression "cVar2 + 0xa9" identifier + number_literal)) ;) }))) })) (if_statement "if (0xfffffff < local_18) {\n      return 0;\n    }" if (parenthesized_expression "(0xfffffff < local_18)" ( (binary_expression "0xfffffff < local_18" number_literal < identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar3 = local_1c >> 0x1c;" (assignment_expression "uVar3 = local_1c >> 0x1c" identifier = (binary_expression "local_1c >> 0x1c" identifier >> number_literal)) ;) (expression_statement "uVar5 = local_1c * 0x10;" (assignment_expression "uVar5 = local_1c * 0x10" identifier = (binary_expression "local_1c * 0x10" identifier * number_literal)) ;) (expression_statement "local_1c = uVar5 + bVar1;" (assignment_expression "local_1c = uVar5 + bVar1" identifier = (binary_expression "uVar5 + bVar1" identifier + identifier)) ;) (expression_statement "local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);" (assignment_expression "local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1)" identifier = (binary_expression "(local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1)" (parenthesized_expression "(local_18 << 4 | uVar3)" ( (binary_expression "local_18 << 4 | uVar3" (binary_expression "local_18 << 4" identifier << number_literal) | identifier) )) + (cast_expression "(uint)CARRY4(uVar5,(uint)bVar1)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY4(uVar5,(uint)bVar1)" identifier (argument_list "(uVar5,(uint)bVar1)" ( identifier , (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier) )))))) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 != iVar4)" ( (binary_expression "param_2 != iVar4" identifier != identifier) )) ;) (expression_statement "*param_3 = local_1c;" (assignment_expression "*param_3 = local_1c" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "param_3[1] = local_18;" (assignment_expression "param_3[1] = local_18" (subscript_expression "param_3[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return iVar4;" 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 ;) (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) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) )))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (break_statement break ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) })) (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 * LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT << LIT) | IDENT) )) + (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE) ) IDENT) )))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_000218a0(int param_1,int param_2,uint *param_3)\n\n{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint local_1c;\n  uint local_18;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  local_1c = 0;\n  local_18 = 0;\n  do {\n    cVar2 = *(char *)(param_1 + iVar4);\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    iVar4 = iVar4 + 1;\n  } while (param_2 != iVar4);\n  *param_3 = local_1c;\n  param_3[1] = local_18;\n  return iVar4;\n}" (primitive_type "int") (function_declarator "FUN_000218a0(int param_1,int param_2,uint *param_3)" (identifier "FUN_000218a0") (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  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  uint local_1c;\n  uint local_18;\n  \n  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0)) {\n    return 0;\n  }\n  local_1c = 0;\n  local_18 = 0;\n  do {\n    cVar2 = *(char *)(param_1 + iVar4);\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    iVar4 = iVar4 + 1;\n  } while (param_2 != iVar4);\n  *param_3 = local_1c;\n  param_3[1] = local_18;\n  return iVar4;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "char cVar2;" (primitive_type "char") (identifier "cVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "uint local_1c;" (type_identifier "uint") (identifier "local_1c") (; ";")) (declaration "uint local_18;" (type_identifier "uint") (identifier "local_18") (; ";")) (if_statement "if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0)) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0))" (( "(") (binary_expression "((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 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 "(iVar4 = 0, param_2 == 0)" (( "(") (comma_expression "iVar4 = 0, param_2 == 0" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (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 "local_1c = 0;" (assignment_expression "local_1c = 0" (identifier "local_1c") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_18 = 0;" (assignment_expression "local_18 = 0" (identifier "local_18") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    cVar2 = *(char *)(param_1 + iVar4);\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    iVar4 = iVar4 + 1;\n  } while (param_2 != iVar4);" (do "do") (compound_statement "{\n    cVar2 = *(char *)(param_1 + iVar4);\n    bVar1 = cVar2 - 0x30;\n    if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }\n    if (0xfffffff < local_18) {\n      return 0;\n    }\n    uVar3 = local_1c >> 0x1c;\n    uVar5 = local_1c * 0x10;\n    local_1c = uVar5 + bVar1;\n    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);\n    iVar4 = iVar4 + 1;\n  }" ({ "{") (expression_statement "cVar2 = *(char *)(param_1 + iVar4);" (assignment_expression "cVar2 = *(char *)(param_1 + iVar4)" (identifier "cVar2") (= "=") (pointer_expression "*(char *)(param_1 + iVar4)" (* "*") (cast_expression "(char *)(param_1 + iVar4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + iVar4)" (( "(") (binary_expression "param_1 + iVar4" (identifier "param_1") (+ "+") (identifier "iVar4")) () ")"))))) (; ";")) (expression_statement "bVar1 = cVar2 - 0x30;" (assignment_expression "bVar1 = cVar2 - 0x30" (identifier "bVar1") (= "=") (binary_expression "cVar2 - 0x30" (identifier "cVar2") (- "-") (number_literal "0x30"))) (; ";")) (if_statement "if (9 < bVar1) {\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }" (if "if") (parenthesized_expression "(9 < bVar1)" (( "(") (binary_expression "9 < bVar1" (number_literal "9") (< "<") (identifier "bVar1")) () ")")) (compound_statement "{\n      if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }\n    }" ({ "{") (if_statement "if ((byte)(cVar2 + 0xbfU) < 6) {\n        bVar1 = cVar2 - 0x37;\n      }\n      else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }" (if "if") (parenthesized_expression "((byte)(cVar2 + 0xbfU) < 6)" (( "(") (binary_expression "(byte)(cVar2 + 0xbfU) < 6" (call_expression "(byte)(cVar2 + 0xbfU)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(cVar2 + 0xbfU)" (( "(") (binary_expression "cVar2 + 0xbfU" (identifier "cVar2") (+ "+") (number_literal "0xbfU")) () ")"))) (< "<") (number_literal "6")) () ")")) (compound_statement "{\n        bVar1 = cVar2 - 0x37;\n      }" ({ "{") (expression_statement "bVar1 = cVar2 - 0x37;" (assignment_expression "bVar1 = cVar2 - 0x37" (identifier "bVar1") (= "=") (binary_expression "cVar2 - 0x37" (identifier "cVar2") (- "-") (number_literal "0x37"))) (; ";")) (} "}")) (else_clause "else {\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }" (else "else") (compound_statement "{\n        if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }\n        bVar1 = cVar2 + 0xa9;\n      }" ({ "{") (if_statement "if (5 < (byte)(cVar2 + 0x9fU)) {\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }" (if "if") (parenthesized_expression "(5 < (byte)(cVar2 + 0x9fU))" (( "(") (binary_expression "5 < (byte)(cVar2 + 0x9fU)" (number_literal "5") (< "<") (call_expression "(byte)(cVar2 + 0x9fU)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(cVar2 + 0x9fU)" (( "(") (binary_expression "cVar2 + 0x9fU" (identifier "cVar2") (+ "+") (number_literal "0x9fU")) () ")")))) () ")")) (compound_statement "{\n          if (iVar4 == 0) {\n            return 0;\n          }\n          break;\n        }" ({ "{") (if_statement "if (iVar4 == 0) {\n            return 0;\n          }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            return 0;\n          }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (break_statement "break;" (break "break") (; ";")) (} "}"))) (expression_statement "bVar1 = cVar2 + 0xa9;" (assignment_expression "bVar1 = cVar2 + 0xa9" (identifier "bVar1") (= "=") (binary_expression "cVar2 + 0xa9" (identifier "cVar2") (+ "+") (number_literal "0xa9"))) (; ";")) (} "}")))) (} "}"))) (if_statement "if (0xfffffff < local_18) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(0xfffffff < local_18)" (( "(") (binary_expression "0xfffffff < local_18" (number_literal "0xfffffff") (< "<") (identifier "local_18")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar3 = local_1c >> 0x1c;" (assignment_expression "uVar3 = local_1c >> 0x1c" (identifier "uVar3") (= "=") (binary_expression "local_1c >> 0x1c" (identifier "local_1c") (>> ">>") (number_literal "0x1c"))) (; ";")) (expression_statement "uVar5 = local_1c * 0x10;" (assignment_expression "uVar5 = local_1c * 0x10" (identifier "uVar5") (= "=") (binary_expression "local_1c * 0x10" (identifier "local_1c") (* "*") (number_literal "0x10"))) (; ";")) (expression_statement "local_1c = uVar5 + bVar1;" (assignment_expression "local_1c = uVar5 + bVar1" (identifier "local_1c") (= "=") (binary_expression "uVar5 + bVar1" (identifier "uVar5") (+ "+") (identifier "bVar1"))) (; ";")) (expression_statement "local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);" (assignment_expression "local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1)" (identifier "local_18") (= "=") (binary_expression "(local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1)" (parenthesized_expression "(local_18 << 4 | uVar3)" (( "(") (binary_expression "local_18 << 4 | uVar3" (binary_expression "local_18 << 4" (identifier "local_18") (<< "<<") (number_literal "4")) (| "|") (identifier "uVar3")) () ")")) (+ "+") (cast_expression "(uint)CARRY4(uVar5,(uint)bVar1)" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (call_expression "CARRY4(uVar5,(uint)bVar1)" (identifier "CARRY4") (argument_list "(uVar5,(uint)bVar1)" (( "(") (identifier "uVar5") (, ",") (cast_expression "(uint)bVar1" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar1")) () ")")))))) (; ";")) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_2 != iVar4)" (( "(") (binary_expression "param_2 != iVar4" (identifier "param_2") (!= "!=") (identifier "iVar4")) () ")")) (; ";")) (expression_statement "*param_3 = local_1c;" (assignment_expression "*param_3 = local_1c" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "local_1c")) (; ";")) (expression_statement "param_3[1] = local_18;" (assignment_expression "param_3[1] = local_18" (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "local_18")) (; ";")) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

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

{
  type_1 var_5;
  char var_4;
  type_2 var_10;
  size_t var_6;
  type_2 var_9;
  type_2 var_8;
  type_2 var_7;
  
  if (((var_1 == (char *)0x0) || (var_2 == (uint64_t *)0x0)) || (var_6 = 0, var_3 == 0)) {
    return 0;
  }
  var_8 = 0;
  var_7 = 0;
  do {
    var_4 = var_1[var_6];
    var_5 = var_4 - 0x30;
    if (9 < var_5) {
      if ((type_1)(var_4 + 0xbfU) < 6) {
        var_5 = var_4 - 0x37;
      }
      else {
        if (5 < (type_1)(var_4 + 0x9fU)) {
          if (var_6 == 0) {
            return 0;
          }
          break;
        }
        var_5 = var_4 + 0xa9;
      }
    }
    if (0xfffffff < var_7) {
      return 0;
    }
    var_10 = var_8 >> 0x1c;
    var_9 = var_8 * 0x10;
    var_8 = var_9 + var_5;
    var_7 = (var_7 << 4 | var_10) + (type_2)var_11(var_9,(type_2)var_5);
    var_6 = var_6 + 1;
  } while (var_3 != var_6);
  *(type_2 *)var_2 = var_8;
  *(type_2 *)((int)var_2 + 4) = 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: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (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))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) 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: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (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))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))))))) (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: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))))))) (expression_statement (assignment_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))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (return_statement (identifier)))))

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

{
  byte bVar1;
  char cVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  uint local_1c;
  uint local_18;
  
  if (((param_1 == 0) || (param_3 == (uint *)0x0)) || (iVar4 = 0, param_2 == 0)) {
    return 0;
  }
  local_1c = 0;
  local_18 = 0;
  do {
    cVar2 = *(char *)(param_1 + iVar4);
    bVar1 = cVar2 - 0x30;
    if (9 < bVar1) {
      if ((byte)(cVar2 + 0xbfU) < 6) {
        bVar1 = cVar2 - 0x37;
      }
      else {
        if (5 < (byte)(cVar2 + 0x9fU)) {
          if (iVar4 == 0) {
            return 0;
          }
          break;
        }
        bVar1 = cVar2 + 0xa9;
      }
    }
    if (0xfffffff < local_18) {
      return 0;
    }
    uVar3 = local_1c >> 0x1c;
    uVar5 = local_1c * 0x10;
    local_1c = uVar5 + bVar1;
    local_18 = (local_18 << 4 | uVar3) + (uint)CARRY4(uVar5,(uint)bVar1);
    iVar4 = iVar4 + 1;
  } while (param_2 != iVar4);
  *param_3 = local_1c;
  param_3[1] = local_18;
  return iVar4;
}

