
/* WARNING: Unknown calling convention */

Bignum_conflict bigmod(Bignum_conflict a,Bignum_conflict b)

{
  BignumInt BVar1;
  Bignum_conflict result;
  uint uVar2;
  
  result = newbn(*b);
  bigdivmod(a,b,result,(Bignum_conflict)0x0);
  uVar2 = *result;
  if (1 < uVar2) {
    BVar1 = result[uVar2];
    while (BVar1 == 0) {
      uVar2 = uVar2 - 1;
      *result = uVar2;
      if (uVar2 == 1) {
        return result;
      }
      BVar1 = result[uVar2];
    }
  }
  return result;
}



uint * FUN_00046e60(void)

{
  uint uVar1;
  uint *puVar2;
  uint uVar3;
  
  puVar2 = (uint *)FUN_00044fc0();
  FUN_00044db0(0);
  uVar3 = *puVar2;
  if (1 < uVar3) {
    uVar1 = puVar2[uVar3];
    while (uVar1 == 0) {
      uVar3 = uVar3 - 1;
      *puVar2 = uVar3;
      if (uVar3 == 1) {
        return puVar2;
      }
      uVar1 = puVar2[uVar3];
    }
  }
  return puVar2;
}


PUSH ESI
PUSH EBX
SUB ESP,0x4
MOV ESI,dword ptr [ESP + 0x14]
MOV EAX,dword ptr [ESI]
CALL 0x00044fc0
SUB ESP,0xc
MOV EDX,ESI
PUSH 0x0
MOV EBX,EAX
MOV ECX,EAX
MOV EAX,dword ptr [ESP + 0x20]
CALL 0x00044db0
MOV EAX,dword ptr [EBX]
ADD ESP,0x10
CMP EAX,0x1
JBE 0x00046eb2
MOV ECX,dword ptr [EBX + EAX*0x4]
TEST ECX,ECX
JNZ 0x00046eb2
SUB EAX,0x1
JMP 0x00046eab
SUB EAX,0x1
MOV EDX,dword ptr [EBX + EAX*0x4 + 0x4]
TEST EDX,EDX
JNZ 0x00046eb2
MOV dword ptr [EBX],EAX
CMP EAX,0x1
JNZ 0x00046ea0
ADD ESP,0x4
MOV EAX,EBX
POP EBX
POP ESI
RET
(translation_unit "uint * FUN_00046e60(void)\n\n{\n  uint uVar1;\n  uint *puVar2;\n  uint uVar3;\n  \n  puVar2 = (uint *)FUN_00044fc0();\n  FUN_00044db0(0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    uVar1 = puVar2[uVar3];\n    while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }\n  }\n  return puVar2;\n}\n\n" (function_definition "uint * FUN_00046e60(void)\n\n{\n  uint uVar1;\n  uint *puVar2;\n  uint uVar3;\n  \n  puVar2 = (uint *)FUN_00044fc0();\n  FUN_00044db0(0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    uVar1 = puVar2[uVar3];\n    while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }\n  }\n  return puVar2;\n}" type_identifier (pointer_declarator "* FUN_00046e60(void)" * (function_declarator "FUN_00046e60(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  uint uVar1;\n  uint *puVar2;\n  uint uVar3;\n  \n  puVar2 = (uint *)FUN_00044fc0();\n  FUN_00044db0(0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    uVar1 = puVar2[uVar3];\n    while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }\n  }\n  return puVar2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "puVar2 = (uint *)FUN_00044fc0();" (assignment_expression "puVar2 = (uint *)FUN_00044fc0()" identifier = (cast_expression "(uint *)FUN_00044fc0()" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00044fc0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "FUN_00044db0(0);" (call_expression "FUN_00044db0(0)" identifier (argument_list "(0)" ( number_literal ))) ;) (expression_statement "uVar3 = *puVar2;" (assignment_expression "uVar3 = *puVar2" identifier = (pointer_expression "*puVar2" * identifier)) ;) (if_statement "if (1 < uVar3) {\n    uVar1 = puVar2[uVar3];\n    while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }\n  }" if (parenthesized_expression "(1 < uVar3)" ( (binary_expression "1 < uVar3" number_literal < identifier) )) (compound_statement "{\n    uVar1 = puVar2[uVar3];\n    while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }\n  }" { (expression_statement "uVar1 = puVar2[uVar3];" (assignment_expression "uVar1 = puVar2[uVar3]" identifier = (subscript_expression "puVar2[uVar3]" identifier [ identifier ])) ;) (while_statement "while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }" while (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }" { (expression_statement "uVar3 = uVar3 - 1;" (assignment_expression "uVar3 = uVar3 - 1" identifier = (binary_expression "uVar3 - 1" identifier - number_literal)) ;) (expression_statement "*puVar2 = uVar3;" (assignment_expression "*puVar2 = uVar3" (pointer_expression "*puVar2" * identifier) = identifier) ;) (if_statement "if (uVar3 == 1) {\n        return puVar2;\n      }" if (parenthesized_expression "(uVar3 == 1)" ( (binary_expression "uVar3 == 1" identifier == number_literal) )) (compound_statement "{\n        return puVar2;\n      }" { (return_statement "return puVar2;" return identifier ;) })) (expression_statement "uVar1 = puVar2[uVar3];" (assignment_expression "uVar1 = puVar2[uVar3]" identifier = (subscript_expression "puVar2[uVar3]" identifier [ identifier ])) ;) })) })) (return_statement "return puVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nBignum_conflict bigmod(Bignum_conflict a,Bignum_conflict b)\n\n{\n  BignumInt BVar1;\n  Bignum_conflict result;\n  uint uVar2;\n  \n  result = newbn(*b);\n  bigdivmod(a,b,result,(Bignum_conflict)0x0);\n  uVar2 = *result;\n  if (1 < uVar2) {\n    BVar1 = result[uVar2];\n    while (BVar1 == 0) {\n      uVar2 = uVar2 - 1;\n      *result = uVar2;\n      if (uVar2 == 1) {\n        return result;\n      }\n      BVar1 = result[uVar2];\n    }\n  }\n  return result;\n}\n\n" comment (function_definition "Bignum_conflict bigmod(Bignum_conflict a,Bignum_conflict b)\n\n{\n  BignumInt BVar1;\n  Bignum_conflict result;\n  uint uVar2;\n  \n  result = newbn(*b);\n  bigdivmod(a,b,result,(Bignum_conflict)0x0);\n  uVar2 = *result;\n  if (1 < uVar2) {\n    BVar1 = result[uVar2];\n    while (BVar1 == 0) {\n      uVar2 = uVar2 - 1;\n      *result = uVar2;\n      if (uVar2 == 1) {\n        return result;\n      }\n      BVar1 = result[uVar2];\n    }\n  }\n  return result;\n}" type_identifier (function_declarator "bigmod(Bignum_conflict a,Bignum_conflict b)" identifier (parameter_list "(Bignum_conflict a,Bignum_conflict b)" ( (parameter_declaration "Bignum_conflict a" type_identifier identifier) , (parameter_declaration "Bignum_conflict b" type_identifier identifier) ))) (compound_statement "{\n  BignumInt BVar1;\n  Bignum_conflict result;\n  uint uVar2;\n  \n  result = newbn(*b);\n  bigdivmod(a,b,result,(Bignum_conflict)0x0);\n  uVar2 = *result;\n  if (1 < uVar2) {\n    BVar1 = result[uVar2];\n    while (BVar1 == 0) {\n      uVar2 = uVar2 - 1;\n      *result = uVar2;\n      if (uVar2 == 1) {\n        return result;\n      }\n      BVar1 = result[uVar2];\n    }\n  }\n  return result;\n}" { (declaration "BignumInt BVar1;" type_identifier identifier ;) (declaration "Bignum_conflict result;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "result = newbn(*b);" (assignment_expression "result = newbn(*b)" identifier = (call_expression "newbn(*b)" identifier (argument_list "(*b)" ( (pointer_expression "*b" * identifier) )))) ;) (expression_statement "bigdivmod(a,b,result,(Bignum_conflict)0x0);" (call_expression "bigdivmod(a,b,result,(Bignum_conflict)0x0)" identifier (argument_list "(a,b,result,(Bignum_conflict)0x0)" ( identifier , identifier , identifier , (cast_expression "(Bignum_conflict)0x0" ( (type_descriptor "Bignum_conflict" type_identifier) ) number_literal) ))) ;) (expression_statement "uVar2 = *result;" (assignment_expression "uVar2 = *result" identifier = (pointer_expression "*result" * identifier)) ;) (if_statement "if (1 < uVar2) {\n    BVar1 = result[uVar2];\n    while (BVar1 == 0) {\n      uVar2 = uVar2 - 1;\n      *result = uVar2;\n      if (uVar2 == 1) {\n        return result;\n      }\n      BVar1 = result[uVar2];\n    }\n  }" if (parenthesized_expression "(1 < uVar2)" ( (binary_expression "1 < uVar2" number_literal < identifier) )) (compound_statement "{\n    BVar1 = result[uVar2];\n    while (BVar1 == 0) {\n      uVar2 = uVar2 - 1;\n      *result = uVar2;\n      if (uVar2 == 1) {\n        return result;\n      }\n      BVar1 = result[uVar2];\n    }\n  }" { (expression_statement "BVar1 = result[uVar2];" (assignment_expression "BVar1 = result[uVar2]" identifier = (subscript_expression "result[uVar2]" identifier [ identifier ])) ;) (while_statement "while (BVar1 == 0) {\n      uVar2 = uVar2 - 1;\n      *result = uVar2;\n      if (uVar2 == 1) {\n        return result;\n      }\n      BVar1 = result[uVar2];\n    }" while (parenthesized_expression "(BVar1 == 0)" ( (binary_expression "BVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = uVar2 - 1;\n      *result = uVar2;\n      if (uVar2 == 1) {\n        return result;\n      }\n      BVar1 = result[uVar2];\n    }" { (expression_statement "uVar2 = uVar2 - 1;" (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ;) (expression_statement "*result = uVar2;" (assignment_expression "*result = uVar2" (pointer_expression "*result" * identifier) = identifier) ;) (if_statement "if (uVar2 == 1) {\n        return result;\n      }" if (parenthesized_expression "(uVar2 == 1)" ( (binary_expression "uVar2 == 1" identifier == number_literal) )) (compound_statement "{\n        return result;\n      }" { (return_statement "return result;" return identifier ;) })) (expression_statement "BVar1 = result[uVar2];" (assignment_expression "BVar1 = result[uVar2]" identifier = (subscript_expression "result[uVar2]" identifier [ identifier ])) ;) })) })) (return_statement "return result;" return identifier ;) })))
(translation_unit "uint * FUN_00046e60(void)\n\n{\n  uint uVar1;\n  uint *puVar2;\n  uint uVar3;\n  \n  puVar2 = (uint *)FUN_00044fc0();\n  FUN_00044db0(0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    uVar1 = puVar2[uVar3];\n    while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }\n  }\n  return puVar2;\n}\n\n" (function_definition "uint * FUN_00046e60(void)\n\n{\n  uint uVar1;\n  uint *puVar2;\n  uint uVar3;\n  \n  puVar2 = (uint *)FUN_00044fc0();\n  FUN_00044db0(0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    uVar1 = puVar2[uVar3];\n    while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }\n  }\n  return puVar2;\n}" type_identifier (pointer_declarator "* FUN_00046e60(void)" * (function_declarator "FUN_00046e60(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  uint uVar1;\n  uint *puVar2;\n  uint uVar3;\n  \n  puVar2 = (uint *)FUN_00044fc0();\n  FUN_00044db0(0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    uVar1 = puVar2[uVar3];\n    while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }\n  }\n  return puVar2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "puVar2 = (uint *)FUN_00044fc0();" (assignment_expression "puVar2 = (uint *)FUN_00044fc0()" identifier = (cast_expression "(uint *)FUN_00044fc0()" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00044fc0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "FUN_00044db0(0);" (call_expression "FUN_00044db0(0)" identifier (argument_list "(0)" ( number_literal ))) ;) (expression_statement "uVar3 = *puVar2;" (assignment_expression "uVar3 = *puVar2" identifier = (pointer_expression "*puVar2" * identifier)) ;) (if_statement "if (1 < uVar3) {\n    uVar1 = puVar2[uVar3];\n    while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }\n  }" if (parenthesized_expression "(1 < uVar3)" ( (binary_expression "1 < uVar3" number_literal < identifier) )) (compound_statement "{\n    uVar1 = puVar2[uVar3];\n    while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }\n  }" { (expression_statement "uVar1 = puVar2[uVar3];" (assignment_expression "uVar1 = puVar2[uVar3]" identifier = (subscript_expression "puVar2[uVar3]" identifier [ identifier ])) ;) (while_statement "while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }" while (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }" { (expression_statement "uVar3 = uVar3 - 1;" (assignment_expression "uVar3 = uVar3 - 1" identifier = (binary_expression "uVar3 - 1" identifier - number_literal)) ;) (expression_statement "*puVar2 = uVar3;" (assignment_expression "*puVar2 = uVar3" (pointer_expression "*puVar2" * identifier) = identifier) ;) (if_statement "if (uVar3 == 1) {\n        return puVar2;\n      }" if (parenthesized_expression "(uVar3 == 1)" ( (binary_expression "uVar3 == 1" identifier == number_literal) )) (compound_statement "{\n        return puVar2;\n      }" { (return_statement "return puVar2;" return identifier ;) })) (expression_statement "uVar1 = puVar2[uVar3];" (assignment_expression "uVar1 = puVar2[uVar3]" identifier = (subscript_expression "puVar2[uVar3]" identifier [ identifier ])) ;) })) })) (return_statement "return puVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ IDENT ])) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ IDENT ])) ;) })) })) (return_statement return IDENT ;) })))
(function_definition "uint * FUN_00046e60(void)\n\n{\n  uint uVar1;\n  uint *puVar2;\n  uint uVar3;\n  \n  puVar2 = (uint *)FUN_00044fc0();\n  FUN_00044db0(0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    uVar1 = puVar2[uVar3];\n    while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }\n  }\n  return puVar2;\n}" (type_identifier "uint") (pointer_declarator "* FUN_00046e60(void)" (* "*") (function_declarator "FUN_00046e60(void)" (identifier "FUN_00046e60") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")")))) (compound_statement "{\n  uint uVar1;\n  uint *puVar2;\n  uint uVar3;\n  \n  puVar2 = (uint *)FUN_00044fc0();\n  FUN_00044db0(0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    uVar1 = puVar2[uVar3];\n    while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }\n  }\n  return puVar2;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "uint *puVar2;" (type_identifier "uint") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (expression_statement "puVar2 = (uint *)FUN_00044fc0();" (assignment_expression "puVar2 = (uint *)FUN_00044fc0()" (identifier "puVar2") (= "=") (cast_expression "(uint *)FUN_00044fc0()" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00044fc0()" (identifier "FUN_00044fc0") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "FUN_00044db0(0);" (call_expression "FUN_00044db0(0)" (identifier "FUN_00044db0") (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (expression_statement "uVar3 = *puVar2;" (assignment_expression "uVar3 = *puVar2" (identifier "uVar3") (= "=") (pointer_expression "*puVar2" (* "*") (identifier "puVar2"))) (; ";")) (if_statement "if (1 < uVar3) {\n    uVar1 = puVar2[uVar3];\n    while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }\n  }" (if "if") (parenthesized_expression "(1 < uVar3)" (( "(") (binary_expression "1 < uVar3" (number_literal "1") (< "<") (identifier "uVar3")) () ")")) (compound_statement "{\n    uVar1 = puVar2[uVar3];\n    while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }\n  }" ({ "{") (expression_statement "uVar1 = puVar2[uVar3];" (assignment_expression "uVar1 = puVar2[uVar3]" (identifier "uVar1") (= "=") (subscript_expression "puVar2[uVar3]" (identifier "puVar2") ([ "[") (identifier "uVar3") (] "]"))) (; ";")) (while_statement "while (uVar1 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }" (while "while") (parenthesized_expression "(uVar1 == 0)" (( "(") (binary_expression "uVar1 == 0" (identifier "uVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      uVar1 = puVar2[uVar3];\n    }" ({ "{") (expression_statement "uVar3 = uVar3 - 1;" (assignment_expression "uVar3 = uVar3 - 1" (identifier "uVar3") (= "=") (binary_expression "uVar3 - 1" (identifier "uVar3") (- "-") (number_literal "1"))) (; ";")) (expression_statement "*puVar2 = uVar3;" (assignment_expression "*puVar2 = uVar3" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (identifier "uVar3")) (; ";")) (if_statement "if (uVar3 == 1) {\n        return puVar2;\n      }" (if "if") (parenthesized_expression "(uVar3 == 1)" (( "(") (binary_expression "uVar3 == 1" (identifier "uVar3") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n        return puVar2;\n      }" ({ "{") (return_statement "return puVar2;" (return "return") (identifier "puVar2") (; ";")) (} "}"))) (expression_statement "uVar1 = puVar2[uVar3];" (assignment_expression "uVar1 = puVar2[uVar3]" (identifier "uVar1") (= "=") (subscript_expression "puVar2[uVar3]" (identifier "puVar2") ([ "[") (identifier "uVar3") (] "]"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return puVar2;" (return "return") (identifier "puVar2") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

type_1 function_1(type_1 a,type_1 b)

{
  type_2 var_4;
  type_1 result;
  type_3 var_3;
  
  result = var_1(*b);
  var_2(a,b,result,(type_1)0x0);
  var_3 = *result;
  if (1 < var_3) {
    var_4 = result[var_3];
    while (var_4 == 0) {
      var_3 = var_3 - 1;
      *result = var_3;
      if (var_3 == 1) {
        return result;
      }
      var_4 = result[var_3];
    }
  }
  return result;
}


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

uint * MASKED(void)

{
  uint uVar1;
  uint *puVar2;
  uint uVar3;
  
  puVar2 = (uint *)FUN_00044fc0();
  FUN_00044db0(0);
  uVar3 = *puVar2;
  if (1 < uVar3) {
    uVar1 = puVar2[uVar3];
    while (uVar1 == 0) {
      uVar3 = uVar3 - 1;
      *puVar2 = uVar3;
      if (uVar3 == 1) {
        return puVar2;
      }
      uVar1 = puVar2[uVar3];
    }
  }
  return puVar2;
}

