
Bignum_conflict bigmod(Bignum_conflict a,Bignum_conflict b)

{
  BignumInt *pBVar1;
  Bignum_conflict result;
  BignumInt BVar2;
  Bignum_conflict pBVar3;
  BignumInt BVar4;
  
  result = newbn(*b);
  bigdivmod(a,b,result,(Bignum_conflict)0x0);
  BVar2 = *result;
  if (1 < BVar2) {
    pBVar3 = result + BVar2;
    BVar4 = *pBVar3;
    while (BVar4 == 0) {
      BVar2 = BVar2 - 1;
      *result = BVar2;
      if (BVar2 == 1) {
        return result;
      }
      pBVar1 = pBVar3 + -1;
      pBVar3 = pBVar3 + -1;
      BVar4 = *pBVar1;
    }
  }
  return result;
}



uint * bigmod(undefined4 param_1,undefined4 *param_2)

{
  uint *puVar1;
  uint *puVar2;
  uint uVar3;
  uint *puVar4;
  uint uVar5;
  
  puVar2 = (uint *)FUN_0005d738(*param_2);
  FUN_0005d470(param_1,param_2,puVar2,0);
  uVar3 = *puVar2;
  if (1 < uVar3) {
    puVar4 = puVar2 + uVar3;
    uVar5 = *puVar4;
    while (uVar5 == 0) {
      uVar3 = uVar3 - 1;
      *puVar2 = uVar3;
      if (uVar3 == 1) {
        return puVar2;
      }
      puVar1 = puVar4 + -1;
      puVar4 = puVar4 + -1;
      uVar5 = *puVar1;
    }
  }
  return puVar2;
}


lui gp,0x6
addiu gp,gp,0x4968
addu gp,gp,t9
addiu sp,sp,-0x28
sw ra,0x24(sp)
sw s2,0x20(sp)
sw s1,0x1c(sp)
sw s0,0x18(sp)
sw gp,0x10(sp)
or s2,a0,zero
or s1,a1,zero
lw a0,0x0(a1)
lw t9,-0x7950(gp)
addiu t9,t9,-0x28c8
bal 0x0005d738
_nop
lw gp,0x10(sp)
or s0,v0,zero
or a3,zero,zero
or a2,v0,zero
or a1,s1,zero
or a0,s2,zero
lw t9,-0x7950(gp)
addiu t9,t9,-0x2b90
bal 0x0005d470
_nop
lw gp,0x10(sp)
lw v0,0x0(s0)
sltiu v1,v0,0x2
bne v1,zero,0x0005f894
_nop
sll v1,v0,0x2
addu v1,s0,v1
lw a0,0x0(v1)
bne a0,zero,0x0005f894
_addiu v0,v0,-0x1
li a1,0x1
beq v0,a1,0x0005f894
_sw v0,0x0(s0)
lw a0,-0x4(v1)
addiu v0,v0,-0x1
beq a0,zero,0x0005f87c
_addiu v1,v1,-0x4
or v0,s0,zero
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "uint * bigmod(undefined4 param_1,undefined4 *param_2)\n\n{\n  uint *puVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint *puVar4;\n  uint uVar5;\n  \n  puVar2 = (uint *)FUN_0005d738(*param_2);\n  FUN_0005d470(param_1,param_2,puVar2,0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    puVar4 = puVar2 + uVar3;\n    uVar5 = *puVar4;\n    while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }\n  }\n  return puVar2;\n}\n\n" (function_definition "uint * bigmod(undefined4 param_1,undefined4 *param_2)\n\n{\n  uint *puVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint *puVar4;\n  uint uVar5;\n  \n  puVar2 = (uint *)FUN_0005d738(*param_2);\n  FUN_0005d470(param_1,param_2,puVar2,0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    puVar4 = puVar2 + uVar3;\n    uVar5 = *puVar4;\n    while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }\n  }\n  return puVar2;\n}" type_identifier (pointer_declarator "* bigmod(undefined4 param_1,undefined4 *param_2)" * (function_declarator "bigmod(undefined4 param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  uint *puVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint *puVar4;\n  uint uVar5;\n  \n  puVar2 = (uint *)FUN_0005d738(*param_2);\n  FUN_0005d470(param_1,param_2,puVar2,0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    puVar4 = puVar2 + uVar3;\n    uVar5 = *puVar4;\n    while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }\n  }\n  return puVar2;\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "puVar2 = (uint *)FUN_0005d738(*param_2);" (assignment_expression "puVar2 = (uint *)FUN_0005d738(*param_2)" identifier = (cast_expression "(uint *)FUN_0005d738(*param_2)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0005d738(*param_2)" identifier (argument_list "(*param_2)" ( (pointer_expression "*param_2" * identifier) ))))) ;) (expression_statement "FUN_0005d470(param_1,param_2,puVar2,0);" (call_expression "FUN_0005d470(param_1,param_2,puVar2,0)" identifier (argument_list "(param_1,param_2,puVar2,0)" ( identifier , identifier , identifier , number_literal ))) ;) (expression_statement "uVar3 = *puVar2;" (assignment_expression "uVar3 = *puVar2" identifier = (pointer_expression "*puVar2" * identifier)) ;) (if_statement "if (1 < uVar3) {\n    puVar4 = puVar2 + uVar3;\n    uVar5 = *puVar4;\n    while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }\n  }" if (parenthesized_expression "(1 < uVar3)" ( (binary_expression "1 < uVar3" number_literal < identifier) )) (compound_statement "{\n    puVar4 = puVar2 + uVar3;\n    uVar5 = *puVar4;\n    while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }\n  }" { (expression_statement "puVar4 = puVar2 + uVar3;" (assignment_expression "puVar4 = puVar2 + uVar3" identifier = (binary_expression "puVar2 + uVar3" identifier + identifier)) ;) (expression_statement "uVar5 = *puVar4;" (assignment_expression "uVar5 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) (while_statement "while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }" while (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\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 "puVar1 = puVar4 + -1;" (assignment_expression "puVar1 = puVar4 + -1" identifier = (binary_expression "puVar4 + -1" identifier + number_literal)) ;) (expression_statement "puVar4 = puVar4 + -1;" (assignment_expression "puVar4 = puVar4 + -1" identifier = (binary_expression "puVar4 + -1" identifier + number_literal)) ;) (expression_statement "uVar5 = *puVar1;" (assignment_expression "uVar5 = *puVar1" identifier = (pointer_expression "*puVar1" * identifier)) ;) })) })) (return_statement "return puVar2;" return identifier ;) })))
(translation_unit "Bignum_conflict bigmod(Bignum_conflict a,Bignum_conflict b)\n\n{\n  BignumInt *pBVar1;\n  Bignum_conflict result;\n  BignumInt BVar2;\n  Bignum_conflict pBVar3;\n  BignumInt BVar4;\n  \n  result = newbn(*b);\n  bigdivmod(a,b,result,(Bignum_conflict)0x0);\n  BVar2 = *result;\n  if (1 < BVar2) {\n    pBVar3 = result + BVar2;\n    BVar4 = *pBVar3;\n    while (BVar4 == 0) {\n      BVar2 = BVar2 - 1;\n      *result = BVar2;\n      if (BVar2 == 1) {\n        return result;\n      }\n      pBVar1 = pBVar3 + -1;\n      pBVar3 = pBVar3 + -1;\n      BVar4 = *pBVar1;\n    }\n  }\n  return result;\n}\n\n" (function_definition "Bignum_conflict bigmod(Bignum_conflict a,Bignum_conflict b)\n\n{\n  BignumInt *pBVar1;\n  Bignum_conflict result;\n  BignumInt BVar2;\n  Bignum_conflict pBVar3;\n  BignumInt BVar4;\n  \n  result = newbn(*b);\n  bigdivmod(a,b,result,(Bignum_conflict)0x0);\n  BVar2 = *result;\n  if (1 < BVar2) {\n    pBVar3 = result + BVar2;\n    BVar4 = *pBVar3;\n    while (BVar4 == 0) {\n      BVar2 = BVar2 - 1;\n      *result = BVar2;\n      if (BVar2 == 1) {\n        return result;\n      }\n      pBVar1 = pBVar3 + -1;\n      pBVar3 = pBVar3 + -1;\n      BVar4 = *pBVar1;\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 *pBVar1;\n  Bignum_conflict result;\n  BignumInt BVar2;\n  Bignum_conflict pBVar3;\n  BignumInt BVar4;\n  \n  result = newbn(*b);\n  bigdivmod(a,b,result,(Bignum_conflict)0x0);\n  BVar2 = *result;\n  if (1 < BVar2) {\n    pBVar3 = result + BVar2;\n    BVar4 = *pBVar3;\n    while (BVar4 == 0) {\n      BVar2 = BVar2 - 1;\n      *result = BVar2;\n      if (BVar2 == 1) {\n        return result;\n      }\n      pBVar1 = pBVar3 + -1;\n      pBVar3 = pBVar3 + -1;\n      BVar4 = *pBVar1;\n    }\n  }\n  return result;\n}" { (declaration "BignumInt *pBVar1;" type_identifier (pointer_declarator "*pBVar1" * identifier) ;) (declaration "Bignum_conflict result;" type_identifier identifier ;) (declaration "BignumInt BVar2;" type_identifier identifier ;) (declaration "Bignum_conflict pBVar3;" type_identifier identifier ;) (declaration "BignumInt BVar4;" 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 "BVar2 = *result;" (assignment_expression "BVar2 = *result" identifier = (pointer_expression "*result" * identifier)) ;) (if_statement "if (1 < BVar2) {\n    pBVar3 = result + BVar2;\n    BVar4 = *pBVar3;\n    while (BVar4 == 0) {\n      BVar2 = BVar2 - 1;\n      *result = BVar2;\n      if (BVar2 == 1) {\n        return result;\n      }\n      pBVar1 = pBVar3 + -1;\n      pBVar3 = pBVar3 + -1;\n      BVar4 = *pBVar1;\n    }\n  }" if (parenthesized_expression "(1 < BVar2)" ( (binary_expression "1 < BVar2" number_literal < identifier) )) (compound_statement "{\n    pBVar3 = result + BVar2;\n    BVar4 = *pBVar3;\n    while (BVar4 == 0) {\n      BVar2 = BVar2 - 1;\n      *result = BVar2;\n      if (BVar2 == 1) {\n        return result;\n      }\n      pBVar1 = pBVar3 + -1;\n      pBVar3 = pBVar3 + -1;\n      BVar4 = *pBVar1;\n    }\n  }" { (expression_statement "pBVar3 = result + BVar2;" (assignment_expression "pBVar3 = result + BVar2" identifier = (binary_expression "result + BVar2" identifier + identifier)) ;) (expression_statement "BVar4 = *pBVar3;" (assignment_expression "BVar4 = *pBVar3" identifier = (pointer_expression "*pBVar3" * identifier)) ;) (while_statement "while (BVar4 == 0) {\n      BVar2 = BVar2 - 1;\n      *result = BVar2;\n      if (BVar2 == 1) {\n        return result;\n      }\n      pBVar1 = pBVar3 + -1;\n      pBVar3 = pBVar3 + -1;\n      BVar4 = *pBVar1;\n    }" while (parenthesized_expression "(BVar4 == 0)" ( (binary_expression "BVar4 == 0" identifier == number_literal) )) (compound_statement "{\n      BVar2 = BVar2 - 1;\n      *result = BVar2;\n      if (BVar2 == 1) {\n        return result;\n      }\n      pBVar1 = pBVar3 + -1;\n      pBVar3 = pBVar3 + -1;\n      BVar4 = *pBVar1;\n    }" { (expression_statement "BVar2 = BVar2 - 1;" (assignment_expression "BVar2 = BVar2 - 1" identifier = (binary_expression "BVar2 - 1" identifier - number_literal)) ;) (expression_statement "*result = BVar2;" (assignment_expression "*result = BVar2" (pointer_expression "*result" * identifier) = identifier) ;) (if_statement "if (BVar2 == 1) {\n        return result;\n      }" if (parenthesized_expression "(BVar2 == 1)" ( (binary_expression "BVar2 == 1" identifier == number_literal) )) (compound_statement "{\n        return result;\n      }" { (return_statement "return result;" return identifier ;) })) (expression_statement "pBVar1 = pBVar3 + -1;" (assignment_expression "pBVar1 = pBVar3 + -1" identifier = (binary_expression "pBVar3 + -1" identifier + number_literal)) ;) (expression_statement "pBVar3 = pBVar3 + -1;" (assignment_expression "pBVar3 = pBVar3 + -1" identifier = (binary_expression "pBVar3 + -1" identifier + number_literal)) ;) (expression_statement "BVar4 = *pBVar1;" (assignment_expression "BVar4 = *pBVar1" identifier = (pointer_expression "*pBVar1" * identifier)) ;) })) })) (return_statement "return result;" return identifier ;) })))
(translation_unit "uint * bigmod(undefined4 param_1,undefined4 *param_2)\n\n{\n  uint *puVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint *puVar4;\n  uint uVar5;\n  \n  puVar2 = (uint *)FUN_0005d738(*param_2);\n  FUN_0005d470(param_1,param_2,puVar2,0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    puVar4 = puVar2 + uVar3;\n    uVar5 = *puVar4;\n    while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }\n  }\n  return puVar2;\n}\n\n" (function_definition "uint * bigmod(undefined4 param_1,undefined4 *param_2)\n\n{\n  uint *puVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint *puVar4;\n  uint uVar5;\n  \n  puVar2 = (uint *)FUN_0005d738(*param_2);\n  FUN_0005d470(param_1,param_2,puVar2,0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    puVar4 = puVar2 + uVar3;\n    uVar5 = *puVar4;\n    while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }\n  }\n  return puVar2;\n}" type_identifier (pointer_declarator "* bigmod(undefined4 param_1,undefined4 *param_2)" * (function_declarator "bigmod(undefined4 param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  uint *puVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint *puVar4;\n  uint uVar5;\n  \n  puVar2 = (uint *)FUN_0005d738(*param_2);\n  FUN_0005d470(param_1,param_2,puVar2,0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    puVar4 = puVar2 + uVar3;\n    uVar5 = *puVar4;\n    while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }\n  }\n  return puVar2;\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "puVar2 = (uint *)FUN_0005d738(*param_2);" (assignment_expression "puVar2 = (uint *)FUN_0005d738(*param_2)" identifier = (cast_expression "(uint *)FUN_0005d738(*param_2)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0005d738(*param_2)" identifier (argument_list "(*param_2)" ( (pointer_expression "*param_2" * identifier) ))))) ;) (expression_statement "FUN_0005d470(param_1,param_2,puVar2,0);" (call_expression "FUN_0005d470(param_1,param_2,puVar2,0)" identifier (argument_list "(param_1,param_2,puVar2,0)" ( identifier , identifier , identifier , number_literal ))) ;) (expression_statement "uVar3 = *puVar2;" (assignment_expression "uVar3 = *puVar2" identifier = (pointer_expression "*puVar2" * identifier)) ;) (if_statement "if (1 < uVar3) {\n    puVar4 = puVar2 + uVar3;\n    uVar5 = *puVar4;\n    while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }\n  }" if (parenthesized_expression "(1 < uVar3)" ( (binary_expression "1 < uVar3" number_literal < identifier) )) (compound_statement "{\n    puVar4 = puVar2 + uVar3;\n    uVar5 = *puVar4;\n    while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }\n  }" { (expression_statement "puVar4 = puVar2 + uVar3;" (assignment_expression "puVar4 = puVar2 + uVar3" identifier = (binary_expression "puVar2 + uVar3" identifier + identifier)) ;) (expression_statement "uVar5 = *puVar4;" (assignment_expression "uVar5 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) (while_statement "while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }" while (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\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 "puVar1 = puVar4 + -1;" (assignment_expression "puVar1 = puVar4 + -1" identifier = (binary_expression "puVar4 + -1" identifier + number_literal)) ;) (expression_statement "puVar4 = puVar4 + -1;" (assignment_expression "puVar4 = puVar4 + -1" identifier = (binary_expression "puVar4 + -1" identifier + number_literal)) ;) (expression_statement "uVar5 = *puVar1;" (assignment_expression "uVar5 = *puVar1" identifier = (pointer_expression "*puVar1" * identifier)) ;) })) })) (return_statement "return puVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (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 ( (pointer_expression * IDENT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , 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 = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * 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 = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) })) (return_statement return IDENT ;) })))
(function_definition "uint * bigmod(undefined4 param_1,undefined4 *param_2)\n\n{\n  uint *puVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint *puVar4;\n  uint uVar5;\n  \n  puVar2 = (uint *)FUN_0005d738(*param_2);\n  FUN_0005d470(param_1,param_2,puVar2,0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    puVar4 = puVar2 + uVar3;\n    uVar5 = *puVar4;\n    while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }\n  }\n  return puVar2;\n}" (type_identifier "uint") (pointer_declarator "* bigmod(undefined4 param_1,undefined4 *param_2)" (* "*") (function_declarator "bigmod(undefined4 param_1,undefined4 *param_2)" (identifier "bigmod") (parameter_list "(undefined4 param_1,undefined4 *param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")")))) (compound_statement "{\n  uint *puVar1;\n  uint *puVar2;\n  uint uVar3;\n  uint *puVar4;\n  uint uVar5;\n  \n  puVar2 = (uint *)FUN_0005d738(*param_2);\n  FUN_0005d470(param_1,param_2,puVar2,0);\n  uVar3 = *puVar2;\n  if (1 < uVar3) {\n    puVar4 = puVar2 + uVar3;\n    uVar5 = *puVar4;\n    while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }\n  }\n  return puVar2;\n}" ({ "{") (declaration "uint *puVar1;" (type_identifier "uint") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "uint *puVar2;" (type_identifier "uint") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint *puVar4;" (type_identifier "uint") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (expression_statement "puVar2 = (uint *)FUN_0005d738(*param_2);" (assignment_expression "puVar2 = (uint *)FUN_0005d738(*param_2)" (identifier "puVar2") (= "=") (cast_expression "(uint *)FUN_0005d738(*param_2)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0005d738(*param_2)" (identifier "FUN_0005d738") (argument_list "(*param_2)" (( "(") (pointer_expression "*param_2" (* "*") (identifier "param_2")) () ")"))))) (; ";")) (expression_statement "FUN_0005d470(param_1,param_2,puVar2,0);" (call_expression "FUN_0005d470(param_1,param_2,puVar2,0)" (identifier "FUN_0005d470") (argument_list "(param_1,param_2,puVar2,0)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "puVar2") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "uVar3 = *puVar2;" (assignment_expression "uVar3 = *puVar2" (identifier "uVar3") (= "=") (pointer_expression "*puVar2" (* "*") (identifier "puVar2"))) (; ";")) (if_statement "if (1 < uVar3) {\n    puVar4 = puVar2 + uVar3;\n    uVar5 = *puVar4;\n    while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }\n  }" (if "if") (parenthesized_expression "(1 < uVar3)" (( "(") (binary_expression "1 < uVar3" (number_literal "1") (< "<") (identifier "uVar3")) () ")")) (compound_statement "{\n    puVar4 = puVar2 + uVar3;\n    uVar5 = *puVar4;\n    while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }\n  }" ({ "{") (expression_statement "puVar4 = puVar2 + uVar3;" (assignment_expression "puVar4 = puVar2 + uVar3" (identifier "puVar4") (= "=") (binary_expression "puVar2 + uVar3" (identifier "puVar2") (+ "+") (identifier "uVar3"))) (; ";")) (expression_statement "uVar5 = *puVar4;" (assignment_expression "uVar5 = *puVar4" (identifier "uVar5") (= "=") (pointer_expression "*puVar4" (* "*") (identifier "puVar4"))) (; ";")) (while_statement "while (uVar5 == 0) {\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\n    }" (while "while") (parenthesized_expression "(uVar5 == 0)" (( "(") (binary_expression "uVar5 == 0" (identifier "uVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar3 = uVar3 - 1;\n      *puVar2 = uVar3;\n      if (uVar3 == 1) {\n        return puVar2;\n      }\n      puVar1 = puVar4 + -1;\n      puVar4 = puVar4 + -1;\n      uVar5 = *puVar1;\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 "puVar1 = puVar4 + -1;" (assignment_expression "puVar1 = puVar4 + -1" (identifier "puVar1") (= "=") (binary_expression "puVar4 + -1" (identifier "puVar4") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "puVar4 = puVar4 + -1;" (assignment_expression "puVar4 = puVar4 + -1" (identifier "puVar4") (= "=") (binary_expression "puVar4 + -1" (identifier "puVar4") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "uVar5 = *puVar1;" (assignment_expression "uVar5 = *puVar1" (identifier "uVar5") (= "=") (pointer_expression "*puVar1" (* "*") (identifier "puVar1"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return puVar2;" (return "return") (identifier "puVar2") (; ";")) (} "}")))

type_1 function_1(type_1 a,type_1 b)

{
  type_2 *pBVar1;
  type_1 var_4;
  type_2 var_3;
  type_1 var_6;
  type_2 var_5;
  
  var_4 = var_1(*b);
  var_2(a,b,var_4,(type_1)0x0);
  var_3 = *var_4;
  if (1 < var_3) {
    var_6 = var_4 + var_3;
    var_5 = *var_6;
    while (var_5 == 0) {
      var_3 = var_3 - 1;
      *var_4 = var_3;
      if (var_3 == 1) {
        return var_4;
      }
      pBVar1 = var_6 + -1;
      var_6 = var_6 + -1;
      var_5 = *pBVar1;
    }
  }
  return var_4;
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier)))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (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 (pointer_expression argument: (identifier))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (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: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (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: (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: (pointer_expression argument: (identifier)))))))) (return_statement (identifier)))))

uint * MASKED(undefined4 param_1,undefined4 *param_2)

{
  uint *puVar1;
  uint *puVar2;
  uint uVar3;
  uint *puVar4;
  uint uVar5;
  
  puVar2 = (uint *)FUN_0005d738(*param_2);
  FUN_0005d470(param_1,param_2,puVar2,0);
  uVar3 = *puVar2;
  if (1 < uVar3) {
    puVar4 = puVar2 + uVar3;
    uVar5 = *puVar4;
    while (uVar5 == 0) {
      uVar3 = uVar3 - 1;
      *puVar2 = uVar3;
      if (uVar3 == 1) {
        return puVar2;
      }
      puVar1 = puVar4 + -1;
      puVar4 = puVar4 + -1;
      uVar5 = *puVar1;
    }
  }
  return puVar2;
}

