
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void png_build_16bit_table
               (png_structrp png_ptr,png_uint_16pp *ptable,uint shift,png_fixed_point gamma_val)

{
  char cVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  png_uint_16pp pppVar5;
  png_uint_16 *ppVar6;
  byte bVar7;
  uint uVar8;
  long lVar9;
  bool bVar10;
  double dVar11;
  double __y;
  double dVar12;
  ulong local_60;
  
  cVar1 = (char)shift;
  bVar7 = 8 - cVar1;
  uVar8 = 1 << (bVar7 & 0x1f);
  uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;
  dVar12 = DAT_001294a8 / (double)(int)uVar2;
  pppVar5 = (png_uint_16pp)png_calloc(png_ptr,(ulong)uVar8 << 3);
  *ptable = pppVar5;
  if (uVar8 != 0) {
    local_60 = 0;
    do {
      ppVar6 = (png_uint_16 *)png_malloc(png_ptr,0x200);
      pppVar5[local_60] = ppVar6;
      iVar4 = png_gamma_significant(gamma_val);
      if (iVar4 == 0) {
        lVar9 = 0;
        do {
          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;
          if (shift != 0) {
            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;
          }
          ppVar6[lVar9] = (png_uint_16)uVar3;
          lVar9 = lVar9 + 1;
        } while (lVar9 != 0x100);
      }
      else {
        __y = (double)gamma_val * _DAT_00129500;
        lVar9 = 0;
        do {
          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);
          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;
          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {
            dVar11 = (double)((ulong)((double)(long)dVar11 -
                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &
                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);
          }
          ppVar6[lVar9] = (png_uint_16)(int)dVar11;
          lVar9 = lVar9 + 1;
        } while (lVar9 != 0x100);
      }
      bVar10 = local_60 != uVar8 - 1;
      local_60 = local_60 + 1;
    } while (bVar10);
  }
  return;
}



/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void FUN_0010a1c9(undefined8 param_1,long *param_2,int param_3,int param_4)

{
  char cVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  long lVar5;
  long lVar6;
  byte bVar7;
  uint uVar8;
  long lVar9;
  bool bVar10;
  double dVar11;
  double __y;
  double dVar12;
  ulong local_60;
  
  cVar1 = (char)param_3;
  bVar7 = 8 - cVar1;
  uVar8 = 1 << (bVar7 & 0x1f);
  uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;
  dVar12 = DAT_001294a8 / (double)(int)uVar2;
  lVar5 = png_calloc(param_1,(ulong)uVar8 << 3);
  *param_2 = lVar5;
  if (uVar8 != 0) {
    local_60 = 0;
    do {
      lVar6 = png_malloc(param_1,0x200);
      *(long *)(lVar5 + local_60 * 8) = lVar6;
      iVar4 = FUN_00109be0(param_4);
      if (iVar4 == 0) {
        lVar9 = 0;
        do {
          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;
          if (param_3 != 0) {
            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;
          }
          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;
          lVar9 = lVar9 + 1;
        } while (lVar9 != 0x100);
      }
      else {
        __y = (double)param_4 * _DAT_00129500;
        lVar9 = 0;
        do {
          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);
          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;
          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {
            dVar11 = (double)((ulong)((double)(long)dVar11 -
                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &
                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);
          }
          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;
          lVar9 = lVar9 + 1;
        } while (lVar9 != 0x100);
      }
      bVar10 = local_60 != uVar8 - 1;
      local_60 = local_60 + 1;
    } while (bVar10);
  }
  return;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV RBP,RSI
MOV R14D,EDX
MOV dword ptr [RSP + 0x24],ECX
MOV R13D,0x8
SUB R13D,EDX
MOV R15D,0x1
MOV EBX,R15D
MOV ECX,R13D
SHL EBX,CL
MOV ECX,0x10
SUB ECX,EDX
MOV EAX,R15D
SHL EAX,CL
SUB EAX,0x1
PXOR XMM0,XMM0
CVTSI2SD XMM0,EAX
MOVSD XMM1,qword ptr [0x001294a8]
DIVSD XMM1,XMM0
MOVSD qword ptr [RSP + 0x10],XMM1
MOV dword ptr [RSP + 0x20],EAX
MOV ECX,0xf
SUB ECX,EDX
SHL R15D,CL
MOV ESI,EBX
SHL RSI,0x3
CALL 0x001067b0
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RBP],RAX
TEST EBX,EBX
JZ 0x0010a3b8
LEA EAX,[RBX + -0x1]
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x18],0x0
JMP 0x0010a362
CVTTSD2SI EAX,XMM1
MOV word ptr [RBP + RBX*0x2],AX
ADD RBX,0x1
CMP RBX,0x100
JZ 0x0010a34d
MOV EAX,EBX
MOV ECX,R13D
SHL EAX,CL
LEA EAX,[RAX + R12*0x1]
PXOR XMM0,XMM0
CVTSI2SD XMM0,RAX
MULSD XMM0,qword ptr [RSP + 0x10]
MOVSD XMM1,qword ptr [RSP + 0x8]
CALL 0x00106370
MULSD XMM0,qword ptr [0x00129508]
ADDSD XMM0,qword ptr [0x001294c8]
MOVAPD XMM1,XMM0
MOVSD XMM3,qword ptr [0x00129530]
MOVAPD XMM2,XMM0
ANDPD XMM2,XMM3
MOVSD XMM6,qword ptr [0x001294d0]
UCOMISD XMM6,XMM2
JBE 0x0010a266
CVTTSD2SI RAX,XMM0
PXOR XMM2,XMM2
CVTSI2SD XMM2,RAX
MOVAPD XMM1,XMM2
CMPNLESD XMM1,XMM0
MOVSD XMM4,qword ptr [0x001294a8]
ANDPD XMM1,XMM4
SUBSD XMM2,XMM1
MOVAPD XMM1,XMM2
ANDNPD XMM3,XMM0
ORPD XMM1,XMM3
JMP 0x0010a266
MOV ESI,0x0
JMP 0x0010a328
MOV word ptr [RBP + RSI*0x2],AX
ADD RSI,0x1
CMP RSI,0x100
JZ 0x0010a34d
MOV EAX,ESI
MOV ECX,R13D
SHL EAX,CL
ADD EAX,R12D
TEST R14D,R14D
JZ 0x0010a316
MOV EDX,EAX
SHL EDX,0x10
SUB EDX,EAX
LEA EAX,[RDX + R15*0x1]
MOV EDX,0x0
DIV dword ptr [RSP + 0x20]
JMP 0x0010a316
MOV RDI,qword ptr [RSP + 0x18]
LEA RAX,[RDI + 0x1]
CMP RDI,qword ptr [RSP + 0x30]
JZ 0x0010a3b8
MOV qword ptr [RSP + 0x18],RAX
MOV RBX,qword ptr [RSP + 0x18]
MOV R12D,EBX
MOV ESI,0x200
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00106820
MOV RBP,RAX
MOV RDI,qword ptr [RSP + 0x28]
MOV qword ptr [RDI + RBX*0x8],RBP
MOV EDI,dword ptr [RSP + 0x24]
CALL 0x00109be0
TEST EAX,EAX
JZ 0x0010a30f
PXOR XMM0,XMM0
CVTSI2SD XMM0,dword ptr [RSP + 0x24]
MULSD XMM0,qword ptr [0x00129500]
MOVSD qword ptr [RSP + 0x8],XMM0
MOV EBX,0x0
JMP 0x0010a280
ADD RSP,0x48
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
(translation_unit "/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */\n\nvoid FUN_0010a1c9(undefined8 param_1,long *param_2,int param_3,int param_4)\n\n{\n  char cVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  byte bVar7;\n  uint uVar8;\n  long lVar9;\n  bool bVar10;\n  double dVar11;\n  double __y;\n  double dVar12;\n  ulong local_60;\n  \n  cVar1 = (char)param_3;\n  bVar7 = 8 - cVar1;\n  uVar8 = 1 << (bVar7 & 0x1f);\n  uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;\n  dVar12 = DAT_001294a8 / (double)(int)uVar2;\n  lVar5 = png_calloc(param_1,(ulong)uVar8 << 3);\n  *param_2 = lVar5;\n  if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_0010a1c9(undefined8 param_1,long *param_2,int param_3,int param_4)\n\n{\n  char cVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  byte bVar7;\n  uint uVar8;\n  long lVar9;\n  bool bVar10;\n  double dVar11;\n  double __y;\n  double dVar12;\n  ulong local_60;\n  \n  cVar1 = (char)param_3;\n  bVar7 = 8 - cVar1;\n  uVar8 = 1 << (bVar7 & 0x1f);\n  uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;\n  dVar12 = DAT_001294a8 / (double)(int)uVar2;\n  lVar5 = png_calloc(param_1,(ulong)uVar8 << 3);\n  *param_2 = lVar5;\n  if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0010a1c9(undefined8 param_1,long *param_2,int param_3,int param_4)" identifier (parameter_list "(undefined8 param_1,long *param_2,int param_3,int param_4)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "long *param_2" (sized_type_specifier "long" long) (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  byte bVar7;\n  uint uVar8;\n  long lVar9;\n  bool bVar10;\n  double dVar11;\n  double __y;\n  double dVar12;\n  ulong local_60;\n  \n  cVar1 = (char)param_3;\n  bVar7 = 8 - cVar1;\n  uVar8 = 1 << (bVar7 & 0x1f);\n  uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;\n  dVar12 = DAT_001294a8 / (double)(int)uVar2;\n  lVar5 = png_calloc(param_1,(ulong)uVar8 << 3);\n  *param_2 = lVar5;\n  if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }\n  return;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "byte bVar7;" type_identifier identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "long lVar9;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar10;" primitive_type identifier ;) (declaration "double dVar11;" primitive_type identifier ;) (declaration "double __y;" primitive_type identifier ;) (declaration "double dVar12;" primitive_type identifier ;) (declaration "ulong local_60;" type_identifier identifier ;) (expression_statement "cVar1 = (char)param_3;" (assignment_expression "cVar1 = (char)param_3" identifier = (cast_expression "(char)param_3" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "bVar7 = 8 - cVar1;" (assignment_expression "bVar7 = 8 - cVar1" identifier = (binary_expression "8 - cVar1" number_literal - identifier)) ;) (expression_statement "uVar8 = 1 << (bVar7 & 0x1f);" (assignment_expression "uVar8 = 1 << (bVar7 & 0x1f)" identifier = (binary_expression "1 << (bVar7 & 0x1f)" number_literal << (parenthesized_expression "(bVar7 & 0x1f)" ( (binary_expression "bVar7 & 0x1f" identifier & number_literal) )))) ;) (expression_statement "uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;" (assignment_expression "uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1" identifier = (binary_expression "(1 << (0x10U - cVar1 & 0x1f)) - 1" (parenthesized_expression "(1 << (0x10U - cVar1 & 0x1f))" ( (binary_expression "1 << (0x10U - cVar1 & 0x1f)" number_literal << (parenthesized_expression "(0x10U - cVar1 & 0x1f)" ( (binary_expression "0x10U - cVar1 & 0x1f" (binary_expression "0x10U - cVar1" number_literal - identifier) & number_literal) ))) )) - number_literal)) ;) (expression_statement "dVar12 = DAT_001294a8 / (double)(int)uVar2;" (assignment_expression "dVar12 = DAT_001294a8 / (double)(int)uVar2" identifier = (binary_expression "DAT_001294a8 / (double)(int)uVar2" identifier / (cast_expression "(double)(int)uVar2" ( (type_descriptor "double" primitive_type) ) (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)))) ;) (expression_statement "lVar5 = png_calloc(param_1,(ulong)uVar8 << 3);" (assignment_expression "lVar5 = png_calloc(param_1,(ulong)uVar8 << 3)" identifier = (call_expression "png_calloc(param_1,(ulong)uVar8 << 3)" identifier (argument_list "(param_1,(ulong)uVar8 << 3)" ( identifier , (binary_expression "(ulong)uVar8 << 3" (cast_expression "(ulong)uVar8" ( (type_descriptor "ulong" type_identifier) ) identifier) << number_literal) )))) ;) (expression_statement "*param_2 = lVar5;" (assignment_expression "*param_2 = lVar5" (pointer_expression "*param_2" * identifier) = identifier) ;) (if_statement "if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }" if (parenthesized_expression "(uVar8 != 0)" ( (binary_expression "uVar8 != 0" identifier != number_literal) )) (compound_statement "{\n    local_60 = 0;\n    do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }" { (expression_statement "local_60 = 0;" (assignment_expression "local_60 = 0" identifier = number_literal) ;) (do_statement "do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);" do (compound_statement "{\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    }" { (expression_statement "lVar6 = png_malloc(param_1,0x200);" (assignment_expression "lVar6 = png_malloc(param_1,0x200)" identifier = (call_expression "png_malloc(param_1,0x200)" identifier (argument_list "(param_1,0x200)" ( identifier , number_literal )))) ;) (expression_statement "*(long *)(lVar5 + local_60 * 8) = lVar6;" (assignment_expression "*(long *)(lVar5 + local_60 * 8) = lVar6" (pointer_expression "*(long *)(lVar5 + local_60 * 8)" * (cast_expression "(long *)(lVar5 + local_60 * 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + local_60 * 8)" ( (binary_expression "lVar5 + local_60 * 8" identifier + (binary_expression "local_60 * 8" identifier * number_literal)) )))) = identifier) ;) (expression_statement "iVar4 = FUN_00109be0(param_4);" (assignment_expression "iVar4 = FUN_00109be0(param_4)" identifier = (call_expression "FUN_00109be0(param_4)" identifier (argument_list "(param_4)" ( identifier )))) ;) (if_statement "if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" { (expression_statement "lVar9 = 0;" (assignment_expression "lVar9 = 0" identifier = number_literal) ;) (do_statement "do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);" do (compound_statement "{\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        }" { (expression_statement "uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;" (assignment_expression "uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60" identifier = (binary_expression "((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60" (parenthesized_expression "((int)lVar9 << (bVar7 & 0x1f))" ( (binary_expression "(int)lVar9 << (bVar7 & 0x1f)" (cast_expression "(int)lVar9" ( (type_descriptor "int" primitive_type) ) identifier) << (parenthesized_expression "(bVar7 & 0x1f)" ( (binary_expression "bVar7 & 0x1f" identifier & number_literal) ))) )) + (cast_expression "(int)local_60" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }" { (expression_statement "uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;" (assignment_expression "uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2" identifier = (binary_expression "(uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2" (parenthesized_expression "(uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f)))" ( (binary_expression "uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))" (binary_expression "uVar3 * 0xffff" identifier * number_literal) + (parenthesized_expression "(1 << (0xfU - cVar1 & 0x1f))" ( (binary_expression "1 << (0xfU - cVar1 & 0x1f)" number_literal << (parenthesized_expression "(0xfU - cVar1 & 0x1f)" ( (binary_expression "0xfU - cVar1 & 0x1f" (binary_expression "0xfU - cVar1" number_literal - identifier) & number_literal) ))) ))) )) / identifier)) ;) })) (expression_statement "*(short *)(lVar6 + lVar9 * 2) = (short)uVar3;" (assignment_expression "*(short *)(lVar6 + lVar9 * 2) = (short)uVar3" (pointer_expression "*(short *)(lVar6 + lVar9 * 2)" * (cast_expression "(short *)(lVar6 + lVar9 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar6 + lVar9 * 2)" ( (binary_expression "lVar6 + lVar9 * 2" identifier + (binary_expression "lVar9 * 2" identifier * number_literal)) )))) = (cast_expression "(short)uVar3" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (expression_statement "lVar9 = lVar9 + 1;" (assignment_expression "lVar9 = lVar9 + 1" identifier = (binary_expression "lVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(lVar9 != 0x100)" ( (binary_expression "lVar9 != 0x100" identifier != number_literal) )) ;) }) (else_clause "else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" else (compound_statement "{\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" { (expression_statement "__y = (double)param_4 * _DAT_00129500;" (assignment_expression "__y = (double)param_4 * _DAT_00129500" identifier = (binary_expression "(double)param_4 * _DAT_00129500" (cast_expression "(double)param_4" ( (type_descriptor "double" primitive_type) ) identifier) * identifier)) ;) (expression_statement "lVar9 = 0;" (assignment_expression "lVar9 = 0" identifier = number_literal) ;) (do_statement "do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);" do (compound_statement "{\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        }" { (expression_statement "dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);" (assignment_expression "dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y)" identifier = (call_expression "pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y)" identifier (argument_list "((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y)" ( (binary_expression "(double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12" (cast_expression "(double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60)" ( (type_descriptor "double" primitive_type) ) (call_expression "(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60)" ( (binary_expression "((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60" (parenthesized_expression "((int)lVar9 << (bVar7 & 0x1f))" ( (binary_expression "(int)lVar9 << (bVar7 & 0x1f)" (cast_expression "(int)lVar9" ( (type_descriptor "int" primitive_type) ) identifier) << (parenthesized_expression "(bVar7 & 0x1f)" ( (binary_expression "bVar7 & 0x1f" identifier & number_literal) ))) )) + (cast_expression "(int)local_60" ( (type_descriptor "int" primitive_type) ) identifier)) )))) * identifier) , identifier )))) ;) (expression_statement "dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;" (assignment_expression "dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8" identifier = (binary_expression "dVar11 * _DAT_00129508 + _DAT_001294c8" (binary_expression "dVar11 * _DAT_00129508" identifier * identifier) + identifier)) ;) (if_statement "if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }" if (parenthesized_expression "((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0)" ( (binary_expression "(double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0" (cast_expression "(double)((ulong)dVar11 & DAT_00129530)" ( (type_descriptor "double" primitive_type) ) (parenthesized_expression "((ulong)dVar11 & DAT_00129530)" ( (binary_expression "(ulong)dVar11 & DAT_00129530" (cast_expression "(ulong)dVar11" ( (type_descriptor "ulong" type_identifier) ) identifier) & identifier) ))) < identifier) )) (compound_statement "{\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }" { (expression_statement "dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);" (assignment_expression "dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11)" identifier = (cast_expression "(double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11)" ( (type_descriptor "double" primitive_type) ) (parenthesized_expression "((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11)" ( (binary_expression "(ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11" (call_expression "(ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8))" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8))" ( (binary_expression "(double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)" (cast_expression "(double)(long)dVar11" ( (type_descriptor "double" primitive_type) ) (cast_expression "(long)dVar11" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) - (cast_expression "(double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)" ( (type_descriptor "double" primitive_type) ) (parenthesized_expression "(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)" ( (binary_expression "-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8" (unary_expression "-(ulong)(dVar11 < (double)(long)dVar11)" - (call_expression "(ulong)(dVar11 < (double)(long)dVar11)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(dVar11 < (double)(long)dVar11)" ( (binary_expression "dVar11 < (double)(long)dVar11" identifier < (cast_expression "(double)(long)dVar11" ( (type_descriptor "double" primitive_type) ) (cast_expression "(long)dVar11" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) )))) & (cast_expression "(ulong)DAT_001294a8" ( (type_descriptor "ulong" type_identifier) ) identifier)) )))) ))) | (binary_expression "~DAT_00129530 & (ulong)dVar11" (unary_expression "~DAT_00129530" ~ identifier) & (cast_expression "(ulong)dVar11" ( (type_descriptor "ulong" type_identifier) ) identifier))) )))) ;) })) (expression_statement "*(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;" (assignment_expression "*(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11" (pointer_expression "*(short *)(lVar6 + lVar9 * 2)" * (cast_expression "(short *)(lVar6 + lVar9 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar6 + lVar9 * 2)" ( (binary_expression "lVar6 + lVar9 * 2" identifier + (binary_expression "lVar9 * 2" identifier * number_literal)) )))) = (cast_expression "(short)(int)dVar11" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (cast_expression "(int)dVar11" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "lVar9 = lVar9 + 1;" (assignment_expression "lVar9 = lVar9 + 1" identifier = (binary_expression "lVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(lVar9 != 0x100)" ( (binary_expression "lVar9 != 0x100" identifier != number_literal) )) ;) }))) (expression_statement "bVar10 = local_60 != uVar8 - 1;" (assignment_expression "bVar10 = local_60 != uVar8 - 1" identifier = (binary_expression "local_60 != uVar8 - 1" identifier != (binary_expression "uVar8 - 1" identifier - number_literal))) ;) (expression_statement "local_60 = local_60 + 1;" (assignment_expression "local_60 = local_60 + 1" identifier = (binary_expression "local_60 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar10)" ( identifier )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */\n\nvoid png_build_16bit_table\n               (png_structrp png_ptr,png_uint_16pp *ptable,uint shift,png_fixed_point gamma_val)\n\n{\n  char cVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  png_uint_16pp pppVar5;\n  png_uint_16 *ppVar6;\n  byte bVar7;\n  uint uVar8;\n  long lVar9;\n  bool bVar10;\n  double dVar11;\n  double __y;\n  double dVar12;\n  ulong local_60;\n  \n  cVar1 = (char)shift;\n  bVar7 = 8 - cVar1;\n  uVar8 = 1 << (bVar7 & 0x1f);\n  uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;\n  dVar12 = DAT_001294a8 / (double)(int)uVar2;\n  pppVar5 = (png_uint_16pp)png_calloc(png_ptr,(ulong)uVar8 << 3);\n  *ptable = pppVar5;\n  if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      ppVar6 = (png_uint_16 *)png_malloc(png_ptr,0x200);\n      pppVar5[local_60] = ppVar6;\n      iVar4 = png_gamma_significant(gamma_val);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (shift != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          ppVar6[lVar9] = (png_uint_16)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)gamma_val * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          ppVar6[lVar9] = (png_uint_16)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }\n  return;\n}\n\n" comment (function_definition "void png_build_16bit_table\n               (png_structrp png_ptr,png_uint_16pp *ptable,uint shift,png_fixed_point gamma_val)\n\n{\n  char cVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  png_uint_16pp pppVar5;\n  png_uint_16 *ppVar6;\n  byte bVar7;\n  uint uVar8;\n  long lVar9;\n  bool bVar10;\n  double dVar11;\n  double __y;\n  double dVar12;\n  ulong local_60;\n  \n  cVar1 = (char)shift;\n  bVar7 = 8 - cVar1;\n  uVar8 = 1 << (bVar7 & 0x1f);\n  uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;\n  dVar12 = DAT_001294a8 / (double)(int)uVar2;\n  pppVar5 = (png_uint_16pp)png_calloc(png_ptr,(ulong)uVar8 << 3);\n  *ptable = pppVar5;\n  if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      ppVar6 = (png_uint_16 *)png_malloc(png_ptr,0x200);\n      pppVar5[local_60] = ppVar6;\n      iVar4 = png_gamma_significant(gamma_val);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (shift != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          ppVar6[lVar9] = (png_uint_16)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)gamma_val * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          ppVar6[lVar9] = (png_uint_16)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }\n  return;\n}" primitive_type (function_declarator "png_build_16bit_table\n               (png_structrp png_ptr,png_uint_16pp *ptable,uint shift,png_fixed_point gamma_val)" identifier (parameter_list "(png_structrp png_ptr,png_uint_16pp *ptable,uint shift,png_fixed_point gamma_val)" ( (parameter_declaration "png_structrp png_ptr" type_identifier identifier) , (parameter_declaration "png_uint_16pp *ptable" type_identifier (pointer_declarator "*ptable" * identifier)) , (parameter_declaration "uint shift" type_identifier identifier) , (parameter_declaration "png_fixed_point gamma_val" type_identifier identifier) ))) (compound_statement "{\n  char cVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  png_uint_16pp pppVar5;\n  png_uint_16 *ppVar6;\n  byte bVar7;\n  uint uVar8;\n  long lVar9;\n  bool bVar10;\n  double dVar11;\n  double __y;\n  double dVar12;\n  ulong local_60;\n  \n  cVar1 = (char)shift;\n  bVar7 = 8 - cVar1;\n  uVar8 = 1 << (bVar7 & 0x1f);\n  uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;\n  dVar12 = DAT_001294a8 / (double)(int)uVar2;\n  pppVar5 = (png_uint_16pp)png_calloc(png_ptr,(ulong)uVar8 << 3);\n  *ptable = pppVar5;\n  if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      ppVar6 = (png_uint_16 *)png_malloc(png_ptr,0x200);\n      pppVar5[local_60] = ppVar6;\n      iVar4 = png_gamma_significant(gamma_val);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (shift != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          ppVar6[lVar9] = (png_uint_16)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)gamma_val * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          ppVar6[lVar9] = (png_uint_16)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }\n  return;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "png_uint_16pp pppVar5;" type_identifier identifier ;) (declaration "png_uint_16 *ppVar6;" type_identifier (pointer_declarator "*ppVar6" * identifier) ;) (declaration "byte bVar7;" type_identifier identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "long lVar9;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar10;" primitive_type identifier ;) (declaration "double dVar11;" primitive_type identifier ;) (declaration "double __y;" primitive_type identifier ;) (declaration "double dVar12;" primitive_type identifier ;) (declaration "ulong local_60;" type_identifier identifier ;) (expression_statement "cVar1 = (char)shift;" (assignment_expression "cVar1 = (char)shift" identifier = (cast_expression "(char)shift" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "bVar7 = 8 - cVar1;" (assignment_expression "bVar7 = 8 - cVar1" identifier = (binary_expression "8 - cVar1" number_literal - identifier)) ;) (expression_statement "uVar8 = 1 << (bVar7 & 0x1f);" (assignment_expression "uVar8 = 1 << (bVar7 & 0x1f)" identifier = (binary_expression "1 << (bVar7 & 0x1f)" number_literal << (parenthesized_expression "(bVar7 & 0x1f)" ( (binary_expression "bVar7 & 0x1f" identifier & number_literal) )))) ;) (expression_statement "uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;" (assignment_expression "uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1" identifier = (binary_expression "(1 << (0x10U - cVar1 & 0x1f)) - 1" (parenthesized_expression "(1 << (0x10U - cVar1 & 0x1f))" ( (binary_expression "1 << (0x10U - cVar1 & 0x1f)" number_literal << (parenthesized_expression "(0x10U - cVar1 & 0x1f)" ( (binary_expression "0x10U - cVar1 & 0x1f" (binary_expression "0x10U - cVar1" number_literal - identifier) & number_literal) ))) )) - number_literal)) ;) (expression_statement "dVar12 = DAT_001294a8 / (double)(int)uVar2;" (assignment_expression "dVar12 = DAT_001294a8 / (double)(int)uVar2" identifier = (binary_expression "DAT_001294a8 / (double)(int)uVar2" identifier / (cast_expression "(double)(int)uVar2" ( (type_descriptor "double" primitive_type) ) (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)))) ;) (expression_statement "pppVar5 = (png_uint_16pp)png_calloc(png_ptr,(ulong)uVar8 << 3);" (assignment_expression "pppVar5 = (png_uint_16pp)png_calloc(png_ptr,(ulong)uVar8 << 3)" identifier = (cast_expression "(png_uint_16pp)png_calloc(png_ptr,(ulong)uVar8 << 3)" ( (type_descriptor "png_uint_16pp" type_identifier) ) (call_expression "png_calloc(png_ptr,(ulong)uVar8 << 3)" identifier (argument_list "(png_ptr,(ulong)uVar8 << 3)" ( identifier , (binary_expression "(ulong)uVar8 << 3" (cast_expression "(ulong)uVar8" ( (type_descriptor "ulong" type_identifier) ) identifier) << number_literal) ))))) ;) (expression_statement "*ptable = pppVar5;" (assignment_expression "*ptable = pppVar5" (pointer_expression "*ptable" * identifier) = identifier) ;) (if_statement "if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      ppVar6 = (png_uint_16 *)png_malloc(png_ptr,0x200);\n      pppVar5[local_60] = ppVar6;\n      iVar4 = png_gamma_significant(gamma_val);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (shift != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          ppVar6[lVar9] = (png_uint_16)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)gamma_val * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          ppVar6[lVar9] = (png_uint_16)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }" if (parenthesized_expression "(uVar8 != 0)" ( (binary_expression "uVar8 != 0" identifier != number_literal) )) (compound_statement "{\n    local_60 = 0;\n    do {\n      ppVar6 = (png_uint_16 *)png_malloc(png_ptr,0x200);\n      pppVar5[local_60] = ppVar6;\n      iVar4 = png_gamma_significant(gamma_val);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (shift != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          ppVar6[lVar9] = (png_uint_16)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)gamma_val * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          ppVar6[lVar9] = (png_uint_16)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }" { (expression_statement "local_60 = 0;" (assignment_expression "local_60 = 0" identifier = number_literal) ;) (do_statement "do {\n      ppVar6 = (png_uint_16 *)png_malloc(png_ptr,0x200);\n      pppVar5[local_60] = ppVar6;\n      iVar4 = png_gamma_significant(gamma_val);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (shift != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          ppVar6[lVar9] = (png_uint_16)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)gamma_val * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          ppVar6[lVar9] = (png_uint_16)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);" do (compound_statement "{\n      ppVar6 = (png_uint_16 *)png_malloc(png_ptr,0x200);\n      pppVar5[local_60] = ppVar6;\n      iVar4 = png_gamma_significant(gamma_val);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (shift != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          ppVar6[lVar9] = (png_uint_16)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)gamma_val * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          ppVar6[lVar9] = (png_uint_16)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    }" { (expression_statement "ppVar6 = (png_uint_16 *)png_malloc(png_ptr,0x200);" (assignment_expression "ppVar6 = (png_uint_16 *)png_malloc(png_ptr,0x200)" identifier = (cast_expression "(png_uint_16 *)png_malloc(png_ptr,0x200)" ( (type_descriptor "png_uint_16 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "png_malloc(png_ptr,0x200)" identifier (argument_list "(png_ptr,0x200)" ( identifier , number_literal ))))) ;) (expression_statement "pppVar5[local_60] = ppVar6;" (assignment_expression "pppVar5[local_60] = ppVar6" (subscript_expression "pppVar5[local_60]" identifier [ identifier ]) = identifier) ;) (expression_statement "iVar4 = png_gamma_significant(gamma_val);" (assignment_expression "iVar4 = png_gamma_significant(gamma_val)" identifier = (call_expression "png_gamma_significant(gamma_val)" identifier (argument_list "(gamma_val)" ( identifier )))) ;) (if_statement "if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (shift != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          ppVar6[lVar9] = (png_uint_16)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)gamma_val * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          ppVar6[lVar9] = (png_uint_16)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (shift != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          ppVar6[lVar9] = (png_uint_16)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" { (expression_statement "lVar9 = 0;" (assignment_expression "lVar9 = 0" identifier = number_literal) ;) (do_statement "do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (shift != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          ppVar6[lVar9] = (png_uint_16)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);" do (compound_statement "{\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (shift != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          ppVar6[lVar9] = (png_uint_16)uVar3;\n          lVar9 = lVar9 + 1;\n        }" { (expression_statement "uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;" (assignment_expression "uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60" identifier = (binary_expression "((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60" (parenthesized_expression "((int)lVar9 << (bVar7 & 0x1f))" ( (binary_expression "(int)lVar9 << (bVar7 & 0x1f)" (cast_expression "(int)lVar9" ( (type_descriptor "int" primitive_type) ) identifier) << (parenthesized_expression "(bVar7 & 0x1f)" ( (binary_expression "bVar7 & 0x1f" identifier & number_literal) ))) )) + (cast_expression "(int)local_60" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (shift != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }" if (parenthesized_expression "(shift != 0)" ( (binary_expression "shift != 0" identifier != number_literal) )) (compound_statement "{\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }" { (expression_statement "uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;" (assignment_expression "uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2" identifier = (binary_expression "(uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2" (parenthesized_expression "(uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f)))" ( (binary_expression "uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))" (binary_expression "uVar3 * 0xffff" identifier * number_literal) + (parenthesized_expression "(1 << (0xfU - cVar1 & 0x1f))" ( (binary_expression "1 << (0xfU - cVar1 & 0x1f)" number_literal << (parenthesized_expression "(0xfU - cVar1 & 0x1f)" ( (binary_expression "0xfU - cVar1 & 0x1f" (binary_expression "0xfU - cVar1" number_literal - identifier) & number_literal) ))) ))) )) / identifier)) ;) })) (expression_statement "ppVar6[lVar9] = (png_uint_16)uVar3;" (assignment_expression "ppVar6[lVar9] = (png_uint_16)uVar3" (subscript_expression "ppVar6[lVar9]" identifier [ identifier ]) = (cast_expression "(png_uint_16)uVar3" ( (type_descriptor "png_uint_16" type_identifier) ) identifier)) ;) (expression_statement "lVar9 = lVar9 + 1;" (assignment_expression "lVar9 = lVar9 + 1" identifier = (binary_expression "lVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(lVar9 != 0x100)" ( (binary_expression "lVar9 != 0x100" identifier != number_literal) )) ;) }) (else_clause "else {\n        __y = (double)gamma_val * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          ppVar6[lVar9] = (png_uint_16)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" else (compound_statement "{\n        __y = (double)gamma_val * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          ppVar6[lVar9] = (png_uint_16)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" { (expression_statement "__y = (double)gamma_val * _DAT_00129500;" (assignment_expression "__y = (double)gamma_val * _DAT_00129500" identifier = (binary_expression "(double)gamma_val * _DAT_00129500" (cast_expression "(double)gamma_val" ( (type_descriptor "double" primitive_type) ) identifier) * identifier)) ;) (expression_statement "lVar9 = 0;" (assignment_expression "lVar9 = 0" identifier = number_literal) ;) (do_statement "do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          ppVar6[lVar9] = (png_uint_16)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);" do (compound_statement "{\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          ppVar6[lVar9] = (png_uint_16)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        }" { (expression_statement "dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);" (assignment_expression "dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y)" identifier = (call_expression "pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y)" identifier (argument_list "((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y)" ( (binary_expression "(double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12" (cast_expression "(double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60)" ( (type_descriptor "double" primitive_type) ) (call_expression "(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60)" ( (binary_expression "((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60" (parenthesized_expression "((int)lVar9 << (bVar7 & 0x1f))" ( (binary_expression "(int)lVar9 << (bVar7 & 0x1f)" (cast_expression "(int)lVar9" ( (type_descriptor "int" primitive_type) ) identifier) << (parenthesized_expression "(bVar7 & 0x1f)" ( (binary_expression "bVar7 & 0x1f" identifier & number_literal) ))) )) + (cast_expression "(int)local_60" ( (type_descriptor "int" primitive_type) ) identifier)) )))) * identifier) , identifier )))) ;) (expression_statement "dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;" (assignment_expression "dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8" identifier = (binary_expression "dVar11 * _DAT_00129508 + _DAT_001294c8" (binary_expression "dVar11 * _DAT_00129508" identifier * identifier) + identifier)) ;) (if_statement "if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }" if (parenthesized_expression "((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0)" ( (binary_expression "(double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0" (cast_expression "(double)((ulong)dVar11 & DAT_00129530)" ( (type_descriptor "double" primitive_type) ) (parenthesized_expression "((ulong)dVar11 & DAT_00129530)" ( (binary_expression "(ulong)dVar11 & DAT_00129530" (cast_expression "(ulong)dVar11" ( (type_descriptor "ulong" type_identifier) ) identifier) & identifier) ))) < identifier) )) (compound_statement "{\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }" { (expression_statement "dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);" (assignment_expression "dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11)" identifier = (cast_expression "(double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11)" ( (type_descriptor "double" primitive_type) ) (parenthesized_expression "((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11)" ( (binary_expression "(ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11" (call_expression "(ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8))" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8))" ( (binary_expression "(double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)" (cast_expression "(double)(long)dVar11" ( (type_descriptor "double" primitive_type) ) (cast_expression "(long)dVar11" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) - (cast_expression "(double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)" ( (type_descriptor "double" primitive_type) ) (parenthesized_expression "(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)" ( (binary_expression "-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8" (unary_expression "-(ulong)(dVar11 < (double)(long)dVar11)" - (call_expression "(ulong)(dVar11 < (double)(long)dVar11)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(dVar11 < (double)(long)dVar11)" ( (binary_expression "dVar11 < (double)(long)dVar11" identifier < (cast_expression "(double)(long)dVar11" ( (type_descriptor "double" primitive_type) ) (cast_expression "(long)dVar11" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) )))) & (cast_expression "(ulong)DAT_001294a8" ( (type_descriptor "ulong" type_identifier) ) identifier)) )))) ))) | (binary_expression "~DAT_00129530 & (ulong)dVar11" (unary_expression "~DAT_00129530" ~ identifier) & (cast_expression "(ulong)dVar11" ( (type_descriptor "ulong" type_identifier) ) identifier))) )))) ;) })) (expression_statement "ppVar6[lVar9] = (png_uint_16)(int)dVar11;" (assignment_expression "ppVar6[lVar9] = (png_uint_16)(int)dVar11" (subscript_expression "ppVar6[lVar9]" identifier [ identifier ]) = (cast_expression "(png_uint_16)(int)dVar11" ( (type_descriptor "png_uint_16" type_identifier) ) (cast_expression "(int)dVar11" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "lVar9 = lVar9 + 1;" (assignment_expression "lVar9 = lVar9 + 1" identifier = (binary_expression "lVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(lVar9 != 0x100)" ( (binary_expression "lVar9 != 0x100" identifier != number_literal) )) ;) }))) (expression_statement "bVar10 = local_60 != uVar8 - 1;" (assignment_expression "bVar10 = local_60 != uVar8 - 1" identifier = (binary_expression "local_60 != uVar8 - 1" identifier != (binary_expression "uVar8 - 1" identifier - number_literal))) ;) (expression_statement "local_60 = local_60 + 1;" (assignment_expression "local_60 = local_60 + 1" identifier = (binary_expression "local_60 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar10)" ( identifier )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0010a1c9(undefined8 param_1,long *param_2,int param_3,int param_4)\n\n{\n  char cVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  byte bVar7;\n  uint uVar8;\n  long lVar9;\n  bool bVar10;\n  double dVar11;\n  double __y;\n  double dVar12;\n  ulong local_60;\n  \n  cVar1 = (char)param_3;\n  bVar7 = 8 - cVar1;\n  uVar8 = 1 << (bVar7 & 0x1f);\n  uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;\n  dVar12 = DAT_001294a8 / (double)(int)uVar2;\n  lVar5 = png_calloc(param_1,(ulong)uVar8 << 3);\n  *param_2 = lVar5;\n  if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }\n  return;\n}\n\n" (function_definition "void FUN_0010a1c9(undefined8 param_1,long *param_2,int param_3,int param_4)\n\n{\n  char cVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  byte bVar7;\n  uint uVar8;\n  long lVar9;\n  bool bVar10;\n  double dVar11;\n  double __y;\n  double dVar12;\n  ulong local_60;\n  \n  cVar1 = (char)param_3;\n  bVar7 = 8 - cVar1;\n  uVar8 = 1 << (bVar7 & 0x1f);\n  uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;\n  dVar12 = DAT_001294a8 / (double)(int)uVar2;\n  lVar5 = png_calloc(param_1,(ulong)uVar8 << 3);\n  *param_2 = lVar5;\n  if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0010a1c9(undefined8 param_1,long *param_2,int param_3,int param_4)" identifier (parameter_list "(undefined8 param_1,long *param_2,int param_3,int param_4)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "long *param_2" (sized_type_specifier "long" long) (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  byte bVar7;\n  uint uVar8;\n  long lVar9;\n  bool bVar10;\n  double dVar11;\n  double __y;\n  double dVar12;\n  ulong local_60;\n  \n  cVar1 = (char)param_3;\n  bVar7 = 8 - cVar1;\n  uVar8 = 1 << (bVar7 & 0x1f);\n  uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;\n  dVar12 = DAT_001294a8 / (double)(int)uVar2;\n  lVar5 = png_calloc(param_1,(ulong)uVar8 << 3);\n  *param_2 = lVar5;\n  if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }\n  return;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "byte bVar7;" type_identifier identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "long lVar9;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar10;" primitive_type identifier ;) (declaration "double dVar11;" primitive_type identifier ;) (declaration "double __y;" primitive_type identifier ;) (declaration "double dVar12;" primitive_type identifier ;) (declaration "ulong local_60;" type_identifier identifier ;) (expression_statement "cVar1 = (char)param_3;" (assignment_expression "cVar1 = (char)param_3" identifier = (cast_expression "(char)param_3" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "bVar7 = 8 - cVar1;" (assignment_expression "bVar7 = 8 - cVar1" identifier = (binary_expression "8 - cVar1" number_literal - identifier)) ;) (expression_statement "uVar8 = 1 << (bVar7 & 0x1f);" (assignment_expression "uVar8 = 1 << (bVar7 & 0x1f)" identifier = (binary_expression "1 << (bVar7 & 0x1f)" number_literal << (parenthesized_expression "(bVar7 & 0x1f)" ( (binary_expression "bVar7 & 0x1f" identifier & number_literal) )))) ;) (expression_statement "uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;" (assignment_expression "uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1" identifier = (binary_expression "(1 << (0x10U - cVar1 & 0x1f)) - 1" (parenthesized_expression "(1 << (0x10U - cVar1 & 0x1f))" ( (binary_expression "1 << (0x10U - cVar1 & 0x1f)" number_literal << (parenthesized_expression "(0x10U - cVar1 & 0x1f)" ( (binary_expression "0x10U - cVar1 & 0x1f" (binary_expression "0x10U - cVar1" number_literal - identifier) & number_literal) ))) )) - number_literal)) ;) (expression_statement "dVar12 = DAT_001294a8 / (double)(int)uVar2;" (assignment_expression "dVar12 = DAT_001294a8 / (double)(int)uVar2" identifier = (binary_expression "DAT_001294a8 / (double)(int)uVar2" identifier / (cast_expression "(double)(int)uVar2" ( (type_descriptor "double" primitive_type) ) (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)))) ;) (expression_statement "lVar5 = png_calloc(param_1,(ulong)uVar8 << 3);" (assignment_expression "lVar5 = png_calloc(param_1,(ulong)uVar8 << 3)" identifier = (call_expression "png_calloc(param_1,(ulong)uVar8 << 3)" identifier (argument_list "(param_1,(ulong)uVar8 << 3)" ( identifier , (binary_expression "(ulong)uVar8 << 3" (cast_expression "(ulong)uVar8" ( (type_descriptor "ulong" type_identifier) ) identifier) << number_literal) )))) ;) (expression_statement "*param_2 = lVar5;" (assignment_expression "*param_2 = lVar5" (pointer_expression "*param_2" * identifier) = identifier) ;) (if_statement "if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }" if (parenthesized_expression "(uVar8 != 0)" ( (binary_expression "uVar8 != 0" identifier != number_literal) )) (compound_statement "{\n    local_60 = 0;\n    do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }" { (expression_statement "local_60 = 0;" (assignment_expression "local_60 = 0" identifier = number_literal) ;) (do_statement "do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);" do (compound_statement "{\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    }" { (expression_statement "lVar6 = png_malloc(param_1,0x200);" (assignment_expression "lVar6 = png_malloc(param_1,0x200)" identifier = (call_expression "png_malloc(param_1,0x200)" identifier (argument_list "(param_1,0x200)" ( identifier , number_literal )))) ;) (expression_statement "*(long *)(lVar5 + local_60 * 8) = lVar6;" (assignment_expression "*(long *)(lVar5 + local_60 * 8) = lVar6" (pointer_expression "*(long *)(lVar5 + local_60 * 8)" * (cast_expression "(long *)(lVar5 + local_60 * 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + local_60 * 8)" ( (binary_expression "lVar5 + local_60 * 8" identifier + (binary_expression "local_60 * 8" identifier * number_literal)) )))) = identifier) ;) (expression_statement "iVar4 = FUN_00109be0(param_4);" (assignment_expression "iVar4 = FUN_00109be0(param_4)" identifier = (call_expression "FUN_00109be0(param_4)" identifier (argument_list "(param_4)" ( identifier )))) ;) (if_statement "if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" { (expression_statement "lVar9 = 0;" (assignment_expression "lVar9 = 0" identifier = number_literal) ;) (do_statement "do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);" do (compound_statement "{\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        }" { (expression_statement "uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;" (assignment_expression "uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60" identifier = (binary_expression "((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60" (parenthesized_expression "((int)lVar9 << (bVar7 & 0x1f))" ( (binary_expression "(int)lVar9 << (bVar7 & 0x1f)" (cast_expression "(int)lVar9" ( (type_descriptor "int" primitive_type) ) identifier) << (parenthesized_expression "(bVar7 & 0x1f)" ( (binary_expression "bVar7 & 0x1f" identifier & number_literal) ))) )) + (cast_expression "(int)local_60" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }" { (expression_statement "uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;" (assignment_expression "uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2" identifier = (binary_expression "(uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2" (parenthesized_expression "(uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f)))" ( (binary_expression "uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))" (binary_expression "uVar3 * 0xffff" identifier * number_literal) + (parenthesized_expression "(1 << (0xfU - cVar1 & 0x1f))" ( (binary_expression "1 << (0xfU - cVar1 & 0x1f)" number_literal << (parenthesized_expression "(0xfU - cVar1 & 0x1f)" ( (binary_expression "0xfU - cVar1 & 0x1f" (binary_expression "0xfU - cVar1" number_literal - identifier) & number_literal) ))) ))) )) / identifier)) ;) })) (expression_statement "*(short *)(lVar6 + lVar9 * 2) = (short)uVar3;" (assignment_expression "*(short *)(lVar6 + lVar9 * 2) = (short)uVar3" (pointer_expression "*(short *)(lVar6 + lVar9 * 2)" * (cast_expression "(short *)(lVar6 + lVar9 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar6 + lVar9 * 2)" ( (binary_expression "lVar6 + lVar9 * 2" identifier + (binary_expression "lVar9 * 2" identifier * number_literal)) )))) = (cast_expression "(short)uVar3" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (expression_statement "lVar9 = lVar9 + 1;" (assignment_expression "lVar9 = lVar9 + 1" identifier = (binary_expression "lVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(lVar9 != 0x100)" ( (binary_expression "lVar9 != 0x100" identifier != number_literal) )) ;) }) (else_clause "else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" else (compound_statement "{\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" { (expression_statement "__y = (double)param_4 * _DAT_00129500;" (assignment_expression "__y = (double)param_4 * _DAT_00129500" identifier = (binary_expression "(double)param_4 * _DAT_00129500" (cast_expression "(double)param_4" ( (type_descriptor "double" primitive_type) ) identifier) * identifier)) ;) (expression_statement "lVar9 = 0;" (assignment_expression "lVar9 = 0" identifier = number_literal) ;) (do_statement "do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);" do (compound_statement "{\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        }" { (expression_statement "dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);" (assignment_expression "dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y)" identifier = (call_expression "pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y)" identifier (argument_list "((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y)" ( (binary_expression "(double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12" (cast_expression "(double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60)" ( (type_descriptor "double" primitive_type) ) (call_expression "(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60)" ( (binary_expression "((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60" (parenthesized_expression "((int)lVar9 << (bVar7 & 0x1f))" ( (binary_expression "(int)lVar9 << (bVar7 & 0x1f)" (cast_expression "(int)lVar9" ( (type_descriptor "int" primitive_type) ) identifier) << (parenthesized_expression "(bVar7 & 0x1f)" ( (binary_expression "bVar7 & 0x1f" identifier & number_literal) ))) )) + (cast_expression "(int)local_60" ( (type_descriptor "int" primitive_type) ) identifier)) )))) * identifier) , identifier )))) ;) (expression_statement "dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;" (assignment_expression "dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8" identifier = (binary_expression "dVar11 * _DAT_00129508 + _DAT_001294c8" (binary_expression "dVar11 * _DAT_00129508" identifier * identifier) + identifier)) ;) (if_statement "if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }" if (parenthesized_expression "((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0)" ( (binary_expression "(double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0" (cast_expression "(double)((ulong)dVar11 & DAT_00129530)" ( (type_descriptor "double" primitive_type) ) (parenthesized_expression "((ulong)dVar11 & DAT_00129530)" ( (binary_expression "(ulong)dVar11 & DAT_00129530" (cast_expression "(ulong)dVar11" ( (type_descriptor "ulong" type_identifier) ) identifier) & identifier) ))) < identifier) )) (compound_statement "{\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }" { (expression_statement "dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);" (assignment_expression "dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11)" identifier = (cast_expression "(double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11)" ( (type_descriptor "double" primitive_type) ) (parenthesized_expression "((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11)" ( (binary_expression "(ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11" (call_expression "(ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8))" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8))" ( (binary_expression "(double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)" (cast_expression "(double)(long)dVar11" ( (type_descriptor "double" primitive_type) ) (cast_expression "(long)dVar11" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) - (cast_expression "(double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)" ( (type_descriptor "double" primitive_type) ) (parenthesized_expression "(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)" ( (binary_expression "-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8" (unary_expression "-(ulong)(dVar11 < (double)(long)dVar11)" - (call_expression "(ulong)(dVar11 < (double)(long)dVar11)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(dVar11 < (double)(long)dVar11)" ( (binary_expression "dVar11 < (double)(long)dVar11" identifier < (cast_expression "(double)(long)dVar11" ( (type_descriptor "double" primitive_type) ) (cast_expression "(long)dVar11" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) )))) & (cast_expression "(ulong)DAT_001294a8" ( (type_descriptor "ulong" type_identifier) ) identifier)) )))) ))) | (binary_expression "~DAT_00129530 & (ulong)dVar11" (unary_expression "~DAT_00129530" ~ identifier) & (cast_expression "(ulong)dVar11" ( (type_descriptor "ulong" type_identifier) ) identifier))) )))) ;) })) (expression_statement "*(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;" (assignment_expression "*(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11" (pointer_expression "*(short *)(lVar6 + lVar9 * 2)" * (cast_expression "(short *)(lVar6 + lVar9 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar6 + lVar9 * 2)" ( (binary_expression "lVar6 + lVar9 * 2" identifier + (binary_expression "lVar9 * 2" identifier * number_literal)) )))) = (cast_expression "(short)(int)dVar11" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (cast_expression "(int)dVar11" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "lVar9 = lVar9 + 1;" (assignment_expression "lVar9 = lVar9 + 1" identifier = (binary_expression "lVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(lVar9 != 0x100)" ( (binary_expression "lVar9 != 0x100" identifier != number_literal) )) ;) }))) (expression_statement "bVar10 = local_60 != uVar8 - 1;" (assignment_expression "bVar10 = local_60 != uVar8 - 1" identifier = (binary_expression "local_60 != uVar8 - 1" identifier != (binary_expression "uVar8 - 1" identifier - number_literal))) ;) (expression_statement "local_60 = local_60 + 1;" (assignment_expression "local_60 = local_60 + 1" identifier = (binary_expression "local_60 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar10)" ( identifier )) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression LIT - IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression LIT << (parenthesized_expression ( (binary_expression IDENT & LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression LIT << (parenthesized_expression ( (binary_expression (binary_expression LIT - IDENT) & LIT) ))) )) - LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT / (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) << LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) << (parenthesized_expression ( (binary_expression IDENT & LIT) ))) )) + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT * LIT) + (parenthesized_expression ( (binary_expression LIT << (parenthesized_expression ( (binary_expression (binary_expression LIT - IDENT) & LIT) ))) ))) )) / IDENT)) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) << (parenthesized_expression ( (binary_expression IDENT & LIT) ))) )) + (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) * IDENT) , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT * IDENT) + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & IDENT) ))) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) - (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (unary_expression - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT))) )))) & (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ))) | (binary_expression (unary_expression ~ IDENT) & (cast_expression ( (type_descriptor TYPE) ) IDENT))) )))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT != (binary_expression IDENT - LIT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( IDENT )) ;) })) (return_statement return ;) })))
(function_definition "void FUN_0010a1c9(undefined8 param_1,long *param_2,int param_3,int param_4)\n\n{\n  char cVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  byte bVar7;\n  uint uVar8;\n  long lVar9;\n  bool bVar10;\n  double dVar11;\n  double __y;\n  double dVar12;\n  ulong local_60;\n  \n  cVar1 = (char)param_3;\n  bVar7 = 8 - cVar1;\n  uVar8 = 1 << (bVar7 & 0x1f);\n  uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;\n  dVar12 = DAT_001294a8 / (double)(int)uVar2;\n  lVar5 = png_calloc(param_1,(ulong)uVar8 << 3);\n  *param_2 = lVar5;\n  if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0010a1c9(undefined8 param_1,long *param_2,int param_3,int param_4)" (identifier "FUN_0010a1c9") (parameter_list "(undefined8 param_1,long *param_2,int param_3,int param_4)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "long *param_2" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  char cVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  long lVar5;\n  long lVar6;\n  byte bVar7;\n  uint uVar8;\n  long lVar9;\n  bool bVar10;\n  double dVar11;\n  double __y;\n  double dVar12;\n  ulong local_60;\n  \n  cVar1 = (char)param_3;\n  bVar7 = 8 - cVar1;\n  uVar8 = 1 << (bVar7 & 0x1f);\n  uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;\n  dVar12 = DAT_001294a8 / (double)(int)uVar2;\n  lVar5 = png_calloc(param_1,(ulong)uVar8 << 3);\n  *param_2 = lVar5;\n  if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }\n  return;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (declaration "long lVar6;" (sized_type_specifier "long" (long "long")) (identifier "lVar6") (; ";")) (declaration "byte bVar7;" (type_identifier "byte") (identifier "bVar7") (; ";")) (declaration "uint uVar8;" (type_identifier "uint") (identifier "uVar8") (; ";")) (declaration "long lVar9;" (sized_type_specifier "long" (long "long")) (identifier "lVar9") (; ";")) (declaration "bool bVar10;" (primitive_type "bool") (identifier "bVar10") (; ";")) (declaration "double dVar11;" (primitive_type "double") (identifier "dVar11") (; ";")) (declaration "double __y;" (primitive_type "double") (identifier "__y") (; ";")) (declaration "double dVar12;" (primitive_type "double") (identifier "dVar12") (; ";")) (declaration "ulong local_60;" (type_identifier "ulong") (identifier "local_60") (; ";")) (expression_statement "cVar1 = (char)param_3;" (assignment_expression "cVar1 = (char)param_3" (identifier "cVar1") (= "=") (cast_expression "(char)param_3" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_3"))) (; ";")) (expression_statement "bVar7 = 8 - cVar1;" (assignment_expression "bVar7 = 8 - cVar1" (identifier "bVar7") (= "=") (binary_expression "8 - cVar1" (number_literal "8") (- "-") (identifier "cVar1"))) (; ";")) (expression_statement "uVar8 = 1 << (bVar7 & 0x1f);" (assignment_expression "uVar8 = 1 << (bVar7 & 0x1f)" (identifier "uVar8") (= "=") (binary_expression "1 << (bVar7 & 0x1f)" (number_literal "1") (<< "<<") (parenthesized_expression "(bVar7 & 0x1f)" (( "(") (binary_expression "bVar7 & 0x1f" (identifier "bVar7") (& "&") (number_literal "0x1f")) () ")")))) (; ";")) (expression_statement "uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;" (assignment_expression "uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1" (identifier "uVar2") (= "=") (binary_expression "(1 << (0x10U - cVar1 & 0x1f)) - 1" (parenthesized_expression "(1 << (0x10U - cVar1 & 0x1f))" (( "(") (binary_expression "1 << (0x10U - cVar1 & 0x1f)" (number_literal "1") (<< "<<") (parenthesized_expression "(0x10U - cVar1 & 0x1f)" (( "(") (binary_expression "0x10U - cVar1 & 0x1f" (binary_expression "0x10U - cVar1" (number_literal "0x10U") (- "-") (identifier "cVar1")) (& "&") (number_literal "0x1f")) () ")"))) () ")")) (- "-") (number_literal "1"))) (; ";")) (expression_statement "dVar12 = DAT_001294a8 / (double)(int)uVar2;" (assignment_expression "dVar12 = DAT_001294a8 / (double)(int)uVar2" (identifier "dVar12") (= "=") (binary_expression "DAT_001294a8 / (double)(int)uVar2" (identifier "DAT_001294a8") (/ "/") (cast_expression "(double)(int)uVar2" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2"))))) (; ";")) (expression_statement "lVar5 = png_calloc(param_1,(ulong)uVar8 << 3);" (assignment_expression "lVar5 = png_calloc(param_1,(ulong)uVar8 << 3)" (identifier "lVar5") (= "=") (call_expression "png_calloc(param_1,(ulong)uVar8 << 3)" (identifier "png_calloc") (argument_list "(param_1,(ulong)uVar8 << 3)" (( "(") (identifier "param_1") (, ",") (binary_expression "(ulong)uVar8 << 3" (cast_expression "(ulong)uVar8" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar8")) (<< "<<") (number_literal "3")) () ")")))) (; ";")) (expression_statement "*param_2 = lVar5;" (assignment_expression "*param_2 = lVar5" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "lVar5")) (; ";")) (if_statement "if (uVar8 != 0) {\n    local_60 = 0;\n    do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }" (if "if") (parenthesized_expression "(uVar8 != 0)" (( "(") (binary_expression "uVar8 != 0" (identifier "uVar8") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    local_60 = 0;\n    do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);\n  }" ({ "{") (expression_statement "local_60 = 0;" (assignment_expression "local_60 = 0" (identifier "local_60") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    } while (bVar10);" (do "do") (compound_statement "{\n      lVar6 = png_malloc(param_1,0x200);\n      *(long *)(lVar5 + local_60 * 8) = lVar6;\n      iVar4 = FUN_00109be0(param_4);\n      if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      bVar10 = local_60 != uVar8 - 1;\n      local_60 = local_60 + 1;\n    }" ({ "{") (expression_statement "lVar6 = png_malloc(param_1,0x200);" (assignment_expression "lVar6 = png_malloc(param_1,0x200)" (identifier "lVar6") (= "=") (call_expression "png_malloc(param_1,0x200)" (identifier "png_malloc") (argument_list "(param_1,0x200)" (( "(") (identifier "param_1") (, ",") (number_literal "0x200") () ")")))) (; ";")) (expression_statement "*(long *)(lVar5 + local_60 * 8) = lVar6;" (assignment_expression "*(long *)(lVar5 + local_60 * 8) = lVar6" (pointer_expression "*(long *)(lVar5 + local_60 * 8)" (* "*") (cast_expression "(long *)(lVar5 + local_60 * 8)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar5 + local_60 * 8)" (( "(") (binary_expression "lVar5 + local_60 * 8" (identifier "lVar5") (+ "+") (binary_expression "local_60 * 8" (identifier "local_60") (* "*") (number_literal "8"))) () ")")))) (= "=") (identifier "lVar6")) (; ";")) (expression_statement "iVar4 = FUN_00109be0(param_4);" (assignment_expression "iVar4 = FUN_00109be0(param_4)" (identifier "iVar4") (= "=") (call_expression "FUN_00109be0(param_4)" (identifier "FUN_00109be0") (argument_list "(param_4)" (( "(") (identifier "param_4") () ")")))) (; ";")) (if_statement "if (iVar4 == 0) {\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }\n      else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        lVar9 = 0;\n        do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" ({ "{") (expression_statement "lVar9 = 0;" (assignment_expression "lVar9 = 0" (identifier "lVar9") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);" (do "do") (compound_statement "{\n          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;\n          if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;\n          lVar9 = lVar9 + 1;\n        }" ({ "{") (expression_statement "uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;" (assignment_expression "uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60" (identifier "uVar3") (= "=") (binary_expression "((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60" (parenthesized_expression "((int)lVar9 << (bVar7 & 0x1f))" (( "(") (binary_expression "(int)lVar9 << (bVar7 & 0x1f)" (cast_expression "(int)lVar9" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "lVar9")) (<< "<<") (parenthesized_expression "(bVar7 & 0x1f)" (( "(") (binary_expression "bVar7 & 0x1f" (identifier "bVar7") (& "&") (number_literal "0x1f")) () ")"))) () ")")) (+ "+") (cast_expression "(int)local_60" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_60")))) (; ";")) (if_statement "if (param_3 != 0) {\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;\n          }" ({ "{") (expression_statement "uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;" (assignment_expression "uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2" (identifier "uVar3") (= "=") (binary_expression "(uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2" (parenthesized_expression "(uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f)))" (( "(") (binary_expression "uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))" (binary_expression "uVar3 * 0xffff" (identifier "uVar3") (* "*") (number_literal "0xffff")) (+ "+") (parenthesized_expression "(1 << (0xfU - cVar1 & 0x1f))" (( "(") (binary_expression "1 << (0xfU - cVar1 & 0x1f)" (number_literal "1") (<< "<<") (parenthesized_expression "(0xfU - cVar1 & 0x1f)" (( "(") (binary_expression "0xfU - cVar1 & 0x1f" (binary_expression "0xfU - cVar1" (number_literal "0xfU") (- "-") (identifier "cVar1")) (& "&") (number_literal "0x1f")) () ")"))) () ")"))) () ")")) (/ "/") (identifier "uVar2"))) (; ";")) (} "}"))) (expression_statement "*(short *)(lVar6 + lVar9 * 2) = (short)uVar3;" (assignment_expression "*(short *)(lVar6 + lVar9 * 2) = (short)uVar3" (pointer_expression "*(short *)(lVar6 + lVar9 * 2)" (* "*") (cast_expression "(short *)(lVar6 + lVar9 * 2)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar6 + lVar9 * 2)" (( "(") (binary_expression "lVar6 + lVar9 * 2" (identifier "lVar6") (+ "+") (binary_expression "lVar9 * 2" (identifier "lVar9") (* "*") (number_literal "2"))) () ")")))) (= "=") (cast_expression "(short)uVar3" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "uVar3"))) (; ";")) (expression_statement "lVar9 = lVar9 + 1;" (assignment_expression "lVar9 = lVar9 + 1" (identifier "lVar9") (= "=") (binary_expression "lVar9 + 1" (identifier "lVar9") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(lVar9 != 0x100)" (( "(") (binary_expression "lVar9 != 0x100" (identifier "lVar9") (!= "!=") (number_literal "0x100")) () ")")) (; ";")) (} "}")) (else_clause "else {\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" (else "else") (compound_statement "{\n        __y = (double)param_4 * _DAT_00129500;\n        lVar9 = 0;\n        do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);\n      }" ({ "{") (expression_statement "__y = (double)param_4 * _DAT_00129500;" (assignment_expression "__y = (double)param_4 * _DAT_00129500" (identifier "__y") (= "=") (binary_expression "(double)param_4 * _DAT_00129500" (cast_expression "(double)param_4" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (identifier "param_4")) (* "*") (identifier "_DAT_00129500"))) (; ";")) (expression_statement "lVar9 = 0;" (assignment_expression "lVar9 = 0" (identifier "lVar9") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        } while (lVar9 != 0x100);" (do "do") (compound_statement "{\n          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);\n          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;\n          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }\n          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;\n          lVar9 = lVar9 + 1;\n        }" ({ "{") (expression_statement "dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);" (assignment_expression "dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y)" (identifier "dVar11") (= "=") (call_expression "pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y)" (identifier "pow") (argument_list "((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y)" (( "(") (binary_expression "(double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12" (cast_expression "(double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60)" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (call_expression "(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60)" (( "(") (binary_expression "((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60" (parenthesized_expression "((int)lVar9 << (bVar7 & 0x1f))" (( "(") (binary_expression "(int)lVar9 << (bVar7 & 0x1f)" (cast_expression "(int)lVar9" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "lVar9")) (<< "<<") (parenthesized_expression "(bVar7 & 0x1f)" (( "(") (binary_expression "bVar7 & 0x1f" (identifier "bVar7") (& "&") (number_literal "0x1f")) () ")"))) () ")")) (+ "+") (cast_expression "(int)local_60" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_60"))) () ")")))) (* "*") (identifier "dVar12")) (, ",") (identifier "__y") () ")")))) (; ";")) (expression_statement "dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;" (assignment_expression "dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8" (identifier "dVar11") (= "=") (binary_expression "dVar11 * _DAT_00129508 + _DAT_001294c8" (binary_expression "dVar11 * _DAT_00129508" (identifier "dVar11") (* "*") (identifier "_DAT_00129508")) (+ "+") (identifier "_DAT_001294c8"))) (; ";")) (if_statement "if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }" (if "if") (parenthesized_expression "((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0)" (( "(") (binary_expression "(double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0" (cast_expression "(double)((ulong)dVar11 & DAT_00129530)" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (parenthesized_expression "((ulong)dVar11 & DAT_00129530)" (( "(") (binary_expression "(ulong)dVar11 & DAT_00129530" (cast_expression "(ulong)dVar11" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "dVar11")) (& "&") (identifier "DAT_00129530")) () ")"))) (< "<") (identifier "DAT_001294d0")) () ")")) (compound_statement "{\n            dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);\n          }" ({ "{") (expression_statement "dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);" (assignment_expression "dVar11 = (double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11)" (identifier "dVar11") (= "=") (cast_expression "(double)((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11)" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (parenthesized_expression "((ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11)" (( "(") (binary_expression "(ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11" (call_expression "(ulong)((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8))" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "((double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8))" (( "(") (binary_expression "(double)(long)dVar11 -\n                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)" (cast_expression "(double)(long)dVar11" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (cast_expression "(long)dVar11" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "dVar11"))) (- "-") (cast_expression "(double)(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (parenthesized_expression "(-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8)" (( "(") (binary_expression "-(ulong)(dVar11 < (double)(long)dVar11) &\n                                             (ulong)DAT_001294a8" (unary_expression "-(ulong)(dVar11 < (double)(long)dVar11)" (- "-") (call_expression "(ulong)(dVar11 < (double)(long)dVar11)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(dVar11 < (double)(long)dVar11)" (( "(") (binary_expression "dVar11 < (double)(long)dVar11" (identifier "dVar11") (< "<") (cast_expression "(double)(long)dVar11" (( "(") (type_descriptor "double" (primitive_type "double")) () ")") (cast_expression "(long)dVar11" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "dVar11")))) () ")")))) (& "&") (cast_expression "(ulong)DAT_001294a8" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "DAT_001294a8"))) () ")")))) () ")"))) (| "|") (binary_expression "~DAT_00129530 & (ulong)dVar11" (unary_expression "~DAT_00129530" (~ "~") (identifier "DAT_00129530")) (& "&") (cast_expression "(ulong)dVar11" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "dVar11")))) () ")")))) (; ";")) (} "}"))) (expression_statement "*(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;" (assignment_expression "*(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11" (pointer_expression "*(short *)(lVar6 + lVar9 * 2)" (* "*") (cast_expression "(short *)(lVar6 + lVar9 * 2)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar6 + lVar9 * 2)" (( "(") (binary_expression "lVar6 + lVar9 * 2" (identifier "lVar6") (+ "+") (binary_expression "lVar9 * 2" (identifier "lVar9") (* "*") (number_literal "2"))) () ")")))) (= "=") (cast_expression "(short)(int)dVar11" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (cast_expression "(int)dVar11" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "dVar11")))) (; ";")) (expression_statement "lVar9 = lVar9 + 1;" (assignment_expression "lVar9 = lVar9 + 1" (identifier "lVar9") (= "=") (binary_expression "lVar9 + 1" (identifier "lVar9") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(lVar9 != 0x100)" (( "(") (binary_expression "lVar9 != 0x100" (identifier "lVar9") (!= "!=") (number_literal "0x100")) () ")")) (; ";")) (} "}")))) (expression_statement "bVar10 = local_60 != uVar8 - 1;" (assignment_expression "bVar10 = local_60 != uVar8 - 1" (identifier "bVar10") (= "=") (binary_expression "local_60 != uVar8 - 1" (identifier "local_60") (!= "!=") (binary_expression "uVar8 - 1" (identifier "uVar8") (- "-") (number_literal "1")))) (; ";")) (expression_statement "local_60 = local_60 + 1;" (assignment_expression "local_60 = local_60 + 1" (identifier "local_60") (= "=") (binary_expression "local_60 + 1" (identifier "local_60") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar10)" (( "(") (identifier "bVar10") () ")")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void function_1
               (type_1 png_ptr,type_2 *ptable,type_3 var_9,type_4 gamma_val)

{
  char var_1;
  type_3 var_11;
  type_3 var_10;
  int var_8;
  type_2 pppVar5;
  type_5 *ppVar6;
  type_6 var_2;
  type_3 var_5;
  long var_12;
  bool bVar10;
  double var_16;
  double __y;
  double var_15;
  type_7 var_21;
  
  var_1 = (char)var_9;
  var_2 = 8 - var_1;
  var_5 = 1 << (var_2 & 0x1f);
  var_11 = (1 << (0x10U - var_1 & 0x1f)) - 1;
  var_15 = var_3 / (double)(int)var_11;
  pppVar5 = (type_2)var_4(png_ptr,(type_7)var_5 << 3);
  *ptable = pppVar5;
  if (var_5 != 0) {
    var_21 = 0;
    do {
      ppVar6 = (type_5 *)var_6(png_ptr,0x200);
      pppVar5[var_21] = ppVar6;
      var_8 = var_7(gamma_val);
      if (var_8 == 0) {
        var_12 = 0;
        do {
          var_10 = ((int)var_12 << (var_2 & 0x1f)) + (int)var_21;
          if (var_9 != 0) {
            var_10 = (var_10 * 0xffff + (1 << (0xfU - var_1 & 0x1f))) / var_11;
          }
          ppVar6[var_12] = (type_5)var_10;
          var_12 = var_12 + 1;
        } while (var_12 != 0x100);
      }
      else {
        __y = (double)gamma_val * var_13;
        var_12 = 0;
        do {
          var_16 = var_14((double)(type_3)(((int)var_12 << (var_2 & 0x1f)) + (int)var_21) * var_15,__y);
          var_16 = var_16 * var_17 + var_18;
          if ((double)((type_7)var_16 & var_19) < var_20) {
            var_16 = (double)((type_7)((double)(long)var_16 -
                                     (double)(-(type_7)(var_16 < (double)(long)var_16) &
                                             (type_7)var_3)) | ~var_19 & (type_7)var_16);
          }
          ppVar6[var_12] = (type_5)(int)var_16;
          var_12 = var_12 + 1;
        } while (var_12 != 0x100);
      }
      bVar10 = var_21 != var_5 - 1;
      var_21 = var_21 + 1;
    } while (bVar10);
  }
  return;
}


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

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void MASKED(undefined8 param_1,long *param_2,int param_3,int param_4)

{
  char cVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  long lVar5;
  long lVar6;
  byte bVar7;
  uint uVar8;
  long lVar9;
  bool bVar10;
  double dVar11;
  double __y;
  double dVar12;
  ulong local_60;
  
  cVar1 = (char)param_3;
  bVar7 = 8 - cVar1;
  uVar8 = 1 << (bVar7 & 0x1f);
  uVar2 = (1 << (0x10U - cVar1 & 0x1f)) - 1;
  dVar12 = DAT_001294a8 / (double)(int)uVar2;
  lVar5 = png_calloc(param_1,(ulong)uVar8 << 3);
  *param_2 = lVar5;
  if (uVar8 != 0) {
    local_60 = 0;
    do {
      lVar6 = png_malloc(param_1,0x200);
      *(long *)(lVar5 + local_60 * 8) = lVar6;
      iVar4 = FUN_00109be0(param_4);
      if (iVar4 == 0) {
        lVar9 = 0;
        do {
          uVar3 = ((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60;
          if (param_3 != 0) {
            uVar3 = (uVar3 * 0xffff + (1 << (0xfU - cVar1 & 0x1f))) / uVar2;
          }
          *(short *)(lVar6 + lVar9 * 2) = (short)uVar3;
          lVar9 = lVar9 + 1;
        } while (lVar9 != 0x100);
      }
      else {
        __y = (double)param_4 * _DAT_00129500;
        lVar9 = 0;
        do {
          dVar11 = pow((double)(uint)(((int)lVar9 << (bVar7 & 0x1f)) + (int)local_60) * dVar12,__y);
          dVar11 = dVar11 * _DAT_00129508 + _DAT_001294c8;
          if ((double)((ulong)dVar11 & DAT_00129530) < DAT_001294d0) {
            dVar11 = (double)((ulong)((double)(long)dVar11 -
                                     (double)(-(ulong)(dVar11 < (double)(long)dVar11) &
                                             (ulong)DAT_001294a8)) | ~DAT_00129530 & (ulong)dVar11);
          }
          *(short *)(lVar6 + lVar9 * 2) = (short)(int)dVar11;
          lVar9 = lVar9 + 1;
        } while (lVar9 != 0x100);
      }
      bVar10 = local_60 != uVar8 - 1;
      local_60 = local_60 + 1;
    } while (bVar10);
  }
  return;
}

