// File: 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:
subq $0x38, %rsp
movl 0x58(%rsp), %eax
movl 0x50(%rsp), %eax
movl 0x48(%rsp), %eax
movl 0x40(%rsp), %eax
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movl %ecx, 0x20(%rsp)
movl %r8d, 0x1c(%rsp)
movl %r9d, 0x18(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0xfce90
cmpq $0x0, 0x28(%rsp)
jne 0xfce95
jmp 0xfd077
movq 0x30(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0x20(%rsp), %edx
movl 0x1c(%rsp), %ecx
movl 0x18(%rsp), %r8d
movl 0x40(%rsp), %r9d
movl 0x48(%rsp), %r11d
movl 0x50(%rsp), %r10d
movl 0x58(%rsp), %eax
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0xfc610
cmpl $0x0, %eax
je 0xfd077
movl 0x24(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x14c(%rax)
movl 0x20(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x150(%rax)
movl 0x1c(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x154(%rax)
movl 0x18(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x158(%rax)
movl 0x40(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x15c(%rax)
movl 0x48(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x160(%rax)
movl 0x50(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x164(%rax)
movl 0x58(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x168(%rax)
cvtsi2sdl 0x24(%rsp), %xmm0
movsd 0x3be21(%rip), %xmm1    # 0x138d80
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x28(%rsp), %rax
movss %xmm0, 0xa0(%rax)
cvtsi2sdl 0x20(%rsp), %xmm0
movsd 0x3bdfe(%rip), %xmm1    # 0x138d80
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x28(%rsp), %rax
movss %xmm0, 0xa4(%rax)
cvtsi2sdl 0x1c(%rsp), %xmm0
movsd 0x3bddb(%rip), %xmm1    # 0x138d80
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x28(%rsp), %rax
movss %xmm0, 0xa8(%rax)
cvtsi2sdl 0x18(%rsp), %xmm0
movsd 0x3bdb8(%rip), %xmm1    # 0x138d80
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x28(%rsp), %rax
movss %xmm0, 0xac(%rax)
cvtsi2sdl 0x40(%rsp), %xmm0
movsd 0x3bd95(%rip), %xmm1    # 0x138d80
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x28(%rsp), %rax
movss %xmm0, 0xb0(%rax)
cvtsi2sdl 0x48(%rsp), %xmm0
movsd 0x3bd72(%rip), %xmm1    # 0x138d80
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x28(%rsp), %rax
movss %xmm0, 0xb4(%rax)
cvtsi2sdl 0x50(%rsp), %xmm0
movsd 0x3bd4f(%rip), %xmm1    # 0x138d80
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x28(%rsp), %rax
movss %xmm0, 0xb8(%rax)
cvtsi2sdl 0x58(%rsp), %xmm0
movsd 0x3bd2c(%rip), %xmm1    # 0x138d80
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x28(%rsp), %rax
movss %xmm0, 0xbc(%rax)
movq 0x28(%rsp), %rax
movl 0x8(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x8(%rax)
addq $0x38, %rsp
retq
nopl (%rax)