LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNSvd.cpp
// Function: gaps::rotate_rows(int, int, double, double, double*, int, int, int, int)
void rotate_rows(int i,int j, RNScalar cos,RNScalar sin,RNScalar* a,int start,int n,int mm,int nn)
{
    int end = start+n, k;
    RNScalar x,y;
    for (k=start; k<end; k++) {
	x = REF2D(a,mm,nn,i,k);
	y = REF2D(a,mm,nn,j,k);
	REF2D(a,mm,nn,i,k) =  cos*x + sin*y;
	REF2D(a,mm,nn,j,k) = -sin*x + cos*y;
    }
}

// Assembly:
movl 0x8(%rsp), %eax
movl %edi, -0x4(%rsp)
movl %esi, -0x8(%rsp)
movsd %xmm0, -0x10(%rsp)
movsd %xmm1, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movl %ecx, -0x24(%rsp)
movl %r8d, -0x28(%rsp)
movl %r9d, -0x2c(%rsp)
movl -0x24(%rsp), %eax
addl -0x28(%rsp), %eax
movl %eax, -0x30(%rsp)
movl -0x24(%rsp), %eax
movl %eax, -0x34(%rsp)
movl -0x34(%rsp), %eax
cmpl -0x30(%rsp), %eax
jge 0xd2c98
movq -0x20(%rsp), %rax
movl 0x8(%rsp), %ecx
imull -0x4(%rsp), %ecx
addl -0x34(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x40(%rsp)
movq -0x20(%rsp), %rax
movl 0x8(%rsp), %ecx
imull -0x8(%rsp), %ecx
addl -0x34(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x48(%rsp)
movsd -0x10(%rsp), %xmm0
movsd -0x40(%rsp), %xmm2
movsd -0x18(%rsp), %xmm1
mulsd -0x48(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x20(%rsp), %rax
movl 0x8(%rsp), %ecx
imull -0x4(%rsp), %ecx
addl -0x34(%rsp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x18(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd -0x40(%rsp), %xmm2
movsd -0x10(%rsp), %xmm1
mulsd -0x48(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x20(%rsp), %rax
movl 0x8(%rsp), %ecx
imull -0x8(%rsp), %ecx
addl -0x34(%rsp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0xd2baf
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNSvd.cpp
// Function: gaps::clr_top_supdiag_elt(double*, int, int, double*, int, int, int)
void clr_top_supdiag_elt(RNScalar * b,int p,int z,RNScalar * u,int m,int n,int min)
{
    int i;
    RNScalar r, x, hypot, cos, sin;

    for (i=p+1; i<=z; i++) {
	r = REF2D(b,m,n,p,i);
	x = REF2D(b,m,n,i,i);
	if (r==0) break;
	hypot = ((RNScalar) sqrt (r*r + x*x)); //hypot = pythag(r,x);
	cos = x/hypot;
	sin = r/hypot;
	/* update the diagonal and superdiagonal elements */
	REF2D(b,m,n,p,i) = 0;
	REF2D(b,m,n,i,i) = hypot;
	/* Rotate the remainder of rows p and i (only need to
	** rotate one more element, since the rest are zero) */
	if (i != z) rotate_rows(p,i,cos,sin,b,i+1,1,m,n);
	/* accumulate the rotation into u */
	rotate_cols(i,p,cos,sin,u,0,m,m,min);
    }
}

// Assembly:
subq $0x58, %rsp
movl 0x60(%rsp), %eax
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movl %edx, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movl %r8d, 0x3c(%rsp)
movl %r9d, 0x38(%rsp)
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
cmpl 0x48(%rsp), %eax
jg 0xd2e41
movq 0x50(%rsp), %rax
movl 0x38(%rsp), %ecx
imull 0x4c(%rsp), %ecx
addl 0x34(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x50(%rsp), %rax
movl 0x38(%rsp), %ecx
imull 0x34(%rsp), %ecx
addl 0x34(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x28(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xd2d33
jp 0xd2d33
jmp 0xd2e41
movsd 0x28(%rsp), %xmm0
movsd 0x28(%rsp), %xmm2
movsd 0x20(%rsp), %xmm1
mulsd 0x20(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0xf390
movsd %xmm0, 0x18(%rsp)
movsd 0x20(%rsp), %xmm0
divsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x28(%rsp), %xmm0
divsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x50(%rsp), %rax
movl 0x38(%rsp), %ecx
imull 0x4c(%rsp), %ecx
addl 0x34(%rsp), %ecx
movslq %ecx, %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movsd 0x18(%rsp), %xmm0
movq 0x50(%rsp), %rax
movl 0x38(%rsp), %ecx
imull 0x34(%rsp), %ecx
addl 0x34(%rsp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x34(%rsp), %eax
cmpl 0x48(%rsp), %eax
je 0xd2e00
movl 0x4c(%rsp), %edi
movl 0x34(%rsp), %esi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq 0x50(%rsp), %rdx
movl 0x34(%rsp), %ecx
addl $0x1, %ecx
movl 0x3c(%rsp), %r9d
movl 0x38(%rsp), %eax
movl $0x1, %r8d
movl %eax, (%rsp)
callq 0xd2b70
movl 0x34(%rsp), %edi
movl 0x4c(%rsp), %esi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq 0x40(%rsp), %rdx
movl 0x3c(%rsp), %r8d
movl 0x3c(%rsp), %r9d
movl 0x60(%rsp), %eax
xorl %ecx, %ecx
movl %eax, (%rsp)
callq 0xd2a40
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0xd2ccf
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNSvd.cpp
// Function: gaps::clr_bot_supdiag_elt(double*, int, int, double*, int, int, int)
void clr_bot_supdiag_elt(RNScalar * b,int p,int z,RNScalar * v,int m,int n,int min)
{
    int i;
    RNScalar r, x, hypot, cos, sin;

    for (i=z-1; i>=p; i--) {
	r = REF2D(b,m,n,i,z);
	x = REF2D(b,m,n,i,i);
	if (r==0) break;
	hypot = ((RNScalar) sqrt (r*r + x*x)); //hypot = pythag(r,x);
	cos = x/hypot;
	sin = r/hypot;
	/* update the diagonal and superdiagonal elements */
	REF2D(b,m,n,i,z) = 0;
	REF2D(b,m,n,i,i) = hypot;
	/* Rotate the remainder of cols z and i (only need to
	** rotate one more element, since the rest are zero) */
	if (i != p) rotate_cols(i,z,cos,sin,b,i-1,1,m,n);
	/* accumulate the rotation into v */
	rotate_rows(i,z,cos,sin,v,0,n,min,n);
    }
}

// Assembly:
subq $0x58, %rsp
movl 0x60(%rsp), %eax
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movl %edx, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movl %r8d, 0x3c(%rsp)
movl %r9d, 0x38(%rsp)
movl 0x48(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jl 0xd2ff1
movq 0x50(%rsp), %rax
movl 0x38(%rsp), %ecx
imull 0x34(%rsp), %ecx
addl 0x48(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x50(%rsp), %rax
movl 0x38(%rsp), %ecx
imull 0x34(%rsp), %ecx
addl 0x34(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x28(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xd2ee3
jp 0xd2ee3
jmp 0xd2ff1
movsd 0x28(%rsp), %xmm0
movsd 0x28(%rsp), %xmm2
movsd 0x20(%rsp), %xmm1
mulsd 0x20(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0xf390
movsd %xmm0, 0x18(%rsp)
movsd 0x20(%rsp), %xmm0
divsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x28(%rsp), %xmm0
divsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x50(%rsp), %rax
movl 0x38(%rsp), %ecx
imull 0x34(%rsp), %ecx
addl 0x48(%rsp), %ecx
movslq %ecx, %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movsd 0x18(%rsp), %xmm0
movq 0x50(%rsp), %rax
movl 0x38(%rsp), %ecx
imull 0x34(%rsp), %ecx
addl 0x34(%rsp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x34(%rsp), %eax
cmpl 0x4c(%rsp), %eax
je 0xd2fb0
movl 0x34(%rsp), %edi
movl 0x48(%rsp), %esi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq 0x50(%rsp), %rdx
movl 0x34(%rsp), %ecx
subl $0x1, %ecx
movl 0x3c(%rsp), %r9d
movl 0x38(%rsp), %eax
movl $0x1, %r8d
movl %eax, (%rsp)
callq 0xd2a40
movl 0x34(%rsp), %edi
movl 0x48(%rsp), %esi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq 0x40(%rsp), %rdx
movl 0x38(%rsp), %r8d
movl 0x60(%rsp), %r9d
movl 0x38(%rsp), %eax
xorl %ecx, %ecx
movl %eax, (%rsp)
callq 0xd2b70
movl 0x34(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0xd2e7f
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNSvd.cpp
// Function: gaps::RNSvdBacksubstitute(int, int, double const*, double const*, double const*, double const*, double*, double)
void RNSvdBacksubstitute(int m, int n, 
    const RNScalar *u, const RNScalar *w, const RNScalar *vt, const RNScalar *b, 
    RNScalar *x, RNScalar eps)
{
    const int min = MIN(m,n);
    const RNScalar thresh = eps * w[0];	/* singular vals are sorted, w[0] is max */
    RNScalar *tmp = ALLOC1D(min);
    int i,j,k;

    for (j=0; j<min; j++) {
	RNScalar s = 0;
	if (w[j] >= thresh) {
	    for (i=0; i<m; i++) s += REF2D(u,m,min,i,j) * b[i];
	    s /= w[j];
	}
	tmp[j] = s;
    }
    for (k=0; k<n; k++) {
	RNScalar s=0;
	for (j=0; j<min; j++) s += REF2D(vt,min,n,j,k) * tmp[j];
	x[k] = s;
    }
    FREE(tmp);
}

// Assembly:
subq $0x78, %rsp
movq 0x80(%rsp), %rax
movl %edi, 0x74(%rsp)
movl %esi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq %rcx, 0x60(%rsp)
movq %r8, 0x58(%rsp)
movq %r9, 0x50(%rsp)
movsd %xmm0, 0x48(%rsp)
movl 0x74(%rsp), %eax
cmpl 0x70(%rsp), %eax
jge 0xd41f2
movl 0x74(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0xd41fa
movl 0x70(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x44(%rsp)
movsd 0x48(%rsp), %xmm0
movq 0x60(%rsp), %rax
mulsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movl 0x44(%rsp), %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0xf6a0
movq %rax, 0x30(%rsp)
movl $0x0, 0x28(%rsp)
movl 0x28(%rsp), %eax
cmpl 0x44(%rsp), %eax
jge 0xd4301
xorps %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x60(%rsp), %rax
movslq 0x28(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd 0x38(%rsp), %xmm0
jb 0xd42dc
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
cmpl 0x74(%rsp), %eax
jge 0xd42bd
movq 0x68(%rsp), %rax
movl 0x44(%rsp), %ecx
imull 0x2c(%rsp), %ecx
addl 0x28(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x50(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x18(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0xd4269
movq 0x60(%rsp), %rax
movslq 0x28(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd 0x18(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
movq 0x30(%rsp), %rax
movslq 0x28(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0xd4233
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x70(%rsp), %eax
jge 0xd43a4
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movl $0x0, 0x28(%rsp)
movl 0x28(%rsp), %eax
cmpl 0x44(%rsp), %eax
jge 0xd437c
movq 0x58(%rsp), %rax
movl 0x70(%rsp), %ecx
imull 0x28(%rsp), %ecx
addl 0x24(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x30(%rsp), %rax
movslq 0x28(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x10(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0xd4328
movsd 0x10(%rsp), %xmm0
movq 0x80(%rsp), %rax
movslq 0x24(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0xd4309
movq 0x30(%rsp), %rdi
callq 0xf5f0
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNSvd.cpp
// Function: gaps::RNSvdSolve(int, int, double const*, double const*, double*, double)
void RNSvdSolve(int m, int n, 
    const RNScalar *a, const RNScalar *b,
    RNScalar *x, RNScalar eps)
{
  // Allocate memory
  int min = (m < n) ? m : n;
  RNScalar *u = new RNScalar [ m * min ];
  RNScalar *w = new RNScalar [ min ];
  RNScalar *vt = new RNScalar [ min * n ];
  assert(u && w && vt);

  // Decompose matrix
  RNSvdDecompose(m, n, a, u, w, vt);

  // Backsubstitute
  RNSvdBacksubstitute(m, n, u, w, vt, b, x, eps);

  // Delete memory
  delete [] u;
  delete [] w;
  delete [] vt;
}

// Assembly:
subq $0x78, %rsp
movl %edi, 0x74(%rsp)
movl %esi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq %rcx, 0x60(%rsp)
movq %r8, 0x58(%rsp)
movsd %xmm0, 0x50(%rsp)
movl 0x74(%rsp), %eax
cmpl 0x70(%rsp), %eax
jge 0xd43f5
movl 0x74(%rsp), %eax
movl %eax, 0x2c(%rsp)
jmp 0xd43fd
movl 0x70(%rsp), %eax
movl %eax, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x4c(%rsp)
movl 0x74(%rsp), %eax
imull 0x4c(%rsp), %eax
cltq
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0xf030
movq %rax, 0x40(%rsp)
movslq 0x4c(%rsp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0xf030
movq %rax, 0x38(%rsp)
movl 0x4c(%rsp), %eax
imull 0x70(%rsp), %eax
cltq
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0xf030
movq %rax, 0x30(%rsp)
movl 0x74(%rsp), %edi
movl 0x70(%rsp), %esi
movq 0x68(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x30(%rsp), %r9
callq 0xd3dc0
movl 0x74(%rsp), %edi
movl 0x70(%rsp), %esi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x60(%rsp), %r9
movq 0x58(%rsp), %rax
movsd 0x50(%rsp), %xmm0
movq %rax, (%rsp)
callq 0xd41b0
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
je 0xd44fd
movq 0x20(%rsp), %rdi
callq 0xf670
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0xd4517
movq 0x18(%rsp), %rdi
callq 0xf670
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0xd4531
movq 0x10(%rsp), %rdi
callq 0xf670
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNScalar.cpp
// Function: gaps::RNSetInfinity(double)
void
RNSetInfinity(RNScalar infinity)
{
    // Set scalar range
    RN_INFINITY = infinity;
#   if (RN_MATH_PRECISION == RN_FLOAT_PRECISION)
       RN_EPSILON = 1.0E-6 * infinity;
       RN_SMALL_EPSILON = 0.1 * RN_EPSILON;
       RN_BIG_EPSILON = 10.0 * RN_EPSILON;
#   else 
       RN_EPSILON = 1.0E-10 * infinity;
       RN_SMALL_EPSILON = 0.1 * RN_EPSILON;
       RN_BIG_EPSILON = 10.0 * RN_EPSILON;
#endif    
}

// Assembly:
movsd %xmm0, -0x8(%rsp)
movsd -0x8(%rsp), %xmm0
movsd %xmm0, 0xa3eec(%rip)    # 0x1784f0
movsd 0x622b4(%rip), %xmm0    # 0x1368c0
mulsd -0x8(%rsp), %xmm0
movsd %xmm0, 0xa3ec6(%rip)    # 0x1784e0
movsd 0x5ec0e(%rip), %xmm0    # 0x133230
mulsd 0xa3eb6(%rip), %xmm0    # 0x1784e0
movsd %xmm0, 0xa3ea6(%rip)    # 0x1784d8
movsd 0x61596(%rip), %xmm0    # 0x135bd0
mulsd 0xa3e9e(%rip), %xmm0    # 0x1784e0
movsd %xmm0, 0xa3e9e(%rip)    # 0x1784e8
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNScalar.cpp
// Function: gaps::RNSetEpsilon(double)
void
RNSetEpsilon(RNScalar epsilon)
{
    // Set scalar range
    RN_EPSILON = epsilon;
#   if (RN_MATH_PRECISION == RN_FLOAT_PRECISION)
       RN_INFINITY = 1.0E7 * epsilon;
       RN_SMALL_EPSILON = 0.1 * RN_EPSILON;
       RN_BIG_EPSILON = 10.0 * RN_EPSILON;
#   else 
       RN_INFINITY = 1.0E10 * epsilon;
       RN_SMALL_EPSILON = 0.1 * RN_EPSILON;
       RN_BIG_EPSILON = 10.0 * RN_EPSILON;
#endif    
}

// Assembly:
movsd %xmm0, -0x8(%rsp)
movsd -0x8(%rsp), %xmm0
movsd %xmm0, 0xa3e7c(%rip)    # 0x1784e0
movsd 0x6225c(%rip), %xmm0    # 0x1368c8
mulsd -0x8(%rsp), %xmm0
movsd %xmm0, 0xa3e76(%rip)    # 0x1784f0
movsd 0x5ebae(%rip), %xmm0    # 0x133230
mulsd 0xa3e56(%rip), %xmm0    # 0x1784e0
movsd %xmm0, 0xa3e46(%rip)    # 0x1784d8
movsd 0x61536(%rip), %xmm0    # 0x135bd0
mulsd 0xa3e3e(%rip), %xmm0    # 0x1784e0
movsd %xmm0, 0xa3e3e(%rip)    # 0x1784e8
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNScalar.cpp
// Function: gaps::RNSeedRandomScalar(double)
void 
RNSeedRandomScalar(RNScalar seed)
{
#if (RN_OS == RN_WINDOWS)
  if (seed == 0.0) srand(GetTickCount());
  else srand((int) (1.0E6 * seed));
#elif (RN_CC_VER == RN_C11)
#else
  if (seed == 0.0) { 
    struct timeval timevalue;
    gettimeofday(&timevalue, NULL);
    srand48(timevalue.tv_usec);
  }
  else {
    srand48((long) (1.0E6 * seed));
  }
#endif
  random_seeded = TRUE;
}

// Assembly:
subq $0x18, %rsp
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xd46e3
jp 0xd46e3
movq %rsp, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf810
movq 0x8(%rsp), %rdi
callq 0xf860
jmp 0xd46fb
movsd 0x621ad(%rip), %xmm0    # 0x136898
mulsd 0x10(%rsp), %xmm0
cvttsd2si %xmm0, %rdi
callq 0xf860
movl $0x1, 0x4a6dab(%rip)    # 0x57b4b0
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNScalar.cpp
// Function: gaps::RNCompareScalars(void const*, void const*)
int 
RNCompareScalars(const void *value1, const void *value2)
{
  const RNScalar *scalar1 = (const RNScalar *) value1;
  const RNScalar *scalar2 = (const RNScalar *) value2;
  if (*scalar1 < *scalar2) return -1;
  else if (*scalar1 > *scalar2) return 1;
  else return 0;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x18(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x20(%rsp), %rax
movsd (%rax), %xmm1
movq -0x28(%rsp), %rax
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd4770
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0xd4796
movq -0x20(%rsp), %rax
movsd (%rax), %xmm0
movq -0x28(%rsp), %rax
ucomisd (%rax), %xmm0
jbe 0xd478e
movl $0x1, -0x4(%rsp)
jmp 0xd4796
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNScalar.cpp
// Function: gaps::RNCompareDoubles(void const*, void const*)
int 
RNCompareDoubles(const void *value1, const void *value2)
{
  const double *double1 = (const double *) value1;
  const double *double2 = (const double *) value2;
  if (*double1 < *double2) return -1;
  else if (*double1 > *double2) return 1;
  else return 0;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x18(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x20(%rsp), %rax
movsd (%rax), %xmm1
movq -0x28(%rsp), %rax
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd47e0
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0xd4806
movq -0x20(%rsp), %rax
movsd (%rax), %xmm0
movq -0x28(%rsp), %rax
ucomisd (%rax), %xmm0
jbe 0xd47fe
movl $0x1, -0x4(%rsp)
jmp 0xd4806
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNScalar.cpp
// Function: gaps::RNCompareFloats(void const*, void const*)
int 
RNCompareFloats(const void *value1, const void *value2)
{
  const float *float1 = (const float *) value1;
  const float *float2 = (const float *) value2;
  if (*float1 < *float2) return -1;
  else if (*float1 > *float2) return 1;
  else return 0;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x18(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x20(%rsp), %rax
movss (%rax), %xmm1
movq -0x28(%rsp), %rax
movss (%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xd484f
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0xd4874
movq -0x20(%rsp), %rax
movss (%rax), %xmm0
movq -0x28(%rsp), %rax
ucomiss (%rax), %xmm0
jbe 0xd486c
movl $0x1, -0x4(%rsp)
jmp 0xd4874
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNScalar.cpp
// Function: gaps::RNCompareInts(void const*, void const*)
int 
RNCompareInts(const void *value1, const void *value2)
{
  const int *int1 = (const int *) value1;
  const int *int2 = (const int *) value2;
  if (*int1 < *int2) return -1;
  else if (*int1 > *int2) return 1;
  else return 0;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x18(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x20(%rsp), %rax
movl (%rax), %eax
movq -0x28(%rsp), %rcx
cmpl (%rcx), %eax
jge 0xd48b8
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0xd48da
movq -0x20(%rsp), %rax
movl (%rax), %eax
movq -0x28(%rsp), %rcx
cmpl (%rcx), %eax
jle 0xd48d2
movl $0x1, -0x4(%rsp)
jmp 0xd48da
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNType.cpp
// Function: gaps::RNClassType::RNClassType(int, char const*)
RNClassType::
RNClassType(RNClassID id, const char *name)
{
    // Initialize class type
    this->id = id;
    if (!name) this->name = NULL;
    else {
	this->name = new char[strlen(name) + 1];
	assert(this->name);
	strcpy(this->name, name);
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x1c(%rsp), %ecx
movl %ecx, (%rax)
cmpq $0x0, 0x10(%rsp)
jne 0xd4939
movq 0x8(%rsp), %rax
movq $0x0, 0x8(%rax)
jmp 0xd4969
movq 0x10(%rsp), %rdi
callq 0xf200
movq %rax, %rdi
addq $0x1, %rdi
callq 0xf030
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0xf450
addq $0x28, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNType.cpp
// Function: gaps::RNClassType::RNClassType(char const*)
RNClassType::
RNClassType(const char *name)
{
    // Initialize class type
    id = ++RNnclass_ids;
    if (!name) this->name = NULL;
    else {
	this->name = new char[strlen(name) + 1];
	assert(this->name);
	strcpy(this->name, name);
    }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl 0x4a6b3b(%rip), %ecx    # 0x57b4c8
addl $0x1, %ecx
movl %ecx, 0x4a6b32(%rip)    # 0x57b4c8
movl %ecx, (%rax)
cmpq $0x0, 0x8(%rsp)
jne 0xd49ae
movq (%rsp), %rax
movq $0x0, 0x8(%rax)
jmp 0xd49dd
movq 0x8(%rsp), %rdi
callq 0xf200
movq %rax, %rdi
addq $0x1, %rdi
callq 0xf030
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rax), %rdi
movq 0x8(%rsp), %rsi
callq 0xf450
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNMem.cpp
// Function: gaps::RNSwap(void*, void*, void*, int)
void RNSwap(void *node1, void *node2, void *buffer, int size)
{
    // Check arguments
    assert(node1);
    assert(node2);
    assert(size > 0);

    // Find suitable swap buffer 
    void *swap = buffer;
    char swap_buffer[RN_SWAP_BUFFER_SIZE];
    if (buffer == NULL) {
	swap = (void *) swap_buffer;
	if (size > RN_SWAP_BUFFER_SIZE) {
	    swap = (void *) malloc(size);
            if (!swap) {
		RNFail("Unable to allocate swap buffer");
                return;
	    }
	}
    }

    // Swap two buffers 
    RNCopy(node1, swap, size);
    RNCopy(node2, node1, size);
    RNCopy(swap, node2, size);

    // Free swap buffer 
    if (buffer == NULL) {
	if (size > RN_SWAP_BUFFER_SIZE) {
	    free(swap);
	}
    }
}

// Assembly:
subq $0x428, %rsp            # imm = 0x428
movq %rdi, 0x420(%rsp)
movq %rsi, 0x418(%rsp)
movq %rdx, 0x410(%rsp)
movl %ecx, 0x40c(%rsp)
movq 0x410(%rsp), %rax
movq %rax, 0x400(%rsp)
cmpq $0x0, 0x410(%rsp)
jne 0xd4b1d
movq %rsp, %rax
movq %rax, 0x400(%rsp)
cmpl $0x400, 0x40c(%rsp) # imm = 0x400
jle 0xd4b1b
movslq 0x40c(%rsp), %rdi
callq 0xf6a0
movq %rax, 0x400(%rsp)
cmpq $0x0, 0x400(%rsp)
jne 0xd4b19
leaq 0x61e08(%rip), %rdi     # 0x136918
movb $0x0, %al
callq 0xd4f30
jmp 0xd4b98
jmp 0xd4b1b
jmp 0xd4b1d
movq 0x420(%rsp), %rdi
movq 0x400(%rsp), %rsi
movl 0x40c(%rsp), %edx
callq 0xd4ba0
movq 0x418(%rsp), %rdi
movq 0x420(%rsp), %rsi
movl 0x40c(%rsp), %edx
callq 0xd4ba0
movq 0x400(%rsp), %rdi
movq 0x418(%rsp), %rsi
movl 0x40c(%rsp), %edx
callq 0xd4ba0
cmpq $0x0, 0x410(%rsp)
jne 0xd4b98
cmpl $0x400, 0x40c(%rsp) # imm = 0x400
jle 0xd4b96
movq 0x400(%rsp), %rdi
callq 0xf5f0
jmp 0xd4b98
addq $0x428, %rsp            # imm = 0x428
retq
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNMem.cpp
// Function: gaps::RNStrdup(char const*)
char *RNStrdup(const char *str)
{
  // Copy a string (RNStrdup is not part of standard)
  size_t len = strlen(str) + 1;
  void *output = malloc(len);
  if (output == NULL) return NULL;
  return (char *) memcpy (output, str, len);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0xf200
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0xf6a0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0xd4c6e
movq $0x0, 0x20(%rsp)
jmp 0xd4c8f
movq 0x8(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0xf3d0
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNMem.cpp
// Function: gaps::RNStrncpy(char*, char const*, int)
char *RNStrncpy(char *dst, const char *src, int max_length)
{
  // Check arguments
  if (!dst) return NULL;
  if (!src) return NULL;
  if (max_length < 0) return NULL;

  // Copy characters
  int count = 0;
  char *dstp = dst;
  const char *srcp = src;
  while (count < max_length) {
    if (count++ >= max_length) break;
    if (!*srcp) { *dstp = '\0'; break; }
    *dstp++ = *srcp++;
  }

  // Return destination address
  return dst;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movl %edx, -0x1c(%rsp)
cmpq $0x0, -0x10(%rsp)
jne 0xd4cc4
movq $0x0, -0x8(%rsp)
jmp 0xd4d70
cmpq $0x0, -0x18(%rsp)
jne 0xd4cda
movq $0x0, -0x8(%rsp)
jmp 0xd4d70
cmpl $0x0, -0x1c(%rsp)
jge 0xd4cef
movq $0x0, -0x8(%rsp)
jmp 0xd4d70
movl $0x0, -0x20(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x18(%rsp), %rax
movq %rax, -0x30(%rsp)
movl -0x20(%rsp), %eax
cmpl -0x1c(%rsp), %eax
jge 0xd4d66
movl -0x20(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x20(%rsp)
cmpl -0x1c(%rsp), %eax
jl 0xd4d2a
jmp 0xd4d66
movq -0x30(%rsp), %rax
cmpb $0x0, (%rax)
jne 0xd4d3e
movq -0x28(%rsp), %rax
movb $0x0, (%rax)
jmp 0xd4d66
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rsp)
movb (%rax), %cl
movq -0x28(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rsp)
movb %cl, (%rax)
jmp 0xd4d0b
movq -0x10(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNError.cpp
// Function: gaps::RNAbort(char const*, ...)
void RNAbort(const char *fmt, ...)
{
#if (0) && (RN_OS == RN_WINDOWS)
    /* Display error message */
    char outbuf[256];
    outbuf[0] = '\0';
    if (fmt) {
	char buf[256];
        va_list args;
        va_start(args, fmt);
        vsprintf(buf, fmt, args);
	strcat(outbuf, buf);
        va_end(args);
        strcat(outbuf, "\n");
    }
    MessageBox(NULL, outbuf, "GAPS FATAL ERROR -- ABORTING", MB_ICONSTOP | MB_OK);
#endif

    /* Print error message */
    if (RNerror_file) {
        // perror("GAPS FATAL ERROR.  ABORTING:");
	if (fmt) {
	    va_list args;
	    va_start(args, fmt);
	    vfprintf(RNerror_file, fmt, args);
	    va_end(args);
	    fprintf(RNerror_file, "\n");
	}
	fflush(RNerror_file);
    }

    /* Abort */
    fflush(stdout);
    fflush(stderr);
    abort();
}

// Assembly:
subq $0xd8, %rsp
testb %al, %al
je 0xd4e5c
movaps %xmm0, 0x30(%rsp)
movaps %xmm1, 0x40(%rsp)
movaps %xmm2, 0x50(%rsp)
movaps %xmm3, 0x60(%rsp)
movaps %xmm4, 0x70(%rsp)
movaps %xmm5, 0x80(%rsp)
movaps %xmm6, 0x90(%rsp)
movaps %xmm7, 0xa0(%rsp)
movq %r9, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, 0xd0(%rsp)
cmpq $0x0, 0x4a664b(%rip)    # 0x57b4d0
je 0xd4eff
cmpq $0x0, 0xd0(%rsp)
je 0xd4ef3
leaq 0xb0(%rsp), %rax
movq %rsp, %rcx
movq %rcx, 0x10(%rax)
leaq 0xe0(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq 0x4a660f(%rip), %rdi    # 0x57b4d0
movq 0xd0(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0xf6b0
leaq 0xb0(%rsp), %rax
movq 0x4a65eb(%rip), %rdi    # 0x57b4d0
leaq 0x63b26(%rip), %rsi     # 0x138a12
movb $0x0, %al
callq 0xf730
movq 0x4a65d6(%rip), %rdi    # 0x57b4d0
callq 0xf5d0
movq 0x9a08a(%rip), %rax     # 0x16ef90
movq (%rax), %rdi
callq 0xf5d0
movq 0x9a0b3(%rip), %rax     # 0x16efc8
movq (%rax), %rdi
callq 0xf5d0
callq 0xf290
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNError.cpp
// Function: gaps::RNFail(char const*, ...)
void RNFail(const char *fmt, ...)
{
#if (0) && (RN_OS == RN_WINDOWS)
    /* Display error message */
    char outbuf[256];
    outbuf[0] = '\0';
    if (fmt) {
	char buf[256];
        va_list args;
        va_start(args, fmt);
        vsprintf(buf, fmt, args);
	strcat(outbuf, buf);
        va_end(args);
        strcat(outbuf, "\n");
    }
    MessageBox(NULL, outbuf, "GAPS ERROR", MB_ICONSTOP | MB_OK);
#endif

    /* Print error message */
    if (RNerror_file) {
        // perror("GAPS ERROR");
        if (fmt) {
	    va_list args;
	    va_start(args, fmt);
	    vfprintf(RNerror_file, fmt, args);
	    va_end(args);
	    fprintf(RNerror_file, "\n");
	}
    }
}

// Assembly:
subq $0xd8, %rsp
testb %al, %al
je 0xd4f6c
movaps %xmm0, 0x30(%rsp)
movaps %xmm1, 0x40(%rsp)
movaps %xmm2, 0x50(%rsp)
movaps %xmm3, 0x60(%rsp)
movaps %xmm4, 0x70(%rsp)
movaps %xmm5, 0x80(%rsp)
movaps %xmm6, 0x90(%rsp)
movaps %xmm7, 0xa0(%rsp)
movq %r9, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, 0xd0(%rsp)
cmpq $0x0, 0x4a653b(%rip)    # 0x57b4d0
je 0xd5005
cmpq $0x0, 0xd0(%rsp)
je 0xd5003
leaq 0xb0(%rsp), %rax
movq %rsp, %rcx
movq %rcx, 0x10(%rax)
leaq 0xe0(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq 0x4a64ff(%rip), %rdi    # 0x57b4d0
movq 0xd0(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0xf6b0
leaq 0xb0(%rsp), %rax
movq 0x4a64db(%rip), %rdi    # 0x57b4d0
leaq 0x63a16(%rip), %rsi     # 0x138a12
movb $0x0, %al
callq 0xf730
jmp 0xd5005
addq $0xd8, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNBasics/RNError.cpp
// Function: gaps::RNWarning(char const*, ...)
void RNWarning(const char *fmt, ...)
{
    /* Check error level */
    if (RNerror_level > 0) return;

#if (0) && (RN_OS == RN_WINDOWS)
    /* Display error message */
    char outbuf[256];
    outbuf[0] = '\0';
    if (fmt) {
	char buf[256];
        va_list args;
        va_start(args, fmt);
        vsprintf(buf, fmt, args);
	strcat(outbuf, buf);
        va_end(args);
        strcat(outbuf, "\n");
    }
    MessageBox(NULL, outbuf, "GAPS WARNING", MB_OK);
#endif
    
    /* Print error message */
    if (RNerror_file) {
        // perror("GAPS WARNING");
        if (fmt) {
	    va_list args;
	    va_start(args, fmt);
	    vfprintf(RNerror_file, fmt, args);
	    va_end(args);
	    fprintf(RNerror_file, "\n");
	}
    }
}

// Assembly:
subq $0xd8, %rsp
testb %al, %al
je 0xd504c
movaps %xmm0, 0x30(%rsp)
movaps %xmm1, 0x40(%rsp)
movaps %xmm2, 0x50(%rsp)
movaps %xmm3, 0x60(%rsp)
movaps %xmm4, 0x70(%rsp)
movaps %xmm5, 0x80(%rsp)
movaps %xmm6, 0x90(%rsp)
movaps %xmm7, 0xa0(%rsp)
movq %r9, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, 0xd0(%rsp)
cmpl $0x0, 0x4a6464(%rip)    # 0x57b4d8
jle 0xd5078
jmp 0xd50f0
cmpq $0x0, 0x4a6450(%rip)    # 0x57b4d0
je 0xd50f0
cmpq $0x0, 0xd0(%rsp)
je 0xd50ee
leaq 0xb0(%rsp), %rax
movq %rsp, %rcx
movq %rcx, 0x10(%rax)
leaq 0xe0(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq 0x4a6414(%rip), %rdi    # 0x57b4d0
movq 0xd0(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0xf6b0
leaq 0xb0(%rsp), %rax
movq 0x4a63f0(%rip), %rdi    # 0x57b4d0
leaq 0x6392b(%rip), %rsi     # 0x138a12
movb $0x0, %al
callq 0xf730
jmp 0xd50f0
addq $0xd8, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/jpeg/jcapimin.c
// Function: jpeg_suppress_tables
GLOBAL(void)
jpeg_suppress_tables (j_compress_ptr cinfo, jboolean suppress)
{
  int i;
  JQUANT_TBL * qtbl;
  JHUFF_TBL * htbl;

  for (i = 0; i < NUM_QUANT_TBLS; i++) {
    if ((qtbl = cinfo->quant_tbl_ptrs[i]) != NULL)
      qtbl->sent_table = suppress;
  }

  for (i = 0; i < NUM_HUFF_TBLS; i++) {
    if ((htbl = cinfo->dc_huff_tbl_ptrs[i]) != NULL)
      htbl->sent_table = suppress;
    if ((htbl = cinfo->ac_huff_tbl_ptrs[i]) != NULL)
      htbl->sent_table = suppress;
  }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movl $0x0, -0x10(%rsp)
cmpl $0x4, -0x10(%rsp)
jge 0xd5350
movq -0x8(%rsp), %rax
movslq -0x10(%rsp), %rcx
movq 0x60(%rax,%rcx,8), %rax
movq %rax, -0x18(%rsp)
cmpq $0x0, %rax
je 0xd5341
movl -0xc(%rsp), %ecx
movq -0x18(%rsp), %rax
movl %ecx, 0x80(%rax)
jmp 0xd5343
movl -0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rsp)
jmp 0xd5311
movl $0x0, -0x10(%rsp)
cmpl $0x4, -0x10(%rsp)
jge 0xd53c6
movq -0x8(%rsp), %rax
movslq -0x10(%rsp), %rcx
movq 0x80(%rax,%rcx,8), %rax
movq %rax, -0x20(%rsp)
cmpq $0x0, %rax
je 0xd538b
movl -0xc(%rsp), %ecx
movq -0x20(%rsp), %rax
movl %ecx, 0x114(%rax)
movq -0x8(%rsp), %rax
movslq -0x10(%rsp), %rcx
movq 0xa0(%rax,%rcx,8), %rax
movq %rax, -0x20(%rsp)
cmpq $0x0, %rax
je 0xd53b7
movl -0xc(%rsp), %ecx
movq -0x20(%rsp), %rax
movl %ecx, 0x114(%rax)
jmp 0xd53b9
movl -0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rsp)
jmp 0xd5358
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/jpeg/jcapimin.c
// Function: jpeg_write_marker
GLOBAL(void)
jpeg_write_marker (j_compress_ptr cinfo, int marker,
		   const JOCTET *dataptr, unsigned int datalen)
{
  JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val));

  if (cinfo->next_scanline != 0 ||
      (cinfo->global_state != CSTATE_SCANNING &&
       cinfo->global_state != CSTATE_RAW_OK &&
       cinfo->global_state != CSTATE_WRCOEFS))
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);

  (*cinfo->marker->write_marker_header) (cinfo, marker, datalen);
  write_marker_byte = cinfo->marker->write_marker_byte;	/* copy for speed */
  while (datalen--) {
    (*write_marker_byte) (cinfo, *dataptr);
    dataptr++;
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movq 0x20(%rsp), %rax
cmpl $0x0, 0x130(%rax)
jne 0xd5615
movq 0x20(%rsp), %rax
cmpl $0x65, 0x24(%rax)
je 0xd5649
movq 0x20(%rsp), %rax
cmpl $0x66, 0x24(%rax)
je 0xd5649
movq 0x20(%rsp), %rax
cmpl $0x67, 0x24(%rax)
je 0xd5649
movq 0x20(%rsp), %rax
movq (%rax), %rax
movl $0x14, 0x28(%rax)
movq 0x20(%rsp), %rax
movl 0x24(%rax), %ecx
movq 0x20(%rsp), %rax
movq (%rax), %rax
movl %ecx, 0x2c(%rax)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rdi
callq *%rax
movq 0x20(%rsp), %rax
movq 0x1d0(%rax), %rax
movq 0x28(%rax), %rax
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl 0xc(%rsp), %edx
callq *%rax
movq 0x20(%rsp), %rax
movq 0x1d0(%rax), %rax
movq 0x30(%rax), %rax
movq %rax, (%rsp)
movl 0xc(%rsp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rsp)
cmpl $0x0, %eax
je 0xd56b1
movq (%rsp), %rax
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rcx
movzbl (%rcx), %esi
callq *%rax
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0xd567c
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/jpeg/jcapimin.c
// Function: jpeg_write_m_header
GLOBAL(void)
jpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen)
{
  if (cinfo->next_scanline != 0 ||
      (cinfo->global_state != CSTATE_SCANNING &&
       cinfo->global_state != CSTATE_RAW_OK &&
       cinfo->global_state != CSTATE_WRCOEFS))
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);

  (*cinfo->marker->write_marker_header) (cinfo, marker, datalen);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, 0x130(%rax)
jne 0xd5700
movq 0x10(%rsp), %rax
cmpl $0x65, 0x24(%rax)
je 0xd5734
movq 0x10(%rsp), %rax
cmpl $0x66, 0x24(%rax)
je 0xd5734
movq 0x10(%rsp), %rax
cmpl $0x67, 0x24(%rax)
je 0xd5734
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl $0x14, 0x28(%rax)
movq 0x10(%rsp), %rax
movl 0x24(%rax), %ecx
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl %ecx, 0x2c(%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rdi
callq *%rax
movq 0x10(%rsp), %rax
movq 0x1d0(%rax), %rax
movq 0x28(%rax), %rax
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
callq *%rax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/jpeg/jcapimin.c
// Function: jpeg_write_tables
GLOBAL(void)
jpeg_write_tables (j_compress_ptr cinfo)
{
  if (cinfo->global_state != CSTATE_START)
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);

  /* (Re)initialize error mgr and destination modules */
  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);
  (*cinfo->dest->init_destination) (cinfo);
  /* Initialize the marker writer ... bit of a crock to do it here. */
  jinit_marker_writer(cinfo);
  /* Write them tables! */
  (*cinfo->marker->write_tables_only) (cinfo);
  /* And clean up. */
  (*cinfo->dest->term_destination) (cinfo);
  /*
   * In library releases up through v6a, we called jpeg_abort() here to free
   * any working memory allocated by the destination manager and marker
   * writer.  Some applications had a problem with that: they allocated space
   * of their own from the library memory manager, and didn't want it to go
   * away during write_tables.  So now we do nothing.  This will cause a
   * memory leak if an app calls write_tables repeatedly without doing a full
   * compression cycle or otherwise resetting the JPEG object.  However, that
   * seems less bad than unexpectedly freeing memory in the normal case.
   * An app that prefers the old behavior can call jpeg_abort for itself after
   * each call to jpeg_write_tables().
   */
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rax
cmpl $0x64, 0x24(%rax)
je 0xd57ce
movq (%rsp), %rax
movq (%rax), %rax
movl $0x14, 0x28(%rax)
movq (%rsp), %rax
movl 0x24(%rax), %ecx
movq (%rsp), %rax
movq (%rax), %rax
movl %ecx, 0x2c(%rax)
movq (%rsp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rsp), %rdi
callq *%rax
movq (%rsp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movq (%rsp), %rdi
callq *%rax
movq (%rsp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rax
movq (%rsp), %rdi
callq *%rax
movq (%rsp), %rdi
callq 0xd8bf0
movq (%rsp), %rax
movq 0x1d0(%rax), %rax
movq 0x20(%rax), %rax
movq (%rsp), %rdi
callq *%rax
movq (%rsp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rax
movq (%rsp), %rdi
callq *%rax
popq %rax
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/jpeg/jcapistd.c
// Function: jpeg_start_compress
GLOBAL(void)
jpeg_start_compress (j_compress_ptr cinfo, jboolean write_all_tables)
{
  if (cinfo->global_state != CSTATE_START)
    ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);

  if (write_all_tables)
    jpeg_suppress_tables(cinfo, FALSE);	/* mark all tables to be written */

  /* (Re)initialize error mgr and destination modules */
  (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);
  (*cinfo->dest->init_destination) (cinfo);
  /* Perform master selection of active modules */
  jinit_compress_master(cinfo);
  /* Set up for the first pass */
  (*cinfo->master->prepare_for_pass) (cinfo);
  /* Ready for application to drive first pass through jpeg_write_scanlines
   * or jpeg_write_raw_data.
   */
  cinfo->next_scanline = 0;
  cinfo->global_state = (cinfo->raw_data_in ? CSTATE_RAW_OK : CSTATE_SCANNING);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x64, 0x24(%rax)
je 0xd587c
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl $0x14, 0x28(%rax)
movq 0x10(%rsp), %rax
movl 0x24(%rax), %ecx
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl %ecx, 0x2c(%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rdi
callq *%rax
cmpl $0x0, 0xc(%rsp)
je 0xd588f
movq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0xd5300
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movq 0x10(%rsp), %rdi
callq *%rax
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rdi
callq *%rax
movq 0x10(%rsp), %rdi
callq 0xd7260
movq 0x10(%rsp), %rax
movq 0x1b0(%rax), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rdi
callq *%rax
movq 0x10(%rsp), %rax
movl $0x0, 0x130(%rax)
movq 0x10(%rsp), %rax
movl 0x100(%rax), %edx
movl $0x65, %ecx
movl $0x66, %eax
cmpl $0x0, %edx
cmovnel %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x24(%rax)
addq $0x18, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/jpeg/jcparam.c
// Function: jpeg_default_colorspace
GLOBAL(void)
jpeg_default_colorspace (j_compress_ptr cinfo)
{
  switch (cinfo->in_color_space) {
  case JCS_GRAYSCALE:
    jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
    break;
  case JCS_RGB:
    jpeg_set_colorspace(cinfo, JCS_YCbCr);
    break;
  case JCS_YCbCr:
    jpeg_set_colorspace(cinfo, JCS_YCbCr);
    break;
  case JCS_CMYK:
    jpeg_set_colorspace(cinfo, JCS_CMYK); /* By default, no translation */
    break;
  case JCS_YCCK:
    jpeg_set_colorspace(cinfo, JCS_YCCK);
    break;
  case JCS_UNKNOWN:
    jpeg_set_colorspace(cinfo, JCS_UNKNOWN);
    break;
  default:
    ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
  }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl 0x3c(%rax), %eax
movq %rax, 0x8(%rsp)
subq $0x5, %rax
ja 0xd61f4
movq 0x8(%rsp), %rax
leaq 0x607b8(%rip), %rcx     # 0x136940
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0xd6220
jmp 0xd6215
movq 0x10(%rsp), %rdi
movl $0x3, %esi
callq 0xd6220
jmp 0xd6215
movq 0x10(%rsp), %rdi
movl $0x3, %esi
callq 0xd6220
jmp 0xd6215
movq 0x10(%rsp), %rdi
movl $0x4, %esi
callq 0xd6220
jmp 0xd6215
movq 0x10(%rsp), %rdi
movl $0x5, %esi
callq 0xd6220
jmp 0xd6215
movq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0xd6220
jmp 0xd6215
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl $0x9, 0x28(%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rdi
callq *%rax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/jpeg/jcparam.c
// Function: fill_dc_scans
LOCAL(jpeg_scan_info *)
fill_dc_scans (jpeg_scan_info * scanptr, int ncomps, int Ah, int Al)
/* Support routine: generate interleaved DC scan if possible, else N scans */
{
  int ci;

  if (ncomps <= MAX_COMPS_IN_SCAN) {
    /* Single interleaved DC scan */
    scanptr->comps_in_scan = ncomps;
    for (ci = 0; ci < ncomps; ci++)
      scanptr->component_index[ci] = ci;
    scanptr->Ss = scanptr->Se = 0;
    scanptr->Ah = Ah;
    scanptr->Al = Al;
    scanptr++;
  } else {
    /* Noninterleaved DC scan for each component */
    scanptr = fill_scans(scanptr, ncomps, 0, 0, Ah, Al);
  }
  return scanptr;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movl %ecx, 0x4(%rsp)
cmpl $0x4, 0xc(%rsp)
jg 0xd6dc2
movl 0xc(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
movl $0x0, (%rsp)
movl (%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0xd6d82
movl (%rsp), %edx
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
movl %edx, 0x4(%rax,%rcx,4)
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0xd6d5e
movq 0x10(%rsp), %rax
movl $0x0, 0x18(%rax)
movq 0x10(%rsp), %rax
movl $0x0, 0x14(%rax)
movl 0x8(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x1c(%rax)
movl 0x4(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x20(%rax)
movq 0x10(%rsp), %rax
addq $0x24, %rax
movq %rax, 0x10(%rsp)
jmp 0xd6de3
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %r8d
movl 0x4(%rsp), %r9d
xorl %ecx, %ecx
movl %ecx, %edx
callq 0xd6e70
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/jpeg/jcparam.c
// Function: fill_a_scan
LOCAL(jpeg_scan_info *)
fill_a_scan (jpeg_scan_info * scanptr, int ci,
	     int Ss, int Se, int Ah, int Al)
/* Support routine: generate one scan for specified component */
{
  scanptr->comps_in_scan = 1;
  scanptr->component_index[0] = ci;
  scanptr->Ss = Ss;
  scanptr->Se = Se;
  scanptr->Ah = Ah;
  scanptr->Al = Al;
  scanptr++;
  return scanptr;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movl %edx, -0x10(%rsp)
movl %ecx, -0x14(%rsp)
movl %r8d, -0x18(%rsp)
movl %r9d, -0x1c(%rsp)
movq -0x8(%rsp), %rax
movl $0x1, (%rax)
movl -0xc(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x4(%rax)
movl -0x10(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x14(%rax)
movl -0x14(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x1c(%rax)
movl -0x1c(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rsp), %rax
addq $0x24, %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/jpeg/jcparam.c
// Function: fill_scans
LOCAL(jpeg_scan_info *)
fill_scans (jpeg_scan_info * scanptr, int ncomps,
	    int Ss, int Se, int Ah, int Al)
/* Support routine: generate one scan for each component */
{
  int ci;

  for (ci = 0; ci < ncomps; ci++) {
    scanptr->comps_in_scan = 1;
    scanptr->component_index[0] = ci;
    scanptr->Ss = Ss;
    scanptr->Se = Se;
    scanptr->Ah = Ah;
    scanptr->Al = Al;
    scanptr++;
  }
  return scanptr;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movl %edx, -0x10(%rsp)
movl %ecx, -0x14(%rsp)
movl %r8d, -0x18(%rsp)
movl %r9d, -0x1c(%rsp)
movl $0x0, -0x20(%rsp)
movl -0x20(%rsp), %eax
cmpl -0xc(%rsp), %eax
jge 0xd6eff
movq -0x8(%rsp), %rax
movl $0x1, (%rax)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x4(%rax)
movl -0x10(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x14(%rax)
movl -0x14(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x18(%rax)
movl -0x18(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x1c(%rax)
movl -0x1c(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rsp), %rax
addq $0x24, %rax
movq %rax, -0x8(%rsp)
movl -0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rsp)
jmp 0xd6e93
movq -0x8(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/jpeg/jcparam.c
// Function: add_huff_table
LOCAL(void)
add_huff_table (j_compress_ptr cinfo,
		JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val)
/* Define a Huffman table */
{
  int nsymbols, len;

  if (*htblptr == NULL)
    *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo);

  /* Copy the number-of-symbols-of-each-code-length counts */
  MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits));

  /* Validate the counts.  We do this here mainly so we can copy the right
   * number of symbols from the val[] array, without risking marching off
   * the end of memory.  jchuff.c will do a more thorough test later.
   */
  nsymbols = 0;
  for (len = 1; len <= 16; len++)
    nsymbols += bits[len];
  if (nsymbols < 1 || nsymbols > 256)
    ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);

  MEMCOPY((*htblptr)->huffval, val, nsymbols * SIZEOF(UINT8));

  /* Initialize sent_table FALSE so table will be written to JPEG file. */
  (*htblptr)->sent_table = FALSE;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq 0x18(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xd6f48
movq 0x20(%rsp), %rdi
callq 0xf92c0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movb 0x10(%rcx), %cl
movb %cl, 0x10(%rax)
movl $0x0, 0x4(%rsp)
movl $0x1, (%rsp)
cmpl $0x10, (%rsp)
jg 0xd6f9e
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
movzbl (%rax,%rcx), %eax
addl 0x4(%rsp), %eax
movl %eax, 0x4(%rsp)
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0xd6f78
cmpl $0x1, 0x4(%rsp)
jl 0xd6faf
cmpl $0x100, 0x4(%rsp)       # imm = 0x100
jle 0xd6fd0
movq 0x20(%rsp), %rax
movq (%rax), %rax
movl $0x8, 0x28(%rax)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rdi
callq *%rax
movq 0x18(%rsp), %rax
movq (%rax), %rdi
addq $0x11, %rdi
movq 0x8(%rsp), %rsi
movslq 0x4(%rsp), %rdx
shlq $0x0, %rdx
callq 0xf3d0
movq 0x18(%rsp), %rax
movq (%rax), %rax
movl $0x0, 0x114(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/jpeg/jdatadst.c
// Function: jpeg_stdio_dest
GLOBAL(void)
jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile)
{
  my_dest_ptr dest;

  /* The destination object is made permanent so that multiple JPEG images
   * can be written to the same file without re-executing jpeg_stdio_dest.
   * This makes it dangerous to use this manager and a different destination
   * manager serially with the same JPEG object, because their private object
   * sizes may be different.  Caveat programmer.
   */
  if (cinfo->dest == NULL) {	/* first time for this JPEG object? */
    cinfo->dest = (struct jpeg_destination_mgr *)
      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
				  SIZEOF(my_destination_mgr));
  }

  dest = (my_dest_ptr) cinfo->dest;
  dest->pub.init_destination = init_destination;
  dest->pub.empty_output_buffer = empty_output_buffer;
  dest->pub.term_destination = term_destination;
  dest->outfile = outfile;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0xd7050
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq *%rax
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
leaq 0x38(%rip), %rcx        # 0xd70a0
movq %rcx, 0x10(%rax)
movq (%rsp), %rax
leaq 0x99(%rip), %rcx        # 0xd7110
movq %rcx, 0x18(%rax)
movq (%rsp), %rax
leaq 0x11a(%rip), %rcx       # 0xd71a0
movq %rcx, 0x20(%rax)
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x28(%rax)
addq $0x18, %rsp
retq
nopl (%rax)