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

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

   info_ptr->x_white = (float)white_x;
   info_ptr->y_white = (float)white_y;
   info_ptr->x_red   = (float)red_x;
   info_ptr->y_red   = (float)red_y;
   info_ptr->x_green = (float)green_x;
   info_ptr->y_green = (float)green_y;
   info_ptr->x_blue  = (float)blue_x;
   info_ptr->y_blue  = (float)blue_y;
#ifdef PNG_FIXED_POINT_SUPPORTED
   info_ptr->int_x_white = (png_fixed_point)(white_x*100000.+0.5);
   info_ptr->int_y_white = (png_fixed_point)(white_y*100000.+0.5);
   info_ptr->int_x_red   = (png_fixed_point)(  red_x*100000.+0.5);
   info_ptr->int_y_red   = (png_fixed_point)(  red_y*100000.+0.5);
   info_ptr->int_x_green = (png_fixed_point)(green_x*100000.+0.5);
   info_ptr->int_y_green = (png_fixed_point)(green_y*100000.+0.5);
   info_ptr->int_x_blue  = (png_fixed_point)( blue_x*100000.+0.5);
   info_ptr->int_y_blue  = (png_fixed_point)( blue_y*100000.+0.5);
#endif
   info_ptr->valid |= PNG_INFO_cHRM;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movsd %xmm0, -0x18(%rsp)
movsd %xmm1, -0x20(%rsp)
movsd %xmm2, -0x28(%rsp)
movsd %xmm3, -0x30(%rsp)
movsd %xmm4, -0x38(%rsp)
movsd %xmm5, -0x40(%rsp)
movsd %xmm6, -0x48(%rsp)
movsd %xmm7, -0x50(%rsp)
cmpq $0x0, -0x8(%rsp)
je 0xfcc1a
cmpq $0x0, -0x10(%rsp)
jne 0xfcc1f
jmp 0xfce4d
movsd -0x18(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x10(%rsp), %rax
movss %xmm0, 0xa0(%rax)
movsd -0x20(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x10(%rsp), %rax
movss %xmm0, 0xa4(%rax)
movsd -0x28(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x10(%rsp), %rax
movss %xmm0, 0xa8(%rax)
movsd -0x30(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x10(%rsp), %rax
movss %xmm0, 0xac(%rax)
movsd -0x38(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x10(%rsp), %rax
movss %xmm0, 0xb0(%rax)
movsd -0x40(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x10(%rsp), %rax
movss %xmm0, 0xb4(%rax)
movsd -0x48(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x10(%rsp), %rax
movss %xmm0, 0xb8(%rax)
movsd -0x50(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x10(%rsp), %rax
movss %xmm0, 0xbc(%rax)
movsd -0x18(%rsp), %xmm0
movsd 0x3c09b(%rip), %xmm1    # 0x138d80
mulsd %xmm1, %xmm0
movsd 0x3631f(%rip), %xmm1    # 0x133010
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0x10(%rsp), %rax
movl %ecx, 0x14c(%rax)
movsd -0x20(%rsp), %xmm0
movsd 0x3c06e(%rip), %xmm1    # 0x138d80
mulsd %xmm1, %xmm0
movsd 0x362f2(%rip), %xmm1    # 0x133010
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0x10(%rsp), %rax
movl %ecx, 0x150(%rax)
movsd -0x28(%rsp), %xmm0
movsd 0x3c041(%rip), %xmm1    # 0x138d80
mulsd %xmm1, %xmm0
movsd 0x362c5(%rip), %xmm1    # 0x133010
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0x10(%rsp), %rax
movl %ecx, 0x154(%rax)
movsd -0x30(%rsp), %xmm0
movsd 0x3c014(%rip), %xmm1    # 0x138d80
mulsd %xmm1, %xmm0
movsd 0x36298(%rip), %xmm1    # 0x133010
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0x10(%rsp), %rax
movl %ecx, 0x158(%rax)
movsd -0x38(%rsp), %xmm0
movsd 0x3bfe7(%rip), %xmm1    # 0x138d80
mulsd %xmm1, %xmm0
movsd 0x3626b(%rip), %xmm1    # 0x133010
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0x10(%rsp), %rax
movl %ecx, 0x15c(%rax)
movsd -0x40(%rsp), %xmm0
movsd 0x3bfba(%rip), %xmm1    # 0x138d80
mulsd %xmm1, %xmm0
movsd 0x3623e(%rip), %xmm1    # 0x133010
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0x10(%rsp), %rax
movl %ecx, 0x160(%rax)
movsd -0x48(%rsp), %xmm0
movsd 0x3bf8d(%rip), %xmm1    # 0x138d80
mulsd %xmm1, %xmm0
movsd 0x36211(%rip), %xmm1    # 0x133010
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0x10(%rsp), %rax
movl %ecx, 0x164(%rax)
movsd -0x50(%rsp), %xmm0
movsd 0x3bf60(%rip), %xmm1    # 0x138d80
mulsd %xmm1, %xmm0
movsd 0x361e4(%rip), %xmm1    # 0x133010
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movq -0x10(%rsp), %rax
movl %ecx, 0x168(%rax)
movq -0x10(%rsp), %rax
movl 0x8(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x8(%rax)
retq
nop