
/* WARNING: Removing unreachable block (ram,0x00046604) */

int makekey(uchar *data,int len,RSAKey *result,uchar **keystr,int order)

{
  int iVar1;
  byte *pbVar2;
  byte *pbVar3;
  int iVar4;
  
  if (3 < len) {
    iVar4 = len + -4;
    pbVar3 = data + 4;
    if (result == (RSAKey *)0x0) {
      if (order == 0) {
        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);
        if (iVar1 < 0) {
          return -1;
        }
        pbVar3 = pbVar3 + iVar1;
        iVar4 = iVar4 - iVar1;
      }
      iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);
      if (-1 < iVar1) {
        if (keystr != (uchar **)0x0) {
          *keystr = pbVar3 + 2;
        }
        pbVar3 = pbVar3 + iVar1;
        if (order == 1) {
          iVar4 = ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0);
          pbVar3 = pbVar3 + iVar4;
          if (iVar4 < 0) {
            return -1;
          }
        }
        return (int)pbVar3 - (int)data;
      }
    }
    else {
      iVar1 = 0;
      result->bits = 0;
      do {
        pbVar2 = data + 1;
        iVar1 = iVar1 * 0x100 + (uint)*data;
        result->bits = iVar1;
        data = pbVar2;
      } while (pbVar2 != pbVar3);
      if (order == 0) {
        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->exponent);
        if (iVar1 < 0) {
          return -1;
        }
        pbVar3 = pbVar3 + iVar1;
        iVar4 = iVar4 - iVar1;
      }
      iVar4 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->modulus);
      if (-1 < iVar4) {
                    /* WARNING: Subroutine does not return */
        bignum_bitcount((Bignum_conflict)result->modulus);
      }
    }
  }
  return -1;
}



int makekey(byte *param_1,int param_2,int *param_3,undefined4 *param_4,int param_5)

{
  int iVar1;
  int iVar2;
  byte *pbVar3;
  byte *pbVar5;
  byte *pbVar4;
  
  if (param_2 < 4) {
    return -1;
  }
  param_2 = param_2 + -4;
  pbVar5 = param_1 + 4;
  if (param_3 == (int *)0x0) {
    if (param_5 == 0) {
      iVar2 = ssh1_read_bignum(pbVar5,param_2);
      if (iVar2 < 0) {
        return -1;
      }
      pbVar5 = pbVar5 + iVar2;
      param_2 = param_2 - iVar2;
    }
    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);
    if (iVar2 < 0) {
      return -1;
    }
  }
  else {
    iVar2 = 0;
    *param_3 = 0;
    pbVar4 = param_1;
    do {
      pbVar3 = pbVar4 + 1;
      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;
      *param_3 = iVar2;
      pbVar4 = pbVar3;
    } while (pbVar3 != pbVar5);
    if (param_5 == 0) {
      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);
      if (iVar2 < 0) {
        return -1;
      }
      pbVar5 = pbVar5 + iVar2;
      param_2 = param_2 - iVar2;
    }
    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);
    if (iVar2 < 0) {
      return -1;
    }
    iVar1 = bignum_bitcount(param_3[2]);
    if (iVar1 == 0) {
      return -1;
    }
    param_3[1] = iVar2 + -2;
  }
  if (param_4 != (undefined4 *)0x0) {
    *param_4 = pbVar5 + 2;
  }
  pbVar5 = pbVar5 + iVar2;
  if (param_5 == 1) {
    if (param_3 != (int *)0x0) {
      param_3 = param_3 + 3;
    }
    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);
    pbVar5 = pbVar5 + iVar2;
    if (iVar2 < 0) {
      return -1;
    }
  }
  return (int)pbVar5 - (int)param_1;
}


lui gp,0x4
addiu gp,gp,-0x546c
addu gp,gp,t9
addiu sp,sp,-0x38
slti v0,a1,0x4
sw gp,0x10(sp)
sw s3,0x24(sp)
sw ra,0x34(sp)
sw s6,0x30(sp)
sw s5,0x2c(sp)
sw s4,0x28(sp)
sw s2,0x20(sp)
sw s1,0x1c(sp)
sw s0,0x18(sp)
bne v0,zero,0x00046650
_lw s3,0x48(sp)
or s2,a0,zero
or s5,a2,zero
or s4,a3,zero
addiu s1,a1,-0x4
beq a2,zero,0x00046628
_addiu s0,a0,0x4
or v1,zero,zero
sw zero,0x0(a2)
addiu a0,a0,0x1
lbu a2,-0x1(a0)
sll v1,v1,0x8
addu v1,v1,a2
bne a0,s0,0x0004653c
_sw v1,0x0(s5)
bne s3,zero,0x00046580
_lw t9,-0x7d60(gp)
addiu a2,s5,0xc
or a1,s1,zero
bal 0x0003068c
_or a0,s0,zero
bltz v0,0x00046650
_lw gp,0x10(sp)
addu s0,s0,v0
subu s1,s1,v0
lw t9,-0x7d60(gp)
addiu a2,s5,0x8
or a1,s1,zero
bal 0x0003068c
_or a0,s0,zero
lw gp,0x10(sp)
bltz v0,0x00046650
_or s6,v0,zero
lw t9,-0x7d7c(gp)
bal 0x00030758
_lw a0,0x8(s5)
beq v0,zero,0x00046650
_lw gp,0x10(sp)
addiu v0,s6,-0x2
sw v0,0x4(s5)
beq s4,zero,0x000465c4
_addiu v0,s0,0x2
sw v0,0x0(s4)
li v0,0x1
beq s3,v0,0x000465fc
_addu s0,s0,s6
lw ra,0x34(sp)
subu v0,s0,s2
lw s6,0x30(sp)
lw s5,0x2c(sp)
lw s4,0x28(sp)
lw s3,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x38
beq s5,zero,0x00046608
_lw t9,-0x7d60(gp)
addiu s5,s5,0xc
subu a1,s1,s6
or a2,s5,zero
bal 0x0003068c
_or a0,s0,zero
bltz v0,0x00046650
_addu s0,s0,v0
b 0x000465d4
_lw ra,0x34(sp)
beq s3,zero,0x0004667c
_lw t9,-0x7d60(gp)
lw t9,-0x7d60(gp)
or a2,zero,zero
or a1,s1,zero
bal 0x0003068c
_or a0,s0,zero
lw gp,0x10(sp)
bgez v0,0x000465b8
_or s6,v0,zero
lw ra,0x34(sp)
li v0,-0x1
lw s6,0x30(sp)
lw s5,0x2c(sp)
lw s4,0x28(sp)
lw s3,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x38
or a1,s1,zero
bal 0x0003068c
_or a0,s0,zero
bltz v0,0x00046650
_lw gp,0x10(sp)
addu s0,s0,v0
b 0x00046630
_subu s1,s1,v0
(translation_unit "int makekey(byte *param_1,int param_2,int *param_3,undefined4 *param_4,int param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar5;\n  byte *pbVar4;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  pbVar5 = param_1 + 4;\n  if (param_3 == (int *)0x0) {\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  else {\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }\n  if (param_4 != (undefined4 *)0x0) {\n    *param_4 = pbVar5 + 2;\n  }\n  pbVar5 = pbVar5 + iVar2;\n  if (param_5 == 1) {\n    if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);\n    pbVar5 = pbVar5 + iVar2;\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  return (int)pbVar5 - (int)param_1;\n}\n\n" (function_definition "int makekey(byte *param_1,int param_2,int *param_3,undefined4 *param_4,int param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar5;\n  byte *pbVar4;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  pbVar5 = param_1 + 4;\n  if (param_3 == (int *)0x0) {\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  else {\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }\n  if (param_4 != (undefined4 *)0x0) {\n    *param_4 = pbVar5 + 2;\n  }\n  pbVar5 = pbVar5 + iVar2;\n  if (param_5 == 1) {\n    if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);\n    pbVar5 = pbVar5 + iVar2;\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  return (int)pbVar5 - (int)param_1;\n}" primitive_type (function_declarator "makekey(byte *param_1,int param_2,int *param_3,undefined4 *param_4,int param_5)" identifier (parameter_list "(byte *param_1,int param_2,int *param_3,undefined4 *param_4,int param_5)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar5;\n  byte *pbVar4;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  pbVar5 = param_1 + 4;\n  if (param_3 == (int *)0x0) {\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  else {\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }\n  if (param_4 != (undefined4 *)0x0) {\n    *param_4 = pbVar5 + 2;\n  }\n  pbVar5 = pbVar5 + iVar2;\n  if (param_5 == 1) {\n    if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);\n    pbVar5 = pbVar5 + iVar2;\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  return (int)pbVar5 - (int)param_1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (if_statement "if (param_2 < 4) {\n    return -1;\n  }" if (parenthesized_expression "(param_2 < 4)" ( (binary_expression "param_2 < 4" identifier < number_literal) )) (compound_statement "{\n    return -1;\n  }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "param_2 = param_2 + -4;" (assignment_expression "param_2 = param_2 + -4" identifier = (binary_expression "param_2 + -4" identifier + number_literal)) ;) (expression_statement "pbVar5 = param_1 + 4;" (assignment_expression "pbVar5 = param_1 + 4" identifier = (binary_expression "param_1 + 4" identifier + number_literal)) ;) (if_statement "if (param_3 == (int *)0x0) {\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  else {\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }" if (parenthesized_expression "(param_3 == (int *)0x0)" ( (binary_expression "param_3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }" { (if_statement "if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }" { (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2)" identifier = (call_expression "ssh1_read_bignum(pbVar5,param_2)" identifier (argument_list "(pbVar5,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 < 0) {\n        return -1;\n      }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n        return -1;\n      }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "pbVar5 = pbVar5 + iVar2;" (assignment_expression "pbVar5 = pbVar5 + iVar2" identifier = (binary_expression "pbVar5 + iVar2" identifier + identifier)) ;) (expression_statement "param_2 = param_2 - iVar2;" (assignment_expression "param_2 = param_2 - iVar2" identifier = (binary_expression "param_2 - iVar2" identifier - identifier)) ;) })) (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2,0);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2,0)" identifier = (call_expression "ssh1_read_bignum(pbVar5,param_2,0)" identifier (argument_list "(pbVar5,param_2,0)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar2 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) }) (else_clause "else {\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }" else (compound_statement "{\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "pbVar4 = param_1;" (assignment_expression "pbVar4 = param_1" identifier = identifier) ;) (do_statement "do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);" do (compound_statement "{\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    }" { (expression_statement "pbVar3 = pbVar4 + 1;" (assignment_expression "pbVar3 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (expression_statement "iVar2 = iVar2 * 0x100 + (uint)*pbVar4;" (assignment_expression "iVar2 = iVar2 * 0x100 + (uint)*pbVar4" identifier = (binary_expression "iVar2 * 0x100 + (uint)*pbVar4" (binary_expression "iVar2 * 0x100" identifier * number_literal) + (binary_expression "(uint)*pbVar4" (parenthesized_expression "(uint)" ( identifier )) * identifier))) ;) (expression_statement "*param_3 = iVar2;" (assignment_expression "*param_3 = iVar2" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "pbVar4 = pbVar3;" (assignment_expression "pbVar4 = pbVar3" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar3 != pbVar5)" ( (binary_expression "pbVar3 != pbVar5" identifier != identifier) )) ;) (if_statement "if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }" { (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3)" identifier = (call_expression "ssh1_read_bignum(pbVar5,param_2,param_3 + 3)" identifier (argument_list "(pbVar5,param_2,param_3 + 3)" ( identifier , identifier , (binary_expression "param_3 + 3" identifier + number_literal) )))) ;) (if_statement "if (iVar2 < 0) {\n        return -1;\n      }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n        return -1;\n      }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "pbVar5 = pbVar5 + iVar2;" (assignment_expression "pbVar5 = pbVar5 + iVar2" identifier = (binary_expression "pbVar5 + iVar2" identifier + identifier)) ;) (expression_statement "param_2 = param_2 - iVar2;" (assignment_expression "param_2 = param_2 - iVar2" identifier = (binary_expression "param_2 - iVar2" identifier - identifier)) ;) })) (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2)" identifier = (call_expression "ssh1_read_bignum(pbVar5,param_2,param_3 + 2)" identifier (argument_list "(pbVar5,param_2,param_3 + 2)" ( identifier , identifier , (binary_expression "param_3 + 2" identifier + number_literal) )))) ;) (if_statement "if (iVar2 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "iVar1 = bignum_bitcount(param_3[2]);" (assignment_expression "iVar1 = bignum_bitcount(param_3[2])" identifier = (call_expression "bignum_bitcount(param_3[2])" identifier (argument_list "(param_3[2])" ( (subscript_expression "param_3[2]" identifier [ number_literal ]) )))) ;) (if_statement "if (iVar1 == 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "param_3[1] = iVar2 + -2;" (assignment_expression "param_3[1] = iVar2 + -2" (subscript_expression "param_3[1]" identifier [ number_literal ]) = (binary_expression "iVar2 + -2" identifier + number_literal)) ;) }))) (if_statement "if (param_4 != (undefined4 *)0x0) {\n    *param_4 = pbVar5 + 2;\n  }" if (parenthesized_expression "(param_4 != (undefined4 *)0x0)" ( (binary_expression "param_4 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *param_4 = pbVar5 + 2;\n  }" { (expression_statement "*param_4 = pbVar5 + 2;" (assignment_expression "*param_4 = pbVar5 + 2" (pointer_expression "*param_4" * identifier) = (binary_expression "pbVar5 + 2" identifier + number_literal)) ;) })) (expression_statement "pbVar5 = pbVar5 + iVar2;" (assignment_expression "pbVar5 = pbVar5 + iVar2" identifier = (binary_expression "pbVar5 + iVar2" identifier + identifier)) ;) (if_statement "if (param_5 == 1) {\n    if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);\n    pbVar5 = pbVar5 + iVar2;\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }" if (parenthesized_expression "(param_5 == 1)" ( (binary_expression "param_5 == 1" identifier == number_literal) )) (compound_statement "{\n    if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);\n    pbVar5 = pbVar5 + iVar2;\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }" { (if_statement "if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }" if (parenthesized_expression "(param_3 != (int *)0x0)" ( (binary_expression "param_3 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      param_3 = param_3 + 3;\n    }" { (expression_statement "param_3 = param_3 + 3;" (assignment_expression "param_3 = param_3 + 3" identifier = (binary_expression "param_3 + 3" identifier + number_literal)) ;) })) (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3)" identifier = (call_expression "ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3)" identifier (argument_list "(pbVar5,param_2 - iVar2,param_3)" ( identifier , (binary_expression "param_2 - iVar2" identifier - identifier) , identifier )))) ;) (expression_statement "pbVar5 = pbVar5 + iVar2;" (assignment_expression "pbVar5 = pbVar5 + iVar2" identifier = (binary_expression "pbVar5 + iVar2" identifier + identifier)) ;) (if_statement "if (iVar2 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) })) (return_statement "return (int)pbVar5 - (int)param_1;" return (binary_expression "(int)pbVar5 - (int)param_1" (cast_expression "(int)pbVar5" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })))
(translation_unit "/* WARNING: Removing unreachable block (ram,0x00046604) */\n\nint makekey(uchar *data,int len,RSAKey *result,uchar **keystr,int order)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  byte *pbVar3;\n  int iVar4;\n  \n  if (3 < len) {\n    iVar4 = len + -4;\n    pbVar3 = data + 4;\n    if (result == (RSAKey *)0x0) {\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n      if (-1 < iVar1) {\n        if (keystr != (uchar **)0x0) {\n          *keystr = pbVar3 + 2;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        if (order == 1) {\n          iVar4 = ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0);\n          pbVar3 = pbVar3 + iVar4;\n          if (iVar4 < 0) {\n            return -1;\n          }\n        }\n        return (int)pbVar3 - (int)data;\n      }\n    }\n    else {\n      iVar1 = 0;\n      result->bits = 0;\n      do {\n        pbVar2 = data + 1;\n        iVar1 = iVar1 * 0x100 + (uint)*data;\n        result->bits = iVar1;\n        data = pbVar2;\n      } while (pbVar2 != pbVar3);\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->exponent);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar4 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->modulus);\n      if (-1 < iVar4) {\n                    /* WARNING: Subroutine does not return */\n        bignum_bitcount((Bignum_conflict)result->modulus);\n      }\n    }\n  }\n  return -1;\n}\n\n" comment (function_definition "int makekey(uchar *data,int len,RSAKey *result,uchar **keystr,int order)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  byte *pbVar3;\n  int iVar4;\n  \n  if (3 < len) {\n    iVar4 = len + -4;\n    pbVar3 = data + 4;\n    if (result == (RSAKey *)0x0) {\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n      if (-1 < iVar1) {\n        if (keystr != (uchar **)0x0) {\n          *keystr = pbVar3 + 2;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        if (order == 1) {\n          iVar4 = ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0);\n          pbVar3 = pbVar3 + iVar4;\n          if (iVar4 < 0) {\n            return -1;\n          }\n        }\n        return (int)pbVar3 - (int)data;\n      }\n    }\n    else {\n      iVar1 = 0;\n      result->bits = 0;\n      do {\n        pbVar2 = data + 1;\n        iVar1 = iVar1 * 0x100 + (uint)*data;\n        result->bits = iVar1;\n        data = pbVar2;\n      } while (pbVar2 != pbVar3);\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->exponent);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar4 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->modulus);\n      if (-1 < iVar4) {\n                    /* WARNING: Subroutine does not return */\n        bignum_bitcount((Bignum_conflict)result->modulus);\n      }\n    }\n  }\n  return -1;\n}" primitive_type (function_declarator "makekey(uchar *data,int len,RSAKey *result,uchar **keystr,int order)" identifier (parameter_list "(uchar *data,int len,RSAKey *result,uchar **keystr,int order)" ( (parameter_declaration "uchar *data" type_identifier (pointer_declarator "*data" * identifier)) , (parameter_declaration "int len" primitive_type identifier) , (parameter_declaration "RSAKey *result" type_identifier (pointer_declarator "*result" * identifier)) , (parameter_declaration "uchar **keystr" type_identifier (pointer_declarator "**keystr" * (pointer_declarator "*keystr" * identifier))) , (parameter_declaration "int order" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  byte *pbVar3;\n  int iVar4;\n  \n  if (3 < len) {\n    iVar4 = len + -4;\n    pbVar3 = data + 4;\n    if (result == (RSAKey *)0x0) {\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n      if (-1 < iVar1) {\n        if (keystr != (uchar **)0x0) {\n          *keystr = pbVar3 + 2;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        if (order == 1) {\n          iVar4 = ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0);\n          pbVar3 = pbVar3 + iVar4;\n          if (iVar4 < 0) {\n            return -1;\n          }\n        }\n        return (int)pbVar3 - (int)data;\n      }\n    }\n    else {\n      iVar1 = 0;\n      result->bits = 0;\n      do {\n        pbVar2 = data + 1;\n        iVar1 = iVar1 * 0x100 + (uint)*data;\n        result->bits = iVar1;\n        data = pbVar2;\n      } while (pbVar2 != pbVar3);\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->exponent);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar4 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->modulus);\n      if (-1 < iVar4) {\n                    /* WARNING: Subroutine does not return */\n        bignum_bitcount((Bignum_conflict)result->modulus);\n      }\n    }\n  }\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (3 < len) {\n    iVar4 = len + -4;\n    pbVar3 = data + 4;\n    if (result == (RSAKey *)0x0) {\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n      if (-1 < iVar1) {\n        if (keystr != (uchar **)0x0) {\n          *keystr = pbVar3 + 2;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        if (order == 1) {\n          iVar4 = ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0);\n          pbVar3 = pbVar3 + iVar4;\n          if (iVar4 < 0) {\n            return -1;\n          }\n        }\n        return (int)pbVar3 - (int)data;\n      }\n    }\n    else {\n      iVar1 = 0;\n      result->bits = 0;\n      do {\n        pbVar2 = data + 1;\n        iVar1 = iVar1 * 0x100 + (uint)*data;\n        result->bits = iVar1;\n        data = pbVar2;\n      } while (pbVar2 != pbVar3);\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->exponent);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar4 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->modulus);\n      if (-1 < iVar4) {\n                    /* WARNING: Subroutine does not return */\n        bignum_bitcount((Bignum_conflict)result->modulus);\n      }\n    }\n  }" if (parenthesized_expression "(3 < len)" ( (binary_expression "3 < len" number_literal < identifier) )) (compound_statement "{\n    iVar4 = len + -4;\n    pbVar3 = data + 4;\n    if (result == (RSAKey *)0x0) {\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n      if (-1 < iVar1) {\n        if (keystr != (uchar **)0x0) {\n          *keystr = pbVar3 + 2;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        if (order == 1) {\n          iVar4 = ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0);\n          pbVar3 = pbVar3 + iVar4;\n          if (iVar4 < 0) {\n            return -1;\n          }\n        }\n        return (int)pbVar3 - (int)data;\n      }\n    }\n    else {\n      iVar1 = 0;\n      result->bits = 0;\n      do {\n        pbVar2 = data + 1;\n        iVar1 = iVar1 * 0x100 + (uint)*data;\n        result->bits = iVar1;\n        data = pbVar2;\n      } while (pbVar2 != pbVar3);\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->exponent);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar4 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->modulus);\n      if (-1 < iVar4) {\n                    /* WARNING: Subroutine does not return */\n        bignum_bitcount((Bignum_conflict)result->modulus);\n      }\n    }\n  }" { (expression_statement "iVar4 = len + -4;" (assignment_expression "iVar4 = len + -4" identifier = (binary_expression "len + -4" identifier + number_literal)) ;) (expression_statement "pbVar3 = data + 4;" (assignment_expression "pbVar3 = data + 4" identifier = (binary_expression "data + 4" identifier + number_literal)) ;) (if_statement "if (result == (RSAKey *)0x0) {\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n      if (-1 < iVar1) {\n        if (keystr != (uchar **)0x0) {\n          *keystr = pbVar3 + 2;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        if (order == 1) {\n          iVar4 = ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0);\n          pbVar3 = pbVar3 + iVar4;\n          if (iVar4 < 0) {\n            return -1;\n          }\n        }\n        return (int)pbVar3 - (int)data;\n      }\n    }\n    else {\n      iVar1 = 0;\n      result->bits = 0;\n      do {\n        pbVar2 = data + 1;\n        iVar1 = iVar1 * 0x100 + (uint)*data;\n        result->bits = iVar1;\n        data = pbVar2;\n      } while (pbVar2 != pbVar3);\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->exponent);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar4 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->modulus);\n      if (-1 < iVar4) {\n                    /* WARNING: Subroutine does not return */\n        bignum_bitcount((Bignum_conflict)result->modulus);\n      }\n    }" if (parenthesized_expression "(result == (RSAKey *)0x0)" ( (binary_expression "result == (RSAKey *)0x0" identifier == (cast_expression "(RSAKey *)0x0" ( (type_descriptor "RSAKey *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n      if (-1 < iVar1) {\n        if (keystr != (uchar **)0x0) {\n          *keystr = pbVar3 + 2;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        if (order == 1) {\n          iVar4 = ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0);\n          pbVar3 = pbVar3 + iVar4;\n          if (iVar4 < 0) {\n            return -1;\n          }\n        }\n        return (int)pbVar3 - (int)data;\n      }\n    }" { (if_statement "if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }" if (parenthesized_expression "(order == 0)" ( (binary_expression "order == 0" identifier == number_literal) )) (compound_statement "{\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }" { (expression_statement "iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);" (assignment_expression "iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0)" identifier = (call_expression "ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0)" identifier (argument_list "(pbVar3,iVar4,(Bignum_conflict *)0x0)" ( identifier , identifier , (cast_expression "(Bignum_conflict *)0x0" ( (type_descriptor "Bignum_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (if_statement "if (iVar1 < 0) {\n          return -1;\n        }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n          return -1;\n        }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "pbVar3 = pbVar3 + iVar1;" (assignment_expression "pbVar3 = pbVar3 + iVar1" identifier = (binary_expression "pbVar3 + iVar1" identifier + identifier)) ;) (expression_statement "iVar4 = iVar4 - iVar1;" (assignment_expression "iVar4 = iVar4 - iVar1" identifier = (binary_expression "iVar4 - iVar1" identifier - identifier)) ;) })) (expression_statement "iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0);" (assignment_expression "iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0)" identifier = (call_expression "ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)0x0)" identifier (argument_list "(pbVar3,iVar4,(Bignum_conflict *)0x0)" ( identifier , identifier , (cast_expression "(Bignum_conflict *)0x0" ( (type_descriptor "Bignum_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (if_statement "if (-1 < iVar1) {\n        if (keystr != (uchar **)0x0) {\n          *keystr = pbVar3 + 2;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        if (order == 1) {\n          iVar4 = ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0);\n          pbVar3 = pbVar3 + iVar4;\n          if (iVar4 < 0) {\n            return -1;\n          }\n        }\n        return (int)pbVar3 - (int)data;\n      }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n        if (keystr != (uchar **)0x0) {\n          *keystr = pbVar3 + 2;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        if (order == 1) {\n          iVar4 = ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0);\n          pbVar3 = pbVar3 + iVar4;\n          if (iVar4 < 0) {\n            return -1;\n          }\n        }\n        return (int)pbVar3 - (int)data;\n      }" { (if_statement "if (keystr != (uchar **)0x0) {\n          *keystr = pbVar3 + 2;\n        }" if (parenthesized_expression "(keystr != (uchar **)0x0)" ( (binary_expression "keystr != (uchar **)0x0" identifier != (cast_expression "(uchar **)0x0" ( (type_descriptor "uchar **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n          *keystr = pbVar3 + 2;\n        }" { (expression_statement "*keystr = pbVar3 + 2;" (assignment_expression "*keystr = pbVar3 + 2" (pointer_expression "*keystr" * identifier) = (binary_expression "pbVar3 + 2" identifier + number_literal)) ;) })) (expression_statement "pbVar3 = pbVar3 + iVar1;" (assignment_expression "pbVar3 = pbVar3 + iVar1" identifier = (binary_expression "pbVar3 + iVar1" identifier + identifier)) ;) (if_statement "if (order == 1) {\n          iVar4 = ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0);\n          pbVar3 = pbVar3 + iVar4;\n          if (iVar4 < 0) {\n            return -1;\n          }\n        }" if (parenthesized_expression "(order == 1)" ( (binary_expression "order == 1" identifier == number_literal) )) (compound_statement "{\n          iVar4 = ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0);\n          pbVar3 = pbVar3 + iVar4;\n          if (iVar4 < 0) {\n            return -1;\n          }\n        }" { (expression_statement "iVar4 = ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0);" (assignment_expression "iVar4 = ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0)" identifier = (call_expression "ssh1_read_bignum(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0)" identifier (argument_list "(pbVar3,iVar4 - iVar1,(Bignum_conflict *)0x0)" ( identifier , (binary_expression "iVar4 - iVar1" identifier - identifier) , (cast_expression "(Bignum_conflict *)0x0" ( (type_descriptor "Bignum_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "pbVar3 = pbVar3 + iVar4;" (assignment_expression "pbVar3 = pbVar3 + iVar4" identifier = (binary_expression "pbVar3 + iVar4" identifier + identifier)) ;) (if_statement "if (iVar4 < 0) {\n            return -1;\n          }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n            return -1;\n          }" { (return_statement "return -1;" return number_literal ;) })) })) (return_statement "return (int)pbVar3 - (int)data;" return (binary_expression "(int)pbVar3 - (int)data" (cast_expression "(int)pbVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) }) (else_clause "else {\n      iVar1 = 0;\n      result->bits = 0;\n      do {\n        pbVar2 = data + 1;\n        iVar1 = iVar1 * 0x100 + (uint)*data;\n        result->bits = iVar1;\n        data = pbVar2;\n      } while (pbVar2 != pbVar3);\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->exponent);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar4 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->modulus);\n      if (-1 < iVar4) {\n                    /* WARNING: Subroutine does not return */\n        bignum_bitcount((Bignum_conflict)result->modulus);\n      }\n    }" else (compound_statement "{\n      iVar1 = 0;\n      result->bits = 0;\n      do {\n        pbVar2 = data + 1;\n        iVar1 = iVar1 * 0x100 + (uint)*data;\n        result->bits = iVar1;\n        data = pbVar2;\n      } while (pbVar2 != pbVar3);\n      if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->exponent);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }\n      iVar4 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->modulus);\n      if (-1 < iVar4) {\n                    /* WARNING: Subroutine does not return */\n        bignum_bitcount((Bignum_conflict)result->modulus);\n      }\n    }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (expression_statement "result->bits = 0;" (assignment_expression "result->bits = 0" (field_expression "result->bits" identifier -> field_identifier) = number_literal) ;) (do_statement "do {\n        pbVar2 = data + 1;\n        iVar1 = iVar1 * 0x100 + (uint)*data;\n        result->bits = iVar1;\n        data = pbVar2;\n      } while (pbVar2 != pbVar3);" do (compound_statement "{\n        pbVar2 = data + 1;\n        iVar1 = iVar1 * 0x100 + (uint)*data;\n        result->bits = iVar1;\n        data = pbVar2;\n      }" { (expression_statement "pbVar2 = data + 1;" (assignment_expression "pbVar2 = data + 1" identifier = (binary_expression "data + 1" identifier + number_literal)) ;) (expression_statement "iVar1 = iVar1 * 0x100 + (uint)*data;" (assignment_expression "iVar1 = iVar1 * 0x100 + (uint)*data" identifier = (binary_expression "iVar1 * 0x100 + (uint)*data" (binary_expression "iVar1 * 0x100" identifier * number_literal) + (binary_expression "(uint)*data" (parenthesized_expression "(uint)" ( identifier )) * identifier))) ;) (expression_statement "result->bits = iVar1;" (assignment_expression "result->bits = iVar1" (field_expression "result->bits" identifier -> field_identifier) = identifier) ;) (expression_statement "data = pbVar2;" (assignment_expression "data = pbVar2" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar2 != pbVar3)" ( (binary_expression "pbVar2 != pbVar3" identifier != identifier) )) ;) (if_statement "if (order == 0) {\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->exponent);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }" if (parenthesized_expression "(order == 0)" ( (binary_expression "order == 0" identifier == number_literal) )) (compound_statement "{\n        iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->exponent);\n        if (iVar1 < 0) {\n          return -1;\n        }\n        pbVar3 = pbVar3 + iVar1;\n        iVar4 = iVar4 - iVar1;\n      }" { (expression_statement "iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->exponent);" (assignment_expression "iVar1 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->exponent)" identifier = (call_expression "ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->exponent)" identifier (argument_list "(pbVar3,iVar4,(Bignum_conflict *)&result->exponent)" ( identifier , identifier , (cast_expression "(Bignum_conflict *)&result->exponent" ( (type_descriptor "Bignum_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&result->exponent" & (field_expression "result->exponent" identifier -> field_identifier))) )))) ;) (if_statement "if (iVar1 < 0) {\n          return -1;\n        }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n          return -1;\n        }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "pbVar3 = pbVar3 + iVar1;" (assignment_expression "pbVar3 = pbVar3 + iVar1" identifier = (binary_expression "pbVar3 + iVar1" identifier + identifier)) ;) (expression_statement "iVar4 = iVar4 - iVar1;" (assignment_expression "iVar4 = iVar4 - iVar1" identifier = (binary_expression "iVar4 - iVar1" identifier - identifier)) ;) })) (expression_statement "iVar4 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->modulus);" (assignment_expression "iVar4 = ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->modulus)" identifier = (call_expression "ssh1_read_bignum(pbVar3,iVar4,(Bignum_conflict *)&result->modulus)" identifier (argument_list "(pbVar3,iVar4,(Bignum_conflict *)&result->modulus)" ( identifier , identifier , (cast_expression "(Bignum_conflict *)&result->modulus" ( (type_descriptor "Bignum_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&result->modulus" & (field_expression "result->modulus" identifier -> field_identifier))) )))) ;) (if_statement "if (-1 < iVar4) {\n                    /* WARNING: Subroutine does not return */\n        bignum_bitcount((Bignum_conflict)result->modulus);\n      }" if (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        bignum_bitcount((Bignum_conflict)result->modulus);\n      }" { comment (expression_statement "bignum_bitcount((Bignum_conflict)result->modulus);" (call_expression "bignum_bitcount((Bignum_conflict)result->modulus)" identifier (argument_list "((Bignum_conflict)result->modulus)" ( (cast_expression "(Bignum_conflict)result->modulus" ( (type_descriptor "Bignum_conflict" type_identifier) ) (field_expression "result->modulus" identifier -> field_identifier)) ))) ;) })) }))) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "int makekey(byte *param_1,int param_2,int *param_3,undefined4 *param_4,int param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar5;\n  byte *pbVar4;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  pbVar5 = param_1 + 4;\n  if (param_3 == (int *)0x0) {\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  else {\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }\n  if (param_4 != (undefined4 *)0x0) {\n    *param_4 = pbVar5 + 2;\n  }\n  pbVar5 = pbVar5 + iVar2;\n  if (param_5 == 1) {\n    if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);\n    pbVar5 = pbVar5 + iVar2;\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  return (int)pbVar5 - (int)param_1;\n}\n\n" (function_definition "int makekey(byte *param_1,int param_2,int *param_3,undefined4 *param_4,int param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar5;\n  byte *pbVar4;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  pbVar5 = param_1 + 4;\n  if (param_3 == (int *)0x0) {\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  else {\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }\n  if (param_4 != (undefined4 *)0x0) {\n    *param_4 = pbVar5 + 2;\n  }\n  pbVar5 = pbVar5 + iVar2;\n  if (param_5 == 1) {\n    if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);\n    pbVar5 = pbVar5 + iVar2;\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  return (int)pbVar5 - (int)param_1;\n}" primitive_type (function_declarator "makekey(byte *param_1,int param_2,int *param_3,undefined4 *param_4,int param_5)" identifier (parameter_list "(byte *param_1,int param_2,int *param_3,undefined4 *param_4,int param_5)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar5;\n  byte *pbVar4;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  pbVar5 = param_1 + 4;\n  if (param_3 == (int *)0x0) {\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  else {\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }\n  if (param_4 != (undefined4 *)0x0) {\n    *param_4 = pbVar5 + 2;\n  }\n  pbVar5 = pbVar5 + iVar2;\n  if (param_5 == 1) {\n    if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);\n    pbVar5 = pbVar5 + iVar2;\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  return (int)pbVar5 - (int)param_1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (if_statement "if (param_2 < 4) {\n    return -1;\n  }" if (parenthesized_expression "(param_2 < 4)" ( (binary_expression "param_2 < 4" identifier < number_literal) )) (compound_statement "{\n    return -1;\n  }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "param_2 = param_2 + -4;" (assignment_expression "param_2 = param_2 + -4" identifier = (binary_expression "param_2 + -4" identifier + number_literal)) ;) (expression_statement "pbVar5 = param_1 + 4;" (assignment_expression "pbVar5 = param_1 + 4" identifier = (binary_expression "param_1 + 4" identifier + number_literal)) ;) (if_statement "if (param_3 == (int *)0x0) {\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  else {\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }" if (parenthesized_expression "(param_3 == (int *)0x0)" ( (binary_expression "param_3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }" { (if_statement "if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }" { (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2)" identifier = (call_expression "ssh1_read_bignum(pbVar5,param_2)" identifier (argument_list "(pbVar5,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 < 0) {\n        return -1;\n      }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n        return -1;\n      }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "pbVar5 = pbVar5 + iVar2;" (assignment_expression "pbVar5 = pbVar5 + iVar2" identifier = (binary_expression "pbVar5 + iVar2" identifier + identifier)) ;) (expression_statement "param_2 = param_2 - iVar2;" (assignment_expression "param_2 = param_2 - iVar2" identifier = (binary_expression "param_2 - iVar2" identifier - identifier)) ;) })) (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2,0);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2,0)" identifier = (call_expression "ssh1_read_bignum(pbVar5,param_2,0)" identifier (argument_list "(pbVar5,param_2,0)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar2 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) }) (else_clause "else {\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }" else (compound_statement "{\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "pbVar4 = param_1;" (assignment_expression "pbVar4 = param_1" identifier = identifier) ;) (do_statement "do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);" do (compound_statement "{\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    }" { (expression_statement "pbVar3 = pbVar4 + 1;" (assignment_expression "pbVar3 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (expression_statement "iVar2 = iVar2 * 0x100 + (uint)*pbVar4;" (assignment_expression "iVar2 = iVar2 * 0x100 + (uint)*pbVar4" identifier = (binary_expression "iVar2 * 0x100 + (uint)*pbVar4" (binary_expression "iVar2 * 0x100" identifier * number_literal) + (binary_expression "(uint)*pbVar4" (parenthesized_expression "(uint)" ( identifier )) * identifier))) ;) (expression_statement "*param_3 = iVar2;" (assignment_expression "*param_3 = iVar2" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "pbVar4 = pbVar3;" (assignment_expression "pbVar4 = pbVar3" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar3 != pbVar5)" ( (binary_expression "pbVar3 != pbVar5" identifier != identifier) )) ;) (if_statement "if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }" { (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3)" identifier = (call_expression "ssh1_read_bignum(pbVar5,param_2,param_3 + 3)" identifier (argument_list "(pbVar5,param_2,param_3 + 3)" ( identifier , identifier , (binary_expression "param_3 + 3" identifier + number_literal) )))) ;) (if_statement "if (iVar2 < 0) {\n        return -1;\n      }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n        return -1;\n      }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "pbVar5 = pbVar5 + iVar2;" (assignment_expression "pbVar5 = pbVar5 + iVar2" identifier = (binary_expression "pbVar5 + iVar2" identifier + identifier)) ;) (expression_statement "param_2 = param_2 - iVar2;" (assignment_expression "param_2 = param_2 - iVar2" identifier = (binary_expression "param_2 - iVar2" identifier - identifier)) ;) })) (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2)" identifier = (call_expression "ssh1_read_bignum(pbVar5,param_2,param_3 + 2)" identifier (argument_list "(pbVar5,param_2,param_3 + 2)" ( identifier , identifier , (binary_expression "param_3 + 2" identifier + number_literal) )))) ;) (if_statement "if (iVar2 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "iVar1 = bignum_bitcount(param_3[2]);" (assignment_expression "iVar1 = bignum_bitcount(param_3[2])" identifier = (call_expression "bignum_bitcount(param_3[2])" identifier (argument_list "(param_3[2])" ( (subscript_expression "param_3[2]" identifier [ number_literal ]) )))) ;) (if_statement "if (iVar1 == 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "param_3[1] = iVar2 + -2;" (assignment_expression "param_3[1] = iVar2 + -2" (subscript_expression "param_3[1]" identifier [ number_literal ]) = (binary_expression "iVar2 + -2" identifier + number_literal)) ;) }))) (if_statement "if (param_4 != (undefined4 *)0x0) {\n    *param_4 = pbVar5 + 2;\n  }" if (parenthesized_expression "(param_4 != (undefined4 *)0x0)" ( (binary_expression "param_4 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *param_4 = pbVar5 + 2;\n  }" { (expression_statement "*param_4 = pbVar5 + 2;" (assignment_expression "*param_4 = pbVar5 + 2" (pointer_expression "*param_4" * identifier) = (binary_expression "pbVar5 + 2" identifier + number_literal)) ;) })) (expression_statement "pbVar5 = pbVar5 + iVar2;" (assignment_expression "pbVar5 = pbVar5 + iVar2" identifier = (binary_expression "pbVar5 + iVar2" identifier + identifier)) ;) (if_statement "if (param_5 == 1) {\n    if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);\n    pbVar5 = pbVar5 + iVar2;\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }" if (parenthesized_expression "(param_5 == 1)" ( (binary_expression "param_5 == 1" identifier == number_literal) )) (compound_statement "{\n    if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);\n    pbVar5 = pbVar5 + iVar2;\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }" { (if_statement "if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }" if (parenthesized_expression "(param_3 != (int *)0x0)" ( (binary_expression "param_3 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      param_3 = param_3 + 3;\n    }" { (expression_statement "param_3 = param_3 + 3;" (assignment_expression "param_3 = param_3 + 3" identifier = (binary_expression "param_3 + 3" identifier + number_literal)) ;) })) (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3)" identifier = (call_expression "ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3)" identifier (argument_list "(pbVar5,param_2 - iVar2,param_3)" ( identifier , (binary_expression "param_2 - iVar2" identifier - identifier) , identifier )))) ;) (expression_statement "pbVar5 = pbVar5 + iVar2;" (assignment_expression "pbVar5 = pbVar5 + iVar2" identifier = (binary_expression "pbVar5 + iVar2" identifier + identifier)) ;) (if_statement "if (iVar2 < 0) {\n      return -1;\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) })) (return_statement "return (int)pbVar5 - (int)param_1;" return (binary_expression "(int)pbVar5 - (int)param_1" (cast_expression "(int)pbVar5" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT * LIT) + (binary_expression (parenthesized_expression ( IDENT )) * IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT - IDENT) , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })) })) (return_statement return (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) })))
(function_definition "int makekey(byte *param_1,int param_2,int *param_3,undefined4 *param_4,int param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar5;\n  byte *pbVar4;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  pbVar5 = param_1 + 4;\n  if (param_3 == (int *)0x0) {\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  else {\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }\n  if (param_4 != (undefined4 *)0x0) {\n    *param_4 = pbVar5 + 2;\n  }\n  pbVar5 = pbVar5 + iVar2;\n  if (param_5 == 1) {\n    if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);\n    pbVar5 = pbVar5 + iVar2;\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  return (int)pbVar5 - (int)param_1;\n}" (primitive_type "int") (function_declarator "makekey(byte *param_1,int param_2,int *param_3,undefined4 *param_4,int param_5)" (identifier "makekey") (parameter_list "(byte *param_1,int param_2,int *param_3,undefined4 *param_4,int param_5)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "undefined4 *param_4" (type_identifier "undefined4") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar5;\n  byte *pbVar4;\n  \n  if (param_2 < 4) {\n    return -1;\n  }\n  param_2 = param_2 + -4;\n  pbVar5 = param_1 + 4;\n  if (param_3 == (int *)0x0) {\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  else {\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }\n  if (param_4 != (undefined4 *)0x0) {\n    *param_4 = pbVar5 + 2;\n  }\n  pbVar5 = pbVar5 + iVar2;\n  if (param_5 == 1) {\n    if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);\n    pbVar5 = pbVar5 + iVar2;\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  return (int)pbVar5 - (int)param_1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (declaration "byte *pbVar5;" (type_identifier "byte") (pointer_declarator "*pbVar5" (* "*") (identifier "pbVar5")) (; ";")) (declaration "byte *pbVar4;" (type_identifier "byte") (pointer_declarator "*pbVar4" (* "*") (identifier "pbVar4")) (; ";")) (if_statement "if (param_2 < 4) {\n    return -1;\n  }" (if "if") (parenthesized_expression "(param_2 < 4)" (( "(") (binary_expression "param_2 < 4" (identifier "param_2") (< "<") (number_literal "4")) () ")")) (compound_statement "{\n    return -1;\n  }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (expression_statement "param_2 = param_2 + -4;" (assignment_expression "param_2 = param_2 + -4" (identifier "param_2") (= "=") (binary_expression "param_2 + -4" (identifier "param_2") (+ "+") (number_literal "-4"))) (; ";")) (expression_statement "pbVar5 = param_1 + 4;" (assignment_expression "pbVar5 = param_1 + 4" (identifier "pbVar5") (= "=") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4"))) (; ";")) (if_statement "if (param_3 == (int *)0x0) {\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }\n  else {\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }" (if "if") (parenthesized_expression "(param_3 == (int *)0x0)" (( "(") (binary_expression "param_3 == (int *)0x0" (identifier "param_3") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }" ({ "{") (if_statement "if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }" (if "if") (parenthesized_expression "(param_5 == 0)" (( "(") (binary_expression "param_5 == 0" (identifier "param_5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar2 = ssh1_read_bignum(pbVar5,param_2);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }" ({ "{") (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2)" (identifier "iVar2") (= "=") (call_expression "ssh1_read_bignum(pbVar5,param_2)" (identifier "ssh1_read_bignum") (argument_list "(pbVar5,param_2)" (( "(") (identifier "pbVar5") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar2 < 0) {\n        return -1;\n      }" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        return -1;\n      }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (expression_statement "pbVar5 = pbVar5 + iVar2;" (assignment_expression "pbVar5 = pbVar5 + iVar2" (identifier "pbVar5") (= "=") (binary_expression "pbVar5 + iVar2" (identifier "pbVar5") (+ "+") (identifier "iVar2"))) (; ";")) (expression_statement "param_2 = param_2 - iVar2;" (assignment_expression "param_2 = param_2 - iVar2" (identifier "param_2") (= "=") (binary_expression "param_2 - iVar2" (identifier "param_2") (- "-") (identifier "iVar2"))) (; ";")) (} "}"))) (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2,0);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2,0)" (identifier "iVar2") (= "=") (call_expression "ssh1_read_bignum(pbVar5,param_2,0)" (identifier "ssh1_read_bignum") (argument_list "(pbVar5,param_2,0)" (( "(") (identifier "pbVar5") (, ",") (identifier "param_2") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar2 < 0) {\n      return -1;\n    }" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      return -1;\n    }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }" (else "else") (compound_statement "{\n    iVar2 = 0;\n    *param_3 = 0;\n    pbVar4 = param_1;\n    do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);\n    if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);\n    if (iVar2 < 0) {\n      return -1;\n    }\n    iVar1 = bignum_bitcount(param_3[2]);\n    if (iVar1 == 0) {\n      return -1;\n    }\n    param_3[1] = iVar2 + -2;\n  }" ({ "{") (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0")) (; ";")) (expression_statement "pbVar4 = param_1;" (assignment_expression "pbVar4 = param_1" (identifier "pbVar4") (= "=") (identifier "param_1")) (; ";")) (do_statement "do {\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    } while (pbVar3 != pbVar5);" (do "do") (compound_statement "{\n      pbVar3 = pbVar4 + 1;\n      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;\n      *param_3 = iVar2;\n      pbVar4 = pbVar3;\n    }" ({ "{") (expression_statement "pbVar3 = pbVar4 + 1;" (assignment_expression "pbVar3 = pbVar4 + 1" (identifier "pbVar3") (= "=") (binary_expression "pbVar4 + 1" (identifier "pbVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar2 = iVar2 * 0x100 + (uint)*pbVar4;" (assignment_expression "iVar2 = iVar2 * 0x100 + (uint)*pbVar4" (identifier "iVar2") (= "=") (binary_expression "iVar2 * 0x100 + (uint)*pbVar4" (binary_expression "iVar2 * 0x100" (identifier "iVar2") (* "*") (number_literal "0x100")) (+ "+") (binary_expression "(uint)*pbVar4" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar4")))) (; ";")) (expression_statement "*param_3 = iVar2;" (assignment_expression "*param_3 = iVar2" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "pbVar4 = pbVar3;" (assignment_expression "pbVar4 = pbVar3" (identifier "pbVar4") (= "=") (identifier "pbVar3")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pbVar3 != pbVar5)" (( "(") (binary_expression "pbVar3 != pbVar5" (identifier "pbVar3") (!= "!=") (identifier "pbVar5")) () ")")) (; ";")) (if_statement "if (param_5 == 0) {\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }" (if "if") (parenthesized_expression "(param_5 == 0)" (( "(") (binary_expression "param_5 == 0" (identifier "param_5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);\n      if (iVar2 < 0) {\n        return -1;\n      }\n      pbVar5 = pbVar5 + iVar2;\n      param_2 = param_2 - iVar2;\n    }" ({ "{") (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3)" (identifier "iVar2") (= "=") (call_expression "ssh1_read_bignum(pbVar5,param_2,param_3 + 3)" (identifier "ssh1_read_bignum") (argument_list "(pbVar5,param_2,param_3 + 3)" (( "(") (identifier "pbVar5") (, ",") (identifier "param_2") (, ",") (binary_expression "param_3 + 3" (identifier "param_3") (+ "+") (number_literal "3")) () ")")))) (; ";")) (if_statement "if (iVar2 < 0) {\n        return -1;\n      }" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        return -1;\n      }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (expression_statement "pbVar5 = pbVar5 + iVar2;" (assignment_expression "pbVar5 = pbVar5 + iVar2" (identifier "pbVar5") (= "=") (binary_expression "pbVar5 + iVar2" (identifier "pbVar5") (+ "+") (identifier "iVar2"))) (; ";")) (expression_statement "param_2 = param_2 - iVar2;" (assignment_expression "param_2 = param_2 - iVar2" (identifier "param_2") (= "=") (binary_expression "param_2 - iVar2" (identifier "param_2") (- "-") (identifier "iVar2"))) (; ";")) (} "}"))) (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2)" (identifier "iVar2") (= "=") (call_expression "ssh1_read_bignum(pbVar5,param_2,param_3 + 2)" (identifier "ssh1_read_bignum") (argument_list "(pbVar5,param_2,param_3 + 2)" (( "(") (identifier "pbVar5") (, ",") (identifier "param_2") (, ",") (binary_expression "param_3 + 2" (identifier "param_3") (+ "+") (number_literal "2")) () ")")))) (; ";")) (if_statement "if (iVar2 < 0) {\n      return -1;\n    }" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      return -1;\n    }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (expression_statement "iVar1 = bignum_bitcount(param_3[2]);" (assignment_expression "iVar1 = bignum_bitcount(param_3[2])" (identifier "iVar1") (= "=") (call_expression "bignum_bitcount(param_3[2])" (identifier "bignum_bitcount") (argument_list "(param_3[2])" (( "(") (subscript_expression "param_3[2]" (identifier "param_3") ([ "[") (number_literal "2") (] "]")) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      return -1;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return -1;\n    }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (expression_statement "param_3[1] = iVar2 + -2;" (assignment_expression "param_3[1] = iVar2 + -2" (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "iVar2 + -2" (identifier "iVar2") (+ "+") (number_literal "-2"))) (; ";")) (} "}")))) (if_statement "if (param_4 != (undefined4 *)0x0) {\n    *param_4 = pbVar5 + 2;\n  }" (if "if") (parenthesized_expression "(param_4 != (undefined4 *)0x0)" (( "(") (binary_expression "param_4 != (undefined4 *)0x0" (identifier "param_4") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    *param_4 = pbVar5 + 2;\n  }" ({ "{") (expression_statement "*param_4 = pbVar5 + 2;" (assignment_expression "*param_4 = pbVar5 + 2" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (binary_expression "pbVar5 + 2" (identifier "pbVar5") (+ "+") (number_literal "2"))) (; ";")) (} "}"))) (expression_statement "pbVar5 = pbVar5 + iVar2;" (assignment_expression "pbVar5 = pbVar5 + iVar2" (identifier "pbVar5") (= "=") (binary_expression "pbVar5 + iVar2" (identifier "pbVar5") (+ "+") (identifier "iVar2"))) (; ";")) (if_statement "if (param_5 == 1) {\n    if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);\n    pbVar5 = pbVar5 + iVar2;\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }" (if "if") (parenthesized_expression "(param_5 == 1)" (( "(") (binary_expression "param_5 == 1" (identifier "param_5") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }\n    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);\n    pbVar5 = pbVar5 + iVar2;\n    if (iVar2 < 0) {\n      return -1;\n    }\n  }" ({ "{") (if_statement "if (param_3 != (int *)0x0) {\n      param_3 = param_3 + 3;\n    }" (if "if") (parenthesized_expression "(param_3 != (int *)0x0)" (( "(") (binary_expression "param_3 != (int *)0x0" (identifier "param_3") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      param_3 = param_3 + 3;\n    }" ({ "{") (expression_statement "param_3 = param_3 + 3;" (assignment_expression "param_3 = param_3 + 3" (identifier "param_3") (= "=") (binary_expression "param_3 + 3" (identifier "param_3") (+ "+") (number_literal "3"))) (; ";")) (} "}"))) (expression_statement "iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);" (assignment_expression "iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3)" (identifier "iVar2") (= "=") (call_expression "ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3)" (identifier "ssh1_read_bignum") (argument_list "(pbVar5,param_2 - iVar2,param_3)" (( "(") (identifier "pbVar5") (, ",") (binary_expression "param_2 - iVar2" (identifier "param_2") (- "-") (identifier "iVar2")) (, ",") (identifier "param_3") () ")")))) (; ";")) (expression_statement "pbVar5 = pbVar5 + iVar2;" (assignment_expression "pbVar5 = pbVar5 + iVar2" (identifier "pbVar5") (= "=") (binary_expression "pbVar5 + iVar2" (identifier "pbVar5") (+ "+") (identifier "iVar2"))) (; ";")) (if_statement "if (iVar2 < 0) {\n      return -1;\n    }" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      return -1;\n    }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (} "}"))) (return_statement "return (int)pbVar5 - (int)param_1;" (return "return") (binary_expression "(int)pbVar5 - (int)param_1" (cast_expression "(int)pbVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar5")) (- "-") (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1"))) (; ";")) (} "}")))

/* WARNING: Removing unreachable block (ram,0x00046604) */

int function_1(type_1 *var_2,int var_1,type_2 *var_3,type_1 **var_9,int var_4)

{
  int var_6;
  type_3 *var_10;
  type_3 *var_7;
  int var_8;
  
  if (3 < var_1) {
    var_8 = var_1 + -4;
    var_7 = var_2 + 4;
    if (var_3 == (type_2 *)0x0) {
      if (var_4 == 0) {
        var_6 = var_5(var_7,var_8,(type_4 *)0x0);
        if (var_6 < 0) {
          return -1;
        }
        var_7 = var_7 + var_6;
        var_8 = var_8 - var_6;
      }
      var_6 = var_5(var_7,var_8,(type_4 *)0x0);
      if (-1 < var_6) {
        if (var_9 != (type_1 **)0x0) {
          *var_9 = var_7 + 2;
        }
        var_7 = var_7 + var_6;
        if (var_4 == 1) {
          var_8 = var_5(var_7,var_8 - var_6,(type_4 *)0x0);
          var_7 = var_7 + var_8;
          if (var_8 < 0) {
            return -1;
          }
        }
        return (int)var_7 - (int)var_2;
      }
    }
    else {
      var_6 = 0;
      var_3->bits = 0;
      do {
        var_10 = var_2 + 1;
        var_6 = var_6 * 0x100 + (uint)*var_2;
        var_3->bits = var_6;
        var_2 = var_10;
      } while (var_10 != var_7);
      if (var_4 == 0) {
        var_6 = var_5(var_7,var_8,(type_4 *)&var_3->exponent);
        if (var_6 < 0) {
          return -1;
        }
        var_7 = var_7 + var_6;
        var_8 = var_8 - var_6;
      }
      var_8 = var_5(var_7,var_8,(type_4 *)&var_3->modulus);
      if (-1 < var_8) {
                    /* WARNING: Subroutine does not return */
        var_11((type_4)var_3->modulus);
      }
    }
  }
  return -1;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) 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)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (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: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (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: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (identifier)) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))))) (return_statement (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))))

int MASKED(byte *param_1,int param_2,int *param_3,undefined4 *param_4,int param_5)

{
  int iVar1;
  int iVar2;
  byte *pbVar3;
  byte *pbVar5;
  byte *pbVar4;
  
  if (param_2 < 4) {
    return -1;
  }
  param_2 = param_2 + -4;
  pbVar5 = param_1 + 4;
  if (param_3 == (int *)0x0) {
    if (param_5 == 0) {
      iVar2 = ssh1_read_bignum(pbVar5,param_2);
      if (iVar2 < 0) {
        return -1;
      }
      pbVar5 = pbVar5 + iVar2;
      param_2 = param_2 - iVar2;
    }
    iVar2 = ssh1_read_bignum(pbVar5,param_2,0);
    if (iVar2 < 0) {
      return -1;
    }
  }
  else {
    iVar2 = 0;
    *param_3 = 0;
    pbVar4 = param_1;
    do {
      pbVar3 = pbVar4 + 1;
      iVar2 = iVar2 * 0x100 + (uint)*pbVar4;
      *param_3 = iVar2;
      pbVar4 = pbVar3;
    } while (pbVar3 != pbVar5);
    if (param_5 == 0) {
      iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 3);
      if (iVar2 < 0) {
        return -1;
      }
      pbVar5 = pbVar5 + iVar2;
      param_2 = param_2 - iVar2;
    }
    iVar2 = ssh1_read_bignum(pbVar5,param_2,param_3 + 2);
    if (iVar2 < 0) {
      return -1;
    }
    iVar1 = bignum_bitcount(param_3[2]);
    if (iVar1 == 0) {
      return -1;
    }
    param_3[1] = iVar2 + -2;
  }
  if (param_4 != (undefined4 *)0x0) {
    *param_4 = pbVar5 + 2;
  }
  pbVar5 = pbVar5 + iVar2;
  if (param_5 == 1) {
    if (param_3 != (int *)0x0) {
      param_3 = param_3 + 3;
    }
    iVar2 = ssh1_read_bignum(pbVar5,param_2 - iVar2,param_3);
    pbVar5 = pbVar5 + iVar2;
    if (iVar2 < 0) {
      return -1;
    }
  }
  return (int)pbVar5 - (int)param_1;
}

