// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngset.c
// Function: png_set_cHRM_fixed
void PNGAPI
png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
   png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x,
   png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y,
   png_fixed_point blue_x, png_fixed_point blue_y)
{
   png_debug1(1, "in %s storage function", "cHRM fixed");

   if (png_ptr == NULL || info_ptr == NULL)
      return;

#ifdef PNG_CHECK_cHRM_SUPPORTED
   if (png_check_cHRM_fixed(png_ptr,
      white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y))
#endif
   {
      info_ptr->int_x_white = white_x;
      info_ptr->int_y_white = white_y;
      info_ptr->int_x_red   = red_x;
      info_ptr->int_y_red   = red_y;
      info_ptr->int_x_green = green_x;
      info_ptr->int_y_green = green_y;
      info_ptr->int_x_blue  = blue_x;
      info_ptr->int_y_blue  = blue_y;
#ifdef  PNG_FLOATING_POINT_SUPPORTED
      info_ptr->x_white = (float)(white_x/100000.);
      info_ptr->y_white = (float)(white_y/100000.);
      info_ptr->x_red   = (float)(  red_x/100000.);
      info_ptr->y_red   = (float)(  red_y/100000.);
      info_ptr->x_green = (float)(green_x/100000.);
      info_ptr->y_green = (float)(green_y/100000.);
      info_ptr->x_blue  = (float)( blue_x/100000.);
      info_ptr->y_blue  = (float)( blue_y/100000.);
#endif
      info_ptr->valid |= PNG_INFO_cHRM;
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x87bb5
movl %r9d, %ebp
movl %r8d, %r14d
movl %edx, %r12d
movq %rsi, %rbx
movl 0x58(%rsp), %eax
movl 0x50(%rsp), %r10d
movl 0x48(%rsp), %r11d
movl 0x40(%rsp), %r13d
subq $0x8, %rsp
movl %edx, %esi
movl %r15d, %edx
movl %r8d, %ecx
movl %r9d, %r8d
movl %r13d, %r9d
pushq %rax
pushq %r10
pushq %r11
callq 0x87560
addq $0x20, %rsp
testl %eax, %eax
je 0x87bb5
movd %r15d, %xmm0
movd %r12d, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movd %ebp, %xmm0
movd %r14d, %xmm2
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
cvtdq2pd %xmm2, %xmm2
cvtdq2pd %xmm1, %xmm1
movapd 0x2498b(%rip), %xmm0    # 0xac4a0
divpd %xmm0, %xmm1
divpd %xmm0, %xmm2
cvtpd2ps %xmm2, %xmm2
cvtpd2ps %xmm1, %xmm1
unpcklpd %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
movl 0x48(%rsp), %eax
movq %rax, %rdx
movd %edx, %xmm2
movd %r13d, %xmm3
punpckldq %xmm2, %xmm3    # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
movl 0x58(%rsp), %eax
movd %eax, %xmm2
movl 0x50(%rsp), %ecx
movd %ecx, %xmm4
punpckldq %xmm2, %xmm4    # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
movl %r12d, 0x14c(%rbx)
movl %r15d, 0x150(%rbx)
movl %r14d, 0x154(%rbx)
movl %ebp, 0x158(%rbx)
movl %r13d, 0x15c(%rbx)
movl %edx, 0x160(%rbx)
movl %ecx, 0x164(%rbx)
movl %eax, 0x168(%rbx)
cvtdq2pd %xmm4, %xmm2
cvtdq2pd %xmm3, %xmm3
movupd %xmm1, 0xa0(%rbx)
divpd %xmm0, %xmm2
cvtpd2ps %xmm2, %xmm1
divpd %xmm0, %xmm3
cvtpd2ps %xmm3, %xmm0
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movupd %xmm0, 0xb0(%rbx)
orb $0x4, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq