
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void __regparm3
bigdivmod(Bignum_conflict p,Bignum_conflict mod,Bignum_conflict result,Bignum_conflict quotient)

{
  Bignum_conflict pBVar1;
  size_t n;
  BignumInt *m;
  size_t sVar2;
  BignumInt *a;
  BignumInt *pBVar3;
  int iVar4;
  int iVar5;
  BignumInt BVar6;
  int rshift;
  BignumInt local_30;
  size_t local_2c;
  
  n = *mod;
  if (mod[n] == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");
  }
  m = (BignumInt *)safemalloc(n,4);
  sVar2 = 0;
  if (0 < (int)n) {
    do {
      m[sVar2] = mod[*mod - sVar2];
      sVar2 = sVar2 + 1;
    } while (n != sVar2);
  }
  local_2c = *p;
  if ((int)local_2c <= (int)n) {
    local_2c = n + 1;
  }
  a = (BignumInt *)safemalloc(local_2c,4);
  pBVar3 = a;
  if (0 < (int)local_2c) {
    do {
      *pBVar3 = 0;
      pBVar3 = pBVar3 + 1;
    } while (a + local_2c != pBVar3);
  }
  if (0 < (int)*p) {
    iVar4 = 1;
    pBVar3 = a + (local_2c - 1);
    do {
      pBVar1 = p + iVar4;
      iVar4 = iVar4 + 1;
      *pBVar3 = *pBVar1;
      pBVar3 = pBVar3 + -1;
    } while (iVar4 <= (int)*p);
  }
  iVar5 = 5;
  rshift = 0;
  local_30 = *m;
  iVar4 = 0x10;
  BVar6 = local_30;
  do {
    if (BVar6 >> (0x20U - (sbyte)iVar4 & 0x1f) == 0) {
      rshift = rshift + iVar4;
      BVar6 = BVar6 << (sbyte)iVar4;
    }
    iVar4 = iVar4 >> 1;
    iVar5 = iVar5 + -1;
  } while (iVar5 != 0);
  if (rshift != 0) {
    local_30 = local_30 << ((byte)rshift & 0x1f);
    if (1 < (int)n) {
      local_30 = local_30 | m[1] >> (0x20 - (byte)rshift & 0x1f);
    }
  }
  BVar6 = reciprocal_word(local_30);
  internal_mod(a,local_2c,m,n,quotient,BVar6,rshift);
  if ((result != (Bignum_conflict)0x0) && (0 < (int)*result)) {
    iVar4 = 1;
    sVar2 = local_2c;
    do {
      sVar2 = sVar2 - 1;
      BVar6 = 0;
      if (-1 < (int)sVar2) {
        BVar6 = a[sVar2];
      }
      result[iVar4] = BVar6;
      iVar4 = iVar4 + 1;
    } while (iVar4 <= (int)*result);
  }
  smemclr(m,n * 4);
  safefree(m);
  smemclr(a,local_2c << 2);
  safefree(a);
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void __regparm3 FUN_00052c40(int *param_1,int *param_2,int *param_3,undefined4 param_4)

{
  int *piVar1;
  int iVar2;
  uint *puVar3;
  int iVar4;
  undefined4 *puVar5;
  undefined4 *puVar6;
  int iVar7;
  undefined4 uVar8;
  int *piVar9;
  int iVar10;
  undefined **ppuVar11;
  uint uVar12;
  uint uVar13;
  int iVar14;
  int local_2c;
  
  ppuVar11 = &__DT_PLTGOT;
  iVar2 = *param_2;
  if (param_2[iVar2] == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");
  }
  puVar3 = (uint *)FUN_0002e780(iVar2,4);
  iVar4 = 0;
  if (0 < iVar2) {
    do {
      puVar3[iVar4] = param_2[*param_2 - iVar4];
      iVar4 = iVar4 + 1;
    } while (iVar2 != iVar4);
  }
  local_2c = *param_1;
  if (local_2c <= iVar2) {
    local_2c = iVar2 + 1;
  }
  iVar4 = local_2c;
  puVar5 = (undefined4 *)FUN_0002e780(local_2c,4);
  puVar6 = puVar5;
  if (0 < iVar4) {
    do {
      *puVar6 = 0;
      puVar6 = puVar6 + 1;
    } while (puVar5 + iVar4 != puVar6);
  }
  if (0 < *param_1) {
    iVar7 = 1;
    piVar9 = puVar5 + iVar4 + -1;
    do {
      piVar1 = param_1 + iVar7;
      iVar7 = iVar7 + 1;
      *piVar9 = *piVar1;
      piVar9 = piVar9 + -1;
    } while (iVar7 <= *param_1);
  }
  iVar10 = 5;
  iVar14 = 0;
  uVar13 = *puVar3;
  iVar7 = 0x10;
  uVar12 = uVar13;
  do {
    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {
      iVar14 = iVar14 + iVar7;
      uVar12 = uVar12 << (sbyte)iVar7;
    }
    iVar7 = iVar7 >> 1;
    iVar10 = iVar10 + -1;
  } while (iVar10 != 0);
  if (iVar14 != 0) {
    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);
    if (1 < iVar2) {
      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);
    }
  }
  uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13);
  FUN_00052890(iVar2,param_4,uVar8,iVar14);
  if ((param_3 != (int *)0x0) && (0 < *param_3)) {
    iVar7 = 1;
    do {
      iVar4 = iVar4 + -1;
      iVar10 = 0;
      if (-1 < iVar4) {
        iVar10 = puVar5[iVar4];
      }
      param_3[iVar7] = iVar10;
      iVar7 = iVar7 + 1;
    } while (iVar7 <= *param_3);
  }
  FUN_0002f0f0(puVar3,iVar2 * 4);
  FUN_0002f010(puVar3);
  FUN_0002f0f0(puVar5,local_2c << 2);
  FUN_0002f010(puVar5);
  return;
}


PUSH EBP
PUSH EDI
MOV EDI,EAX
PUSH ESI
PUSH EBX
CALL 0x0001c4f0
ADD EBX,0xbdb05
SUB ESP,0x2c
MOV ESI,dword ptr [EDX]
MOV dword ptr [ESP + 0x14],ECX
LEA EAX,[ESI*0x4 + 0x0]
MOV dword ptr [ESP + 0x18],EAX
MOV EAX,dword ptr [EDX + ESI*0x4]
MOV dword ptr [ESP + 0x8],EBX
TEST EAX,EAX
JZ 0x00052e30
SUB ESP,0x8
MOV EBP,EDX
PUSH 0x4
PUSH ESI
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x0002e780
MOV dword ptr [ESP + 0x10],EAX
ADD ESP,0x10
XOR EAX,EAX
MOV ECX,dword ptr [ESP]
TEST ESI,ESI
JLE 0x00052cab
LEA ESI,[ESI]
MOV EDX,dword ptr [EBP]
SUB EDX,EAX
MOV EDX,dword ptr [EBP + EDX*0x4]
MOV dword ptr [ECX + EAX*0x4],EDX
ADD EAX,0x1
CMP ESI,EAX
JNZ 0x00052c98
MOV EAX,dword ptr [EDI]
MOV dword ptr [ESP + 0x10],EAX
MOV dword ptr [ESP + 0x4],EAX
CMP ESI,EAX
JGE 0x00052e20
SUB ESP,0x8
PUSH 0x4
PUSH dword ptr [ESP + 0x1c]
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x0002e780
ADD ESP,0x10
MOV EBX,dword ptr [ESP + 0x4]
MOV EBP,EAX
LEA EDX,[EAX + EBX*0x4]
TEST EBX,EBX
JLE 0x00052ced
NOP
MOV dword ptr [EAX],0x0
ADD EAX,0x4
CMP EDX,EAX
JNZ 0x00052ce0
MOV EAX,dword ptr [EDI]
TEST EAX,EAX
JLE 0x00052d10
MOV EAX,dword ptr [ESP + 0x4]
LEA EDX,[EBP + EAX*0x4 + -0x4]
MOV EAX,0x1
MOV ECX,dword ptr [EDI + EAX*0x4]
SUB EDX,0x4
ADD EAX,0x1
MOV dword ptr [EDX + 0x4],ECX
CMP dword ptr [EDI],EAX
JGE 0x00052d00
MOV EAX,dword ptr [ESP]
MOV dword ptr [ESP + 0x1c],ESI
MOV EDX,0x5
XOR EDI,EDI
MOV EAX,dword ptr [EAX]
MOV dword ptr [ESP + 0xc],EAX
MOV EBX,EAX
MOV EAX,0x10
MOV ECX,0x20
MOV ESI,EBX
SUB ECX,EAX
SHR ESI,CL
TEST ESI,ESI
JNZ 0x00052d40
MOV ECX,EAX
ADD EDI,EAX
SHL EBX,CL
SAR EAX,0x1
SUB EDX,0x1
JNZ 0x00052d2b
MOV ESI,dword ptr [ESP + 0x1c]
TEST EDI,EDI
JNZ 0x00052df0
MOV EAX,dword ptr [ESP + 0xc]
CALL 0x00052610
PUSH EDI
PUSH EAX
MOV EAX,EBP
PUSH dword ptr [ESP + 0x48]
PUSH ESI
MOV ECX,dword ptr [ESP + 0x10]
MOV EDX,dword ptr [ESP + 0x14]
CALL 0x00052890
ADD ESP,0x10
MOV EBX,dword ptr [ESP + 0x14]
TEST EBX,EBX
JZ 0x00052daf
MOV EBX,dword ptr [ESP + 0x14]
MOV EAX,dword ptr [EBX]
TEST EAX,EAX
JLE 0x00052daf
MOV EAX,dword ptr [ESP + 0x4]
MOV EDX,0x1
SUB EAX,0x1
LEA ESI,[ESI]
NOP
XOR ECX,ECX
TEST EAX,EAX
JS 0x00052da2
MOV ECX,dword ptr [EBP + EAX*0x4]
MOV dword ptr [EBX + EDX*0x4],ECX
SUB EAX,0x1
ADD EDX,0x1
CMP dword ptr [EBX],EDX
JGE 0x00052d98
SUB ESP,0x8
PUSH dword ptr [ESP + 0x20]
MOV ESI,dword ptr [ESP + 0xc]
PUSH ESI
MOV EDI,dword ptr [ESP + 0x18]
MOV EBX,EDI
CALL 0x0002f0f0
MOV dword ptr [ESP],ESI
CALL 0x0002f010
POP EDX
POP ECX
MOV EAX,dword ptr [ESP + 0x18]
SHL EAX,0x2
PUSH EAX
PUSH EBP
CALL 0x0002f0f0
MOV dword ptr [ESP],EBP
CALL 0x0002f010
ADD ESP,0x3c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV ECX,EDI
SHL dword ptr [ESP + 0xc],CL
MOV EBX,dword ptr [ESP + 0xc]
CMP ESI,0x1
JLE 0x00052d53
MOV EAX,dword ptr [ESP]
MOV ECX,0x20
SUB ECX,EDI
MOV EAX,dword ptr [EAX + 0x4]
SHR EAX,CL
OR EBX,EAX
MOV dword ptr [ESP + 0xc],EBX
JMP 0x00052d53
LEA EAX,[ESI + 0x1]
MOV dword ptr [ESP + 0x4],EAX
MOV dword ptr [ESP + 0x10],EAX
JMP 0x00052cbd
LEA EAX,[EBX + 0xfffb5410]
PUSH EAX
LEA EAX,[EBX + 0xfffb52d8]
PUSH 0x540
PUSH EAX
LEA EAX,[EBX + 0xfffb5310]
PUSH EAX
CALL 0x0001c000
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_00052c40(int *param_1,int *param_2,int *param_3,undefined4 param_4)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint *puVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  int iVar7;\n  undefined4 uVar8;\n  int *piVar9;\n  int iVar10;\n  undefined **ppuVar11;\n  uint uVar12;\n  uint uVar13;\n  int iVar14;\n  int local_2c;\n  \n  ppuVar11 = &__DT_PLTGOT;\n  iVar2 = *param_2;\n  if (param_2[iVar2] == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }\n  puVar3 = (uint *)FUN_0002e780(iVar2,4);\n  iVar4 = 0;\n  if (0 < iVar2) {\n    do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);\n  }\n  local_2c = *param_1;\n  if (local_2c <= iVar2) {\n    local_2c = iVar2 + 1;\n  }\n  iVar4 = local_2c;\n  puVar5 = (undefined4 *)FUN_0002e780(local_2c,4);\n  puVar6 = puVar5;\n  if (0 < iVar4) {\n    do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);\n  }\n  if (0 < *param_1) {\n    iVar7 = 1;\n    piVar9 = puVar5 + iVar4 + -1;\n    do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);\n  }\n  iVar10 = 5;\n  iVar14 = 0;\n  uVar13 = *puVar3;\n  iVar7 = 0x10;\n  uVar12 = uVar13;\n  do {\n    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }\n    iVar7 = iVar7 >> 1;\n    iVar10 = iVar10 + -1;\n  } while (iVar10 != 0);\n  if (iVar14 != 0) {\n    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);\n    if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }\n  }\n  uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13);\n  FUN_00052890(iVar2,param_4,uVar8,iVar14);\n  if ((param_3 != (int *)0x0) && (0 < *param_3)) {\n    iVar7 = 1;\n    do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);\n  }\n  FUN_0002f0f0(puVar3,iVar2 * 4);\n  FUN_0002f010(puVar3);\n  FUN_0002f0f0(puVar5,local_2c << 2);\n  FUN_0002f010(puVar5);\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_00052c40(int *param_1,int *param_2,int *param_3,undefined4 param_4)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint *puVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  int iVar7;\n  undefined4 uVar8;\n  int *piVar9;\n  int iVar10;\n  undefined **ppuVar11;\n  uint uVar12;\n  uint uVar13;\n  int iVar14;\n  int local_2c;\n  \n  ppuVar11 = &__DT_PLTGOT;\n  iVar2 = *param_2;\n  if (param_2[iVar2] == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }\n  puVar3 = (uint *)FUN_0002e780(iVar2,4);\n  iVar4 = 0;\n  if (0 < iVar2) {\n    do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);\n  }\n  local_2c = *param_1;\n  if (local_2c <= iVar2) {\n    local_2c = iVar2 + 1;\n  }\n  iVar4 = local_2c;\n  puVar5 = (undefined4 *)FUN_0002e780(local_2c,4);\n  puVar6 = puVar5;\n  if (0 < iVar4) {\n    do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);\n  }\n  if (0 < *param_1) {\n    iVar7 = 1;\n    piVar9 = puVar5 + iVar4 + -1;\n    do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);\n  }\n  iVar10 = 5;\n  iVar14 = 0;\n  uVar13 = *puVar3;\n  iVar7 = 0x10;\n  uVar12 = uVar13;\n  do {\n    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }\n    iVar7 = iVar7 >> 1;\n    iVar10 = iVar10 + -1;\n  } while (iVar10 != 0);\n  if (iVar14 != 0) {\n    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);\n    if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }\n  }\n  uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13);\n  FUN_00052890(iVar2,param_4,uVar8,iVar14);\n  if ((param_3 != (int *)0x0) && (0 < *param_3)) {\n    iVar7 = 1;\n    do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);\n  }\n  FUN_0002f0f0(puVar3,iVar2 * 4);\n  FUN_0002f010(puVar3);\n  FUN_0002f0f0(puVar5,local_2c << 2);\n  FUN_0002f010(puVar5);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00052c40(int *param_1,int *param_2,int *param_3,undefined4 param_4)" identifier (parameter_list "(int *param_1,int *param_2,int *param_3,undefined4 param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  uint *puVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  int iVar7;\n  undefined4 uVar8;\n  int *piVar9;\n  int iVar10;\n  undefined **ppuVar11;\n  uint uVar12;\n  uint uVar13;\n  int iVar14;\n  int local_2c;\n  \n  ppuVar11 = &__DT_PLTGOT;\n  iVar2 = *param_2;\n  if (param_2[iVar2] == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }\n  puVar3 = (uint *)FUN_0002e780(iVar2,4);\n  iVar4 = 0;\n  if (0 < iVar2) {\n    do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);\n  }\n  local_2c = *param_1;\n  if (local_2c <= iVar2) {\n    local_2c = iVar2 + 1;\n  }\n  iVar4 = local_2c;\n  puVar5 = (undefined4 *)FUN_0002e780(local_2c,4);\n  puVar6 = puVar5;\n  if (0 < iVar4) {\n    do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);\n  }\n  if (0 < *param_1) {\n    iVar7 = 1;\n    piVar9 = puVar5 + iVar4 + -1;\n    do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);\n  }\n  iVar10 = 5;\n  iVar14 = 0;\n  uVar13 = *puVar3;\n  iVar7 = 0x10;\n  uVar12 = uVar13;\n  do {\n    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }\n    iVar7 = iVar7 >> 1;\n    iVar10 = iVar10 + -1;\n  } while (iVar10 != 0);\n  if (iVar14 != 0) {\n    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);\n    if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }\n  }\n  uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13);\n  FUN_00052890(iVar2,param_4,uVar8,iVar14);\n  if ((param_3 != (int *)0x0) && (0 < *param_3)) {\n    iVar7 = 1;\n    do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);\n  }\n  FUN_0002f0f0(puVar3,iVar2 * 4);\n  FUN_0002f010(puVar3);\n  FUN_0002f0f0(puVar5,local_2c << 2);\n  FUN_0002f010(puVar5);\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "undefined4 uVar8;" type_identifier identifier ;) (declaration "int *piVar9;" primitive_type (pointer_declarator "*piVar9" * identifier) ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "undefined **ppuVar11;" type_identifier (pointer_declarator "**ppuVar11" * (pointer_declarator "*ppuVar11" * identifier)) ;) (declaration "uint uVar12;" type_identifier identifier ;) (declaration "uint uVar13;" type_identifier identifier ;) (declaration "int iVar14;" primitive_type identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "ppuVar11 = &__DT_PLTGOT;" (assignment_expression "ppuVar11 = &__DT_PLTGOT" identifier = (pointer_expression "&__DT_PLTGOT" & identifier)) ;) (expression_statement "iVar2 = *param_2;" (assignment_expression "iVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (param_2[iVar2] == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }" if (parenthesized_expression "(param_2[iVar2] == 0)" ( (binary_expression "param_2[iVar2] == 0" (subscript_expression "param_2[iVar2]" identifier [ identifier ]) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }" { comment (expression_statement "__assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");" (call_expression "__assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod")" identifier (argument_list "("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod")" ( (string_literal ""mod[mod[0]] != 0"" " string_content ") , (string_literal ""sshbn.c"" " string_content ") , number_literal , (string_literal ""bigdivmod"" " string_content ") ))) ;) })) (expression_statement "puVar3 = (uint *)FUN_0002e780(iVar2,4);" (assignment_expression "puVar3 = (uint *)FUN_0002e780(iVar2,4)" identifier = (cast_expression "(uint *)FUN_0002e780(iVar2,4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002e780(iVar2,4)" identifier (argument_list "(iVar2,4)" ( identifier , number_literal ))))) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (if_statement "if (0 < iVar2) {\n    do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);\n  }" if (parenthesized_expression "(0 < iVar2)" ( (binary_expression "0 < iVar2" number_literal < identifier) )) (compound_statement "{\n    do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);\n  }" { (do_statement "do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);" do (compound_statement "{\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    }" { (expression_statement "puVar3[iVar4] = param_2[*param_2 - iVar4];" (assignment_expression "puVar3[iVar4] = param_2[*param_2 - iVar4]" (subscript_expression "puVar3[iVar4]" identifier [ identifier ]) = (subscript_expression "param_2[*param_2 - iVar4]" identifier [ (binary_expression "*param_2 - iVar4" (pointer_expression "*param_2" * identifier) - identifier) ])) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar2 != iVar4)" ( (binary_expression "iVar2 != iVar4" identifier != identifier) )) ;) })) (expression_statement "local_2c = *param_1;" (assignment_expression "local_2c = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (local_2c <= iVar2) {\n    local_2c = iVar2 + 1;\n  }" if (parenthesized_expression "(local_2c <= iVar2)" ( (binary_expression "local_2c <= iVar2" identifier <= identifier) )) (compound_statement "{\n    local_2c = iVar2 + 1;\n  }" { (expression_statement "local_2c = iVar2 + 1;" (assignment_expression "local_2c = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) })) (expression_statement "iVar4 = local_2c;" (assignment_expression "iVar4 = local_2c" identifier = identifier) ;) (expression_statement "puVar5 = (undefined4 *)FUN_0002e780(local_2c,4);" (assignment_expression "puVar5 = (undefined4 *)FUN_0002e780(local_2c,4)" identifier = (cast_expression "(undefined4 *)FUN_0002e780(local_2c,4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002e780(local_2c,4)" identifier (argument_list "(local_2c,4)" ( identifier , number_literal ))))) ;) (expression_statement "puVar6 = puVar5;" (assignment_expression "puVar6 = puVar5" identifier = identifier) ;) (if_statement "if (0 < iVar4) {\n    do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);\n  }" if (parenthesized_expression "(0 < iVar4)" ( (binary_expression "0 < iVar4" number_literal < identifier) )) (compound_statement "{\n    do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);\n  }" { (do_statement "do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);" do (compound_statement "{\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    }" { (expression_statement "*puVar6 = 0;" (assignment_expression "*puVar6 = 0" (pointer_expression "*puVar6" * identifier) = number_literal) ;) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar5 + iVar4 != puVar6)" ( (binary_expression "puVar5 + iVar4 != puVar6" (binary_expression "puVar5 + iVar4" identifier + identifier) != identifier) )) ;) })) (if_statement "if (0 < *param_1) {\n    iVar7 = 1;\n    piVar9 = puVar5 + iVar4 + -1;\n    do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);\n  }" if (parenthesized_expression "(0 < *param_1)" ( (binary_expression "0 < *param_1" number_literal < (pointer_expression "*param_1" * identifier)) )) (compound_statement "{\n    iVar7 = 1;\n    piVar9 = puVar5 + iVar4 + -1;\n    do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);\n  }" { (expression_statement "iVar7 = 1;" (assignment_expression "iVar7 = 1" identifier = number_literal) ;) (expression_statement "piVar9 = puVar5 + iVar4 + -1;" (assignment_expression "piVar9 = puVar5 + iVar4 + -1" identifier = (binary_expression "puVar5 + iVar4 + -1" (binary_expression "puVar5 + iVar4" identifier + identifier) + number_literal)) ;) (do_statement "do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);" do (compound_statement "{\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    }" { (expression_statement "piVar1 = param_1 + iVar7;" (assignment_expression "piVar1 = param_1 + iVar7" identifier = (binary_expression "param_1 + iVar7" identifier + identifier)) ;) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) (expression_statement "*piVar9 = *piVar1;" (assignment_expression "*piVar9 = *piVar1" (pointer_expression "*piVar9" * identifier) = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "piVar9 = piVar9 + -1;" (assignment_expression "piVar9 = piVar9 + -1" identifier = (binary_expression "piVar9 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar7 <= *param_1)" ( (binary_expression "iVar7 <= *param_1" identifier <= (pointer_expression "*param_1" * identifier)) )) ;) })) (expression_statement "iVar10 = 5;" (assignment_expression "iVar10 = 5" identifier = number_literal) ;) (expression_statement "iVar14 = 0;" (assignment_expression "iVar14 = 0" identifier = number_literal) ;) (expression_statement "uVar13 = *puVar3;" (assignment_expression "uVar13 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "iVar7 = 0x10;" (assignment_expression "iVar7 = 0x10" identifier = number_literal) ;) (expression_statement "uVar12 = uVar13;" (assignment_expression "uVar12 = uVar13" identifier = identifier) ;) (do_statement "do {\n    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }\n    iVar7 = iVar7 >> 1;\n    iVar10 = iVar10 + -1;\n  } while (iVar10 != 0);" do (compound_statement "{\n    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }\n    iVar7 = iVar7 >> 1;\n    iVar10 = iVar10 + -1;\n  }" { (if_statement "if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }" if (parenthesized_expression "(uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0)" ( (binary_expression "uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0" (binary_expression "uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f)" identifier >> (parenthesized_expression "(0x20U - (sbyte)iVar7 & 0x1f)" ( (binary_expression "0x20U - (sbyte)iVar7 & 0x1f" (binary_expression "0x20U - (sbyte)iVar7" number_literal - (cast_expression "(sbyte)iVar7" ( (type_descriptor "sbyte" type_identifier) ) identifier)) & number_literal) ))) == number_literal) )) (compound_statement "{\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }" { (expression_statement "iVar14 = iVar14 + iVar7;" (assignment_expression "iVar14 = iVar14 + iVar7" identifier = (binary_expression "iVar14 + iVar7" identifier + identifier)) ;) (expression_statement "uVar12 = uVar12 << (sbyte)iVar7;" (assignment_expression "uVar12 = uVar12 << (sbyte)iVar7" identifier = (binary_expression "uVar12 << (sbyte)iVar7" identifier << (cast_expression "(sbyte)iVar7" ( (type_descriptor "sbyte" type_identifier) ) identifier))) ;) })) (expression_statement "iVar7 = iVar7 >> 1;" (assignment_expression "iVar7 = iVar7 >> 1" identifier = (binary_expression "iVar7 >> 1" identifier >> number_literal)) ;) (expression_statement "iVar10 = iVar10 + -1;" (assignment_expression "iVar10 = iVar10 + -1" identifier = (binary_expression "iVar10 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar10 != 0)" ( (binary_expression "iVar10 != 0" identifier != number_literal) )) ;) (if_statement "if (iVar14 != 0) {\n    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);\n    if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }\n  }" if (parenthesized_expression "(iVar14 != 0)" ( (binary_expression "iVar14 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);\n    if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }\n  }" { (expression_statement "uVar13 = uVar13 << ((byte)iVar14 & 0x1f);" (assignment_expression "uVar13 = uVar13 << ((byte)iVar14 & 0x1f)" identifier = (binary_expression "uVar13 << ((byte)iVar14 & 0x1f)" identifier << (parenthesized_expression "((byte)iVar14 & 0x1f)" ( (binary_expression "(byte)iVar14 & 0x1f" (cast_expression "(byte)iVar14" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (if_statement "if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }" if (parenthesized_expression "(1 < iVar2)" ( (binary_expression "1 < iVar2" number_literal < identifier) )) (compound_statement "{\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }" { (expression_statement "uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);" (assignment_expression "uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f)" identifier = (binary_expression "uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f)" identifier | (binary_expression "puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f)" (subscript_expression "puVar3[1]" identifier [ number_literal ]) >> (parenthesized_expression "(0x20 - (byte)iVar14 & 0x1f)" ( (binary_expression "0x20 - (byte)iVar14 & 0x1f" (binary_expression "0x20 - (byte)iVar14" number_literal - (cast_expression "(byte)iVar14" ( (type_descriptor "byte" type_identifier) ) identifier)) & number_literal) ))))) ;) })) })) (expression_statement "uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13);" (assignment_expression "uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13)" identifier = (call_expression "FUN_00052610(puVar3,iVar4,ppuVar11,uVar13)" identifier (argument_list "(puVar3,iVar4,ppuVar11,uVar13)" ( identifier , identifier , identifier , identifier )))) ;) (expression_statement "FUN_00052890(iVar2,param_4,uVar8,iVar14);" (call_expression "FUN_00052890(iVar2,param_4,uVar8,iVar14)" identifier (argument_list "(iVar2,param_4,uVar8,iVar14)" ( identifier , identifier , identifier , identifier ))) ;) (if_statement "if ((param_3 != (int *)0x0) && (0 < *param_3)) {\n    iVar7 = 1;\n    do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);\n  }" if (parenthesized_expression "((param_3 != (int *)0x0) && (0 < *param_3))" ( (binary_expression "(param_3 != (int *)0x0) && (0 < *param_3)" (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)) )) && (parenthesized_expression "(0 < *param_3)" ( (binary_expression "0 < *param_3" number_literal < (pointer_expression "*param_3" * identifier)) ))) )) (compound_statement "{\n    iVar7 = 1;\n    do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);\n  }" { (expression_statement "iVar7 = 1;" (assignment_expression "iVar7 = 1" identifier = number_literal) ;) (do_statement "do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);" do (compound_statement "{\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    }" { (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (if_statement "if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }" if (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) (compound_statement "{\n        iVar10 = puVar5[iVar4];\n      }" { (expression_statement "iVar10 = puVar5[iVar4];" (assignment_expression "iVar10 = puVar5[iVar4]" identifier = (subscript_expression "puVar5[iVar4]" identifier [ identifier ])) ;) })) (expression_statement "param_3[iVar7] = iVar10;" (assignment_expression "param_3[iVar7] = iVar10" (subscript_expression "param_3[iVar7]" identifier [ identifier ]) = identifier) ;) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar7 <= *param_3)" ( (binary_expression "iVar7 <= *param_3" identifier <= (pointer_expression "*param_3" * identifier)) )) ;) })) (expression_statement "FUN_0002f0f0(puVar3,iVar2 * 4);" (call_expression "FUN_0002f0f0(puVar3,iVar2 * 4)" identifier (argument_list "(puVar3,iVar2 * 4)" ( identifier , (binary_expression "iVar2 * 4" identifier * number_literal) ))) ;) (expression_statement "FUN_0002f010(puVar3);" (call_expression "FUN_0002f010(puVar3)" identifier (argument_list "(puVar3)" ( identifier ))) ;) (expression_statement "FUN_0002f0f0(puVar5,local_2c << 2);" (call_expression "FUN_0002f0f0(puVar5,local_2c << 2)" identifier (argument_list "(puVar5,local_2c << 2)" ( identifier , (binary_expression "local_2c << 2" identifier << number_literal) ))) ;) (expression_statement "FUN_0002f010(puVar5);" (call_expression "FUN_0002f010(puVar5)" identifier (argument_list "(puVar5)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3\nbigdivmod(Bignum_conflict p,Bignum_conflict mod,Bignum_conflict result,Bignum_conflict quotient)\n\n{\n  Bignum_conflict pBVar1;\n  size_t n;\n  BignumInt *m;\n  size_t sVar2;\n  BignumInt *a;\n  BignumInt *pBVar3;\n  int iVar4;\n  int iVar5;\n  BignumInt BVar6;\n  int rshift;\n  BignumInt local_30;\n  size_t local_2c;\n  \n  n = *mod;\n  if (mod[n] == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }\n  m = (BignumInt *)safemalloc(n,4);\n  sVar2 = 0;\n  if (0 < (int)n) {\n    do {\n      m[sVar2] = mod[*mod - sVar2];\n      sVar2 = sVar2 + 1;\n    } while (n != sVar2);\n  }\n  local_2c = *p;\n  if ((int)local_2c <= (int)n) {\n    local_2c = n + 1;\n  }\n  a = (BignumInt *)safemalloc(local_2c,4);\n  pBVar3 = a;\n  if (0 < (int)local_2c) {\n    do {\n      *pBVar3 = 0;\n      pBVar3 = pBVar3 + 1;\n    } while (a + local_2c != pBVar3);\n  }\n  if (0 < (int)*p) {\n    iVar4 = 1;\n    pBVar3 = a + (local_2c - 1);\n    do {\n      pBVar1 = p + iVar4;\n      iVar4 = iVar4 + 1;\n      *pBVar3 = *pBVar1;\n      pBVar3 = pBVar3 + -1;\n    } while (iVar4 <= (int)*p);\n  }\n  iVar5 = 5;\n  rshift = 0;\n  local_30 = *m;\n  iVar4 = 0x10;\n  BVar6 = local_30;\n  do {\n    if (BVar6 >> (0x20U - (sbyte)iVar4 & 0x1f) == 0) {\n      rshift = rshift + iVar4;\n      BVar6 = BVar6 << (sbyte)iVar4;\n    }\n    iVar4 = iVar4 >> 1;\n    iVar5 = iVar5 + -1;\n  } while (iVar5 != 0);\n  if (rshift != 0) {\n    local_30 = local_30 << ((byte)rshift & 0x1f);\n    if (1 < (int)n) {\n      local_30 = local_30 | m[1] >> (0x20 - (byte)rshift & 0x1f);\n    }\n  }\n  BVar6 = reciprocal_word(local_30);\n  internal_mod(a,local_2c,m,n,quotient,BVar6,rshift);\n  if ((result != (Bignum_conflict)0x0) && (0 < (int)*result)) {\n    iVar4 = 1;\n    sVar2 = local_2c;\n    do {\n      sVar2 = sVar2 - 1;\n      BVar6 = 0;\n      if (-1 < (int)sVar2) {\n        BVar6 = a[sVar2];\n      }\n      result[iVar4] = BVar6;\n      iVar4 = iVar4 + 1;\n    } while (iVar4 <= (int)*result);\n  }\n  smemclr(m,n * 4);\n  safefree(m);\n  smemclr(a,local_2c << 2);\n  safefree(a);\n  return;\n}\n\n" comment (function_definition "void __regparm3\nbigdivmod(Bignum_conflict p,Bignum_conflict mod,Bignum_conflict result,Bignum_conflict quotient)\n\n{\n  Bignum_conflict pBVar1;\n  size_t n;\n  BignumInt *m;\n  size_t sVar2;\n  BignumInt *a;\n  BignumInt *pBVar3;\n  int iVar4;\n  int iVar5;\n  BignumInt BVar6;\n  int rshift;\n  BignumInt local_30;\n  size_t local_2c;\n  \n  n = *mod;\n  if (mod[n] == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }\n  m = (BignumInt *)safemalloc(n,4);\n  sVar2 = 0;\n  if (0 < (int)n) {\n    do {\n      m[sVar2] = mod[*mod - sVar2];\n      sVar2 = sVar2 + 1;\n    } while (n != sVar2);\n  }\n  local_2c = *p;\n  if ((int)local_2c <= (int)n) {\n    local_2c = n + 1;\n  }\n  a = (BignumInt *)safemalloc(local_2c,4);\n  pBVar3 = a;\n  if (0 < (int)local_2c) {\n    do {\n      *pBVar3 = 0;\n      pBVar3 = pBVar3 + 1;\n    } while (a + local_2c != pBVar3);\n  }\n  if (0 < (int)*p) {\n    iVar4 = 1;\n    pBVar3 = a + (local_2c - 1);\n    do {\n      pBVar1 = p + iVar4;\n      iVar4 = iVar4 + 1;\n      *pBVar3 = *pBVar1;\n      pBVar3 = pBVar3 + -1;\n    } while (iVar4 <= (int)*p);\n  }\n  iVar5 = 5;\n  rshift = 0;\n  local_30 = *m;\n  iVar4 = 0x10;\n  BVar6 = local_30;\n  do {\n    if (BVar6 >> (0x20U - (sbyte)iVar4 & 0x1f) == 0) {\n      rshift = rshift + iVar4;\n      BVar6 = BVar6 << (sbyte)iVar4;\n    }\n    iVar4 = iVar4 >> 1;\n    iVar5 = iVar5 + -1;\n  } while (iVar5 != 0);\n  if (rshift != 0) {\n    local_30 = local_30 << ((byte)rshift & 0x1f);\n    if (1 < (int)n) {\n      local_30 = local_30 | m[1] >> (0x20 - (byte)rshift & 0x1f);\n    }\n  }\n  BVar6 = reciprocal_word(local_30);\n  internal_mod(a,local_2c,m,n,quotient,BVar6,rshift);\n  if ((result != (Bignum_conflict)0x0) && (0 < (int)*result)) {\n    iVar4 = 1;\n    sVar2 = local_2c;\n    do {\n      sVar2 = sVar2 - 1;\n      BVar6 = 0;\n      if (-1 < (int)sVar2) {\n        BVar6 = a[sVar2];\n      }\n      result[iVar4] = BVar6;\n      iVar4 = iVar4 + 1;\n    } while (iVar4 <= (int)*result);\n  }\n  smemclr(m,n * 4);\n  safefree(m);\n  smemclr(a,local_2c << 2);\n  safefree(a);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "bigdivmod(Bignum_conflict p,Bignum_conflict mod,Bignum_conflict result,Bignum_conflict quotient)" identifier (parameter_list "(Bignum_conflict p,Bignum_conflict mod,Bignum_conflict result,Bignum_conflict quotient)" ( (parameter_declaration "Bignum_conflict p" type_identifier identifier) , (parameter_declaration "Bignum_conflict mod" type_identifier identifier) , (parameter_declaration "Bignum_conflict result" type_identifier identifier) , (parameter_declaration "Bignum_conflict quotient" type_identifier identifier) ))) (compound_statement "{\n  Bignum_conflict pBVar1;\n  size_t n;\n  BignumInt *m;\n  size_t sVar2;\n  BignumInt *a;\n  BignumInt *pBVar3;\n  int iVar4;\n  int iVar5;\n  BignumInt BVar6;\n  int rshift;\n  BignumInt local_30;\n  size_t local_2c;\n  \n  n = *mod;\n  if (mod[n] == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }\n  m = (BignumInt *)safemalloc(n,4);\n  sVar2 = 0;\n  if (0 < (int)n) {\n    do {\n      m[sVar2] = mod[*mod - sVar2];\n      sVar2 = sVar2 + 1;\n    } while (n != sVar2);\n  }\n  local_2c = *p;\n  if ((int)local_2c <= (int)n) {\n    local_2c = n + 1;\n  }\n  a = (BignumInt *)safemalloc(local_2c,4);\n  pBVar3 = a;\n  if (0 < (int)local_2c) {\n    do {\n      *pBVar3 = 0;\n      pBVar3 = pBVar3 + 1;\n    } while (a + local_2c != pBVar3);\n  }\n  if (0 < (int)*p) {\n    iVar4 = 1;\n    pBVar3 = a + (local_2c - 1);\n    do {\n      pBVar1 = p + iVar4;\n      iVar4 = iVar4 + 1;\n      *pBVar3 = *pBVar1;\n      pBVar3 = pBVar3 + -1;\n    } while (iVar4 <= (int)*p);\n  }\n  iVar5 = 5;\n  rshift = 0;\n  local_30 = *m;\n  iVar4 = 0x10;\n  BVar6 = local_30;\n  do {\n    if (BVar6 >> (0x20U - (sbyte)iVar4 & 0x1f) == 0) {\n      rshift = rshift + iVar4;\n      BVar6 = BVar6 << (sbyte)iVar4;\n    }\n    iVar4 = iVar4 >> 1;\n    iVar5 = iVar5 + -1;\n  } while (iVar5 != 0);\n  if (rshift != 0) {\n    local_30 = local_30 << ((byte)rshift & 0x1f);\n    if (1 < (int)n) {\n      local_30 = local_30 | m[1] >> (0x20 - (byte)rshift & 0x1f);\n    }\n  }\n  BVar6 = reciprocal_word(local_30);\n  internal_mod(a,local_2c,m,n,quotient,BVar6,rshift);\n  if ((result != (Bignum_conflict)0x0) && (0 < (int)*result)) {\n    iVar4 = 1;\n    sVar2 = local_2c;\n    do {\n      sVar2 = sVar2 - 1;\n      BVar6 = 0;\n      if (-1 < (int)sVar2) {\n        BVar6 = a[sVar2];\n      }\n      result[iVar4] = BVar6;\n      iVar4 = iVar4 + 1;\n    } while (iVar4 <= (int)*result);\n  }\n  smemclr(m,n * 4);\n  safefree(m);\n  smemclr(a,local_2c << 2);\n  safefree(a);\n  return;\n}" { (declaration "Bignum_conflict pBVar1;" type_identifier identifier ;) (declaration "size_t n;" primitive_type identifier ;) (declaration "BignumInt *m;" type_identifier (pointer_declarator "*m" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "BignumInt *a;" type_identifier (pointer_declarator "*a" * identifier) ;) (declaration "BignumInt *pBVar3;" type_identifier (pointer_declarator "*pBVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "BignumInt BVar6;" type_identifier identifier ;) (declaration "int rshift;" primitive_type identifier ;) (declaration "BignumInt local_30;" type_identifier identifier ;) (declaration "size_t local_2c;" primitive_type identifier ;) (expression_statement "n = *mod;" (assignment_expression "n = *mod" identifier = (pointer_expression "*mod" * identifier)) ;) (if_statement "if (mod[n] == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }" if (parenthesized_expression "(mod[n] == 0)" ( (binary_expression "mod[n] == 0" (subscript_expression "mod[n]" identifier [ identifier ]) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }" { comment (expression_statement "__assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");" (call_expression "__assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod")" identifier (argument_list "("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod")" ( (string_literal ""mod[mod[0]] != 0"" " string_content ") , (string_literal ""sshbn.c"" " string_content ") , number_literal , (string_literal ""bigdivmod"" " string_content ") ))) ;) })) (expression_statement "m = (BignumInt *)safemalloc(n,4);" (assignment_expression "m = (BignumInt *)safemalloc(n,4)" identifier = (cast_expression "(BignumInt *)safemalloc(n,4)" ( (type_descriptor "BignumInt *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(n,4)" identifier (argument_list "(n,4)" ( identifier , number_literal ))))) ;) (expression_statement "sVar2 = 0;" (assignment_expression "sVar2 = 0" identifier = number_literal) ;) (if_statement "if (0 < (int)n) {\n    do {\n      m[sVar2] = mod[*mod - sVar2];\n      sVar2 = sVar2 + 1;\n    } while (n != sVar2);\n  }" if (parenthesized_expression "(0 < (int)n)" ( (binary_expression "0 < (int)n" number_literal < (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    do {\n      m[sVar2] = mod[*mod - sVar2];\n      sVar2 = sVar2 + 1;\n    } while (n != sVar2);\n  }" { (do_statement "do {\n      m[sVar2] = mod[*mod - sVar2];\n      sVar2 = sVar2 + 1;\n    } while (n != sVar2);" do (compound_statement "{\n      m[sVar2] = mod[*mod - sVar2];\n      sVar2 = sVar2 + 1;\n    }" { (expression_statement "m[sVar2] = mod[*mod - sVar2];" (assignment_expression "m[sVar2] = mod[*mod - sVar2]" (subscript_expression "m[sVar2]" identifier [ identifier ]) = (subscript_expression "mod[*mod - sVar2]" identifier [ (binary_expression "*mod - sVar2" (pointer_expression "*mod" * identifier) - identifier) ])) ;) (expression_statement "sVar2 = sVar2 + 1;" (assignment_expression "sVar2 = sVar2 + 1" identifier = (binary_expression "sVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(n != sVar2)" ( (binary_expression "n != sVar2" identifier != identifier) )) ;) })) (expression_statement "local_2c = *p;" (assignment_expression "local_2c = *p" identifier = (pointer_expression "*p" * identifier)) ;) (if_statement "if ((int)local_2c <= (int)n) {\n    local_2c = n + 1;\n  }" if (parenthesized_expression "((int)local_2c <= (int)n)" ( (binary_expression "(int)local_2c <= (int)n" (cast_expression "(int)local_2c" ( (type_descriptor "int" primitive_type) ) identifier) <= (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    local_2c = n + 1;\n  }" { (expression_statement "local_2c = n + 1;" (assignment_expression "local_2c = n + 1" identifier = (binary_expression "n + 1" identifier + number_literal)) ;) })) (expression_statement "a = (BignumInt *)safemalloc(local_2c,4);" (assignment_expression "a = (BignumInt *)safemalloc(local_2c,4)" identifier = (cast_expression "(BignumInt *)safemalloc(local_2c,4)" ( (type_descriptor "BignumInt *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(local_2c,4)" identifier (argument_list "(local_2c,4)" ( identifier , number_literal ))))) ;) (expression_statement "pBVar3 = a;" (assignment_expression "pBVar3 = a" identifier = identifier) ;) (if_statement "if (0 < (int)local_2c) {\n    do {\n      *pBVar3 = 0;\n      pBVar3 = pBVar3 + 1;\n    } while (a + local_2c != pBVar3);\n  }" if (parenthesized_expression "(0 < (int)local_2c)" ( (binary_expression "0 < (int)local_2c" number_literal < (cast_expression "(int)local_2c" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    do {\n      *pBVar3 = 0;\n      pBVar3 = pBVar3 + 1;\n    } while (a + local_2c != pBVar3);\n  }" { (do_statement "do {\n      *pBVar3 = 0;\n      pBVar3 = pBVar3 + 1;\n    } while (a + local_2c != pBVar3);" do (compound_statement "{\n      *pBVar3 = 0;\n      pBVar3 = pBVar3 + 1;\n    }" { (expression_statement "*pBVar3 = 0;" (assignment_expression "*pBVar3 = 0" (pointer_expression "*pBVar3" * identifier) = number_literal) ;) (expression_statement "pBVar3 = pBVar3 + 1;" (assignment_expression "pBVar3 = pBVar3 + 1" identifier = (binary_expression "pBVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(a + local_2c != pBVar3)" ( (binary_expression "a + local_2c != pBVar3" (binary_expression "a + local_2c" identifier + identifier) != identifier) )) ;) })) (if_statement "if (0 < (int)*p) {\n    iVar4 = 1;\n    pBVar3 = a + (local_2c - 1);\n    do {\n      pBVar1 = p + iVar4;\n      iVar4 = iVar4 + 1;\n      *pBVar3 = *pBVar1;\n      pBVar3 = pBVar3 + -1;\n    } while (iVar4 <= (int)*p);\n  }" if (parenthesized_expression "(0 < (int)*p)" ( (binary_expression "0 < (int)*p" number_literal < (cast_expression "(int)*p" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*p" * identifier))) )) (compound_statement "{\n    iVar4 = 1;\n    pBVar3 = a + (local_2c - 1);\n    do {\n      pBVar1 = p + iVar4;\n      iVar4 = iVar4 + 1;\n      *pBVar3 = *pBVar1;\n      pBVar3 = pBVar3 + -1;\n    } while (iVar4 <= (int)*p);\n  }" { (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) (expression_statement "pBVar3 = a + (local_2c - 1);" (assignment_expression "pBVar3 = a + (local_2c - 1)" identifier = (binary_expression "a + (local_2c - 1)" identifier + (parenthesized_expression "(local_2c - 1)" ( (binary_expression "local_2c - 1" identifier - number_literal) )))) ;) (do_statement "do {\n      pBVar1 = p + iVar4;\n      iVar4 = iVar4 + 1;\n      *pBVar3 = *pBVar1;\n      pBVar3 = pBVar3 + -1;\n    } while (iVar4 <= (int)*p);" do (compound_statement "{\n      pBVar1 = p + iVar4;\n      iVar4 = iVar4 + 1;\n      *pBVar3 = *pBVar1;\n      pBVar3 = pBVar3 + -1;\n    }" { (expression_statement "pBVar1 = p + iVar4;" (assignment_expression "pBVar1 = p + iVar4" identifier = (binary_expression "p + iVar4" identifier + identifier)) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "*pBVar3 = *pBVar1;" (assignment_expression "*pBVar3 = *pBVar1" (pointer_expression "*pBVar3" * identifier) = (pointer_expression "*pBVar1" * identifier)) ;) (expression_statement "pBVar3 = pBVar3 + -1;" (assignment_expression "pBVar3 = pBVar3 + -1" identifier = (binary_expression "pBVar3 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 <= (int)*p)" ( (binary_expression "iVar4 <= (int)*p" identifier <= (cast_expression "(int)*p" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*p" * identifier))) )) ;) })) (expression_statement "iVar5 = 5;" (assignment_expression "iVar5 = 5" identifier = number_literal) ;) (expression_statement "rshift = 0;" (assignment_expression "rshift = 0" identifier = number_literal) ;) (expression_statement "local_30 = *m;" (assignment_expression "local_30 = *m" identifier = (pointer_expression "*m" * identifier)) ;) (expression_statement "iVar4 = 0x10;" (assignment_expression "iVar4 = 0x10" identifier = number_literal) ;) (expression_statement "BVar6 = local_30;" (assignment_expression "BVar6 = local_30" identifier = identifier) ;) (do_statement "do {\n    if (BVar6 >> (0x20U - (sbyte)iVar4 & 0x1f) == 0) {\n      rshift = rshift + iVar4;\n      BVar6 = BVar6 << (sbyte)iVar4;\n    }\n    iVar4 = iVar4 >> 1;\n    iVar5 = iVar5 + -1;\n  } while (iVar5 != 0);" do (compound_statement "{\n    if (BVar6 >> (0x20U - (sbyte)iVar4 & 0x1f) == 0) {\n      rshift = rshift + iVar4;\n      BVar6 = BVar6 << (sbyte)iVar4;\n    }\n    iVar4 = iVar4 >> 1;\n    iVar5 = iVar5 + -1;\n  }" { (if_statement "if (BVar6 >> (0x20U - (sbyte)iVar4 & 0x1f) == 0) {\n      rshift = rshift + iVar4;\n      BVar6 = BVar6 << (sbyte)iVar4;\n    }" if (parenthesized_expression "(BVar6 >> (0x20U - (sbyte)iVar4 & 0x1f) == 0)" ( (binary_expression "BVar6 >> (0x20U - (sbyte)iVar4 & 0x1f) == 0" (binary_expression "BVar6 >> (0x20U - (sbyte)iVar4 & 0x1f)" identifier >> (parenthesized_expression "(0x20U - (sbyte)iVar4 & 0x1f)" ( (binary_expression "0x20U - (sbyte)iVar4 & 0x1f" (binary_expression "0x20U - (sbyte)iVar4" number_literal - (cast_expression "(sbyte)iVar4" ( (type_descriptor "sbyte" type_identifier) ) identifier)) & number_literal) ))) == number_literal) )) (compound_statement "{\n      rshift = rshift + iVar4;\n      BVar6 = BVar6 << (sbyte)iVar4;\n    }" { (expression_statement "rshift = rshift + iVar4;" (assignment_expression "rshift = rshift + iVar4" identifier = (binary_expression "rshift + iVar4" identifier + identifier)) ;) (expression_statement "BVar6 = BVar6 << (sbyte)iVar4;" (assignment_expression "BVar6 = BVar6 << (sbyte)iVar4" identifier = (binary_expression "BVar6 << (sbyte)iVar4" identifier << (cast_expression "(sbyte)iVar4" ( (type_descriptor "sbyte" type_identifier) ) identifier))) ;) })) (expression_statement "iVar4 = iVar4 >> 1;" (assignment_expression "iVar4 = iVar4 >> 1" identifier = (binary_expression "iVar4 >> 1" identifier >> number_literal)) ;) (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" identifier = (binary_expression "iVar5 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) ;) (if_statement "if (rshift != 0) {\n    local_30 = local_30 << ((byte)rshift & 0x1f);\n    if (1 < (int)n) {\n      local_30 = local_30 | m[1] >> (0x20 - (byte)rshift & 0x1f);\n    }\n  }" if (parenthesized_expression "(rshift != 0)" ( (binary_expression "rshift != 0" identifier != number_literal) )) (compound_statement "{\n    local_30 = local_30 << ((byte)rshift & 0x1f);\n    if (1 < (int)n) {\n      local_30 = local_30 | m[1] >> (0x20 - (byte)rshift & 0x1f);\n    }\n  }" { (expression_statement "local_30 = local_30 << ((byte)rshift & 0x1f);" (assignment_expression "local_30 = local_30 << ((byte)rshift & 0x1f)" identifier = (binary_expression "local_30 << ((byte)rshift & 0x1f)" identifier << (parenthesized_expression "((byte)rshift & 0x1f)" ( (binary_expression "(byte)rshift & 0x1f" (cast_expression "(byte)rshift" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (if_statement "if (1 < (int)n) {\n      local_30 = local_30 | m[1] >> (0x20 - (byte)rshift & 0x1f);\n    }" if (parenthesized_expression "(1 < (int)n)" ( (binary_expression "1 < (int)n" number_literal < (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      local_30 = local_30 | m[1] >> (0x20 - (byte)rshift & 0x1f);\n    }" { (expression_statement "local_30 = local_30 | m[1] >> (0x20 - (byte)rshift & 0x1f);" (assignment_expression "local_30 = local_30 | m[1] >> (0x20 - (byte)rshift & 0x1f)" identifier = (binary_expression "local_30 | m[1] >> (0x20 - (byte)rshift & 0x1f)" identifier | (binary_expression "m[1] >> (0x20 - (byte)rshift & 0x1f)" (subscript_expression "m[1]" identifier [ number_literal ]) >> (parenthesized_expression "(0x20 - (byte)rshift & 0x1f)" ( (binary_expression "0x20 - (byte)rshift & 0x1f" (binary_expression "0x20 - (byte)rshift" number_literal - (cast_expression "(byte)rshift" ( (type_descriptor "byte" type_identifier) ) identifier)) & number_literal) ))))) ;) })) })) (expression_statement "BVar6 = reciprocal_word(local_30);" (assignment_expression "BVar6 = reciprocal_word(local_30)" identifier = (call_expression "reciprocal_word(local_30)" identifier (argument_list "(local_30)" ( identifier )))) ;) (expression_statement "internal_mod(a,local_2c,m,n,quotient,BVar6,rshift);" (call_expression "internal_mod(a,local_2c,m,n,quotient,BVar6,rshift)" identifier (argument_list "(a,local_2c,m,n,quotient,BVar6,rshift)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier ))) ;) (if_statement "if ((result != (Bignum_conflict)0x0) && (0 < (int)*result)) {\n    iVar4 = 1;\n    sVar2 = local_2c;\n    do {\n      sVar2 = sVar2 - 1;\n      BVar6 = 0;\n      if (-1 < (int)sVar2) {\n        BVar6 = a[sVar2];\n      }\n      result[iVar4] = BVar6;\n      iVar4 = iVar4 + 1;\n    } while (iVar4 <= (int)*result);\n  }" if (parenthesized_expression "((result != (Bignum_conflict)0x0) && (0 < (int)*result))" ( (binary_expression "(result != (Bignum_conflict)0x0) && (0 < (int)*result)" (parenthesized_expression "(result != (Bignum_conflict)0x0)" ( (binary_expression "result != (Bignum_conflict)0x0" identifier != (cast_expression "(Bignum_conflict)0x0" ( (type_descriptor "Bignum_conflict" type_identifier) ) number_literal)) )) && (parenthesized_expression "(0 < (int)*result)" ( (binary_expression "0 < (int)*result" number_literal < (cast_expression "(int)*result" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*result" * identifier))) ))) )) (compound_statement "{\n    iVar4 = 1;\n    sVar2 = local_2c;\n    do {\n      sVar2 = sVar2 - 1;\n      BVar6 = 0;\n      if (-1 < (int)sVar2) {\n        BVar6 = a[sVar2];\n      }\n      result[iVar4] = BVar6;\n      iVar4 = iVar4 + 1;\n    } while (iVar4 <= (int)*result);\n  }" { (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) (expression_statement "sVar2 = local_2c;" (assignment_expression "sVar2 = local_2c" identifier = identifier) ;) (do_statement "do {\n      sVar2 = sVar2 - 1;\n      BVar6 = 0;\n      if (-1 < (int)sVar2) {\n        BVar6 = a[sVar2];\n      }\n      result[iVar4] = BVar6;\n      iVar4 = iVar4 + 1;\n    } while (iVar4 <= (int)*result);" do (compound_statement "{\n      sVar2 = sVar2 - 1;\n      BVar6 = 0;\n      if (-1 < (int)sVar2) {\n        BVar6 = a[sVar2];\n      }\n      result[iVar4] = BVar6;\n      iVar4 = iVar4 + 1;\n    }" { (expression_statement "sVar2 = sVar2 - 1;" (assignment_expression "sVar2 = sVar2 - 1" identifier = (binary_expression "sVar2 - 1" identifier - number_literal)) ;) (expression_statement "BVar6 = 0;" (assignment_expression "BVar6 = 0" identifier = number_literal) ;) (if_statement "if (-1 < (int)sVar2) {\n        BVar6 = a[sVar2];\n      }" if (parenthesized_expression "(-1 < (int)sVar2)" ( (binary_expression "-1 < (int)sVar2" number_literal < (cast_expression "(int)sVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n        BVar6 = a[sVar2];\n      }" { (expression_statement "BVar6 = a[sVar2];" (assignment_expression "BVar6 = a[sVar2]" identifier = (subscript_expression "a[sVar2]" identifier [ identifier ])) ;) })) (expression_statement "result[iVar4] = BVar6;" (assignment_expression "result[iVar4] = BVar6" (subscript_expression "result[iVar4]" identifier [ identifier ]) = identifier) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 <= (int)*result)" ( (binary_expression "iVar4 <= (int)*result" identifier <= (cast_expression "(int)*result" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*result" * identifier))) )) ;) })) (expression_statement "smemclr(m,n * 4);" (call_expression "smemclr(m,n * 4)" identifier (argument_list "(m,n * 4)" ( identifier , (binary_expression "n * 4" identifier * number_literal) ))) ;) (expression_statement "safefree(m);" (call_expression "safefree(m)" identifier (argument_list "(m)" ( identifier ))) ;) (expression_statement "smemclr(a,local_2c << 2);" (call_expression "smemclr(a,local_2c << 2)" identifier (argument_list "(a,local_2c << 2)" ( identifier , (binary_expression "local_2c << 2" identifier << number_literal) ))) ;) (expression_statement "safefree(a);" (call_expression "safefree(a)" identifier (argument_list "(a)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_00052c40(int *param_1,int *param_2,int *param_3,undefined4 param_4)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint *puVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  int iVar7;\n  undefined4 uVar8;\n  int *piVar9;\n  int iVar10;\n  undefined **ppuVar11;\n  uint uVar12;\n  uint uVar13;\n  int iVar14;\n  int local_2c;\n  \n  ppuVar11 = &__DT_PLTGOT;\n  iVar2 = *param_2;\n  if (param_2[iVar2] == 0) {\n                    \n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }\n  puVar3 = (uint *)FUN_0002e780(iVar2,4);\n  iVar4 = 0;\n  if (0 < iVar2) {\n    do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);\n  }\n  local_2c = *param_1;\n  if (local_2c <= iVar2) {\n    local_2c = iVar2 + 1;\n  }\n  iVar4 = local_2c;\n  puVar5 = (undefined4 *)FUN_0002e780(local_2c,4);\n  puVar6 = puVar5;\n  if (0 < iVar4) {\n    do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);\n  }\n  if (0 < *param_1) {\n    iVar7 = 1;\n    piVar9 = puVar5 + iVar4 + -1;\n    do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);\n  }\n  iVar10 = 5;\n  iVar14 = 0;\n  uVar13 = *puVar3;\n  iVar7 = 0x10;\n  uVar12 = uVar13;\n  do {\n    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }\n    iVar7 = iVar7 >> 1;\n    iVar10 = iVar10 + -1;\n  } while (iVar10 != 0);\n  if (iVar14 != 0) {\n    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);\n    if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }\n  }\n  uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13);\n  FUN_00052890(iVar2,param_4,uVar8,iVar14);\n  if ((param_3 != (int *)0x0) && (0 < *param_3)) {\n    iVar7 = 1;\n    do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);\n  }\n  FUN_0002f0f0(puVar3,iVar2 * 4);\n  FUN_0002f010(puVar3);\n  FUN_0002f0f0(puVar5,local_2c << 2);\n  FUN_0002f010(puVar5);\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00052c40(int *param_1,int *param_2,int *param_3,undefined4 param_4)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint *puVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  int iVar7;\n  undefined4 uVar8;\n  int *piVar9;\n  int iVar10;\n  undefined **ppuVar11;\n  uint uVar12;\n  uint uVar13;\n  int iVar14;\n  int local_2c;\n  \n  ppuVar11 = &__DT_PLTGOT;\n  iVar2 = *param_2;\n  if (param_2[iVar2] == 0) {\n                    \n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }\n  puVar3 = (uint *)FUN_0002e780(iVar2,4);\n  iVar4 = 0;\n  if (0 < iVar2) {\n    do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);\n  }\n  local_2c = *param_1;\n  if (local_2c <= iVar2) {\n    local_2c = iVar2 + 1;\n  }\n  iVar4 = local_2c;\n  puVar5 = (undefined4 *)FUN_0002e780(local_2c,4);\n  puVar6 = puVar5;\n  if (0 < iVar4) {\n    do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);\n  }\n  if (0 < *param_1) {\n    iVar7 = 1;\n    piVar9 = puVar5 + iVar4 + -1;\n    do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);\n  }\n  iVar10 = 5;\n  iVar14 = 0;\n  uVar13 = *puVar3;\n  iVar7 = 0x10;\n  uVar12 = uVar13;\n  do {\n    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }\n    iVar7 = iVar7 >> 1;\n    iVar10 = iVar10 + -1;\n  } while (iVar10 != 0);\n  if (iVar14 != 0) {\n    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);\n    if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }\n  }\n  uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13);\n  FUN_00052890(iVar2,param_4,uVar8,iVar14);\n  if ((param_3 != (int *)0x0) && (0 < *param_3)) {\n    iVar7 = 1;\n    do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);\n  }\n  FUN_0002f0f0(puVar3,iVar2 * 4);\n  FUN_0002f010(puVar3);\n  FUN_0002f0f0(puVar5,local_2c << 2);\n  FUN_0002f010(puVar5);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00052c40(int *param_1,int *param_2,int *param_3,undefined4 param_4)" identifier (parameter_list "(int *param_1,int *param_2,int *param_3,undefined4 param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  uint *puVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  int iVar7;\n  undefined4 uVar8;\n  int *piVar9;\n  int iVar10;\n  undefined **ppuVar11;\n  uint uVar12;\n  uint uVar13;\n  int iVar14;\n  int local_2c;\n  \n  ppuVar11 = &__DT_PLTGOT;\n  iVar2 = *param_2;\n  if (param_2[iVar2] == 0) {\n                    \n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }\n  puVar3 = (uint *)FUN_0002e780(iVar2,4);\n  iVar4 = 0;\n  if (0 < iVar2) {\n    do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);\n  }\n  local_2c = *param_1;\n  if (local_2c <= iVar2) {\n    local_2c = iVar2 + 1;\n  }\n  iVar4 = local_2c;\n  puVar5 = (undefined4 *)FUN_0002e780(local_2c,4);\n  puVar6 = puVar5;\n  if (0 < iVar4) {\n    do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);\n  }\n  if (0 < *param_1) {\n    iVar7 = 1;\n    piVar9 = puVar5 + iVar4 + -1;\n    do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);\n  }\n  iVar10 = 5;\n  iVar14 = 0;\n  uVar13 = *puVar3;\n  iVar7 = 0x10;\n  uVar12 = uVar13;\n  do {\n    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }\n    iVar7 = iVar7 >> 1;\n    iVar10 = iVar10 + -1;\n  } while (iVar10 != 0);\n  if (iVar14 != 0) {\n    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);\n    if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }\n  }\n  uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13);\n  FUN_00052890(iVar2,param_4,uVar8,iVar14);\n  if ((param_3 != (int *)0x0) && (0 < *param_3)) {\n    iVar7 = 1;\n    do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);\n  }\n  FUN_0002f0f0(puVar3,iVar2 * 4);\n  FUN_0002f010(puVar3);\n  FUN_0002f0f0(puVar5,local_2c << 2);\n  FUN_0002f010(puVar5);\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "undefined4 uVar8;" type_identifier identifier ;) (declaration "int *piVar9;" primitive_type (pointer_declarator "*piVar9" * identifier) ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "undefined **ppuVar11;" type_identifier (pointer_declarator "**ppuVar11" * (pointer_declarator "*ppuVar11" * identifier)) ;) (declaration "uint uVar12;" type_identifier identifier ;) (declaration "uint uVar13;" type_identifier identifier ;) (declaration "int iVar14;" primitive_type identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "ppuVar11 = &__DT_PLTGOT;" (assignment_expression "ppuVar11 = &__DT_PLTGOT" identifier = (pointer_expression "&__DT_PLTGOT" & identifier)) ;) (expression_statement "iVar2 = *param_2;" (assignment_expression "iVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (param_2[iVar2] == 0) {\n                    \n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }" if (parenthesized_expression "(param_2[iVar2] == 0)" ( (binary_expression "param_2[iVar2] == 0" (subscript_expression "param_2[iVar2]" identifier [ identifier ]) == number_literal) )) (compound_statement "{\n                    \n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }" { (expression_statement "__assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");" (call_expression "__assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod")" identifier (argument_list "("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod")" ( (string_literal ""mod[mod[0]] != 0"" " string_content ") , (string_literal ""sshbn.c"" " string_content ") , number_literal , (string_literal ""bigdivmod"" " string_content ") ))) ;) })) (expression_statement "puVar3 = (uint *)FUN_0002e780(iVar2,4);" (assignment_expression "puVar3 = (uint *)FUN_0002e780(iVar2,4)" identifier = (cast_expression "(uint *)FUN_0002e780(iVar2,4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002e780(iVar2,4)" identifier (argument_list "(iVar2,4)" ( identifier , number_literal ))))) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (if_statement "if (0 < iVar2) {\n    do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);\n  }" if (parenthesized_expression "(0 < iVar2)" ( (binary_expression "0 < iVar2" number_literal < identifier) )) (compound_statement "{\n    do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);\n  }" { (do_statement "do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);" do (compound_statement "{\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    }" { (expression_statement "puVar3[iVar4] = param_2[*param_2 - iVar4];" (assignment_expression "puVar3[iVar4] = param_2[*param_2 - iVar4]" (subscript_expression "puVar3[iVar4]" identifier [ identifier ]) = (subscript_expression "param_2[*param_2 - iVar4]" identifier [ (binary_expression "*param_2 - iVar4" (pointer_expression "*param_2" * identifier) - identifier) ])) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar2 != iVar4)" ( (binary_expression "iVar2 != iVar4" identifier != identifier) )) ;) })) (expression_statement "local_2c = *param_1;" (assignment_expression "local_2c = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (local_2c <= iVar2) {\n    local_2c = iVar2 + 1;\n  }" if (parenthesized_expression "(local_2c <= iVar2)" ( (binary_expression "local_2c <= iVar2" identifier <= identifier) )) (compound_statement "{\n    local_2c = iVar2 + 1;\n  }" { (expression_statement "local_2c = iVar2 + 1;" (assignment_expression "local_2c = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) })) (expression_statement "iVar4 = local_2c;" (assignment_expression "iVar4 = local_2c" identifier = identifier) ;) (expression_statement "puVar5 = (undefined4 *)FUN_0002e780(local_2c,4);" (assignment_expression "puVar5 = (undefined4 *)FUN_0002e780(local_2c,4)" identifier = (cast_expression "(undefined4 *)FUN_0002e780(local_2c,4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002e780(local_2c,4)" identifier (argument_list "(local_2c,4)" ( identifier , number_literal ))))) ;) (expression_statement "puVar6 = puVar5;" (assignment_expression "puVar6 = puVar5" identifier = identifier) ;) (if_statement "if (0 < iVar4) {\n    do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);\n  }" if (parenthesized_expression "(0 < iVar4)" ( (binary_expression "0 < iVar4" number_literal < identifier) )) (compound_statement "{\n    do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);\n  }" { (do_statement "do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);" do (compound_statement "{\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    }" { (expression_statement "*puVar6 = 0;" (assignment_expression "*puVar6 = 0" (pointer_expression "*puVar6" * identifier) = number_literal) ;) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar5 + iVar4 != puVar6)" ( (binary_expression "puVar5 + iVar4 != puVar6" (binary_expression "puVar5 + iVar4" identifier + identifier) != identifier) )) ;) })) (if_statement "if (0 < *param_1) {\n    iVar7 = 1;\n    piVar9 = puVar5 + iVar4 + -1;\n    do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);\n  }" if (parenthesized_expression "(0 < *param_1)" ( (binary_expression "0 < *param_1" number_literal < (pointer_expression "*param_1" * identifier)) )) (compound_statement "{\n    iVar7 = 1;\n    piVar9 = puVar5 + iVar4 + -1;\n    do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);\n  }" { (expression_statement "iVar7 = 1;" (assignment_expression "iVar7 = 1" identifier = number_literal) ;) (expression_statement "piVar9 = puVar5 + iVar4 + -1;" (assignment_expression "piVar9 = puVar5 + iVar4 + -1" identifier = (binary_expression "puVar5 + iVar4 + -1" (binary_expression "puVar5 + iVar4" identifier + identifier) + number_literal)) ;) (do_statement "do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);" do (compound_statement "{\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    }" { (expression_statement "piVar1 = param_1 + iVar7;" (assignment_expression "piVar1 = param_1 + iVar7" identifier = (binary_expression "param_1 + iVar7" identifier + identifier)) ;) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) (expression_statement "*piVar9 = *piVar1;" (assignment_expression "*piVar9 = *piVar1" (pointer_expression "*piVar9" * identifier) = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "piVar9 = piVar9 + -1;" (assignment_expression "piVar9 = piVar9 + -1" identifier = (binary_expression "piVar9 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar7 <= *param_1)" ( (binary_expression "iVar7 <= *param_1" identifier <= (pointer_expression "*param_1" * identifier)) )) ;) })) (expression_statement "iVar10 = 5;" (assignment_expression "iVar10 = 5" identifier = number_literal) ;) (expression_statement "iVar14 = 0;" (assignment_expression "iVar14 = 0" identifier = number_literal) ;) (expression_statement "uVar13 = *puVar3;" (assignment_expression "uVar13 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "iVar7 = 0x10;" (assignment_expression "iVar7 = 0x10" identifier = number_literal) ;) (expression_statement "uVar12 = uVar13;" (assignment_expression "uVar12 = uVar13" identifier = identifier) ;) (do_statement "do {\n    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }\n    iVar7 = iVar7 >> 1;\n    iVar10 = iVar10 + -1;\n  } while (iVar10 != 0);" do (compound_statement "{\n    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }\n    iVar7 = iVar7 >> 1;\n    iVar10 = iVar10 + -1;\n  }" { (if_statement "if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }" if (parenthesized_expression "(uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0)" ( (binary_expression "uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0" (binary_expression "uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f)" identifier >> (parenthesized_expression "(0x20U - (sbyte)iVar7 & 0x1f)" ( (binary_expression "0x20U - (sbyte)iVar7 & 0x1f" (binary_expression "0x20U - (sbyte)iVar7" number_literal - (cast_expression "(sbyte)iVar7" ( (type_descriptor "sbyte" type_identifier) ) identifier)) & number_literal) ))) == number_literal) )) (compound_statement "{\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }" { (expression_statement "iVar14 = iVar14 + iVar7;" (assignment_expression "iVar14 = iVar14 + iVar7" identifier = (binary_expression "iVar14 + iVar7" identifier + identifier)) ;) (expression_statement "uVar12 = uVar12 << (sbyte)iVar7;" (assignment_expression "uVar12 = uVar12 << (sbyte)iVar7" identifier = (binary_expression "uVar12 << (sbyte)iVar7" identifier << (cast_expression "(sbyte)iVar7" ( (type_descriptor "sbyte" type_identifier) ) identifier))) ;) })) (expression_statement "iVar7 = iVar7 >> 1;" (assignment_expression "iVar7 = iVar7 >> 1" identifier = (binary_expression "iVar7 >> 1" identifier >> number_literal)) ;) (expression_statement "iVar10 = iVar10 + -1;" (assignment_expression "iVar10 = iVar10 + -1" identifier = (binary_expression "iVar10 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar10 != 0)" ( (binary_expression "iVar10 != 0" identifier != number_literal) )) ;) (if_statement "if (iVar14 != 0) {\n    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);\n    if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }\n  }" if (parenthesized_expression "(iVar14 != 0)" ( (binary_expression "iVar14 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);\n    if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }\n  }" { (expression_statement "uVar13 = uVar13 << ((byte)iVar14 & 0x1f);" (assignment_expression "uVar13 = uVar13 << ((byte)iVar14 & 0x1f)" identifier = (binary_expression "uVar13 << ((byte)iVar14 & 0x1f)" identifier << (parenthesized_expression "((byte)iVar14 & 0x1f)" ( (binary_expression "(byte)iVar14 & 0x1f" (cast_expression "(byte)iVar14" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (if_statement "if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }" if (parenthesized_expression "(1 < iVar2)" ( (binary_expression "1 < iVar2" number_literal < identifier) )) (compound_statement "{\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }" { (expression_statement "uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);" (assignment_expression "uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f)" identifier = (binary_expression "uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f)" identifier | (binary_expression "puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f)" (subscript_expression "puVar3[1]" identifier [ number_literal ]) >> (parenthesized_expression "(0x20 - (byte)iVar14 & 0x1f)" ( (binary_expression "0x20 - (byte)iVar14 & 0x1f" (binary_expression "0x20 - (byte)iVar14" number_literal - (cast_expression "(byte)iVar14" ( (type_descriptor "byte" type_identifier) ) identifier)) & number_literal) ))))) ;) })) })) (expression_statement "uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13);" (assignment_expression "uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13)" identifier = (call_expression "FUN_00052610(puVar3,iVar4,ppuVar11,uVar13)" identifier (argument_list "(puVar3,iVar4,ppuVar11,uVar13)" ( identifier , identifier , identifier , identifier )))) ;) (expression_statement "FUN_00052890(iVar2,param_4,uVar8,iVar14);" (call_expression "FUN_00052890(iVar2,param_4,uVar8,iVar14)" identifier (argument_list "(iVar2,param_4,uVar8,iVar14)" ( identifier , identifier , identifier , identifier ))) ;) (if_statement "if ((param_3 != (int *)0x0) && (0 < *param_3)) {\n    iVar7 = 1;\n    do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);\n  }" if (parenthesized_expression "((param_3 != (int *)0x0) && (0 < *param_3))" ( (binary_expression "(param_3 != (int *)0x0) && (0 < *param_3)" (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)) )) && (parenthesized_expression "(0 < *param_3)" ( (binary_expression "0 < *param_3" number_literal < (pointer_expression "*param_3" * identifier)) ))) )) (compound_statement "{\n    iVar7 = 1;\n    do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);\n  }" { (expression_statement "iVar7 = 1;" (assignment_expression "iVar7 = 1" identifier = number_literal) ;) (do_statement "do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);" do (compound_statement "{\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    }" { (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (if_statement "if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }" if (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) (compound_statement "{\n        iVar10 = puVar5[iVar4];\n      }" { (expression_statement "iVar10 = puVar5[iVar4];" (assignment_expression "iVar10 = puVar5[iVar4]" identifier = (subscript_expression "puVar5[iVar4]" identifier [ identifier ])) ;) })) (expression_statement "param_3[iVar7] = iVar10;" (assignment_expression "param_3[iVar7] = iVar10" (subscript_expression "param_3[iVar7]" identifier [ identifier ]) = identifier) ;) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar7 <= *param_3)" ( (binary_expression "iVar7 <= *param_3" identifier <= (pointer_expression "*param_3" * identifier)) )) ;) })) (expression_statement "FUN_0002f0f0(puVar3,iVar2 * 4);" (call_expression "FUN_0002f0f0(puVar3,iVar2 * 4)" identifier (argument_list "(puVar3,iVar2 * 4)" ( identifier , (binary_expression "iVar2 * 4" identifier * number_literal) ))) ;) (expression_statement "FUN_0002f010(puVar3);" (call_expression "FUN_0002f010(puVar3)" identifier (argument_list "(puVar3)" ( identifier ))) ;) (expression_statement "FUN_0002f0f0(puVar5,local_2c << 2);" (call_expression "FUN_0002f0f0(puVar5,local_2c << 2)" identifier (argument_list "(puVar5,local_2c << 2)" ( identifier , (binary_expression "local_2c << 2" identifier << number_literal) ))) ;) (expression_statement "FUN_0002f010(puVar5);" (call_expression "FUN_0002f010(puVar5)" identifier (argument_list "(puVar5)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ IDENT ]) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (subscript_expression IDENT [ (binary_expression (pointer_expression * IDENT) - IDENT) ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) != IDENT) )) ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + IDENT) + LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT <= (pointer_expression * IDENT)) )) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT >> (parenthesized_expression ( (binary_expression (binary_expression LIT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) & LIT) ))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT << (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT << (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT | (binary_expression (subscript_expression IDENT [ LIT ]) >> (parenthesized_expression ( (binary_expression (binary_expression LIT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) & LIT) ))))) ;) })) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression LIT < (pointer_expression * IDENT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ IDENT ])) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT <= (pointer_expression * IDENT)) )) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT * LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT << LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_00052c40(int *param_1,int *param_2,int *param_3,undefined4 param_4)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint *puVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  int iVar7;\n  undefined4 uVar8;\n  int *piVar9;\n  int iVar10;\n  undefined **ppuVar11;\n  uint uVar12;\n  uint uVar13;\n  int iVar14;\n  int local_2c;\n  \n  ppuVar11 = &__DT_PLTGOT;\n  iVar2 = *param_2;\n  if (param_2[iVar2] == 0) {\n                    \n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }\n  puVar3 = (uint *)FUN_0002e780(iVar2,4);\n  iVar4 = 0;\n  if (0 < iVar2) {\n    do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);\n  }\n  local_2c = *param_1;\n  if (local_2c <= iVar2) {\n    local_2c = iVar2 + 1;\n  }\n  iVar4 = local_2c;\n  puVar5 = (undefined4 *)FUN_0002e780(local_2c,4);\n  puVar6 = puVar5;\n  if (0 < iVar4) {\n    do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);\n  }\n  if (0 < *param_1) {\n    iVar7 = 1;\n    piVar9 = puVar5 + iVar4 + -1;\n    do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);\n  }\n  iVar10 = 5;\n  iVar14 = 0;\n  uVar13 = *puVar3;\n  iVar7 = 0x10;\n  uVar12 = uVar13;\n  do {\n    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }\n    iVar7 = iVar7 >> 1;\n    iVar10 = iVar10 + -1;\n  } while (iVar10 != 0);\n  if (iVar14 != 0) {\n    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);\n    if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }\n  }\n  uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13);\n  FUN_00052890(iVar2,param_4,uVar8,iVar14);\n  if ((param_3 != (int *)0x0) && (0 < *param_3)) {\n    iVar7 = 1;\n    do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);\n  }\n  FUN_0002f0f0(puVar3,iVar2 * 4);\n  FUN_0002f010(puVar3);\n  FUN_0002f0f0(puVar5,local_2c << 2);\n  FUN_0002f010(puVar5);\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00052c40(int *param_1,int *param_2,int *param_3,undefined4 param_4)" (identifier "FUN_00052c40") (parameter_list "(int *param_1,int *param_2,int *param_3,undefined4 param_4)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (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") (identifier "param_4")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  uint *puVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  int iVar7;\n  undefined4 uVar8;\n  int *piVar9;\n  int iVar10;\n  undefined **ppuVar11;\n  uint uVar12;\n  uint uVar13;\n  int iVar14;\n  int local_2c;\n  \n  ppuVar11 = &__DT_PLTGOT;\n  iVar2 = *param_2;\n  if (param_2[iVar2] == 0) {\n                    \n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }\n  puVar3 = (uint *)FUN_0002e780(iVar2,4);\n  iVar4 = 0;\n  if (0 < iVar2) {\n    do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);\n  }\n  local_2c = *param_1;\n  if (local_2c <= iVar2) {\n    local_2c = iVar2 + 1;\n  }\n  iVar4 = local_2c;\n  puVar5 = (undefined4 *)FUN_0002e780(local_2c,4);\n  puVar6 = puVar5;\n  if (0 < iVar4) {\n    do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);\n  }\n  if (0 < *param_1) {\n    iVar7 = 1;\n    piVar9 = puVar5 + iVar4 + -1;\n    do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);\n  }\n  iVar10 = 5;\n  iVar14 = 0;\n  uVar13 = *puVar3;\n  iVar7 = 0x10;\n  uVar12 = uVar13;\n  do {\n    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }\n    iVar7 = iVar7 >> 1;\n    iVar10 = iVar10 + -1;\n  } while (iVar10 != 0);\n  if (iVar14 != 0) {\n    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);\n    if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }\n  }\n  uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13);\n  FUN_00052890(iVar2,param_4,uVar8,iVar14);\n  if ((param_3 != (int *)0x0) && (0 < *param_3)) {\n    iVar7 = 1;\n    do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);\n  }\n  FUN_0002f0f0(puVar3,iVar2 * 4);\n  FUN_0002f010(puVar3);\n  FUN_0002f0f0(puVar5,local_2c << 2);\n  FUN_0002f010(puVar5);\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint *puVar3;" (type_identifier "uint") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "undefined4 *puVar5;" (type_identifier "undefined4") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "undefined4 *puVar6;" (type_identifier "undefined4") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "undefined4 uVar8;" (type_identifier "undefined4") (identifier "uVar8") (; ";")) (declaration "int *piVar9;" (primitive_type "int") (pointer_declarator "*piVar9" (* "*") (identifier "piVar9")) (; ";")) (declaration "int iVar10;" (primitive_type "int") (identifier "iVar10") (; ";")) (declaration "undefined **ppuVar11;" (type_identifier "undefined") (pointer_declarator "**ppuVar11" (* "*") (pointer_declarator "*ppuVar11" (* "*") (identifier "ppuVar11"))) (; ";")) (declaration "uint uVar12;" (type_identifier "uint") (identifier "uVar12") (; ";")) (declaration "uint uVar13;" (type_identifier "uint") (identifier "uVar13") (; ";")) (declaration "int iVar14;" (primitive_type "int") (identifier "iVar14") (; ";")) (declaration "int local_2c;" (primitive_type "int") (identifier "local_2c") (; ";")) (expression_statement "ppuVar11 = &__DT_PLTGOT;" (assignment_expression "ppuVar11 = &__DT_PLTGOT" (identifier "ppuVar11") (= "=") (pointer_expression "&__DT_PLTGOT" (& "&") (identifier "__DT_PLTGOT"))) (; ";")) (expression_statement "iVar2 = *param_2;" (assignment_expression "iVar2 = *param_2" (identifier "iVar2") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (if_statement "if (param_2[iVar2] == 0) {\n                    \n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }" (if "if") (parenthesized_expression "(param_2[iVar2] == 0)" (( "(") (binary_expression "param_2[iVar2] == 0" (subscript_expression "param_2[iVar2]" (identifier "param_2") ([ "[") (identifier "iVar2") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");\n  }" ({ "{") (expression_statement "__assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");" (call_expression "__assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod")" (identifier "__assert_fail") (argument_list "("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod")" (( "(") (string_literal ""mod[mod[0]] != 0"" (" """) (string_content "mod[mod[0]] != 0") (" """)) (, ",") (string_literal ""sshbn.c"" (" """) (string_content "sshbn.c") (" """)) (, ",") (number_literal "0x540") (, ",") (string_literal ""bigdivmod"" (" """) (string_content "bigdivmod") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "puVar3 = (uint *)FUN_0002e780(iVar2,4);" (assignment_expression "puVar3 = (uint *)FUN_0002e780(iVar2,4)" (identifier "puVar3") (= "=") (cast_expression "(uint *)FUN_0002e780(iVar2,4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0002e780(iVar2,4)" (identifier "FUN_0002e780") (argument_list "(iVar2,4)" (( "(") (identifier "iVar2") (, ",") (number_literal "4") () ")"))))) (; ";")) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (if_statement "if (0 < iVar2) {\n    do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);\n  }" (if "if") (parenthesized_expression "(0 < iVar2)" (( "(") (binary_expression "0 < iVar2" (number_literal "0") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n    do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);\n  }" ({ "{") (do_statement "do {\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    } while (iVar2 != iVar4);" (do "do") (compound_statement "{\n      puVar3[iVar4] = param_2[*param_2 - iVar4];\n      iVar4 = iVar4 + 1;\n    }" ({ "{") (expression_statement "puVar3[iVar4] = param_2[*param_2 - iVar4];" (assignment_expression "puVar3[iVar4] = param_2[*param_2 - iVar4]" (subscript_expression "puVar3[iVar4]" (identifier "puVar3") ([ "[") (identifier "iVar4") (] "]")) (= "=") (subscript_expression "param_2[*param_2 - iVar4]" (identifier "param_2") ([ "[") (binary_expression "*param_2 - iVar4" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (- "-") (identifier "iVar4")) (] "]"))) (; ";")) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar2 != iVar4)" (( "(") (binary_expression "iVar2 != iVar4" (identifier "iVar2") (!= "!=") (identifier "iVar4")) () ")")) (; ";")) (} "}"))) (expression_statement "local_2c = *param_1;" (assignment_expression "local_2c = *param_1" (identifier "local_2c") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (local_2c <= iVar2) {\n    local_2c = iVar2 + 1;\n  }" (if "if") (parenthesized_expression "(local_2c <= iVar2)" (( "(") (binary_expression "local_2c <= iVar2" (identifier "local_2c") (<= "<=") (identifier "iVar2")) () ")")) (compound_statement "{\n    local_2c = iVar2 + 1;\n  }" ({ "{") (expression_statement "local_2c = iVar2 + 1;" (assignment_expression "local_2c = iVar2 + 1" (identifier "local_2c") (= "=") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "iVar4 = local_2c;" (assignment_expression "iVar4 = local_2c" (identifier "iVar4") (= "=") (identifier "local_2c")) (; ";")) (expression_statement "puVar5 = (undefined4 *)FUN_0002e780(local_2c,4);" (assignment_expression "puVar5 = (undefined4 *)FUN_0002e780(local_2c,4)" (identifier "puVar5") (= "=") (cast_expression "(undefined4 *)FUN_0002e780(local_2c,4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0002e780(local_2c,4)" (identifier "FUN_0002e780") (argument_list "(local_2c,4)" (( "(") (identifier "local_2c") (, ",") (number_literal "4") () ")"))))) (; ";")) (expression_statement "puVar6 = puVar5;" (assignment_expression "puVar6 = puVar5" (identifier "puVar6") (= "=") (identifier "puVar5")) (; ";")) (if_statement "if (0 < iVar4) {\n    do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);\n  }" (if "if") (parenthesized_expression "(0 < iVar4)" (( "(") (binary_expression "0 < iVar4" (number_literal "0") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n    do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);\n  }" ({ "{") (do_statement "do {\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    } while (puVar5 + iVar4 != puVar6);" (do "do") (compound_statement "{\n      *puVar6 = 0;\n      puVar6 = puVar6 + 1;\n    }" ({ "{") (expression_statement "*puVar6 = 0;" (assignment_expression "*puVar6 = 0" (pointer_expression "*puVar6" (* "*") (identifier "puVar6")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" (identifier "puVar6") (= "=") (binary_expression "puVar6 + 1" (identifier "puVar6") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar5 + iVar4 != puVar6)" (( "(") (binary_expression "puVar5 + iVar4 != puVar6" (binary_expression "puVar5 + iVar4" (identifier "puVar5") (+ "+") (identifier "iVar4")) (!= "!=") (identifier "puVar6")) () ")")) (; ";")) (} "}"))) (if_statement "if (0 < *param_1) {\n    iVar7 = 1;\n    piVar9 = puVar5 + iVar4 + -1;\n    do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);\n  }" (if "if") (parenthesized_expression "(0 < *param_1)" (( "(") (binary_expression "0 < *param_1" (number_literal "0") (< "<") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) () ")")) (compound_statement "{\n    iVar7 = 1;\n    piVar9 = puVar5 + iVar4 + -1;\n    do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);\n  }" ({ "{") (expression_statement "iVar7 = 1;" (assignment_expression "iVar7 = 1" (identifier "iVar7") (= "=") (number_literal "1")) (; ";")) (expression_statement "piVar9 = puVar5 + iVar4 + -1;" (assignment_expression "piVar9 = puVar5 + iVar4 + -1" (identifier "piVar9") (= "=") (binary_expression "puVar5 + iVar4 + -1" (binary_expression "puVar5 + iVar4" (identifier "puVar5") (+ "+") (identifier "iVar4")) (+ "+") (number_literal "-1"))) (; ";")) (do_statement "do {\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    } while (iVar7 <= *param_1);" (do "do") (compound_statement "{\n      piVar1 = param_1 + iVar7;\n      iVar7 = iVar7 + 1;\n      *piVar9 = *piVar1;\n      piVar9 = piVar9 + -1;\n    }" ({ "{") (expression_statement "piVar1 = param_1 + iVar7;" (assignment_expression "piVar1 = param_1 + iVar7" (identifier "piVar1") (= "=") (binary_expression "param_1 + iVar7" (identifier "param_1") (+ "+") (identifier "iVar7"))) (; ";")) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" (identifier "iVar7") (= "=") (binary_expression "iVar7 + 1" (identifier "iVar7") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*piVar9 = *piVar1;" (assignment_expression "*piVar9 = *piVar1" (pointer_expression "*piVar9" (* "*") (identifier "piVar9")) (= "=") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) (; ";")) (expression_statement "piVar9 = piVar9 + -1;" (assignment_expression "piVar9 = piVar9 + -1" (identifier "piVar9") (= "=") (binary_expression "piVar9 + -1" (identifier "piVar9") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar7 <= *param_1)" (( "(") (binary_expression "iVar7 <= *param_1" (identifier "iVar7") (<= "<=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) () ")")) (; ";")) (} "}"))) (expression_statement "iVar10 = 5;" (assignment_expression "iVar10 = 5" (identifier "iVar10") (= "=") (number_literal "5")) (; ";")) (expression_statement "iVar14 = 0;" (assignment_expression "iVar14 = 0" (identifier "iVar14") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar13 = *puVar3;" (assignment_expression "uVar13 = *puVar3" (identifier "uVar13") (= "=") (pointer_expression "*puVar3" (* "*") (identifier "puVar3"))) (; ";")) (expression_statement "iVar7 = 0x10;" (assignment_expression "iVar7 = 0x10" (identifier "iVar7") (= "=") (number_literal "0x10")) (; ";")) (expression_statement "uVar12 = uVar13;" (assignment_expression "uVar12 = uVar13" (identifier "uVar12") (= "=") (identifier "uVar13")) (; ";")) (do_statement "do {\n    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }\n    iVar7 = iVar7 >> 1;\n    iVar10 = iVar10 + -1;\n  } while (iVar10 != 0);" (do "do") (compound_statement "{\n    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }\n    iVar7 = iVar7 >> 1;\n    iVar10 = iVar10 + -1;\n  }" ({ "{") (if_statement "if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }" (if "if") (parenthesized_expression "(uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0)" (( "(") (binary_expression "uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0" (binary_expression "uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f)" (identifier "uVar12") (>> ">>") (parenthesized_expression "(0x20U - (sbyte)iVar7 & 0x1f)" (( "(") (binary_expression "0x20U - (sbyte)iVar7 & 0x1f" (binary_expression "0x20U - (sbyte)iVar7" (number_literal "0x20U") (- "-") (cast_expression "(sbyte)iVar7" (( "(") (type_descriptor "sbyte" (type_identifier "sbyte")) () ")") (identifier "iVar7"))) (& "&") (number_literal "0x1f")) () ")"))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar14 = iVar14 + iVar7;\n      uVar12 = uVar12 << (sbyte)iVar7;\n    }" ({ "{") (expression_statement "iVar14 = iVar14 + iVar7;" (assignment_expression "iVar14 = iVar14 + iVar7" (identifier "iVar14") (= "=") (binary_expression "iVar14 + iVar7" (identifier "iVar14") (+ "+") (identifier "iVar7"))) (; ";")) (expression_statement "uVar12 = uVar12 << (sbyte)iVar7;" (assignment_expression "uVar12 = uVar12 << (sbyte)iVar7" (identifier "uVar12") (= "=") (binary_expression "uVar12 << (sbyte)iVar7" (identifier "uVar12") (<< "<<") (cast_expression "(sbyte)iVar7" (( "(") (type_descriptor "sbyte" (type_identifier "sbyte")) () ")") (identifier "iVar7")))) (; ";")) (} "}"))) (expression_statement "iVar7 = iVar7 >> 1;" (assignment_expression "iVar7 = iVar7 >> 1" (identifier "iVar7") (= "=") (binary_expression "iVar7 >> 1" (identifier "iVar7") (>> ">>") (number_literal "1"))) (; ";")) (expression_statement "iVar10 = iVar10 + -1;" (assignment_expression "iVar10 = iVar10 + -1" (identifier "iVar10") (= "=") (binary_expression "iVar10 + -1" (identifier "iVar10") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar10 != 0)" (( "(") (binary_expression "iVar10 != 0" (identifier "iVar10") (!= "!=") (number_literal "0")) () ")")) (; ";")) (if_statement "if (iVar14 != 0) {\n    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);\n    if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }\n  }" (if "if") (parenthesized_expression "(iVar14 != 0)" (( "(") (binary_expression "iVar14 != 0" (identifier "iVar14") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);\n    if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }\n  }" ({ "{") (expression_statement "uVar13 = uVar13 << ((byte)iVar14 & 0x1f);" (assignment_expression "uVar13 = uVar13 << ((byte)iVar14 & 0x1f)" (identifier "uVar13") (= "=") (binary_expression "uVar13 << ((byte)iVar14 & 0x1f)" (identifier "uVar13") (<< "<<") (parenthesized_expression "((byte)iVar14 & 0x1f)" (( "(") (binary_expression "(byte)iVar14 & 0x1f" (cast_expression "(byte)iVar14" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "iVar14")) (& "&") (number_literal "0x1f")) () ")")))) (; ";")) (if_statement "if (1 < iVar2) {\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }" (if "if") (parenthesized_expression "(1 < iVar2)" (( "(") (binary_expression "1 < iVar2" (number_literal "1") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);\n    }" ({ "{") (expression_statement "uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);" (assignment_expression "uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f)" (identifier "uVar13") (= "=") (binary_expression "uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f)" (identifier "uVar13") (| "|") (binary_expression "puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f)" (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")) (>> ">>") (parenthesized_expression "(0x20 - (byte)iVar14 & 0x1f)" (( "(") (binary_expression "0x20 - (byte)iVar14 & 0x1f" (binary_expression "0x20 - (byte)iVar14" (number_literal "0x20") (- "-") (cast_expression "(byte)iVar14" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "iVar14"))) (& "&") (number_literal "0x1f")) () ")"))))) (; ";")) (} "}"))) (} "}"))) (expression_statement "uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13);" (assignment_expression "uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13)" (identifier "uVar8") (= "=") (call_expression "FUN_00052610(puVar3,iVar4,ppuVar11,uVar13)" (identifier "FUN_00052610") (argument_list "(puVar3,iVar4,ppuVar11,uVar13)" (( "(") (identifier "puVar3") (, ",") (identifier "iVar4") (, ",") (identifier "ppuVar11") (, ",") (identifier "uVar13") () ")")))) (; ";")) (expression_statement "FUN_00052890(iVar2,param_4,uVar8,iVar14);" (call_expression "FUN_00052890(iVar2,param_4,uVar8,iVar14)" (identifier "FUN_00052890") (argument_list "(iVar2,param_4,uVar8,iVar14)" (( "(") (identifier "iVar2") (, ",") (identifier "param_4") (, ",") (identifier "uVar8") (, ",") (identifier "iVar14") () ")"))) (; ";")) (if_statement "if ((param_3 != (int *)0x0) && (0 < *param_3)) {\n    iVar7 = 1;\n    do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);\n  }" (if "if") (parenthesized_expression "((param_3 != (int *)0x0) && (0 < *param_3))" (( "(") (binary_expression "(param_3 != (int *)0x0) && (0 < *param_3)" (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"))) () ")")) (&& "&&") (parenthesized_expression "(0 < *param_3)" (( "(") (binary_expression "0 < *param_3" (number_literal "0") (< "<") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) () ")"))) () ")")) (compound_statement "{\n    iVar7 = 1;\n    do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);\n  }" ({ "{") (expression_statement "iVar7 = 1;" (assignment_expression "iVar7 = 1" (identifier "iVar7") (= "=") (number_literal "1")) (; ";")) (do_statement "do {\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    } while (iVar7 <= *param_3);" (do "do") (compound_statement "{\n      iVar4 = iVar4 + -1;\n      iVar10 = 0;\n      if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }\n      param_3[iVar7] = iVar10;\n      iVar7 = iVar7 + 1;\n    }" ({ "{") (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + -1" (identifier "iVar4") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" (identifier "iVar10") (= "=") (number_literal "0")) (; ";")) (if_statement "if (-1 < iVar4) {\n        iVar10 = puVar5[iVar4];\n      }" (if "if") (parenthesized_expression "(-1 < iVar4)" (( "(") (binary_expression "-1 < iVar4" (number_literal "-1") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n        iVar10 = puVar5[iVar4];\n      }" ({ "{") (expression_statement "iVar10 = puVar5[iVar4];" (assignment_expression "iVar10 = puVar5[iVar4]" (identifier "iVar10") (= "=") (subscript_expression "puVar5[iVar4]" (identifier "puVar5") ([ "[") (identifier "iVar4") (] "]"))) (; ";")) (} "}"))) (expression_statement "param_3[iVar7] = iVar10;" (assignment_expression "param_3[iVar7] = iVar10" (subscript_expression "param_3[iVar7]" (identifier "param_3") ([ "[") (identifier "iVar7") (] "]")) (= "=") (identifier "iVar10")) (; ";")) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" (identifier "iVar7") (= "=") (binary_expression "iVar7 + 1" (identifier "iVar7") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar7 <= *param_3)" (( "(") (binary_expression "iVar7 <= *param_3" (identifier "iVar7") (<= "<=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) () ")")) (; ";")) (} "}"))) (expression_statement "FUN_0002f0f0(puVar3,iVar2 * 4);" (call_expression "FUN_0002f0f0(puVar3,iVar2 * 4)" (identifier "FUN_0002f0f0") (argument_list "(puVar3,iVar2 * 4)" (( "(") (identifier "puVar3") (, ",") (binary_expression "iVar2 * 4" (identifier "iVar2") (* "*") (number_literal "4")) () ")"))) (; ";")) (expression_statement "FUN_0002f010(puVar3);" (call_expression "FUN_0002f010(puVar3)" (identifier "FUN_0002f010") (argument_list "(puVar3)" (( "(") (identifier "puVar3") () ")"))) (; ";")) (expression_statement "FUN_0002f0f0(puVar5,local_2c << 2);" (call_expression "FUN_0002f0f0(puVar5,local_2c << 2)" (identifier "FUN_0002f0f0") (argument_list "(puVar5,local_2c << 2)" (( "(") (identifier "puVar5") (, ",") (binary_expression "local_2c << 2" (identifier "local_2c") (<< "<<") (number_literal "2")) () ")"))) (; ";")) (expression_statement "FUN_0002f010(puVar5);" (call_expression "FUN_0002f010(puVar5)" (identifier "FUN_0002f010") (argument_list "(puVar5)" (( "(") (identifier "puVar5") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void __regparm3
function_1(type_1 var_8,type_1 mod,type_1 var_16,type_1 quotient)

{
  type_1 pBVar1;
  size_t var_4;
  type_2 *m;
  size_t var_3;
  type_2 *var_6;
  type_2 *var_5;
  int var_9;
  int var_12;
  type_2 var_10;
  int var_11;
  type_2 var_13;
  size_t var_7;
  
  var_4 = *mod;
  if (mod[var_4] == 0) {
                    /* WARNING: Subroutine does not return */
    var_1("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");
  }
  m = (type_2 *)var_2(var_4,4);
  var_3 = 0;
  if (0 < (int)var_4) {
    do {
      m[var_3] = mod[*mod - var_3];
      var_3 = var_3 + 1;
    } while (var_4 != var_3);
  }
  var_7 = *var_8;
  if ((int)var_7 <= (int)var_4) {
    var_7 = var_4 + 1;
  }
  var_6 = (type_2 *)var_2(var_7,4);
  var_5 = var_6;
  if (0 < (int)var_7) {
    do {
      *var_5 = 0;
      var_5 = var_5 + 1;
    } while (var_6 + var_7 != var_5);
  }
  if (0 < (int)*var_8) {
    var_9 = 1;
    var_5 = var_6 + (var_7 - 1);
    do {
      pBVar1 = var_8 + var_9;
      var_9 = var_9 + 1;
      *var_5 = *pBVar1;
      var_5 = var_5 + -1;
    } while (var_9 <= (int)*var_8);
  }
  var_12 = 5;
  var_11 = 0;
  var_13 = *m;
  var_9 = 0x10;
  var_10 = var_13;
  do {
    if (var_10 >> (0x20U - (type_3)var_9 & 0x1f) == 0) {
      var_11 = var_11 + var_9;
      var_10 = var_10 << (type_3)var_9;
    }
    var_9 = var_9 >> 1;
    var_12 = var_12 + -1;
  } while (var_12 != 0);
  if (var_11 != 0) {
    var_13 = var_13 << ((type_4)var_11 & 0x1f);
    if (1 < (int)var_4) {
      var_13 = var_13 | m[1] >> (0x20 - (type_4)var_11 & 0x1f);
    }
  }
  var_10 = var_14(var_13);
  var_15(var_6,var_7,m,var_4,quotient,var_10,var_11);
  if ((var_16 != (type_1)0x0) && (0 < (int)*var_16)) {
    var_9 = 1;
    var_3 = var_7;
    do {
      var_3 = var_3 - 1;
      var_10 = 0;
      if (-1 < (int)var_3) {
        var_10 = var_6[var_3];
      }
      var_16[var_9] = var_10;
      var_9 = var_9 + 1;
    } while (var_9 <= (int)*var_16);
  }
  var_17(m,var_4 * 4);
  var_18(m);
  var_17(var_6,var_7 << 2);
  var_18(var_6);
  return;
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void __regparm3 MASKED(int *param_1,int *param_2,int *param_3,undefined4 param_4)

{
  int *piVar1;
  int iVar2;
  uint *puVar3;
  int iVar4;
  undefined4 *puVar5;
  undefined4 *puVar6;
  int iVar7;
  undefined4 uVar8;
  int *piVar9;
  int iVar10;
  undefined **ppuVar11;
  uint uVar12;
  uint uVar13;
  int iVar14;
  int local_2c;
  
  ppuVar11 = &__DT_PLTGOT;
  iVar2 = *param_2;
  if (param_2[iVar2] == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("mod[mod[0]] != 0","sshbn.c",0x540,"bigdivmod");
  }
  puVar3 = (uint *)FUN_0002e780(iVar2,4);
  iVar4 = 0;
  if (0 < iVar2) {
    do {
      puVar3[iVar4] = param_2[*param_2 - iVar4];
      iVar4 = iVar4 + 1;
    } while (iVar2 != iVar4);
  }
  local_2c = *param_1;
  if (local_2c <= iVar2) {
    local_2c = iVar2 + 1;
  }
  iVar4 = local_2c;
  puVar5 = (undefined4 *)FUN_0002e780(local_2c,4);
  puVar6 = puVar5;
  if (0 < iVar4) {
    do {
      *puVar6 = 0;
      puVar6 = puVar6 + 1;
    } while (puVar5 + iVar4 != puVar6);
  }
  if (0 < *param_1) {
    iVar7 = 1;
    piVar9 = puVar5 + iVar4 + -1;
    do {
      piVar1 = param_1 + iVar7;
      iVar7 = iVar7 + 1;
      *piVar9 = *piVar1;
      piVar9 = piVar9 + -1;
    } while (iVar7 <= *param_1);
  }
  iVar10 = 5;
  iVar14 = 0;
  uVar13 = *puVar3;
  iVar7 = 0x10;
  uVar12 = uVar13;
  do {
    if (uVar12 >> (0x20U - (sbyte)iVar7 & 0x1f) == 0) {
      iVar14 = iVar14 + iVar7;
      uVar12 = uVar12 << (sbyte)iVar7;
    }
    iVar7 = iVar7 >> 1;
    iVar10 = iVar10 + -1;
  } while (iVar10 != 0);
  if (iVar14 != 0) {
    uVar13 = uVar13 << ((byte)iVar14 & 0x1f);
    if (1 < iVar2) {
      uVar13 = uVar13 | puVar3[1] >> (0x20 - (byte)iVar14 & 0x1f);
    }
  }
  uVar8 = FUN_00052610(puVar3,iVar4,ppuVar11,uVar13);
  FUN_00052890(iVar2,param_4,uVar8,iVar14);
  if ((param_3 != (int *)0x0) && (0 < *param_3)) {
    iVar7 = 1;
    do {
      iVar4 = iVar4 + -1;
      iVar10 = 0;
      if (-1 < iVar4) {
        iVar10 = puVar5[iVar4];
      }
      param_3[iVar7] = iVar10;
      iVar7 = iVar7 + 1;
    } while (iVar7 <= *param_3);
  }
  FUN_0002f0f0(puVar3,iVar2 * 4);
  FUN_0002f010(puVar3);
  FUN_0002f0f0(puVar5,local_2c << 2);
  FUN_0002f010(puVar5);
  return;
}

