
size_t * randperm_new(randint_source *r,size_t h,size_t n)

{
  long lVar1;
  long lVar2;
  bool bVar3;
  randint *p;
  randint rVar4;
  long *entry;
  long *entry_00;
  void *pvVar5;
  size_t sVar6;
  long in_FS_OFFSET;
  bool bVar7;
  Hash_table *local_a0;
  long local_68 [3];
  undefined8 local_50;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  if (h == 0) {
    p = (randint *)0x0;
    goto LAB_00105c35;
  }
  if (h == 1) {
    p = (randint *)xmalloc(8);
    rVar4 = randint_genmax(r,n - 1);
    *p = rVar4;
    goto LAB_00105c35;
  }
  if (n < 0x20000) {
    if ((long)(n << 3) < 0 || n >> 0x3d != 0) {
LAB_00105ab5:
                    /* WARNING: Subroutine does not return */
      xalloc_die();
    }
    p = (randint *)xmalloc(n * 8);
    if (n != 0) goto LAB_00105d20;
LAB_00105d32:
    bVar3 = false;
    local_a0 = (Hash_table *)0x0;
    if (h != 0) {
LAB_00105d4c:
      sVar6 = 1;
      do {
        lVar1 = sVar6 - 1;
        rVar4 = randint_genmax(r,n - sVar6);
        lVar2 = lVar1 + rVar4;
        if (bVar3) {
          local_50 = 0;
          local_68[2] = lVar1;
          entry = (long *)hash_delete(local_a0,local_68 + 2);
          local_68[1] = 0;
          local_68[0] = lVar2;
          entry_00 = (long *)hash_delete(local_a0,local_68);
          if (entry == (long *)0x0) {
            entry = (long *)xmalloc(0x10);
            entry[1] = lVar1;
            *entry = lVar1;
          }
          if (entry_00 == (long *)0x0) {
            entry_00 = (long *)xmalloc(0x10);
            entry_00[1] = lVar2;
            *entry_00 = lVar2;
          }
          lVar1 = entry[1];
          entry[1] = entry_00[1];
          entry_00[1] = lVar1;
          pvVar5 = hash_insert(local_a0,entry);
          if (pvVar5 == (void *)0x0) {
                    /* WARNING: Subroutine does not return */
            xalloc_die();
          }
          pvVar5 = hash_insert(local_a0,entry_00);
          if (pvVar5 == (void *)0x0) {
                    /* WARNING: Subroutine does not return */
            xalloc_die();
          }
          p[sVar6 - 1] = entry[1];
        }
        else {
          rVar4 = p[sVar6 - 1];
          p[sVar6 - 1] = p[lVar2];
          p[lVar2] = rVar4;
        }
        bVar7 = h != sVar6;
        sVar6 = sVar6 + 1;
      } while (bVar7);
      if (bVar3) goto LAB_00105cd7;
    }
    if ((long)(h << 3) < 0 || h >> 0x3d != 0) {
                    /* WARNING: Subroutine does not return */
      xalloc_die();
    }
    p = (randint *)xrealloc(p,h << 3);
  }
  else {
    if (n / h < 0x20) {
      if ((long)(n << 3) < 0 || n >> 0x3d != 0) goto LAB_00105ab5;
      p = (randint *)xmalloc(n * 8);
LAB_00105d20:
      rVar4 = 0;
      do {
        p[rVar4] = rVar4;
        rVar4 = rVar4 + 1;
      } while (n != rVar4);
      goto LAB_00105d32;
    }
    local_a0 = hash_initialize(h * 2,(Hash_tuning *)0x0,sparse_hash_,sparse_cmp_,
                               (Hash_data_freer)PTR_free_0010ef98);
    if (local_a0 == (Hash_table *)0x0) {
                    /* WARNING: Subroutine does not return */
      xalloc_die();
    }
    if ((long)(h << 3) < 0 || h >> 0x3d != 0) {
                    /* WARNING: Subroutine does not return */
      xalloc_die();
    }
    p = (randint *)xmalloc(h * 8);
    bVar3 = true;
    if (h != 0) goto LAB_00105d4c;
LAB_00105cd7:
    hash_free(local_a0);
  }
LAB_00105c35:
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return p;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



undefined8 * FUN_001059f2(undefined8 param_1,ulong param_2,ulong param_3)

{
  bool bVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  long lVar4;
  long *plVar5;
  long *plVar6;
  long lVar7;
  ulong uVar8;
  long in_FS_OFFSET;
  bool bVar9;
  long local_a0;
  long local_68 [3];
  undefined8 local_50;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  if (param_2 == 0) {
    puVar2 = (undefined8 *)0x0;
    goto LAB_00105c35;
  }
  if (param_2 == 1) {
    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);
    uVar3 = FUN_0010582a(param_1,param_3 - 1);
    *puVar2 = uVar3;
    goto LAB_00105c35;
  }
  if (param_3 < 0x20000) {
    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {
LAB_00105ab5:
                    /* WARNING: Subroutine does not return */
      FUN_00107233();
    }
    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);
    if (param_3 != 0) goto LAB_00105d20;
LAB_00105d32:
    bVar1 = false;
    local_a0 = 0;
    if (param_2 != 0) {
LAB_00105d4c:
      uVar8 = 1;
      do {
        lVar7 = uVar8 - 1;
        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);
        lVar4 = lVar7 + lVar4;
        if (bVar1) {
          local_50 = 0;
          local_68[2] = lVar7;
          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);
          local_68[1] = 0;
          local_68[0] = lVar4;
          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);
          if (plVar5 == (long *)0x0) {
            plVar5 = (long *)FUN_00106ff1(0x10);
            plVar5[1] = lVar7;
            *plVar5 = lVar7;
          }
          if (plVar6 == (long *)0x0) {
            plVar6 = (long *)FUN_00106ff1(0x10);
            plVar6[1] = lVar4;
            *plVar6 = lVar4;
          }
          lVar7 = plVar5[1];
          plVar5[1] = plVar6[1];
          plVar6[1] = lVar7;
          lVar7 = FUN_00108c7d(local_a0,plVar5);
          if (lVar7 == 0) {
                    /* WARNING: Subroutine does not return */
            FUN_00107233();
          }
          lVar7 = FUN_00108c7d(local_a0,plVar6);
          if (lVar7 == 0) {
                    /* WARNING: Subroutine does not return */
            FUN_00107233();
          }
          puVar2[uVar8 - 1] = plVar5[1];
        }
        else {
          uVar3 = puVar2[uVar8 - 1];
          puVar2[uVar8 - 1] = puVar2[lVar4];
          puVar2[lVar4] = uVar3;
        }
        bVar9 = param_2 != uVar8;
        uVar8 = uVar8 + 1;
      } while (bVar9);
      if (bVar1) goto LAB_00105cd7;
    }
    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {
                    /* WARNING: Subroutine does not return */
      FUN_00107233();
    }
    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);
  }
  else {
    if (param_3 / param_2 < 0x20) {
      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;
      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);
LAB_00105d20:
      uVar8 = 0;
      do {
        puVar2[uVar8] = uVar8;
        uVar8 = uVar8 + 1;
      } while (param_3 != uVar8);
      goto LAB_00105d32;
    }
    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);
    if (local_a0 == 0) {
                    /* WARNING: Subroutine does not return */
      FUN_00107233();
    }
    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {
                    /* WARNING: Subroutine does not return */
      FUN_00107233();
    }
    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);
    bVar1 = true;
    if (param_2 != 0) goto LAB_00105d4c;
LAB_00105cd7:
    FUN_00108803(local_a0);
  }
LAB_00105c35:
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return puVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RBP,RDX
MOV RDX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x68],RDX
XOR EDX,EDX
TEST RSI,RSI
JZ 0x00105c2f
MOV RBX,RDI
CMP RSI,0x1
JNZ 0x00105a51
MOV EDI,0x8
CALL 0x00106ff1
MOV R12,RAX
LEA RSI,[RBP + -0x1]
MOV RDI,RBX
CALL 0x0010582a
MOV qword ptr [R12],RAX
JMP 0x00105c35
CMP RBP,0x1ffff
JBE 0x00105ce6
MOV RAX,RBP
MOV EDX,0x0
DIV qword ptr [RSP + 0x10]
CMP RAX,0x1f
JA 0x00105c5b
MOV RAX,RBP
SHR RAX,0x3d
SETNZ AL
MOVZX EAX,AL
MOV RDX,RBP
SHL RDX,0x3
MOV EDX,0x1
CMOVS RAX,RDX
TEST AL,AL
JNZ 0x00105ab5
LEA RDI,[RBP*0x8]
CALL 0x00106ff1
MOV R12,RAX
JMP 0x00105d20
CALL 0x00107233
CALL 0x00107233
CALL 0x00107233
MOV EDI,0x10
CALL 0x00106ff1
MOV R13,RAX
MOV qword ptr [RAX + 0x8],R15
MOV qword ptr [RAX],R15
JMP 0x00105b93
MOV EDI,0x10
CALL 0x00106ff1
MOV R14,RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [R14],RAX
JMP 0x00105b9c
CALL 0x00107233
CALL 0x00107233
MOV RDX,qword ptr [R12 + RBX*0x8 + -0x8]
MOV RAX,qword ptr [RSP + 0x18]
LEA RAX,[R12 + RAX*0x8]
MOV RCX,qword ptr [RAX]
MOV qword ptr [R12 + RBX*0x8 + -0x8],RCX
MOV qword ptr [RAX],RDX
LEA RAX,[RBX + 0x1]
CMP qword ptr [RSP + 0x10],RBX
JZ 0x00105be6
MOV RBX,RAX
LEA R15,[RBX + -0x1]
MOV RSI,RBP
SUB RSI,RBX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x0010582a
LEA R14,[R15 + RAX*0x1]
MOV qword ptr [RSP + 0x18],R14
CMP byte ptr [RSP + 0x2f],0x0
JZ 0x00105afb
MOV qword ptr [RSP + 0x50],R15
MOV qword ptr [RSP + 0x58],0x0
MOV RSI,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00108ccf
MOV R13,RAX
MOV qword ptr [RSP + 0x40],R14
MOV qword ptr [RSP + 0x48],0x0
MOV RSI,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00108ccf
MOV R14,RAX
TEST R13,R13
JZ 0x00105aba
TEST R14,R14
JZ 0x00105ad3
MOV RAX,qword ptr [R13 + 0x8]
MOV RDX,qword ptr [R14 + 0x8]
MOV qword ptr [R13 + 0x8],RDX
MOV qword ptr [R14 + 0x8],RAX
MOV RSI,R13
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00108c7d
TEST RAX,RAX
JZ 0x00105af1
MOV RSI,R14
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00108c7d
TEST RAX,RAX
JZ 0x00105af6
MOV RAX,qword ptr [R13 + 0x8]
MOV qword ptr [R12 + RBX*0x8 + -0x8],RAX
JMP 0x00105b14
CMP byte ptr [RSP + 0x2f],0x0
JNZ 0x00105cd7
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,RCX
SHR RAX,0x3d
SETNZ AL
MOVZX EAX,AL
SHL RCX,0x3
MOV EDX,0x1
CMOVS RAX,RDX
TEST AL,AL
JNZ 0x00105c2a
MOV RSI,qword ptr [RSP + 0x10]
SHL RSI,0x3
MOV RDI,R12
CALL 0x0010704c
MOV R12,RAX
JMP 0x00105c35
CALL 0x00107233
MOV R12D,0x0
MOV RAX,R12
MOV RCX,qword ptr [RSP + 0x68]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x00105d6a
ADD RSP,0x78
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOV RAX,qword ptr [RSP + 0x10]
LEA RDI,[RAX + RAX*0x1]
MOV R8,qword ptr [0x0010ef98]
LEA RCX,[0x1059b6]
LEA RDX,[0x1059a7]
MOV ESI,0x0
CALL 0x0010868d
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x00105aab
MOV RDX,qword ptr [RSP + 0x10]
MOV RAX,RDX
SHR RAX,0x3d
SETNZ AL
MOVZX EAX,AL
SHL RDX,0x3
MOV EDX,0x1
CMOVS RAX,RDX
TEST AL,AL
JNZ 0x00105ab0
MOV RBX,qword ptr [RSP + 0x10]
LEA RDI,[RBX*0x8]
CALL 0x00106ff1
MOV R12,RAX
MOV byte ptr [RSP + 0x2f],0x1
TEST RBX,RBX
JNZ 0x00105d4c
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00108803
JMP 0x00105c35
MOV RAX,RBP
SHR RAX,0x3d
SETNZ AL
MOVZX EAX,AL
MOV RDX,RBP
SHL RDX,0x3
MOV EDX,0x1
CMOVS RAX,RDX
TEST AL,AL
JNZ 0x00105ab5
LEA RDI,[RBP*0x8]
CALL 0x00106ff1
MOV R12,RAX
TEST RBP,RBP
JZ 0x00105d32
MOV EAX,0x0
MOV qword ptr [R12 + RAX*0x8],RAX
ADD RAX,0x1
CMP RBP,RAX
JNZ 0x00105d25
MOV byte ptr [RSP + 0x2f],0x0
MOV qword ptr [RSP + 0x8],0x0
CMP qword ptr [RSP + 0x10],0x0
JZ 0x00105bf1
MOV EBX,0x1
LEA RAX,[RSP + 0x50]
MOV qword ptr [RSP + 0x30],RAX
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x38],RAX
JMP 0x00105b26
CALL 0x00102160
(translation_unit "undefined8 * FUN_001059f2(undefined8 param_1,ulong param_2,ulong param_3)\n\n{\n  bool bVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  long *plVar5;\n  long *plVar6;\n  long lVar7;\n  ulong uVar8;\n  long in_FS_OFFSET;\n  bool bVar9;\n  long local_a0;\n  long local_68 [3];\n  undefined8 local_50;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n    puVar2 = (undefined8 *)0x0;\n    goto LAB_00105c35;\n  }\n  if (param_2 == 1) {\n    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);\n    uVar3 = FUN_0010582a(param_1,param_3 - 1);\n    *puVar2 = uVar3;\n    goto LAB_00105c35;\n  }\n  if (param_3 < 0x20000) {\n    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\n    if (param_3 != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar1 = false;\n    local_a0 = 0;\n    if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);\n  }\n  else {\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }\nLAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "undefined8 * FUN_001059f2(undefined8 param_1,ulong param_2,ulong param_3)\n\n{\n  bool bVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  long *plVar5;\n  long *plVar6;\n  long lVar7;\n  ulong uVar8;\n  long in_FS_OFFSET;\n  bool bVar9;\n  long local_a0;\n  long local_68 [3];\n  undefined8 local_50;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n    puVar2 = (undefined8 *)0x0;\n    goto LAB_00105c35;\n  }\n  if (param_2 == 1) {\n    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);\n    uVar3 = FUN_0010582a(param_1,param_3 - 1);\n    *puVar2 = uVar3;\n    goto LAB_00105c35;\n  }\n  if (param_3 < 0x20000) {\n    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\n    if (param_3 != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar1 = false;\n    local_a0 = 0;\n    if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);\n  }\n  else {\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }\nLAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" type_identifier (pointer_declarator "* FUN_001059f2(undefined8 param_1,ulong param_2,ulong param_3)" * (function_declarator "FUN_001059f2(undefined8 param_1,ulong param_2,ulong param_3)" identifier (parameter_list "(undefined8 param_1,ulong param_2,ulong param_3)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "ulong param_3" type_identifier identifier) )))) (compound_statement "{\n  bool bVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  long *plVar5;\n  long *plVar6;\n  long lVar7;\n  ulong uVar8;\n  long in_FS_OFFSET;\n  bool bVar9;\n  long local_a0;\n  long local_68 [3];\n  undefined8 local_50;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n    puVar2 = (undefined8 *)0x0;\n    goto LAB_00105c35;\n  }\n  if (param_2 == 1) {\n    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);\n    uVar3 = FUN_0010582a(param_1,param_3 - 1);\n    *puVar2 = uVar3;\n    goto LAB_00105c35;\n  }\n  if (param_3 < 0x20000) {\n    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\n    if (param_3 != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar1 = false;\n    local_a0 = 0;\n    if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);\n  }\n  else {\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }\nLAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "undefined8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "long *plVar5;" (sized_type_specifier "long" long) (pointer_declarator "*plVar5" * identifier) ;) (declaration "long *plVar6;" (sized_type_specifier "long" long) (pointer_declarator "*plVar6" * identifier) ;) (declaration "long lVar7;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar8;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar9;" primitive_type identifier ;) (declaration "long local_a0;" (sized_type_specifier "long" long) identifier ;) (declaration "long local_68 [3];" (sized_type_specifier "long" long) (array_declarator "local_68 [3]" identifier [ number_literal ]) ;) (declaration "undefined8 local_50;" type_identifier identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (param_2 == 0) {\n    puVar2 = (undefined8 *)0x0;\n    goto LAB_00105c35;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar2 = (undefined8 *)0x0;\n    goto LAB_00105c35;\n  }" { (expression_statement "puVar2 = (undefined8 *)0x0;" (assignment_expression "puVar2 = (undefined8 *)0x0" identifier = (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (goto_statement "goto LAB_00105c35;" goto statement_identifier ;) })) (if_statement "if (param_2 == 1) {\n    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);\n    uVar3 = FUN_0010582a(param_1,param_3 - 1);\n    *puVar2 = uVar3;\n    goto LAB_00105c35;\n  }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);\n    uVar3 = FUN_0010582a(param_1,param_3 - 1);\n    *puVar2 = uVar3;\n    goto LAB_00105c35;\n  }" { (expression_statement "puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);" (assignment_expression "puVar2 = (undefined8 *)FUN_00106ff1(8,1,0)" identifier = (cast_expression "(undefined8 *)FUN_00106ff1(8,1,0)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00106ff1(8,1,0)" identifier (argument_list "(8,1,0)" ( number_literal , number_literal , number_literal ))))) ;) (expression_statement "uVar3 = FUN_0010582a(param_1,param_3 - 1);" (assignment_expression "uVar3 = FUN_0010582a(param_1,param_3 - 1)" identifier = (call_expression "FUN_0010582a(param_1,param_3 - 1)" identifier (argument_list "(param_1,param_3 - 1)" ( identifier , (binary_expression "param_3 - 1" identifier - number_literal) )))) ;) (expression_statement "*puVar2 = uVar3;" (assignment_expression "*puVar2 = uVar3" (pointer_expression "*puVar2" * identifier) = identifier) ;) (goto_statement "goto LAB_00105c35;" goto statement_identifier ;) })) (if_statement "if (param_3 < 0x20000) {\n    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\n    if (param_3 != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar1 = false;\n    local_a0 = 0;\n    if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);\n  }\n  else {\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }" if (parenthesized_expression "(param_3 < 0x20000)" ( (binary_expression "param_3 < 0x20000" identifier < number_literal) )) (compound_statement "{\n    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\n    if (param_3 != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar1 = false;\n    local_a0 = 0;\n    if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);\n  }" { (if_statement "if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }" if (parenthesized_expression "((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0)" ( (binary_expression "(long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0" (binary_expression "(long)(param_3 << 3) < 0" (cast_expression "(long)(param_3 << 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_3 << 3)" ( (binary_expression "param_3 << 3" identifier << number_literal) ))) < number_literal) || (binary_expression "param_3 >> 0x3d != 0" (binary_expression "param_3 >> 0x3d" identifier >> number_literal) != number_literal)) )) (compound_statement "{\nLAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }" { (labeled_statement "LAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();" statement_identifier : comment (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" identifier (argument_list "()" ( ))) ;)) })) (expression_statement "puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);" (assignment_expression "puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8)" identifier = (cast_expression "(undefined8 *)FUN_00106ff1(param_3 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00106ff1(param_3 * 8)" identifier (argument_list "(param_3 * 8)" ( (binary_expression "param_3 * 8" identifier * number_literal) ))))) ;) (if_statement "if (param_3 != 0) goto LAB_00105d20;" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00105d20;" goto statement_identifier ;)) (labeled_statement "LAB_00105d32:\n    bVar1 = false;" statement_identifier : (expression_statement "bVar1 = false;" (assignment_expression "bVar1 = false" identifier = false) ;)) (expression_statement "local_a0 = 0;" (assignment_expression "local_a0 = 0" identifier = number_literal) ;) (if_statement "if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }" { (labeled_statement "LAB_00105d4c:\n      uVar8 = 1;" statement_identifier : (expression_statement "uVar8 = 1;" (assignment_expression "uVar8 = 1" identifier = number_literal) ;)) (do_statement "do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);" do (compound_statement "{\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      }" { (expression_statement "lVar7 = uVar8 - 1;" (assignment_expression "lVar7 = uVar8 - 1" identifier = (binary_expression "uVar8 - 1" identifier - number_literal)) ;) (expression_statement "lVar4 = FUN_0010582a(param_1,param_3 - uVar8);" (assignment_expression "lVar4 = FUN_0010582a(param_1,param_3 - uVar8)" identifier = (call_expression "FUN_0010582a(param_1,param_3 - uVar8)" identifier (argument_list "(param_1,param_3 - uVar8)" ( identifier , (binary_expression "param_3 - uVar8" identifier - identifier) )))) ;) (expression_statement "lVar4 = lVar7 + lVar4;" (assignment_expression "lVar4 = lVar7 + lVar4" identifier = (binary_expression "lVar7 + lVar4" identifier + identifier)) ;) (if_statement "if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }" { (expression_statement "local_50 = 0;" (assignment_expression "local_50 = 0" identifier = number_literal) ;) (expression_statement "local_68[2] = lVar7;" (assignment_expression "local_68[2] = lVar7" (subscript_expression "local_68[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);" (assignment_expression "plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2)" identifier = (cast_expression "(long *)FUN_00108ccf(local_a0,local_68 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00108ccf(local_a0,local_68 + 2)" identifier (argument_list "(local_a0,local_68 + 2)" ( identifier , (binary_expression "local_68 + 2" identifier + number_literal) ))))) ;) (expression_statement "local_68[1] = 0;" (assignment_expression "local_68[1] = 0" (subscript_expression "local_68[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_68[0] = lVar4;" (assignment_expression "local_68[0] = lVar4" (subscript_expression "local_68[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "plVar6 = (long *)FUN_00108ccf(local_a0,local_68);" (assignment_expression "plVar6 = (long *)FUN_00108ccf(local_a0,local_68)" identifier = (cast_expression "(long *)FUN_00108ccf(local_a0,local_68)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00108ccf(local_a0,local_68)" identifier (argument_list "(local_a0,local_68)" ( identifier , identifier ))))) ;) (if_statement "if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }" if (parenthesized_expression "(plVar5 == (long *)0x0)" ( (binary_expression "plVar5 == (long *)0x0" identifier == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }" { (expression_statement "plVar5 = (long *)FUN_00106ff1(0x10);" (assignment_expression "plVar5 = (long *)FUN_00106ff1(0x10)" identifier = (cast_expression "(long *)FUN_00106ff1(0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00106ff1(0x10)" identifier (argument_list "(0x10)" ( number_literal ))))) ;) (expression_statement "plVar5[1] = lVar7;" (assignment_expression "plVar5[1] = lVar7" (subscript_expression "plVar5[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*plVar5 = lVar7;" (assignment_expression "*plVar5 = lVar7" (pointer_expression "*plVar5" * identifier) = identifier) ;) })) (if_statement "if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }" if (parenthesized_expression "(plVar6 == (long *)0x0)" ( (binary_expression "plVar6 == (long *)0x0" identifier == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }" { (expression_statement "plVar6 = (long *)FUN_00106ff1(0x10);" (assignment_expression "plVar6 = (long *)FUN_00106ff1(0x10)" identifier = (cast_expression "(long *)FUN_00106ff1(0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00106ff1(0x10)" identifier (argument_list "(0x10)" ( number_literal ))))) ;) (expression_statement "plVar6[1] = lVar4;" (assignment_expression "plVar6[1] = lVar4" (subscript_expression "plVar6[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*plVar6 = lVar4;" (assignment_expression "*plVar6 = lVar4" (pointer_expression "*plVar6" * identifier) = identifier) ;) })) (expression_statement "lVar7 = plVar5[1];" (assignment_expression "lVar7 = plVar5[1]" identifier = (subscript_expression "plVar5[1]" identifier [ number_literal ])) ;) (expression_statement "plVar5[1] = plVar6[1];" (assignment_expression "plVar5[1] = plVar6[1]" (subscript_expression "plVar5[1]" identifier [ number_literal ]) = (subscript_expression "plVar6[1]" identifier [ number_literal ])) ;) (expression_statement "plVar6[1] = lVar7;" (assignment_expression "plVar6[1] = lVar7" (subscript_expression "plVar6[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "lVar7 = FUN_00108c7d(local_a0,plVar5);" (assignment_expression "lVar7 = FUN_00108c7d(local_a0,plVar5)" identifier = (call_expression "FUN_00108c7d(local_a0,plVar5)" identifier (argument_list "(local_a0,plVar5)" ( identifier , identifier )))) ;) (if_statement "if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }" if (parenthesized_expression "(lVar7 == 0)" ( (binary_expression "lVar7 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }" { comment (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "lVar7 = FUN_00108c7d(local_a0,plVar6);" (assignment_expression "lVar7 = FUN_00108c7d(local_a0,plVar6)" identifier = (call_expression "FUN_00108c7d(local_a0,plVar6)" identifier (argument_list "(local_a0,plVar6)" ( identifier , identifier )))) ;) (if_statement "if (lVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }" if (parenthesized_expression "(lVar7 == 0)" ( (binary_expression "lVar7 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n            FUN_00107233();\n          }" { comment (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "puVar2[uVar8 - 1] = plVar5[1];" (assignment_expression "puVar2[uVar8 - 1] = plVar5[1]" (subscript_expression "puVar2[uVar8 - 1]" identifier [ (binary_expression "uVar8 - 1" identifier - number_literal) ]) = (subscript_expression "plVar5[1]" identifier [ number_literal ])) ;) }) (else_clause "else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }" else (compound_statement "{\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }" { (expression_statement "uVar3 = puVar2[uVar8 - 1];" (assignment_expression "uVar3 = puVar2[uVar8 - 1]" identifier = (subscript_expression "puVar2[uVar8 - 1]" identifier [ (binary_expression "uVar8 - 1" identifier - number_literal) ])) ;) (expression_statement "puVar2[uVar8 - 1] = puVar2[lVar4];" (assignment_expression "puVar2[uVar8 - 1] = puVar2[lVar4]" (subscript_expression "puVar2[uVar8 - 1]" identifier [ (binary_expression "uVar8 - 1" identifier - number_literal) ]) = (subscript_expression "puVar2[lVar4]" identifier [ identifier ])) ;) (expression_statement "puVar2[lVar4] = uVar3;" (assignment_expression "puVar2[lVar4] = uVar3" (subscript_expression "puVar2[lVar4]" identifier [ identifier ]) = identifier) ;) }))) (expression_statement "bVar9 = param_2 != uVar8;" (assignment_expression "bVar9 = param_2 != uVar8" identifier = (binary_expression "param_2 != uVar8" identifier != identifier)) ;) (expression_statement "uVar8 = uVar8 + 1;" (assignment_expression "uVar8 = uVar8 + 1" identifier = (binary_expression "uVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar9)" ( identifier )) ;) (if_statement "if (bVar1) goto LAB_00105cd7;" if (parenthesized_expression "(bVar1)" ( identifier )) (goto_statement "goto LAB_00105cd7;" goto statement_identifier ;)) })) (if_statement "if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }" if (parenthesized_expression "((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0)" ( (binary_expression "(long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0" (binary_expression "(long)(param_2 << 3) < 0" (cast_expression "(long)(param_2 << 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_2 << 3)" ( (binary_expression "param_2 << 3" identifier << number_literal) ))) < number_literal) || (binary_expression "param_2 >> 0x3d != 0" (binary_expression "param_2 >> 0x3d" identifier >> number_literal) != number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }" { comment (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);" (assignment_expression "puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3)" identifier = (cast_expression "(undefined8 *)FUN_0010704c(puVar2,param_2 << 3)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0010704c(puVar2,param_2 << 3)" identifier (argument_list "(puVar2,param_2 << 3)" ( identifier , (binary_expression "param_2 << 3" identifier << number_literal) ))))) ;) }) (else_clause "else {\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }" else (compound_statement "{\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }" { (if_statement "if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }" if (parenthesized_expression "(param_3 / param_2 < 0x20)" ( (binary_expression "param_3 / param_2 < 0x20" (binary_expression "param_3 / param_2" identifier / identifier) < number_literal) )) (compound_statement "{\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }" { (if_statement "if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;" if (parenthesized_expression "((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0)" ( (binary_expression "(long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0" (binary_expression "(long)(param_3 << 3) < 0" (cast_expression "(long)(param_3 << 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_3 << 3)" ( (binary_expression "param_3 << 3" identifier << number_literal) ))) < number_literal) || (binary_expression "param_3 >> 0x3d != 0" (binary_expression "param_3 >> 0x3d" identifier >> number_literal) != number_literal)) )) (goto_statement "goto LAB_00105ab5;" goto statement_identifier ;)) (expression_statement "puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);" (assignment_expression "puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8)" identifier = (cast_expression "(undefined8 *)FUN_00106ff1(param_3 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00106ff1(param_3 * 8)" identifier (argument_list "(param_3 * 8)" ( (binary_expression "param_3 * 8" identifier * number_literal) ))))) ;) (labeled_statement "LAB_00105d20:\n      uVar8 = 0;" statement_identifier : (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" identifier = number_literal) ;)) (do_statement "do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);" do (compound_statement "{\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      }" { (expression_statement "puVar2[uVar8] = uVar8;" (assignment_expression "puVar2[uVar8] = uVar8" (subscript_expression "puVar2[uVar8]" identifier [ identifier ]) = identifier) ;) (expression_statement "uVar8 = uVar8 + 1;" (assignment_expression "uVar8 = uVar8 + 1" identifier = (binary_expression "uVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_3 != uVar8)" ( (binary_expression "param_3 != uVar8" identifier != identifier) )) ;) (goto_statement "goto LAB_00105d32;" goto statement_identifier ;) })) (expression_statement "local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);" (assignment_expression "local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98)" identifier = (call_expression "FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98)" identifier (argument_list "(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98)" ( (binary_expression "param_2 * 2" identifier * number_literal) , number_literal , identifier , identifier , identifier )))) ;) (if_statement "if (local_a0 == 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }" if (parenthesized_expression "(local_a0 == 0)" ( (binary_expression "local_a0 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }" { comment (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }" if (parenthesized_expression "((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0)" ( (binary_expression "(long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0" (binary_expression "(long)(param_2 << 3) < 0" (cast_expression "(long)(param_2 << 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_2 << 3)" ( (binary_expression "param_2 << 3" identifier << number_literal) ))) < number_literal) || (binary_expression "param_2 >> 0x3d != 0" (binary_expression "param_2 >> 0x3d" identifier >> number_literal) != number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      FUN_00107233();\n    }" { comment (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);" (assignment_expression "puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8)" identifier = (cast_expression "(undefined8 *)FUN_00106ff1(param_2 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00106ff1(param_2 * 8)" identifier (argument_list "(param_2 * 8)" ( (binary_expression "param_2 * 8" identifier * number_literal) ))))) ;) (expression_statement "bVar1 = true;" (assignment_expression "bVar1 = true" identifier = true) ;) (if_statement "if (param_2 != 0) goto LAB_00105d4c;" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00105d4c;" goto statement_identifier ;)) (labeled_statement "LAB_00105cd7:\n    FUN_00108803(local_a0);" statement_identifier : (expression_statement "FUN_00108803(local_a0);" (call_expression "FUN_00108803(local_a0)" identifier (argument_list "(local_a0)" ( identifier ))) ;)) }))) (labeled_statement "LAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }" statement_identifier : (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return puVar2;\n  }" { (return_statement "return puVar2;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "size_t * randperm_new(randint_source *r,size_t h,size_t n)\n\n{\n  long lVar1;\n  long lVar2;\n  bool bVar3;\n  randint *p;\n  randint rVar4;\n  long *entry;\n  long *entry_00;\n  void *pvVar5;\n  size_t sVar6;\n  long in_FS_OFFSET;\n  bool bVar7;\n  Hash_table *local_a0;\n  long local_68 [3];\n  undefined8 local_50;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (h == 0) {\n    p = (randint *)0x0;\n    goto LAB_00105c35;\n  }\n  if (h == 1) {\n    p = (randint *)xmalloc(8);\n    rVar4 = randint_genmax(r,n - 1);\n    *p = rVar4;\n    goto LAB_00105c35;\n  }\n  if (n < 0x20000) {\n    if ((long)(n << 3) < 0 || n >> 0x3d != 0) {\nLAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xmalloc(n * 8);\n    if (n != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar3 = false;\n    local_a0 = (Hash_table *)0x0;\n    if (h != 0) {\nLAB_00105d4c:\n      sVar6 = 1;\n      do {\n        lVar1 = sVar6 - 1;\n        rVar4 = randint_genmax(r,n - sVar6);\n        lVar2 = lVar1 + rVar4;\n        if (bVar3) {\n          local_50 = 0;\n          local_68[2] = lVar1;\n          entry = (long *)hash_delete(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar2;\n          entry_00 = (long *)hash_delete(local_a0,local_68);\n          if (entry == (long *)0x0) {\n            entry = (long *)xmalloc(0x10);\n            entry[1] = lVar1;\n            *entry = lVar1;\n          }\n          if (entry_00 == (long *)0x0) {\n            entry_00 = (long *)xmalloc(0x10);\n            entry_00[1] = lVar2;\n            *entry_00 = lVar2;\n          }\n          lVar1 = entry[1];\n          entry[1] = entry_00[1];\n          entry_00[1] = lVar1;\n          pvVar5 = hash_insert(local_a0,entry);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          pvVar5 = hash_insert(local_a0,entry_00);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          p[sVar6 - 1] = entry[1];\n        }\n        else {\n          rVar4 = p[sVar6 - 1];\n          p[sVar6 - 1] = p[lVar2];\n          p[lVar2] = rVar4;\n        }\n        bVar7 = h != sVar6;\n        sVar6 = sVar6 + 1;\n      } while (bVar7);\n      if (bVar3) goto LAB_00105cd7;\n    }\n    if ((long)(h << 3) < 0 || h >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xrealloc(p,h << 3);\n  }\n  else {\n    if (n / h < 0x20) {\n      if ((long)(n << 3) < 0 || n >> 0x3d != 0) goto LAB_00105ab5;\n      p = (randint *)xmalloc(n * 8);\nLAB_00105d20:\n      rVar4 = 0;\n      do {\n        p[rVar4] = rVar4;\n        rVar4 = rVar4 + 1;\n      } while (n != rVar4);\n      goto LAB_00105d32;\n    }\n    local_a0 = hash_initialize(h * 2,(Hash_tuning *)0x0,sparse_hash_,sparse_cmp_,\n                               (Hash_data_freer)PTR_free_0010ef98);\n    if (local_a0 == (Hash_table *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    if ((long)(h << 3) < 0 || h >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xmalloc(h * 8);\n    bVar3 = true;\n    if (h != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    hash_free(local_a0);\n  }\nLAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return p;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "size_t * randperm_new(randint_source *r,size_t h,size_t n)\n\n{\n  long lVar1;\n  long lVar2;\n  bool bVar3;\n  randint *p;\n  randint rVar4;\n  long *entry;\n  long *entry_00;\n  void *pvVar5;\n  size_t sVar6;\n  long in_FS_OFFSET;\n  bool bVar7;\n  Hash_table *local_a0;\n  long local_68 [3];\n  undefined8 local_50;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (h == 0) {\n    p = (randint *)0x0;\n    goto LAB_00105c35;\n  }\n  if (h == 1) {\n    p = (randint *)xmalloc(8);\n    rVar4 = randint_genmax(r,n - 1);\n    *p = rVar4;\n    goto LAB_00105c35;\n  }\n  if (n < 0x20000) {\n    if ((long)(n << 3) < 0 || n >> 0x3d != 0) {\nLAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xmalloc(n * 8);\n    if (n != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar3 = false;\n    local_a0 = (Hash_table *)0x0;\n    if (h != 0) {\nLAB_00105d4c:\n      sVar6 = 1;\n      do {\n        lVar1 = sVar6 - 1;\n        rVar4 = randint_genmax(r,n - sVar6);\n        lVar2 = lVar1 + rVar4;\n        if (bVar3) {\n          local_50 = 0;\n          local_68[2] = lVar1;\n          entry = (long *)hash_delete(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar2;\n          entry_00 = (long *)hash_delete(local_a0,local_68);\n          if (entry == (long *)0x0) {\n            entry = (long *)xmalloc(0x10);\n            entry[1] = lVar1;\n            *entry = lVar1;\n          }\n          if (entry_00 == (long *)0x0) {\n            entry_00 = (long *)xmalloc(0x10);\n            entry_00[1] = lVar2;\n            *entry_00 = lVar2;\n          }\n          lVar1 = entry[1];\n          entry[1] = entry_00[1];\n          entry_00[1] = lVar1;\n          pvVar5 = hash_insert(local_a0,entry);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          pvVar5 = hash_insert(local_a0,entry_00);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          p[sVar6 - 1] = entry[1];\n        }\n        else {\n          rVar4 = p[sVar6 - 1];\n          p[sVar6 - 1] = p[lVar2];\n          p[lVar2] = rVar4;\n        }\n        bVar7 = h != sVar6;\n        sVar6 = sVar6 + 1;\n      } while (bVar7);\n      if (bVar3) goto LAB_00105cd7;\n    }\n    if ((long)(h << 3) < 0 || h >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xrealloc(p,h << 3);\n  }\n  else {\n    if (n / h < 0x20) {\n      if ((long)(n << 3) < 0 || n >> 0x3d != 0) goto LAB_00105ab5;\n      p = (randint *)xmalloc(n * 8);\nLAB_00105d20:\n      rVar4 = 0;\n      do {\n        p[rVar4] = rVar4;\n        rVar4 = rVar4 + 1;\n      } while (n != rVar4);\n      goto LAB_00105d32;\n    }\n    local_a0 = hash_initialize(h * 2,(Hash_tuning *)0x0,sparse_hash_,sparse_cmp_,\n                               (Hash_data_freer)PTR_free_0010ef98);\n    if (local_a0 == (Hash_table *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    if ((long)(h << 3) < 0 || h >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xmalloc(h * 8);\n    bVar3 = true;\n    if (h != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    hash_free(local_a0);\n  }\nLAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return p;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (pointer_declarator "* randperm_new(randint_source *r,size_t h,size_t n)" * (function_declarator "randperm_new(randint_source *r,size_t h,size_t n)" identifier (parameter_list "(randint_source *r,size_t h,size_t n)" ( (parameter_declaration "randint_source *r" type_identifier (pointer_declarator "*r" * identifier)) , (parameter_declaration "size_t h" primitive_type identifier) , (parameter_declaration "size_t n" primitive_type identifier) )))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  bool bVar3;\n  randint *p;\n  randint rVar4;\n  long *entry;\n  long *entry_00;\n  void *pvVar5;\n  size_t sVar6;\n  long in_FS_OFFSET;\n  bool bVar7;\n  Hash_table *local_a0;\n  long local_68 [3];\n  undefined8 local_50;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (h == 0) {\n    p = (randint *)0x0;\n    goto LAB_00105c35;\n  }\n  if (h == 1) {\n    p = (randint *)xmalloc(8);\n    rVar4 = randint_genmax(r,n - 1);\n    *p = rVar4;\n    goto LAB_00105c35;\n  }\n  if (n < 0x20000) {\n    if ((long)(n << 3) < 0 || n >> 0x3d != 0) {\nLAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xmalloc(n * 8);\n    if (n != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar3 = false;\n    local_a0 = (Hash_table *)0x0;\n    if (h != 0) {\nLAB_00105d4c:\n      sVar6 = 1;\n      do {\n        lVar1 = sVar6 - 1;\n        rVar4 = randint_genmax(r,n - sVar6);\n        lVar2 = lVar1 + rVar4;\n        if (bVar3) {\n          local_50 = 0;\n          local_68[2] = lVar1;\n          entry = (long *)hash_delete(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar2;\n          entry_00 = (long *)hash_delete(local_a0,local_68);\n          if (entry == (long *)0x0) {\n            entry = (long *)xmalloc(0x10);\n            entry[1] = lVar1;\n            *entry = lVar1;\n          }\n          if (entry_00 == (long *)0x0) {\n            entry_00 = (long *)xmalloc(0x10);\n            entry_00[1] = lVar2;\n            *entry_00 = lVar2;\n          }\n          lVar1 = entry[1];\n          entry[1] = entry_00[1];\n          entry_00[1] = lVar1;\n          pvVar5 = hash_insert(local_a0,entry);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          pvVar5 = hash_insert(local_a0,entry_00);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          p[sVar6 - 1] = entry[1];\n        }\n        else {\n          rVar4 = p[sVar6 - 1];\n          p[sVar6 - 1] = p[lVar2];\n          p[lVar2] = rVar4;\n        }\n        bVar7 = h != sVar6;\n        sVar6 = sVar6 + 1;\n      } while (bVar7);\n      if (bVar3) goto LAB_00105cd7;\n    }\n    if ((long)(h << 3) < 0 || h >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xrealloc(p,h << 3);\n  }\n  else {\n    if (n / h < 0x20) {\n      if ((long)(n << 3) < 0 || n >> 0x3d != 0) goto LAB_00105ab5;\n      p = (randint *)xmalloc(n * 8);\nLAB_00105d20:\n      rVar4 = 0;\n      do {\n        p[rVar4] = rVar4;\n        rVar4 = rVar4 + 1;\n      } while (n != rVar4);\n      goto LAB_00105d32;\n    }\n    local_a0 = hash_initialize(h * 2,(Hash_tuning *)0x0,sparse_hash_,sparse_cmp_,\n                               (Hash_data_freer)PTR_free_0010ef98);\n    if (local_a0 == (Hash_table *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    if ((long)(h << 3) < 0 || h >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xmalloc(h * 8);\n    bVar3 = true;\n    if (h != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    hash_free(local_a0);\n  }\nLAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return p;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "randint *p;" type_identifier (pointer_declarator "*p" * identifier) ;) (declaration "randint rVar4;" type_identifier identifier ;) (declaration "long *entry;" (sized_type_specifier "long" long) (pointer_declarator "*entry" * identifier) ;) (declaration "long *entry_00;" (sized_type_specifier "long" long) (pointer_declarator "*entry_00" * identifier) ;) (declaration "void *pvVar5;" primitive_type (pointer_declarator "*pvVar5" * identifier) ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "Hash_table *local_a0;" type_identifier (pointer_declarator "*local_a0" * identifier) ;) (declaration "long local_68 [3];" (sized_type_specifier "long" long) (array_declarator "local_68 [3]" identifier [ number_literal ]) ;) (declaration "undefined8 local_50;" type_identifier identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (h == 0) {\n    p = (randint *)0x0;\n    goto LAB_00105c35;\n  }" if (parenthesized_expression "(h == 0)" ( (binary_expression "h == 0" identifier == number_literal) )) (compound_statement "{\n    p = (randint *)0x0;\n    goto LAB_00105c35;\n  }" { (expression_statement "p = (randint *)0x0;" (assignment_expression "p = (randint *)0x0" identifier = (cast_expression "(randint *)0x0" ( (type_descriptor "randint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (goto_statement "goto LAB_00105c35;" goto statement_identifier ;) })) (if_statement "if (h == 1) {\n    p = (randint *)xmalloc(8);\n    rVar4 = randint_genmax(r,n - 1);\n    *p = rVar4;\n    goto LAB_00105c35;\n  }" if (parenthesized_expression "(h == 1)" ( (binary_expression "h == 1" identifier == number_literal) )) (compound_statement "{\n    p = (randint *)xmalloc(8);\n    rVar4 = randint_genmax(r,n - 1);\n    *p = rVar4;\n    goto LAB_00105c35;\n  }" { (expression_statement "p = (randint *)xmalloc(8);" (assignment_expression "p = (randint *)xmalloc(8)" identifier = (cast_expression "(randint *)xmalloc(8)" ( (type_descriptor "randint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(8)" identifier (argument_list "(8)" ( number_literal ))))) ;) (expression_statement "rVar4 = randint_genmax(r,n - 1);" (assignment_expression "rVar4 = randint_genmax(r,n - 1)" identifier = (call_expression "randint_genmax(r,n - 1)" identifier (argument_list "(r,n - 1)" ( identifier , (binary_expression "n - 1" identifier - number_literal) )))) ;) (expression_statement "*p = rVar4;" (assignment_expression "*p = rVar4" (pointer_expression "*p" * identifier) = identifier) ;) (goto_statement "goto LAB_00105c35;" goto statement_identifier ;) })) (if_statement "if (n < 0x20000) {\n    if ((long)(n << 3) < 0 || n >> 0x3d != 0) {\nLAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xmalloc(n * 8);\n    if (n != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar3 = false;\n    local_a0 = (Hash_table *)0x0;\n    if (h != 0) {\nLAB_00105d4c:\n      sVar6 = 1;\n      do {\n        lVar1 = sVar6 - 1;\n        rVar4 = randint_genmax(r,n - sVar6);\n        lVar2 = lVar1 + rVar4;\n        if (bVar3) {\n          local_50 = 0;\n          local_68[2] = lVar1;\n          entry = (long *)hash_delete(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar2;\n          entry_00 = (long *)hash_delete(local_a0,local_68);\n          if (entry == (long *)0x0) {\n            entry = (long *)xmalloc(0x10);\n            entry[1] = lVar1;\n            *entry = lVar1;\n          }\n          if (entry_00 == (long *)0x0) {\n            entry_00 = (long *)xmalloc(0x10);\n            entry_00[1] = lVar2;\n            *entry_00 = lVar2;\n          }\n          lVar1 = entry[1];\n          entry[1] = entry_00[1];\n          entry_00[1] = lVar1;\n          pvVar5 = hash_insert(local_a0,entry);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          pvVar5 = hash_insert(local_a0,entry_00);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          p[sVar6 - 1] = entry[1];\n        }\n        else {\n          rVar4 = p[sVar6 - 1];\n          p[sVar6 - 1] = p[lVar2];\n          p[lVar2] = rVar4;\n        }\n        bVar7 = h != sVar6;\n        sVar6 = sVar6 + 1;\n      } while (bVar7);\n      if (bVar3) goto LAB_00105cd7;\n    }\n    if ((long)(h << 3) < 0 || h >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xrealloc(p,h << 3);\n  }\n  else {\n    if (n / h < 0x20) {\n      if ((long)(n << 3) < 0 || n >> 0x3d != 0) goto LAB_00105ab5;\n      p = (randint *)xmalloc(n * 8);\nLAB_00105d20:\n      rVar4 = 0;\n      do {\n        p[rVar4] = rVar4;\n        rVar4 = rVar4 + 1;\n      } while (n != rVar4);\n      goto LAB_00105d32;\n    }\n    local_a0 = hash_initialize(h * 2,(Hash_tuning *)0x0,sparse_hash_,sparse_cmp_,\n                               (Hash_data_freer)PTR_free_0010ef98);\n    if (local_a0 == (Hash_table *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    if ((long)(h << 3) < 0 || h >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xmalloc(h * 8);\n    bVar3 = true;\n    if (h != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    hash_free(local_a0);\n  }" if (parenthesized_expression "(n < 0x20000)" ( (binary_expression "n < 0x20000" identifier < number_literal) )) (compound_statement "{\n    if ((long)(n << 3) < 0 || n >> 0x3d != 0) {\nLAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xmalloc(n * 8);\n    if (n != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar3 = false;\n    local_a0 = (Hash_table *)0x0;\n    if (h != 0) {\nLAB_00105d4c:\n      sVar6 = 1;\n      do {\n        lVar1 = sVar6 - 1;\n        rVar4 = randint_genmax(r,n - sVar6);\n        lVar2 = lVar1 + rVar4;\n        if (bVar3) {\n          local_50 = 0;\n          local_68[2] = lVar1;\n          entry = (long *)hash_delete(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar2;\n          entry_00 = (long *)hash_delete(local_a0,local_68);\n          if (entry == (long *)0x0) {\n            entry = (long *)xmalloc(0x10);\n            entry[1] = lVar1;\n            *entry = lVar1;\n          }\n          if (entry_00 == (long *)0x0) {\n            entry_00 = (long *)xmalloc(0x10);\n            entry_00[1] = lVar2;\n            *entry_00 = lVar2;\n          }\n          lVar1 = entry[1];\n          entry[1] = entry_00[1];\n          entry_00[1] = lVar1;\n          pvVar5 = hash_insert(local_a0,entry);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          pvVar5 = hash_insert(local_a0,entry_00);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          p[sVar6 - 1] = entry[1];\n        }\n        else {\n          rVar4 = p[sVar6 - 1];\n          p[sVar6 - 1] = p[lVar2];\n          p[lVar2] = rVar4;\n        }\n        bVar7 = h != sVar6;\n        sVar6 = sVar6 + 1;\n      } while (bVar7);\n      if (bVar3) goto LAB_00105cd7;\n    }\n    if ((long)(h << 3) < 0 || h >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xrealloc(p,h << 3);\n  }" { (if_statement "if ((long)(n << 3) < 0 || n >> 0x3d != 0) {\nLAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }" if (parenthesized_expression "((long)(n << 3) < 0 || n >> 0x3d != 0)" ( (binary_expression "(long)(n << 3) < 0 || n >> 0x3d != 0" (binary_expression "(long)(n << 3) < 0" (cast_expression "(long)(n << 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(n << 3)" ( (binary_expression "n << 3" identifier << number_literal) ))) < number_literal) || (binary_expression "n >> 0x3d != 0" (binary_expression "n >> 0x3d" identifier >> number_literal) != number_literal)) )) (compound_statement "{\nLAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }" { (labeled_statement "LAB_00105ab5:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();" statement_identifier : comment (expression_statement "xalloc_die();" (call_expression "xalloc_die()" identifier (argument_list "()" ( ))) ;)) })) (expression_statement "p = (randint *)xmalloc(n * 8);" (assignment_expression "p = (randint *)xmalloc(n * 8)" identifier = (cast_expression "(randint *)xmalloc(n * 8)" ( (type_descriptor "randint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(n * 8)" identifier (argument_list "(n * 8)" ( (binary_expression "n * 8" identifier * number_literal) ))))) ;) (if_statement "if (n != 0) goto LAB_00105d20;" if (parenthesized_expression "(n != 0)" ( (binary_expression "n != 0" identifier != number_literal) )) (goto_statement "goto LAB_00105d20;" goto statement_identifier ;)) (labeled_statement "LAB_00105d32:\n    bVar3 = false;" statement_identifier : (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;)) (expression_statement "local_a0 = (Hash_table *)0x0;" (assignment_expression "local_a0 = (Hash_table *)0x0" identifier = (cast_expression "(Hash_table *)0x0" ( (type_descriptor "Hash_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (h != 0) {\nLAB_00105d4c:\n      sVar6 = 1;\n      do {\n        lVar1 = sVar6 - 1;\n        rVar4 = randint_genmax(r,n - sVar6);\n        lVar2 = lVar1 + rVar4;\n        if (bVar3) {\n          local_50 = 0;\n          local_68[2] = lVar1;\n          entry = (long *)hash_delete(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar2;\n          entry_00 = (long *)hash_delete(local_a0,local_68);\n          if (entry == (long *)0x0) {\n            entry = (long *)xmalloc(0x10);\n            entry[1] = lVar1;\n            *entry = lVar1;\n          }\n          if (entry_00 == (long *)0x0) {\n            entry_00 = (long *)xmalloc(0x10);\n            entry_00[1] = lVar2;\n            *entry_00 = lVar2;\n          }\n          lVar1 = entry[1];\n          entry[1] = entry_00[1];\n          entry_00[1] = lVar1;\n          pvVar5 = hash_insert(local_a0,entry);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          pvVar5 = hash_insert(local_a0,entry_00);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          p[sVar6 - 1] = entry[1];\n        }\n        else {\n          rVar4 = p[sVar6 - 1];\n          p[sVar6 - 1] = p[lVar2];\n          p[lVar2] = rVar4;\n        }\n        bVar7 = h != sVar6;\n        sVar6 = sVar6 + 1;\n      } while (bVar7);\n      if (bVar3) goto LAB_00105cd7;\n    }" if (parenthesized_expression "(h != 0)" ( (binary_expression "h != 0" identifier != number_literal) )) (compound_statement "{\nLAB_00105d4c:\n      sVar6 = 1;\n      do {\n        lVar1 = sVar6 - 1;\n        rVar4 = randint_genmax(r,n - sVar6);\n        lVar2 = lVar1 + rVar4;\n        if (bVar3) {\n          local_50 = 0;\n          local_68[2] = lVar1;\n          entry = (long *)hash_delete(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar2;\n          entry_00 = (long *)hash_delete(local_a0,local_68);\n          if (entry == (long *)0x0) {\n            entry = (long *)xmalloc(0x10);\n            entry[1] = lVar1;\n            *entry = lVar1;\n          }\n          if (entry_00 == (long *)0x0) {\n            entry_00 = (long *)xmalloc(0x10);\n            entry_00[1] = lVar2;\n            *entry_00 = lVar2;\n          }\n          lVar1 = entry[1];\n          entry[1] = entry_00[1];\n          entry_00[1] = lVar1;\n          pvVar5 = hash_insert(local_a0,entry);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          pvVar5 = hash_insert(local_a0,entry_00);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          p[sVar6 - 1] = entry[1];\n        }\n        else {\n          rVar4 = p[sVar6 - 1];\n          p[sVar6 - 1] = p[lVar2];\n          p[lVar2] = rVar4;\n        }\n        bVar7 = h != sVar6;\n        sVar6 = sVar6 + 1;\n      } while (bVar7);\n      if (bVar3) goto LAB_00105cd7;\n    }" { (labeled_statement "LAB_00105d4c:\n      sVar6 = 1;" statement_identifier : (expression_statement "sVar6 = 1;" (assignment_expression "sVar6 = 1" identifier = number_literal) ;)) (do_statement "do {\n        lVar1 = sVar6 - 1;\n        rVar4 = randint_genmax(r,n - sVar6);\n        lVar2 = lVar1 + rVar4;\n        if (bVar3) {\n          local_50 = 0;\n          local_68[2] = lVar1;\n          entry = (long *)hash_delete(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar2;\n          entry_00 = (long *)hash_delete(local_a0,local_68);\n          if (entry == (long *)0x0) {\n            entry = (long *)xmalloc(0x10);\n            entry[1] = lVar1;\n            *entry = lVar1;\n          }\n          if (entry_00 == (long *)0x0) {\n            entry_00 = (long *)xmalloc(0x10);\n            entry_00[1] = lVar2;\n            *entry_00 = lVar2;\n          }\n          lVar1 = entry[1];\n          entry[1] = entry_00[1];\n          entry_00[1] = lVar1;\n          pvVar5 = hash_insert(local_a0,entry);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          pvVar5 = hash_insert(local_a0,entry_00);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          p[sVar6 - 1] = entry[1];\n        }\n        else {\n          rVar4 = p[sVar6 - 1];\n          p[sVar6 - 1] = p[lVar2];\n          p[lVar2] = rVar4;\n        }\n        bVar7 = h != sVar6;\n        sVar6 = sVar6 + 1;\n      } while (bVar7);" do (compound_statement "{\n        lVar1 = sVar6 - 1;\n        rVar4 = randint_genmax(r,n - sVar6);\n        lVar2 = lVar1 + rVar4;\n        if (bVar3) {\n          local_50 = 0;\n          local_68[2] = lVar1;\n          entry = (long *)hash_delete(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar2;\n          entry_00 = (long *)hash_delete(local_a0,local_68);\n          if (entry == (long *)0x0) {\n            entry = (long *)xmalloc(0x10);\n            entry[1] = lVar1;\n            *entry = lVar1;\n          }\n          if (entry_00 == (long *)0x0) {\n            entry_00 = (long *)xmalloc(0x10);\n            entry_00[1] = lVar2;\n            *entry_00 = lVar2;\n          }\n          lVar1 = entry[1];\n          entry[1] = entry_00[1];\n          entry_00[1] = lVar1;\n          pvVar5 = hash_insert(local_a0,entry);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          pvVar5 = hash_insert(local_a0,entry_00);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          p[sVar6 - 1] = entry[1];\n        }\n        else {\n          rVar4 = p[sVar6 - 1];\n          p[sVar6 - 1] = p[lVar2];\n          p[lVar2] = rVar4;\n        }\n        bVar7 = h != sVar6;\n        sVar6 = sVar6 + 1;\n      }" { (expression_statement "lVar1 = sVar6 - 1;" (assignment_expression "lVar1 = sVar6 - 1" identifier = (binary_expression "sVar6 - 1" identifier - number_literal)) ;) (expression_statement "rVar4 = randint_genmax(r,n - sVar6);" (assignment_expression "rVar4 = randint_genmax(r,n - sVar6)" identifier = (call_expression "randint_genmax(r,n - sVar6)" identifier (argument_list "(r,n - sVar6)" ( identifier , (binary_expression "n - sVar6" identifier - identifier) )))) ;) (expression_statement "lVar2 = lVar1 + rVar4;" (assignment_expression "lVar2 = lVar1 + rVar4" identifier = (binary_expression "lVar1 + rVar4" identifier + identifier)) ;) (if_statement "if (bVar3) {\n          local_50 = 0;\n          local_68[2] = lVar1;\n          entry = (long *)hash_delete(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar2;\n          entry_00 = (long *)hash_delete(local_a0,local_68);\n          if (entry == (long *)0x0) {\n            entry = (long *)xmalloc(0x10);\n            entry[1] = lVar1;\n            *entry = lVar1;\n          }\n          if (entry_00 == (long *)0x0) {\n            entry_00 = (long *)xmalloc(0x10);\n            entry_00[1] = lVar2;\n            *entry_00 = lVar2;\n          }\n          lVar1 = entry[1];\n          entry[1] = entry_00[1];\n          entry_00[1] = lVar1;\n          pvVar5 = hash_insert(local_a0,entry);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          pvVar5 = hash_insert(local_a0,entry_00);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          p[sVar6 - 1] = entry[1];\n        }\n        else {\n          rVar4 = p[sVar6 - 1];\n          p[sVar6 - 1] = p[lVar2];\n          p[lVar2] = rVar4;\n        }" if (parenthesized_expression "(bVar3)" ( identifier )) (compound_statement "{\n          local_50 = 0;\n          local_68[2] = lVar1;\n          entry = (long *)hash_delete(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar2;\n          entry_00 = (long *)hash_delete(local_a0,local_68);\n          if (entry == (long *)0x0) {\n            entry = (long *)xmalloc(0x10);\n            entry[1] = lVar1;\n            *entry = lVar1;\n          }\n          if (entry_00 == (long *)0x0) {\n            entry_00 = (long *)xmalloc(0x10);\n            entry_00[1] = lVar2;\n            *entry_00 = lVar2;\n          }\n          lVar1 = entry[1];\n          entry[1] = entry_00[1];\n          entry_00[1] = lVar1;\n          pvVar5 = hash_insert(local_a0,entry);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          pvVar5 = hash_insert(local_a0,entry_00);\n          if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }\n          p[sVar6 - 1] = entry[1];\n        }" { (expression_statement "local_50 = 0;" (assignment_expression "local_50 = 0" identifier = number_literal) ;) (expression_statement "local_68[2] = lVar1;" (assignment_expression "local_68[2] = lVar1" (subscript_expression "local_68[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "entry = (long *)hash_delete(local_a0,local_68 + 2);" (assignment_expression "entry = (long *)hash_delete(local_a0,local_68 + 2)" identifier = (cast_expression "(long *)hash_delete(local_a0,local_68 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (call_expression "hash_delete(local_a0,local_68 + 2)" identifier (argument_list "(local_a0,local_68 + 2)" ( identifier , (binary_expression "local_68 + 2" identifier + number_literal) ))))) ;) (expression_statement "local_68[1] = 0;" (assignment_expression "local_68[1] = 0" (subscript_expression "local_68[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_68[0] = lVar2;" (assignment_expression "local_68[0] = lVar2" (subscript_expression "local_68[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "entry_00 = (long *)hash_delete(local_a0,local_68);" (assignment_expression "entry_00 = (long *)hash_delete(local_a0,local_68)" identifier = (cast_expression "(long *)hash_delete(local_a0,local_68)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (call_expression "hash_delete(local_a0,local_68)" identifier (argument_list "(local_a0,local_68)" ( identifier , identifier ))))) ;) (if_statement "if (entry == (long *)0x0) {\n            entry = (long *)xmalloc(0x10);\n            entry[1] = lVar1;\n            *entry = lVar1;\n          }" if (parenthesized_expression "(entry == (long *)0x0)" ( (binary_expression "entry == (long *)0x0" identifier == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            entry = (long *)xmalloc(0x10);\n            entry[1] = lVar1;\n            *entry = lVar1;\n          }" { (expression_statement "entry = (long *)xmalloc(0x10);" (assignment_expression "entry = (long *)xmalloc(0x10)" identifier = (cast_expression "(long *)xmalloc(0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x10)" identifier (argument_list "(0x10)" ( number_literal ))))) ;) (expression_statement "entry[1] = lVar1;" (assignment_expression "entry[1] = lVar1" (subscript_expression "entry[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*entry = lVar1;" (assignment_expression "*entry = lVar1" (pointer_expression "*entry" * identifier) = identifier) ;) })) (if_statement "if (entry_00 == (long *)0x0) {\n            entry_00 = (long *)xmalloc(0x10);\n            entry_00[1] = lVar2;\n            *entry_00 = lVar2;\n          }" if (parenthesized_expression "(entry_00 == (long *)0x0)" ( (binary_expression "entry_00 == (long *)0x0" identifier == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            entry_00 = (long *)xmalloc(0x10);\n            entry_00[1] = lVar2;\n            *entry_00 = lVar2;\n          }" { (expression_statement "entry_00 = (long *)xmalloc(0x10);" (assignment_expression "entry_00 = (long *)xmalloc(0x10)" identifier = (cast_expression "(long *)xmalloc(0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x10)" identifier (argument_list "(0x10)" ( number_literal ))))) ;) (expression_statement "entry_00[1] = lVar2;" (assignment_expression "entry_00[1] = lVar2" (subscript_expression "entry_00[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*entry_00 = lVar2;" (assignment_expression "*entry_00 = lVar2" (pointer_expression "*entry_00" * identifier) = identifier) ;) })) (expression_statement "lVar1 = entry[1];" (assignment_expression "lVar1 = entry[1]" identifier = (subscript_expression "entry[1]" identifier [ number_literal ])) ;) (expression_statement "entry[1] = entry_00[1];" (assignment_expression "entry[1] = entry_00[1]" (subscript_expression "entry[1]" identifier [ number_literal ]) = (subscript_expression "entry_00[1]" identifier [ number_literal ])) ;) (expression_statement "entry_00[1] = lVar1;" (assignment_expression "entry_00[1] = lVar1" (subscript_expression "entry_00[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "pvVar5 = hash_insert(local_a0,entry);" (assignment_expression "pvVar5 = hash_insert(local_a0,entry)" identifier = (call_expression "hash_insert(local_a0,entry)" identifier (argument_list "(local_a0,entry)" ( identifier , identifier )))) ;) (if_statement "if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }" if (parenthesized_expression "(pvVar5 == (void *)0x0)" ( (binary_expression "pvVar5 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }" { comment (expression_statement "xalloc_die();" (call_expression "xalloc_die()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "pvVar5 = hash_insert(local_a0,entry_00);" (assignment_expression "pvVar5 = hash_insert(local_a0,entry_00)" identifier = (call_expression "hash_insert(local_a0,entry_00)" identifier (argument_list "(local_a0,entry_00)" ( identifier , identifier )))) ;) (if_statement "if (pvVar5 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }" if (parenthesized_expression "(pvVar5 == (void *)0x0)" ( (binary_expression "pvVar5 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n            xalloc_die();\n          }" { comment (expression_statement "xalloc_die();" (call_expression "xalloc_die()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "p[sVar6 - 1] = entry[1];" (assignment_expression "p[sVar6 - 1] = entry[1]" (subscript_expression "p[sVar6 - 1]" identifier [ (binary_expression "sVar6 - 1" identifier - number_literal) ]) = (subscript_expression "entry[1]" identifier [ number_literal ])) ;) }) (else_clause "else {\n          rVar4 = p[sVar6 - 1];\n          p[sVar6 - 1] = p[lVar2];\n          p[lVar2] = rVar4;\n        }" else (compound_statement "{\n          rVar4 = p[sVar6 - 1];\n          p[sVar6 - 1] = p[lVar2];\n          p[lVar2] = rVar4;\n        }" { (expression_statement "rVar4 = p[sVar6 - 1];" (assignment_expression "rVar4 = p[sVar6 - 1]" identifier = (subscript_expression "p[sVar6 - 1]" identifier [ (binary_expression "sVar6 - 1" identifier - number_literal) ])) ;) (expression_statement "p[sVar6 - 1] = p[lVar2];" (assignment_expression "p[sVar6 - 1] = p[lVar2]" (subscript_expression "p[sVar6 - 1]" identifier [ (binary_expression "sVar6 - 1" identifier - number_literal) ]) = (subscript_expression "p[lVar2]" identifier [ identifier ])) ;) (expression_statement "p[lVar2] = rVar4;" (assignment_expression "p[lVar2] = rVar4" (subscript_expression "p[lVar2]" identifier [ identifier ]) = identifier) ;) }))) (expression_statement "bVar7 = h != sVar6;" (assignment_expression "bVar7 = h != sVar6" identifier = (binary_expression "h != sVar6" identifier != identifier)) ;) (expression_statement "sVar6 = sVar6 + 1;" (assignment_expression "sVar6 = sVar6 + 1" identifier = (binary_expression "sVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar7)" ( identifier )) ;) (if_statement "if (bVar3) goto LAB_00105cd7;" if (parenthesized_expression "(bVar3)" ( identifier )) (goto_statement "goto LAB_00105cd7;" goto statement_identifier ;)) })) (if_statement "if ((long)(h << 3) < 0 || h >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }" if (parenthesized_expression "((long)(h << 3) < 0 || h >> 0x3d != 0)" ( (binary_expression "(long)(h << 3) < 0 || h >> 0x3d != 0" (binary_expression "(long)(h << 3) < 0" (cast_expression "(long)(h << 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(h << 3)" ( (binary_expression "h << 3" identifier << number_literal) ))) < number_literal) || (binary_expression "h >> 0x3d != 0" (binary_expression "h >> 0x3d" identifier >> number_literal) != number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }" { comment (expression_statement "xalloc_die();" (call_expression "xalloc_die()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "p = (randint *)xrealloc(p,h << 3);" (assignment_expression "p = (randint *)xrealloc(p,h << 3)" identifier = (cast_expression "(randint *)xrealloc(p,h << 3)" ( (type_descriptor "randint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xrealloc(p,h << 3)" identifier (argument_list "(p,h << 3)" ( identifier , (binary_expression "h << 3" identifier << number_literal) ))))) ;) }) (else_clause "else {\n    if (n / h < 0x20) {\n      if ((long)(n << 3) < 0 || n >> 0x3d != 0) goto LAB_00105ab5;\n      p = (randint *)xmalloc(n * 8);\nLAB_00105d20:\n      rVar4 = 0;\n      do {\n        p[rVar4] = rVar4;\n        rVar4 = rVar4 + 1;\n      } while (n != rVar4);\n      goto LAB_00105d32;\n    }\n    local_a0 = hash_initialize(h * 2,(Hash_tuning *)0x0,sparse_hash_,sparse_cmp_,\n                               (Hash_data_freer)PTR_free_0010ef98);\n    if (local_a0 == (Hash_table *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    if ((long)(h << 3) < 0 || h >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xmalloc(h * 8);\n    bVar3 = true;\n    if (h != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    hash_free(local_a0);\n  }" else (compound_statement "{\n    if (n / h < 0x20) {\n      if ((long)(n << 3) < 0 || n >> 0x3d != 0) goto LAB_00105ab5;\n      p = (randint *)xmalloc(n * 8);\nLAB_00105d20:\n      rVar4 = 0;\n      do {\n        p[rVar4] = rVar4;\n        rVar4 = rVar4 + 1;\n      } while (n != rVar4);\n      goto LAB_00105d32;\n    }\n    local_a0 = hash_initialize(h * 2,(Hash_tuning *)0x0,sparse_hash_,sparse_cmp_,\n                               (Hash_data_freer)PTR_free_0010ef98);\n    if (local_a0 == (Hash_table *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    if ((long)(h << 3) < 0 || h >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    p = (randint *)xmalloc(h * 8);\n    bVar3 = true;\n    if (h != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    hash_free(local_a0);\n  }" { (if_statement "if (n / h < 0x20) {\n      if ((long)(n << 3) < 0 || n >> 0x3d != 0) goto LAB_00105ab5;\n      p = (randint *)xmalloc(n * 8);\nLAB_00105d20:\n      rVar4 = 0;\n      do {\n        p[rVar4] = rVar4;\n        rVar4 = rVar4 + 1;\n      } while (n != rVar4);\n      goto LAB_00105d32;\n    }" if (parenthesized_expression "(n / h < 0x20)" ( (binary_expression "n / h < 0x20" (binary_expression "n / h" identifier / identifier) < number_literal) )) (compound_statement "{\n      if ((long)(n << 3) < 0 || n >> 0x3d != 0) goto LAB_00105ab5;\n      p = (randint *)xmalloc(n * 8);\nLAB_00105d20:\n      rVar4 = 0;\n      do {\n        p[rVar4] = rVar4;\n        rVar4 = rVar4 + 1;\n      } while (n != rVar4);\n      goto LAB_00105d32;\n    }" { (if_statement "if ((long)(n << 3) < 0 || n >> 0x3d != 0) goto LAB_00105ab5;" if (parenthesized_expression "((long)(n << 3) < 0 || n >> 0x3d != 0)" ( (binary_expression "(long)(n << 3) < 0 || n >> 0x3d != 0" (binary_expression "(long)(n << 3) < 0" (cast_expression "(long)(n << 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(n << 3)" ( (binary_expression "n << 3" identifier << number_literal) ))) < number_literal) || (binary_expression "n >> 0x3d != 0" (binary_expression "n >> 0x3d" identifier >> number_literal) != number_literal)) )) (goto_statement "goto LAB_00105ab5;" goto statement_identifier ;)) (expression_statement "p = (randint *)xmalloc(n * 8);" (assignment_expression "p = (randint *)xmalloc(n * 8)" identifier = (cast_expression "(randint *)xmalloc(n * 8)" ( (type_descriptor "randint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(n * 8)" identifier (argument_list "(n * 8)" ( (binary_expression "n * 8" identifier * number_literal) ))))) ;) (labeled_statement "LAB_00105d20:\n      rVar4 = 0;" statement_identifier : (expression_statement "rVar4 = 0;" (assignment_expression "rVar4 = 0" identifier = number_literal) ;)) (do_statement "do {\n        p[rVar4] = rVar4;\n        rVar4 = rVar4 + 1;\n      } while (n != rVar4);" do (compound_statement "{\n        p[rVar4] = rVar4;\n        rVar4 = rVar4 + 1;\n      }" { (expression_statement "p[rVar4] = rVar4;" (assignment_expression "p[rVar4] = rVar4" (subscript_expression "p[rVar4]" identifier [ identifier ]) = identifier) ;) (expression_statement "rVar4 = rVar4 + 1;" (assignment_expression "rVar4 = rVar4 + 1" identifier = (binary_expression "rVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(n != rVar4)" ( (binary_expression "n != rVar4" identifier != identifier) )) ;) (goto_statement "goto LAB_00105d32;" goto statement_identifier ;) })) (expression_statement "local_a0 = hash_initialize(h * 2,(Hash_tuning *)0x0,sparse_hash_,sparse_cmp_,\n                               (Hash_data_freer)PTR_free_0010ef98);" (assignment_expression "local_a0 = hash_initialize(h * 2,(Hash_tuning *)0x0,sparse_hash_,sparse_cmp_,\n                               (Hash_data_freer)PTR_free_0010ef98)" identifier = (call_expression "hash_initialize(h * 2,(Hash_tuning *)0x0,sparse_hash_,sparse_cmp_,\n                               (Hash_data_freer)PTR_free_0010ef98)" identifier (argument_list "(h * 2,(Hash_tuning *)0x0,sparse_hash_,sparse_cmp_,\n                               (Hash_data_freer)PTR_free_0010ef98)" ( (binary_expression "h * 2" identifier * number_literal) , (cast_expression "(Hash_tuning *)0x0" ( (type_descriptor "Hash_tuning *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , identifier , (cast_expression "(Hash_data_freer)PTR_free_0010ef98" ( (type_descriptor "Hash_data_freer" type_identifier) ) identifier) )))) ;) (if_statement "if (local_a0 == (Hash_table *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }" if (parenthesized_expression "(local_a0 == (Hash_table *)0x0)" ( (binary_expression "local_a0 == (Hash_table *)0x0" identifier == (cast_expression "(Hash_table *)0x0" ( (type_descriptor "Hash_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }" { comment (expression_statement "xalloc_die();" (call_expression "xalloc_die()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if ((long)(h << 3) < 0 || h >> 0x3d != 0) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }" if (parenthesized_expression "((long)(h << 3) < 0 || h >> 0x3d != 0)" ( (binary_expression "(long)(h << 3) < 0 || h >> 0x3d != 0" (binary_expression "(long)(h << 3) < 0" (cast_expression "(long)(h << 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(h << 3)" ( (binary_expression "h << 3" identifier << number_literal) ))) < number_literal) || (binary_expression "h >> 0x3d != 0" (binary_expression "h >> 0x3d" identifier >> number_literal) != number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }" { comment (expression_statement "xalloc_die();" (call_expression "xalloc_die()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "p = (randint *)xmalloc(h * 8);" (assignment_expression "p = (randint *)xmalloc(h * 8)" identifier = (cast_expression "(randint *)xmalloc(h * 8)" ( (type_descriptor "randint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(h * 8)" identifier (argument_list "(h * 8)" ( (binary_expression "h * 8" identifier * number_literal) ))))) ;) (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" identifier = true) ;) (if_statement "if (h != 0) goto LAB_00105d4c;" if (parenthesized_expression "(h != 0)" ( (binary_expression "h != 0" identifier != number_literal) )) (goto_statement "goto LAB_00105d4c;" goto statement_identifier ;)) (labeled_statement "LAB_00105cd7:\n    hash_free(local_a0);" statement_identifier : (expression_statement "hash_free(local_a0);" (call_expression "hash_free(local_a0)" identifier (argument_list "(local_a0)" ( identifier ))) ;)) }))) (labeled_statement "LAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return p;\n  }" statement_identifier : (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return p;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return p;\n  }" { (return_statement "return p;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined8 * FUN_001059f2(undefined8 param_1,ulong param_2,ulong param_3)\n\n{\n  bool bVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  long *plVar5;\n  long *plVar6;\n  long lVar7;\n  ulong uVar8;\n  long in_FS_OFFSET;\n  bool bVar9;\n  long local_a0;\n  long local_68 [3];\n  undefined8 local_50;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n    puVar2 = (undefined8 *)0x0;\n    goto LAB_00105c35;\n  }\n  if (param_2 == 1) {\n    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);\n    uVar3 = FUN_0010582a(param_1,param_3 - 1);\n    *puVar2 = uVar3;\n    goto LAB_00105c35;\n  }\n  if (param_3 < 0x20000) {\n    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\n    if (param_3 != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar1 = false;\n    local_a0 = 0;\n    if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);\n  }\n  else {\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    \n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }\nLAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "undefined8 * FUN_001059f2(undefined8 param_1,ulong param_2,ulong param_3)\n\n{\n  bool bVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  long *plVar5;\n  long *plVar6;\n  long lVar7;\n  ulong uVar8;\n  long in_FS_OFFSET;\n  bool bVar9;\n  long local_a0;\n  long local_68 [3];\n  undefined8 local_50;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n    puVar2 = (undefined8 *)0x0;\n    goto LAB_00105c35;\n  }\n  if (param_2 == 1) {\n    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);\n    uVar3 = FUN_0010582a(param_1,param_3 - 1);\n    *puVar2 = uVar3;\n    goto LAB_00105c35;\n  }\n  if (param_3 < 0x20000) {\n    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\n    if (param_3 != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar1 = false;\n    local_a0 = 0;\n    if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);\n  }\n  else {\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    \n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }\nLAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    \n  __stack_chk_fail();\n}" type_identifier (pointer_declarator "* FUN_001059f2(undefined8 param_1,ulong param_2,ulong param_3)" * (function_declarator "FUN_001059f2(undefined8 param_1,ulong param_2,ulong param_3)" identifier (parameter_list "(undefined8 param_1,ulong param_2,ulong param_3)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "ulong param_3" type_identifier identifier) )))) (compound_statement "{\n  bool bVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  long *plVar5;\n  long *plVar6;\n  long lVar7;\n  ulong uVar8;\n  long in_FS_OFFSET;\n  bool bVar9;\n  long local_a0;\n  long local_68 [3];\n  undefined8 local_50;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n    puVar2 = (undefined8 *)0x0;\n    goto LAB_00105c35;\n  }\n  if (param_2 == 1) {\n    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);\n    uVar3 = FUN_0010582a(param_1,param_3 - 1);\n    *puVar2 = uVar3;\n    goto LAB_00105c35;\n  }\n  if (param_3 < 0x20000) {\n    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\n    if (param_3 != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar1 = false;\n    local_a0 = 0;\n    if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);\n  }\n  else {\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    \n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }\nLAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "undefined8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "long *plVar5;" (sized_type_specifier "long" long) (pointer_declarator "*plVar5" * identifier) ;) (declaration "long *plVar6;" (sized_type_specifier "long" long) (pointer_declarator "*plVar6" * identifier) ;) (declaration "long lVar7;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar8;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar9;" primitive_type identifier ;) (declaration "long local_a0;" (sized_type_specifier "long" long) identifier ;) (declaration "long local_68 [3];" (sized_type_specifier "long" long) (array_declarator "local_68 [3]" identifier [ number_literal ]) ;) (declaration "undefined8 local_50;" type_identifier identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (param_2 == 0) {\n    puVar2 = (undefined8 *)0x0;\n    goto LAB_00105c35;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar2 = (undefined8 *)0x0;\n    goto LAB_00105c35;\n  }" { (expression_statement "puVar2 = (undefined8 *)0x0;" (assignment_expression "puVar2 = (undefined8 *)0x0" identifier = (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (goto_statement "goto LAB_00105c35;" goto statement_identifier ;) })) (if_statement "if (param_2 == 1) {\n    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);\n    uVar3 = FUN_0010582a(param_1,param_3 - 1);\n    *puVar2 = uVar3;\n    goto LAB_00105c35;\n  }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);\n    uVar3 = FUN_0010582a(param_1,param_3 - 1);\n    *puVar2 = uVar3;\n    goto LAB_00105c35;\n  }" { (expression_statement "puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);" (assignment_expression "puVar2 = (undefined8 *)FUN_00106ff1(8,1,0)" identifier = (cast_expression "(undefined8 *)FUN_00106ff1(8,1,0)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00106ff1(8,1,0)" identifier (argument_list "(8,1,0)" ( number_literal , number_literal , number_literal ))))) ;) (expression_statement "uVar3 = FUN_0010582a(param_1,param_3 - 1);" (assignment_expression "uVar3 = FUN_0010582a(param_1,param_3 - 1)" identifier = (call_expression "FUN_0010582a(param_1,param_3 - 1)" identifier (argument_list "(param_1,param_3 - 1)" ( identifier , (binary_expression "param_3 - 1" identifier - number_literal) )))) ;) (expression_statement "*puVar2 = uVar3;" (assignment_expression "*puVar2 = uVar3" (pointer_expression "*puVar2" * identifier) = identifier) ;) (goto_statement "goto LAB_00105c35;" goto statement_identifier ;) })) (if_statement "if (param_3 < 0x20000) {\n    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\n    if (param_3 != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar1 = false;\n    local_a0 = 0;\n    if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);\n  }\n  else {\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    \n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }" if (parenthesized_expression "(param_3 < 0x20000)" ( (binary_expression "param_3 < 0x20000" identifier < number_literal) )) (compound_statement "{\n    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\n    if (param_3 != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar1 = false;\n    local_a0 = 0;\n    if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);\n  }" { (if_statement "if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    \n      FUN_00107233();\n    }" if (parenthesized_expression "((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0)" ( (binary_expression "(long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0" (binary_expression "(long)(param_3 << 3) < 0" (cast_expression "(long)(param_3 << 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_3 << 3)" ( (binary_expression "param_3 << 3" identifier << number_literal) ))) < number_literal) || (binary_expression "param_3 >> 0x3d != 0" (binary_expression "param_3 >> 0x3d" identifier >> number_literal) != number_literal)) )) (compound_statement "{\nLAB_00105ab5:\n                    \n      FUN_00107233();\n    }" { (labeled_statement "LAB_00105ab5:\n                    \n      FUN_00107233();" statement_identifier : (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" identifier (argument_list "()" ( ))) ;)) })) (expression_statement "puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);" (assignment_expression "puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8)" identifier = (cast_expression "(undefined8 *)FUN_00106ff1(param_3 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00106ff1(param_3 * 8)" identifier (argument_list "(param_3 * 8)" ( (binary_expression "param_3 * 8" identifier * number_literal) ))))) ;) (if_statement "if (param_3 != 0) goto LAB_00105d20;" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00105d20;" goto statement_identifier ;)) (labeled_statement "LAB_00105d32:\n    bVar1 = false;" statement_identifier : (expression_statement "bVar1 = false;" (assignment_expression "bVar1 = false" identifier = false) ;)) (expression_statement "local_a0 = 0;" (assignment_expression "local_a0 = 0" identifier = number_literal) ;) (if_statement "if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }" { (labeled_statement "LAB_00105d4c:\n      uVar8 = 1;" statement_identifier : (expression_statement "uVar8 = 1;" (assignment_expression "uVar8 = 1" identifier = number_literal) ;)) (do_statement "do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);" do (compound_statement "{\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      }" { (expression_statement "lVar7 = uVar8 - 1;" (assignment_expression "lVar7 = uVar8 - 1" identifier = (binary_expression "uVar8 - 1" identifier - number_literal)) ;) (expression_statement "lVar4 = FUN_0010582a(param_1,param_3 - uVar8);" (assignment_expression "lVar4 = FUN_0010582a(param_1,param_3 - uVar8)" identifier = (call_expression "FUN_0010582a(param_1,param_3 - uVar8)" identifier (argument_list "(param_1,param_3 - uVar8)" ( identifier , (binary_expression "param_3 - uVar8" identifier - identifier) )))) ;) (expression_statement "lVar4 = lVar7 + lVar4;" (assignment_expression "lVar4 = lVar7 + lVar4" identifier = (binary_expression "lVar7 + lVar4" identifier + identifier)) ;) (if_statement "if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }" { (expression_statement "local_50 = 0;" (assignment_expression "local_50 = 0" identifier = number_literal) ;) (expression_statement "local_68[2] = lVar7;" (assignment_expression "local_68[2] = lVar7" (subscript_expression "local_68[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);" (assignment_expression "plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2)" identifier = (cast_expression "(long *)FUN_00108ccf(local_a0,local_68 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00108ccf(local_a0,local_68 + 2)" identifier (argument_list "(local_a0,local_68 + 2)" ( identifier , (binary_expression "local_68 + 2" identifier + number_literal) ))))) ;) (expression_statement "local_68[1] = 0;" (assignment_expression "local_68[1] = 0" (subscript_expression "local_68[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_68[0] = lVar4;" (assignment_expression "local_68[0] = lVar4" (subscript_expression "local_68[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "plVar6 = (long *)FUN_00108ccf(local_a0,local_68);" (assignment_expression "plVar6 = (long *)FUN_00108ccf(local_a0,local_68)" identifier = (cast_expression "(long *)FUN_00108ccf(local_a0,local_68)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00108ccf(local_a0,local_68)" identifier (argument_list "(local_a0,local_68)" ( identifier , identifier ))))) ;) (if_statement "if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }" if (parenthesized_expression "(plVar5 == (long *)0x0)" ( (binary_expression "plVar5 == (long *)0x0" identifier == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }" { (expression_statement "plVar5 = (long *)FUN_00106ff1(0x10);" (assignment_expression "plVar5 = (long *)FUN_00106ff1(0x10)" identifier = (cast_expression "(long *)FUN_00106ff1(0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00106ff1(0x10)" identifier (argument_list "(0x10)" ( number_literal ))))) ;) (expression_statement "plVar5[1] = lVar7;" (assignment_expression "plVar5[1] = lVar7" (subscript_expression "plVar5[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*plVar5 = lVar7;" (assignment_expression "*plVar5 = lVar7" (pointer_expression "*plVar5" * identifier) = identifier) ;) })) (if_statement "if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }" if (parenthesized_expression "(plVar6 == (long *)0x0)" ( (binary_expression "plVar6 == (long *)0x0" identifier == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }" { (expression_statement "plVar6 = (long *)FUN_00106ff1(0x10);" (assignment_expression "plVar6 = (long *)FUN_00106ff1(0x10)" identifier = (cast_expression "(long *)FUN_00106ff1(0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00106ff1(0x10)" identifier (argument_list "(0x10)" ( number_literal ))))) ;) (expression_statement "plVar6[1] = lVar4;" (assignment_expression "plVar6[1] = lVar4" (subscript_expression "plVar6[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*plVar6 = lVar4;" (assignment_expression "*plVar6 = lVar4" (pointer_expression "*plVar6" * identifier) = identifier) ;) })) (expression_statement "lVar7 = plVar5[1];" (assignment_expression "lVar7 = plVar5[1]" identifier = (subscript_expression "plVar5[1]" identifier [ number_literal ])) ;) (expression_statement "plVar5[1] = plVar6[1];" (assignment_expression "plVar5[1] = plVar6[1]" (subscript_expression "plVar5[1]" identifier [ number_literal ]) = (subscript_expression "plVar6[1]" identifier [ number_literal ])) ;) (expression_statement "plVar6[1] = lVar7;" (assignment_expression "plVar6[1] = lVar7" (subscript_expression "plVar6[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "lVar7 = FUN_00108c7d(local_a0,plVar5);" (assignment_expression "lVar7 = FUN_00108c7d(local_a0,plVar5)" identifier = (call_expression "FUN_00108c7d(local_a0,plVar5)" identifier (argument_list "(local_a0,plVar5)" ( identifier , identifier )))) ;) (if_statement "if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }" if (parenthesized_expression "(lVar7 == 0)" ( (binary_expression "lVar7 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n            FUN_00107233();\n          }" { (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "lVar7 = FUN_00108c7d(local_a0,plVar6);" (assignment_expression "lVar7 = FUN_00108c7d(local_a0,plVar6)" identifier = (call_expression "FUN_00108c7d(local_a0,plVar6)" identifier (argument_list "(local_a0,plVar6)" ( identifier , identifier )))) ;) (if_statement "if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }" if (parenthesized_expression "(lVar7 == 0)" ( (binary_expression "lVar7 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n            FUN_00107233();\n          }" { (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "puVar2[uVar8 - 1] = plVar5[1];" (assignment_expression "puVar2[uVar8 - 1] = plVar5[1]" (subscript_expression "puVar2[uVar8 - 1]" identifier [ (binary_expression "uVar8 - 1" identifier - number_literal) ]) = (subscript_expression "plVar5[1]" identifier [ number_literal ])) ;) }) (else_clause "else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }" else (compound_statement "{\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }" { (expression_statement "uVar3 = puVar2[uVar8 - 1];" (assignment_expression "uVar3 = puVar2[uVar8 - 1]" identifier = (subscript_expression "puVar2[uVar8 - 1]" identifier [ (binary_expression "uVar8 - 1" identifier - number_literal) ])) ;) (expression_statement "puVar2[uVar8 - 1] = puVar2[lVar4];" (assignment_expression "puVar2[uVar8 - 1] = puVar2[lVar4]" (subscript_expression "puVar2[uVar8 - 1]" identifier [ (binary_expression "uVar8 - 1" identifier - number_literal) ]) = (subscript_expression "puVar2[lVar4]" identifier [ identifier ])) ;) (expression_statement "puVar2[lVar4] = uVar3;" (assignment_expression "puVar2[lVar4] = uVar3" (subscript_expression "puVar2[lVar4]" identifier [ identifier ]) = identifier) ;) }))) (expression_statement "bVar9 = param_2 != uVar8;" (assignment_expression "bVar9 = param_2 != uVar8" identifier = (binary_expression "param_2 != uVar8" identifier != identifier)) ;) (expression_statement "uVar8 = uVar8 + 1;" (assignment_expression "uVar8 = uVar8 + 1" identifier = (binary_expression "uVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar9)" ( identifier )) ;) (if_statement "if (bVar1) goto LAB_00105cd7;" if (parenthesized_expression "(bVar1)" ( identifier )) (goto_statement "goto LAB_00105cd7;" goto statement_identifier ;)) })) (if_statement "if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }" if (parenthesized_expression "((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0)" ( (binary_expression "(long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0" (binary_expression "(long)(param_2 << 3) < 0" (cast_expression "(long)(param_2 << 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_2 << 3)" ( (binary_expression "param_2 << 3" identifier << number_literal) ))) < number_literal) || (binary_expression "param_2 >> 0x3d != 0" (binary_expression "param_2 >> 0x3d" identifier >> number_literal) != number_literal)) )) (compound_statement "{\n                    \n      FUN_00107233();\n    }" { (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);" (assignment_expression "puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3)" identifier = (cast_expression "(undefined8 *)FUN_0010704c(puVar2,param_2 << 3)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0010704c(puVar2,param_2 << 3)" identifier (argument_list "(puVar2,param_2 << 3)" ( identifier , (binary_expression "param_2 << 3" identifier << number_literal) ))))) ;) }) (else_clause "else {\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    \n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }" else (compound_statement "{\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    \n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }" { (if_statement "if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }" if (parenthesized_expression "(param_3 / param_2 < 0x20)" ( (binary_expression "param_3 / param_2 < 0x20" (binary_expression "param_3 / param_2" identifier / identifier) < number_literal) )) (compound_statement "{\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }" { (if_statement "if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;" if (parenthesized_expression "((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0)" ( (binary_expression "(long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0" (binary_expression "(long)(param_3 << 3) < 0" (cast_expression "(long)(param_3 << 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_3 << 3)" ( (binary_expression "param_3 << 3" identifier << number_literal) ))) < number_literal) || (binary_expression "param_3 >> 0x3d != 0" (binary_expression "param_3 >> 0x3d" identifier >> number_literal) != number_literal)) )) (goto_statement "goto LAB_00105ab5;" goto statement_identifier ;)) (expression_statement "puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);" (assignment_expression "puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8)" identifier = (cast_expression "(undefined8 *)FUN_00106ff1(param_3 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00106ff1(param_3 * 8)" identifier (argument_list "(param_3 * 8)" ( (binary_expression "param_3 * 8" identifier * number_literal) ))))) ;) (labeled_statement "LAB_00105d20:\n      uVar8 = 0;" statement_identifier : (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" identifier = number_literal) ;)) (do_statement "do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);" do (compound_statement "{\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      }" { (expression_statement "puVar2[uVar8] = uVar8;" (assignment_expression "puVar2[uVar8] = uVar8" (subscript_expression "puVar2[uVar8]" identifier [ identifier ]) = identifier) ;) (expression_statement "uVar8 = uVar8 + 1;" (assignment_expression "uVar8 = uVar8 + 1" identifier = (binary_expression "uVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_3 != uVar8)" ( (binary_expression "param_3 != uVar8" identifier != identifier) )) ;) (goto_statement "goto LAB_00105d32;" goto statement_identifier ;) })) (expression_statement "local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);" (assignment_expression "local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98)" identifier = (call_expression "FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98)" identifier (argument_list "(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98)" ( (binary_expression "param_2 * 2" identifier * number_literal) , number_literal , identifier , identifier , identifier )))) ;) (if_statement "if (local_a0 == 0) {\n                    \n      FUN_00107233();\n    }" if (parenthesized_expression "(local_a0 == 0)" ( (binary_expression "local_a0 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n      FUN_00107233();\n    }" { (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }" if (parenthesized_expression "((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0)" ( (binary_expression "(long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0" (binary_expression "(long)(param_2 << 3) < 0" (cast_expression "(long)(param_2 << 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(param_2 << 3)" ( (binary_expression "param_2 << 3" identifier << number_literal) ))) < number_literal) || (binary_expression "param_2 >> 0x3d != 0" (binary_expression "param_2 >> 0x3d" identifier >> number_literal) != number_literal)) )) (compound_statement "{\n                    \n      FUN_00107233();\n    }" { (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);" (assignment_expression "puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8)" identifier = (cast_expression "(undefined8 *)FUN_00106ff1(param_2 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00106ff1(param_2 * 8)" identifier (argument_list "(param_2 * 8)" ( (binary_expression "param_2 * 8" identifier * number_literal) ))))) ;) (expression_statement "bVar1 = true;" (assignment_expression "bVar1 = true" identifier = true) ;) (if_statement "if (param_2 != 0) goto LAB_00105d4c;" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00105d4c;" goto statement_identifier ;)) (labeled_statement "LAB_00105cd7:\n    FUN_00108803(local_a0);" statement_identifier : (expression_statement "FUN_00108803(local_a0);" (call_expression "FUN_00108803(local_a0)" identifier (argument_list "(local_a0)" ( identifier ))) ;)) }))) (labeled_statement "LAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }" statement_identifier : (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return puVar2;\n  }" { (return_statement "return puVar2;" return identifier ;) }))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT - LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT << LIT) ))) < LIT) || (binary_expression (binary_expression IDENT >> LIT) != LIT)) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( ))) ;)) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT * LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = BOOL) ;)) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (labeled_statement statement_identifier : (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 = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT - IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression IDENT - LIT) ]) = (subscript_expression IDENT [ LIT ])) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (binary_expression IDENT - LIT) ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression IDENT - LIT) ]) = (subscript_expression IDENT [ IDENT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = IDENT) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT != IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( IDENT )) ;) (if_statement if (parenthesized_expression ( IDENT )) (goto_statement goto statement_identifier ;)) })) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT << LIT) ))) < LIT) || (binary_expression (binary_expression IDENT >> LIT) != LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT << LIT) ))))) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT / IDENT) < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT << LIT) ))) < LIT) || (binary_expression (binary_expression IDENT >> LIT) != LIT)) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT * LIT) ))))) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (do_statement do (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT * LIT) , LIT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT << LIT) ))) < LIT) || (binary_expression (binary_expression IDENT >> LIT) != LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT * LIT) ))))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) }))) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined8 * FUN_001059f2(undefined8 param_1,ulong param_2,ulong param_3)\n\n{\n  bool bVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  long *plVar5;\n  long *plVar6;\n  long lVar7;\n  ulong uVar8;\n  long in_FS_OFFSET;\n  bool bVar9;\n  long local_a0;\n  long local_68 [3];\n  undefined8 local_50;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n    puVar2 = (undefined8 *)0x0;\n    goto LAB_00105c35;\n  }\n  if (param_2 == 1) {\n    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);\n    uVar3 = FUN_0010582a(param_1,param_3 - 1);\n    *puVar2 = uVar3;\n    goto LAB_00105c35;\n  }\n  if (param_3 < 0x20000) {\n    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\n    if (param_3 != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar1 = false;\n    local_a0 = 0;\n    if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);\n  }\n  else {\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    \n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }\nLAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    \n  __stack_chk_fail();\n}" (type_identifier "undefined8") (pointer_declarator "* FUN_001059f2(undefined8 param_1,ulong param_2,ulong param_3)" (* "*") (function_declarator "FUN_001059f2(undefined8 param_1,ulong param_2,ulong param_3)" (identifier "FUN_001059f2") (parameter_list "(undefined8 param_1,ulong param_2,ulong param_3)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "ulong param_2" (type_identifier "ulong") (identifier "param_2")) (, ",") (parameter_declaration "ulong param_3" (type_identifier "ulong") (identifier "param_3")) () ")")))) (compound_statement "{\n  bool bVar1;\n  undefined8 *puVar2;\n  undefined8 uVar3;\n  long lVar4;\n  long *plVar5;\n  long *plVar6;\n  long lVar7;\n  ulong uVar8;\n  long in_FS_OFFSET;\n  bool bVar9;\n  long local_a0;\n  long local_68 [3];\n  undefined8 local_50;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0) {\n    puVar2 = (undefined8 *)0x0;\n    goto LAB_00105c35;\n  }\n  if (param_2 == 1) {\n    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);\n    uVar3 = FUN_0010582a(param_1,param_3 - 1);\n    *puVar2 = uVar3;\n    goto LAB_00105c35;\n  }\n  if (param_3 < 0x20000) {\n    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\n    if (param_3 != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar1 = false;\n    local_a0 = 0;\n    if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);\n  }\n  else {\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    \n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }\nLAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "bool bVar1;" (primitive_type "bool") (identifier "bVar1") (; ";")) (declaration "undefined8 *puVar2;" (type_identifier "undefined8") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined8 uVar3;" (type_identifier "undefined8") (identifier "uVar3") (; ";")) (declaration "long lVar4;" (sized_type_specifier "long" (long "long")) (identifier "lVar4") (; ";")) (declaration "long *plVar5;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar5" (* "*") (identifier "plVar5")) (; ";")) (declaration "long *plVar6;" (sized_type_specifier "long" (long "long")) (pointer_declarator "*plVar6" (* "*") (identifier "plVar6")) (; ";")) (declaration "long lVar7;" (sized_type_specifier "long" (long "long")) (identifier "lVar7") (; ";")) (declaration "ulong uVar8;" (type_identifier "ulong") (identifier "uVar8") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "bool bVar9;" (primitive_type "bool") (identifier "bVar9") (; ";")) (declaration "long local_a0;" (sized_type_specifier "long" (long "long")) (identifier "local_a0") (; ";")) (declaration "long local_68 [3];" (sized_type_specifier "long" (long "long")) (array_declarator "local_68 [3]" (identifier "local_68") ([ "[") (number_literal "3") (] "]")) (; ";")) (declaration "undefined8 local_50;" (type_identifier "undefined8") (identifier "local_50") (; ";")) (declaration "long local_40;" (sized_type_specifier "long" (long "long")) (identifier "local_40") (; ";")) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (if_statement "if (param_2 == 0) {\n    puVar2 = (undefined8 *)0x0;\n    goto LAB_00105c35;\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    puVar2 = (undefined8 *)0x0;\n    goto LAB_00105c35;\n  }" ({ "{") (expression_statement "puVar2 = (undefined8 *)0x0;" (assignment_expression "puVar2 = (undefined8 *)0x0" (identifier "puVar2") (= "=") (cast_expression "(undefined8 *)0x0" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (goto_statement "goto LAB_00105c35;" (goto "goto") (statement_identifier "LAB_00105c35") (; ";")) (} "}"))) (if_statement "if (param_2 == 1) {\n    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);\n    uVar3 = FUN_0010582a(param_1,param_3 - 1);\n    *puVar2 = uVar3;\n    goto LAB_00105c35;\n  }" (if "if") (parenthesized_expression "(param_2 == 1)" (( "(") (binary_expression "param_2 == 1" (identifier "param_2") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);\n    uVar3 = FUN_0010582a(param_1,param_3 - 1);\n    *puVar2 = uVar3;\n    goto LAB_00105c35;\n  }" ({ "{") (expression_statement "puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);" (assignment_expression "puVar2 = (undefined8 *)FUN_00106ff1(8,1,0)" (identifier "puVar2") (= "=") (cast_expression "(undefined8 *)FUN_00106ff1(8,1,0)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00106ff1(8,1,0)" (identifier "FUN_00106ff1") (argument_list "(8,1,0)" (( "(") (number_literal "8") (, ",") (number_literal "1") (, ",") (number_literal "0") () ")"))))) (; ";")) (expression_statement "uVar3 = FUN_0010582a(param_1,param_3 - 1);" (assignment_expression "uVar3 = FUN_0010582a(param_1,param_3 - 1)" (identifier "uVar3") (= "=") (call_expression "FUN_0010582a(param_1,param_3 - 1)" (identifier "FUN_0010582a") (argument_list "(param_1,param_3 - 1)" (( "(") (identifier "param_1") (, ",") (binary_expression "param_3 - 1" (identifier "param_3") (- "-") (number_literal "1")) () ")")))) (; ";")) (expression_statement "*puVar2 = uVar3;" (assignment_expression "*puVar2 = uVar3" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (identifier "uVar3")) (; ";")) (goto_statement "goto LAB_00105c35;" (goto "goto") (statement_identifier "LAB_00105c35") (; ";")) (} "}"))) (if_statement "if (param_3 < 0x20000) {\n    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\n    if (param_3 != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar1 = false;\n    local_a0 = 0;\n    if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);\n  }\n  else {\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    \n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }" (if "if") (parenthesized_expression "(param_3 < 0x20000)" (( "(") (binary_expression "param_3 < 0x20000" (identifier "param_3") (< "<") (number_literal "0x20000")) () ")")) (compound_statement "{\n    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\n    if (param_3 != 0) goto LAB_00105d20;\nLAB_00105d32:\n    bVar1 = false;\n    local_a0 = 0;\n    if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);\n  }" ({ "{") (if_statement "if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {\nLAB_00105ab5:\n                    \n      FUN_00107233();\n    }" (if "if") (parenthesized_expression "((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0)" (( "(") (binary_expression "(long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0" (binary_expression "(long)(param_3 << 3) < 0" (cast_expression "(long)(param_3 << 3)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(param_3 << 3)" (( "(") (binary_expression "param_3 << 3" (identifier "param_3") (<< "<<") (number_literal "3")) () ")"))) (< "<") (number_literal "0")) (|| "||") (binary_expression "param_3 >> 0x3d != 0" (binary_expression "param_3 >> 0x3d" (identifier "param_3") (>> ">>") (number_literal "0x3d")) (!= "!=") (number_literal "0"))) () ")")) (compound_statement "{\nLAB_00105ab5:\n                    \n      FUN_00107233();\n    }" ({ "{") (labeled_statement "LAB_00105ab5:\n                    \n      FUN_00107233();" (statement_identifier "LAB_00105ab5") (: ":") (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" (identifier "FUN_00107233") (argument_list "()" (( "(") () ")"))) (; ";"))) (} "}"))) (expression_statement "puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);" (assignment_expression "puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8)" (identifier "puVar2") (= "=") (cast_expression "(undefined8 *)FUN_00106ff1(param_3 * 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00106ff1(param_3 * 8)" (identifier "FUN_00106ff1") (argument_list "(param_3 * 8)" (( "(") (binary_expression "param_3 * 8" (identifier "param_3") (* "*") (number_literal "8")) () ")"))))) (; ";")) (if_statement "if (param_3 != 0) goto LAB_00105d20;" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00105d20;" (goto "goto") (statement_identifier "LAB_00105d20") (; ";"))) (labeled_statement "LAB_00105d32:\n    bVar1 = false;" (statement_identifier "LAB_00105d32") (: ":") (expression_statement "bVar1 = false;" (assignment_expression "bVar1 = false" (identifier "bVar1") (= "=") (false "false")) (; ";"))) (expression_statement "local_a0 = 0;" (assignment_expression "local_a0 = 0" (identifier "local_a0") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_2 != 0) {\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\nLAB_00105d4c:\n      uVar8 = 1;\n      do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);\n      if (bVar1) goto LAB_00105cd7;\n    }" ({ "{") (labeled_statement "LAB_00105d4c:\n      uVar8 = 1;" (statement_identifier "LAB_00105d4c") (: ":") (expression_statement "uVar8 = 1;" (assignment_expression "uVar8 = 1" (identifier "uVar8") (= "=") (number_literal "1")) (; ";"))) (do_statement "do {\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      } while (bVar9);" (do "do") (compound_statement "{\n        lVar7 = uVar8 - 1;\n        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);\n        lVar4 = lVar7 + lVar4;\n        if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }\n        bVar9 = param_2 != uVar8;\n        uVar8 = uVar8 + 1;\n      }" ({ "{") (expression_statement "lVar7 = uVar8 - 1;" (assignment_expression "lVar7 = uVar8 - 1" (identifier "lVar7") (= "=") (binary_expression "uVar8 - 1" (identifier "uVar8") (- "-") (number_literal "1"))) (; ";")) (expression_statement "lVar4 = FUN_0010582a(param_1,param_3 - uVar8);" (assignment_expression "lVar4 = FUN_0010582a(param_1,param_3 - uVar8)" (identifier "lVar4") (= "=") (call_expression "FUN_0010582a(param_1,param_3 - uVar8)" (identifier "FUN_0010582a") (argument_list "(param_1,param_3 - uVar8)" (( "(") (identifier "param_1") (, ",") (binary_expression "param_3 - uVar8" (identifier "param_3") (- "-") (identifier "uVar8")) () ")")))) (; ";")) (expression_statement "lVar4 = lVar7 + lVar4;" (assignment_expression "lVar4 = lVar7 + lVar4" (identifier "lVar4") (= "=") (binary_expression "lVar7 + lVar4" (identifier "lVar7") (+ "+") (identifier "lVar4"))) (; ";")) (if_statement "if (bVar1) {\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }\n        else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }" (if "if") (parenthesized_expression "(bVar1)" (( "(") (identifier "bVar1") () ")")) (compound_statement "{\n          local_50 = 0;\n          local_68[2] = lVar7;\n          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);\n          local_68[1] = 0;\n          local_68[0] = lVar4;\n          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);\n          if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }\n          if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }\n          lVar7 = plVar5[1];\n          plVar5[1] = plVar6[1];\n          plVar6[1] = lVar7;\n          lVar7 = FUN_00108c7d(local_a0,plVar5);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          lVar7 = FUN_00108c7d(local_a0,plVar6);\n          if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }\n          puVar2[uVar8 - 1] = plVar5[1];\n        }" ({ "{") (expression_statement "local_50 = 0;" (assignment_expression "local_50 = 0" (identifier "local_50") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_68[2] = lVar7;" (assignment_expression "local_68[2] = lVar7" (subscript_expression "local_68[2]" (identifier "local_68") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "lVar7")) (; ";")) (expression_statement "plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);" (assignment_expression "plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2)" (identifier "plVar5") (= "=") (cast_expression "(long *)FUN_00108ccf(local_a0,local_68 + 2)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00108ccf(local_a0,local_68 + 2)" (identifier "FUN_00108ccf") (argument_list "(local_a0,local_68 + 2)" (( "(") (identifier "local_a0") (, ",") (binary_expression "local_68 + 2" (identifier "local_68") (+ "+") (number_literal "2")) () ")"))))) (; ";")) (expression_statement "local_68[1] = 0;" (assignment_expression "local_68[1] = 0" (subscript_expression "local_68[1]" (identifier "local_68") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "local_68[0] = lVar4;" (assignment_expression "local_68[0] = lVar4" (subscript_expression "local_68[0]" (identifier "local_68") ([ "[") (number_literal "0") (] "]")) (= "=") (identifier "lVar4")) (; ";")) (expression_statement "plVar6 = (long *)FUN_00108ccf(local_a0,local_68);" (assignment_expression "plVar6 = (long *)FUN_00108ccf(local_a0,local_68)" (identifier "plVar6") (= "=") (cast_expression "(long *)FUN_00108ccf(local_a0,local_68)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00108ccf(local_a0,local_68)" (identifier "FUN_00108ccf") (argument_list "(local_a0,local_68)" (( "(") (identifier "local_a0") (, ",") (identifier "local_68") () ")"))))) (; ";")) (if_statement "if (plVar5 == (long *)0x0) {\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }" (if "if") (parenthesized_expression "(plVar5 == (long *)0x0)" (( "(") (binary_expression "plVar5 == (long *)0x0" (identifier "plVar5") (== "==") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n            plVar5 = (long *)FUN_00106ff1(0x10);\n            plVar5[1] = lVar7;\n            *plVar5 = lVar7;\n          }" ({ "{") (expression_statement "plVar5 = (long *)FUN_00106ff1(0x10);" (assignment_expression "plVar5 = (long *)FUN_00106ff1(0x10)" (identifier "plVar5") (= "=") (cast_expression "(long *)FUN_00106ff1(0x10)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00106ff1(0x10)" (identifier "FUN_00106ff1") (argument_list "(0x10)" (( "(") (number_literal "0x10") () ")"))))) (; ";")) (expression_statement "plVar5[1] = lVar7;" (assignment_expression "plVar5[1] = lVar7" (subscript_expression "plVar5[1]" (identifier "plVar5") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "lVar7")) (; ";")) (expression_statement "*plVar5 = lVar7;" (assignment_expression "*plVar5 = lVar7" (pointer_expression "*plVar5" (* "*") (identifier "plVar5")) (= "=") (identifier "lVar7")) (; ";")) (} "}"))) (if_statement "if (plVar6 == (long *)0x0) {\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }" (if "if") (parenthesized_expression "(plVar6 == (long *)0x0)" (( "(") (binary_expression "plVar6 == (long *)0x0" (identifier "plVar6") (== "==") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n            plVar6 = (long *)FUN_00106ff1(0x10);\n            plVar6[1] = lVar4;\n            *plVar6 = lVar4;\n          }" ({ "{") (expression_statement "plVar6 = (long *)FUN_00106ff1(0x10);" (assignment_expression "plVar6 = (long *)FUN_00106ff1(0x10)" (identifier "plVar6") (= "=") (cast_expression "(long *)FUN_00106ff1(0x10)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00106ff1(0x10)" (identifier "FUN_00106ff1") (argument_list "(0x10)" (( "(") (number_literal "0x10") () ")"))))) (; ";")) (expression_statement "plVar6[1] = lVar4;" (assignment_expression "plVar6[1] = lVar4" (subscript_expression "plVar6[1]" (identifier "plVar6") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "lVar4")) (; ";")) (expression_statement "*plVar6 = lVar4;" (assignment_expression "*plVar6 = lVar4" (pointer_expression "*plVar6" (* "*") (identifier "plVar6")) (= "=") (identifier "lVar4")) (; ";")) (} "}"))) (expression_statement "lVar7 = plVar5[1];" (assignment_expression "lVar7 = plVar5[1]" (identifier "lVar7") (= "=") (subscript_expression "plVar5[1]" (identifier "plVar5") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "plVar5[1] = plVar6[1];" (assignment_expression "plVar5[1] = plVar6[1]" (subscript_expression "plVar5[1]" (identifier "plVar5") ([ "[") (number_literal "1") (] "]")) (= "=") (subscript_expression "plVar6[1]" (identifier "plVar6") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "plVar6[1] = lVar7;" (assignment_expression "plVar6[1] = lVar7" (subscript_expression "plVar6[1]" (identifier "plVar6") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "lVar7")) (; ";")) (expression_statement "lVar7 = FUN_00108c7d(local_a0,plVar5);" (assignment_expression "lVar7 = FUN_00108c7d(local_a0,plVar5)" (identifier "lVar7") (= "=") (call_expression "FUN_00108c7d(local_a0,plVar5)" (identifier "FUN_00108c7d") (argument_list "(local_a0,plVar5)" (( "(") (identifier "local_a0") (, ",") (identifier "plVar5") () ")")))) (; ";")) (if_statement "if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }" (if "if") (parenthesized_expression "(lVar7 == 0)" (( "(") (binary_expression "lVar7 == 0" (identifier "lVar7") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n            FUN_00107233();\n          }" ({ "{") (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" (identifier "FUN_00107233") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "lVar7 = FUN_00108c7d(local_a0,plVar6);" (assignment_expression "lVar7 = FUN_00108c7d(local_a0,plVar6)" (identifier "lVar7") (= "=") (call_expression "FUN_00108c7d(local_a0,plVar6)" (identifier "FUN_00108c7d") (argument_list "(local_a0,plVar6)" (( "(") (identifier "local_a0") (, ",") (identifier "plVar6") () ")")))) (; ";")) (if_statement "if (lVar7 == 0) {\n                    \n            FUN_00107233();\n          }" (if "if") (parenthesized_expression "(lVar7 == 0)" (( "(") (binary_expression "lVar7 == 0" (identifier "lVar7") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n            FUN_00107233();\n          }" ({ "{") (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" (identifier "FUN_00107233") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "puVar2[uVar8 - 1] = plVar5[1];" (assignment_expression "puVar2[uVar8 - 1] = plVar5[1]" (subscript_expression "puVar2[uVar8 - 1]" (identifier "puVar2") ([ "[") (binary_expression "uVar8 - 1" (identifier "uVar8") (- "-") (number_literal "1")) (] "]")) (= "=") (subscript_expression "plVar5[1]" (identifier "plVar5") ([ "[") (number_literal "1") (] "]"))) (; ";")) (} "}")) (else_clause "else {\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }" (else "else") (compound_statement "{\n          uVar3 = puVar2[uVar8 - 1];\n          puVar2[uVar8 - 1] = puVar2[lVar4];\n          puVar2[lVar4] = uVar3;\n        }" ({ "{") (expression_statement "uVar3 = puVar2[uVar8 - 1];" (assignment_expression "uVar3 = puVar2[uVar8 - 1]" (identifier "uVar3") (= "=") (subscript_expression "puVar2[uVar8 - 1]" (identifier "puVar2") ([ "[") (binary_expression "uVar8 - 1" (identifier "uVar8") (- "-") (number_literal "1")) (] "]"))) (; ";")) (expression_statement "puVar2[uVar8 - 1] = puVar2[lVar4];" (assignment_expression "puVar2[uVar8 - 1] = puVar2[lVar4]" (subscript_expression "puVar2[uVar8 - 1]" (identifier "puVar2") ([ "[") (binary_expression "uVar8 - 1" (identifier "uVar8") (- "-") (number_literal "1")) (] "]")) (= "=") (subscript_expression "puVar2[lVar4]" (identifier "puVar2") ([ "[") (identifier "lVar4") (] "]"))) (; ";")) (expression_statement "puVar2[lVar4] = uVar3;" (assignment_expression "puVar2[lVar4] = uVar3" (subscript_expression "puVar2[lVar4]" (identifier "puVar2") ([ "[") (identifier "lVar4") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (} "}")))) (expression_statement "bVar9 = param_2 != uVar8;" (assignment_expression "bVar9 = param_2 != uVar8" (identifier "bVar9") (= "=") (binary_expression "param_2 != uVar8" (identifier "param_2") (!= "!=") (identifier "uVar8"))) (; ";")) (expression_statement "uVar8 = uVar8 + 1;" (assignment_expression "uVar8 = uVar8 + 1" (identifier "uVar8") (= "=") (binary_expression "uVar8 + 1" (identifier "uVar8") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar9)" (( "(") (identifier "bVar9") () ")")) (; ";")) (if_statement "if (bVar1) goto LAB_00105cd7;" (if "if") (parenthesized_expression "(bVar1)" (( "(") (identifier "bVar1") () ")")) (goto_statement "goto LAB_00105cd7;" (goto "goto") (statement_identifier "LAB_00105cd7") (; ";"))) (} "}"))) (if_statement "if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }" (if "if") (parenthesized_expression "((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0)" (( "(") (binary_expression "(long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0" (binary_expression "(long)(param_2 << 3) < 0" (cast_expression "(long)(param_2 << 3)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(param_2 << 3)" (( "(") (binary_expression "param_2 << 3" (identifier "param_2") (<< "<<") (number_literal "3")) () ")"))) (< "<") (number_literal "0")) (|| "||") (binary_expression "param_2 >> 0x3d != 0" (binary_expression "param_2 >> 0x3d" (identifier "param_2") (>> ">>") (number_literal "0x3d")) (!= "!=") (number_literal "0"))) () ")")) (compound_statement "{\n                    \n      FUN_00107233();\n    }" ({ "{") (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" (identifier "FUN_00107233") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);" (assignment_expression "puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3)" (identifier "puVar2") (= "=") (cast_expression "(undefined8 *)FUN_0010704c(puVar2,param_2 << 3)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0010704c(puVar2,param_2 << 3)" (identifier "FUN_0010704c") (argument_list "(puVar2,param_2 << 3)" (( "(") (identifier "puVar2") (, ",") (binary_expression "param_2 << 3" (identifier "param_2") (<< "<<") (number_literal "3")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    \n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }" (else "else") (compound_statement "{\n    if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }\n    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);\n    if (local_a0 == 0) {\n                    \n      FUN_00107233();\n    }\n    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }\n    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);\n    bVar1 = true;\n    if (param_2 != 0) goto LAB_00105d4c;\nLAB_00105cd7:\n    FUN_00108803(local_a0);\n  }" ({ "{") (if_statement "if (param_3 / param_2 < 0x20) {\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }" (if "if") (parenthesized_expression "(param_3 / param_2 < 0x20)" (( "(") (binary_expression "param_3 / param_2 < 0x20" (binary_expression "param_3 / param_2" (identifier "param_3") (/ "/") (identifier "param_2")) (< "<") (number_literal "0x20")) () ")")) (compound_statement "{\n      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;\n      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);\nLAB_00105d20:\n      uVar8 = 0;\n      do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);\n      goto LAB_00105d32;\n    }" ({ "{") (if_statement "if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;" (if "if") (parenthesized_expression "((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0)" (( "(") (binary_expression "(long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0" (binary_expression "(long)(param_3 << 3) < 0" (cast_expression "(long)(param_3 << 3)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(param_3 << 3)" (( "(") (binary_expression "param_3 << 3" (identifier "param_3") (<< "<<") (number_literal "3")) () ")"))) (< "<") (number_literal "0")) (|| "||") (binary_expression "param_3 >> 0x3d != 0" (binary_expression "param_3 >> 0x3d" (identifier "param_3") (>> ">>") (number_literal "0x3d")) (!= "!=") (number_literal "0"))) () ")")) (goto_statement "goto LAB_00105ab5;" (goto "goto") (statement_identifier "LAB_00105ab5") (; ";"))) (expression_statement "puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);" (assignment_expression "puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8)" (identifier "puVar2") (= "=") (cast_expression "(undefined8 *)FUN_00106ff1(param_3 * 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00106ff1(param_3 * 8)" (identifier "FUN_00106ff1") (argument_list "(param_3 * 8)" (( "(") (binary_expression "param_3 * 8" (identifier "param_3") (* "*") (number_literal "8")) () ")"))))) (; ";")) (labeled_statement "LAB_00105d20:\n      uVar8 = 0;" (statement_identifier "LAB_00105d20") (: ":") (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" (identifier "uVar8") (= "=") (number_literal "0")) (; ";"))) (do_statement "do {\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      } while (param_3 != uVar8);" (do "do") (compound_statement "{\n        puVar2[uVar8] = uVar8;\n        uVar8 = uVar8 + 1;\n      }" ({ "{") (expression_statement "puVar2[uVar8] = uVar8;" (assignment_expression "puVar2[uVar8] = uVar8" (subscript_expression "puVar2[uVar8]" (identifier "puVar2") ([ "[") (identifier "uVar8") (] "]")) (= "=") (identifier "uVar8")) (; ";")) (expression_statement "uVar8 = uVar8 + 1;" (assignment_expression "uVar8 = uVar8 + 1" (identifier "uVar8") (= "=") (binary_expression "uVar8 + 1" (identifier "uVar8") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_3 != uVar8)" (( "(") (binary_expression "param_3 != uVar8" (identifier "param_3") (!= "!=") (identifier "uVar8")) () ")")) (; ";")) (goto_statement "goto LAB_00105d32;" (goto "goto") (statement_identifier "LAB_00105d32") (; ";")) (} "}"))) (expression_statement "local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);" (assignment_expression "local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98)" (identifier "local_a0") (= "=") (call_expression "FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98)" (identifier "FUN_0010868d") (argument_list "(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98)" (( "(") (binary_expression "param_2 * 2" (identifier "param_2") (* "*") (number_literal "2")) (, ",") (number_literal "0") (, ",") (identifier "FUN_001059a7") (, ",") (identifier "FUN_001059b6") (, ",") (identifier "PTR_free_0010ef98") () ")")))) (; ";")) (if_statement "if (local_a0 == 0) {\n                    \n      FUN_00107233();\n    }" (if "if") (parenthesized_expression "(local_a0 == 0)" (( "(") (binary_expression "local_a0 == 0" (identifier "local_a0") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n      FUN_00107233();\n    }" ({ "{") (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" (identifier "FUN_00107233") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (if_statement "if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {\n                    \n      FUN_00107233();\n    }" (if "if") (parenthesized_expression "((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0)" (( "(") (binary_expression "(long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0" (binary_expression "(long)(param_2 << 3) < 0" (cast_expression "(long)(param_2 << 3)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(param_2 << 3)" (( "(") (binary_expression "param_2 << 3" (identifier "param_2") (<< "<<") (number_literal "3")) () ")"))) (< "<") (number_literal "0")) (|| "||") (binary_expression "param_2 >> 0x3d != 0" (binary_expression "param_2 >> 0x3d" (identifier "param_2") (>> ">>") (number_literal "0x3d")) (!= "!=") (number_literal "0"))) () ")")) (compound_statement "{\n                    \n      FUN_00107233();\n    }" ({ "{") (expression_statement "FUN_00107233();" (call_expression "FUN_00107233()" (identifier "FUN_00107233") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);" (assignment_expression "puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8)" (identifier "puVar2") (= "=") (cast_expression "(undefined8 *)FUN_00106ff1(param_2 * 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00106ff1(param_2 * 8)" (identifier "FUN_00106ff1") (argument_list "(param_2 * 8)" (( "(") (binary_expression "param_2 * 8" (identifier "param_2") (* "*") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "bVar1 = true;" (assignment_expression "bVar1 = true" (identifier "bVar1") (= "=") (true "true")) (; ";")) (if_statement "if (param_2 != 0) goto LAB_00105d4c;" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00105d4c;" (goto "goto") (statement_identifier "LAB_00105d4c") (; ";"))) (labeled_statement "LAB_00105cd7:\n    FUN_00108803(local_a0);" (statement_identifier "LAB_00105cd7") (: ":") (expression_statement "FUN_00108803(local_a0);" (call_expression "FUN_00108803(local_a0)" (identifier "FUN_00108803") (argument_list "(local_a0)" (( "(") (identifier "local_a0") () ")"))) (; ";"))) (} "}")))) (labeled_statement "LAB_00105c35:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }" (statement_identifier "LAB_00105c35") (: ":") (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return puVar2;\n  }" (if "if") (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (== "==") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n    return puVar2;\n  }" ({ "{") (return_statement "return puVar2;" (return "return") (identifier "puVar2") (; ";")) (} "}")))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

size_t * function_1(type_1 *r,size_t var_2,size_t var_5)

{
  long var_8;
  long lVar2;
  bool bVar3;
  type_2 *p;
  type_2 var_9;
  long *var_12;
  long *var_13;
  void *var_15;
  size_t var_7;
  long var_1;
  bool bVar7;
  type_3 *var_18;
  long var_11 [3];
  type_4 local_50;
  long var_20;
  
  var_20 = *(long *)(var_1 + 0x28);
  if (var_2 == 0) {
    p = (type_2 *)0x0;
    goto LAB_00105c35;
  }
  if (var_2 == 1) {
    p = (type_2 *)var_3(8);
    var_9 = var_4(r,var_5 - 1);
    *p = var_9;
    goto LAB_00105c35;
  }
  if (var_5 < 0x20000) {
    if ((long)(var_5 << 3) < 0 || var_5 >> 0x3d != 0) {
LAB_00105ab5:
                    /* WARNING: Subroutine does not return */
      var_6();
    }
    p = (type_2 *)var_3(var_5 * 8);
    if (var_5 != 0) goto LAB_00105d20;
LAB_00105d32:
    bVar3 = false;
    var_18 = (type_3 *)0x0;
    if (var_2 != 0) {
LAB_00105d4c:
      var_7 = 1;
      do {
        var_8 = var_7 - 1;
        var_9 = var_4(r,var_5 - var_7);
        lVar2 = var_8 + var_9;
        if (bVar3) {
          local_50 = 0;
          var_11[2] = var_8;
          var_12 = (long *)var_10(var_18,var_11 + 2);
          var_11[1] = 0;
          var_11[0] = lVar2;
          var_13 = (long *)var_10(var_18,var_11);
          if (var_12 == (long *)0x0) {
            var_12 = (long *)var_3(0x10);
            var_12[1] = var_8;
            *var_12 = var_8;
          }
          if (var_13 == (long *)0x0) {
            var_13 = (long *)var_3(0x10);
            var_13[1] = lVar2;
            *var_13 = lVar2;
          }
          var_8 = var_12[1];
          var_12[1] = var_13[1];
          var_13[1] = var_8;
          var_15 = var_14(var_18,var_12);
          if (var_15 == (void *)0x0) {
                    /* WARNING: Subroutine does not return */
            var_6();
          }
          var_15 = var_14(var_18,var_13);
          if (var_15 == (void *)0x0) {
                    /* WARNING: Subroutine does not return */
            var_6();
          }
          p[var_7 - 1] = var_12[1];
        }
        else {
          var_9 = p[var_7 - 1];
          p[var_7 - 1] = p[lVar2];
          p[lVar2] = var_9;
        }
        bVar7 = var_2 != var_7;
        var_7 = var_7 + 1;
      } while (bVar7);
      if (bVar3) goto LAB_00105cd7;
    }
    if ((long)(var_2 << 3) < 0 || var_2 >> 0x3d != 0) {
                    /* WARNING: Subroutine does not return */
      var_6();
    }
    p = (type_2 *)var_16(p,var_2 << 3);
  }
  else {
    if (var_5 / var_2 < 0x20) {
      if ((long)(var_5 << 3) < 0 || var_5 >> 0x3d != 0) goto LAB_00105ab5;
      p = (type_2 *)var_3(var_5 * 8);
LAB_00105d20:
      var_9 = 0;
      do {
        p[var_9] = var_9;
        var_9 = var_9 + 1;
      } while (var_5 != var_9);
      goto LAB_00105d32;
    }
    var_18 = var_17(var_2 * 2,(type_5 *)0x0,sparse_hash_,sparse_cmp_,
                               (type_6)PTR_free_0010ef98);
    if (var_18 == (type_3 *)0x0) {
                    /* WARNING: Subroutine does not return */
      var_6();
    }
    if ((long)(var_2 << 3) < 0 || var_2 >> 0x3d != 0) {
                    /* WARNING: Subroutine does not return */
      var_6();
    }
    p = (type_2 *)var_3(var_2 * 8);
    bVar3 = true;
    if (var_2 != 0) goto LAB_00105d4c;
LAB_00105cd7:
    var_19(var_18);
  }
LAB_00105c35:
  if (var_20 == *(long *)(var_1 + 0x28)) {
    return p;
  }
                    /* WARNING: Subroutine does not return */
  var_21();
}


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

undefined8 * MASKED(undefined8 param_1,ulong param_2,ulong param_3)

{
  bool bVar1;
  undefined8 *puVar2;
  undefined8 uVar3;
  long lVar4;
  long *plVar5;
  long *plVar6;
  long lVar7;
  ulong uVar8;
  long in_FS_OFFSET;
  bool bVar9;
  long local_a0;
  long local_68 [3];
  undefined8 local_50;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  if (param_2 == 0) {
    puVar2 = (undefined8 *)0x0;
    goto LAB_00105c35;
  }
  if (param_2 == 1) {
    puVar2 = (undefined8 *)FUN_00106ff1(8,1,0);
    uVar3 = FUN_0010582a(param_1,param_3 - 1);
    *puVar2 = uVar3;
    goto LAB_00105c35;
  }
  if (param_3 < 0x20000) {
    if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) {
LAB_00105ab5:
                    /* WARNING: Subroutine does not return */
      FUN_00107233();
    }
    puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);
    if (param_3 != 0) goto LAB_00105d20;
LAB_00105d32:
    bVar1 = false;
    local_a0 = 0;
    if (param_2 != 0) {
LAB_00105d4c:
      uVar8 = 1;
      do {
        lVar7 = uVar8 - 1;
        lVar4 = FUN_0010582a(param_1,param_3 - uVar8);
        lVar4 = lVar7 + lVar4;
        if (bVar1) {
          local_50 = 0;
          local_68[2] = lVar7;
          plVar5 = (long *)FUN_00108ccf(local_a0,local_68 + 2);
          local_68[1] = 0;
          local_68[0] = lVar4;
          plVar6 = (long *)FUN_00108ccf(local_a0,local_68);
          if (plVar5 == (long *)0x0) {
            plVar5 = (long *)FUN_00106ff1(0x10);
            plVar5[1] = lVar7;
            *plVar5 = lVar7;
          }
          if (plVar6 == (long *)0x0) {
            plVar6 = (long *)FUN_00106ff1(0x10);
            plVar6[1] = lVar4;
            *plVar6 = lVar4;
          }
          lVar7 = plVar5[1];
          plVar5[1] = plVar6[1];
          plVar6[1] = lVar7;
          lVar7 = FUN_00108c7d(local_a0,plVar5);
          if (lVar7 == 0) {
                    /* WARNING: Subroutine does not return */
            FUN_00107233();
          }
          lVar7 = FUN_00108c7d(local_a0,plVar6);
          if (lVar7 == 0) {
                    /* WARNING: Subroutine does not return */
            FUN_00107233();
          }
          puVar2[uVar8 - 1] = plVar5[1];
        }
        else {
          uVar3 = puVar2[uVar8 - 1];
          puVar2[uVar8 - 1] = puVar2[lVar4];
          puVar2[lVar4] = uVar3;
        }
        bVar9 = param_2 != uVar8;
        uVar8 = uVar8 + 1;
      } while (bVar9);
      if (bVar1) goto LAB_00105cd7;
    }
    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {
                    /* WARNING: Subroutine does not return */
      FUN_00107233();
    }
    puVar2 = (undefined8 *)FUN_0010704c(puVar2,param_2 << 3);
  }
  else {
    if (param_3 / param_2 < 0x20) {
      if ((long)(param_3 << 3) < 0 || param_3 >> 0x3d != 0) goto LAB_00105ab5;
      puVar2 = (undefined8 *)FUN_00106ff1(param_3 * 8);
LAB_00105d20:
      uVar8 = 0;
      do {
        puVar2[uVar8] = uVar8;
        uVar8 = uVar8 + 1;
      } while (param_3 != uVar8);
      goto LAB_00105d32;
    }
    local_a0 = FUN_0010868d(param_2 * 2,0,FUN_001059a7,FUN_001059b6,PTR_free_0010ef98);
    if (local_a0 == 0) {
                    /* WARNING: Subroutine does not return */
      FUN_00107233();
    }
    if ((long)(param_2 << 3) < 0 || param_2 >> 0x3d != 0) {
                    /* WARNING: Subroutine does not return */
      FUN_00107233();
    }
    puVar2 = (undefined8 *)FUN_00106ff1(param_2 * 8);
    bVar1 = true;
    if (param_2 != 0) goto LAB_00105d4c;
LAB_00105cd7:
    FUN_00108803(local_a0);
  }
LAB_00105c35:
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return puVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

