
int png_colorspace_set_xy_and_XYZ
              (png_const_structrp png_ptr,png_colorspacerp colorspace,png_xy *xy,png_XYZ *XYZ,
              int preferred)

{
  ushort uVar1;
  png_fixed_point pVar2;
  png_fixed_point pVar3;
  png_fixed_point pVar4;
  int iVar5;
  
  uVar1 = colorspace->flags;
  if ((short)uVar1 < 0) {
    return 0;
  }
  if ((preferred < 2) && ((uVar1 & 2) != 0)) {
    iVar5 = png_colorspace_endpoints_match(xy,&colorspace->end_points_xy,100);
    if (iVar5 == 0) {
      colorspace->flags = uVar1 | 0x8000;
      png_benign_error(png_ptr,"inconsistent chromaticities");
      return 0;
    }
    if (preferred == 0) {
      return 1;
    }
  }
  pVar2 = xy->redy;
  pVar3 = xy->greenx;
  pVar4 = xy->greeny;
  (colorspace->end_points_xy).redx = xy->redx;
  (colorspace->end_points_xy).redy = pVar2;
  (colorspace->end_points_xy).greenx = pVar3;
  (colorspace->end_points_xy).greeny = pVar4;
  pVar2 = xy->bluey;
  pVar3 = xy->whitex;
  pVar4 = xy->whitey;
  (colorspace->end_points_xy).bluex = xy->bluex;
  (colorspace->end_points_xy).bluey = pVar2;
  (colorspace->end_points_xy).whitex = pVar3;
  (colorspace->end_points_xy).whitey = pVar4;
  pVar2 = XYZ->red_Y;
  pVar3 = XYZ->red_Z;
  pVar4 = XYZ->green_X;
  (colorspace->end_points_XYZ).red_X = XYZ->red_X;
  (colorspace->end_points_XYZ).red_Y = pVar2;
  (colorspace->end_points_XYZ).red_Z = pVar3;
  (colorspace->end_points_XYZ).green_X = pVar4;
  pVar2 = XYZ->green_Z;
  pVar3 = XYZ->blue_X;
  pVar4 = XYZ->blue_Y;
  (colorspace->end_points_XYZ).green_Y = XYZ->green_Y;
  (colorspace->end_points_XYZ).green_Z = pVar2;
  (colorspace->end_points_XYZ).blue_X = pVar3;
  (colorspace->end_points_XYZ).blue_Y = pVar4;
  (colorspace->end_points_XYZ).blue_Z = XYZ->blue_Z;
  colorspace->flags = uVar1 | 2;
  iVar5 = png_colorspace_endpoints_match(xy,&sRGB_xy,1000);
  if (iVar5 == 0) {
    colorspace->flags = uVar1 & 0xffbf | 2;
  }
  else {
    colorspace->flags = uVar1 | 0x42;
  }
  return 2;
}



undefined4
FUN_00106b92(undefined8 param_1,long param_2,undefined8 *param_3,undefined8 *param_4,int param_5)

{
  ushort uVar1;
  undefined8 uVar2;
  int iVar3;
  
  uVar1 = *(ushort *)(param_2 + 0x4a);
  if ((short)uVar1 < 0) {
    return 0;
  }
  if ((param_5 < 2) && ((uVar1 & 2) != 0)) {
    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);
    if (iVar3 == 0) {
      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;
      png_benign_error(param_1,"inconsistent chromaticities");
      return 0;
    }
    if (param_5 == 0) {
      return 1;
    }
  }
  uVar2 = param_3[1];
  *(undefined8 *)(param_2 + 4) = *param_3;
  *(undefined8 *)(param_2 + 0xc) = uVar2;
  uVar2 = param_3[3];
  *(undefined8 *)(param_2 + 0x14) = param_3[2];
  *(undefined8 *)(param_2 + 0x1c) = uVar2;
  uVar2 = param_4[1];
  *(undefined8 *)(param_2 + 0x24) = *param_4;
  *(undefined8 *)(param_2 + 0x2c) = uVar2;
  uVar2 = param_4[3];
  *(undefined8 *)(param_2 + 0x34) = param_4[2];
  *(undefined8 *)(param_2 + 0x3c) = uVar2;
  *(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4);
  *(ushort *)(param_2 + 0x4a) = uVar1 | 2;
  iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000);
  if (iVar3 == 0) {
    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;
  }
  else {
    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;
  }
  return 2;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOVZX EBP,word ptr [RSI + 0x4a]
MOV R15D,0x0
TEST BP,BP
JS 0x00106c24
MOV R14D,R8D
MOV R13,RCX
MOV R12,RDX
MOV RBX,RSI
MOV qword ptr [RSP + 0x8],RDI
CMP R8D,0x1
JLE 0x00106c36
MOVDQU XMM0,xmmword ptr [R12]
MOVUPS xmmword ptr [RBX + 0x4],XMM0
MOVDQU XMM1,xmmword ptr [R12 + 0x10]
MOVUPS xmmword ptr [RBX + 0x14],XMM1
MOVDQU XMM2,xmmword ptr [R13]
MOVUPS xmmword ptr [RBX + 0x24],XMM2
MOVDQU XMM3,xmmword ptr [R13 + 0x10]
MOVUPS xmmword ptr [RBX + 0x34],XMM3
MOV EAX,dword ptr [R13 + 0x20]
MOV dword ptr [RBX + 0x44],EAX
MOV EAX,EBP
OR EAX,0x2
MOV word ptr [RBX + 0x4a],AX
MOV EDX,0x3e8
LEA RSI,[0x129480]
MOV RDI,R12
CALL 0x001069f5
TEST EAX,EAX
JZ 0x00106c81
OR EBP,0x42
MOV word ptr [RBX + 0x4a],BP
MOV R15D,0x2
MOV EAX,R15D
ADD RSP,0x18
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
TEST BPL,0x2
JZ 0x00106bc6
LEA RSI,[RSI + 0x4]
MOV EDX,0x64
MOV RDI,R12
CALL 0x001069f5
MOV R15D,EAX
TEST EAX,EAX
JZ 0x00106c65
MOV R15D,0x1
TEST R14D,R14D
JNZ 0x00106bc6
JMP 0x00106c24
OR BP,0x8000
MOV word ptr [RBX + 0x4a],BP
LEA RSI,[0x128000]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001065b0
JMP 0x00106c24
AND EBP,0xffffffbf
OR EBP,0x2
MOV word ptr [RBX + 0x4a],BP
MOV R15D,0x2
JMP 0x00106c24
(translation_unit "undefined4\nFUN_00106b92(undefined8 param_1,long param_2,undefined8 *param_3,undefined8 *param_4,int param_5)\n\n{\n  ushort uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  \n  uVar1 = *(ushort *)(param_2 + 0x4a);\n  if ((short)uVar1 < 0) {\n    return 0;\n  }\n  if ((param_5 < 2) && ((uVar1 & 2) != 0)) {\n    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);\n    if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }\n    if (param_5 == 0) {\n      return 1;\n    }\n  }\n  uVar2 = param_3[1];\n  *(undefined8 *)(param_2 + 4) = *param_3;\n  *(undefined8 *)(param_2 + 0xc) = uVar2;\n  uVar2 = param_3[3];\n  *(undefined8 *)(param_2 + 0x14) = param_3[2];\n  *(undefined8 *)(param_2 + 0x1c) = uVar2;\n  uVar2 = param_4[1];\n  *(undefined8 *)(param_2 + 0x24) = *param_4;\n  *(undefined8 *)(param_2 + 0x2c) = uVar2;\n  uVar2 = param_4[3];\n  *(undefined8 *)(param_2 + 0x34) = param_4[2];\n  *(undefined8 *)(param_2 + 0x3c) = uVar2;\n  *(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4);\n  *(ushort *)(param_2 + 0x4a) = uVar1 | 2;\n  iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000);\n  if (iVar3 == 0) {\n    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;\n  }\n  else {\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }\n  return 2;\n}\n\n" (function_definition "undefined4\nFUN_00106b92(undefined8 param_1,long param_2,undefined8 *param_3,undefined8 *param_4,int param_5)\n\n{\n  ushort uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  \n  uVar1 = *(ushort *)(param_2 + 0x4a);\n  if ((short)uVar1 < 0) {\n    return 0;\n  }\n  if ((param_5 < 2) && ((uVar1 & 2) != 0)) {\n    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);\n    if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }\n    if (param_5 == 0) {\n      return 1;\n    }\n  }\n  uVar2 = param_3[1];\n  *(undefined8 *)(param_2 + 4) = *param_3;\n  *(undefined8 *)(param_2 + 0xc) = uVar2;\n  uVar2 = param_3[3];\n  *(undefined8 *)(param_2 + 0x14) = param_3[2];\n  *(undefined8 *)(param_2 + 0x1c) = uVar2;\n  uVar2 = param_4[1];\n  *(undefined8 *)(param_2 + 0x24) = *param_4;\n  *(undefined8 *)(param_2 + 0x2c) = uVar2;\n  uVar2 = param_4[3];\n  *(undefined8 *)(param_2 + 0x34) = param_4[2];\n  *(undefined8 *)(param_2 + 0x3c) = uVar2;\n  *(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4);\n  *(ushort *)(param_2 + 0x4a) = uVar1 | 2;\n  iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000);\n  if (iVar3 == 0) {\n    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;\n  }\n  else {\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }\n  return 2;\n}" type_identifier (function_declarator "FUN_00106b92(undefined8 param_1,long param_2,undefined8 *param_3,undefined8 *param_4,int param_5)" identifier (parameter_list "(undefined8 param_1,long param_2,undefined8 *param_3,undefined8 *param_4,int param_5)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined8 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  ushort uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  \n  uVar1 = *(ushort *)(param_2 + 0x4a);\n  if ((short)uVar1 < 0) {\n    return 0;\n  }\n  if ((param_5 < 2) && ((uVar1 & 2) != 0)) {\n    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);\n    if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }\n    if (param_5 == 0) {\n      return 1;\n    }\n  }\n  uVar2 = param_3[1];\n  *(undefined8 *)(param_2 + 4) = *param_3;\n  *(undefined8 *)(param_2 + 0xc) = uVar2;\n  uVar2 = param_3[3];\n  *(undefined8 *)(param_2 + 0x14) = param_3[2];\n  *(undefined8 *)(param_2 + 0x1c) = uVar2;\n  uVar2 = param_4[1];\n  *(undefined8 *)(param_2 + 0x24) = *param_4;\n  *(undefined8 *)(param_2 + 0x2c) = uVar2;\n  uVar2 = param_4[3];\n  *(undefined8 *)(param_2 + 0x34) = param_4[2];\n  *(undefined8 *)(param_2 + 0x3c) = uVar2;\n  *(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4);\n  *(ushort *)(param_2 + 0x4a) = uVar1 | 2;\n  iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000);\n  if (iVar3 == 0) {\n    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;\n  }\n  else {\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }\n  return 2;\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "uVar1 = *(ushort *)(param_2 + 0x4a);" (assignment_expression "uVar1 = *(ushort *)(param_2 + 0x4a)" identifier = (pointer_expression "*(ushort *)(param_2 + 0x4a)" * (cast_expression "(ushort *)(param_2 + 0x4a)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x4a)" ( (binary_expression "param_2 + 0x4a" identifier + number_literal) ))))) ;) (if_statement "if ((short)uVar1 < 0) {\n    return 0;\n  }" if (parenthesized_expression "((short)uVar1 < 0)" ( (binary_expression "(short)uVar1 < 0" (cast_expression "(short)uVar1" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) < number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((param_5 < 2) && ((uVar1 & 2) != 0)) {\n    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);\n    if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }\n    if (param_5 == 0) {\n      return 1;\n    }\n  }" if (parenthesized_expression "((param_5 < 2) && ((uVar1 & 2) != 0))" ( (binary_expression "(param_5 < 2) && ((uVar1 & 2) != 0)" (parenthesized_expression "(param_5 < 2)" ( (binary_expression "param_5 < 2" identifier < number_literal) )) && (parenthesized_expression "((uVar1 & 2) != 0)" ( (binary_expression "(uVar1 & 2) != 0" (parenthesized_expression "(uVar1 & 2)" ( (binary_expression "uVar1 & 2" identifier & number_literal) )) != number_literal) ))) )) (compound_statement "{\n    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);\n    if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }\n    if (param_5 == 0) {\n      return 1;\n    }\n  }" { (expression_statement "iVar3 = FUN_001069f5(param_3,param_2 + 4,100);" (assignment_expression "iVar3 = FUN_001069f5(param_3,param_2 + 4,100)" identifier = (call_expression "FUN_001069f5(param_3,param_2 + 4,100)" identifier (argument_list "(param_3,param_2 + 4,100)" ( identifier , (binary_expression "param_2 + 4" identifier + number_literal) , number_literal )))) ;) (if_statement "if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }" { (expression_statement "*(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;" (assignment_expression "*(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000" (pointer_expression "*(ushort *)(param_2 + 0x4a)" * (cast_expression "(ushort *)(param_2 + 0x4a)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x4a)" ( (binary_expression "param_2 + 0x4a" identifier + number_literal) )))) = (binary_expression "uVar1 | 0x8000" identifier | number_literal)) ;) (expression_statement "png_benign_error(param_1,"inconsistent chromaticities");" (call_expression "png_benign_error(param_1,"inconsistent chromaticities")" identifier (argument_list "(param_1,"inconsistent chromaticities")" ( identifier , (string_literal ""inconsistent chromaticities"" " string_content ") ))) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (param_5 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) })) (expression_statement "uVar2 = param_3[1];" (assignment_expression "uVar2 = param_3[1]" identifier = (subscript_expression "param_3[1]" identifier [ number_literal ])) ;) (expression_statement "*(undefined8 *)(param_2 + 4) = *param_3;" (assignment_expression "*(undefined8 *)(param_2 + 4) = *param_3" (pointer_expression "*(undefined8 *)(param_2 + 4)" * (cast_expression "(undefined8 *)(param_2 + 4)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) = (pointer_expression "*param_3" * identifier)) ;) (expression_statement "*(undefined8 *)(param_2 + 0xc) = uVar2;" (assignment_expression "*(undefined8 *)(param_2 + 0xc) = uVar2" (pointer_expression "*(undefined8 *)(param_2 + 0xc)" * (cast_expression "(undefined8 *)(param_2 + 0xc)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xc)" ( (binary_expression "param_2 + 0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar2 = param_3[3];" (assignment_expression "uVar2 = param_3[3]" identifier = (subscript_expression "param_3[3]" identifier [ number_literal ])) ;) (expression_statement "*(undefined8 *)(param_2 + 0x14) = param_3[2];" (assignment_expression "*(undefined8 *)(param_2 + 0x14) = param_3[2]" (pointer_expression "*(undefined8 *)(param_2 + 0x14)" * (cast_expression "(undefined8 *)(param_2 + 0x14)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x14)" ( (binary_expression "param_2 + 0x14" identifier + number_literal) )))) = (subscript_expression "param_3[2]" identifier [ number_literal ])) ;) (expression_statement "*(undefined8 *)(param_2 + 0x1c) = uVar2;" (assignment_expression "*(undefined8 *)(param_2 + 0x1c) = uVar2" (pointer_expression "*(undefined8 *)(param_2 + 0x1c)" * (cast_expression "(undefined8 *)(param_2 + 0x1c)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x1c)" ( (binary_expression "param_2 + 0x1c" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar2 = param_4[1];" (assignment_expression "uVar2 = param_4[1]" identifier = (subscript_expression "param_4[1]" identifier [ number_literal ])) ;) (expression_statement "*(undefined8 *)(param_2 + 0x24) = *param_4;" (assignment_expression "*(undefined8 *)(param_2 + 0x24) = *param_4" (pointer_expression "*(undefined8 *)(param_2 + 0x24)" * (cast_expression "(undefined8 *)(param_2 + 0x24)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) )))) = (pointer_expression "*param_4" * identifier)) ;) (expression_statement "*(undefined8 *)(param_2 + 0x2c) = uVar2;" (assignment_expression "*(undefined8 *)(param_2 + 0x2c) = uVar2" (pointer_expression "*(undefined8 *)(param_2 + 0x2c)" * (cast_expression "(undefined8 *)(param_2 + 0x2c)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x2c)" ( (binary_expression "param_2 + 0x2c" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar2 = param_4[3];" (assignment_expression "uVar2 = param_4[3]" identifier = (subscript_expression "param_4[3]" identifier [ number_literal ])) ;) (expression_statement "*(undefined8 *)(param_2 + 0x34) = param_4[2];" (assignment_expression "*(undefined8 *)(param_2 + 0x34) = param_4[2]" (pointer_expression "*(undefined8 *)(param_2 + 0x34)" * (cast_expression "(undefined8 *)(param_2 + 0x34)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x34)" ( (binary_expression "param_2 + 0x34" identifier + number_literal) )))) = (subscript_expression "param_4[2]" identifier [ number_literal ])) ;) (expression_statement "*(undefined8 *)(param_2 + 0x3c) = uVar2;" (assignment_expression "*(undefined8 *)(param_2 + 0x3c) = uVar2" (pointer_expression "*(undefined8 *)(param_2 + 0x3c)" * (cast_expression "(undefined8 *)(param_2 + 0x3c)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x3c)" ( (binary_expression "param_2 + 0x3c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4);" (assignment_expression "*(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4)" (pointer_expression "*(undefined4 *)(param_2 + 0x44)" * (cast_expression "(undefined4 *)(param_2 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x44)" ( (binary_expression "param_2 + 0x44" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(param_4 + 4)" * (cast_expression "(undefined4 *)(param_4 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 4)" ( (binary_expression "param_4 + 4" identifier + number_literal) ))))) ;) (expression_statement "*(ushort *)(param_2 + 0x4a) = uVar1 | 2;" (assignment_expression "*(ushort *)(param_2 + 0x4a) = uVar1 | 2" (pointer_expression "*(ushort *)(param_2 + 0x4a)" * (cast_expression "(ushort *)(param_2 + 0x4a)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x4a)" ( (binary_expression "param_2 + 0x4a" identifier + number_literal) )))) = (binary_expression "uVar1 | 2" identifier | number_literal)) ;) (expression_statement "iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000);" (assignment_expression "iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000)" identifier = (call_expression "FUN_001069f5(param_3,&DAT_00129480,1000)" identifier (argument_list "(param_3,&DAT_00129480,1000)" ( identifier , (pointer_expression "&DAT_00129480" & identifier) , number_literal )))) ;) (if_statement "if (iVar3 == 0) {\n    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;\n  }\n  else {\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;\n  }" { (expression_statement "*(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;" (assignment_expression "*(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2" (pointer_expression "*(ushort *)(param_2 + 0x4a)" * (cast_expression "(ushort *)(param_2 + 0x4a)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x4a)" ( (binary_expression "param_2 + 0x4a" identifier + number_literal) )))) = (binary_expression "uVar1 & 0xffbf | 2" (binary_expression "uVar1 & 0xffbf" identifier & number_literal) | number_literal)) ;) }) (else_clause "else {\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }" else (compound_statement "{\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }" { (expression_statement "*(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;" (assignment_expression "*(ushort *)(param_2 + 0x4a) = uVar1 | 0x42" (pointer_expression "*(ushort *)(param_2 + 0x4a)" * (cast_expression "(ushort *)(param_2 + 0x4a)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x4a)" ( (binary_expression "param_2 + 0x4a" identifier + number_literal) )))) = (binary_expression "uVar1 | 0x42" identifier | number_literal)) ;) }))) (return_statement "return 2;" return number_literal ;) })))
(translation_unit "int png_colorspace_set_xy_and_XYZ\n              (png_const_structrp png_ptr,png_colorspacerp colorspace,png_xy *xy,png_XYZ *XYZ,\n              int preferred)\n\n{\n  ushort uVar1;\n  png_fixed_point pVar2;\n  png_fixed_point pVar3;\n  png_fixed_point pVar4;\n  int iVar5;\n  \n  uVar1 = colorspace->flags;\n  if ((short)uVar1 < 0) {\n    return 0;\n  }\n  if ((preferred < 2) && ((uVar1 & 2) != 0)) {\n    iVar5 = png_colorspace_endpoints_match(xy,&colorspace->end_points_xy,100);\n    if (iVar5 == 0) {\n      colorspace->flags = uVar1 | 0x8000;\n      png_benign_error(png_ptr,"inconsistent chromaticities");\n      return 0;\n    }\n    if (preferred == 0) {\n      return 1;\n    }\n  }\n  pVar2 = xy->redy;\n  pVar3 = xy->greenx;\n  pVar4 = xy->greeny;\n  (colorspace->end_points_xy).redx = xy->redx;\n  (colorspace->end_points_xy).redy = pVar2;\n  (colorspace->end_points_xy).greenx = pVar3;\n  (colorspace->end_points_xy).greeny = pVar4;\n  pVar2 = xy->bluey;\n  pVar3 = xy->whitex;\n  pVar4 = xy->whitey;\n  (colorspace->end_points_xy).bluex = xy->bluex;\n  (colorspace->end_points_xy).bluey = pVar2;\n  (colorspace->end_points_xy).whitex = pVar3;\n  (colorspace->end_points_xy).whitey = pVar4;\n  pVar2 = XYZ->red_Y;\n  pVar3 = XYZ->red_Z;\n  pVar4 = XYZ->green_X;\n  (colorspace->end_points_XYZ).red_X = XYZ->red_X;\n  (colorspace->end_points_XYZ).red_Y = pVar2;\n  (colorspace->end_points_XYZ).red_Z = pVar3;\n  (colorspace->end_points_XYZ).green_X = pVar4;\n  pVar2 = XYZ->green_Z;\n  pVar3 = XYZ->blue_X;\n  pVar4 = XYZ->blue_Y;\n  (colorspace->end_points_XYZ).green_Y = XYZ->green_Y;\n  (colorspace->end_points_XYZ).green_Z = pVar2;\n  (colorspace->end_points_XYZ).blue_X = pVar3;\n  (colorspace->end_points_XYZ).blue_Y = pVar4;\n  (colorspace->end_points_XYZ).blue_Z = XYZ->blue_Z;\n  colorspace->flags = uVar1 | 2;\n  iVar5 = png_colorspace_endpoints_match(xy,&sRGB_xy,1000);\n  if (iVar5 == 0) {\n    colorspace->flags = uVar1 & 0xffbf | 2;\n  }\n  else {\n    colorspace->flags = uVar1 | 0x42;\n  }\n  return 2;\n}\n\n" (function_definition "int png_colorspace_set_xy_and_XYZ\n              (png_const_structrp png_ptr,png_colorspacerp colorspace,png_xy *xy,png_XYZ *XYZ,\n              int preferred)\n\n{\n  ushort uVar1;\n  png_fixed_point pVar2;\n  png_fixed_point pVar3;\n  png_fixed_point pVar4;\n  int iVar5;\n  \n  uVar1 = colorspace->flags;\n  if ((short)uVar1 < 0) {\n    return 0;\n  }\n  if ((preferred < 2) && ((uVar1 & 2) != 0)) {\n    iVar5 = png_colorspace_endpoints_match(xy,&colorspace->end_points_xy,100);\n    if (iVar5 == 0) {\n      colorspace->flags = uVar1 | 0x8000;\n      png_benign_error(png_ptr,"inconsistent chromaticities");\n      return 0;\n    }\n    if (preferred == 0) {\n      return 1;\n    }\n  }\n  pVar2 = xy->redy;\n  pVar3 = xy->greenx;\n  pVar4 = xy->greeny;\n  (colorspace->end_points_xy).redx = xy->redx;\n  (colorspace->end_points_xy).redy = pVar2;\n  (colorspace->end_points_xy).greenx = pVar3;\n  (colorspace->end_points_xy).greeny = pVar4;\n  pVar2 = xy->bluey;\n  pVar3 = xy->whitex;\n  pVar4 = xy->whitey;\n  (colorspace->end_points_xy).bluex = xy->bluex;\n  (colorspace->end_points_xy).bluey = pVar2;\n  (colorspace->end_points_xy).whitex = pVar3;\n  (colorspace->end_points_xy).whitey = pVar4;\n  pVar2 = XYZ->red_Y;\n  pVar3 = XYZ->red_Z;\n  pVar4 = XYZ->green_X;\n  (colorspace->end_points_XYZ).red_X = XYZ->red_X;\n  (colorspace->end_points_XYZ).red_Y = pVar2;\n  (colorspace->end_points_XYZ).red_Z = pVar3;\n  (colorspace->end_points_XYZ).green_X = pVar4;\n  pVar2 = XYZ->green_Z;\n  pVar3 = XYZ->blue_X;\n  pVar4 = XYZ->blue_Y;\n  (colorspace->end_points_XYZ).green_Y = XYZ->green_Y;\n  (colorspace->end_points_XYZ).green_Z = pVar2;\n  (colorspace->end_points_XYZ).blue_X = pVar3;\n  (colorspace->end_points_XYZ).blue_Y = pVar4;\n  (colorspace->end_points_XYZ).blue_Z = XYZ->blue_Z;\n  colorspace->flags = uVar1 | 2;\n  iVar5 = png_colorspace_endpoints_match(xy,&sRGB_xy,1000);\n  if (iVar5 == 0) {\n    colorspace->flags = uVar1 & 0xffbf | 2;\n  }\n  else {\n    colorspace->flags = uVar1 | 0x42;\n  }\n  return 2;\n}" primitive_type (function_declarator "png_colorspace_set_xy_and_XYZ\n              (png_const_structrp png_ptr,png_colorspacerp colorspace,png_xy *xy,png_XYZ *XYZ,\n              int preferred)" identifier (parameter_list "(png_const_structrp png_ptr,png_colorspacerp colorspace,png_xy *xy,png_XYZ *XYZ,\n              int preferred)" ( (parameter_declaration "png_const_structrp png_ptr" type_identifier identifier) , (parameter_declaration "png_colorspacerp colorspace" type_identifier identifier) , (parameter_declaration "png_xy *xy" type_identifier (pointer_declarator "*xy" * identifier)) , (parameter_declaration "png_XYZ *XYZ" type_identifier (pointer_declarator "*XYZ" * identifier)) , (parameter_declaration "int preferred" primitive_type identifier) ))) (compound_statement "{\n  ushort uVar1;\n  png_fixed_point pVar2;\n  png_fixed_point pVar3;\n  png_fixed_point pVar4;\n  int iVar5;\n  \n  uVar1 = colorspace->flags;\n  if ((short)uVar1 < 0) {\n    return 0;\n  }\n  if ((preferred < 2) && ((uVar1 & 2) != 0)) {\n    iVar5 = png_colorspace_endpoints_match(xy,&colorspace->end_points_xy,100);\n    if (iVar5 == 0) {\n      colorspace->flags = uVar1 | 0x8000;\n      png_benign_error(png_ptr,"inconsistent chromaticities");\n      return 0;\n    }\n    if (preferred == 0) {\n      return 1;\n    }\n  }\n  pVar2 = xy->redy;\n  pVar3 = xy->greenx;\n  pVar4 = xy->greeny;\n  (colorspace->end_points_xy).redx = xy->redx;\n  (colorspace->end_points_xy).redy = pVar2;\n  (colorspace->end_points_xy).greenx = pVar3;\n  (colorspace->end_points_xy).greeny = pVar4;\n  pVar2 = xy->bluey;\n  pVar3 = xy->whitex;\n  pVar4 = xy->whitey;\n  (colorspace->end_points_xy).bluex = xy->bluex;\n  (colorspace->end_points_xy).bluey = pVar2;\n  (colorspace->end_points_xy).whitex = pVar3;\n  (colorspace->end_points_xy).whitey = pVar4;\n  pVar2 = XYZ->red_Y;\n  pVar3 = XYZ->red_Z;\n  pVar4 = XYZ->green_X;\n  (colorspace->end_points_XYZ).red_X = XYZ->red_X;\n  (colorspace->end_points_XYZ).red_Y = pVar2;\n  (colorspace->end_points_XYZ).red_Z = pVar3;\n  (colorspace->end_points_XYZ).green_X = pVar4;\n  pVar2 = XYZ->green_Z;\n  pVar3 = XYZ->blue_X;\n  pVar4 = XYZ->blue_Y;\n  (colorspace->end_points_XYZ).green_Y = XYZ->green_Y;\n  (colorspace->end_points_XYZ).green_Z = pVar2;\n  (colorspace->end_points_XYZ).blue_X = pVar3;\n  (colorspace->end_points_XYZ).blue_Y = pVar4;\n  (colorspace->end_points_XYZ).blue_Z = XYZ->blue_Z;\n  colorspace->flags = uVar1 | 2;\n  iVar5 = png_colorspace_endpoints_match(xy,&sRGB_xy,1000);\n  if (iVar5 == 0) {\n    colorspace->flags = uVar1 & 0xffbf | 2;\n  }\n  else {\n    colorspace->flags = uVar1 | 0x42;\n  }\n  return 2;\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "png_fixed_point pVar2;" type_identifier identifier ;) (declaration "png_fixed_point pVar3;" type_identifier identifier ;) (declaration "png_fixed_point pVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "uVar1 = colorspace->flags;" (assignment_expression "uVar1 = colorspace->flags" identifier = (field_expression "colorspace->flags" identifier -> field_identifier)) ;) (if_statement "if ((short)uVar1 < 0) {\n    return 0;\n  }" if (parenthesized_expression "((short)uVar1 < 0)" ( (binary_expression "(short)uVar1 < 0" (cast_expression "(short)uVar1" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) < number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((preferred < 2) && ((uVar1 & 2) != 0)) {\n    iVar5 = png_colorspace_endpoints_match(xy,&colorspace->end_points_xy,100);\n    if (iVar5 == 0) {\n      colorspace->flags = uVar1 | 0x8000;\n      png_benign_error(png_ptr,"inconsistent chromaticities");\n      return 0;\n    }\n    if (preferred == 0) {\n      return 1;\n    }\n  }" if (parenthesized_expression "((preferred < 2) && ((uVar1 & 2) != 0))" ( (binary_expression "(preferred < 2) && ((uVar1 & 2) != 0)" (parenthesized_expression "(preferred < 2)" ( (binary_expression "preferred < 2" identifier < number_literal) )) && (parenthesized_expression "((uVar1 & 2) != 0)" ( (binary_expression "(uVar1 & 2) != 0" (parenthesized_expression "(uVar1 & 2)" ( (binary_expression "uVar1 & 2" identifier & number_literal) )) != number_literal) ))) )) (compound_statement "{\n    iVar5 = png_colorspace_endpoints_match(xy,&colorspace->end_points_xy,100);\n    if (iVar5 == 0) {\n      colorspace->flags = uVar1 | 0x8000;\n      png_benign_error(png_ptr,"inconsistent chromaticities");\n      return 0;\n    }\n    if (preferred == 0) {\n      return 1;\n    }\n  }" { (expression_statement "iVar5 = png_colorspace_endpoints_match(xy,&colorspace->end_points_xy,100);" (assignment_expression "iVar5 = png_colorspace_endpoints_match(xy,&colorspace->end_points_xy,100)" identifier = (call_expression "png_colorspace_endpoints_match(xy,&colorspace->end_points_xy,100)" identifier (argument_list "(xy,&colorspace->end_points_xy,100)" ( identifier , (pointer_expression "&colorspace->end_points_xy" & (field_expression "colorspace->end_points_xy" identifier -> field_identifier)) , number_literal )))) ;) (if_statement "if (iVar5 == 0) {\n      colorspace->flags = uVar1 | 0x8000;\n      png_benign_error(png_ptr,"inconsistent chromaticities");\n      return 0;\n    }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      colorspace->flags = uVar1 | 0x8000;\n      png_benign_error(png_ptr,"inconsistent chromaticities");\n      return 0;\n    }" { (expression_statement "colorspace->flags = uVar1 | 0x8000;" (assignment_expression "colorspace->flags = uVar1 | 0x8000" (field_expression "colorspace->flags" identifier -> field_identifier) = (binary_expression "uVar1 | 0x8000" identifier | number_literal)) ;) (expression_statement "png_benign_error(png_ptr,"inconsistent chromaticities");" (call_expression "png_benign_error(png_ptr,"inconsistent chromaticities")" identifier (argument_list "(png_ptr,"inconsistent chromaticities")" ( identifier , (string_literal ""inconsistent chromaticities"" " string_content ") ))) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (preferred == 0) {\n      return 1;\n    }" if (parenthesized_expression "(preferred == 0)" ( (binary_expression "preferred == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) })) (expression_statement "pVar2 = xy->redy;" (assignment_expression "pVar2 = xy->redy" identifier = (field_expression "xy->redy" identifier -> field_identifier)) ;) (expression_statement "pVar3 = xy->greenx;" (assignment_expression "pVar3 = xy->greenx" identifier = (field_expression "xy->greenx" identifier -> field_identifier)) ;) (expression_statement "pVar4 = xy->greeny;" (assignment_expression "pVar4 = xy->greeny" identifier = (field_expression "xy->greeny" identifier -> field_identifier)) ;) (expression_statement "(colorspace->end_points_xy).redx = xy->redx;" (assignment_expression "(colorspace->end_points_xy).redx = xy->redx" (field_expression "(colorspace->end_points_xy).redx" (parenthesized_expression "(colorspace->end_points_xy)" ( (field_expression "colorspace->end_points_xy" identifier -> field_identifier) )) . field_identifier) = (field_expression "xy->redx" identifier -> field_identifier)) ;) (expression_statement "(colorspace->end_points_xy).redy = pVar2;" (assignment_expression "(colorspace->end_points_xy).redy = pVar2" (field_expression "(colorspace->end_points_xy).redy" (parenthesized_expression "(colorspace->end_points_xy)" ( (field_expression "colorspace->end_points_xy" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(colorspace->end_points_xy).greenx = pVar3;" (assignment_expression "(colorspace->end_points_xy).greenx = pVar3" (field_expression "(colorspace->end_points_xy).greenx" (parenthesized_expression "(colorspace->end_points_xy)" ( (field_expression "colorspace->end_points_xy" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(colorspace->end_points_xy).greeny = pVar4;" (assignment_expression "(colorspace->end_points_xy).greeny = pVar4" (field_expression "(colorspace->end_points_xy).greeny" (parenthesized_expression "(colorspace->end_points_xy)" ( (field_expression "colorspace->end_points_xy" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "pVar2 = xy->bluey;" (assignment_expression "pVar2 = xy->bluey" identifier = (field_expression "xy->bluey" identifier -> field_identifier)) ;) (expression_statement "pVar3 = xy->whitex;" (assignment_expression "pVar3 = xy->whitex" identifier = (field_expression "xy->whitex" identifier -> field_identifier)) ;) (expression_statement "pVar4 = xy->whitey;" (assignment_expression "pVar4 = xy->whitey" identifier = (field_expression "xy->whitey" identifier -> field_identifier)) ;) (expression_statement "(colorspace->end_points_xy).bluex = xy->bluex;" (assignment_expression "(colorspace->end_points_xy).bluex = xy->bluex" (field_expression "(colorspace->end_points_xy).bluex" (parenthesized_expression "(colorspace->end_points_xy)" ( (field_expression "colorspace->end_points_xy" identifier -> field_identifier) )) . field_identifier) = (field_expression "xy->bluex" identifier -> field_identifier)) ;) (expression_statement "(colorspace->end_points_xy).bluey = pVar2;" (assignment_expression "(colorspace->end_points_xy).bluey = pVar2" (field_expression "(colorspace->end_points_xy).bluey" (parenthesized_expression "(colorspace->end_points_xy)" ( (field_expression "colorspace->end_points_xy" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(colorspace->end_points_xy).whitex = pVar3;" (assignment_expression "(colorspace->end_points_xy).whitex = pVar3" (field_expression "(colorspace->end_points_xy).whitex" (parenthesized_expression "(colorspace->end_points_xy)" ( (field_expression "colorspace->end_points_xy" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(colorspace->end_points_xy).whitey = pVar4;" (assignment_expression "(colorspace->end_points_xy).whitey = pVar4" (field_expression "(colorspace->end_points_xy).whitey" (parenthesized_expression "(colorspace->end_points_xy)" ( (field_expression "colorspace->end_points_xy" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "pVar2 = XYZ->red_Y;" (assignment_expression "pVar2 = XYZ->red_Y" identifier = (field_expression "XYZ->red_Y" identifier -> field_identifier)) ;) (expression_statement "pVar3 = XYZ->red_Z;" (assignment_expression "pVar3 = XYZ->red_Z" identifier = (field_expression "XYZ->red_Z" identifier -> field_identifier)) ;) (expression_statement "pVar4 = XYZ->green_X;" (assignment_expression "pVar4 = XYZ->green_X" identifier = (field_expression "XYZ->green_X" identifier -> field_identifier)) ;) (expression_statement "(colorspace->end_points_XYZ).red_X = XYZ->red_X;" (assignment_expression "(colorspace->end_points_XYZ).red_X = XYZ->red_X" (field_expression "(colorspace->end_points_XYZ).red_X" (parenthesized_expression "(colorspace->end_points_XYZ)" ( (field_expression "colorspace->end_points_XYZ" identifier -> field_identifier) )) . field_identifier) = (field_expression "XYZ->red_X" identifier -> field_identifier)) ;) (expression_statement "(colorspace->end_points_XYZ).red_Y = pVar2;" (assignment_expression "(colorspace->end_points_XYZ).red_Y = pVar2" (field_expression "(colorspace->end_points_XYZ).red_Y" (parenthesized_expression "(colorspace->end_points_XYZ)" ( (field_expression "colorspace->end_points_XYZ" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(colorspace->end_points_XYZ).red_Z = pVar3;" (assignment_expression "(colorspace->end_points_XYZ).red_Z = pVar3" (field_expression "(colorspace->end_points_XYZ).red_Z" (parenthesized_expression "(colorspace->end_points_XYZ)" ( (field_expression "colorspace->end_points_XYZ" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(colorspace->end_points_XYZ).green_X = pVar4;" (assignment_expression "(colorspace->end_points_XYZ).green_X = pVar4" (field_expression "(colorspace->end_points_XYZ).green_X" (parenthesized_expression "(colorspace->end_points_XYZ)" ( (field_expression "colorspace->end_points_XYZ" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "pVar2 = XYZ->green_Z;" (assignment_expression "pVar2 = XYZ->green_Z" identifier = (field_expression "XYZ->green_Z" identifier -> field_identifier)) ;) (expression_statement "pVar3 = XYZ->blue_X;" (assignment_expression "pVar3 = XYZ->blue_X" identifier = (field_expression "XYZ->blue_X" identifier -> field_identifier)) ;) (expression_statement "pVar4 = XYZ->blue_Y;" (assignment_expression "pVar4 = XYZ->blue_Y" identifier = (field_expression "XYZ->blue_Y" identifier -> field_identifier)) ;) (expression_statement "(colorspace->end_points_XYZ).green_Y = XYZ->green_Y;" (assignment_expression "(colorspace->end_points_XYZ).green_Y = XYZ->green_Y" (field_expression "(colorspace->end_points_XYZ).green_Y" (parenthesized_expression "(colorspace->end_points_XYZ)" ( (field_expression "colorspace->end_points_XYZ" identifier -> field_identifier) )) . field_identifier) = (field_expression "XYZ->green_Y" identifier -> field_identifier)) ;) (expression_statement "(colorspace->end_points_XYZ).green_Z = pVar2;" (assignment_expression "(colorspace->end_points_XYZ).green_Z = pVar2" (field_expression "(colorspace->end_points_XYZ).green_Z" (parenthesized_expression "(colorspace->end_points_XYZ)" ( (field_expression "colorspace->end_points_XYZ" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(colorspace->end_points_XYZ).blue_X = pVar3;" (assignment_expression "(colorspace->end_points_XYZ).blue_X = pVar3" (field_expression "(colorspace->end_points_XYZ).blue_X" (parenthesized_expression "(colorspace->end_points_XYZ)" ( (field_expression "colorspace->end_points_XYZ" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(colorspace->end_points_XYZ).blue_Y = pVar4;" (assignment_expression "(colorspace->end_points_XYZ).blue_Y = pVar4" (field_expression "(colorspace->end_points_XYZ).blue_Y" (parenthesized_expression "(colorspace->end_points_XYZ)" ( (field_expression "colorspace->end_points_XYZ" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(colorspace->end_points_XYZ).blue_Z = XYZ->blue_Z;" (assignment_expression "(colorspace->end_points_XYZ).blue_Z = XYZ->blue_Z" (field_expression "(colorspace->end_points_XYZ).blue_Z" (parenthesized_expression "(colorspace->end_points_XYZ)" ( (field_expression "colorspace->end_points_XYZ" identifier -> field_identifier) )) . field_identifier) = (field_expression "XYZ->blue_Z" identifier -> field_identifier)) ;) (expression_statement "colorspace->flags = uVar1 | 2;" (assignment_expression "colorspace->flags = uVar1 | 2" (field_expression "colorspace->flags" identifier -> field_identifier) = (binary_expression "uVar1 | 2" identifier | number_literal)) ;) (expression_statement "iVar5 = png_colorspace_endpoints_match(xy,&sRGB_xy,1000);" (assignment_expression "iVar5 = png_colorspace_endpoints_match(xy,&sRGB_xy,1000)" identifier = (call_expression "png_colorspace_endpoints_match(xy,&sRGB_xy,1000)" identifier (argument_list "(xy,&sRGB_xy,1000)" ( identifier , (pointer_expression "&sRGB_xy" & identifier) , number_literal )))) ;) (if_statement "if (iVar5 == 0) {\n    colorspace->flags = uVar1 & 0xffbf | 2;\n  }\n  else {\n    colorspace->flags = uVar1 | 0x42;\n  }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    colorspace->flags = uVar1 & 0xffbf | 2;\n  }" { (expression_statement "colorspace->flags = uVar1 & 0xffbf | 2;" (assignment_expression "colorspace->flags = uVar1 & 0xffbf | 2" (field_expression "colorspace->flags" identifier -> field_identifier) = (binary_expression "uVar1 & 0xffbf | 2" (binary_expression "uVar1 & 0xffbf" identifier & number_literal) | number_literal)) ;) }) (else_clause "else {\n    colorspace->flags = uVar1 | 0x42;\n  }" else (compound_statement "{\n    colorspace->flags = uVar1 | 0x42;\n  }" { (expression_statement "colorspace->flags = uVar1 | 0x42;" (assignment_expression "colorspace->flags = uVar1 | 0x42" (field_expression "colorspace->flags" identifier -> field_identifier) = (binary_expression "uVar1 | 0x42" identifier | number_literal)) ;) }))) (return_statement "return 2;" return number_literal ;) })))
(translation_unit "undefined4\nFUN_00106b92(undefined8 param_1,long param_2,undefined8 *param_3,undefined8 *param_4,int param_5)\n\n{\n  ushort uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  \n  uVar1 = *(ushort *)(param_2 + 0x4a);\n  if ((short)uVar1 < 0) {\n    return 0;\n  }\n  if ((param_5 < 2) && ((uVar1 & 2) != 0)) {\n    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);\n    if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }\n    if (param_5 == 0) {\n      return 1;\n    }\n  }\n  uVar2 = param_3[1];\n  *(undefined8 *)(param_2 + 4) = *param_3;\n  *(undefined8 *)(param_2 + 0xc) = uVar2;\n  uVar2 = param_3[3];\n  *(undefined8 *)(param_2 + 0x14) = param_3[2];\n  *(undefined8 *)(param_2 + 0x1c) = uVar2;\n  uVar2 = param_4[1];\n  *(undefined8 *)(param_2 + 0x24) = *param_4;\n  *(undefined8 *)(param_2 + 0x2c) = uVar2;\n  uVar2 = param_4[3];\n  *(undefined8 *)(param_2 + 0x34) = param_4[2];\n  *(undefined8 *)(param_2 + 0x3c) = uVar2;\n  *(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4);\n  *(ushort *)(param_2 + 0x4a) = uVar1 | 2;\n  iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000);\n  if (iVar3 == 0) {\n    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;\n  }\n  else {\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }\n  return 2;\n}\n\n" (function_definition "undefined4\nFUN_00106b92(undefined8 param_1,long param_2,undefined8 *param_3,undefined8 *param_4,int param_5)\n\n{\n  ushort uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  \n  uVar1 = *(ushort *)(param_2 + 0x4a);\n  if ((short)uVar1 < 0) {\n    return 0;\n  }\n  if ((param_5 < 2) && ((uVar1 & 2) != 0)) {\n    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);\n    if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }\n    if (param_5 == 0) {\n      return 1;\n    }\n  }\n  uVar2 = param_3[1];\n  *(undefined8 *)(param_2 + 4) = *param_3;\n  *(undefined8 *)(param_2 + 0xc) = uVar2;\n  uVar2 = param_3[3];\n  *(undefined8 *)(param_2 + 0x14) = param_3[2];\n  *(undefined8 *)(param_2 + 0x1c) = uVar2;\n  uVar2 = param_4[1];\n  *(undefined8 *)(param_2 + 0x24) = *param_4;\n  *(undefined8 *)(param_2 + 0x2c) = uVar2;\n  uVar2 = param_4[3];\n  *(undefined8 *)(param_2 + 0x34) = param_4[2];\n  *(undefined8 *)(param_2 + 0x3c) = uVar2;\n  *(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4);\n  *(ushort *)(param_2 + 0x4a) = uVar1 | 2;\n  iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000);\n  if (iVar3 == 0) {\n    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;\n  }\n  else {\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }\n  return 2;\n}" type_identifier (function_declarator "FUN_00106b92(undefined8 param_1,long param_2,undefined8 *param_3,undefined8 *param_4,int param_5)" identifier (parameter_list "(undefined8 param_1,long param_2,undefined8 *param_3,undefined8 *param_4,int param_5)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined8 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  ushort uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  \n  uVar1 = *(ushort *)(param_2 + 0x4a);\n  if ((short)uVar1 < 0) {\n    return 0;\n  }\n  if ((param_5 < 2) && ((uVar1 & 2) != 0)) {\n    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);\n    if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }\n    if (param_5 == 0) {\n      return 1;\n    }\n  }\n  uVar2 = param_3[1];\n  *(undefined8 *)(param_2 + 4) = *param_3;\n  *(undefined8 *)(param_2 + 0xc) = uVar2;\n  uVar2 = param_3[3];\n  *(undefined8 *)(param_2 + 0x14) = param_3[2];\n  *(undefined8 *)(param_2 + 0x1c) = uVar2;\n  uVar2 = param_4[1];\n  *(undefined8 *)(param_2 + 0x24) = *param_4;\n  *(undefined8 *)(param_2 + 0x2c) = uVar2;\n  uVar2 = param_4[3];\n  *(undefined8 *)(param_2 + 0x34) = param_4[2];\n  *(undefined8 *)(param_2 + 0x3c) = uVar2;\n  *(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4);\n  *(ushort *)(param_2 + 0x4a) = uVar1 | 2;\n  iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000);\n  if (iVar3 == 0) {\n    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;\n  }\n  else {\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }\n  return 2;\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "uVar1 = *(ushort *)(param_2 + 0x4a);" (assignment_expression "uVar1 = *(ushort *)(param_2 + 0x4a)" identifier = (pointer_expression "*(ushort *)(param_2 + 0x4a)" * (cast_expression "(ushort *)(param_2 + 0x4a)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x4a)" ( (binary_expression "param_2 + 0x4a" identifier + number_literal) ))))) ;) (if_statement "if ((short)uVar1 < 0) {\n    return 0;\n  }" if (parenthesized_expression "((short)uVar1 < 0)" ( (binary_expression "(short)uVar1 < 0" (cast_expression "(short)uVar1" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) < number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((param_5 < 2) && ((uVar1 & 2) != 0)) {\n    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);\n    if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }\n    if (param_5 == 0) {\n      return 1;\n    }\n  }" if (parenthesized_expression "((param_5 < 2) && ((uVar1 & 2) != 0))" ( (binary_expression "(param_5 < 2) && ((uVar1 & 2) != 0)" (parenthesized_expression "(param_5 < 2)" ( (binary_expression "param_5 < 2" identifier < number_literal) )) && (parenthesized_expression "((uVar1 & 2) != 0)" ( (binary_expression "(uVar1 & 2) != 0" (parenthesized_expression "(uVar1 & 2)" ( (binary_expression "uVar1 & 2" identifier & number_literal) )) != number_literal) ))) )) (compound_statement "{\n    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);\n    if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }\n    if (param_5 == 0) {\n      return 1;\n    }\n  }" { (expression_statement "iVar3 = FUN_001069f5(param_3,param_2 + 4,100);" (assignment_expression "iVar3 = FUN_001069f5(param_3,param_2 + 4,100)" identifier = (call_expression "FUN_001069f5(param_3,param_2 + 4,100)" identifier (argument_list "(param_3,param_2 + 4,100)" ( identifier , (binary_expression "param_2 + 4" identifier + number_literal) , number_literal )))) ;) (if_statement "if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }" { (expression_statement "*(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;" (assignment_expression "*(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000" (pointer_expression "*(ushort *)(param_2 + 0x4a)" * (cast_expression "(ushort *)(param_2 + 0x4a)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x4a)" ( (binary_expression "param_2 + 0x4a" identifier + number_literal) )))) = (binary_expression "uVar1 | 0x8000" identifier | number_literal)) ;) (expression_statement "png_benign_error(param_1,"inconsistent chromaticities");" (call_expression "png_benign_error(param_1,"inconsistent chromaticities")" identifier (argument_list "(param_1,"inconsistent chromaticities")" ( identifier , (string_literal ""inconsistent chromaticities"" " string_content ") ))) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (param_5 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) })) (expression_statement "uVar2 = param_3[1];" (assignment_expression "uVar2 = param_3[1]" identifier = (subscript_expression "param_3[1]" identifier [ number_literal ])) ;) (expression_statement "*(undefined8 *)(param_2 + 4) = *param_3;" (assignment_expression "*(undefined8 *)(param_2 + 4) = *param_3" (pointer_expression "*(undefined8 *)(param_2 + 4)" * (cast_expression "(undefined8 *)(param_2 + 4)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) = (pointer_expression "*param_3" * identifier)) ;) (expression_statement "*(undefined8 *)(param_2 + 0xc) = uVar2;" (assignment_expression "*(undefined8 *)(param_2 + 0xc) = uVar2" (pointer_expression "*(undefined8 *)(param_2 + 0xc)" * (cast_expression "(undefined8 *)(param_2 + 0xc)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xc)" ( (binary_expression "param_2 + 0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar2 = param_3[3];" (assignment_expression "uVar2 = param_3[3]" identifier = (subscript_expression "param_3[3]" identifier [ number_literal ])) ;) (expression_statement "*(undefined8 *)(param_2 + 0x14) = param_3[2];" (assignment_expression "*(undefined8 *)(param_2 + 0x14) = param_3[2]" (pointer_expression "*(undefined8 *)(param_2 + 0x14)" * (cast_expression "(undefined8 *)(param_2 + 0x14)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x14)" ( (binary_expression "param_2 + 0x14" identifier + number_literal) )))) = (subscript_expression "param_3[2]" identifier [ number_literal ])) ;) (expression_statement "*(undefined8 *)(param_2 + 0x1c) = uVar2;" (assignment_expression "*(undefined8 *)(param_2 + 0x1c) = uVar2" (pointer_expression "*(undefined8 *)(param_2 + 0x1c)" * (cast_expression "(undefined8 *)(param_2 + 0x1c)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x1c)" ( (binary_expression "param_2 + 0x1c" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar2 = param_4[1];" (assignment_expression "uVar2 = param_4[1]" identifier = (subscript_expression "param_4[1]" identifier [ number_literal ])) ;) (expression_statement "*(undefined8 *)(param_2 + 0x24) = *param_4;" (assignment_expression "*(undefined8 *)(param_2 + 0x24) = *param_4" (pointer_expression "*(undefined8 *)(param_2 + 0x24)" * (cast_expression "(undefined8 *)(param_2 + 0x24)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) )))) = (pointer_expression "*param_4" * identifier)) ;) (expression_statement "*(undefined8 *)(param_2 + 0x2c) = uVar2;" (assignment_expression "*(undefined8 *)(param_2 + 0x2c) = uVar2" (pointer_expression "*(undefined8 *)(param_2 + 0x2c)" * (cast_expression "(undefined8 *)(param_2 + 0x2c)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x2c)" ( (binary_expression "param_2 + 0x2c" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar2 = param_4[3];" (assignment_expression "uVar2 = param_4[3]" identifier = (subscript_expression "param_4[3]" identifier [ number_literal ])) ;) (expression_statement "*(undefined8 *)(param_2 + 0x34) = param_4[2];" (assignment_expression "*(undefined8 *)(param_2 + 0x34) = param_4[2]" (pointer_expression "*(undefined8 *)(param_2 + 0x34)" * (cast_expression "(undefined8 *)(param_2 + 0x34)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x34)" ( (binary_expression "param_2 + 0x34" identifier + number_literal) )))) = (subscript_expression "param_4[2]" identifier [ number_literal ])) ;) (expression_statement "*(undefined8 *)(param_2 + 0x3c) = uVar2;" (assignment_expression "*(undefined8 *)(param_2 + 0x3c) = uVar2" (pointer_expression "*(undefined8 *)(param_2 + 0x3c)" * (cast_expression "(undefined8 *)(param_2 + 0x3c)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x3c)" ( (binary_expression "param_2 + 0x3c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4);" (assignment_expression "*(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4)" (pointer_expression "*(undefined4 *)(param_2 + 0x44)" * (cast_expression "(undefined4 *)(param_2 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x44)" ( (binary_expression "param_2 + 0x44" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(param_4 + 4)" * (cast_expression "(undefined4 *)(param_4 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 4)" ( (binary_expression "param_4 + 4" identifier + number_literal) ))))) ;) (expression_statement "*(ushort *)(param_2 + 0x4a) = uVar1 | 2;" (assignment_expression "*(ushort *)(param_2 + 0x4a) = uVar1 | 2" (pointer_expression "*(ushort *)(param_2 + 0x4a)" * (cast_expression "(ushort *)(param_2 + 0x4a)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x4a)" ( (binary_expression "param_2 + 0x4a" identifier + number_literal) )))) = (binary_expression "uVar1 | 2" identifier | number_literal)) ;) (expression_statement "iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000);" (assignment_expression "iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000)" identifier = (call_expression "FUN_001069f5(param_3,&DAT_00129480,1000)" identifier (argument_list "(param_3,&DAT_00129480,1000)" ( identifier , (pointer_expression "&DAT_00129480" & identifier) , number_literal )))) ;) (if_statement "if (iVar3 == 0) {\n    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;\n  }\n  else {\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;\n  }" { (expression_statement "*(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;" (assignment_expression "*(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2" (pointer_expression "*(ushort *)(param_2 + 0x4a)" * (cast_expression "(ushort *)(param_2 + 0x4a)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x4a)" ( (binary_expression "param_2 + 0x4a" identifier + number_literal) )))) = (binary_expression "uVar1 & 0xffbf | 2" (binary_expression "uVar1 & 0xffbf" identifier & number_literal) | number_literal)) ;) }) (else_clause "else {\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }" else (compound_statement "{\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }" { (expression_statement "*(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;" (assignment_expression "*(ushort *)(param_2 + 0x4a) = uVar1 | 0x42" (pointer_expression "*(ushort *)(param_2 + 0x4a)" * (cast_expression "(ushort *)(param_2 + 0x4a)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x4a)" ( (binary_expression "param_2 + 0x4a" identifier + number_literal) )))) = (binary_expression "uVar1 | 0x42" identifier | number_literal)) ;) }))) (return_statement "return 2;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier short)) ) IDENT) < LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT | LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") ))) ;) (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (binary_expression IDENT & LIT) | LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT | LIT)) ;) }))) (return_statement return LIT ;) })))
(function_definition "undefined4\nFUN_00106b92(undefined8 param_1,long param_2,undefined8 *param_3,undefined8 *param_4,int param_5)\n\n{\n  ushort uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  \n  uVar1 = *(ushort *)(param_2 + 0x4a);\n  if ((short)uVar1 < 0) {\n    return 0;\n  }\n  if ((param_5 < 2) && ((uVar1 & 2) != 0)) {\n    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);\n    if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }\n    if (param_5 == 0) {\n      return 1;\n    }\n  }\n  uVar2 = param_3[1];\n  *(undefined8 *)(param_2 + 4) = *param_3;\n  *(undefined8 *)(param_2 + 0xc) = uVar2;\n  uVar2 = param_3[3];\n  *(undefined8 *)(param_2 + 0x14) = param_3[2];\n  *(undefined8 *)(param_2 + 0x1c) = uVar2;\n  uVar2 = param_4[1];\n  *(undefined8 *)(param_2 + 0x24) = *param_4;\n  *(undefined8 *)(param_2 + 0x2c) = uVar2;\n  uVar2 = param_4[3];\n  *(undefined8 *)(param_2 + 0x34) = param_4[2];\n  *(undefined8 *)(param_2 + 0x3c) = uVar2;\n  *(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4);\n  *(ushort *)(param_2 + 0x4a) = uVar1 | 2;\n  iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000);\n  if (iVar3 == 0) {\n    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;\n  }\n  else {\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }\n  return 2;\n}" (type_identifier "undefined4") (function_declarator "FUN_00106b92(undefined8 param_1,long param_2,undefined8 *param_3,undefined8 *param_4,int param_5)" (identifier "FUN_00106b92") (parameter_list "(undefined8 param_1,long param_2,undefined8 *param_3,undefined8 *param_4,int param_5)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) (, ",") (parameter_declaration "undefined8 *param_3" (type_identifier "undefined8") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "undefined8 *param_4" (type_identifier "undefined8") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) () ")"))) (compound_statement "{\n  ushort uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  \n  uVar1 = *(ushort *)(param_2 + 0x4a);\n  if ((short)uVar1 < 0) {\n    return 0;\n  }\n  if ((param_5 < 2) && ((uVar1 & 2) != 0)) {\n    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);\n    if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }\n    if (param_5 == 0) {\n      return 1;\n    }\n  }\n  uVar2 = param_3[1];\n  *(undefined8 *)(param_2 + 4) = *param_3;\n  *(undefined8 *)(param_2 + 0xc) = uVar2;\n  uVar2 = param_3[3];\n  *(undefined8 *)(param_2 + 0x14) = param_3[2];\n  *(undefined8 *)(param_2 + 0x1c) = uVar2;\n  uVar2 = param_4[1];\n  *(undefined8 *)(param_2 + 0x24) = *param_4;\n  *(undefined8 *)(param_2 + 0x2c) = uVar2;\n  uVar2 = param_4[3];\n  *(undefined8 *)(param_2 + 0x34) = param_4[2];\n  *(undefined8 *)(param_2 + 0x3c) = uVar2;\n  *(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4);\n  *(ushort *)(param_2 + 0x4a) = uVar1 | 2;\n  iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000);\n  if (iVar3 == 0) {\n    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;\n  }\n  else {\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }\n  return 2;\n}" ({ "{") (declaration "ushort uVar1;" (type_identifier "ushort") (identifier "uVar1") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "uVar1 = *(ushort *)(param_2 + 0x4a);" (assignment_expression "uVar1 = *(ushort *)(param_2 + 0x4a)" (identifier "uVar1") (= "=") (pointer_expression "*(ushort *)(param_2 + 0x4a)" (* "*") (cast_expression "(ushort *)(param_2 + 0x4a)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x4a)" (( "(") (binary_expression "param_2 + 0x4a" (identifier "param_2") (+ "+") (number_literal "0x4a")) () ")"))))) (; ";")) (if_statement "if ((short)uVar1 < 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "((short)uVar1 < 0)" (( "(") (binary_expression "(short)uVar1 < 0" (cast_expression "(short)uVar1" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "uVar1")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if ((param_5 < 2) && ((uVar1 & 2) != 0)) {\n    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);\n    if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }\n    if (param_5 == 0) {\n      return 1;\n    }\n  }" (if "if") (parenthesized_expression "((param_5 < 2) && ((uVar1 & 2) != 0))" (( "(") (binary_expression "(param_5 < 2) && ((uVar1 & 2) != 0)" (parenthesized_expression "(param_5 < 2)" (( "(") (binary_expression "param_5 < 2" (identifier "param_5") (< "<") (number_literal "2")) () ")")) (&& "&&") (parenthesized_expression "((uVar1 & 2) != 0)" (( "(") (binary_expression "(uVar1 & 2) != 0" (parenthesized_expression "(uVar1 & 2)" (( "(") (binary_expression "uVar1 & 2" (identifier "uVar1") (& "&") (number_literal "2")) () ")")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);\n    if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }\n    if (param_5 == 0) {\n      return 1;\n    }\n  }" ({ "{") (expression_statement "iVar3 = FUN_001069f5(param_3,param_2 + 4,100);" (assignment_expression "iVar3 = FUN_001069f5(param_3,param_2 + 4,100)" (identifier "iVar3") (= "=") (call_expression "FUN_001069f5(param_3,param_2 + 4,100)" (identifier "FUN_001069f5") (argument_list "(param_3,param_2 + 4,100)" (( "(") (identifier "param_3") (, ",") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) (, ",") (number_literal "100") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;\n      png_benign_error(param_1,"inconsistent chromaticities");\n      return 0;\n    }" ({ "{") (expression_statement "*(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;" (assignment_expression "*(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000" (pointer_expression "*(ushort *)(param_2 + 0x4a)" (* "*") (cast_expression "(ushort *)(param_2 + 0x4a)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x4a)" (( "(") (binary_expression "param_2 + 0x4a" (identifier "param_2") (+ "+") (number_literal "0x4a")) () ")")))) (= "=") (binary_expression "uVar1 | 0x8000" (identifier "uVar1") (| "|") (number_literal "0x8000"))) (; ";")) (expression_statement "png_benign_error(param_1,"inconsistent chromaticities");" (call_expression "png_benign_error(param_1,"inconsistent chromaticities")" (identifier "png_benign_error") (argument_list "(param_1,"inconsistent chromaticities")" (( "(") (identifier "param_1") (, ",") (string_literal ""inconsistent chromaticities"" (" """) (string_content "inconsistent chromaticities") (" """)) () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (param_5 == 0) {\n      return 1;\n    }" (if "if") (parenthesized_expression "(param_5 == 0)" (( "(") (binary_expression "param_5 == 0" (identifier "param_5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 1;\n    }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}"))) (expression_statement "uVar2 = param_3[1];" (assignment_expression "uVar2 = param_3[1]" (identifier "uVar2") (= "=") (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "*(undefined8 *)(param_2 + 4) = *param_3;" (assignment_expression "*(undefined8 *)(param_2 + 4) = *param_3" (pointer_expression "*(undefined8 *)(param_2 + 4)" (* "*") (cast_expression "(undefined8 *)(param_2 + 4)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")")))) (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (expression_statement "*(undefined8 *)(param_2 + 0xc) = uVar2;" (assignment_expression "*(undefined8 *)(param_2 + 0xc) = uVar2" (pointer_expression "*(undefined8 *)(param_2 + 0xc)" (* "*") (cast_expression "(undefined8 *)(param_2 + 0xc)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xc)" (( "(") (binary_expression "param_2 + 0xc" (identifier "param_2") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "uVar2 = param_3[3];" (assignment_expression "uVar2 = param_3[3]" (identifier "uVar2") (= "=") (subscript_expression "param_3[3]" (identifier "param_3") ([ "[") (number_literal "3") (] "]"))) (; ";")) (expression_statement "*(undefined8 *)(param_2 + 0x14) = param_3[2];" (assignment_expression "*(undefined8 *)(param_2 + 0x14) = param_3[2]" (pointer_expression "*(undefined8 *)(param_2 + 0x14)" (* "*") (cast_expression "(undefined8 *)(param_2 + 0x14)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x14)" (( "(") (binary_expression "param_2 + 0x14" (identifier "param_2") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (subscript_expression "param_3[2]" (identifier "param_3") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "*(undefined8 *)(param_2 + 0x1c) = uVar2;" (assignment_expression "*(undefined8 *)(param_2 + 0x1c) = uVar2" (pointer_expression "*(undefined8 *)(param_2 + 0x1c)" (* "*") (cast_expression "(undefined8 *)(param_2 + 0x1c)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x1c)" (( "(") (binary_expression "param_2 + 0x1c" (identifier "param_2") (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "uVar2 = param_4[1];" (assignment_expression "uVar2 = param_4[1]" (identifier "uVar2") (= "=") (subscript_expression "param_4[1]" (identifier "param_4") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "*(undefined8 *)(param_2 + 0x24) = *param_4;" (assignment_expression "*(undefined8 *)(param_2 + 0x24) = *param_4" (pointer_expression "*(undefined8 *)(param_2 + 0x24)" (* "*") (cast_expression "(undefined8 *)(param_2 + 0x24)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x24)" (( "(") (binary_expression "param_2 + 0x24" (identifier "param_2") (+ "+") (number_literal "0x24")) () ")")))) (= "=") (pointer_expression "*param_4" (* "*") (identifier "param_4"))) (; ";")) (expression_statement "*(undefined8 *)(param_2 + 0x2c) = uVar2;" (assignment_expression "*(undefined8 *)(param_2 + 0x2c) = uVar2" (pointer_expression "*(undefined8 *)(param_2 + 0x2c)" (* "*") (cast_expression "(undefined8 *)(param_2 + 0x2c)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x2c)" (( "(") (binary_expression "param_2 + 0x2c" (identifier "param_2") (+ "+") (number_literal "0x2c")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "uVar2 = param_4[3];" (assignment_expression "uVar2 = param_4[3]" (identifier "uVar2") (= "=") (subscript_expression "param_4[3]" (identifier "param_4") ([ "[") (number_literal "3") (] "]"))) (; ";")) (expression_statement "*(undefined8 *)(param_2 + 0x34) = param_4[2];" (assignment_expression "*(undefined8 *)(param_2 + 0x34) = param_4[2]" (pointer_expression "*(undefined8 *)(param_2 + 0x34)" (* "*") (cast_expression "(undefined8 *)(param_2 + 0x34)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x34)" (( "(") (binary_expression "param_2 + 0x34" (identifier "param_2") (+ "+") (number_literal "0x34")) () ")")))) (= "=") (subscript_expression "param_4[2]" (identifier "param_4") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "*(undefined8 *)(param_2 + 0x3c) = uVar2;" (assignment_expression "*(undefined8 *)(param_2 + 0x3c) = uVar2" (pointer_expression "*(undefined8 *)(param_2 + 0x3c)" (* "*") (cast_expression "(undefined8 *)(param_2 + 0x3c)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x3c)" (( "(") (binary_expression "param_2 + 0x3c" (identifier "param_2") (+ "+") (number_literal "0x3c")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "*(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4);" (assignment_expression "*(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4)" (pointer_expression "*(undefined4 *)(param_2 + 0x44)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0x44)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x44)" (( "(") (binary_expression "param_2 + 0x44" (identifier "param_2") (+ "+") (number_literal "0x44")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(param_4 + 4)" (* "*") (cast_expression "(undefined4 *)(param_4 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 4)" (( "(") (binary_expression "param_4 + 4" (identifier "param_4") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "*(ushort *)(param_2 + 0x4a) = uVar1 | 2;" (assignment_expression "*(ushort *)(param_2 + 0x4a) = uVar1 | 2" (pointer_expression "*(ushort *)(param_2 + 0x4a)" (* "*") (cast_expression "(ushort *)(param_2 + 0x4a)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x4a)" (( "(") (binary_expression "param_2 + 0x4a" (identifier "param_2") (+ "+") (number_literal "0x4a")) () ")")))) (= "=") (binary_expression "uVar1 | 2" (identifier "uVar1") (| "|") (number_literal "2"))) (; ";")) (expression_statement "iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000);" (assignment_expression "iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000)" (identifier "iVar3") (= "=") (call_expression "FUN_001069f5(param_3,&DAT_00129480,1000)" (identifier "FUN_001069f5") (argument_list "(param_3,&DAT_00129480,1000)" (( "(") (identifier "param_3") (, ",") (pointer_expression "&DAT_00129480" (& "&") (identifier "DAT_00129480")) (, ",") (number_literal "1000") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;\n  }\n  else {\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;\n  }" ({ "{") (expression_statement "*(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;" (assignment_expression "*(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2" (pointer_expression "*(ushort *)(param_2 + 0x4a)" (* "*") (cast_expression "(ushort *)(param_2 + 0x4a)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x4a)" (( "(") (binary_expression "param_2 + 0x4a" (identifier "param_2") (+ "+") (number_literal "0x4a")) () ")")))) (= "=") (binary_expression "uVar1 & 0xffbf | 2" (binary_expression "uVar1 & 0xffbf" (identifier "uVar1") (& "&") (number_literal "0xffbf")) (| "|") (number_literal "2"))) (; ";")) (} "}")) (else_clause "else {\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }" (else "else") (compound_statement "{\n    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;\n  }" ({ "{") (expression_statement "*(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;" (assignment_expression "*(ushort *)(param_2 + 0x4a) = uVar1 | 0x42" (pointer_expression "*(ushort *)(param_2 + 0x4a)" (* "*") (cast_expression "(ushort *)(param_2 + 0x4a)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x4a)" (( "(") (binary_expression "param_2 + 0x4a" (identifier "param_2") (+ "+") (number_literal "0x4a")) () ")")))) (= "=") (binary_expression "uVar1 | 0x42" (identifier "uVar1") (| "|") (number_literal "0x42"))) (; ";")) (} "}")))) (return_statement "return 2;" (return "return") (number_literal "2") (; ";")) (} "}")))

int function_1
              (type_1 png_ptr,type_2 colorspace,type_3 *xy,type_4 *XYZ,
              int var_1)

{
  type_5 var_2;
  type_6 pVar2;
  type_6 pVar3;
  type_6 pVar4;
  int var_4;
  
  var_2 = colorspace->flags;
  if ((short)var_2 < 0) {
    return 0;
  }
  if ((var_1 < 2) && ((var_2 & 2) != 0)) {
    var_4 = var_3(xy,&colorspace->end_points_xy,100);
    if (var_4 == 0) {
      colorspace->flags = var_2 | 0x8000;
      var_5(png_ptr,"inconsistent chromaticities");
      return 0;
    }
    if (var_1 == 0) {
      return 1;
    }
  }
  pVar2 = xy->redy;
  pVar3 = xy->greenx;
  pVar4 = xy->greeny;
  (colorspace->end_points_xy).redx = xy->redx;
  (colorspace->end_points_xy).redy = pVar2;
  (colorspace->end_points_xy).greenx = pVar3;
  (colorspace->end_points_xy).greeny = pVar4;
  pVar2 = xy->bluey;
  pVar3 = xy->whitex;
  pVar4 = xy->whitey;
  (colorspace->end_points_xy).bluex = xy->bluex;
  (colorspace->end_points_xy).bluey = pVar2;
  (colorspace->end_points_xy).whitex = pVar3;
  (colorspace->end_points_xy).whitey = pVar4;
  pVar2 = XYZ->red_Y;
  pVar3 = XYZ->red_Z;
  pVar4 = XYZ->green_X;
  (colorspace->end_points_XYZ).red_X = XYZ->red_X;
  (colorspace->end_points_XYZ).red_Y = pVar2;
  (colorspace->end_points_XYZ).red_Z = pVar3;
  (colorspace->end_points_XYZ).green_X = pVar4;
  pVar2 = XYZ->green_Z;
  pVar3 = XYZ->blue_X;
  pVar4 = XYZ->blue_Y;
  (colorspace->end_points_XYZ).green_Y = XYZ->green_Y;
  (colorspace->end_points_XYZ).green_Z = pVar2;
  (colorspace->end_points_XYZ).blue_X = pVar3;
  (colorspace->end_points_XYZ).blue_Y = pVar4;
  (colorspace->end_points_XYZ).blue_Z = XYZ->blue_Z;
  colorspace->flags = var_2 | 2;
  var_4 = var_3(xy,&sRGB_xy,1000);
  if (var_4 == 0) {
    colorspace->flags = var_2 & 0xffbf | 2;
  }
  else {
    colorspace->flags = var_2 | 0x42;
  }
  return 2;
}


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

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

{
  ushort uVar1;
  undefined8 uVar2;
  int iVar3;
  
  uVar1 = *(ushort *)(param_2 + 0x4a);
  if ((short)uVar1 < 0) {
    return 0;
  }
  if ((param_5 < 2) && ((uVar1 & 2) != 0)) {
    iVar3 = FUN_001069f5(param_3,param_2 + 4,100);
    if (iVar3 == 0) {
      *(ushort *)(param_2 + 0x4a) = uVar1 | 0x8000;
      png_benign_error(param_1,"inconsistent chromaticities");
      return 0;
    }
    if (param_5 == 0) {
      return 1;
    }
  }
  uVar2 = param_3[1];
  *(undefined8 *)(param_2 + 4) = *param_3;
  *(undefined8 *)(param_2 + 0xc) = uVar2;
  uVar2 = param_3[3];
  *(undefined8 *)(param_2 + 0x14) = param_3[2];
  *(undefined8 *)(param_2 + 0x1c) = uVar2;
  uVar2 = param_4[1];
  *(undefined8 *)(param_2 + 0x24) = *param_4;
  *(undefined8 *)(param_2 + 0x2c) = uVar2;
  uVar2 = param_4[3];
  *(undefined8 *)(param_2 + 0x34) = param_4[2];
  *(undefined8 *)(param_2 + 0x3c) = uVar2;
  *(undefined4 *)(param_2 + 0x44) = *(undefined4 *)(param_4 + 4);
  *(ushort *)(param_2 + 0x4a) = uVar1 | 2;
  iVar3 = FUN_001069f5(param_3,&DAT_00129480,1000);
  if (iVar3 == 0) {
    *(ushort *)(param_2 + 0x4a) = uVar1 & 0xffbf | 2;
  }
  else {
    *(ushort *)(param_2 + 0x4a) = uVar1 | 0x42;
  }
  return 2;
}

