LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::PixelRGB(int, int) const
const RNRgb R2Image::
PixelRGB(int x, int y) const
{
  // Return pixel RGB at (x,y)
  RNScalar r, g, b;
  const unsigned char *pixel = Pixel(x, y);
  switch (ncomponents) {
  case 1: 
  case 2:
    r = *(pixel++) / 255.0;
    g = b = r;
    break;

  case 3:
  case 4:
    r = *(pixel++) / 255.0;
    g = *(pixel++) / 255.0;
    b = *(pixel++) / 255.0;
    break;

  default:
    r = b = g = 0;
    break;
  }
  return RNRgb(r, g, b);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rsi), %rax
imull 0xc(%rsi), %ecx
movl 0x8(%rsi), %esi
imull %esi, %edx
addl %ecx, %edx
movslq %edx, %rcx
leal -0x3(%rsi), %edx
cmpl $0x2, %edx
jb 0x603ae
decl %esi
cmpl $0x1, %esi
ja 0x603e1
movzbl (%rax,%rcx), %eax
cvtsi2sd %eax, %xmm0
divsd 0x32e74(%rip), %xmm0    # 0x93218
movapd %xmm0, %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
jmp 0x603e9
movzbl (%rax,%rcx), %edx
cvtsi2sd %edx, %xmm0
divsd 0x32e5a(%rip), %xmm0    # 0x93218
movzwl 0x1(%rax,%rcx), %eax
movd %eax, %xmm1
pxor %xmm2, %xmm2
punpcklbw %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3],xmm1[4],xmm2[4],xmm1[5],xmm2[5],xmm1[6],xmm2[6],xmm1[7],xmm2[7]
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
cvtdq2pd %xmm1, %xmm1
divpd 0x3a6c1(%rip), %xmm1    # 0x9aaa0
jmp 0x603e9
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
movq %rbx, %rdi
callq 0x66182
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::operator=(gaps::R2Image const&)
R2Image& R2Image::
operator=(const R2Image& image)
{
  // Assign values
  this->width = image.width;
  this->height = image.height;
  this->ncomponents = image.ncomponents;
  this->rowsize = image.rowsize;
  
  // Delete previous pixels
  if (this->pixels) delete [] pixels;
  this->pixels = NULL;

  // Copy pixels
  int nbytes = this->rowsize * this->height;
  if (nbytes > 0) {
    this->pixels = new unsigned char [nbytes];
    assert(this->pixels);
    unsigned char *p =this-> pixels;
    unsigned char *data = image.pixels;
    while (--nbytes) *(p++) = *(data++);
  }

  // Return this
  return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movups (%rsi), %xmm0
movl 0x4(%rsi), %r15d
movl 0xc(%rsi), %eax
movups %xmm0, (%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x6042b
callq 0xe5d0
movl 0x4(%rbx), %r15d
movl 0xc(%rbx), %eax
imull %eax, %r15d
andq $0x0, 0x10(%rbx)
testl %r15d, %r15d
jle 0x60460
movl %r15d, %edi
callq 0xe030
movq %rax, 0x10(%rbx)
movq 0x10(%r14), %rcx
decl %r15d
xorl %edx, %edx
cmpl %edx, %r15d
je 0x60460
movb (%rcx,%rdx), %sil
movb %sil, (%rax,%rdx)
incq %rdx
jmp 0x6044e
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::Add(gaps::R2Image const&)
void R2Image::
Add(const R2Image& image)
{
  int nbytes = rowsize * height;
  unsigned char *p1 = pixels;
  unsigned char *p2 = image.pixels;
  while (--nbytes) {
    int value = *p1;
    value += *(p2++);
    if (value > 255) value = 255;
    *(p1++) = value;
  }
}

// Assembly:
movl 0x4(%rdi), %edx
imull 0xc(%rdi), %edx
movq 0x10(%rdi), %rax
movq 0x10(%rsi), %rcx
movslq %edx, %rdx
decq %rdx
xorl %esi, %esi
movl $0xff, %edi
cmpl %esi, %edx
je 0x60651
movzbl (%rax,%rsi), %r8d
movzbl (%rcx,%rsi), %r9d
addl %r8d, %r9d
cmpl %edi, %r9d
cmovael %edi, %r9d
movb %r9b, (%rax,%rsi)
incq %rsi
jmp 0x60630
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::Subtract(gaps::R2Image const&)
void R2Image::
Subtract(const R2Image& image)
{
  int nbytes = rowsize * height;
  unsigned char *p1 = pixels;
  unsigned char *p2 = image.pixels;
  while (--nbytes) {
    int value = *p1 - *p2 + 128;
    if (value < 0) value = 0;
    if (value > 255) value = 255;
    *p1 = value;
    p1++;
    p2++;
  }
}

// Assembly:
movl 0x4(%rdi), %edx
imull 0xc(%rdi), %edx
movq 0x10(%rdi), %rax
movq 0x10(%rsi), %rcx
movslq %edx, %rdx
decq %rdx
xorl %esi, %esi
pushq $-0x80
popq %rdi
pushq $0x7f
popq %r8
cmpl %esi, %edx
je 0x6069e
movzbl (%rax,%rsi), %r9d
movzbl (%rcx,%rsi), %r10d
subl %r10d, %r9d
cmpl $-0x7f, %r9d
cmovll %edi, %r9d
cmpl $0x7f, %r9d
cmovgel %r8d, %r9d
addb $-0x80, %r9b
movb %r9b, (%rax,%rsi)
incq %rsi
jmp 0x60670
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::Capture()
void R2Image::
Capture(void)
{
  // Check image size
  GLint viewport[4];
  glGetIntegerv(GL_VIEWPORT, viewport);
  assert(width >= viewport[2]);
  assert(height >= viewport[3]);
  assert(pixels);

  // Set packing parameters for glReadPixels
  if ((ncomponents != 4) && ((width % 4) != 0)) glPixelStorei(GL_PACK_ALIGNMENT, 1);

  // Read pixels from frame buffer 
  switch (ncomponents) {
  case 1: glReadPixels(0, 0, width, height, GL_LUMINANCE, GL_UNSIGNED_BYTE, pixels); break;
  case 2: glReadPixels(0, 0, width, height, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, pixels); break;
  case 3: glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, pixels); break;
  case 4: glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); break;
  }

  // Reset packing parameters for glReadPixels
  if ((ncomponents != 4) && ((width % 4) != 0)) glPixelStorei(GL_PACK_ALIGNMENT, 4);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rsi
movl $0xba2, %edi            # imm = 0xBA2
callq 0xe410
movl (%rbx), %edx
movl 0x8(%rbx), %eax
cmpl $0x4, %eax
jne 0x60b0f
movl 0x4(%rbx), %ecx
movq 0x10(%rbx), %rax
movq %rax, (%rsp)
xorl %edi, %edi
xorl %esi, %esi
movl $0x1908, %r8d           # imm = 0x1908
movl $0x1401, %r9d           # imm = 0x1401
callq 0xe210
cmpl $0x4, 0x8(%rbx)
je 0x60b09
testb $0x3, (%rbx)
je 0x60b09
pushq $0x4
popq %rsi
movl $0xd05, %edi            # imm = 0xD05
callq 0xe240
addq $0x20, %rsp
popq %rbx
retq
testb $0x3, %dl
je 0x60b24
pushq $0x1
popq %rsi
movl $0xd05, %edi            # imm = 0xD05
callq 0xe240
movl 0x8(%rbx), %eax
decl %eax
cmpl $0x3, %eax
ja 0x60af7
leaq 0x39f1a(%rip), %rcx     # 0x9aa4c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movq 0x10(%rbx), %rax
movq %rax, (%rsp)
xorl %edi, %edi
xorl %esi, %esi
movl $0x1909, %r8d           # imm = 0x1909
jmp 0x60ae6
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movq 0x10(%rbx), %rax
movq %rax, (%rsp)
xorl %edi, %edi
xorl %esi, %esi
movl $0x1907, %r8d           # imm = 0x1907
jmp 0x60ae6
movl (%rbx), %edx
jmp 0x60ad1
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movq 0x10(%rbx), %rax
movq %rax, (%rsp)
xorl %edi, %edi
xorl %esi, %esi
movl $0x190a, %r8d           # imm = 0x190A
jmp 0x60ae6
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::Draw(int, int) const
void R2Image::
Draw(int x, int y) const
{
  // Set projection matrix
  glMatrixMode(GL_PROJECTION);  
  glPushMatrix();
  glLoadIdentity();
  gluOrtho2D(0, width, 0, height);

  // Set model view matrix
  glMatrixMode(GL_MODELVIEW);
  glPushMatrix();
  glLoadIdentity();

  // Set position for image
  glRasterPos2i(x, y);

  // Draw pixels
  switch (ncomponents) {
  case 1: glDrawPixels(width, height, GL_LUMINANCE, GL_UNSIGNED_BYTE, pixels); break;
  case 2: glDrawPixels(width, height, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, pixels); break;
  case 3: glDrawPixels(width, height, GL_RGB, GL_UNSIGNED_BYTE, pixels); break;
  case 4: glDrawPixels(width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); break;
  default: RNFail("Unrecognized number of components in image: %d\n", ncomponents); break;
  }

  // Reset projection matrix
  glMatrixMode(GL_PROJECTION);
  glPopMatrix();

  // Reset model view matrix
  glMatrixMode(GL_MODELVIEW);
  glPopMatrix();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movl $0x1701, %edi           # imm = 0x1701
callq 0xe640
callq 0xe770
callq 0xe5e0
cvtsi2sdl (%rbx), %xmm1
cvtsi2sdl 0x4(%rbx), %xmm3
xorps %xmm0, %xmm0
xorps %xmm2, %xmm2
callq 0xe2c0
movl $0x1700, %edi           # imm = 0x1700
callq 0xe640
callq 0xe770
callq 0xe5e0
movl %r14d, %edi
movl %ebp, %esi
callq 0xe180
movl 0x8(%rbx), %esi
leal -0x1(%rsi), %eax
cmpl $0x3, %eax
ja 0x60c6b
leaq 0x39e64(%rip), %rcx     # 0x9aa5c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl (%rbx), %edi
movl 0x4(%rbx), %esi
movq 0x10(%rbx), %r8
movl $0x1909, %edx           # imm = 0x1909
jmp 0x60c3f
movl (%rbx), %edi
movl 0x4(%rbx), %esi
movq 0x10(%rbx), %r8
movl $0x1907, %edx           # imm = 0x1907
jmp 0x60c3f
movl (%rbx), %edi
movl 0x4(%rbx), %esi
movq 0x10(%rbx), %r8
movl $0x1908, %edx           # imm = 0x1908
jmp 0x60c3f
movl (%rbx), %edi
movl 0x4(%rbx), %esi
movq 0x10(%rbx), %r8
movl $0x190a, %edx           # imm = 0x190A
movl $0x1401, %ecx           # imm = 0x1401
callq 0xe360
movl $0x1701, %edi           # imm = 0x1701
callq 0xe640
callq 0xe880
movl $0x1700, %edi           # imm = 0x1700
callq 0xe640
popq %rbx
popq %r14
popq %rbp
jmp 0xe880
leaq 0x39e76(%rip), %rdi     # 0x9aae8
xorl %eax, %eax
callq 0x681ca
jmp 0x60c49
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::ReadJPEGFile(char const*)
int R2Image::
ReadJPEGFile(const char *filename)
{
  // Open file
  FILE *fp = fopen(filename, "rb");
  if (!fp) {
    RNFail("Unable to open JPEG file %s\n", filename);
    return 0;
   }

  // Read file
  if (!ReadJPEGStream(fp)) {
    fclose(fp);
    return 0;
  }

  // Close the file 
  fclose(fp);

  // Return success 
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x328cb(%rip), %rsi     # 0x9355b
movq %rbx, %rdi
callq 0xe550
testq %rax, %rax
je 0x60cb8
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x626e2
movq %r15, %rdi
callq 0xe440
pushq $0x1
popq %rbp
jmp 0x60ccb
leaq 0x3a06c(%rip), %rdi     # 0x9ad2b
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0x681ca
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::WriteJPEGFile(char const*) const
int R2Image::
WriteJPEGFile(const char *filename) const
{
  // Open the file 
  FILE *fp = fopen(filename, "wb");
  if (fp == NULL) {
    RNFail("Unable to open JPEG file %s\n", filename);
    return 0;
  }
  
  // Write the file
  if (!WriteJPEGStream(fp)) {
    fclose(fp);
    return 0;
  }

  // Close the file 
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x316fb(%rip), %rsi     # 0x93a31
movq %rbx, %rdi
callq 0xe550
testq %rax, %rax
je 0x6235e
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x627f0
movq %r15, %rdi
callq 0xe440
pushq $0x1
popq %rbp
jmp 0x62371
leaq 0x389c6(%rip), %rdi     # 0x9ad2b
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0x681ca
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::DWordWriteLE(unsigned int, _IO_FILE*)
static void DWordWriteLE(unsigned int x, FILE *fp)
{
  unsigned char b1 = (x & 0x000000FF); putc(b1, fp);
  unsigned char b2 = ((x >> 8) & 0x000000FF); putc(b2, fp);
  unsigned char b3 = ((x >> 16) & 0x000000FF); putc(b3, fp);
  unsigned char b4 = ((x >> 24) & 0x000000FF); putc(b4, fp);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
movl $0xff, %r14d
andl %r14d, %edi
callq 0xe8c0
movl %ebp, %edi
shrl $0x8, %edi
andl %r14d, %edi
movq %rbx, %rsi
callq 0xe8c0
movl %ebp, %edi
shrl $0x10, %edi
andl %r14d, %edi
movq %rbx, %rsi
callq 0xe8c0
shrl $0x18, %ebp
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xe8c0
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::LongWriteLE(int, _IO_FILE*)
static void LongWriteLE(int x, FILE *fp)
{
  char b1 = (x & 0x000000FF); putc(b1, fp);
  char b2 = ((x >> 8) & 0x000000FF); putc(b2, fp);
  char b3 = ((x >> 16) & 0x000000FF); putc(b3, fp);
  char b4 = ((x >> 24) & 0x000000FF); putc(b4, fp);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movsbl %bpl, %edi
callq 0xe8c0
movl %ebp, %eax
shrl $0x8, %eax
movsbl %al, %edi
movq %rbx, %rsi
callq 0xe8c0
movl %ebp, %eax
shrl $0x10, %eax
movsbl %al, %edi
movq %rbx, %rsi
callq 0xe8c0
sarl $0x18, %ebp
movl %ebp, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xe8c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::ReadJPEGStream(_IO_FILE*)
int R2Image::
ReadJPEGStream(FILE *fp)
{
#ifdef RN_USE_JPEG
  // Initialize decompression info
  struct jpeg_decompress_struct cinfo;
  struct jpeg_error_mgr jerr;
  cinfo.err = jpeg_std_error(&jerr);
  jpeg_create_decompress(&cinfo);
  jpeg_stdio_src(&cinfo, fp);
  jpeg_read_header(&cinfo, TRUE);
  jpeg_start_decompress(&cinfo);

  // Remember image attributes
  width = cinfo.output_width;
  height = cinfo.output_height;
  ncomponents = cinfo.output_components;
  rowsize = ncomponents * width;
  if ((rowsize % 4) != 0) rowsize = (rowsize / 4 + 1) * 4;

  // Allocate image pixels
  int nbytes = rowsize * height;
  this->pixels = new unsigned char [nbytes];
  if (!this->pixels) {
    RNFail("Unable to allocate memory for JPEG file");
    fclose(fp);
    return 0;
  }

  // Read scan lines 
  // First jpeg pixel is top-left, so read pixels in opposite scan-line order
  while (cinfo.output_scanline < cinfo.output_height) {
    int scanline = cinfo.output_height - cinfo.output_scanline - 1;
    unsigned char *row_pointer = &pixels[scanline * rowsize];
    jpeg_read_scanlines(&cinfo, &row_pointer, 1);
  }

  // Free everything
  jpeg_finish_decompress(&cinfo);
  jpeg_destroy_decompress(&cinfo);

  // Return success
  return 1;
#else
  RNFail("JPEG not supported");
  return 0;
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x330, %rsp            # imm = 0x330
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x288(%rsp), %rdi
callq 0x791d8
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
pushq $0x3e
popq %rsi
movl $0x278, %edx            # imm = 0x278
movq %r15, %rdi
callq 0x6ea6c
movq %r15, %rdi
movq %r14, %rsi
callq 0x6f2bc
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x6eb5b
movq %r15, %rdi
callq 0x6eedc
movl 0x88(%r15), %ecx
movl %ecx, (%rbx)
movl 0x8c(%r15), %r12d
movl %r12d, 0x4(%rbx)
movl 0x94(%r15), %eax
movl %eax, 0x8(%rbx)
imull %ecx, %eax
testb $0x3, %al
je 0x6276c
pushq $0x4
popq %rcx
cltd
idivl %ecx
leal 0x4(,%rax,4), %eax
movl %eax, 0xc(%rbx)
imull %r12d, %eax
movslq %eax, %rdi
callq 0xe030
movq %rax, 0x10(%rbx)
leaq 0x10(%rsp), %r14
leaq 0x8(%rsp), %r15
pushq $0x1
popq %rbp
movl 0xb8(%rsp), %eax
cmpl %r12d, %eax
jae 0x627c8
notl %eax
addl %eax, %r12d
movslq 0xc(%rbx), %rax
movslq %r12d, %rcx
imulq %rax, %rcx
addq 0x10(%rbx), %rcx
movq %rcx, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x6f084
movl 0x9c(%rsp), %r12d
jmp 0x6278c
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x6ee3c
movq %rbx, %rdi
callq 0x6eb51
pushq $0x1
popq %rax
addq $0x330, %rsp            # imm = 0x330
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::WriteJPEGStream(_IO_FILE*) const
int R2Image::
WriteJPEGStream(FILE *fp) const
{
#ifdef RN_USE_JPEG
  // Initialize compression info
  struct jpeg_compress_struct cinfo;
  struct jpeg_error_mgr jerr;
  cinfo.err = jpeg_std_error(&jerr);
  jpeg_create_compress(&cinfo);
  jpeg_stdio_dest(&cinfo, fp);
  cinfo.image_width = width; 	/* image width and height, in pixels */
  cinfo.image_height = height;
  cinfo.input_components = ncomponents;		/* # of color components per pixel */
  if (ncomponents == 1) cinfo.in_color_space = JCS_GRAYSCALE;
  else if (ncomponents == 3) cinfo.in_color_space = JCS_RGB;
  else if (ncomponents == 4) cinfo.in_color_space = JCS_CMYK;
  else cinfo.in_color_space = JCS_UNKNOWN;
  cinfo.dct_method = JDCT_ISLOW;
  jpeg_set_defaults(&cinfo);
  cinfo.optimize_coding = TRUE;
  jpeg_set_quality(&cinfo, 75, TRUE);
  jpeg_start_compress(&cinfo, TRUE);
	
  // Output scan lines
  // First jpeg pixel is top-left, so write in opposite scan-line order
  while (cinfo.next_scanline < cinfo.image_height) {
    int scanline = cinfo.image_height - cinfo.next_scanline - 1;
    unsigned char *row_pointer = &pixels[scanline * rowsize];
    jpeg_write_scanlines(&cinfo, &row_pointer, 1);
  }

  // Free everything
  jpeg_finish_compress(&cinfo);
  jpeg_destroy_compress(&cinfo);

  // Return number of bytes written
  return 1;
#else
  RNFail("JPEG not supported");
  return 0;
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x210(%rsp), %rdi
callq 0x791d8
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
pushq $0x3e
popq %rsi
movl $0x208, %edx            # imm = 0x208
movq %r15, %rdi
callq 0x68340
movq %r15, %rdi
movq %r14, %rsi
callq 0x690cc
movq (%rbx), %rax
movq %rax, 0x30(%r15)
movl 0x8(%rbx), %eax
movl %eax, 0x38(%r15)
decl %eax
xorl %ecx, %ecx
cmpl $0x3, %eax
ja 0x62856
movl %eax, %eax
leaq 0x3825d(%rip), %rcx     # 0x9aab0
movl (%rcx,%rax,4), %ecx
leaq 0x8(%rsp), %r14
movl %ecx, 0x3c(%r14)
andl $0x0, 0x114(%r14)
movq %r14, %rdi
callq 0x68a0b
movl $0x1, 0x108(%r14)
pushq $0x4b
popq %rsi
pushq $0x1
popq %rbp
movq %r14, %rdi
movl %ebp, %edx
callq 0x689e8
movq %r14, %rdi
movl %ebp, %esi
callq 0x686b4
movq %rsp, %r15
movl 0x3c(%rsp), %eax
movl 0x138(%rsp), %ecx
cmpl %eax, %ecx
jae 0x628cb
notl %ecx
addl %ecx, %eax
movslq 0xc(%rbx), %rcx
cltq
imulq %rcx, %rax
addq 0x10(%rbx), %rax
movq %rax, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x6872c
jmp 0x62897
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x6848e
movq %rbx, %rdi
callq 0x68432
pushq $0x1
popq %rax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::ReadJPEGBuffer(char const*, unsigned long)
int R2Image::
ReadJPEGBuffer(const char *buffer, size_t buffer_length)
{
  // Open stream
  FILE *fp = fmemopen((void *) buffer, buffer_length, "r");
  if (!fp) {
    RNFail("Unable to open JPEG stream\n");
    return 0;
   }

  // Read file
  if (!ReadJPEGStream(fp)) {
    fclose(fp);
    return 0;
  }

  // Close the file 
  fclose(fp);

  // Return success 
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3a1f3(%rip), %rax     # 0x9caf3
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0xe8d0
testq %rax, %rax
je 0x6292e
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x626e2
movq %r14, %rdi
callq 0xe440
pushq $0x1
popq %rbx
jmp 0x6293e
leaq 0x38413(%rip), %rdi     # 0x9ad48
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x681ca
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::WriteJPEGBuffer(char**, unsigned long*) const
int R2Image::
WriteJPEGBuffer(char **buffer, size_t *buffer_length) const
{
  // Open the file 
  FILE *fp = open_memstream(buffer, buffer_length);
  if (fp == NULL) {
    RNFail("Unable to open JPEG stream\n");
    return 0;
  }
  
  // Write the file
  if (!WriteJPEGStream(fp)) {
    fclose(fp);
    return 0;
  }

  // Close the file 
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0xe4b0
testq %rax, %rax
je 0x6297a
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x627f0
movq %r14, %rdi
callq 0xe440
pushq $0x1
popq %rbx
jmp 0x6298a
leaq 0x383c7(%rip), %rdi     # 0x9ad48
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x681ca
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::ReadPNGBuffer(char const*, unsigned long)
int R2Image::
ReadPNGBuffer(const char *buffer, size_t buffer_length)
{
  // Open stream
  FILE *fp = fmemopen((void *) buffer, buffer_length, "r");
  if (!fp) {
    RNFail("Unable to open PNG stream\n");
    return 0;
   }

  // Read file
  if (!ReadPNGStream(fp)) {
    fclose(fp);
    return 0;
  }

  // Close the file 
  fclose(fp);

  // Return success 
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x39e1d(%rip), %rax     # 0x9caf3
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0xe8d0
testq %rax, %rax
je 0x62d05
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x62994
movl %eax, %ebx
movq %r14, %rdi
callq 0xe440
movl %ebx, %eax
jmp 0x62d15
leaq 0x37a2f(%rip), %rdi     # 0x9a73b
xorl %eax, %eax
callq 0x681ca
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Draw.cpp
// Function: gaps::R3Matrix::Load() const
void R3Matrix::
Load(void) const
{
    // Load matrix onto stack replacing top of stack
#if (RN_3D_GRFX == RN_OPENGL) 
    double t[4][4];
    t[0][0] = m[0][0]; t[0][1] = m[1][0]; t[0][2] = 0.0;     t[0][3] = 0.0;
    t[1][0] = m[0][1]; t[1][1] = m[1][1]; t[1][2] = 0.0;     t[1][3] = 0.0;
    t[2][0] = 0.0;     t[2][1] = 0.0;     t[2][2] = 1.0;     t[2][3] = 0.0;
    t[3][0] = m[0][2]; t[3][1] = m[1][2]; t[3][2] = 0.0;     t[3][3] = 1.0;
    glLoadMatrixd((const GLdouble *) t);
#else
    RNAbort("Not Implemented");
#endif
}

// Assembly:
subq $0x88, %rsp
movsd (%rdi), %xmm0
movq %rsp, %rax
movsd %xmm0, (%rax)
movsd 0x18(%rdi), %xmm0
movsd %xmm0, 0x8(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movsd 0x8(%rdi), %xmm1
movsd %xmm1, 0x20(%rax)
movsd 0x20(%rdi), %xmm1
movsd %xmm1, 0x28(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x40(%rax)
movsd 0x30255(%rip), %xmm1    # 0x93008
movaps %xmm1, 0x50(%rax)
movsd 0x10(%rdi), %xmm1
movsd %xmm1, 0x60(%rax)
movsd 0x28(%rdi), %xmm1
movsd %xmm1, 0x68(%rax)
movhps 0x30236(%rip), %xmm0    # xmm0 = xmm0[0,1],mem[0,1]
movaps %xmm0, 0x70(%rax)
movq %rax, %rdi
callq 0xe510
addq $0x88, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Draw.cpp
// Function: gaps::R3Matrix::Draw() const
void R3Matrix::
Draw(void) const
{
    // Multiply top of stack by matrix
#if ((RN_3D_GRFX == RN_OPENGL) && (RN_MATH_PRECISION == RN_FLOAT_PRECISION))
    GLdouble t[4][4];
    t[0][0] = m[0][0]; t[0][1] = m[1][0]; t[0][2] = 0.0;     t[0][3] = 0.0;
    t[1][0] = m[0][1]; t[1][1] = m[1][1]; t[1][2] = 0.0;     t[1][3] = 0.0;
    t[2][0] = 0.0;     t[2][1] = 0.0;     t[2][2] = 1.0;     t[2][3] = 0.0;
    t[3][0] = m[0][2]; t[3][1] = m[1][2]; t[3][2] = 0.0;     t[3][3] = 1.0;
    glMultMatrixd((const GLdouble *) t);
#elif ((RN_3D_GRFX == RN_OPENGL) && (RN_MATH_PRECISION == RN_DOUBLE_PRECISION))
    GLdouble t[4][4];
    t[0][0] = m[0][0]; t[0][1] = m[1][0]; t[0][2] = 0.0;     t[0][3] = 0.0;
    t[1][0] = m[0][1]; t[1][1] = m[1][1]; t[1][2] = 0.0;     t[1][3] = 0.0;
    t[2][0] = 0.0;     t[2][1] = 0.0;     t[2][2] = 1.0;     t[2][3] = 0.0;
    t[3][0] = m[0][2]; t[3][1] = m[1][2]; t[3][2] = 0.0;     t[3][3] = 1.0;
    glMultMatrixd((const GLdouble *) t);
#else
    RNAbort("Not Implemented");
#endif
}

// Assembly:
subq $0x88, %rsp
movsd (%rdi), %xmm0
movq %rsp, %rax
movsd %xmm0, (%rax)
movsd 0x18(%rdi), %xmm0
movsd %xmm0, 0x8(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movsd 0x8(%rdi), %xmm1
movsd %xmm1, 0x20(%rax)
movsd 0x20(%rdi), %xmm1
movsd %xmm1, 0x28(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x40(%rax)
movsd 0x301db(%rip), %xmm1    # 0x93008
movaps %xmm1, 0x50(%rax)
movsd 0x10(%rdi), %xmm1
movsd %xmm1, 0x60(%rax)
movsd 0x28(%rdi), %xmm1
movsd %xmm1, 0x68(%rax)
movhps 0x301bc(%rip), %xmm0    # xmm0 = xmm0[0,1],mem[0,1]
movaps %xmm0, 0x70(%rax)
movq %rax, %rdi
callq 0xe050
addq $0x88, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Draw.cpp
// Function: gaps::R2Vector::Draw() const
void R2Vector::
Draw(void) const
{
    // Draw vector from (0,0,0)
    R2BeginLine();
    R2LoadPoint(R2zero_point);
    R2LoadPoint((R2zero_point + *this));
    R2EndLine();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x63421
leaq 0x47a3a4(%rip), %r14    # 0x4dd290
movq %r14, %rdi
callq 0xe5b0
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x5f7b5
movq %r15, %rdi
callq 0xe5b0
callq 0xe5f0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Draw.cpp
// Function: gaps::R2Line::Draw() const
void R2Line::
Draw(void) const
{
    // Draw line
    R2BeginLine();
    R2LoadPoint(Point());
    R2LoadPoint(Point() + Vector());
    R2EndLine();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x63421
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x505c2
movq %r14, %rdi
callq 0xe5b0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x505c2
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x5f7b5
movq %r15, %rdi
callq 0xe5b0
callq 0xe5f0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Draw.cpp
// Function: gaps::R2Ray::Draw() const
void R2Ray::
Draw(void) const
{
    // Draw ray
    R2BeginLine();
    R2LoadPoint(Start());
    R2LoadPoint((Start() + Vector()));
    R2EndLine();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x63421
leaq 0x28(%rbx), %r14
movq %r14, %rdi
callq 0xe5b0
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x5f7b5
movq %r15, %rdi
callq 0xe5b0
callq 0xe5f0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Draw.cpp
// Function: gaps::R2Span::Draw() const
void R2Span::
Draw(void) const
{
    // Draw span
    R2BeginLine();
    R2LoadPoint(Start());
    R2LoadPoint(End());
    R2EndLine();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x63421
leaq 0x28(%rbx), %rdi
callq 0xe5b0
addq $0x38, %rbx
movq %rbx, %rdi
callq 0xe5b0
popq %rbx
jmp 0xe5f0
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Draw.cpp
// Function: gaps::R2Arc::Draw(gaps::RNFlags) const
void R2Arc::
Draw(const R2DrawFlags draw_flags) const
{
    // Draw arc
    if (draw_flags[R2_EDGES_DRAW_FLAG]) {
	R2BeginLine();
	R2LoadPoint(StartPoint());
	int start_index = (int) (1 + R2circle_npoints * StartAngle() / RN_TWO_PI);
	int stop_index = (int) (R2circle_npoints * StopAngle() / RN_TWO_PI);
	for (int i = start_index; i <= stop_index; i++) 
	    R2LoadPoint(Center() + R2circle_points[i % R2circle_npoints] * Radius());
	R2LoadPoint(StopPoint());
	R2EndLine();
    }
}

// Assembly:
leaq 0x37eb5(%rip), %rax     # 0x9aec8
testq %rsi, (%rax)
je 0x6310d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r15
callq 0x63421
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6342a
movq %rbx, %rdi
callq 0xe5b0
leaq 0x37e5f(%rip), %rax     # 0x9aeb0
movl (%rax), %eax
movl %eax, 0x4(%rsp)
cvtsi2sd %eax, %xmm0
movsd 0x28(%r15), %xmm1
mulsd %xmm0, %xmm1
leaq 0x37efc(%rip), %rax     # 0x9af68
movsd (%rax), %xmm2
divsd %xmm2, %xmm1
addsd 0x2ff8c(%rip), %xmm1    # 0x93008
cvttsd2si %xmm1, %ebp
mulsd 0x30(%r15), %xmm0
divsd %xmm2, %xmm0
cvttsd2si %xmm0, %r14d
movq %r15, %r13
addq $0x10, %r15
leaq 0x18(%rsp), %r12
cmpl %r14d, %ebp
jg 0x630e2
movl %ebp, %eax
cltd
idivl 0x4(%rsp)
movslq %edx, %rsi
shlq $0x4, %rsi
addq 0x76f1b(%rip), %rsi     # 0xd9fd0
movsd 0x20(%r13), %xmm0
movq %r12, %rdi
callq 0x5f833
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x5f7a1
movq %rbx, %rdi
callq 0xe5b0
incl %ebp
jmp 0x6309b
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x6343e
movq %r14, %rdi
callq 0xe5b0
callq 0xe5f0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Draw.cpp
// Function: gaps::R2Polyline::Draw(gaps::RNFlags) const
void R2Polyline::
Draw(const R2DrawFlags draw_flags) const
{
    // Draw polyline
    R2BeginLine();
    for (int i = 0; i < npoints; i++) R2LoadPoint(points[i]);
    R2EndLine();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x63421
xorl %r14d, %r14d
xorl %r15d, %r15d
movslq 0x10(%rbx), %rax
cmpq %rax, %r15
jge 0x6313f
movq 0x8(%rbx), %rdi
addq %r14, %rdi
callq 0xe5b0
incq %r15
addq $0x10, %r14
jmp 0x63121
popq %rbx
popq %r14
popq %r15
jmp 0xe5f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Draw.cpp
// Function: gaps::R2Box::Draw(gaps::RNFlags) const
void R2Box::
Draw(const R2DrawFlags draw_flags) const
{
    // Draw surface
    if (draw_flags[R2_SURFACES_DRAW_FLAG]) {
        R2BeginPolygon();
        R2LoadPoint(Corner(RN_LO, RN_LO));
        R2LoadPoint(Corner(RN_HI, RN_LO));
        R2LoadPoint(Corner(RN_HI, RN_HI));
        R2LoadPoint(Corner(RN_LO, RN_HI));
	R2EndPolygon();
    }

    // Draw edges
    if (draw_flags[R2_EDGES_DRAW_FLAG]) {
	R2BeginLoop();
        R2LoadPoint(Corner(RN_LO, RN_LO));
        R2LoadPoint(Corner(RN_HI, RN_LO));
        R2LoadPoint(Corner(RN_HI, RN_HI));
        R2LoadPoint(Corner(RN_LO, RN_HI));
	R2EndLoop();
    }    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x37d6f(%rip), %rax     # 0x9aed0
testq %rsi, (%rax)
je 0x631e3
callq 0x63451
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5cd4c
movq %r15, %rdi
callq 0xe5b0
leaq 0x8(%rsp), %r15
pushq $0x1
popq %rbp
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x5cd4c
movq %r15, %rdi
callq 0xe5b0
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movl %ebp, %ecx
callq 0x5cd4c
movq %r15, %rdi
callq 0xe5b0
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x5cd4c
movq %r15, %rdi
callq 0xe5b0
callq 0xe5f0
leaq 0x37cde(%rip), %rax     # 0x9aec8
testq %r14, (%rax)
je 0x6326c
callq 0x63459
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5cd4c
movq %r14, %rdi
callq 0xe5b0
leaq 0x8(%rsp), %r14
pushq $0x1
popq %rbp
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x5cd4c
movq %r14, %rdi
callq 0xe5b0
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movl %ebp, %ecx
callq 0x5cd4c
movq %r14, %rdi
callq 0xe5b0
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x5cd4c
movq %r14, %rdi
callq 0xe5b0
callq 0xe5f0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Draw.cpp
// Function: gaps::R2Circle::Draw(gaps::RNFlags) const
void R2Circle::
Draw(const R2DrawFlags draw_flags) const
{
    // Draw surface
    if (draw_flags[R2_SURFACES_DRAW_FLAG]) {
	R2BeginPolygon();
	for (int i = 0; i < R2circle_npoints; i++) 
	    R2LoadPoint(center + R2circle_points[i] * radius);
	R2EndPolygon();
    }

    // Draw edges
    if (draw_flags[R2_EDGES_DRAW_FLAG]) {
	R2BeginLoop();
	for (int i = 0; i < R2circle_npoints; i++) 
	    R2LoadPoint(center + R2circle_points[i] * radius);
	R2EndLoop();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x37c40(%rip), %rax     # 0x9aed0
testq %rsi, (%rax)
je 0x63306
movq %rsi, 0x10(%rsp)
callq 0x63451
leaq 0x37c0a(%rip), %rax     # 0x9aeb0
movslq (%rax), %r14
leaq 0x8(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x47a247(%rip), %r12    # 0x4dd500
xorl %r15d, %r15d
leaq 0x18(%rsp), %r13
leaq 0x28(%rsp), %rbp
cmpq %r14, %r15
jge 0x632fc
movsd 0x18(%rbx), %xmm0
movq %r13, %rdi
movq %r12, %rsi
callq 0x5f833
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x5f7a1
movq %rbp, %rdi
callq 0xe5b0
incq %r15
addq $0x10, %r12
jmp 0x632c6
callq 0xe5f0
movq 0x10(%rsp), %rsi
leaq 0x37bbb(%rip), %rax     # 0x9aec8
testq %rsi, (%rax)
je 0x63379
callq 0x63459
leaq 0x37b92(%rip), %rax     # 0x9aeb0
movslq (%rax), %rbp
leaq 0x8(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x47a1cf(%rip), %r15    # 0x4dd500
xorl %r14d, %r14d
leaq 0x18(%rsp), %r12
leaq 0x28(%rsp), %r13
cmpq %rbp, %r14
jge 0x63374
movsd 0x18(%rbx), %xmm0
movq %r12, %rdi
movq %r15, %rsi
callq 0x5f833
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rdx
callq 0x5f7a1
movq %r13, %rdi
callq 0xe5b0
incq %r14
addq $0x10, %r15
jmp 0x6333e
callq 0xe5f0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Draw.cpp
// Function: gaps::R2Polygon::Draw(gaps::RNFlags) const
void R2Polygon::
Draw(const R2DrawFlags draw_flags) const
{
    // Draw surface
    if (draw_flags[R2_SURFACES_DRAW_FLAG]) {
	R2BeginPolygon();
	for (int i = 0; i < npoints; i++) R2LoadPoint(points[i]);
	R2EndPolygon();
    }

    // Draw edges
    if (draw_flags[R2_EDGES_DRAW_FLAG]) {
	R2BeginLoop();
	for (int i = 0; i < npoints; i++) R2LoadPoint(points[i]);
	R2EndLoop();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x37b33(%rip), %rax     # 0x9aed0
testq %rsi, (%rax)
je 0x633d0
callq 0x63451
xorl %r15d, %r15d
xorl %r12d, %r12d
movslq 0x10(%rbx), %rax
cmpq %rax, %r12
jge 0x633cb
movq 0x8(%rbx), %rdi
addq %r15, %rdi
callq 0xe5b0
incq %r12
addq $0x10, %r15
jmp 0x633ad
callq 0xe5f0
leaq 0x37af1(%rip), %rax     # 0x9aec8
testq %r14, (%rax)
je 0x63415
callq 0x63459
xorl %r14d, %r14d
xorl %r15d, %r15d
movslq 0x10(%rbx), %rax
cmpq %rax, %r15
jge 0x63405
movq 0x8(%rbx), %rdi
addq %r14, %rdi
callq 0xe5b0
incq %r15
addq $0x10, %r14
jmp 0x633e7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe5f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Dist.cpp
// Function: gaps::R2Distance(gaps::R2Point const&, gaps::R2Ray const&)
RNLength R2Distance(const R2Point& point, const R2Ray& ray)
{
    // Check if start point is closest
    R2Vector v = point - ray.Start();
    RNScalar dir = v.Dot(ray.Vector());
    if (RNIsNegative(dir)) return v.Length();

    // Return distance from point to ray line
    return R2Distance(point, ray.Line());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x28(%rsi), %rdx
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x5f7c9
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5fa20
leaq 0x776bb(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm1
xorpd 0x2fb37(%rip), %xmm1    # 0x93030
ucomisd %xmm0, %xmm1
ja 0x6350c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6348d
jmp 0x63514
movq %rsp, %rdi
callq 0x5f958
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Dist.cpp
// Function: gaps::R2Distance(gaps::R2Point const&, gaps::R2Span const&)
RNLength R2Distance(const R2Point& point, const R2Span& span)
{
    // Check span
    if (RNIsZero(span.Length())) return R2Distance(point, span.Start());

    // Check if start point is closest
    R2Vector v1 = point - span.Start();
    RNScalar dir1 = v1.Dot(span.Vector());
    if (RNIsNegative(dir1)) return v1.Length();

    // Check if end point is closest
    R2Vector v2 = point - span.End();
    RNScalar dir2 = v2.Dot(span.Vector());
    if (RNIsPositive(dir2)) return v2.Length();

    // Return distance from point to span line
    return R2Distance(point, span.Line());
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movsd 0x48(%rsi), %xmm0
leaq 0x7766d(%rip), %r12     # 0xdaba8
movsd (%r12), %xmm1
movapd 0x2fae7(%rip), %xmm2    # 0x93030
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x63573
ucomisd %xmm0, %xmm1
jb 0x63573
addq $0x28, %rbx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x63469
leaq 0x28(%rbx), %rdx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x5f7c9
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5fa20
movsd (%r12), %xmm1
xorpd 0x2fa90(%rip), %xmm1    # 0x93030
ucomisd %xmm0, %xmm1
ja 0x635da
leaq 0x38(%rbx), %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x5f7c9
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5fa20
ucomisd (%r12), %xmm0
ja 0x635e1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6348d
jmp 0x635eb
leaq 0x18(%rsp), %rdi
jmp 0x635e6
leaq 0x8(%rsp), %rdi
callq 0x5f958
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Dist.cpp
// Function: gaps::R2Distance(gaps::R2Point const&, gaps::R2Polyline const&)
RNLength R2Distance(const R2Point& point, const R2Polyline& polyline)
{
    // Compute distance to each segment
    // This could be a lot faster
    RNLength closest_distance = FLT_MAX;
    for (int i = 1; i < polyline.NPoints(); i++) {
        const R2Point& p0 = polyline.Point(i-1);
        const R2Point& p1 = polyline.Point(i);
        R2Span span(p0, p1);
        RNLength d = R2Distance(span, point);
        if (d < closest_distance) closest_distance = d;
    }

    // Return distance
    return closest_distance;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movsd 0x2f901(%rip), %xmm0    # 0x93018
pushq $0x1
popq %r12
pushq $0x10
popq %r13
leaq 0x10(%rsp), %r15
movslq 0x10(%rbx), %rax
cmpq %rax, %r12
jge 0x63764
movq 0x8(%rbx), %rdx
leaq (%rdx,%r13), %rsi
addq $-0x10, %rsi
addq %r13, %rdx
movq %r15, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0x5e5de
movq %r14, %rdi
movq %r15, %rsi
callq 0x6351e
minsd 0x8(%rsp), %xmm0
incq %r12
addq $0x10, %r13
jmp 0x63724
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Dist.cpp
// Function: gaps::R2Distance(gaps::R2Point const&, gaps::R2Polygon const&)
RNLength R2Distance(const R2Point& point, const R2Polygon& polygon)
{
    // Check if polygon contains point
    if (R2Contains(polygon, point)) return 0;
  
    // Compute distance to each segment
    // This could be a lot faster
    RNLength closest_distance = FLT_MAX;
    for (int i = 0; i < polygon.NPoints(); i++) {
        const R2Point& p0 = polygon.Point(i);
        const R2Point& p1 = polygon.Point((i+1)%polygon.NPoints());
        R2Span span(p0, p1);
        RNLength d = R2Distance(span, point);
        if (d < closest_distance) closest_distance = d;
    }

    // Return distance
    return closest_distance;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x503ba
xorpd %xmm0, %xmm0
testl %eax, %eax
je 0x637a6
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movsd 0x2f86a(%rip), %xmm0    # 0x93018
xorl %r13d, %r13d
leaq 0x10(%rsp), %r15
xorl %r12d, %r12d
movslq 0x10(%rbx), %rcx
cmpq %rcx, %r12
jge 0x63798
movq 0x8(%rbx), %rdi
leaq (%rdi,%r13), %rsi
incq %r12
movl %r12d, %eax
cltd
idivl %ecx
shlq $0x4, %rdx
addq %rdi, %rdx
movq %r15, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0x5e5de
movq %r14, %rdi
movq %r15, %rsi
callq 0x6351e
minsd 0x8(%rsp), %xmm0
addq $0x10, %r13
jmp 0x637b9
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Dist.cpp
// Function: gaps::R2Distance(gaps::R2Line const&, gaps::R2Span const&)
RNLength R2Distance(const R2Line& line, const R2Span& span)
{
    // Return distance from span to line
    RNScalar d = R2SignedDistance(line, span);
    if (RNIsPositive(d)) return d;
    else if (RNIsNegative(d)) return -d;
    else return 0.0;
}

// Assembly:
pushq %rax
callq 0x63a3a
leaq 0x771a2(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm2
ucomisd %xmm2, %xmm0
ja 0x63a30
xorpd 0x2f618(%rip), %xmm2    # 0x93030
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm2
jbe 0x63a34
movapd 0x2f606(%rip), %xmm1    # 0x93030
xorpd %xmm0, %xmm1
jmp 0x63a34
movapd %xmm0, %xmm1
movapd %xmm1, %xmm0
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Dist.cpp
// Function: gaps::R2SignedDistance(gaps::R2Line const&, gaps::R2Line const&)
RNLength R2SignedDistance(const R2Line& line1, const R2Line& line2)
{
    // Return signed distance from line to line
    RNScalar dot = line1.Vector().Dot(line2.Vector());
    if (RNIsEqual(dot, 1.0)) return (line1.C() - line2.C());
    else if (RNIsEqual(dot, -1.0)) return (line1.C() + line2.C());
    else return 0.0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5fa20
leaq 0x7707d(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm2
movsd 0x2f4e9(%rip), %xmm3    # 0x93020
addsd %xmm0, %xmm3
movapd 0x2f4ed(%rip), %xmm1    # 0x93030
xorpd %xmm2, %xmm1
ucomisd %xmm1, %xmm3
jb 0x63b60
ucomisd %xmm3, %xmm2
jb 0x63b60
movsd 0x20(%r14), %xmm1
subsd 0x20(%rbx), %xmm1
jmp 0x63b83
addsd 0x2f4a0(%rip), %xmm0    # 0x93008
ucomisd %xmm1, %xmm0
xorpd %xmm1, %xmm1
jb 0x63b83
ucomisd %xmm0, %xmm2
jb 0x63b83
movsd 0x20(%r14), %xmm1
addsd 0x20(%rbx), %xmm1
movapd %xmm1, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Dist.cpp
// Function: gaps::R2SignedDistance(gaps::R2Line const&, gaps::R2Box const&)
RNLength R2SignedDistance(const R2Line& line, const R2Box& box)
{
    // Return signed distance from line to box
    RNQuadrant quadrant = line.Normal().Quadrant();
    RNScalar d1 = R2SignedDistance(line, box.Corner(~quadrant & 0x3));
    if (RNIsPositiveOrZero(d1)) return d1;
    RNScalar d2 = R2SignedDistance(line, box.Corner(quadrant));
    if (RNIsNegative(d2)) return d2;
    else return 0.0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x10, %rdi
callq 0x5f9f8
movl %eax, %ebp
movl %eax, %edx
notl %edx
andl $0x3, %edx
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x5cce2
movsd 0x8(%r15), %xmm1
mulsd 0x18(%rbx), %xmm1
movsd (%r15), %xmm0
mulsd 0x10(%rbx), %xmm0
addsd %xmm1, %xmm0
addsd 0x20(%rbx), %xmm0
leaq 0x76f9a(%rip), %r12     # 0xdaba8
movsd (%r12), %xmm1
xorpd 0x2f414(%rip), %xmm1    # 0x93030
ucomisd %xmm1, %xmm0
jae 0x63c6b
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x5cce2
movsd (%r15), %xmm1
movsd 0x8(%r15), %xmm0
mulsd 0x18(%rbx), %xmm0
mulsd 0x10(%rbx), %xmm1
addsd %xmm0, %xmm1
addsd 0x20(%rbx), %xmm1
movsd (%r12), %xmm2
xorpd 0x2f3d2(%rip), %xmm2    # 0x93030
movapd %xmm1, %xmm0
cmpnltsd %xmm2, %xmm0
andnpd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Dist.cpp
// Function: gaps::R2Distance(gaps::R2Span const&, gaps::R2Halfspace const&)
RNLength R2Distance(const R2Span& span, const R2Halfspace& halfspace)
{
    // Return distance from span to halfspace
    RNScalar d = R2SignedDistance(halfspace.Line(), span);
    if (RNIsNegative(d)) return -d;
    else return 0.0;
}

// Assembly:
pushq %rax
movq %rdi, %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x63a3a
leaq 0x76e31(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm1
movapd 0x2f2ad(%rip), %xmm2    # 0x93030
xorpd %xmm2, %xmm1
xorpd %xmm0, %xmm2
cmpnltsd %xmm1, %xmm0
andnpd %xmm2, %xmm0
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Relate.cpp
// Function: gaps::R2InteriorAngle(gaps::R2Vector const&, gaps::R2Vector const&)
RNAngle 
R2InteriorAngle(const R2Vector& vector1, const R2Vector& vector2)
{
    // Return angle between vectors
    RNScalar d1 = vector1.Length();
    if (RNIsZero(d1)) return 0.0;
    RNScalar d2 = vector2.Length();
    if (RNIsZero(d2)) return 0.0;
    RNScalar cosine = vector1.Dot(vector2) / (d1 * d2);
    assert(RNIsGreaterOrEqual(cosine, -1.0) && RNIsLessOrEqual(cosine, 1.0));
    if (cosine >= 1.0) return 0.0;
    else if (cosine <= -1.0) return RN_PI;
    else return acos(cosine); 
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5f958
leaq 0x76cc1(%rip), %r15     # 0xdaba8
movsd (%r15), %xmm2
movapd 0x2f13c(%rip), %xmm1    # 0x93030
xorpd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
xorpd %xmm1, %xmm1
jb 0x63f0c
ucomisd %xmm0, %xmm2
jae 0x63f91
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x5f958
movsd (%r15), %xmm2
movapd 0x2f109(%rip), %xmm1    # 0x93030
xorpd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x63f3d
ucomisd %xmm0, %xmm2
jb 0x63f3d
xorpd %xmm1, %xmm1
jmp 0x63f91
movq %r14, %rdi
movq %rbx, %rsi
movsd %xmm0, (%rsp)
callq 0x5fa20
movsd 0x8(%rsp), %xmm1
mulsd (%rsp), %xmm1
divsd %xmm1, %xmm0
ucomisd 0x2f0a4(%rip), %xmm0    # 0x93008
xorpd %xmm1, %xmm1
jae 0x63f91
movsd 0x2f0ae(%rip), %xmm1    # 0x93020
ucomisd %xmm0, %xmm1
jae 0x63f86
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xe400
leaq 0x36fbb(%rip), %rax     # 0x9af48
movsd (%rax), %xmm1
movapd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Relate.cpp
// Function: gaps::R2IntersectionArea(gaps::R2Box const&, gaps::R2Box const&)
RNArea 
R2IntersectionArea(const R2Box& box1, const R2Box& box2)
{
  R2Box intersection(box1);
  intersection.Intersect(box2);
  if (intersection.IsEmpty()) return 0;
  return intersection.Area();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x5ca56
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5d168
movsd 0x18(%rsp), %xmm0
ucomisd 0x28(%rsp), %xmm0
xorpd %xmm0, %xmm0
ja 0x63ffd
movsd 0x20(%rsp), %xmm1
ucomisd 0x30(%rsp), %xmm1
ja 0x63ffd
leaq 0x10(%rsp), %rdi
callq 0x5cf30
movsd %xmm0, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x5d2ee
movsd 0x8(%rsp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5d2ee
movq %rbx, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Relate.cpp
// Function: gaps::R2Abuts(gaps::R2Box const&, gaps::R2Box const&)
RNBoolean 
R2Abuts(const R2Box& box1, const R2Box& box2) 
{
    // Return whether box1 abuts box2
    if (!R2Intersects(box1, box2)) return FALSE;
    if (RNIsEqual(box1.XMin(), box2.XMax())) return TRUE;
    if (RNIsEqual(box1.XMax(), box2.XMin())) return TRUE;
    if (RNIsEqual(box1.YMin(), box2.YMax())) return TRUE;
    if (RNIsEqual(box1.YMax(), box2.YMin())) return TRUE;
    return FALSE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x5139d
testl %eax, %eax
je 0x642cb
movsd 0x8(%r14), %xmm2
leaq 0x76952(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm0
subsd 0x18(%rbx), %xmm2
movapd 0x2edc9(%rip), %xmm1    # 0x93030
xorpd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
pushq $0x1
popq %r15
jb 0x6427b
ucomisd %xmm2, %xmm0
jae 0x642cb
movsd 0x18(%r14), %xmm2
subsd 0x8(%rbx), %xmm2
ucomisd %xmm1, %xmm2
jb 0x64292
ucomisd %xmm2, %xmm0
jae 0x642cb
movsd 0x10(%r14), %xmm2
subsd 0x20(%rbx), %xmm2
ucomisd %xmm1, %xmm2
jb 0x642a9
ucomisd %xmm2, %xmm0
jae 0x642cb
movsd 0x20(%r14), %xmm2
subsd 0x10(%rbx), %xmm2
cmplepd %xmm2, %xmm1
cmplepd %xmm0, %xmm2
andpd %xmm1, %xmm2
movd %xmm2, %r15d
andl $0x1, %r15d
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq