
/* WARNING: Unknown calling convention */

int ssh2_bignum_length(Bignum_conflict bn)

{
  int iVar1;
  uint uVar2;
  
  uVar2 = *bn * 0x20 - 1;
  if ((-1 < (int)uVar2) && (-1 < (int)bn[((int)uVar2 >> 5) + 1])) {
    do {
      uVar2 = uVar2 - 1;
      if (uVar2 == 0xffffffff) break;
    } while (bn[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);
  }
  iVar1 = uVar2 + 9;
  if (iVar1 < 0) {
    iVar1 = uVar2 + 0x10;
  }
  return (iVar1 >> 3) + 4;
}



int ssh2_bignum_length(int *param_1)

{
  int iVar1;
  uint uVar2;
  
  uVar2 = *param_1 * 0x20 - 1;
  if ((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])) {
    do {
      uVar2 = uVar2 - 1;
      if (uVar2 == 0xffffffff) break;
    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);
  }
  iVar1 = uVar2 + 9;
  if (iVar1 < 0) {
    iVar1 = uVar2 + 0x10;
  }
  return (iVar1 >> 3) + 4;
}


lw v1,0x0(a0)
sll v1,v1,0x5
addiu v1,v1,-0x1
bltz v1,0x000308a4
_sra v0,v1,0x5
addiu v0,v0,0x1
sll v0,v0,0x2
addu v0,a0,v0
lw v0,0x0(v0)
bltz v0,0x000308a4
_nop
b 0x00030898
_li a1,-0x1
addiu v0,v0,0x1
sll v0,v0,0x2
addu v0,a0,v0
lw v0,0x0(v0)
srlv v0,v0,v1
bne v0,zero,0x000308a4
_nop
addiu v1,v1,-0x1
bne v1,a1,0x0003087c
_sra v0,v1,0x5
addiu v0,v1,0x9
bgez v0,0x000308b4
_nop
addiu v0,v1,0x10
sra v0,v0,0x3
jr ra
_addiu v0,v0,0x4
(translation_unit "int ssh2_bignum_length(int *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_1 * 0x20 - 1;\n  if ((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }\n  iVar1 = uVar2 + 9;\n  if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }\n  return (iVar1 >> 3) + 4;\n}\n\n" (function_definition "int ssh2_bignum_length(int *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_1 * 0x20 - 1;\n  if ((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }\n  iVar1 = uVar2 + 9;\n  if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }\n  return (iVar1 >> 3) + 4;\n}" primitive_type (function_declarator "ssh2_bignum_length(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_1 * 0x20 - 1;\n  if ((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }\n  iVar1 = uVar2 + 9;\n  if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }\n  return (iVar1 >> 3) + 4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = *param_1 * 0x20 - 1;" (assignment_expression "uVar2 = *param_1 * 0x20 - 1" identifier = (binary_expression "*param_1 * 0x20 - 1" (binary_expression "*param_1 * 0x20" (pointer_expression "*param_1" * identifier) * number_literal) - number_literal)) ;) (if_statement "if ((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }" if (parenthesized_expression "((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1]))" ( (binary_expression "(-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])" (parenthesized_expression "(-1 < (int)uVar2)" ( (binary_expression "-1 < (int)uVar2" number_literal < (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(-1 < param_1[((int)uVar2 >> 5) + 1])" ( (binary_expression "-1 < param_1[((int)uVar2 >> 5) + 1]" number_literal < (subscript_expression "param_1[((int)uVar2 >> 5) + 1]" identifier [ (binary_expression "((int)uVar2 >> 5) + 1" (parenthesized_expression "((int)uVar2 >> 5)" ( (binary_expression "(int)uVar2 >> 5" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )) + number_literal) ])) ))) )) (compound_statement "{\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }" { (do_statement "do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);" do (compound_statement "{\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    }" { (expression_statement "uVar2 = uVar2 - 1;" (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ;) (if_statement "if (uVar2 == 0xffffffff) break;" if (parenthesized_expression "(uVar2 == 0xffffffff)" ( (binary_expression "uVar2 == 0xffffffff" identifier == number_literal) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0)" ( (binary_expression "(uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0" (binary_expression "(uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f)" (cast_expression "(uint)param_1[((int)uVar2 >> 5) + 1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[((int)uVar2 >> 5) + 1]" identifier [ (binary_expression "((int)uVar2 >> 5) + 1" (parenthesized_expression "((int)uVar2 >> 5)" ( (binary_expression "(int)uVar2 >> 5" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )) + number_literal) ])) >> (parenthesized_expression "(uVar2 & 0x1f)" ( (binary_expression "uVar2 & 0x1f" identifier & number_literal) ))) == number_literal) )) ;) })) (expression_statement "iVar1 = uVar2 + 9;" (assignment_expression "iVar1 = uVar2 + 9" identifier = (binary_expression "uVar2 + 9" identifier + number_literal)) ;) (if_statement "if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    iVar1 = uVar2 + 0x10;\n  }" { (expression_statement "iVar1 = uVar2 + 0x10;" (assignment_expression "iVar1 = uVar2 + 0x10" identifier = (binary_expression "uVar2 + 0x10" identifier + number_literal)) ;) })) (return_statement "return (iVar1 >> 3) + 4;" return (binary_expression "(iVar1 >> 3) + 4" (parenthesized_expression "(iVar1 >> 3)" ( (binary_expression "iVar1 >> 3" identifier >> number_literal) )) + number_literal) ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint ssh2_bignum_length(Bignum_conflict bn)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *bn * 0x20 - 1;\n  if ((-1 < (int)uVar2) && (-1 < (int)bn[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while (bn[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }\n  iVar1 = uVar2 + 9;\n  if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }\n  return (iVar1 >> 3) + 4;\n}\n\n" comment (function_definition "int ssh2_bignum_length(Bignum_conflict bn)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *bn * 0x20 - 1;\n  if ((-1 < (int)uVar2) && (-1 < (int)bn[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while (bn[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }\n  iVar1 = uVar2 + 9;\n  if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }\n  return (iVar1 >> 3) + 4;\n}" primitive_type (function_declarator "ssh2_bignum_length(Bignum_conflict bn)" identifier (parameter_list "(Bignum_conflict bn)" ( (parameter_declaration "Bignum_conflict bn" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *bn * 0x20 - 1;\n  if ((-1 < (int)uVar2) && (-1 < (int)bn[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while (bn[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }\n  iVar1 = uVar2 + 9;\n  if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }\n  return (iVar1 >> 3) + 4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = *bn * 0x20 - 1;" (assignment_expression "uVar2 = *bn * 0x20 - 1" identifier = (binary_expression "*bn * 0x20 - 1" (binary_expression "*bn * 0x20" (pointer_expression "*bn" * identifier) * number_literal) - number_literal)) ;) (if_statement "if ((-1 < (int)uVar2) && (-1 < (int)bn[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while (bn[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }" if (parenthesized_expression "((-1 < (int)uVar2) && (-1 < (int)bn[((int)uVar2 >> 5) + 1]))" ( (binary_expression "(-1 < (int)uVar2) && (-1 < (int)bn[((int)uVar2 >> 5) + 1])" (parenthesized_expression "(-1 < (int)uVar2)" ( (binary_expression "-1 < (int)uVar2" number_literal < (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(-1 < (int)bn[((int)uVar2 >> 5) + 1])" ( (binary_expression "-1 < (int)bn[((int)uVar2 >> 5) + 1]" number_literal < (cast_expression "(int)bn[((int)uVar2 >> 5) + 1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "bn[((int)uVar2 >> 5) + 1]" identifier [ (binary_expression "((int)uVar2 >> 5) + 1" (parenthesized_expression "((int)uVar2 >> 5)" ( (binary_expression "(int)uVar2 >> 5" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )) + number_literal) ]))) ))) )) (compound_statement "{\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while (bn[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }" { (do_statement "do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while (bn[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);" do (compound_statement "{\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    }" { (expression_statement "uVar2 = uVar2 - 1;" (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ;) (if_statement "if (uVar2 == 0xffffffff) break;" if (parenthesized_expression "(uVar2 == 0xffffffff)" ( (binary_expression "uVar2 == 0xffffffff" identifier == number_literal) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(bn[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0)" ( (binary_expression "bn[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0" (binary_expression "bn[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f)" (subscript_expression "bn[((int)uVar2 >> 5) + 1]" identifier [ (binary_expression "((int)uVar2 >> 5) + 1" (parenthesized_expression "((int)uVar2 >> 5)" ( (binary_expression "(int)uVar2 >> 5" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )) + number_literal) ]) >> (parenthesized_expression "(uVar2 & 0x1f)" ( (binary_expression "uVar2 & 0x1f" identifier & number_literal) ))) == number_literal) )) ;) })) (expression_statement "iVar1 = uVar2 + 9;" (assignment_expression "iVar1 = uVar2 + 9" identifier = (binary_expression "uVar2 + 9" identifier + number_literal)) ;) (if_statement "if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    iVar1 = uVar2 + 0x10;\n  }" { (expression_statement "iVar1 = uVar2 + 0x10;" (assignment_expression "iVar1 = uVar2 + 0x10" identifier = (binary_expression "uVar2 + 0x10" identifier + number_literal)) ;) })) (return_statement "return (iVar1 >> 3) + 4;" return (binary_expression "(iVar1 >> 3) + 4" (parenthesized_expression "(iVar1 >> 3)" ( (binary_expression "iVar1 >> 3" identifier >> number_literal) )) + number_literal) ;) })))
(translation_unit "int ssh2_bignum_length(int *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_1 * 0x20 - 1;\n  if ((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }\n  iVar1 = uVar2 + 9;\n  if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }\n  return (iVar1 >> 3) + 4;\n}\n\n" (function_definition "int ssh2_bignum_length(int *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_1 * 0x20 - 1;\n  if ((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }\n  iVar1 = uVar2 + 9;\n  if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }\n  return (iVar1 >> 3) + 4;\n}" primitive_type (function_declarator "ssh2_bignum_length(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_1 * 0x20 - 1;\n  if ((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }\n  iVar1 = uVar2 + 9;\n  if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }\n  return (iVar1 >> 3) + 4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = *param_1 * 0x20 - 1;" (assignment_expression "uVar2 = *param_1 * 0x20 - 1" identifier = (binary_expression "*param_1 * 0x20 - 1" (binary_expression "*param_1 * 0x20" (pointer_expression "*param_1" * identifier) * number_literal) - number_literal)) ;) (if_statement "if ((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }" if (parenthesized_expression "((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1]))" ( (binary_expression "(-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])" (parenthesized_expression "(-1 < (int)uVar2)" ( (binary_expression "-1 < (int)uVar2" number_literal < (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(-1 < param_1[((int)uVar2 >> 5) + 1])" ( (binary_expression "-1 < param_1[((int)uVar2 >> 5) + 1]" number_literal < (subscript_expression "param_1[((int)uVar2 >> 5) + 1]" identifier [ (binary_expression "((int)uVar2 >> 5) + 1" (parenthesized_expression "((int)uVar2 >> 5)" ( (binary_expression "(int)uVar2 >> 5" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )) + number_literal) ])) ))) )) (compound_statement "{\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }" { (do_statement "do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);" do (compound_statement "{\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    }" { (expression_statement "uVar2 = uVar2 - 1;" (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ;) (if_statement "if (uVar2 == 0xffffffff) break;" if (parenthesized_expression "(uVar2 == 0xffffffff)" ( (binary_expression "uVar2 == 0xffffffff" identifier == number_literal) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0)" ( (binary_expression "(uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0" (binary_expression "(uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f)" (cast_expression "(uint)param_1[((int)uVar2 >> 5) + 1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[((int)uVar2 >> 5) + 1]" identifier [ (binary_expression "((int)uVar2 >> 5) + 1" (parenthesized_expression "((int)uVar2 >> 5)" ( (binary_expression "(int)uVar2 >> 5" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )) + number_literal) ])) >> (parenthesized_expression "(uVar2 & 0x1f)" ( (binary_expression "uVar2 & 0x1f" identifier & number_literal) ))) == number_literal) )) ;) })) (expression_statement "iVar1 = uVar2 + 9;" (assignment_expression "iVar1 = uVar2 + 9" identifier = (binary_expression "uVar2 + 9" identifier + number_literal)) ;) (if_statement "if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    iVar1 = uVar2 + 0x10;\n  }" { (expression_statement "iVar1 = uVar2 + 0x10;" (assignment_expression "iVar1 = uVar2 + 0x10" identifier = (binary_expression "uVar2 + 0x10" identifier + number_literal)) ;) })) (return_statement "return (iVar1 >> 3) + 4;" return (binary_expression "(iVar1 >> 3) + 4" (parenthesized_expression "(iVar1 >> 3)" ( (binary_expression "iVar1 >> 3" identifier >> number_literal) )) + number_literal) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (pointer_expression * IDENT) * LIT) - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) && (parenthesized_expression ( (binary_expression LIT < (subscript_expression IDENT [ (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )) + LIT) ])) ))) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) }) while (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )) + LIT) ])) >> (parenthesized_expression ( (binary_expression IDENT & LIT) ))) == LIT) )) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (return_statement return (binary_expression (parenthesized_expression ( (binary_expression IDENT >> LIT) )) + LIT) ;) })))
(function_definition "int ssh2_bignum_length(int *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_1 * 0x20 - 1;\n  if ((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }\n  iVar1 = uVar2 + 9;\n  if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }\n  return (iVar1 >> 3) + 4;\n}" (primitive_type "int") (function_declarator "ssh2_bignum_length(int *param_1)" (identifier "ssh2_bignum_length") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = *param_1 * 0x20 - 1;\n  if ((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }\n  iVar1 = uVar2 + 9;\n  if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }\n  return (iVar1 >> 3) + 4;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (expression_statement "uVar2 = *param_1 * 0x20 - 1;" (assignment_expression "uVar2 = *param_1 * 0x20 - 1" (identifier "uVar2") (= "=") (binary_expression "*param_1 * 0x20 - 1" (binary_expression "*param_1 * 0x20" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (* "*") (number_literal "0x20")) (- "-") (number_literal "1"))) (; ";")) (if_statement "if ((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])) {\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }" (if "if") (parenthesized_expression "((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1]))" (( "(") (binary_expression "(-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])" (parenthesized_expression "(-1 < (int)uVar2)" (( "(") (binary_expression "-1 < (int)uVar2" (number_literal "-1") (< "<") (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2"))) () ")")) (&& "&&") (parenthesized_expression "(-1 < param_1[((int)uVar2 >> 5) + 1])" (( "(") (binary_expression "-1 < param_1[((int)uVar2 >> 5) + 1]" (number_literal "-1") (< "<") (subscript_expression "param_1[((int)uVar2 >> 5) + 1]" (identifier "param_1") ([ "[") (binary_expression "((int)uVar2 >> 5) + 1" (parenthesized_expression "((int)uVar2 >> 5)" (( "(") (binary_expression "(int)uVar2 >> 5" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (>> ">>") (number_literal "5")) () ")")) (+ "+") (number_literal "1")) (] "]"))) () ")"))) () ")")) (compound_statement "{\n    do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);\n  }" ({ "{") (do_statement "do {\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);" (do "do") (compound_statement "{\n      uVar2 = uVar2 - 1;\n      if (uVar2 == 0xffffffff) break;\n    }" ({ "{") (expression_statement "uVar2 = uVar2 - 1;" (assignment_expression "uVar2 = uVar2 - 1" (identifier "uVar2") (= "=") (binary_expression "uVar2 - 1" (identifier "uVar2") (- "-") (number_literal "1"))) (; ";")) (if_statement "if (uVar2 == 0xffffffff) break;" (if "if") (parenthesized_expression "(uVar2 == 0xffffffff)" (( "(") (binary_expression "uVar2 == 0xffffffff" (identifier "uVar2") (== "==") (number_literal "0xffffffff")) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}")) (while "while") (parenthesized_expression "((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0)" (( "(") (binary_expression "(uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0" (binary_expression "(uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f)" (cast_expression "(uint)param_1[((int)uVar2 >> 5) + 1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_1[((int)uVar2 >> 5) + 1]" (identifier "param_1") ([ "[") (binary_expression "((int)uVar2 >> 5) + 1" (parenthesized_expression "((int)uVar2 >> 5)" (( "(") (binary_expression "(int)uVar2 >> 5" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (>> ">>") (number_literal "5")) () ")")) (+ "+") (number_literal "1")) (] "]"))) (>> ">>") (parenthesized_expression "(uVar2 & 0x1f)" (( "(") (binary_expression "uVar2 & 0x1f" (identifier "uVar2") (& "&") (number_literal "0x1f")) () ")"))) (== "==") (number_literal "0")) () ")")) (; ";")) (} "}"))) (expression_statement "iVar1 = uVar2 + 9;" (assignment_expression "iVar1 = uVar2 + 9" (identifier "iVar1") (= "=") (binary_expression "uVar2 + 9" (identifier "uVar2") (+ "+") (number_literal "9"))) (; ";")) (if_statement "if (iVar1 < 0) {\n    iVar1 = uVar2 + 0x10;\n  }" (if "if") (parenthesized_expression "(iVar1 < 0)" (( "(") (binary_expression "iVar1 < 0" (identifier "iVar1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = uVar2 + 0x10;\n  }" ({ "{") (expression_statement "iVar1 = uVar2 + 0x10;" (assignment_expression "iVar1 = uVar2 + 0x10" (identifier "iVar1") (= "=") (binary_expression "uVar2 + 0x10" (identifier "uVar2") (+ "+") (number_literal "0x10"))) (; ";")) (} "}"))) (return_statement "return (iVar1 >> 3) + 4;" (return "return") (binary_expression "(iVar1 >> 3) + 4" (parenthesized_expression "(iVar1 >> 3)" (( "(") (binary_expression "iVar1 >> 3" (identifier "iVar1") (>> ">>") (number_literal "3")) () ")")) (+ "+") (number_literal "4")) (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) right: (parenthesized_expression (binary_expression left: (number_literal) right: (subscript_expression argument: (identifier) index: (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) right: (number_literal))))))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement))) condition: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) right: (number_literal)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (return_statement (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))))

int MASKED(int *param_1)

{
  int iVar1;
  uint uVar2;
  
  uVar2 = *param_1 * 0x20 - 1;
  if ((-1 < (int)uVar2) && (-1 < param_1[((int)uVar2 >> 5) + 1])) {
    do {
      uVar2 = uVar2 - 1;
      if (uVar2 == 0xffffffff) break;
    } while ((uint)param_1[((int)uVar2 >> 5) + 1] >> (uVar2 & 0x1f) == 0);
  }
  iVar1 = uVar2 + 9;
  if (iVar1 < 0) {
    iVar1 = uVar2 + 0x10;
  }
  return (iVar1 >> 3) + 4;
}

