
int freeSpace(MemPage *pPage,u16 iStart,u16 iSize)

{
  byte bVar1;
  uint uVar2;
  u8 uVar3;
  int iVar4;
  uint uVar5;
  undefined2 in_register_00000014;
  uint uVar6;
  undefined2 in_register_00000018;
  uint uVar7;
  uint uVar8;
  uint uVar9;
  u8 *puVar10;
  uint uVar11;
  ushort uVar13;
  uint uVar12;
  
  uVar7 = CONCAT22(in_register_00000018,iSize);
  uVar6 = CONCAT22(in_register_00000014,iStart);
  uVar9 = uVar6 + uVar7;
  puVar10 = pPage->aData;
  uVar8 = (uint)pPage->hdrOffset;
  uVar5 = uVar8 + 1;
  uVar12 = uVar5;
  uVar11 = uVar7;
  if ((puVar10[uVar8 + 2] != '\0') || (uVar13 = 0, puVar10[uVar5] != '\0')) {
    do {
      uVar5 = uVar12;
      uVar13 = *(ushort *)(puVar10 + uVar5);
      uVar12 = (uint)uVar13;
      if (uVar6 <= uVar12) {
        uVar2 = pPage->pBt->usableSize;
        if (uVar2 - 4 < uVar12) {
          iVar4 = sqlite3CorruptError(0x102b1);
          return iVar4;
        }
        if (uVar12 == 0) {
          uVar2 = 0;
        }
        else if (uVar9 + 3 < uVar12) {
          uVar2 = 0;
        }
        else {
          if (uVar12 < uVar9) {
            iVar4 = sqlite3CorruptError(0x102bd);
            return iVar4;
          }
          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;
          if (uVar2 < uVar11) {
            iVar4 = sqlite3CorruptError(0x102c0);
            return iVar4;
          }
          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;
          uVar13 = *(ushort *)(puVar10 + uVar12);
          uVar9 = uVar11;
          uVar11 = uVar11 - uVar6 & 0xffff;
        }
        goto LAB_0004ad10;
      }
    } while (uVar5 + 4 <= uVar12);
    if (uVar12 != 0) {
      iVar4 = sqlite3CorruptError(0x102ac);
      return iVar4;
    }
    uVar2 = 0;
LAB_0004ad10:
    if (uVar8 + 1 < uVar5) {
      iVar4 = *(ushort *)(puVar10 + uVar5 + 2) + uVar5;
      if ((int)uVar6 <= iVar4 + 3) {
        if ((int)uVar6 < iVar4) {
          iVar4 = sqlite3CorruptError(0x102cd);
          return iVar4;
        }
        uVar2 = (uVar2 + uVar6) - iVar4 & 0xff;
        uVar11 = uVar9 - uVar5 & 0xffff;
        uVar6 = uVar5;
      }
    }
    bVar1 = puVar10[uVar8 + 7];
    if (bVar1 < uVar2) {
      iVar4 = sqlite3CorruptError(0x102d3);
      return iVar4;
    }
    puVar10[uVar8 + 7] = bVar1 - (char)uVar2;
  }
  uVar12 = (uint)CONCAT11(puVar10[uVar8 + 5],puVar10[uVar8 + 6]);
  uVar3 = (u8)(uVar13 >> 8);
  if (uVar12 < uVar6) {
    puVar10[uVar5] = (u8)(uVar6 >> 8);
    (puVar10 + uVar5)[1] = (u8)uVar6;
  }
  else {
    if (uVar6 < uVar12) {
      iVar4 = sqlite3CorruptError(0x102db);
      return iVar4;
    }
    if (uVar5 != uVar8 + 1) {
      iVar4 = sqlite3CorruptError(0x102dc);
      return iVar4;
    }
    puVar10[uVar8 + 1] = uVar3;
    puVar10[uVar8 + 2] = (u8)uVar13;
    puVar10[uVar8 + 5] = (u8)(uVar9 >> 8);
    puVar10[uVar8 + 6] = (u8)uVar9;
  }
  if ((pPage->pBt->btsFlags & 0xc) != 0) {
    (*(code *)PTR_memset_000f644c)(puVar10 + uVar6,0,uVar11);
  }
  puVar10 = puVar10 + uVar6;
  *puVar10 = uVar3;
  puVar10[1] = (u8)uVar13;
  puVar10[2] = (u8)(uVar11 >> 8);
  puVar10[3] = (u8)uVar11;
  pPage->nFree = pPage->nFree + uVar7;
  return 0;
}



undefined4 FUN_0004ac50(int param_1,uint param_2,uint param_3)

{
  byte bVar1;
  uint uVar2;
  undefined1 uVar4;
  undefined4 uVar3;
  int iVar5;
  byte *pbVar6;
  undefined1 *puVar7;
  uint uVar8;
  undefined1 *puVar9;
  uint uVar10;
  uint uVar11;
  int iVar12;
  uint uVar13;
  ushort uVar15;
  uint uVar14;
  
  uVar11 = param_2 + param_3;
  iVar12 = *(int *)(param_1 + 0x38);
  uVar10 = (uint)*(byte *)(param_1 + 9);
  uVar8 = uVar10 + 1;
  uVar14 = uVar8;
  uVar13 = param_3;
  if ((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')) {
    do {
      uVar8 = uVar14;
      uVar15 = *(ushort *)(iVar12 + uVar8);
      uVar14 = (uint)uVar15;
      if (param_2 <= uVar14) {
        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);
        if (uVar2 - 4 < uVar14) {
          uVar3 = FUN_0004958c(&DAT_000102b1);
          return uVar3;
        }
        if (uVar14 == 0) {
          uVar2 = 0;
        }
        else if (uVar11 + 3 < uVar14) {
          uVar2 = 0;
        }
        else {
          if (uVar14 < uVar11) {
            uVar3 = FUN_0004958c(0x102bd);
            return uVar3;
          }
          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;
          if (uVar2 < uVar13) {
            uVar3 = FUN_0004958c(0x102c0);
            return uVar3;
          }
          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;
          uVar15 = *(ushort *)(iVar12 + uVar14);
          uVar11 = uVar13;
          uVar13 = uVar13 - param_2 & 0xffff;
        }
        goto LAB_0004ad10;
      }
    } while (uVar8 + 4 <= uVar14);
    if (uVar14 != 0) {
      uVar3 = FUN_0004958c(&DAT_000102ac);
      return uVar3;
    }
    uVar2 = 0;
LAB_0004ad10:
    if (uVar10 + 1 < uVar8) {
      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;
      if ((int)param_2 <= iVar5 + 3) {
        if ((int)param_2 < iVar5) {
          uVar3 = FUN_0004958c(0x102cd);
          return uVar3;
        }
        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;
        uVar13 = uVar11 - uVar8 & 0xffff;
        param_2 = uVar8;
      }
    }
    pbVar6 = (byte *)(iVar12 + uVar10 + 7);
    bVar1 = *pbVar6;
    if (bVar1 < uVar2) {
      uVar3 = FUN_0004958c(0x102d3);
      return uVar3;
    }
    *pbVar6 = bVar1 - (char)uVar2;
  }
  puVar9 = (undefined1 *)(iVar12 + uVar10 + 5);
  puVar7 = (undefined1 *)(iVar12 + uVar10 + 6);
  uVar14 = (uint)CONCAT11(*puVar9,*puVar7);
  uVar4 = (undefined1)(uVar15 >> 8);
  if (uVar14 < param_2) {
    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);
    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;
  }
  else {
    if (param_2 < uVar14) {
      uVar3 = FUN_0004958c(0x102db);
      return uVar3;
    }
    if (uVar8 != uVar10 + 1) {
      uVar3 = FUN_0004958c(0x102dc);
      return uVar3;
    }
    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;
    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;
    *puVar9 = (char)(uVar11 >> 8);
    *puVar7 = (char)uVar11;
  }
  if ((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0) {
    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);
  }
  puVar7 = (undefined1 *)(iVar12 + param_2);
  *puVar7 = uVar4;
  puVar7[1] = (char)uVar15;
  puVar7[2] = (char)(uVar13 >> 8);
  puVar7[3] = (char)uVar13;
  *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3;
  return 0;
}


lui gp,0xb
addiu gp,gp,0x3650
addu gp,gp,t9
addiu sp,sp,-0x38
sw ra,0x34(sp)
sw s5,0x30(sp)
sw s4,0x2c(sp)
sw s3,0x28(sp)
sw s2,0x24(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
sw gp,0x10(sp)
or s3,a0,zero
or s1,a1,zero
or s2,a2,zero
or t1,a1,zero
or s4,a2,zero
addu t0,a1,a2
lw s0,0x38(a0)
lbu a2,0x9(a0)
addiu a0,a2,0x1
addu v0,s0,a0
lbu v0,0x1(v0)
bne v0,zero,0x0004acc4
_or a3,t0,zero
addu v0,s0,a0
lbu v0,0x0(v0)
beq v0,zero,0x0004ad84
_or s5,zero,zero
addu v1,s0,a0
lbu v0,0x0(v1)
sll v0,v0,0x8
lbu v1,0x1(v1)
or v0,v0,v1
seh v0,v0
andi s5,v0,0xffff
sltu v1,s5,s1
beq v1,zero,0x0004ae00
_or a1,a0,zero
addiu v1,a0,0x4
slt v1,s5,v1
bne v1,zero,0x0004ad04
_nop
b 0x0004acc4
_or a0,s5,zero
bne s5,zero,0x0004ade0
_lw t9,-0x7fb0(gp)
or v0,zero,zero
addiu v1,a2,0x1
slt v1,v1,a0
beq v1,zero,0x0004ad68
_addiu v1,a2,0x7
addu a1,s0,a1
lbu v1,0x2(a1)
sll v1,v1,0x8
lbu a1,0x3(a1)
or v1,v1,a1
addu v1,v1,a0
addiu a1,v1,0x3
slt a1,a1,t1
bne a1,zero,0x0004ad64
_slt t1,t1,v1
bne t1,zero,0x0004aef8
_subu s2,a3,a0
addu v0,v0,s1
subu v0,v0,v1
andi v0,v0,0xff
andi s2,s2,0xffff
or s1,a0,zero
addiu v1,a2,0x7
addu v1,s0,v1
lbu a1,0x0(v1)
sltu t0,a1,v0
bne t0,zero,0x0004af1c
_lw t9,-0x7fb0(gp)
subu v0,a1,v0
sb v0,0x0(v1)
addiu a1,a2,0x5
addu a1,s0,a1
addiu v1,a2,0x6
addu v1,s0,v1
lbu v0,0x0(a1)
sll v0,v0,0x8
lbu t0,0x0(v1)
or v0,v0,t0
sltu t0,v0,s1
bne t0,zero,0x0004af80
_sltu v0,s1,v0
bne v0,zero,0x0004af3c
_lw t9,-0x7fb0(gp)
addiu v0,a2,0x1
bne a0,v0,0x0004af5c
_addu a2,s0,a2
srl v0,s5,0x8
sb v0,0x1(a2)
sb s5,0x2(a2)
srl v0,a3,0x8
sb v0,0x0(a1)
b 0x0004af90
_sb a3,0x0(v1)
lui a0,0x1
addiu a0,a0,0x2ac
addiu t9,t9,-0x6a74
bal 0x0004958c
_nop
lw gp,0x10(sp)
b 0x0004afd4
_lw ra,0x34(sp)
lw v1,0x34(s3)
lw t2,0x28(v1)
addiu v1,t2,-0x4
sltu v1,v1,s5
bne v1,zero,0x0004ae7c
_or t3,s5,zero
beq s5,zero,0x0004aee8
_addiu v1,t0,0x3
sltu v1,v1,s5
bne v1,zero,0x0004aef0
_sltu v1,s5,t0
bne v1,zero,0x0004aea0
_addu a3,s0,s5
lbu v1,0x2(a3)
sll v1,v1,0x8
lbu a3,0x3(a3)
or v1,v1,a3
addu s5,v1,s5
sltu t2,t2,s5
bne t2,zero,0x0004aec4
_or a3,s5,zero
subu v1,v0,t0
andi v0,v1,0xff
subu s5,s5,s1
andi s2,s5,0xffff
addu t3,s0,t3
lbu s5,0x0(t3)
sll s5,s5,0x8
lbu v1,0x1(t3)
b 0x0004ad10
_or s5,s5,v1
lui a0,0x1
addiu a0,a0,0x2b1
lw t9,-0x7fb0(gp)
addiu t9,t9,-0x6a74
bal 0x0004958c
_nop
lw gp,0x10(sp)
b 0x0004afd4
_lw ra,0x34(sp)
lui a0,0x1
addiu a0,a0,0x2bd
lw t9,-0x7fb0(gp)
addiu t9,t9,-0x6a74
bal 0x0004958c
_nop
lw gp,0x10(sp)
b 0x0004afd4
_lw ra,0x34(sp)
lui a0,0x1
addiu a0,a0,0x2c0
lw t9,-0x7fb0(gp)
addiu t9,t9,-0x6a74
bal 0x0004958c
_nop
lw gp,0x10(sp)
b 0x0004afd4
_lw ra,0x34(sp)
b 0x0004ad10
_or v0,zero,zero
b 0x0004ad10
_or v0,zero,zero
lui a0,0x1
addiu a0,a0,0x2cd
lw t9,-0x7fb0(gp)
addiu t9,t9,-0x6a74
bal 0x0004958c
_nop
lw gp,0x10(sp)
b 0x0004afd4
_lw ra,0x34(sp)
lui a0,0x1
addiu a0,a0,0x2d3
addiu t9,t9,-0x6a74
bal 0x0004958c
_nop
lw gp,0x10(sp)
b 0x0004afd4
_lw ra,0x34(sp)
lui a0,0x1
addiu a0,a0,0x2db
addiu t9,t9,-0x6a74
bal 0x0004958c
_nop
lw gp,0x10(sp)
b 0x0004afd4
_lw ra,0x34(sp)
lui a0,0x1
addiu a0,a0,0x2dc
lw t9,-0x7fb0(gp)
addiu t9,t9,-0x6a74
bal 0x0004958c
_nop
lw gp,0x10(sp)
b 0x0004afd4
_lw ra,0x34(sp)
addu v0,s0,a0
srl v1,s1,0x8
sb v1,0x0(v0)
sb s1,0x1(v0)
lw v0,0x34(s3)
lhu v0,0x18(v0)
andi v0,v0,0xc
bne v0,zero,0x0004aff4
_or a2,s2,zero
addu s0,s0,s1
srl v0,s5,0x8
sb v0,0x0(s0)
sb s5,0x1(s0)
srl v0,s2,0x8
sb v0,0x2(s0)
sb s2,0x3(s0)
lw v0,0x14(s3)
addu s4,v0,s4
sw s4,0x14(s3)
or v0,zero,zero
lw ra,0x34(sp)
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x38
or a1,zero,zero
addu a0,s0,s1
lw t9,-0x7e54(gp)
jalr t9
_nop
lw gp,0x10(sp)
b 0x0004afa8
_addu s0,s0,s1
(translation_unit "undefined4 FUN_0004ac50(int param_1,uint param_2,uint param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  undefined1 uVar4;\n  undefined4 uVar3;\n  int iVar5;\n  byte *pbVar6;\n  undefined1 *puVar7;\n  uint uVar8;\n  undefined1 *puVar9;\n  uint uVar10;\n  uint uVar11;\n  int iVar12;\n  uint uVar13;\n  ushort uVar15;\n  uint uVar14;\n  \n  uVar11 = param_2 + param_3;\n  iVar12 = *(int *)(param_1 + 0x38);\n  uVar10 = (uint)*(byte *)(param_1 + 9);\n  uVar8 = uVar10 + 1;\n  uVar14 = uVar8;\n  uVar13 = param_3;\n  if ((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')) {\n    do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);\n    if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }\n    pbVar6 = (byte *)(iVar12 + uVar10 + 7);\n    bVar1 = *pbVar6;\n    if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }\n    *pbVar6 = bVar1 - (char)uVar2;\n  }\n  puVar9 = (undefined1 *)(iVar12 + uVar10 + 5);\n  puVar7 = (undefined1 *)(iVar12 + uVar10 + 6);\n  uVar14 = (uint)CONCAT11(*puVar9,*puVar7);\n  uVar4 = (undefined1)(uVar15 >> 8);\n  if (uVar14 < param_2) {\n    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);\n    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;\n  }\n  else {\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }\n  if ((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);\n  }\n  puVar7 = (undefined1 *)(iVar12 + param_2);\n  *puVar7 = uVar4;\n  puVar7[1] = (char)uVar15;\n  puVar7[2] = (char)(uVar13 >> 8);\n  puVar7[3] = (char)uVar13;\n  *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3;\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_0004ac50(int param_1,uint param_2,uint param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  undefined1 uVar4;\n  undefined4 uVar3;\n  int iVar5;\n  byte *pbVar6;\n  undefined1 *puVar7;\n  uint uVar8;\n  undefined1 *puVar9;\n  uint uVar10;\n  uint uVar11;\n  int iVar12;\n  uint uVar13;\n  ushort uVar15;\n  uint uVar14;\n  \n  uVar11 = param_2 + param_3;\n  iVar12 = *(int *)(param_1 + 0x38);\n  uVar10 = (uint)*(byte *)(param_1 + 9);\n  uVar8 = uVar10 + 1;\n  uVar14 = uVar8;\n  uVar13 = param_3;\n  if ((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')) {\n    do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);\n    if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }\n    pbVar6 = (byte *)(iVar12 + uVar10 + 7);\n    bVar1 = *pbVar6;\n    if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }\n    *pbVar6 = bVar1 - (char)uVar2;\n  }\n  puVar9 = (undefined1 *)(iVar12 + uVar10 + 5);\n  puVar7 = (undefined1 *)(iVar12 + uVar10 + 6);\n  uVar14 = (uint)CONCAT11(*puVar9,*puVar7);\n  uVar4 = (undefined1)(uVar15 >> 8);\n  if (uVar14 < param_2) {\n    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);\n    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;\n  }\n  else {\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }\n  if ((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);\n  }\n  puVar7 = (undefined1 *)(iVar12 + param_2);\n  *puVar7 = uVar4;\n  puVar7[1] = (char)uVar15;\n  puVar7[2] = (char)(uVar13 >> 8);\n  puVar7[3] = (char)uVar13;\n  *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3;\n  return 0;\n}" type_identifier (function_declarator "FUN_0004ac50(int param_1,uint param_2,uint param_3)" identifier (parameter_list "(int param_1,uint param_2,uint param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  undefined1 uVar4;\n  undefined4 uVar3;\n  int iVar5;\n  byte *pbVar6;\n  undefined1 *puVar7;\n  uint uVar8;\n  undefined1 *puVar9;\n  uint uVar10;\n  uint uVar11;\n  int iVar12;\n  uint uVar13;\n  ushort uVar15;\n  uint uVar14;\n  \n  uVar11 = param_2 + param_3;\n  iVar12 = *(int *)(param_1 + 0x38);\n  uVar10 = (uint)*(byte *)(param_1 + 9);\n  uVar8 = uVar10 + 1;\n  uVar14 = uVar8;\n  uVar13 = param_3;\n  if ((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')) {\n    do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);\n    if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }\n    pbVar6 = (byte *)(iVar12 + uVar10 + 7);\n    bVar1 = *pbVar6;\n    if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }\n    *pbVar6 = bVar1 - (char)uVar2;\n  }\n  puVar9 = (undefined1 *)(iVar12 + uVar10 + 5);\n  puVar7 = (undefined1 *)(iVar12 + uVar10 + 6);\n  uVar14 = (uint)CONCAT11(*puVar9,*puVar7);\n  uVar4 = (undefined1)(uVar15 >> 8);\n  if (uVar14 < param_2) {\n    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);\n    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;\n  }\n  else {\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }\n  if ((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);\n  }\n  puVar7 = (undefined1 *)(iVar12 + param_2);\n  *puVar7 = uVar4;\n  puVar7[1] = (char)uVar15;\n  puVar7[2] = (char)(uVar13 >> 8);\n  puVar7[3] = (char)uVar13;\n  *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3;\n  return 0;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "undefined1 uVar4;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "undefined1 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "undefined1 *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "uint uVar10;" type_identifier identifier ;) (declaration "uint uVar11;" type_identifier identifier ;) (declaration "int iVar12;" primitive_type identifier ;) (declaration "uint uVar13;" type_identifier identifier ;) (declaration "ushort uVar15;" type_identifier identifier ;) (declaration "uint uVar14;" type_identifier identifier ;) (expression_statement "uVar11 = param_2 + param_3;" (assignment_expression "uVar11 = param_2 + param_3" identifier = (binary_expression "param_2 + param_3" identifier + identifier)) ;) (expression_statement "iVar12 = *(int *)(param_1 + 0x38);" (assignment_expression "iVar12 = *(int *)(param_1 + 0x38)" identifier = (pointer_expression "*(int *)(param_1 + 0x38)" * (cast_expression "(int *)(param_1 + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x38)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) ))))) ;) (expression_statement "uVar10 = (uint)*(byte *)(param_1 + 9);" (assignment_expression "uVar10 = (uint)*(byte *)(param_1 + 9)" identifier = (binary_expression "(uint)*(byte *)(param_1 + 9)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(param_1 + 9)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) ))))) ;) (expression_statement "uVar8 = uVar10 + 1;" (assignment_expression "uVar8 = uVar10 + 1" identifier = (binary_expression "uVar10 + 1" identifier + number_literal)) ;) (expression_statement "uVar14 = uVar8;" (assignment_expression "uVar14 = uVar8" identifier = identifier) ;) (expression_statement "uVar13 = param_3;" (assignment_expression "uVar13 = param_3" identifier = identifier) ;) (if_statement "if ((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')) {\n    do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);\n    if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }\n    pbVar6 = (byte *)(iVar12 + uVar10 + 7);\n    bVar1 = *pbVar6;\n    if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }\n    *pbVar6 = bVar1 - (char)uVar2;\n  }" if (parenthesized_expression "((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0'))" ( (binary_expression "(*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')" (parenthesized_expression "(*(char *)(iVar12 + uVar8 + 1) != '\0')" ( (binary_expression "*(char *)(iVar12 + uVar8 + 1) != '\0'" (pointer_expression "*(char *)(iVar12 + uVar8 + 1)" * (cast_expression "(char *)(iVar12 + uVar8 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar8 + 1)" ( (binary_expression "iVar12 + uVar8 + 1" (binary_expression "iVar12 + uVar8" identifier + identifier) + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')" ( (comma_expression "uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0'" (assignment_expression "uVar15 = 0" identifier = number_literal) , (binary_expression "*(char *)(iVar12 + uVar8) != '\0'" (pointer_expression "*(char *)(iVar12 + uVar8)" * (cast_expression "(char *)(iVar12 + uVar8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar8)" ( (binary_expression "iVar12 + uVar8" identifier + identifier) )))) != (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n    do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);\n    if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }\n    pbVar6 = (byte *)(iVar12 + uVar10 + 7);\n    bVar1 = *pbVar6;\n    if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }\n    *pbVar6 = bVar1 - (char)uVar2;\n  }" { (do_statement "do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);" do (compound_statement "{\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    }" { (expression_statement "uVar8 = uVar14;" (assignment_expression "uVar8 = uVar14" identifier = identifier) ;) (expression_statement "uVar15 = *(ushort *)(iVar12 + uVar8);" (assignment_expression "uVar15 = *(ushort *)(iVar12 + uVar8)" identifier = (pointer_expression "*(ushort *)(iVar12 + uVar8)" * (cast_expression "(ushort *)(iVar12 + uVar8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar8)" ( (binary_expression "iVar12 + uVar8" identifier + identifier) ))))) ;) (expression_statement "uVar14 = (uint)uVar15;" (assignment_expression "uVar14 = (uint)uVar15" identifier = (cast_expression "(uint)uVar15" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }" if (parenthesized_expression "(param_2 <= uVar14)" ( (binary_expression "param_2 <= uVar14" identifier <= identifier) )) (compound_statement "{\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }" { (expression_statement "uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);" (assignment_expression "uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28)" identifier = (pointer_expression "*(uint *)(*(int *)(param_1 + 0x34) + 0x28)" * (cast_expression "(uint *)(*(int *)(param_1 + 0x34) + 0x28)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x28)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x28" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) + number_literal) ))))) ;) (if_statement "if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }" if (parenthesized_expression "(uVar2 - 4 < uVar14)" ( (binary_expression "uVar2 - 4 < uVar14" (binary_expression "uVar2 - 4" identifier - number_literal) < identifier) )) (compound_statement "{\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }" { (expression_statement "uVar3 = FUN_0004958c(&DAT_000102b1);" (assignment_expression "uVar3 = FUN_0004958c(&DAT_000102b1)" identifier = (call_expression "FUN_0004958c(&DAT_000102b1)" identifier (argument_list "(&DAT_000102b1)" ( (pointer_expression "&DAT_000102b1" & identifier) )))) ;) (return_statement "return uVar3;" return identifier ;) })) (if_statement "if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" if (parenthesized_expression "(uVar14 == 0)" ( (binary_expression "uVar14 == 0" identifier == number_literal) )) (compound_statement "{\n          uVar2 = 0;\n        }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" else (if_statement "if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" if (parenthesized_expression "(uVar11 + 3 < uVar14)" ( (binary_expression "uVar11 + 3 < uVar14" (binary_expression "uVar11 + 3" identifier + number_literal) < identifier) )) (compound_statement "{\n          uVar2 = 0;\n        }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" else (compound_statement "{\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" { (if_statement "if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }" if (parenthesized_expression "(uVar14 < uVar11)" ( (binary_expression "uVar14 < uVar11" identifier < identifier) )) (compound_statement "{\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }" { (expression_statement "uVar3 = FUN_0004958c(0x102bd);" (assignment_expression "uVar3 = FUN_0004958c(0x102bd)" identifier = (call_expression "FUN_0004958c(0x102bd)" identifier (argument_list "(0x102bd)" ( number_literal )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;" (assignment_expression "uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14" identifier = (binary_expression "*(ushort *)(iVar12 + uVar14 + 2) + uVar14" (pointer_expression "*(ushort *)(iVar12 + uVar14 + 2)" * (cast_expression "(ushort *)(iVar12 + uVar14 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar14 + 2)" ( (binary_expression "iVar12 + uVar14 + 2" (binary_expression "iVar12 + uVar14" identifier + identifier) + number_literal) )))) + identifier)) ;) (if_statement "if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }" if (parenthesized_expression "(uVar2 < uVar13)" ( (binary_expression "uVar2 < uVar13" identifier < identifier) )) (compound_statement "{\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }" { (expression_statement "uVar3 = FUN_0004958c(0x102c0);" (assignment_expression "uVar3 = FUN_0004958c(0x102c0)" identifier = (call_expression "FUN_0004958c(0x102c0)" identifier (argument_list "(0x102c0)" ( number_literal )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "uVar2 = (int)(short)uVar15 - uVar11 & 0xff;" (assignment_expression "uVar2 = (int)(short)uVar15 - uVar11 & 0xff" identifier = (binary_expression "(int)(short)uVar15 - uVar11 & 0xff" (binary_expression "(int)(short)uVar15 - uVar11" (cast_expression "(int)(short)uVar15" ( (type_descriptor "int" primitive_type) ) (cast_expression "(short)uVar15" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) - identifier) & number_literal)) ;) (expression_statement "uVar15 = *(ushort *)(iVar12 + uVar14);" (assignment_expression "uVar15 = *(ushort *)(iVar12 + uVar14)" identifier = (pointer_expression "*(ushort *)(iVar12 + uVar14)" * (cast_expression "(ushort *)(iVar12 + uVar14)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar14)" ( (binary_expression "iVar12 + uVar14" identifier + identifier) ))))) ;) (expression_statement "uVar11 = uVar13;" (assignment_expression "uVar11 = uVar13" identifier = identifier) ;) (expression_statement "uVar13 = uVar13 - param_2 & 0xffff;" (assignment_expression "uVar13 = uVar13 - param_2 & 0xffff" identifier = (binary_expression "uVar13 - param_2 & 0xffff" (binary_expression "uVar13 - param_2" identifier - identifier) & number_literal)) ;) }))))) (goto_statement "goto LAB_0004ad10;" goto statement_identifier ;) })) }) while (parenthesized_expression "(uVar8 + 4 <= uVar14)" ( (binary_expression "uVar8 + 4 <= uVar14" (binary_expression "uVar8 + 4" identifier + number_literal) <= identifier) )) ;) (if_statement "if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }" if (parenthesized_expression "(uVar14 != 0)" ( (binary_expression "uVar14 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }" { (expression_statement "uVar3 = FUN_0004958c(&DAT_000102ac);" (assignment_expression "uVar3 = FUN_0004958c(&DAT_000102ac)" identifier = (call_expression "FUN_0004958c(&DAT_000102ac)" identifier (argument_list "(&DAT_000102ac)" ( (pointer_expression "&DAT_000102ac" & identifier) )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }" statement_identifier : (if_statement "if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }" if (parenthesized_expression "(uVar10 + 1 < uVar8)" ( (binary_expression "uVar10 + 1 < uVar8" (binary_expression "uVar10 + 1" identifier + number_literal) < identifier) )) (compound_statement "{\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }" { (expression_statement "iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;" (assignment_expression "iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8" identifier = (binary_expression "*(ushort *)(iVar12 + uVar8 + 2) + uVar8" (pointer_expression "*(ushort *)(iVar12 + uVar8 + 2)" * (cast_expression "(ushort *)(iVar12 + uVar8 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar8 + 2)" ( (binary_expression "iVar12 + uVar8 + 2" (binary_expression "iVar12 + uVar8" identifier + identifier) + number_literal) )))) + identifier)) ;) (if_statement "if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }" if (parenthesized_expression "((int)param_2 <= iVar5 + 3)" ( (binary_expression "(int)param_2 <= iVar5 + 3" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) <= (binary_expression "iVar5 + 3" identifier + number_literal)) )) (compound_statement "{\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }" { (if_statement "if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }" if (parenthesized_expression "((int)param_2 < iVar5)" ( (binary_expression "(int)param_2 < iVar5" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }" { (expression_statement "uVar3 = FUN_0004958c(0x102cd);" (assignment_expression "uVar3 = FUN_0004958c(0x102cd)" identifier = (call_expression "FUN_0004958c(0x102cd)" identifier (argument_list "(0x102cd)" ( number_literal )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "uVar2 = (uVar2 + param_2) - iVar5 & 0xff;" (assignment_expression "uVar2 = (uVar2 + param_2) - iVar5 & 0xff" identifier = (binary_expression "(uVar2 + param_2) - iVar5 & 0xff" (binary_expression "(uVar2 + param_2) - iVar5" (parenthesized_expression "(uVar2 + param_2)" ( (binary_expression "uVar2 + param_2" identifier + identifier) )) - identifier) & number_literal)) ;) (expression_statement "uVar13 = uVar11 - uVar8 & 0xffff;" (assignment_expression "uVar13 = uVar11 - uVar8 & 0xffff" identifier = (binary_expression "uVar11 - uVar8 & 0xffff" (binary_expression "uVar11 - uVar8" identifier - identifier) & number_literal)) ;) (expression_statement "param_2 = uVar8;" (assignment_expression "param_2 = uVar8" identifier = identifier) ;) })) }))) (expression_statement "pbVar6 = (byte *)(iVar12 + uVar10 + 7);" (assignment_expression "pbVar6 = (byte *)(iVar12 + uVar10 + 7)" identifier = (cast_expression "(byte *)(iVar12 + uVar10 + 7)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar10 + 7)" ( (binary_expression "iVar12 + uVar10 + 7" (binary_expression "iVar12 + uVar10" identifier + identifier) + number_literal) )))) ;) (expression_statement "bVar1 = *pbVar6;" (assignment_expression "bVar1 = *pbVar6" identifier = (pointer_expression "*pbVar6" * identifier)) ;) (if_statement "if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }" if (parenthesized_expression "(bVar1 < uVar2)" ( (binary_expression "bVar1 < uVar2" identifier < identifier) )) (compound_statement "{\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }" { (expression_statement "uVar3 = FUN_0004958c(0x102d3);" (assignment_expression "uVar3 = FUN_0004958c(0x102d3)" identifier = (call_expression "FUN_0004958c(0x102d3)" identifier (argument_list "(0x102d3)" ( number_literal )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "*pbVar6 = bVar1 - (char)uVar2;" (assignment_expression "*pbVar6 = bVar1 - (char)uVar2" (pointer_expression "*pbVar6" * identifier) = (binary_expression "bVar1 - (char)uVar2" identifier - (cast_expression "(char)uVar2" ( (type_descriptor "char" primitive_type) ) identifier))) ;) })) (expression_statement "puVar9 = (undefined1 *)(iVar12 + uVar10 + 5);" (assignment_expression "puVar9 = (undefined1 *)(iVar12 + uVar10 + 5)" identifier = (cast_expression "(undefined1 *)(iVar12 + uVar10 + 5)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar10 + 5)" ( (binary_expression "iVar12 + uVar10 + 5" (binary_expression "iVar12 + uVar10" identifier + identifier) + number_literal) )))) ;) (expression_statement "puVar7 = (undefined1 *)(iVar12 + uVar10 + 6);" (assignment_expression "puVar7 = (undefined1 *)(iVar12 + uVar10 + 6)" identifier = (cast_expression "(undefined1 *)(iVar12 + uVar10 + 6)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar10 + 6)" ( (binary_expression "iVar12 + uVar10 + 6" (binary_expression "iVar12 + uVar10" identifier + identifier) + number_literal) )))) ;) (expression_statement "uVar14 = (uint)CONCAT11(*puVar9,*puVar7);" (assignment_expression "uVar14 = (uint)CONCAT11(*puVar9,*puVar7)" identifier = (cast_expression "(uint)CONCAT11(*puVar9,*puVar7)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT11(*puVar9,*puVar7)" identifier (argument_list "(*puVar9,*puVar7)" ( (pointer_expression "*puVar9" * identifier) , (pointer_expression "*puVar7" * identifier) ))))) ;) (expression_statement "uVar4 = (undefined1)(uVar15 >> 8);" (assignment_expression "uVar4 = (undefined1)(uVar15 >> 8)" identifier = (call_expression "(undefined1)(uVar15 >> 8)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(uVar15 >> 8)" ( (binary_expression "uVar15 >> 8" identifier >> number_literal) )))) ;) (if_statement "if (uVar14 < param_2) {\n    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);\n    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;\n  }\n  else {\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }" if (parenthesized_expression "(uVar14 < param_2)" ( (binary_expression "uVar14 < param_2" identifier < identifier) )) (compound_statement "{\n    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);\n    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;\n  }" { (expression_statement "*(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);" (assignment_expression "*(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8)" (pointer_expression "*(undefined1 *)(iVar12 + uVar8)" * (cast_expression "(undefined1 *)(iVar12 + uVar8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar8)" ( (binary_expression "iVar12 + uVar8" identifier + identifier) )))) = (cast_expression "(char)(param_2 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(param_2 >> 8)" ( (binary_expression "param_2 >> 8" identifier >> number_literal) )))) ;) (expression_statement "((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;" (assignment_expression "((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2" (subscript_expression "((undefined1 *)(iVar12 + uVar8))[1]" (parenthesized_expression "((undefined1 *)(iVar12 + uVar8))" ( (cast_expression "(undefined1 *)(iVar12 + uVar8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar8)" ( (binary_expression "iVar12 + uVar8" identifier + identifier) ))) )) [ number_literal ]) = (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) }) (else_clause "else {\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }" else (compound_statement "{\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }" { (if_statement "if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }" if (parenthesized_expression "(param_2 < uVar14)" ( (binary_expression "param_2 < uVar14" identifier < identifier) )) (compound_statement "{\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }" { (expression_statement "uVar3 = FUN_0004958c(0x102db);" (assignment_expression "uVar3 = FUN_0004958c(0x102db)" identifier = (call_expression "FUN_0004958c(0x102db)" identifier (argument_list "(0x102db)" ( number_literal )))) ;) (return_statement "return uVar3;" return identifier ;) })) (if_statement "if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }" if (parenthesized_expression "(uVar8 != uVar10 + 1)" ( (binary_expression "uVar8 != uVar10 + 1" identifier != (binary_expression "uVar10 + 1" identifier + number_literal)) )) (compound_statement "{\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }" { (expression_statement "uVar3 = FUN_0004958c(0x102dc);" (assignment_expression "uVar3 = FUN_0004958c(0x102dc)" identifier = (call_expression "FUN_0004958c(0x102dc)" identifier (argument_list "(0x102dc)" ( number_literal )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "*(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;" (assignment_expression "*(undefined1 *)(iVar12 + uVar10 + 1) = uVar4" (pointer_expression "*(undefined1 *)(iVar12 + uVar10 + 1)" * (cast_expression "(undefined1 *)(iVar12 + uVar10 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar10 + 1)" ( (binary_expression "iVar12 + uVar10 + 1" (binary_expression "iVar12 + uVar10" identifier + identifier) + number_literal) )))) = identifier) ;) (expression_statement "*(char *)(iVar12 + uVar10 + 2) = (char)uVar15;" (assignment_expression "*(char *)(iVar12 + uVar10 + 2) = (char)uVar15" (pointer_expression "*(char *)(iVar12 + uVar10 + 2)" * (cast_expression "(char *)(iVar12 + uVar10 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar10 + 2)" ( (binary_expression "iVar12 + uVar10 + 2" (binary_expression "iVar12 + uVar10" identifier + identifier) + number_literal) )))) = (cast_expression "(char)uVar15" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "*puVar9 = (char)(uVar11 >> 8);" (assignment_expression "*puVar9 = (char)(uVar11 >> 8)" (pointer_expression "*puVar9" * identifier) = (cast_expression "(char)(uVar11 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar11 >> 8)" ( (binary_expression "uVar11 >> 8" identifier >> number_literal) )))) ;) (expression_statement "*puVar7 = (char)uVar11;" (assignment_expression "*puVar7 = (char)uVar11" (pointer_expression "*puVar7" * identifier) = (cast_expression "(char)uVar11" ( (type_descriptor "char" primitive_type) ) identifier)) ;) }))) (if_statement "if ((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);\n  }" if (parenthesized_expression "((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0)" ( (binary_expression "(*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0" (parenthesized_expression "(*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc)" ( (binary_expression "*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc" (pointer_expression "*(ushort *)(*(int *)(param_1 + 0x34) + 0x18)" * (cast_expression "(ushort *)(*(int *)(param_1 + 0x34) + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x18)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x18" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);\n  }" { (expression_statement "(*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);" (call_expression "(*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13)" (parenthesized_expression "(*(code *)PTR_memset_000f644c)" ( (pointer_expression "*(code *)PTR_memset_000f644c" * (cast_expression "(code *)PTR_memset_000f644c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar12 + param_2,0,uVar13)" ( (binary_expression "iVar12 + param_2" identifier + identifier) , number_literal , identifier ))) ;) })) (expression_statement "puVar7 = (undefined1 *)(iVar12 + param_2);" (assignment_expression "puVar7 = (undefined1 *)(iVar12 + param_2)" identifier = (cast_expression "(undefined1 *)(iVar12 + param_2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + param_2)" ( (binary_expression "iVar12 + param_2" identifier + identifier) )))) ;) (expression_statement "*puVar7 = uVar4;" (assignment_expression "*puVar7 = uVar4" (pointer_expression "*puVar7" * identifier) = identifier) ;) (expression_statement "puVar7[1] = (char)uVar15;" (assignment_expression "puVar7[1] = (char)uVar15" (subscript_expression "puVar7[1]" identifier [ number_literal ]) = (cast_expression "(char)uVar15" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "puVar7[2] = (char)(uVar13 >> 8);" (assignment_expression "puVar7[2] = (char)(uVar13 >> 8)" (subscript_expression "puVar7[2]" identifier [ number_literal ]) = (cast_expression "(char)(uVar13 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar13 >> 8)" ( (binary_expression "uVar13 >> 8" identifier >> number_literal) )))) ;) (expression_statement "puVar7[3] = (char)uVar13;" (assignment_expression "puVar7[3] = (char)uVar13" (subscript_expression "puVar7[3]" identifier [ number_literal ]) = (cast_expression "(char)uVar13" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "*(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3;" (assignment_expression "*(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3" (pointer_expression "*(uint *)(param_1 + 0x14)" * (cast_expression "(uint *)(param_1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x14) + param_3" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) + identifier)) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int freeSpace(MemPage *pPage,u16 iStart,u16 iSize)\n\n{\n  byte bVar1;\n  uint uVar2;\n  u8 uVar3;\n  int iVar4;\n  uint uVar5;\n  undefined2 in_register_00000014;\n  uint uVar6;\n  undefined2 in_register_00000018;\n  uint uVar7;\n  uint uVar8;\n  uint uVar9;\n  u8 *puVar10;\n  uint uVar11;\n  ushort uVar13;\n  uint uVar12;\n  \n  uVar7 = CONCAT22(in_register_00000018,iSize);\n  uVar6 = CONCAT22(in_register_00000014,iStart);\n  uVar9 = uVar6 + uVar7;\n  puVar10 = pPage->aData;\n  uVar8 = (uint)pPage->hdrOffset;\n  uVar5 = uVar8 + 1;\n  uVar12 = uVar5;\n  uVar11 = uVar7;\n  if ((puVar10[uVar8 + 2] != '\0') || (uVar13 = 0, puVar10[uVar5] != '\0')) {\n    do {\n      uVar5 = uVar12;\n      uVar13 = *(ushort *)(puVar10 + uVar5);\n      uVar12 = (uint)uVar13;\n      if (uVar6 <= uVar12) {\n        uVar2 = pPage->pBt->usableSize;\n        if (uVar2 - 4 < uVar12) {\n          iVar4 = sqlite3CorruptError(0x102b1);\n          return iVar4;\n        }\n        if (uVar12 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar9 + 3 < uVar12) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }\n          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;\n          if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }\n          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;\n          uVar13 = *(ushort *)(puVar10 + uVar12);\n          uVar9 = uVar11;\n          uVar11 = uVar11 - uVar6 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar5 + 4 <= uVar12);\n    if (uVar12 != 0) {\n      iVar4 = sqlite3CorruptError(0x102ac);\n      return iVar4;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar8 + 1 < uVar5) {\n      iVar4 = *(ushort *)(puVar10 + uVar5 + 2) + uVar5;\n      if ((int)uVar6 <= iVar4 + 3) {\n        if ((int)uVar6 < iVar4) {\n          iVar4 = sqlite3CorruptError(0x102cd);\n          return iVar4;\n        }\n        uVar2 = (uVar2 + uVar6) - iVar4 & 0xff;\n        uVar11 = uVar9 - uVar5 & 0xffff;\n        uVar6 = uVar5;\n      }\n    }\n    bVar1 = puVar10[uVar8 + 7];\n    if (bVar1 < uVar2) {\n      iVar4 = sqlite3CorruptError(0x102d3);\n      return iVar4;\n    }\n    puVar10[uVar8 + 7] = bVar1 - (char)uVar2;\n  }\n  uVar12 = (uint)CONCAT11(puVar10[uVar8 + 5],puVar10[uVar8 + 6]);\n  uVar3 = (u8)(uVar13 >> 8);\n  if (uVar12 < uVar6) {\n    puVar10[uVar5] = (u8)(uVar6 >> 8);\n    (puVar10 + uVar5)[1] = (u8)uVar6;\n  }\n  else {\n    if (uVar6 < uVar12) {\n      iVar4 = sqlite3CorruptError(0x102db);\n      return iVar4;\n    }\n    if (uVar5 != uVar8 + 1) {\n      iVar4 = sqlite3CorruptError(0x102dc);\n      return iVar4;\n    }\n    puVar10[uVar8 + 1] = uVar3;\n    puVar10[uVar8 + 2] = (u8)uVar13;\n    puVar10[uVar8 + 5] = (u8)(uVar9 >> 8);\n    puVar10[uVar8 + 6] = (u8)uVar9;\n  }\n  if ((pPage->pBt->btsFlags & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(puVar10 + uVar6,0,uVar11);\n  }\n  puVar10 = puVar10 + uVar6;\n  *puVar10 = uVar3;\n  puVar10[1] = (u8)uVar13;\n  puVar10[2] = (u8)(uVar11 >> 8);\n  puVar10[3] = (u8)uVar11;\n  pPage->nFree = pPage->nFree + uVar7;\n  return 0;\n}\n\n" (function_definition "int freeSpace(MemPage *pPage,u16 iStart,u16 iSize)\n\n{\n  byte bVar1;\n  uint uVar2;\n  u8 uVar3;\n  int iVar4;\n  uint uVar5;\n  undefined2 in_register_00000014;\n  uint uVar6;\n  undefined2 in_register_00000018;\n  uint uVar7;\n  uint uVar8;\n  uint uVar9;\n  u8 *puVar10;\n  uint uVar11;\n  ushort uVar13;\n  uint uVar12;\n  \n  uVar7 = CONCAT22(in_register_00000018,iSize);\n  uVar6 = CONCAT22(in_register_00000014,iStart);\n  uVar9 = uVar6 + uVar7;\n  puVar10 = pPage->aData;\n  uVar8 = (uint)pPage->hdrOffset;\n  uVar5 = uVar8 + 1;\n  uVar12 = uVar5;\n  uVar11 = uVar7;\n  if ((puVar10[uVar8 + 2] != '\0') || (uVar13 = 0, puVar10[uVar5] != '\0')) {\n    do {\n      uVar5 = uVar12;\n      uVar13 = *(ushort *)(puVar10 + uVar5);\n      uVar12 = (uint)uVar13;\n      if (uVar6 <= uVar12) {\n        uVar2 = pPage->pBt->usableSize;\n        if (uVar2 - 4 < uVar12) {\n          iVar4 = sqlite3CorruptError(0x102b1);\n          return iVar4;\n        }\n        if (uVar12 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar9 + 3 < uVar12) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }\n          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;\n          if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }\n          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;\n          uVar13 = *(ushort *)(puVar10 + uVar12);\n          uVar9 = uVar11;\n          uVar11 = uVar11 - uVar6 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar5 + 4 <= uVar12);\n    if (uVar12 != 0) {\n      iVar4 = sqlite3CorruptError(0x102ac);\n      return iVar4;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar8 + 1 < uVar5) {\n      iVar4 = *(ushort *)(puVar10 + uVar5 + 2) + uVar5;\n      if ((int)uVar6 <= iVar4 + 3) {\n        if ((int)uVar6 < iVar4) {\n          iVar4 = sqlite3CorruptError(0x102cd);\n          return iVar4;\n        }\n        uVar2 = (uVar2 + uVar6) - iVar4 & 0xff;\n        uVar11 = uVar9 - uVar5 & 0xffff;\n        uVar6 = uVar5;\n      }\n    }\n    bVar1 = puVar10[uVar8 + 7];\n    if (bVar1 < uVar2) {\n      iVar4 = sqlite3CorruptError(0x102d3);\n      return iVar4;\n    }\n    puVar10[uVar8 + 7] = bVar1 - (char)uVar2;\n  }\n  uVar12 = (uint)CONCAT11(puVar10[uVar8 + 5],puVar10[uVar8 + 6]);\n  uVar3 = (u8)(uVar13 >> 8);\n  if (uVar12 < uVar6) {\n    puVar10[uVar5] = (u8)(uVar6 >> 8);\n    (puVar10 + uVar5)[1] = (u8)uVar6;\n  }\n  else {\n    if (uVar6 < uVar12) {\n      iVar4 = sqlite3CorruptError(0x102db);\n      return iVar4;\n    }\n    if (uVar5 != uVar8 + 1) {\n      iVar4 = sqlite3CorruptError(0x102dc);\n      return iVar4;\n    }\n    puVar10[uVar8 + 1] = uVar3;\n    puVar10[uVar8 + 2] = (u8)uVar13;\n    puVar10[uVar8 + 5] = (u8)(uVar9 >> 8);\n    puVar10[uVar8 + 6] = (u8)uVar9;\n  }\n  if ((pPage->pBt->btsFlags & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(puVar10 + uVar6,0,uVar11);\n  }\n  puVar10 = puVar10 + uVar6;\n  *puVar10 = uVar3;\n  puVar10[1] = (u8)uVar13;\n  puVar10[2] = (u8)(uVar11 >> 8);\n  puVar10[3] = (u8)uVar11;\n  pPage->nFree = pPage->nFree + uVar7;\n  return 0;\n}" primitive_type (function_declarator "freeSpace(MemPage *pPage,u16 iStart,u16 iSize)" identifier (parameter_list "(MemPage *pPage,u16 iStart,u16 iSize)" ( (parameter_declaration "MemPage *pPage" type_identifier (pointer_declarator "*pPage" * identifier)) , (parameter_declaration "u16 iStart" type_identifier identifier) , (parameter_declaration "u16 iSize" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  u8 uVar3;\n  int iVar4;\n  uint uVar5;\n  undefined2 in_register_00000014;\n  uint uVar6;\n  undefined2 in_register_00000018;\n  uint uVar7;\n  uint uVar8;\n  uint uVar9;\n  u8 *puVar10;\n  uint uVar11;\n  ushort uVar13;\n  uint uVar12;\n  \n  uVar7 = CONCAT22(in_register_00000018,iSize);\n  uVar6 = CONCAT22(in_register_00000014,iStart);\n  uVar9 = uVar6 + uVar7;\n  puVar10 = pPage->aData;\n  uVar8 = (uint)pPage->hdrOffset;\n  uVar5 = uVar8 + 1;\n  uVar12 = uVar5;\n  uVar11 = uVar7;\n  if ((puVar10[uVar8 + 2] != '\0') || (uVar13 = 0, puVar10[uVar5] != '\0')) {\n    do {\n      uVar5 = uVar12;\n      uVar13 = *(ushort *)(puVar10 + uVar5);\n      uVar12 = (uint)uVar13;\n      if (uVar6 <= uVar12) {\n        uVar2 = pPage->pBt->usableSize;\n        if (uVar2 - 4 < uVar12) {\n          iVar4 = sqlite3CorruptError(0x102b1);\n          return iVar4;\n        }\n        if (uVar12 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar9 + 3 < uVar12) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }\n          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;\n          if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }\n          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;\n          uVar13 = *(ushort *)(puVar10 + uVar12);\n          uVar9 = uVar11;\n          uVar11 = uVar11 - uVar6 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar5 + 4 <= uVar12);\n    if (uVar12 != 0) {\n      iVar4 = sqlite3CorruptError(0x102ac);\n      return iVar4;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar8 + 1 < uVar5) {\n      iVar4 = *(ushort *)(puVar10 + uVar5 + 2) + uVar5;\n      if ((int)uVar6 <= iVar4 + 3) {\n        if ((int)uVar6 < iVar4) {\n          iVar4 = sqlite3CorruptError(0x102cd);\n          return iVar4;\n        }\n        uVar2 = (uVar2 + uVar6) - iVar4 & 0xff;\n        uVar11 = uVar9 - uVar5 & 0xffff;\n        uVar6 = uVar5;\n      }\n    }\n    bVar1 = puVar10[uVar8 + 7];\n    if (bVar1 < uVar2) {\n      iVar4 = sqlite3CorruptError(0x102d3);\n      return iVar4;\n    }\n    puVar10[uVar8 + 7] = bVar1 - (char)uVar2;\n  }\n  uVar12 = (uint)CONCAT11(puVar10[uVar8 + 5],puVar10[uVar8 + 6]);\n  uVar3 = (u8)(uVar13 >> 8);\n  if (uVar12 < uVar6) {\n    puVar10[uVar5] = (u8)(uVar6 >> 8);\n    (puVar10 + uVar5)[1] = (u8)uVar6;\n  }\n  else {\n    if (uVar6 < uVar12) {\n      iVar4 = sqlite3CorruptError(0x102db);\n      return iVar4;\n    }\n    if (uVar5 != uVar8 + 1) {\n      iVar4 = sqlite3CorruptError(0x102dc);\n      return iVar4;\n    }\n    puVar10[uVar8 + 1] = uVar3;\n    puVar10[uVar8 + 2] = (u8)uVar13;\n    puVar10[uVar8 + 5] = (u8)(uVar9 >> 8);\n    puVar10[uVar8 + 6] = (u8)uVar9;\n  }\n  if ((pPage->pBt->btsFlags & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(puVar10 + uVar6,0,uVar11);\n  }\n  puVar10 = puVar10 + uVar6;\n  *puVar10 = uVar3;\n  puVar10[1] = (u8)uVar13;\n  puVar10[2] = (u8)(uVar11 >> 8);\n  puVar10[3] = (u8)uVar11;\n  pPage->nFree = pPage->nFree + uVar7;\n  return 0;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "u8 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "undefined2 in_register_00000014;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "undefined2 in_register_00000018;" type_identifier identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "uint uVar9;" type_identifier identifier ;) (declaration "u8 *puVar10;" type_identifier (pointer_declarator "*puVar10" * identifier) ;) (declaration "uint uVar11;" type_identifier identifier ;) (declaration "ushort uVar13;" type_identifier identifier ;) (declaration "uint uVar12;" type_identifier identifier ;) (expression_statement "uVar7 = CONCAT22(in_register_00000018,iSize);" (assignment_expression "uVar7 = CONCAT22(in_register_00000018,iSize)" identifier = (call_expression "CONCAT22(in_register_00000018,iSize)" identifier (argument_list "(in_register_00000018,iSize)" ( identifier , identifier )))) ;) (expression_statement "uVar6 = CONCAT22(in_register_00000014,iStart);" (assignment_expression "uVar6 = CONCAT22(in_register_00000014,iStart)" identifier = (call_expression "CONCAT22(in_register_00000014,iStart)" identifier (argument_list "(in_register_00000014,iStart)" ( identifier , identifier )))) ;) (expression_statement "uVar9 = uVar6 + uVar7;" (assignment_expression "uVar9 = uVar6 + uVar7" identifier = (binary_expression "uVar6 + uVar7" identifier + identifier)) ;) (expression_statement "puVar10 = pPage->aData;" (assignment_expression "puVar10 = pPage->aData" identifier = (field_expression "pPage->aData" identifier -> field_identifier)) ;) (expression_statement "uVar8 = (uint)pPage->hdrOffset;" (assignment_expression "uVar8 = (uint)pPage->hdrOffset" identifier = (cast_expression "(uint)pPage->hdrOffset" ( (type_descriptor "uint" type_identifier) ) (field_expression "pPage->hdrOffset" identifier -> field_identifier))) ;) (expression_statement "uVar5 = uVar8 + 1;" (assignment_expression "uVar5 = uVar8 + 1" identifier = (binary_expression "uVar8 + 1" identifier + number_literal)) ;) (expression_statement "uVar12 = uVar5;" (assignment_expression "uVar12 = uVar5" identifier = identifier) ;) (expression_statement "uVar11 = uVar7;" (assignment_expression "uVar11 = uVar7" identifier = identifier) ;) (if_statement "if ((puVar10[uVar8 + 2] != '\0') || (uVar13 = 0, puVar10[uVar5] != '\0')) {\n    do {\n      uVar5 = uVar12;\n      uVar13 = *(ushort *)(puVar10 + uVar5);\n      uVar12 = (uint)uVar13;\n      if (uVar6 <= uVar12) {\n        uVar2 = pPage->pBt->usableSize;\n        if (uVar2 - 4 < uVar12) {\n          iVar4 = sqlite3CorruptError(0x102b1);\n          return iVar4;\n        }\n        if (uVar12 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar9 + 3 < uVar12) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }\n          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;\n          if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }\n          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;\n          uVar13 = *(ushort *)(puVar10 + uVar12);\n          uVar9 = uVar11;\n          uVar11 = uVar11 - uVar6 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar5 + 4 <= uVar12);\n    if (uVar12 != 0) {\n      iVar4 = sqlite3CorruptError(0x102ac);\n      return iVar4;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar8 + 1 < uVar5) {\n      iVar4 = *(ushort *)(puVar10 + uVar5 + 2) + uVar5;\n      if ((int)uVar6 <= iVar4 + 3) {\n        if ((int)uVar6 < iVar4) {\n          iVar4 = sqlite3CorruptError(0x102cd);\n          return iVar4;\n        }\n        uVar2 = (uVar2 + uVar6) - iVar4 & 0xff;\n        uVar11 = uVar9 - uVar5 & 0xffff;\n        uVar6 = uVar5;\n      }\n    }\n    bVar1 = puVar10[uVar8 + 7];\n    if (bVar1 < uVar2) {\n      iVar4 = sqlite3CorruptError(0x102d3);\n      return iVar4;\n    }\n    puVar10[uVar8 + 7] = bVar1 - (char)uVar2;\n  }" if (parenthesized_expression "((puVar10[uVar8 + 2] != '\0') || (uVar13 = 0, puVar10[uVar5] != '\0'))" ( (binary_expression "(puVar10[uVar8 + 2] != '\0') || (uVar13 = 0, puVar10[uVar5] != '\0')" (parenthesized_expression "(puVar10[uVar8 + 2] != '\0')" ( (binary_expression "puVar10[uVar8 + 2] != '\0'" (subscript_expression "puVar10[uVar8 + 2]" identifier [ (binary_expression "uVar8 + 2" identifier + number_literal) ]) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(uVar13 = 0, puVar10[uVar5] != '\0')" ( (comma_expression "uVar13 = 0, puVar10[uVar5] != '\0'" (assignment_expression "uVar13 = 0" identifier = number_literal) , (binary_expression "puVar10[uVar5] != '\0'" (subscript_expression "puVar10[uVar5]" identifier [ identifier ]) != (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n    do {\n      uVar5 = uVar12;\n      uVar13 = *(ushort *)(puVar10 + uVar5);\n      uVar12 = (uint)uVar13;\n      if (uVar6 <= uVar12) {\n        uVar2 = pPage->pBt->usableSize;\n        if (uVar2 - 4 < uVar12) {\n          iVar4 = sqlite3CorruptError(0x102b1);\n          return iVar4;\n        }\n        if (uVar12 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar9 + 3 < uVar12) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }\n          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;\n          if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }\n          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;\n          uVar13 = *(ushort *)(puVar10 + uVar12);\n          uVar9 = uVar11;\n          uVar11 = uVar11 - uVar6 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar5 + 4 <= uVar12);\n    if (uVar12 != 0) {\n      iVar4 = sqlite3CorruptError(0x102ac);\n      return iVar4;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar8 + 1 < uVar5) {\n      iVar4 = *(ushort *)(puVar10 + uVar5 + 2) + uVar5;\n      if ((int)uVar6 <= iVar4 + 3) {\n        if ((int)uVar6 < iVar4) {\n          iVar4 = sqlite3CorruptError(0x102cd);\n          return iVar4;\n        }\n        uVar2 = (uVar2 + uVar6) - iVar4 & 0xff;\n        uVar11 = uVar9 - uVar5 & 0xffff;\n        uVar6 = uVar5;\n      }\n    }\n    bVar1 = puVar10[uVar8 + 7];\n    if (bVar1 < uVar2) {\n      iVar4 = sqlite3CorruptError(0x102d3);\n      return iVar4;\n    }\n    puVar10[uVar8 + 7] = bVar1 - (char)uVar2;\n  }" { (do_statement "do {\n      uVar5 = uVar12;\n      uVar13 = *(ushort *)(puVar10 + uVar5);\n      uVar12 = (uint)uVar13;\n      if (uVar6 <= uVar12) {\n        uVar2 = pPage->pBt->usableSize;\n        if (uVar2 - 4 < uVar12) {\n          iVar4 = sqlite3CorruptError(0x102b1);\n          return iVar4;\n        }\n        if (uVar12 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar9 + 3 < uVar12) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }\n          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;\n          if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }\n          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;\n          uVar13 = *(ushort *)(puVar10 + uVar12);\n          uVar9 = uVar11;\n          uVar11 = uVar11 - uVar6 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar5 + 4 <= uVar12);" do (compound_statement "{\n      uVar5 = uVar12;\n      uVar13 = *(ushort *)(puVar10 + uVar5);\n      uVar12 = (uint)uVar13;\n      if (uVar6 <= uVar12) {\n        uVar2 = pPage->pBt->usableSize;\n        if (uVar2 - 4 < uVar12) {\n          iVar4 = sqlite3CorruptError(0x102b1);\n          return iVar4;\n        }\n        if (uVar12 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar9 + 3 < uVar12) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }\n          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;\n          if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }\n          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;\n          uVar13 = *(ushort *)(puVar10 + uVar12);\n          uVar9 = uVar11;\n          uVar11 = uVar11 - uVar6 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    }" { (expression_statement "uVar5 = uVar12;" (assignment_expression "uVar5 = uVar12" identifier = identifier) ;) (expression_statement "uVar13 = *(ushort *)(puVar10 + uVar5);" (assignment_expression "uVar13 = *(ushort *)(puVar10 + uVar5)" identifier = (pointer_expression "*(ushort *)(puVar10 + uVar5)" * (cast_expression "(ushort *)(puVar10 + uVar5)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar10 + uVar5)" ( (binary_expression "puVar10 + uVar5" identifier + identifier) ))))) ;) (expression_statement "uVar12 = (uint)uVar13;" (assignment_expression "uVar12 = (uint)uVar13" identifier = (cast_expression "(uint)uVar13" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (uVar6 <= uVar12) {\n        uVar2 = pPage->pBt->usableSize;\n        if (uVar2 - 4 < uVar12) {\n          iVar4 = sqlite3CorruptError(0x102b1);\n          return iVar4;\n        }\n        if (uVar12 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar9 + 3 < uVar12) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }\n          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;\n          if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }\n          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;\n          uVar13 = *(ushort *)(puVar10 + uVar12);\n          uVar9 = uVar11;\n          uVar11 = uVar11 - uVar6 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }" if (parenthesized_expression "(uVar6 <= uVar12)" ( (binary_expression "uVar6 <= uVar12" identifier <= identifier) )) (compound_statement "{\n        uVar2 = pPage->pBt->usableSize;\n        if (uVar2 - 4 < uVar12) {\n          iVar4 = sqlite3CorruptError(0x102b1);\n          return iVar4;\n        }\n        if (uVar12 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar9 + 3 < uVar12) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }\n          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;\n          if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }\n          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;\n          uVar13 = *(ushort *)(puVar10 + uVar12);\n          uVar9 = uVar11;\n          uVar11 = uVar11 - uVar6 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }" { (expression_statement "uVar2 = pPage->pBt->usableSize;" (assignment_expression "uVar2 = pPage->pBt->usableSize" identifier = (field_expression "pPage->pBt->usableSize" (field_expression "pPage->pBt" identifier -> field_identifier) -> field_identifier)) ;) (if_statement "if (uVar2 - 4 < uVar12) {\n          iVar4 = sqlite3CorruptError(0x102b1);\n          return iVar4;\n        }" if (parenthesized_expression "(uVar2 - 4 < uVar12)" ( (binary_expression "uVar2 - 4 < uVar12" (binary_expression "uVar2 - 4" identifier - number_literal) < identifier) )) (compound_statement "{\n          iVar4 = sqlite3CorruptError(0x102b1);\n          return iVar4;\n        }" { (expression_statement "iVar4 = sqlite3CorruptError(0x102b1);" (assignment_expression "iVar4 = sqlite3CorruptError(0x102b1)" identifier = (call_expression "sqlite3CorruptError(0x102b1)" identifier (argument_list "(0x102b1)" ( number_literal )))) ;) (return_statement "return iVar4;" return identifier ;) })) (if_statement "if (uVar12 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar9 + 3 < uVar12) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }\n          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;\n          if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }\n          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;\n          uVar13 = *(ushort *)(puVar10 + uVar12);\n          uVar9 = uVar11;\n          uVar11 = uVar11 - uVar6 & 0xffff;\n        }" if (parenthesized_expression "(uVar12 == 0)" ( (binary_expression "uVar12 == 0" identifier == number_literal) )) (compound_statement "{\n          uVar2 = 0;\n        }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else if (uVar9 + 3 < uVar12) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }\n          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;\n          if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }\n          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;\n          uVar13 = *(ushort *)(puVar10 + uVar12);\n          uVar9 = uVar11;\n          uVar11 = uVar11 - uVar6 & 0xffff;\n        }" else (if_statement "if (uVar9 + 3 < uVar12) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }\n          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;\n          if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }\n          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;\n          uVar13 = *(ushort *)(puVar10 + uVar12);\n          uVar9 = uVar11;\n          uVar11 = uVar11 - uVar6 & 0xffff;\n        }" if (parenthesized_expression "(uVar9 + 3 < uVar12)" ( (binary_expression "uVar9 + 3 < uVar12" (binary_expression "uVar9 + 3" identifier + number_literal) < identifier) )) (compound_statement "{\n          uVar2 = 0;\n        }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n          if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }\n          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;\n          if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }\n          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;\n          uVar13 = *(ushort *)(puVar10 + uVar12);\n          uVar9 = uVar11;\n          uVar11 = uVar11 - uVar6 & 0xffff;\n        }" else (compound_statement "{\n          if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }\n          uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;\n          if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }\n          uVar2 = (int)(short)uVar13 - uVar9 & 0xff;\n          uVar13 = *(ushort *)(puVar10 + uVar12);\n          uVar9 = uVar11;\n          uVar11 = uVar11 - uVar6 & 0xffff;\n        }" { (if_statement "if (uVar12 < uVar9) {\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }" if (parenthesized_expression "(uVar12 < uVar9)" ( (binary_expression "uVar12 < uVar9" identifier < identifier) )) (compound_statement "{\n            iVar4 = sqlite3CorruptError(0x102bd);\n            return iVar4;\n          }" { (expression_statement "iVar4 = sqlite3CorruptError(0x102bd);" (assignment_expression "iVar4 = sqlite3CorruptError(0x102bd)" identifier = (call_expression "sqlite3CorruptError(0x102bd)" identifier (argument_list "(0x102bd)" ( number_literal )))) ;) (return_statement "return iVar4;" return identifier ;) })) (expression_statement "uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12;" (assignment_expression "uVar11 = *(ushort *)(puVar10 + uVar12 + 2) + uVar12" identifier = (binary_expression "*(ushort *)(puVar10 + uVar12 + 2) + uVar12" (pointer_expression "*(ushort *)(puVar10 + uVar12 + 2)" * (cast_expression "(ushort *)(puVar10 + uVar12 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar10 + uVar12 + 2)" ( (binary_expression "puVar10 + uVar12 + 2" (binary_expression "puVar10 + uVar12" identifier + identifier) + number_literal) )))) + identifier)) ;) (if_statement "if (uVar2 < uVar11) {\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }" if (parenthesized_expression "(uVar2 < uVar11)" ( (binary_expression "uVar2 < uVar11" identifier < identifier) )) (compound_statement "{\n            iVar4 = sqlite3CorruptError(0x102c0);\n            return iVar4;\n          }" { (expression_statement "iVar4 = sqlite3CorruptError(0x102c0);" (assignment_expression "iVar4 = sqlite3CorruptError(0x102c0)" identifier = (call_expression "sqlite3CorruptError(0x102c0)" identifier (argument_list "(0x102c0)" ( number_literal )))) ;) (return_statement "return iVar4;" return identifier ;) })) (expression_statement "uVar2 = (int)(short)uVar13 - uVar9 & 0xff;" (assignment_expression "uVar2 = (int)(short)uVar13 - uVar9 & 0xff" identifier = (binary_expression "(int)(short)uVar13 - uVar9 & 0xff" (binary_expression "(int)(short)uVar13 - uVar9" (cast_expression "(int)(short)uVar13" ( (type_descriptor "int" primitive_type) ) (cast_expression "(short)uVar13" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) - identifier) & number_literal)) ;) (expression_statement "uVar13 = *(ushort *)(puVar10 + uVar12);" (assignment_expression "uVar13 = *(ushort *)(puVar10 + uVar12)" identifier = (pointer_expression "*(ushort *)(puVar10 + uVar12)" * (cast_expression "(ushort *)(puVar10 + uVar12)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar10 + uVar12)" ( (binary_expression "puVar10 + uVar12" identifier + identifier) ))))) ;) (expression_statement "uVar9 = uVar11;" (assignment_expression "uVar9 = uVar11" identifier = identifier) ;) (expression_statement "uVar11 = uVar11 - uVar6 & 0xffff;" (assignment_expression "uVar11 = uVar11 - uVar6 & 0xffff" identifier = (binary_expression "uVar11 - uVar6 & 0xffff" (binary_expression "uVar11 - uVar6" identifier - identifier) & number_literal)) ;) }))))) (goto_statement "goto LAB_0004ad10;" goto statement_identifier ;) })) }) while (parenthesized_expression "(uVar5 + 4 <= uVar12)" ( (binary_expression "uVar5 + 4 <= uVar12" (binary_expression "uVar5 + 4" identifier + number_literal) <= identifier) )) ;) (if_statement "if (uVar12 != 0) {\n      iVar4 = sqlite3CorruptError(0x102ac);\n      return iVar4;\n    }" if (parenthesized_expression "(uVar12 != 0)" ( (binary_expression "uVar12 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar4 = sqlite3CorruptError(0x102ac);\n      return iVar4;\n    }" { (expression_statement "iVar4 = sqlite3CorruptError(0x102ac);" (assignment_expression "iVar4 = sqlite3CorruptError(0x102ac)" identifier = (call_expression "sqlite3CorruptError(0x102ac)" identifier (argument_list "(0x102ac)" ( number_literal )))) ;) (return_statement "return iVar4;" return identifier ;) })) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0004ad10:\n    if (uVar8 + 1 < uVar5) {\n      iVar4 = *(ushort *)(puVar10 + uVar5 + 2) + uVar5;\n      if ((int)uVar6 <= iVar4 + 3) {\n        if ((int)uVar6 < iVar4) {\n          iVar4 = sqlite3CorruptError(0x102cd);\n          return iVar4;\n        }\n        uVar2 = (uVar2 + uVar6) - iVar4 & 0xff;\n        uVar11 = uVar9 - uVar5 & 0xffff;\n        uVar6 = uVar5;\n      }\n    }" statement_identifier : (if_statement "if (uVar8 + 1 < uVar5) {\n      iVar4 = *(ushort *)(puVar10 + uVar5 + 2) + uVar5;\n      if ((int)uVar6 <= iVar4 + 3) {\n        if ((int)uVar6 < iVar4) {\n          iVar4 = sqlite3CorruptError(0x102cd);\n          return iVar4;\n        }\n        uVar2 = (uVar2 + uVar6) - iVar4 & 0xff;\n        uVar11 = uVar9 - uVar5 & 0xffff;\n        uVar6 = uVar5;\n      }\n    }" if (parenthesized_expression "(uVar8 + 1 < uVar5)" ( (binary_expression "uVar8 + 1 < uVar5" (binary_expression "uVar8 + 1" identifier + number_literal) < identifier) )) (compound_statement "{\n      iVar4 = *(ushort *)(puVar10 + uVar5 + 2) + uVar5;\n      if ((int)uVar6 <= iVar4 + 3) {\n        if ((int)uVar6 < iVar4) {\n          iVar4 = sqlite3CorruptError(0x102cd);\n          return iVar4;\n        }\n        uVar2 = (uVar2 + uVar6) - iVar4 & 0xff;\n        uVar11 = uVar9 - uVar5 & 0xffff;\n        uVar6 = uVar5;\n      }\n    }" { (expression_statement "iVar4 = *(ushort *)(puVar10 + uVar5 + 2) + uVar5;" (assignment_expression "iVar4 = *(ushort *)(puVar10 + uVar5 + 2) + uVar5" identifier = (binary_expression "*(ushort *)(puVar10 + uVar5 + 2) + uVar5" (pointer_expression "*(ushort *)(puVar10 + uVar5 + 2)" * (cast_expression "(ushort *)(puVar10 + uVar5 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar10 + uVar5 + 2)" ( (binary_expression "puVar10 + uVar5 + 2" (binary_expression "puVar10 + uVar5" identifier + identifier) + number_literal) )))) + identifier)) ;) (if_statement "if ((int)uVar6 <= iVar4 + 3) {\n        if ((int)uVar6 < iVar4) {\n          iVar4 = sqlite3CorruptError(0x102cd);\n          return iVar4;\n        }\n        uVar2 = (uVar2 + uVar6) - iVar4 & 0xff;\n        uVar11 = uVar9 - uVar5 & 0xffff;\n        uVar6 = uVar5;\n      }" if (parenthesized_expression "((int)uVar6 <= iVar4 + 3)" ( (binary_expression "(int)uVar6 <= iVar4 + 3" (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier) <= (binary_expression "iVar4 + 3" identifier + number_literal)) )) (compound_statement "{\n        if ((int)uVar6 < iVar4) {\n          iVar4 = sqlite3CorruptError(0x102cd);\n          return iVar4;\n        }\n        uVar2 = (uVar2 + uVar6) - iVar4 & 0xff;\n        uVar11 = uVar9 - uVar5 & 0xffff;\n        uVar6 = uVar5;\n      }" { (if_statement "if ((int)uVar6 < iVar4) {\n          iVar4 = sqlite3CorruptError(0x102cd);\n          return iVar4;\n        }" if (parenthesized_expression "((int)uVar6 < iVar4)" ( (binary_expression "(int)uVar6 < iVar4" (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n          iVar4 = sqlite3CorruptError(0x102cd);\n          return iVar4;\n        }" { (expression_statement "iVar4 = sqlite3CorruptError(0x102cd);" (assignment_expression "iVar4 = sqlite3CorruptError(0x102cd)" identifier = (call_expression "sqlite3CorruptError(0x102cd)" identifier (argument_list "(0x102cd)" ( number_literal )))) ;) (return_statement "return iVar4;" return identifier ;) })) (expression_statement "uVar2 = (uVar2 + uVar6) - iVar4 & 0xff;" (assignment_expression "uVar2 = (uVar2 + uVar6) - iVar4 & 0xff" identifier = (binary_expression "(uVar2 + uVar6) - iVar4 & 0xff" (binary_expression "(uVar2 + uVar6) - iVar4" (parenthesized_expression "(uVar2 + uVar6)" ( (binary_expression "uVar2 + uVar6" identifier + identifier) )) - identifier) & number_literal)) ;) (expression_statement "uVar11 = uVar9 - uVar5 & 0xffff;" (assignment_expression "uVar11 = uVar9 - uVar5 & 0xffff" identifier = (binary_expression "uVar9 - uVar5 & 0xffff" (binary_expression "uVar9 - uVar5" identifier - identifier) & number_literal)) ;) (expression_statement "uVar6 = uVar5;" (assignment_expression "uVar6 = uVar5" identifier = identifier) ;) })) }))) (expression_statement "bVar1 = puVar10[uVar8 + 7];" (assignment_expression "bVar1 = puVar10[uVar8 + 7]" identifier = (subscript_expression "puVar10[uVar8 + 7]" identifier [ (binary_expression "uVar8 + 7" identifier + number_literal) ])) ;) (if_statement "if (bVar1 < uVar2) {\n      iVar4 = sqlite3CorruptError(0x102d3);\n      return iVar4;\n    }" if (parenthesized_expression "(bVar1 < uVar2)" ( (binary_expression "bVar1 < uVar2" identifier < identifier) )) (compound_statement "{\n      iVar4 = sqlite3CorruptError(0x102d3);\n      return iVar4;\n    }" { (expression_statement "iVar4 = sqlite3CorruptError(0x102d3);" (assignment_expression "iVar4 = sqlite3CorruptError(0x102d3)" identifier = (call_expression "sqlite3CorruptError(0x102d3)" identifier (argument_list "(0x102d3)" ( number_literal )))) ;) (return_statement "return iVar4;" return identifier ;) })) (expression_statement "puVar10[uVar8 + 7] = bVar1 - (char)uVar2;" (assignment_expression "puVar10[uVar8 + 7] = bVar1 - (char)uVar2" (subscript_expression "puVar10[uVar8 + 7]" identifier [ (binary_expression "uVar8 + 7" identifier + number_literal) ]) = (binary_expression "bVar1 - (char)uVar2" identifier - (cast_expression "(char)uVar2" ( (type_descriptor "char" primitive_type) ) identifier))) ;) })) (expression_statement "uVar12 = (uint)CONCAT11(puVar10[uVar8 + 5],puVar10[uVar8 + 6]);" (assignment_expression "uVar12 = (uint)CONCAT11(puVar10[uVar8 + 5],puVar10[uVar8 + 6])" identifier = (cast_expression "(uint)CONCAT11(puVar10[uVar8 + 5],puVar10[uVar8 + 6])" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT11(puVar10[uVar8 + 5],puVar10[uVar8 + 6])" identifier (argument_list "(puVar10[uVar8 + 5],puVar10[uVar8 + 6])" ( (subscript_expression "puVar10[uVar8 + 5]" identifier [ (binary_expression "uVar8 + 5" identifier + number_literal) ]) , (subscript_expression "puVar10[uVar8 + 6]" identifier [ (binary_expression "uVar8 + 6" identifier + number_literal) ]) ))))) ;) (expression_statement "uVar3 = (u8)(uVar13 >> 8);" (assignment_expression "uVar3 = (u8)(uVar13 >> 8)" identifier = (call_expression "(u8)(uVar13 >> 8)" (parenthesized_expression "(u8)" ( identifier )) (argument_list "(uVar13 >> 8)" ( (binary_expression "uVar13 >> 8" identifier >> number_literal) )))) ;) (if_statement "if (uVar12 < uVar6) {\n    puVar10[uVar5] = (u8)(uVar6 >> 8);\n    (puVar10 + uVar5)[1] = (u8)uVar6;\n  }\n  else {\n    if (uVar6 < uVar12) {\n      iVar4 = sqlite3CorruptError(0x102db);\n      return iVar4;\n    }\n    if (uVar5 != uVar8 + 1) {\n      iVar4 = sqlite3CorruptError(0x102dc);\n      return iVar4;\n    }\n    puVar10[uVar8 + 1] = uVar3;\n    puVar10[uVar8 + 2] = (u8)uVar13;\n    puVar10[uVar8 + 5] = (u8)(uVar9 >> 8);\n    puVar10[uVar8 + 6] = (u8)uVar9;\n  }" if (parenthesized_expression "(uVar12 < uVar6)" ( (binary_expression "uVar12 < uVar6" identifier < identifier) )) (compound_statement "{\n    puVar10[uVar5] = (u8)(uVar6 >> 8);\n    (puVar10 + uVar5)[1] = (u8)uVar6;\n  }" { (expression_statement "puVar10[uVar5] = (u8)(uVar6 >> 8);" (assignment_expression "puVar10[uVar5] = (u8)(uVar6 >> 8)" (subscript_expression "puVar10[uVar5]" identifier [ identifier ]) = (call_expression "(u8)(uVar6 >> 8)" (parenthesized_expression "(u8)" ( identifier )) (argument_list "(uVar6 >> 8)" ( (binary_expression "uVar6 >> 8" identifier >> number_literal) )))) ;) (expression_statement "(puVar10 + uVar5)[1] = (u8)uVar6;" (assignment_expression "(puVar10 + uVar5)[1] = (u8)uVar6" (subscript_expression "(puVar10 + uVar5)[1]" (parenthesized_expression "(puVar10 + uVar5)" ( (binary_expression "puVar10 + uVar5" identifier + identifier) )) [ number_literal ]) = (cast_expression "(u8)uVar6" ( (type_descriptor "u8" type_identifier) ) identifier)) ;) }) (else_clause "else {\n    if (uVar6 < uVar12) {\n      iVar4 = sqlite3CorruptError(0x102db);\n      return iVar4;\n    }\n    if (uVar5 != uVar8 + 1) {\n      iVar4 = sqlite3CorruptError(0x102dc);\n      return iVar4;\n    }\n    puVar10[uVar8 + 1] = uVar3;\n    puVar10[uVar8 + 2] = (u8)uVar13;\n    puVar10[uVar8 + 5] = (u8)(uVar9 >> 8);\n    puVar10[uVar8 + 6] = (u8)uVar9;\n  }" else (compound_statement "{\n    if (uVar6 < uVar12) {\n      iVar4 = sqlite3CorruptError(0x102db);\n      return iVar4;\n    }\n    if (uVar5 != uVar8 + 1) {\n      iVar4 = sqlite3CorruptError(0x102dc);\n      return iVar4;\n    }\n    puVar10[uVar8 + 1] = uVar3;\n    puVar10[uVar8 + 2] = (u8)uVar13;\n    puVar10[uVar8 + 5] = (u8)(uVar9 >> 8);\n    puVar10[uVar8 + 6] = (u8)uVar9;\n  }" { (if_statement "if (uVar6 < uVar12) {\n      iVar4 = sqlite3CorruptError(0x102db);\n      return iVar4;\n    }" if (parenthesized_expression "(uVar6 < uVar12)" ( (binary_expression "uVar6 < uVar12" identifier < identifier) )) (compound_statement "{\n      iVar4 = sqlite3CorruptError(0x102db);\n      return iVar4;\n    }" { (expression_statement "iVar4 = sqlite3CorruptError(0x102db);" (assignment_expression "iVar4 = sqlite3CorruptError(0x102db)" identifier = (call_expression "sqlite3CorruptError(0x102db)" identifier (argument_list "(0x102db)" ( number_literal )))) ;) (return_statement "return iVar4;" return identifier ;) })) (if_statement "if (uVar5 != uVar8 + 1) {\n      iVar4 = sqlite3CorruptError(0x102dc);\n      return iVar4;\n    }" if (parenthesized_expression "(uVar5 != uVar8 + 1)" ( (binary_expression "uVar5 != uVar8 + 1" identifier != (binary_expression "uVar8 + 1" identifier + number_literal)) )) (compound_statement "{\n      iVar4 = sqlite3CorruptError(0x102dc);\n      return iVar4;\n    }" { (expression_statement "iVar4 = sqlite3CorruptError(0x102dc);" (assignment_expression "iVar4 = sqlite3CorruptError(0x102dc)" identifier = (call_expression "sqlite3CorruptError(0x102dc)" identifier (argument_list "(0x102dc)" ( number_literal )))) ;) (return_statement "return iVar4;" return identifier ;) })) (expression_statement "puVar10[uVar8 + 1] = uVar3;" (assignment_expression "puVar10[uVar8 + 1] = uVar3" (subscript_expression "puVar10[uVar8 + 1]" identifier [ (binary_expression "uVar8 + 1" identifier + number_literal) ]) = identifier) ;) (expression_statement "puVar10[uVar8 + 2] = (u8)uVar13;" (assignment_expression "puVar10[uVar8 + 2] = (u8)uVar13" (subscript_expression "puVar10[uVar8 + 2]" identifier [ (binary_expression "uVar8 + 2" identifier + number_literal) ]) = (cast_expression "(u8)uVar13" ( (type_descriptor "u8" type_identifier) ) identifier)) ;) (expression_statement "puVar10[uVar8 + 5] = (u8)(uVar9 >> 8);" (assignment_expression "puVar10[uVar8 + 5] = (u8)(uVar9 >> 8)" (subscript_expression "puVar10[uVar8 + 5]" identifier [ (binary_expression "uVar8 + 5" identifier + number_literal) ]) = (call_expression "(u8)(uVar9 >> 8)" (parenthesized_expression "(u8)" ( identifier )) (argument_list "(uVar9 >> 8)" ( (binary_expression "uVar9 >> 8" identifier >> number_literal) )))) ;) (expression_statement "puVar10[uVar8 + 6] = (u8)uVar9;" (assignment_expression "puVar10[uVar8 + 6] = (u8)uVar9" (subscript_expression "puVar10[uVar8 + 6]" identifier [ (binary_expression "uVar8 + 6" identifier + number_literal) ]) = (cast_expression "(u8)uVar9" ( (type_descriptor "u8" type_identifier) ) identifier)) ;) }))) (if_statement "if ((pPage->pBt->btsFlags & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(puVar10 + uVar6,0,uVar11);\n  }" if (parenthesized_expression "((pPage->pBt->btsFlags & 0xc) != 0)" ( (binary_expression "(pPage->pBt->btsFlags & 0xc) != 0" (parenthesized_expression "(pPage->pBt->btsFlags & 0xc)" ( (binary_expression "pPage->pBt->btsFlags & 0xc" (field_expression "pPage->pBt->btsFlags" (field_expression "pPage->pBt" identifier -> field_identifier) -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    (*(code *)PTR_memset_000f644c)(puVar10 + uVar6,0,uVar11);\n  }" { (expression_statement "(*(code *)PTR_memset_000f644c)(puVar10 + uVar6,0,uVar11);" (call_expression "(*(code *)PTR_memset_000f644c)(puVar10 + uVar6,0,uVar11)" (parenthesized_expression "(*(code *)PTR_memset_000f644c)" ( (pointer_expression "*(code *)PTR_memset_000f644c" * (cast_expression "(code *)PTR_memset_000f644c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar10 + uVar6,0,uVar11)" ( (binary_expression "puVar10 + uVar6" identifier + identifier) , number_literal , identifier ))) ;) })) (expression_statement "puVar10 = puVar10 + uVar6;" (assignment_expression "puVar10 = puVar10 + uVar6" identifier = (binary_expression "puVar10 + uVar6" identifier + identifier)) ;) (expression_statement "*puVar10 = uVar3;" (assignment_expression "*puVar10 = uVar3" (pointer_expression "*puVar10" * identifier) = identifier) ;) (expression_statement "puVar10[1] = (u8)uVar13;" (assignment_expression "puVar10[1] = (u8)uVar13" (subscript_expression "puVar10[1]" identifier [ number_literal ]) = (cast_expression "(u8)uVar13" ( (type_descriptor "u8" type_identifier) ) identifier)) ;) (expression_statement "puVar10[2] = (u8)(uVar11 >> 8);" (assignment_expression "puVar10[2] = (u8)(uVar11 >> 8)" (subscript_expression "puVar10[2]" identifier [ number_literal ]) = (call_expression "(u8)(uVar11 >> 8)" (parenthesized_expression "(u8)" ( identifier )) (argument_list "(uVar11 >> 8)" ( (binary_expression "uVar11 >> 8" identifier >> number_literal) )))) ;) (expression_statement "puVar10[3] = (u8)uVar11;" (assignment_expression "puVar10[3] = (u8)uVar11" (subscript_expression "puVar10[3]" identifier [ number_literal ]) = (cast_expression "(u8)uVar11" ( (type_descriptor "u8" type_identifier) ) identifier)) ;) (expression_statement "pPage->nFree = pPage->nFree + uVar7;" (assignment_expression "pPage->nFree = pPage->nFree + uVar7" (field_expression "pPage->nFree" identifier -> field_identifier) = (binary_expression "pPage->nFree + uVar7" (field_expression "pPage->nFree" identifier -> field_identifier) + identifier)) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_0004ac50(int param_1,uint param_2,uint param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  undefined1 uVar4;\n  undefined4 uVar3;\n  int iVar5;\n  byte *pbVar6;\n  undefined1 *puVar7;\n  uint uVar8;\n  undefined1 *puVar9;\n  uint uVar10;\n  uint uVar11;\n  int iVar12;\n  uint uVar13;\n  ushort uVar15;\n  uint uVar14;\n  \n  uVar11 = param_2 + param_3;\n  iVar12 = *(int *)(param_1 + 0x38);\n  uVar10 = (uint)*(byte *)(param_1 + 9);\n  uVar8 = uVar10 + 1;\n  uVar14 = uVar8;\n  uVar13 = param_3;\n  if ((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')) {\n    do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);\n    if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }\n    pbVar6 = (byte *)(iVar12 + uVar10 + 7);\n    bVar1 = *pbVar6;\n    if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }\n    *pbVar6 = bVar1 - (char)uVar2;\n  }\n  puVar9 = (undefined1 *)(iVar12 + uVar10 + 5);\n  puVar7 = (undefined1 *)(iVar12 + uVar10 + 6);\n  uVar14 = (uint)CONCAT11(*puVar9,*puVar7);\n  uVar4 = (undefined1)(uVar15 >> 8);\n  if (uVar14 < param_2) {\n    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);\n    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;\n  }\n  else {\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }\n  if ((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);\n  }\n  puVar7 = (undefined1 *)(iVar12 + param_2);\n  *puVar7 = uVar4;\n  puVar7[1] = (char)uVar15;\n  puVar7[2] = (char)(uVar13 >> 8);\n  puVar7[3] = (char)uVar13;\n  *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3;\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_0004ac50(int param_1,uint param_2,uint param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  undefined1 uVar4;\n  undefined4 uVar3;\n  int iVar5;\n  byte *pbVar6;\n  undefined1 *puVar7;\n  uint uVar8;\n  undefined1 *puVar9;\n  uint uVar10;\n  uint uVar11;\n  int iVar12;\n  uint uVar13;\n  ushort uVar15;\n  uint uVar14;\n  \n  uVar11 = param_2 + param_3;\n  iVar12 = *(int *)(param_1 + 0x38);\n  uVar10 = (uint)*(byte *)(param_1 + 9);\n  uVar8 = uVar10 + 1;\n  uVar14 = uVar8;\n  uVar13 = param_3;\n  if ((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')) {\n    do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);\n    if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }\n    pbVar6 = (byte *)(iVar12 + uVar10 + 7);\n    bVar1 = *pbVar6;\n    if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }\n    *pbVar6 = bVar1 - (char)uVar2;\n  }\n  puVar9 = (undefined1 *)(iVar12 + uVar10 + 5);\n  puVar7 = (undefined1 *)(iVar12 + uVar10 + 6);\n  uVar14 = (uint)CONCAT11(*puVar9,*puVar7);\n  uVar4 = (undefined1)(uVar15 >> 8);\n  if (uVar14 < param_2) {\n    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);\n    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;\n  }\n  else {\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }\n  if ((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);\n  }\n  puVar7 = (undefined1 *)(iVar12 + param_2);\n  *puVar7 = uVar4;\n  puVar7[1] = (char)uVar15;\n  puVar7[2] = (char)(uVar13 >> 8);\n  puVar7[3] = (char)uVar13;\n  *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3;\n  return 0;\n}" type_identifier (function_declarator "FUN_0004ac50(int param_1,uint param_2,uint param_3)" identifier (parameter_list "(int param_1,uint param_2,uint param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  undefined1 uVar4;\n  undefined4 uVar3;\n  int iVar5;\n  byte *pbVar6;\n  undefined1 *puVar7;\n  uint uVar8;\n  undefined1 *puVar9;\n  uint uVar10;\n  uint uVar11;\n  int iVar12;\n  uint uVar13;\n  ushort uVar15;\n  uint uVar14;\n  \n  uVar11 = param_2 + param_3;\n  iVar12 = *(int *)(param_1 + 0x38);\n  uVar10 = (uint)*(byte *)(param_1 + 9);\n  uVar8 = uVar10 + 1;\n  uVar14 = uVar8;\n  uVar13 = param_3;\n  if ((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')) {\n    do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);\n    if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }\n    pbVar6 = (byte *)(iVar12 + uVar10 + 7);\n    bVar1 = *pbVar6;\n    if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }\n    *pbVar6 = bVar1 - (char)uVar2;\n  }\n  puVar9 = (undefined1 *)(iVar12 + uVar10 + 5);\n  puVar7 = (undefined1 *)(iVar12 + uVar10 + 6);\n  uVar14 = (uint)CONCAT11(*puVar9,*puVar7);\n  uVar4 = (undefined1)(uVar15 >> 8);\n  if (uVar14 < param_2) {\n    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);\n    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;\n  }\n  else {\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }\n  if ((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);\n  }\n  puVar7 = (undefined1 *)(iVar12 + param_2);\n  *puVar7 = uVar4;\n  puVar7[1] = (char)uVar15;\n  puVar7[2] = (char)(uVar13 >> 8);\n  puVar7[3] = (char)uVar13;\n  *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3;\n  return 0;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "undefined1 uVar4;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "undefined1 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "undefined1 *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "uint uVar10;" type_identifier identifier ;) (declaration "uint uVar11;" type_identifier identifier ;) (declaration "int iVar12;" primitive_type identifier ;) (declaration "uint uVar13;" type_identifier identifier ;) (declaration "ushort uVar15;" type_identifier identifier ;) (declaration "uint uVar14;" type_identifier identifier ;) (expression_statement "uVar11 = param_2 + param_3;" (assignment_expression "uVar11 = param_2 + param_3" identifier = (binary_expression "param_2 + param_3" identifier + identifier)) ;) (expression_statement "iVar12 = *(int *)(param_1 + 0x38);" (assignment_expression "iVar12 = *(int *)(param_1 + 0x38)" identifier = (pointer_expression "*(int *)(param_1 + 0x38)" * (cast_expression "(int *)(param_1 + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x38)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) ))))) ;) (expression_statement "uVar10 = (uint)*(byte *)(param_1 + 9);" (assignment_expression "uVar10 = (uint)*(byte *)(param_1 + 9)" identifier = (binary_expression "(uint)*(byte *)(param_1 + 9)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(param_1 + 9)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) ))))) ;) (expression_statement "uVar8 = uVar10 + 1;" (assignment_expression "uVar8 = uVar10 + 1" identifier = (binary_expression "uVar10 + 1" identifier + number_literal)) ;) (expression_statement "uVar14 = uVar8;" (assignment_expression "uVar14 = uVar8" identifier = identifier) ;) (expression_statement "uVar13 = param_3;" (assignment_expression "uVar13 = param_3" identifier = identifier) ;) (if_statement "if ((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')) {\n    do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);\n    if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }\n    pbVar6 = (byte *)(iVar12 + uVar10 + 7);\n    bVar1 = *pbVar6;\n    if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }\n    *pbVar6 = bVar1 - (char)uVar2;\n  }" if (parenthesized_expression "((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0'))" ( (binary_expression "(*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')" (parenthesized_expression "(*(char *)(iVar12 + uVar8 + 1) != '\0')" ( (binary_expression "*(char *)(iVar12 + uVar8 + 1) != '\0'" (pointer_expression "*(char *)(iVar12 + uVar8 + 1)" * (cast_expression "(char *)(iVar12 + uVar8 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar8 + 1)" ( (binary_expression "iVar12 + uVar8 + 1" (binary_expression "iVar12 + uVar8" identifier + identifier) + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')" ( (comma_expression "uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0'" (assignment_expression "uVar15 = 0" identifier = number_literal) , (binary_expression "*(char *)(iVar12 + uVar8) != '\0'" (pointer_expression "*(char *)(iVar12 + uVar8)" * (cast_expression "(char *)(iVar12 + uVar8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar8)" ( (binary_expression "iVar12 + uVar8" identifier + identifier) )))) != (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n    do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);\n    if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }\n    pbVar6 = (byte *)(iVar12 + uVar10 + 7);\n    bVar1 = *pbVar6;\n    if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }\n    *pbVar6 = bVar1 - (char)uVar2;\n  }" { (do_statement "do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);" do (compound_statement "{\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    }" { (expression_statement "uVar8 = uVar14;" (assignment_expression "uVar8 = uVar14" identifier = identifier) ;) (expression_statement "uVar15 = *(ushort *)(iVar12 + uVar8);" (assignment_expression "uVar15 = *(ushort *)(iVar12 + uVar8)" identifier = (pointer_expression "*(ushort *)(iVar12 + uVar8)" * (cast_expression "(ushort *)(iVar12 + uVar8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar8)" ( (binary_expression "iVar12 + uVar8" identifier + identifier) ))))) ;) (expression_statement "uVar14 = (uint)uVar15;" (assignment_expression "uVar14 = (uint)uVar15" identifier = (cast_expression "(uint)uVar15" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }" if (parenthesized_expression "(param_2 <= uVar14)" ( (binary_expression "param_2 <= uVar14" identifier <= identifier) )) (compound_statement "{\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }" { (expression_statement "uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);" (assignment_expression "uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28)" identifier = (pointer_expression "*(uint *)(*(int *)(param_1 + 0x34) + 0x28)" * (cast_expression "(uint *)(*(int *)(param_1 + 0x34) + 0x28)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x28)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x28" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) + number_literal) ))))) ;) (if_statement "if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }" if (parenthesized_expression "(uVar2 - 4 < uVar14)" ( (binary_expression "uVar2 - 4 < uVar14" (binary_expression "uVar2 - 4" identifier - number_literal) < identifier) )) (compound_statement "{\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }" { (expression_statement "uVar3 = FUN_0004958c(&DAT_000102b1);" (assignment_expression "uVar3 = FUN_0004958c(&DAT_000102b1)" identifier = (call_expression "FUN_0004958c(&DAT_000102b1)" identifier (argument_list "(&DAT_000102b1)" ( (pointer_expression "&DAT_000102b1" & identifier) )))) ;) (return_statement "return uVar3;" return identifier ;) })) (if_statement "if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" if (parenthesized_expression "(uVar14 == 0)" ( (binary_expression "uVar14 == 0" identifier == number_literal) )) (compound_statement "{\n          uVar2 = 0;\n        }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" else (if_statement "if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" if (parenthesized_expression "(uVar11 + 3 < uVar14)" ( (binary_expression "uVar11 + 3 < uVar14" (binary_expression "uVar11 + 3" identifier + number_literal) < identifier) )) (compound_statement "{\n          uVar2 = 0;\n        }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" else (compound_statement "{\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" { (if_statement "if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }" if (parenthesized_expression "(uVar14 < uVar11)" ( (binary_expression "uVar14 < uVar11" identifier < identifier) )) (compound_statement "{\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }" { (expression_statement "uVar3 = FUN_0004958c(0x102bd);" (assignment_expression "uVar3 = FUN_0004958c(0x102bd)" identifier = (call_expression "FUN_0004958c(0x102bd)" identifier (argument_list "(0x102bd)" ( number_literal )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;" (assignment_expression "uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14" identifier = (binary_expression "*(ushort *)(iVar12 + uVar14 + 2) + uVar14" (pointer_expression "*(ushort *)(iVar12 + uVar14 + 2)" * (cast_expression "(ushort *)(iVar12 + uVar14 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar14 + 2)" ( (binary_expression "iVar12 + uVar14 + 2" (binary_expression "iVar12 + uVar14" identifier + identifier) + number_literal) )))) + identifier)) ;) (if_statement "if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }" if (parenthesized_expression "(uVar2 < uVar13)" ( (binary_expression "uVar2 < uVar13" identifier < identifier) )) (compound_statement "{\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }" { (expression_statement "uVar3 = FUN_0004958c(0x102c0);" (assignment_expression "uVar3 = FUN_0004958c(0x102c0)" identifier = (call_expression "FUN_0004958c(0x102c0)" identifier (argument_list "(0x102c0)" ( number_literal )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "uVar2 = (int)(short)uVar15 - uVar11 & 0xff;" (assignment_expression "uVar2 = (int)(short)uVar15 - uVar11 & 0xff" identifier = (binary_expression "(int)(short)uVar15 - uVar11 & 0xff" (binary_expression "(int)(short)uVar15 - uVar11" (cast_expression "(int)(short)uVar15" ( (type_descriptor "int" primitive_type) ) (cast_expression "(short)uVar15" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) - identifier) & number_literal)) ;) (expression_statement "uVar15 = *(ushort *)(iVar12 + uVar14);" (assignment_expression "uVar15 = *(ushort *)(iVar12 + uVar14)" identifier = (pointer_expression "*(ushort *)(iVar12 + uVar14)" * (cast_expression "(ushort *)(iVar12 + uVar14)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar14)" ( (binary_expression "iVar12 + uVar14" identifier + identifier) ))))) ;) (expression_statement "uVar11 = uVar13;" (assignment_expression "uVar11 = uVar13" identifier = identifier) ;) (expression_statement "uVar13 = uVar13 - param_2 & 0xffff;" (assignment_expression "uVar13 = uVar13 - param_2 & 0xffff" identifier = (binary_expression "uVar13 - param_2 & 0xffff" (binary_expression "uVar13 - param_2" identifier - identifier) & number_literal)) ;) }))))) (goto_statement "goto LAB_0004ad10;" goto statement_identifier ;) })) }) while (parenthesized_expression "(uVar8 + 4 <= uVar14)" ( (binary_expression "uVar8 + 4 <= uVar14" (binary_expression "uVar8 + 4" identifier + number_literal) <= identifier) )) ;) (if_statement "if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }" if (parenthesized_expression "(uVar14 != 0)" ( (binary_expression "uVar14 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }" { (expression_statement "uVar3 = FUN_0004958c(&DAT_000102ac);" (assignment_expression "uVar3 = FUN_0004958c(&DAT_000102ac)" identifier = (call_expression "FUN_0004958c(&DAT_000102ac)" identifier (argument_list "(&DAT_000102ac)" ( (pointer_expression "&DAT_000102ac" & identifier) )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }" statement_identifier : (if_statement "if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }" if (parenthesized_expression "(uVar10 + 1 < uVar8)" ( (binary_expression "uVar10 + 1 < uVar8" (binary_expression "uVar10 + 1" identifier + number_literal) < identifier) )) (compound_statement "{\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }" { (expression_statement "iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;" (assignment_expression "iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8" identifier = (binary_expression "*(ushort *)(iVar12 + uVar8 + 2) + uVar8" (pointer_expression "*(ushort *)(iVar12 + uVar8 + 2)" * (cast_expression "(ushort *)(iVar12 + uVar8 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar8 + 2)" ( (binary_expression "iVar12 + uVar8 + 2" (binary_expression "iVar12 + uVar8" identifier + identifier) + number_literal) )))) + identifier)) ;) (if_statement "if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }" if (parenthesized_expression "((int)param_2 <= iVar5 + 3)" ( (binary_expression "(int)param_2 <= iVar5 + 3" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) <= (binary_expression "iVar5 + 3" identifier + number_literal)) )) (compound_statement "{\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }" { (if_statement "if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }" if (parenthesized_expression "((int)param_2 < iVar5)" ( (binary_expression "(int)param_2 < iVar5" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }" { (expression_statement "uVar3 = FUN_0004958c(0x102cd);" (assignment_expression "uVar3 = FUN_0004958c(0x102cd)" identifier = (call_expression "FUN_0004958c(0x102cd)" identifier (argument_list "(0x102cd)" ( number_literal )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "uVar2 = (uVar2 + param_2) - iVar5 & 0xff;" (assignment_expression "uVar2 = (uVar2 + param_2) - iVar5 & 0xff" identifier = (binary_expression "(uVar2 + param_2) - iVar5 & 0xff" (binary_expression "(uVar2 + param_2) - iVar5" (parenthesized_expression "(uVar2 + param_2)" ( (binary_expression "uVar2 + param_2" identifier + identifier) )) - identifier) & number_literal)) ;) (expression_statement "uVar13 = uVar11 - uVar8 & 0xffff;" (assignment_expression "uVar13 = uVar11 - uVar8 & 0xffff" identifier = (binary_expression "uVar11 - uVar8 & 0xffff" (binary_expression "uVar11 - uVar8" identifier - identifier) & number_literal)) ;) (expression_statement "param_2 = uVar8;" (assignment_expression "param_2 = uVar8" identifier = identifier) ;) })) }))) (expression_statement "pbVar6 = (byte *)(iVar12 + uVar10 + 7);" (assignment_expression "pbVar6 = (byte *)(iVar12 + uVar10 + 7)" identifier = (cast_expression "(byte *)(iVar12 + uVar10 + 7)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar10 + 7)" ( (binary_expression "iVar12 + uVar10 + 7" (binary_expression "iVar12 + uVar10" identifier + identifier) + number_literal) )))) ;) (expression_statement "bVar1 = *pbVar6;" (assignment_expression "bVar1 = *pbVar6" identifier = (pointer_expression "*pbVar6" * identifier)) ;) (if_statement "if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }" if (parenthesized_expression "(bVar1 < uVar2)" ( (binary_expression "bVar1 < uVar2" identifier < identifier) )) (compound_statement "{\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }" { (expression_statement "uVar3 = FUN_0004958c(0x102d3);" (assignment_expression "uVar3 = FUN_0004958c(0x102d3)" identifier = (call_expression "FUN_0004958c(0x102d3)" identifier (argument_list "(0x102d3)" ( number_literal )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "*pbVar6 = bVar1 - (char)uVar2;" (assignment_expression "*pbVar6 = bVar1 - (char)uVar2" (pointer_expression "*pbVar6" * identifier) = (binary_expression "bVar1 - (char)uVar2" identifier - (cast_expression "(char)uVar2" ( (type_descriptor "char" primitive_type) ) identifier))) ;) })) (expression_statement "puVar9 = (undefined1 *)(iVar12 + uVar10 + 5);" (assignment_expression "puVar9 = (undefined1 *)(iVar12 + uVar10 + 5)" identifier = (cast_expression "(undefined1 *)(iVar12 + uVar10 + 5)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar10 + 5)" ( (binary_expression "iVar12 + uVar10 + 5" (binary_expression "iVar12 + uVar10" identifier + identifier) + number_literal) )))) ;) (expression_statement "puVar7 = (undefined1 *)(iVar12 + uVar10 + 6);" (assignment_expression "puVar7 = (undefined1 *)(iVar12 + uVar10 + 6)" identifier = (cast_expression "(undefined1 *)(iVar12 + uVar10 + 6)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar10 + 6)" ( (binary_expression "iVar12 + uVar10 + 6" (binary_expression "iVar12 + uVar10" identifier + identifier) + number_literal) )))) ;) (expression_statement "uVar14 = (uint)CONCAT11(*puVar9,*puVar7);" (assignment_expression "uVar14 = (uint)CONCAT11(*puVar9,*puVar7)" identifier = (cast_expression "(uint)CONCAT11(*puVar9,*puVar7)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT11(*puVar9,*puVar7)" identifier (argument_list "(*puVar9,*puVar7)" ( (pointer_expression "*puVar9" * identifier) , (pointer_expression "*puVar7" * identifier) ))))) ;) (expression_statement "uVar4 = (undefined1)(uVar15 >> 8);" (assignment_expression "uVar4 = (undefined1)(uVar15 >> 8)" identifier = (call_expression "(undefined1)(uVar15 >> 8)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(uVar15 >> 8)" ( (binary_expression "uVar15 >> 8" identifier >> number_literal) )))) ;) (if_statement "if (uVar14 < param_2) {\n    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);\n    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;\n  }\n  else {\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }" if (parenthesized_expression "(uVar14 < param_2)" ( (binary_expression "uVar14 < param_2" identifier < identifier) )) (compound_statement "{\n    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);\n    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;\n  }" { (expression_statement "*(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);" (assignment_expression "*(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8)" (pointer_expression "*(undefined1 *)(iVar12 + uVar8)" * (cast_expression "(undefined1 *)(iVar12 + uVar8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar8)" ( (binary_expression "iVar12 + uVar8" identifier + identifier) )))) = (cast_expression "(char)(param_2 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(param_2 >> 8)" ( (binary_expression "param_2 >> 8" identifier >> number_literal) )))) ;) (expression_statement "((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;" (assignment_expression "((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2" (subscript_expression "((undefined1 *)(iVar12 + uVar8))[1]" (parenthesized_expression "((undefined1 *)(iVar12 + uVar8))" ( (cast_expression "(undefined1 *)(iVar12 + uVar8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar8)" ( (binary_expression "iVar12 + uVar8" identifier + identifier) ))) )) [ number_literal ]) = (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) }) (else_clause "else {\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }" else (compound_statement "{\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }" { (if_statement "if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }" if (parenthesized_expression "(param_2 < uVar14)" ( (binary_expression "param_2 < uVar14" identifier < identifier) )) (compound_statement "{\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }" { (expression_statement "uVar3 = FUN_0004958c(0x102db);" (assignment_expression "uVar3 = FUN_0004958c(0x102db)" identifier = (call_expression "FUN_0004958c(0x102db)" identifier (argument_list "(0x102db)" ( number_literal )))) ;) (return_statement "return uVar3;" return identifier ;) })) (if_statement "if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }" if (parenthesized_expression "(uVar8 != uVar10 + 1)" ( (binary_expression "uVar8 != uVar10 + 1" identifier != (binary_expression "uVar10 + 1" identifier + number_literal)) )) (compound_statement "{\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }" { (expression_statement "uVar3 = FUN_0004958c(0x102dc);" (assignment_expression "uVar3 = FUN_0004958c(0x102dc)" identifier = (call_expression "FUN_0004958c(0x102dc)" identifier (argument_list "(0x102dc)" ( number_literal )))) ;) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "*(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;" (assignment_expression "*(undefined1 *)(iVar12 + uVar10 + 1) = uVar4" (pointer_expression "*(undefined1 *)(iVar12 + uVar10 + 1)" * (cast_expression "(undefined1 *)(iVar12 + uVar10 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar10 + 1)" ( (binary_expression "iVar12 + uVar10 + 1" (binary_expression "iVar12 + uVar10" identifier + identifier) + number_literal) )))) = identifier) ;) (expression_statement "*(char *)(iVar12 + uVar10 + 2) = (char)uVar15;" (assignment_expression "*(char *)(iVar12 + uVar10 + 2) = (char)uVar15" (pointer_expression "*(char *)(iVar12 + uVar10 + 2)" * (cast_expression "(char *)(iVar12 + uVar10 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + uVar10 + 2)" ( (binary_expression "iVar12 + uVar10 + 2" (binary_expression "iVar12 + uVar10" identifier + identifier) + number_literal) )))) = (cast_expression "(char)uVar15" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "*puVar9 = (char)(uVar11 >> 8);" (assignment_expression "*puVar9 = (char)(uVar11 >> 8)" (pointer_expression "*puVar9" * identifier) = (cast_expression "(char)(uVar11 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar11 >> 8)" ( (binary_expression "uVar11 >> 8" identifier >> number_literal) )))) ;) (expression_statement "*puVar7 = (char)uVar11;" (assignment_expression "*puVar7 = (char)uVar11" (pointer_expression "*puVar7" * identifier) = (cast_expression "(char)uVar11" ( (type_descriptor "char" primitive_type) ) identifier)) ;) }))) (if_statement "if ((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);\n  }" if (parenthesized_expression "((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0)" ( (binary_expression "(*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0" (parenthesized_expression "(*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc)" ( (binary_expression "*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc" (pointer_expression "*(ushort *)(*(int *)(param_1 + 0x34) + 0x18)" * (cast_expression "(ushort *)(*(int *)(param_1 + 0x34) + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x18)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x18" (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);\n  }" { (expression_statement "(*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);" (call_expression "(*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13)" (parenthesized_expression "(*(code *)PTR_memset_000f644c)" ( (pointer_expression "*(code *)PTR_memset_000f644c" * (cast_expression "(code *)PTR_memset_000f644c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar12 + param_2,0,uVar13)" ( (binary_expression "iVar12 + param_2" identifier + identifier) , number_literal , identifier ))) ;) })) (expression_statement "puVar7 = (undefined1 *)(iVar12 + param_2);" (assignment_expression "puVar7 = (undefined1 *)(iVar12 + param_2)" identifier = (cast_expression "(undefined1 *)(iVar12 + param_2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar12 + param_2)" ( (binary_expression "iVar12 + param_2" identifier + identifier) )))) ;) (expression_statement "*puVar7 = uVar4;" (assignment_expression "*puVar7 = uVar4" (pointer_expression "*puVar7" * identifier) = identifier) ;) (expression_statement "puVar7[1] = (char)uVar15;" (assignment_expression "puVar7[1] = (char)uVar15" (subscript_expression "puVar7[1]" identifier [ number_literal ]) = (cast_expression "(char)uVar15" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "puVar7[2] = (char)(uVar13 >> 8);" (assignment_expression "puVar7[2] = (char)(uVar13 >> 8)" (subscript_expression "puVar7[2]" identifier [ number_literal ]) = (cast_expression "(char)(uVar13 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar13 >> 8)" ( (binary_expression "uVar13 >> 8" identifier >> number_literal) )))) ;) (expression_statement "puVar7[3] = (char)uVar13;" (assignment_expression "puVar7[3] = (char)uVar13" (subscript_expression "puVar7[3]" identifier [ number_literal ]) = (cast_expression "(char)uVar13" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "*(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3;" (assignment_expression "*(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3" (pointer_expression "*(uint *)(param_1 + 0x14)" * (cast_expression "(uint *)(param_1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x14) + param_3" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) + identifier)) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + LIT) )))) != (char_literal ' escape_sequence ')) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = LIT) , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) != (char_literal ' escape_sequence '))) ))) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) )))) ;) (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + LIT) )))) + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor (sized_type_specifier short)) ) IDENT)) - IDENT) & LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT - IDENT) & LIT)) ;) }))))) (goto_statement goto statement_identifier ;) })) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) <= IDENT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + LIT) )))) + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) <= (binary_expression IDENT + LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) - IDENT) & LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT - IDENT) & LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (pointer_expression * IDENT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) )))) ;) (expression_statement (assignment_expression (subscript_expression (parenthesized_expression ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))) )) [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + IDENT) , LIT , IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT)) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_0004ac50(int param_1,uint param_2,uint param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  undefined1 uVar4;\n  undefined4 uVar3;\n  int iVar5;\n  byte *pbVar6;\n  undefined1 *puVar7;\n  uint uVar8;\n  undefined1 *puVar9;\n  uint uVar10;\n  uint uVar11;\n  int iVar12;\n  uint uVar13;\n  ushort uVar15;\n  uint uVar14;\n  \n  uVar11 = param_2 + param_3;\n  iVar12 = *(int *)(param_1 + 0x38);\n  uVar10 = (uint)*(byte *)(param_1 + 9);\n  uVar8 = uVar10 + 1;\n  uVar14 = uVar8;\n  uVar13 = param_3;\n  if ((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')) {\n    do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);\n    if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }\n    pbVar6 = (byte *)(iVar12 + uVar10 + 7);\n    bVar1 = *pbVar6;\n    if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }\n    *pbVar6 = bVar1 - (char)uVar2;\n  }\n  puVar9 = (undefined1 *)(iVar12 + uVar10 + 5);\n  puVar7 = (undefined1 *)(iVar12 + uVar10 + 6);\n  uVar14 = (uint)CONCAT11(*puVar9,*puVar7);\n  uVar4 = (undefined1)(uVar15 >> 8);\n  if (uVar14 < param_2) {\n    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);\n    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;\n  }\n  else {\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }\n  if ((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);\n  }\n  puVar7 = (undefined1 *)(iVar12 + param_2);\n  *puVar7 = uVar4;\n  puVar7[1] = (char)uVar15;\n  puVar7[2] = (char)(uVar13 >> 8);\n  puVar7[3] = (char)uVar13;\n  *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3;\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_0004ac50(int param_1,uint param_2,uint param_3)" (identifier "FUN_0004ac50") (parameter_list "(int param_1,uint param_2,uint param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")"))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  undefined1 uVar4;\n  undefined4 uVar3;\n  int iVar5;\n  byte *pbVar6;\n  undefined1 *puVar7;\n  uint uVar8;\n  undefined1 *puVar9;\n  uint uVar10;\n  uint uVar11;\n  int iVar12;\n  uint uVar13;\n  ushort uVar15;\n  uint uVar14;\n  \n  uVar11 = param_2 + param_3;\n  iVar12 = *(int *)(param_1 + 0x38);\n  uVar10 = (uint)*(byte *)(param_1 + 9);\n  uVar8 = uVar10 + 1;\n  uVar14 = uVar8;\n  uVar13 = param_3;\n  if ((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')) {\n    do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);\n    if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }\n    pbVar6 = (byte *)(iVar12 + uVar10 + 7);\n    bVar1 = *pbVar6;\n    if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }\n    *pbVar6 = bVar1 - (char)uVar2;\n  }\n  puVar9 = (undefined1 *)(iVar12 + uVar10 + 5);\n  puVar7 = (undefined1 *)(iVar12 + uVar10 + 6);\n  uVar14 = (uint)CONCAT11(*puVar9,*puVar7);\n  uVar4 = (undefined1)(uVar15 >> 8);\n  if (uVar14 < param_2) {\n    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);\n    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;\n  }\n  else {\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }\n  if ((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);\n  }\n  puVar7 = (undefined1 *)(iVar12 + param_2);\n  *puVar7 = uVar4;\n  puVar7[1] = (char)uVar15;\n  puVar7[2] = (char)(uVar13 >> 8);\n  puVar7[3] = (char)uVar13;\n  *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3;\n  return 0;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "undefined1 uVar4;" (type_identifier "undefined1") (identifier "uVar4") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "byte *pbVar6;" (type_identifier "byte") (pointer_declarator "*pbVar6" (* "*") (identifier "pbVar6")) (; ";")) (declaration "undefined1 *puVar7;" (type_identifier "undefined1") (pointer_declarator "*puVar7" (* "*") (identifier "puVar7")) (; ";")) (declaration "uint uVar8;" (type_identifier "uint") (identifier "uVar8") (; ";")) (declaration "undefined1 *puVar9;" (type_identifier "undefined1") (pointer_declarator "*puVar9" (* "*") (identifier "puVar9")) (; ";")) (declaration "uint uVar10;" (type_identifier "uint") (identifier "uVar10") (; ";")) (declaration "uint uVar11;" (type_identifier "uint") (identifier "uVar11") (; ";")) (declaration "int iVar12;" (primitive_type "int") (identifier "iVar12") (; ";")) (declaration "uint uVar13;" (type_identifier "uint") (identifier "uVar13") (; ";")) (declaration "ushort uVar15;" (type_identifier "ushort") (identifier "uVar15") (; ";")) (declaration "uint uVar14;" (type_identifier "uint") (identifier "uVar14") (; ";")) (expression_statement "uVar11 = param_2 + param_3;" (assignment_expression "uVar11 = param_2 + param_3" (identifier "uVar11") (= "=") (binary_expression "param_2 + param_3" (identifier "param_2") (+ "+") (identifier "param_3"))) (; ";")) (expression_statement "iVar12 = *(int *)(param_1 + 0x38);" (assignment_expression "iVar12 = *(int *)(param_1 + 0x38)" (identifier "iVar12") (= "=") (pointer_expression "*(int *)(param_1 + 0x38)" (* "*") (cast_expression "(int *)(param_1 + 0x38)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x38)" (( "(") (binary_expression "param_1 + 0x38" (identifier "param_1") (+ "+") (number_literal "0x38")) () ")"))))) (; ";")) (expression_statement "uVar10 = (uint)*(byte *)(param_1 + 9);" (assignment_expression "uVar10 = (uint)*(byte *)(param_1 + 9)" (identifier "uVar10") (= "=") (binary_expression "(uint)*(byte *)(param_1 + 9)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(byte *)(param_1 + 9)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 9)" (( "(") (binary_expression "param_1 + 9" (identifier "param_1") (+ "+") (number_literal "9")) () ")"))))) (; ";")) (expression_statement "uVar8 = uVar10 + 1;" (assignment_expression "uVar8 = uVar10 + 1" (identifier "uVar8") (= "=") (binary_expression "uVar10 + 1" (identifier "uVar10") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar14 = uVar8;" (assignment_expression "uVar14 = uVar8" (identifier "uVar14") (= "=") (identifier "uVar8")) (; ";")) (expression_statement "uVar13 = param_3;" (assignment_expression "uVar13 = param_3" (identifier "uVar13") (= "=") (identifier "param_3")) (; ";")) (if_statement "if ((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')) {\n    do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);\n    if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }\n    pbVar6 = (byte *)(iVar12 + uVar10 + 7);\n    bVar1 = *pbVar6;\n    if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }\n    *pbVar6 = bVar1 - (char)uVar2;\n  }" (if "if") (parenthesized_expression "((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0'))" (( "(") (binary_expression "(*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')" (parenthesized_expression "(*(char *)(iVar12 + uVar8 + 1) != '\0')" (( "(") (binary_expression "*(char *)(iVar12 + uVar8 + 1) != '\0'" (pointer_expression "*(char *)(iVar12 + uVar8 + 1)" (* "*") (cast_expression "(char *)(iVar12 + uVar8 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar12 + uVar8 + 1)" (( "(") (binary_expression "iVar12 + uVar8 + 1" (binary_expression "iVar12 + uVar8" (identifier "iVar12") (+ "+") (identifier "uVar8")) (+ "+") (number_literal "1")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')" (( "(") (comma_expression "uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0'" (assignment_expression "uVar15 = 0" (identifier "uVar15") (= "=") (number_literal "0")) (, ",") (binary_expression "*(char *)(iVar12 + uVar8) != '\0'" (pointer_expression "*(char *)(iVar12 + uVar8)" (* "*") (cast_expression "(char *)(iVar12 + uVar8)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar12 + uVar8)" (( "(") (binary_expression "iVar12 + uVar8" (identifier "iVar12") (+ "+") (identifier "uVar8")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")))) () ")"))) () ")")) (compound_statement "{\n    do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);\n    if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }\n    uVar2 = 0;\nLAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }\n    pbVar6 = (byte *)(iVar12 + uVar10 + 7);\n    bVar1 = *pbVar6;\n    if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }\n    *pbVar6 = bVar1 - (char)uVar2;\n  }" ({ "{") (do_statement "do {\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    } while (uVar8 + 4 <= uVar14);" (do "do") (compound_statement "{\n      uVar8 = uVar14;\n      uVar15 = *(ushort *)(iVar12 + uVar8);\n      uVar14 = (uint)uVar15;\n      if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }\n    }" ({ "{") (expression_statement "uVar8 = uVar14;" (assignment_expression "uVar8 = uVar14" (identifier "uVar8") (= "=") (identifier "uVar14")) (; ";")) (expression_statement "uVar15 = *(ushort *)(iVar12 + uVar8);" (assignment_expression "uVar15 = *(ushort *)(iVar12 + uVar8)" (identifier "uVar15") (= "=") (pointer_expression "*(ushort *)(iVar12 + uVar8)" (* "*") (cast_expression "(ushort *)(iVar12 + uVar8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar12 + uVar8)" (( "(") (binary_expression "iVar12 + uVar8" (identifier "iVar12") (+ "+") (identifier "uVar8")) () ")"))))) (; ";")) (expression_statement "uVar14 = (uint)uVar15;" (assignment_expression "uVar14 = (uint)uVar15" (identifier "uVar14") (= "=") (cast_expression "(uint)uVar15" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar15"))) (; ";")) (if_statement "if (param_2 <= uVar14) {\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }" (if "if") (parenthesized_expression "(param_2 <= uVar14)" (( "(") (binary_expression "param_2 <= uVar14" (identifier "param_2") (<= "<=") (identifier "uVar14")) () ")")) (compound_statement "{\n        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);\n        if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }\n        if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }\n        goto LAB_0004ad10;\n      }" ({ "{") (expression_statement "uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);" (assignment_expression "uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(*(int *)(param_1 + 0x34) + 0x28)" (* "*") (cast_expression "(uint *)(*(int *)(param_1 + 0x34) + 0x28)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x28)" (( "(") (binary_expression "*(int *)(param_1 + 0x34) + 0x28" (pointer_expression "*(int *)(param_1 + 0x34)" (* "*") (cast_expression "(int *)(param_1 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x34)" (( "(") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34")) () ")")))) (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (if_statement "if (uVar2 - 4 < uVar14) {\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }" (if "if") (parenthesized_expression "(uVar2 - 4 < uVar14)" (( "(") (binary_expression "uVar2 - 4 < uVar14" (binary_expression "uVar2 - 4" (identifier "uVar2") (- "-") (number_literal "4")) (< "<") (identifier "uVar14")) () ")")) (compound_statement "{\n          uVar3 = FUN_0004958c(&DAT_000102b1);\n          return uVar3;\n        }" ({ "{") (expression_statement "uVar3 = FUN_0004958c(&DAT_000102b1);" (assignment_expression "uVar3 = FUN_0004958c(&DAT_000102b1)" (identifier "uVar3") (= "=") (call_expression "FUN_0004958c(&DAT_000102b1)" (identifier "FUN_0004958c") (argument_list "(&DAT_000102b1)" (( "(") (pointer_expression "&DAT_000102b1" (& "&") (identifier "DAT_000102b1")) () ")")))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (if_statement "if (uVar14 == 0) {\n          uVar2 = 0;\n        }\n        else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" (if "if") (parenthesized_expression "(uVar14 == 0)" (( "(") (binary_expression "uVar14 == 0" (identifier "uVar14") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          uVar2 = 0;\n        }" ({ "{") (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" (else "else") (if_statement "if (uVar11 + 3 < uVar14) {\n          uVar2 = 0;\n        }\n        else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" (if "if") (parenthesized_expression "(uVar11 + 3 < uVar14)" (( "(") (binary_expression "uVar11 + 3 < uVar14" (binary_expression "uVar11 + 3" (identifier "uVar11") (+ "+") (number_literal "3")) (< "<") (identifier "uVar14")) () ")")) (compound_statement "{\n          uVar2 = 0;\n        }" ({ "{") (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" (else "else") (compound_statement "{\n          if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }\n          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;\n          if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }\n          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;\n          uVar15 = *(ushort *)(iVar12 + uVar14);\n          uVar11 = uVar13;\n          uVar13 = uVar13 - param_2 & 0xffff;\n        }" ({ "{") (if_statement "if (uVar14 < uVar11) {\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }" (if "if") (parenthesized_expression "(uVar14 < uVar11)" (( "(") (binary_expression "uVar14 < uVar11" (identifier "uVar14") (< "<") (identifier "uVar11")) () ")")) (compound_statement "{\n            uVar3 = FUN_0004958c(0x102bd);\n            return uVar3;\n          }" ({ "{") (expression_statement "uVar3 = FUN_0004958c(0x102bd);" (assignment_expression "uVar3 = FUN_0004958c(0x102bd)" (identifier "uVar3") (= "=") (call_expression "FUN_0004958c(0x102bd)" (identifier "FUN_0004958c") (argument_list "(0x102bd)" (( "(") (number_literal "0x102bd") () ")")))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (expression_statement "uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;" (assignment_expression "uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14" (identifier "uVar13") (= "=") (binary_expression "*(ushort *)(iVar12 + uVar14 + 2) + uVar14" (pointer_expression "*(ushort *)(iVar12 + uVar14 + 2)" (* "*") (cast_expression "(ushort *)(iVar12 + uVar14 + 2)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar12 + uVar14 + 2)" (( "(") (binary_expression "iVar12 + uVar14 + 2" (binary_expression "iVar12 + uVar14" (identifier "iVar12") (+ "+") (identifier "uVar14")) (+ "+") (number_literal "2")) () ")")))) (+ "+") (identifier "uVar14"))) (; ";")) (if_statement "if (uVar2 < uVar13) {\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }" (if "if") (parenthesized_expression "(uVar2 < uVar13)" (( "(") (binary_expression "uVar2 < uVar13" (identifier "uVar2") (< "<") (identifier "uVar13")) () ")")) (compound_statement "{\n            uVar3 = FUN_0004958c(0x102c0);\n            return uVar3;\n          }" ({ "{") (expression_statement "uVar3 = FUN_0004958c(0x102c0);" (assignment_expression "uVar3 = FUN_0004958c(0x102c0)" (identifier "uVar3") (= "=") (call_expression "FUN_0004958c(0x102c0)" (identifier "FUN_0004958c") (argument_list "(0x102c0)" (( "(") (number_literal "0x102c0") () ")")))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (expression_statement "uVar2 = (int)(short)uVar15 - uVar11 & 0xff;" (assignment_expression "uVar2 = (int)(short)uVar15 - uVar11 & 0xff" (identifier "uVar2") (= "=") (binary_expression "(int)(short)uVar15 - uVar11 & 0xff" (binary_expression "(int)(short)uVar15 - uVar11" (cast_expression "(int)(short)uVar15" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(short)uVar15" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "uVar15"))) (- "-") (identifier "uVar11")) (& "&") (number_literal "0xff"))) (; ";")) (expression_statement "uVar15 = *(ushort *)(iVar12 + uVar14);" (assignment_expression "uVar15 = *(ushort *)(iVar12 + uVar14)" (identifier "uVar15") (= "=") (pointer_expression "*(ushort *)(iVar12 + uVar14)" (* "*") (cast_expression "(ushort *)(iVar12 + uVar14)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar12 + uVar14)" (( "(") (binary_expression "iVar12 + uVar14" (identifier "iVar12") (+ "+") (identifier "uVar14")) () ")"))))) (; ";")) (expression_statement "uVar11 = uVar13;" (assignment_expression "uVar11 = uVar13" (identifier "uVar11") (= "=") (identifier "uVar13")) (; ";")) (expression_statement "uVar13 = uVar13 - param_2 & 0xffff;" (assignment_expression "uVar13 = uVar13 - param_2 & 0xffff" (identifier "uVar13") (= "=") (binary_expression "uVar13 - param_2 & 0xffff" (binary_expression "uVar13 - param_2" (identifier "uVar13") (- "-") (identifier "param_2")) (& "&") (number_literal "0xffff"))) (; ";")) (} "}")))))) (goto_statement "goto LAB_0004ad10;" (goto "goto") (statement_identifier "LAB_0004ad10") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "(uVar8 + 4 <= uVar14)" (( "(") (binary_expression "uVar8 + 4 <= uVar14" (binary_expression "uVar8 + 4" (identifier "uVar8") (+ "+") (number_literal "4")) (<= "<=") (identifier "uVar14")) () ")")) (; ";")) (if_statement "if (uVar14 != 0) {\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }" (if "if") (parenthesized_expression "(uVar14 != 0)" (( "(") (binary_expression "uVar14 != 0" (identifier "uVar14") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar3 = FUN_0004958c(&DAT_000102ac);\n      return uVar3;\n    }" ({ "{") (expression_statement "uVar3 = FUN_0004958c(&DAT_000102ac);" (assignment_expression "uVar3 = FUN_0004958c(&DAT_000102ac)" (identifier "uVar3") (= "=") (call_expression "FUN_0004958c(&DAT_000102ac)" (identifier "FUN_0004958c") (argument_list "(&DAT_000102ac)" (( "(") (pointer_expression "&DAT_000102ac" (& "&") (identifier "DAT_000102ac")) () ")")))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_0004ad10:\n    if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }" (statement_identifier "LAB_0004ad10") (: ":") (if_statement "if (uVar10 + 1 < uVar8) {\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }" (if "if") (parenthesized_expression "(uVar10 + 1 < uVar8)" (( "(") (binary_expression "uVar10 + 1 < uVar8" (binary_expression "uVar10 + 1" (identifier "uVar10") (+ "+") (number_literal "1")) (< "<") (identifier "uVar8")) () ")")) (compound_statement "{\n      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;\n      if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }\n    }" ({ "{") (expression_statement "iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;" (assignment_expression "iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8" (identifier "iVar5") (= "=") (binary_expression "*(ushort *)(iVar12 + uVar8 + 2) + uVar8" (pointer_expression "*(ushort *)(iVar12 + uVar8 + 2)" (* "*") (cast_expression "(ushort *)(iVar12 + uVar8 + 2)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar12 + uVar8 + 2)" (( "(") (binary_expression "iVar12 + uVar8 + 2" (binary_expression "iVar12 + uVar8" (identifier "iVar12") (+ "+") (identifier "uVar8")) (+ "+") (number_literal "2")) () ")")))) (+ "+") (identifier "uVar8"))) (; ";")) (if_statement "if ((int)param_2 <= iVar5 + 3) {\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }" (if "if") (parenthesized_expression "((int)param_2 <= iVar5 + 3)" (( "(") (binary_expression "(int)param_2 <= iVar5 + 3" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (<= "<=") (binary_expression "iVar5 + 3" (identifier "iVar5") (+ "+") (number_literal "3"))) () ")")) (compound_statement "{\n        if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }\n        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;\n        uVar13 = uVar11 - uVar8 & 0xffff;\n        param_2 = uVar8;\n      }" ({ "{") (if_statement "if ((int)param_2 < iVar5) {\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }" (if "if") (parenthesized_expression "((int)param_2 < iVar5)" (( "(") (binary_expression "(int)param_2 < iVar5" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (< "<") (identifier "iVar5")) () ")")) (compound_statement "{\n          uVar3 = FUN_0004958c(0x102cd);\n          return uVar3;\n        }" ({ "{") (expression_statement "uVar3 = FUN_0004958c(0x102cd);" (assignment_expression "uVar3 = FUN_0004958c(0x102cd)" (identifier "uVar3") (= "=") (call_expression "FUN_0004958c(0x102cd)" (identifier "FUN_0004958c") (argument_list "(0x102cd)" (( "(") (number_literal "0x102cd") () ")")))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (expression_statement "uVar2 = (uVar2 + param_2) - iVar5 & 0xff;" (assignment_expression "uVar2 = (uVar2 + param_2) - iVar5 & 0xff" (identifier "uVar2") (= "=") (binary_expression "(uVar2 + param_2) - iVar5 & 0xff" (binary_expression "(uVar2 + param_2) - iVar5" (parenthesized_expression "(uVar2 + param_2)" (( "(") (binary_expression "uVar2 + param_2" (identifier "uVar2") (+ "+") (identifier "param_2")) () ")")) (- "-") (identifier "iVar5")) (& "&") (number_literal "0xff"))) (; ";")) (expression_statement "uVar13 = uVar11 - uVar8 & 0xffff;" (assignment_expression "uVar13 = uVar11 - uVar8 & 0xffff" (identifier "uVar13") (= "=") (binary_expression "uVar11 - uVar8 & 0xffff" (binary_expression "uVar11 - uVar8" (identifier "uVar11") (- "-") (identifier "uVar8")) (& "&") (number_literal "0xffff"))) (; ";")) (expression_statement "param_2 = uVar8;" (assignment_expression "param_2 = uVar8" (identifier "param_2") (= "=") (identifier "uVar8")) (; ";")) (} "}"))) (} "}")))) (expression_statement "pbVar6 = (byte *)(iVar12 + uVar10 + 7);" (assignment_expression "pbVar6 = (byte *)(iVar12 + uVar10 + 7)" (identifier "pbVar6") (= "=") (cast_expression "(byte *)(iVar12 + uVar10 + 7)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar12 + uVar10 + 7)" (( "(") (binary_expression "iVar12 + uVar10 + 7" (binary_expression "iVar12 + uVar10" (identifier "iVar12") (+ "+") (identifier "uVar10")) (+ "+") (number_literal "7")) () ")")))) (; ";")) (expression_statement "bVar1 = *pbVar6;" (assignment_expression "bVar1 = *pbVar6" (identifier "bVar1") (= "=") (pointer_expression "*pbVar6" (* "*") (identifier "pbVar6"))) (; ";")) (if_statement "if (bVar1 < uVar2) {\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }" (if "if") (parenthesized_expression "(bVar1 < uVar2)" (( "(") (binary_expression "bVar1 < uVar2" (identifier "bVar1") (< "<") (identifier "uVar2")) () ")")) (compound_statement "{\n      uVar3 = FUN_0004958c(0x102d3);\n      return uVar3;\n    }" ({ "{") (expression_statement "uVar3 = FUN_0004958c(0x102d3);" (assignment_expression "uVar3 = FUN_0004958c(0x102d3)" (identifier "uVar3") (= "=") (call_expression "FUN_0004958c(0x102d3)" (identifier "FUN_0004958c") (argument_list "(0x102d3)" (( "(") (number_literal "0x102d3") () ")")))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (expression_statement "*pbVar6 = bVar1 - (char)uVar2;" (assignment_expression "*pbVar6 = bVar1 - (char)uVar2" (pointer_expression "*pbVar6" (* "*") (identifier "pbVar6")) (= "=") (binary_expression "bVar1 - (char)uVar2" (identifier "bVar1") (- "-") (cast_expression "(char)uVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar2")))) (; ";")) (} "}"))) (expression_statement "puVar9 = (undefined1 *)(iVar12 + uVar10 + 5);" (assignment_expression "puVar9 = (undefined1 *)(iVar12 + uVar10 + 5)" (identifier "puVar9") (= "=") (cast_expression "(undefined1 *)(iVar12 + uVar10 + 5)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar12 + uVar10 + 5)" (( "(") (binary_expression "iVar12 + uVar10 + 5" (binary_expression "iVar12 + uVar10" (identifier "iVar12") (+ "+") (identifier "uVar10")) (+ "+") (number_literal "5")) () ")")))) (; ";")) (expression_statement "puVar7 = (undefined1 *)(iVar12 + uVar10 + 6);" (assignment_expression "puVar7 = (undefined1 *)(iVar12 + uVar10 + 6)" (identifier "puVar7") (= "=") (cast_expression "(undefined1 *)(iVar12 + uVar10 + 6)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar12 + uVar10 + 6)" (( "(") (binary_expression "iVar12 + uVar10 + 6" (binary_expression "iVar12 + uVar10" (identifier "iVar12") (+ "+") (identifier "uVar10")) (+ "+") (number_literal "6")) () ")")))) (; ";")) (expression_statement "uVar14 = (uint)CONCAT11(*puVar9,*puVar7);" (assignment_expression "uVar14 = (uint)CONCAT11(*puVar9,*puVar7)" (identifier "uVar14") (= "=") (cast_expression "(uint)CONCAT11(*puVar9,*puVar7)" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (call_expression "CONCAT11(*puVar9,*puVar7)" (identifier "CONCAT11") (argument_list "(*puVar9,*puVar7)" (( "(") (pointer_expression "*puVar9" (* "*") (identifier "puVar9")) (, ",") (pointer_expression "*puVar7" (* "*") (identifier "puVar7")) () ")"))))) (; ";")) (expression_statement "uVar4 = (undefined1)(uVar15 >> 8);" (assignment_expression "uVar4 = (undefined1)(uVar15 >> 8)" (identifier "uVar4") (= "=") (call_expression "(undefined1)(uVar15 >> 8)" (parenthesized_expression "(undefined1)" (( "(") (identifier "undefined1") () ")")) (argument_list "(uVar15 >> 8)" (( "(") (binary_expression "uVar15 >> 8" (identifier "uVar15") (>> ">>") (number_literal "8")) () ")")))) (; ";")) (if_statement "if (uVar14 < param_2) {\n    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);\n    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;\n  }\n  else {\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }" (if "if") (parenthesized_expression "(uVar14 < param_2)" (( "(") (binary_expression "uVar14 < param_2" (identifier "uVar14") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);\n    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;\n  }" ({ "{") (expression_statement "*(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);" (assignment_expression "*(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8)" (pointer_expression "*(undefined1 *)(iVar12 + uVar8)" (* "*") (cast_expression "(undefined1 *)(iVar12 + uVar8)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar12 + uVar8)" (( "(") (binary_expression "iVar12 + uVar8" (identifier "iVar12") (+ "+") (identifier "uVar8")) () ")")))) (= "=") (cast_expression "(char)(param_2 >> 8)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(param_2 >> 8)" (( "(") (binary_expression "param_2 >> 8" (identifier "param_2") (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;" (assignment_expression "((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2" (subscript_expression "((undefined1 *)(iVar12 + uVar8))[1]" (parenthesized_expression "((undefined1 *)(iVar12 + uVar8))" (( "(") (cast_expression "(undefined1 *)(iVar12 + uVar8)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar12 + uVar8)" (( "(") (binary_expression "iVar12 + uVar8" (identifier "iVar12") (+ "+") (identifier "uVar8")) () ")"))) () ")")) ([ "[") (number_literal "1") (] "]")) (= "=") (cast_expression "(char)param_2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_2"))) (; ";")) (} "}")) (else_clause "else {\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }" (else "else") (compound_statement "{\n    if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }\n    if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }\n    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;\n    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;\n    *puVar9 = (char)(uVar11 >> 8);\n    *puVar7 = (char)uVar11;\n  }" ({ "{") (if_statement "if (param_2 < uVar14) {\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }" (if "if") (parenthesized_expression "(param_2 < uVar14)" (( "(") (binary_expression "param_2 < uVar14" (identifier "param_2") (< "<") (identifier "uVar14")) () ")")) (compound_statement "{\n      uVar3 = FUN_0004958c(0x102db);\n      return uVar3;\n    }" ({ "{") (expression_statement "uVar3 = FUN_0004958c(0x102db);" (assignment_expression "uVar3 = FUN_0004958c(0x102db)" (identifier "uVar3") (= "=") (call_expression "FUN_0004958c(0x102db)" (identifier "FUN_0004958c") (argument_list "(0x102db)" (( "(") (number_literal "0x102db") () ")")))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (if_statement "if (uVar8 != uVar10 + 1) {\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }" (if "if") (parenthesized_expression "(uVar8 != uVar10 + 1)" (( "(") (binary_expression "uVar8 != uVar10 + 1" (identifier "uVar8") (!= "!=") (binary_expression "uVar10 + 1" (identifier "uVar10") (+ "+") (number_literal "1"))) () ")")) (compound_statement "{\n      uVar3 = FUN_0004958c(0x102dc);\n      return uVar3;\n    }" ({ "{") (expression_statement "uVar3 = FUN_0004958c(0x102dc);" (assignment_expression "uVar3 = FUN_0004958c(0x102dc)" (identifier "uVar3") (= "=") (call_expression "FUN_0004958c(0x102dc)" (identifier "FUN_0004958c") (argument_list "(0x102dc)" (( "(") (number_literal "0x102dc") () ")")))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (expression_statement "*(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;" (assignment_expression "*(undefined1 *)(iVar12 + uVar10 + 1) = uVar4" (pointer_expression "*(undefined1 *)(iVar12 + uVar10 + 1)" (* "*") (cast_expression "(undefined1 *)(iVar12 + uVar10 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar12 + uVar10 + 1)" (( "(") (binary_expression "iVar12 + uVar10 + 1" (binary_expression "iVar12 + uVar10" (identifier "iVar12") (+ "+") (identifier "uVar10")) (+ "+") (number_literal "1")) () ")")))) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "*(char *)(iVar12 + uVar10 + 2) = (char)uVar15;" (assignment_expression "*(char *)(iVar12 + uVar10 + 2) = (char)uVar15" (pointer_expression "*(char *)(iVar12 + uVar10 + 2)" (* "*") (cast_expression "(char *)(iVar12 + uVar10 + 2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar12 + uVar10 + 2)" (( "(") (binary_expression "iVar12 + uVar10 + 2" (binary_expression "iVar12 + uVar10" (identifier "iVar12") (+ "+") (identifier "uVar10")) (+ "+") (number_literal "2")) () ")")))) (= "=") (cast_expression "(char)uVar15" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar15"))) (; ";")) (expression_statement "*puVar9 = (char)(uVar11 >> 8);" (assignment_expression "*puVar9 = (char)(uVar11 >> 8)" (pointer_expression "*puVar9" (* "*") (identifier "puVar9")) (= "=") (cast_expression "(char)(uVar11 >> 8)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(uVar11 >> 8)" (( "(") (binary_expression "uVar11 >> 8" (identifier "uVar11") (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "*puVar7 = (char)uVar11;" (assignment_expression "*puVar7 = (char)uVar11" (pointer_expression "*puVar7" (* "*") (identifier "puVar7")) (= "=") (cast_expression "(char)uVar11" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar11"))) (; ";")) (} "}")))) (if_statement "if ((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0) {\n    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);\n  }" (if "if") (parenthesized_expression "((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0)" (( "(") (binary_expression "(*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0" (parenthesized_expression "(*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc)" (( "(") (binary_expression "*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc" (pointer_expression "*(ushort *)(*(int *)(param_1 + 0x34) + 0x18)" (* "*") (cast_expression "(ushort *)(*(int *)(param_1 + 0x34) + 0x18)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x18)" (( "(") (binary_expression "*(int *)(param_1 + 0x34) + 0x18" (pointer_expression "*(int *)(param_1 + 0x34)" (* "*") (cast_expression "(int *)(param_1 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x34)" (( "(") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34")) () ")")))) (+ "+") (number_literal "0x18")) () ")")))) (& "&") (number_literal "0xc")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);\n  }" ({ "{") (expression_statement "(*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);" (call_expression "(*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13)" (parenthesized_expression "(*(code *)PTR_memset_000f644c)" (( "(") (pointer_expression "*(code *)PTR_memset_000f644c" (* "*") (cast_expression "(code *)PTR_memset_000f644c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memset_000f644c"))) () ")")) (argument_list "(iVar12 + param_2,0,uVar13)" (( "(") (binary_expression "iVar12 + param_2" (identifier "iVar12") (+ "+") (identifier "param_2")) (, ",") (number_literal "0") (, ",") (identifier "uVar13") () ")"))) (; ";")) (} "}"))) (expression_statement "puVar7 = (undefined1 *)(iVar12 + param_2);" (assignment_expression "puVar7 = (undefined1 *)(iVar12 + param_2)" (identifier "puVar7") (= "=") (cast_expression "(undefined1 *)(iVar12 + param_2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar12 + param_2)" (( "(") (binary_expression "iVar12 + param_2" (identifier "iVar12") (+ "+") (identifier "param_2")) () ")")))) (; ";")) (expression_statement "*puVar7 = uVar4;" (assignment_expression "*puVar7 = uVar4" (pointer_expression "*puVar7" (* "*") (identifier "puVar7")) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "puVar7[1] = (char)uVar15;" (assignment_expression "puVar7[1] = (char)uVar15" (subscript_expression "puVar7[1]" (identifier "puVar7") ([ "[") (number_literal "1") (] "]")) (= "=") (cast_expression "(char)uVar15" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar15"))) (; ";")) (expression_statement "puVar7[2] = (char)(uVar13 >> 8);" (assignment_expression "puVar7[2] = (char)(uVar13 >> 8)" (subscript_expression "puVar7[2]" (identifier "puVar7") ([ "[") (number_literal "2") (] "]")) (= "=") (cast_expression "(char)(uVar13 >> 8)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(uVar13 >> 8)" (( "(") (binary_expression "uVar13 >> 8" (identifier "uVar13") (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "puVar7[3] = (char)uVar13;" (assignment_expression "puVar7[3] = (char)uVar13" (subscript_expression "puVar7[3]" (identifier "puVar7") ([ "[") (number_literal "3") (] "]")) (= "=") (cast_expression "(char)uVar13" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar13"))) (; ";")) (expression_statement "*(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3;" (assignment_expression "*(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3" (pointer_expression "*(uint *)(param_1 + 0x14)" (* "*") (cast_expression "(uint *)(param_1 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (binary_expression "*(int *)(param_1 + 0x14) + param_3" (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (+ "+") (identifier "param_3"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

int function_1(type_1 *pPage,type_2 iStart,type_2 iSize)

{
  type_3 var_13;
  type_4 var_8;
  type_5 uVar3;
  int var_12;
  type_4 var_6;
  type_6 in_register_00000014;
  type_4 var_2;
  type_6 in_register_00000018;
  type_4 var_3;
  type_4 var_4;
  type_4 var_10;
  type_5 *var_5;
  type_4 var_11;
  type_7 var_15;
  type_4 var_7;
  
  var_3 = var_1(in_register_00000018,iSize);
  var_2 = var_1(in_register_00000014,iStart);
  var_10 = var_2 + var_3;
  var_5 = pPage->aData;
  var_4 = (type_4)pPage->hdrOffset;
  var_6 = var_4 + 1;
  var_7 = var_6;
  var_11 = var_3;
  if ((var_5[var_4 + 2] != '\0') || (var_15 = 0, var_5[var_6] != '\0')) {
    do {
      var_6 = var_7;
      var_15 = *(type_7 *)(var_5 + var_6);
      var_7 = (type_4)var_15;
      if (var_2 <= var_7) {
        var_8 = pPage->pBt->usableSize;
        if (var_8 - 4 < var_7) {
          var_12 = var_9(0x102b1);
          return var_12;
        }
        if (var_7 == 0) {
          var_8 = 0;
        }
        else if (var_10 + 3 < var_7) {
          var_8 = 0;
        }
        else {
          if (var_7 < var_10) {
            var_12 = var_9(0x102bd);
            return var_12;
          }
          var_11 = *(type_7 *)(var_5 + var_7 + 2) + var_7;
          if (var_8 < var_11) {
            var_12 = var_9(0x102c0);
            return var_12;
          }
          var_8 = (int)(short)var_15 - var_10 & 0xff;
          var_15 = *(type_7 *)(var_5 + var_7);
          var_10 = var_11;
          var_11 = var_11 - var_2 & 0xffff;
        }
        goto LAB_0004ad10;
      }
    } while (var_6 + 4 <= var_7);
    if (var_7 != 0) {
      var_12 = var_9(0x102ac);
      return var_12;
    }
    var_8 = 0;
LAB_0004ad10:
    if (var_4 + 1 < var_6) {
      var_12 = *(type_7 *)(var_5 + var_6 + 2) + var_6;
      if ((int)var_2 <= var_12 + 3) {
        if ((int)var_2 < var_12) {
          var_12 = var_9(0x102cd);
          return var_12;
        }
        var_8 = (var_8 + var_2) - var_12 & 0xff;
        var_11 = var_10 - var_6 & 0xffff;
        var_2 = var_6;
      }
    }
    var_13 = var_5[var_4 + 7];
    if (var_13 < var_8) {
      var_12 = var_9(0x102d3);
      return var_12;
    }
    var_5[var_4 + 7] = var_13 - (char)var_8;
  }
  var_7 = (type_4)var_14(var_5[var_4 + 5],var_5[var_4 + 6]);
  uVar3 = (type_5)(var_15 >> 8);
  if (var_7 < var_2) {
    var_5[var_6] = (type_5)(var_2 >> 8);
    (var_5 + var_6)[1] = (type_5)var_2;
  }
  else {
    if (var_2 < var_7) {
      var_12 = var_9(0x102db);
      return var_12;
    }
    if (var_6 != var_4 + 1) {
      var_12 = var_9(0x102dc);
      return var_12;
    }
    var_5[var_4 + 1] = uVar3;
    var_5[var_4 + 2] = (type_5)var_15;
    var_5[var_4 + 5] = (type_5)(var_10 >> 8);
    var_5[var_4 + 6] = (type_5)var_10;
  }
  if ((pPage->pBt->btsFlags & 0xc) != 0) {
    (*(type_8 *)PTR_memset_000f644c)(var_5 + var_2,0,var_11);
  }
  var_5 = var_5 + var_2;
  *var_5 = uVar3;
  var_5[1] = (type_5)var_15;
  var_5[2] = (type_5)(var_11 >> 8);
  var_5[3] = (type_5)var_11;
  pPage->nFree = pPage->nFree + var_3;
  return 0;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))))) right: (char_literal (escape_sequence)))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) right: (char_literal (escape_sequence))))))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (return_statement (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))))) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier))) right: (identifier)) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))))))))) (goto_statement label: (statement_identifier))))) condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))))) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (pointer_expression argument: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (parenthesized_expression (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) index: (number_literal)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (return_statement (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (number_literal) (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier)))) (return_statement (number_literal)))))

undefined4 MASKED(int param_1,uint param_2,uint param_3)

{
  byte bVar1;
  uint uVar2;
  undefined1 uVar4;
  undefined4 uVar3;
  int iVar5;
  byte *pbVar6;
  undefined1 *puVar7;
  uint uVar8;
  undefined1 *puVar9;
  uint uVar10;
  uint uVar11;
  int iVar12;
  uint uVar13;
  ushort uVar15;
  uint uVar14;
  
  uVar11 = param_2 + param_3;
  iVar12 = *(int *)(param_1 + 0x38);
  uVar10 = (uint)*(byte *)(param_1 + 9);
  uVar8 = uVar10 + 1;
  uVar14 = uVar8;
  uVar13 = param_3;
  if ((*(char *)(iVar12 + uVar8 + 1) != '\0') || (uVar15 = 0, *(char *)(iVar12 + uVar8) != '\0')) {
    do {
      uVar8 = uVar14;
      uVar15 = *(ushort *)(iVar12 + uVar8);
      uVar14 = (uint)uVar15;
      if (param_2 <= uVar14) {
        uVar2 = *(uint *)(*(int *)(param_1 + 0x34) + 0x28);
        if (uVar2 - 4 < uVar14) {
          uVar3 = FUN_0004958c(&DAT_000102b1);
          return uVar3;
        }
        if (uVar14 == 0) {
          uVar2 = 0;
        }
        else if (uVar11 + 3 < uVar14) {
          uVar2 = 0;
        }
        else {
          if (uVar14 < uVar11) {
            uVar3 = FUN_0004958c(0x102bd);
            return uVar3;
          }
          uVar13 = *(ushort *)(iVar12 + uVar14 + 2) + uVar14;
          if (uVar2 < uVar13) {
            uVar3 = FUN_0004958c(0x102c0);
            return uVar3;
          }
          uVar2 = (int)(short)uVar15 - uVar11 & 0xff;
          uVar15 = *(ushort *)(iVar12 + uVar14);
          uVar11 = uVar13;
          uVar13 = uVar13 - param_2 & 0xffff;
        }
        goto LAB_0004ad10;
      }
    } while (uVar8 + 4 <= uVar14);
    if (uVar14 != 0) {
      uVar3 = FUN_0004958c(&DAT_000102ac);
      return uVar3;
    }
    uVar2 = 0;
LAB_0004ad10:
    if (uVar10 + 1 < uVar8) {
      iVar5 = *(ushort *)(iVar12 + uVar8 + 2) + uVar8;
      if ((int)param_2 <= iVar5 + 3) {
        if ((int)param_2 < iVar5) {
          uVar3 = FUN_0004958c(0x102cd);
          return uVar3;
        }
        uVar2 = (uVar2 + param_2) - iVar5 & 0xff;
        uVar13 = uVar11 - uVar8 & 0xffff;
        param_2 = uVar8;
      }
    }
    pbVar6 = (byte *)(iVar12 + uVar10 + 7);
    bVar1 = *pbVar6;
    if (bVar1 < uVar2) {
      uVar3 = FUN_0004958c(0x102d3);
      return uVar3;
    }
    *pbVar6 = bVar1 - (char)uVar2;
  }
  puVar9 = (undefined1 *)(iVar12 + uVar10 + 5);
  puVar7 = (undefined1 *)(iVar12 + uVar10 + 6);
  uVar14 = (uint)CONCAT11(*puVar9,*puVar7);
  uVar4 = (undefined1)(uVar15 >> 8);
  if (uVar14 < param_2) {
    *(undefined1 *)(iVar12 + uVar8) = (char)(param_2 >> 8);
    ((undefined1 *)(iVar12 + uVar8))[1] = (char)param_2;
  }
  else {
    if (param_2 < uVar14) {
      uVar3 = FUN_0004958c(0x102db);
      return uVar3;
    }
    if (uVar8 != uVar10 + 1) {
      uVar3 = FUN_0004958c(0x102dc);
      return uVar3;
    }
    *(undefined1 *)(iVar12 + uVar10 + 1) = uVar4;
    *(char *)(iVar12 + uVar10 + 2) = (char)uVar15;
    *puVar9 = (char)(uVar11 >> 8);
    *puVar7 = (char)uVar11;
  }
  if ((*(ushort *)(*(int *)(param_1 + 0x34) + 0x18) & 0xc) != 0) {
    (*(code *)PTR_memset_000f644c)(iVar12 + param_2,0,uVar13);
  }
  puVar7 = (undefined1 *)(iVar12 + param_2);
  *puVar7 = uVar4;
  puVar7[1] = (char)uVar15;
  puVar7[2] = (char)(uVar13 >> 8);
  puVar7[3] = (char)uVar13;
  *(uint *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + param_3;
  return 0;
}

