LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Cont.cpp
// Function: gaps::R2Contains(gaps::R2Circle const&, gaps::R2Box const&)
RNBoolean R2Contains(const R2Circle& circle, const R2Box& box)
{
    // Return whether circle contains box 
    R2Vector v = box.Centroid() - circle.Center();
    R2Point corner = box.Corner(v.Quadrant());
    return R2Contains(circle, corner);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x66416
leaq 0x8(%r14), %r12
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6906b
movq %r13, %rdi
callq 0x692cc
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x662b6
movsd 0x18(%r14), %xmm0
mulsd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x6906b
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
subsd 0x8(%rsp), %xmm0
leaq 0x8d319(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
setae %al
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Cont.cpp
// Function: gaps::R2Contains(gaps::R2Polygon const&, gaps::R2Point const&)
RNBoolean R2Contains(const R2Polygon& polygon, const R2Point& point)
{
    // Return whether polygon contains point
    int ncrossings = 0;
    R2Ray ray(point, R2Vector(0.12345, 0.9923508));
    for (int i = 0; i < polygon.NPoints(); i++) {
        const R2Point& p0 = polygon.Point(i);
        const R2Point& p1 = polygon.Point((i+1)%polygon.NPoints());
        if (R2Intersects(ray, R2Span(p0, p1))) ncrossings++;
    }

    // Check odd-crossing rule
    return (ncrossings % 2) ? TRUE : FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r15
movsd 0x509b9(%rip), %xmm0    # 0xa92d0
movsd 0x509b9(%rip), %xmm1    # 0xa92d8
movq %r15, %rdi
callq 0x6915a
movq %rsp, %rdi
xorl %ebp, %ebp
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x68680
movl 0x10(%rbx), %ecx
testl %ecx, %ecx
jle 0x58998
xorl %r13d, %r13d
leaq 0x38(%rsp), %r14
movq %rsp, %r15
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x8(%rbx), %rdi
leaq (%rdi,%r13), %rsi
incq %r12
movl %r12d, %eax
cltd
idivl %ecx
shlq $0x4, %rdx
addq %rdi, %rdx
movq %r14, %rdi
callq 0x67dde
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x59088
cmpl $0x1, %eax
sbbl $-0x1, %ebp
movslq 0x10(%rbx), %rcx
addq $0x10, %r13
cmpq %rcx, %r12
jl 0x58950
andl $0x1, %ebp
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Cont.cpp
// Function: gaps::R2Contains(gaps::R2Polygon const&, gaps::R2Span const&)
RNBoolean R2Contains(const R2Polygon& polygon, const R2Span& span)
{
    // Return whether polygon contains span (this is not right, because polygon can be concave)
    if (!R2Contains(polygon, span.Start())) return FALSE;
    if (!R2Contains(polygon, span.End())) return FALSE;
    return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x28, %rsi
callq 0x588f3
testl %eax, %eax
je 0x58a03
addq $0x38, %rbx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x588f3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Isect.cpp
// Function: gaps::R2Intersects(gaps::R2Point const&, gaps::R2Span const&, double*)
RNClassID R2Intersects(const R2Point& point, const R2Span& span, RNScalar *hit_t)
{
    // Check if span contains point
    if (R2Contains(span, point)) {
	// Point lies on span
	if (hit_t) *hit_t = span.T(point);
	return R2_POINT_CLASS_ID;
    }
    else {
	// Point is not on span
	return RN_NULL_CLASS_ID;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x57fa0
testl %eax, %eax
je 0x58bb6
movl $0x1, %ebp
testq %rbx, %rbx
je 0x58bb8
movq %r15, %rdi
movq %r14, %rsi
callq 0x68736
movsd %xmm0, (%rbx)
jmp 0x58bb8
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Isect.cpp
// Function: gaps::R2Intersects(gaps::R2Line const&, gaps::R2Ray const&, gaps::R2Point*, double*)
RNClassID R2Intersects(const R2Line& line, const R2Ray& ray, 
    R2Point *hit_point, RNScalar *hit_t)
{
    // Get variables in more convenient form
    const R2Vector& n1 = line.Normal();
    const RNScalar c1 = line.C();
    const R2Vector p2 = ray.Start().Vector();
    const R2Vector& v2 = ray.Vector();

    // Check if line and ray are parallel
    RNScalar denom = n1.Dot(v2);
    if (RNIsZero(denom)) {
	// Check if line and ray are coincident
	if (R2Contains(line, ray.Start())) {
	    // Line and ray are coincident
	    return R2_RAY_CLASS_ID;
	}
	else {
	    // Lines are parallel and do not intersect
	    return RN_NULL_CLASS_ID;
	}
    }
    else {
	// Find parametric value on ray of intersection point between lines
        RNScalar t = (c1 + n1.Dot(p2)) / -denom;

	// Check if intersection point is on ray
	if (RNIsPositiveOrZero(t)) {
	    if (hit_point) *hit_point = ray.Point(t);
	    if (hit_t) *hit_t = t;
	    return R2_POINT_CLASS_ID;
	}
	else {
	    // Line and ray do not intersect
	    return RN_NULL_CLASS_ID;
	}
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x10(%rdi), %r13
movsd 0x20(%rdi), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x28(%rsi), %xmm0
movsd 0x30(%rsi), %xmm1
leaq 0x28(%rsp), %rdi
callq 0x6915a
movq %r13, %rdi
movq %r15, %rsi
callq 0x692f6
leaq 0x8ce54(%rip), %rbp     # 0xe5b98
movsd (%rbp), %xmm2
movapd 0x492cf(%rip), %xmm1    # 0xa2020
xorpd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x58d7f
ucomisd %xmm0, %xmm2
jb 0x58d7f
addq $0x28, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x57b97
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal (%rcx,%rcx,2), %eax
jmp 0x58e01
leaq 0x28(%rsp), %rsi
movq %r13, %rdi
movapd %xmm0, 0x10(%rsp)
callq 0x692f6
movsd 0x8(%rsp), %xmm2
addsd %xmm0, %xmm2
movapd 0x4927c(%rip), %xmm0    # 0xa2020
movapd 0x10(%rsp), %xmm1
xorpd %xmm0, %xmm1
divsd %xmm1, %xmm2
movsd (%rbp), %xmm1
xorpd %xmm0, %xmm1
xorl %eax, %eax
ucomisd %xmm1, %xmm2
jb 0x58e01
testq %r14, %r14
je 0x58df3
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movapd %xmm2, %xmm0
movsd %xmm2, 0x8(%rsp)
callq 0x68700
movq %r14, %rdi
movq %r12, %rsi
callq 0x68f66
movsd 0x8(%rsp), %xmm2
movl $0x1, %eax
testq %rbx, %rbx
je 0x58e01
movsd %xmm2, (%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Isect.cpp
// Function: gaps::R2Intersects(gaps::R2Line const&, gaps::R2Span const&, gaps::R2Point*, double*)
RNClassID R2Intersects(const R2Line& line, const R2Span& span, 
    R2Point *hit_point, RNScalar *hit_t)
{
    // Intersect line with span's ray
    RNScalar s;
    switch (R2Intersects(line, span.Ray(), hit_point, &s)) {
    case RN_NULL_CLASS_ID:
	// Span and line do not intersect
	return RN_NULL_CLASS_ID;

    case R2_RAY_CLASS_ID:
	// Line contains span
	return R2_SPAN_CLASS_ID;

    case R2_POINT_CLASS_ID: 
	// Check if intersection point is on span
	if (RNIsGreater(s, span.Length())) {
	    // Span's ray intersects line beyond span endpoint
	    return RN_NULL_CLASS_ID;
	}
	else {
	    // Span and line intersect at point
	    if (hit_t) *hit_t = s;
	    return R2_POINT_CLASS_ID;
	}
	break;

    default:
	RNAbort("Illegal intersection");
	break;
    }

    // Should never get here
    RNAbort("Should never get here");
    return RN_NULL_CLASS_ID;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rsi, %r15
leaq 0x8(%rsp), %rcx
callq 0x58cf5
movl %eax, %ebx
movl %eax, %eax
leaq 0x504ac(%rip), %rcx     # 0xa92e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd 0x8(%rsp), %xmm0
leaq 0x8cd4e(%rip), %rax     # 0xe5b98
movapd %xmm0, %xmm1
subsd 0x48(%r15), %xmm1
xorl %ebx, %ebx
ucomisd (%rax), %xmm1
ja 0x58e92
movl $0x1, %ebx
testq %r14, %r14
je 0x58e92
movsd %xmm0, (%r14)
jmp 0x58e92
leaq 0x50158(%rip), %rdi     # 0xa8fcc
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x72942
leaq 0x5015d(%rip), %rdi     # 0xa8fe1
xorl %eax, %eax
callq 0x72942
jmp 0x58e92
movl $0x4, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Isect.cpp
// Function: gaps::R2Intersects(gaps::R2Ray const&, gaps::R2Span const&, gaps::R2Point*, double*, double*)
RNClassID R2Intersects(const R2Ray& ray, const R2Span& span, 
    R2Point *hit_point, RNScalar *hit_tray, RNScalar *hit_tspan)
{
    // Intersect ray with span's ray
    RNScalar s;
    switch (R2Intersects(ray, span.Ray(), hit_point, hit_tray, &s)) {
    case RN_NULL_CLASS_ID:
	// Span and ray do not intersect
	return RN_NULL_CLASS_ID;

    case R2_RAY_CLASS_ID:
	// Ray contains span
	return R2_SPAN_CLASS_ID;

    case R2_POINT_CLASS_ID: 
	// Check if intersection point is on span
	if (RNIsGreater(s, span.Length())) {
	    // Span's ray intersects ray beyond span endpoint
	    return RN_NULL_CLASS_ID;
	}
	else {
	    // Span and ray intersect at point
	    if (hit_tspan) *hit_tspan = s;
	    return R2_POINT_CLASS_ID;
	}
	break;

    default:
	RNAbort("Illegal intersection");
	break;
    }

    // Should never get here
    RNAbort("Should never get here");
    return RN_NULL_CLASS_ID;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r8, %r14
movq %rsi, %r15
leaq 0x8(%rsp), %r8
callq 0x58ed7
movl %eax, %ebx
testl %eax, %eax
je 0x59106
cmpl $0x1, %ebx
je 0x590b8
cmpl $0x3, %ebx
jne 0x590e8
movl $0x4, %ebx
jmp 0x59106
movsd 0x8(%rsp), %xmm0
leaq 0x8cad3(%rip), %rax     # 0xe5b98
movapd %xmm0, %xmm1
subsd 0x48(%r15), %xmm1
xorl %ebx, %ebx
ucomisd (%rax), %xmm1
ja 0x59106
movl $0x1, %ebx
testq %r14, %r14
je 0x59106
movsd %xmm0, (%r14)
jmp 0x59106
leaq 0x4fedd(%rip), %rdi     # 0xa8fcc
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x72942
leaq 0x4fee2(%rip), %rdi     # 0xa8fe1
xorl %eax, %eax
callq 0x72942
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Isect.cpp
// Function: gaps::R2Intersects(gaps::R2Span const&, gaps::R2Span const&, gaps::R2Point*, double*, double*)
RNClassID R2Intersects(const R2Span& span1, const R2Span& span2, 
    R2Point *hit_point, RNScalar *hit_t1, RNScalar *hit_t2)
{
    // Intersect span1 with span2's ray
    RNScalar s1, s2;
    switch (R2Intersects(span1, span2.Ray(), hit_point, &s1, &s2)) {
    case RN_NULL_CLASS_ID:
	// Spans do not intersect
	return RN_NULL_CLASS_ID;

    case R2_SPAN_CLASS_ID:
	// Span1 lies on span2's ray -- check if they overlap ???
	if ((R2Contains(span2, span1.Start())) || (R2Contains(span2, span1.End()))) {
	    // Spans are on same line, and overlap
	    return R2_SPAN_CLASS_ID;
	}
	else {
	    // Spans are on same line, but do not overlap
	    return RN_NULL_CLASS_ID;
	}
	break;

    case R2_POINT_CLASS_ID: 
	// Check if intersection point is on span
	if (RNIsGreater(s1, span1.Length())) {
	    // Span's ray intersects plane beyond span endpoint
	    return RN_NULL_CLASS_ID;
	}
	else {
	    // Spans intersect at point
	    if (hit_t1) *hit_t1 = s1;
	    if (hit_t2) *hit_t2 = s2;
	    return R2_POINT_CLASS_ID;
	}
	break;

    default:
	RNAbort("Illegal intersection");
	break;
    }

    // Should never get here
    RNAbort("Should never get here");
    return RN_NULL_CLASS_ID;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r15
movq %rcx, %r13
movq %rsi, %r12
movq %rdi, %r14
movq %rsp, %rcx
leaq 0x8(%rsp), %r8
movq %rsi, %rdi
movq %r14, %rsi
callq 0x59088
movl %eax, %ebx
testl %eax, %eax
je 0x5972c
cmpl $0x1, %ebx
je 0x596ce
cmpl $0x4, %ebx
jne 0x5970e
leaq 0x28(%r14), %rsi
movq %r12, %rdi
callq 0x57fa0
movl $0x4, %ebx
testl %eax, %eax
jne 0x5972c
addq $0x38, %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x57fa0
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
shll $0x2, %ebx
jmp 0x5972c
movsd 0x8(%rsp), %xmm0
leaq 0x8c4bd(%rip), %rax     # 0xe5b98
movapd %xmm0, %xmm1
subsd 0x48(%r14), %xmm1
xorl %ebx, %ebx
ucomisd (%rax), %xmm1
ja 0x5972c
testq %r13, %r13
je 0x596f8
movsd %xmm0, (%r13)
movl $0x1, %ebx
testq %r15, %r15
je 0x5972c
movsd (%rsp), %xmm0
movsd %xmm0, (%r15)
jmp 0x5972c
leaq 0x4f8b7(%rip), %rdi     # 0xa8fcc
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x72942
leaq 0x4f8bc(%rip), %rdi     # 0xa8fe1
xorl %eax, %eax
callq 0x72942
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Isect.cpp
// Function: gaps::R2Intersects(gaps::R2Span const&, gaps::R2Box const&, gaps::R2Point*, double*)
RNClassID R2Intersects(const R2Span& span, const R2Box& box, 
    R2Point *hit_point, RNScalar *hit_t)
{
    // Intersect box with span's ray
    RNScalar s;
    switch (R2Intersects(box, span.Ray(), hit_point, NULL, &s)) {
    case RN_NULL_CLASS_ID:
	// Span and box do not intersect
	return RN_NULL_CLASS_ID;

    case R2_SPAN_CLASS_ID:
	// Box contains span
        if (RNIsGreater(s, span.Length()))
            return RN_NULL_CLASS_ID;
        else
            return R2_SPAN_CLASS_ID;

    case R2_POINT_CLASS_ID: 
	// Check if intersection point is on span
	if (RNIsGreater(s, span.Length())) {
	    // Span's ray intersects box beyond span endpoint
	    return RN_NULL_CLASS_ID;
	}
	else {
	    // Span and box intersect at point
	    if (hit_t) *hit_t = s;
	    return R2_POINT_CLASS_ID;
	}
	break;

    default:
	RNAbort("Illegal intersection");
	break;
    }

    // Should never get here
    RNAbort("Should never get here");
    return RN_NULL_CLASS_ID;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %r8
xorl %ecx, %ecx
callq 0x59125
movl %eax, %ebx
testl %eax, %eax
je 0x597e9
cmpl $0x1, %ebx
je 0x5979b
cmpl $0x4, %ebx
jne 0x597cb
movsd 0x8(%rsp), %xmm0
leaq 0x8c411(%rip), %rax     # 0xe5b98
subsd 0x48(%r15), %xmm0
xorl %ebx, %ebx
ucomisd (%rax), %xmm0
setbe %bl
shll $0x2, %ebx
jmp 0x597e9
movsd 0x8(%rsp), %xmm0
leaq 0x8c3f0(%rip), %rax     # 0xe5b98
movapd %xmm0, %xmm1
subsd 0x48(%r15), %xmm1
xorl %ebx, %ebx
ucomisd (%rax), %xmm1
ja 0x597e9
movl $0x1, %ebx
testq %r14, %r14
je 0x597e9
movsd %xmm0, (%r14)
jmp 0x597e9
leaq 0x4f7fa(%rip), %rdi     # 0xa8fcc
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x72942
leaq 0x4f7ff(%rip), %rdi     # 0xa8fe1
xorl %eax, %eax
callq 0x72942
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Isect.cpp
// Function: gaps::R2Intersects(gaps::R2Span const&, gaps::R2Circle const&, gaps::R2Point*, double*)
RNClassID R2Intersects(const R2Span& span, const R2Circle& circle, 
    R2Point *hit_point, RNScalar *hit_t)
{
    // Intersect circle with span's ray
    RNScalar s;
    switch (R2Intersects(circle, span.Ray(), hit_point, NULL, &s)) {
    case RN_NULL_CLASS_ID:
	// Span and circle do not intersect
	return RN_NULL_CLASS_ID;

    case R2_SPAN_CLASS_ID:
	// Circle contains span
	return R2_SPAN_CLASS_ID;

    case R2_POINT_CLASS_ID: 
	// Check if intersection point is on span
	if (RNIsGreater(s, span.Length())) {
	    // Span's ray intersects circle beyond span endpoint
	    return RN_NULL_CLASS_ID;
	}
	else {
	    // Span and circle intersect at point
	    if (hit_t) *hit_t = s;
	    return R2_POINT_CLASS_ID;
	}
	break;

    default:
	RNAbort("Illegal intersection");
	break;
    }

    // Should never get here
    RNAbort("Should never get here");
    return RN_NULL_CLASS_ID;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r8
xorl %ecx, %ecx
callq 0x593d8
movl %eax, %ebp
testl %eax, %eax
je 0x5986c
cmpl $0x4, %ebp
je 0x5986c
cmpl $0x1, %ebp
jne 0x5984e
movsd 0x8(%rsp), %xmm0
leaq 0x8c36c(%rip), %rax     # 0xe5b98
movapd %xmm0, %xmm1
subsd 0x48(%r14), %xmm1
xorl %ebp, %ebp
ucomisd (%rax), %xmm1
ja 0x5986c
movl $0x1, %ebp
testq %rbx, %rbx
je 0x5986c
movsd %xmm0, (%rbx)
jmp 0x5986c
leaq 0x4f777(%rip), %rdi     # 0xa8fcc
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x72942
leaq 0x4f77c(%rip), %rdi     # 0xa8fe1
xorl %eax, %eax
callq 0x72942
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Isect.cpp
// Function: gaps::R2Intersects(gaps::R2Halfspace const&, gaps::R2Halfspace const&)
RNClassID R2Intersects(const R2Halfspace& halfspace1, const R2Halfspace& halfspace2)
{
    // Check halfspace directions
    if (R2Contains(halfspace1.Normal(), -(halfspace2.Normal()))) {
	// Halfspace normals point in opposite directions
	return R2Intersects(halfspace1, halfspace2.Line().Point());
    }
    else { 
	// Halfspaces are not anti-parallel -- they must intersect
	return RN_UNKNOWN_CLASS_ID;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
leaq 0x10(%rsi), %r14
movq %rsp, %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x69669
movq %r12, %rdi
movq %r13, %rsi
callq 0x57988
testl %eax, %eax
je 0x598f7
movsd 0x20(%r15), %xmm0
xorps 0x48764(%rip), %xmm0    # 0xa2020
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x694f6
leaq 0x48e9af(%rip), %rsi    # 0x4e8280
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %r15, %rdx
callq 0x69057
movq %rbx, %rdi
movq %r14, %rsi
callq 0x58118
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x598fc
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Isect.cpp
// Function: gaps::R2Intersects(gaps::R2Halfspace const&, gaps::R2Circle const&)
RNClassID R2Intersects(const R2Halfspace& halfspace, const R2Circle& circle)
{
    // Return whether circle intersects halfspace
    RNScalar d = R2SignedDistance(halfspace.Line(), circle.Center());
    if (RNIsLess(d, -(circle.Radius()))) return RN_NULL_CLASS_ID;
    else if (RNIsEqual(d, -(circle.Radius()))) return R2_POINT_CLASS_ID;
    else return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
addq $0x8, %rsi
callq 0x6d501
leaq 0x8c235(%rip), %rax     # 0xe5b98
addsd 0x18(%rbx), %xmm0
movsd (%rax), %xmm1
movapd 0x486ac(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
movapd %xmm0, %xmm3
cmpnlepd %xmm1, %xmm3
movapd %xmm2, %xmm1
cmpnlepd %xmm0, %xmm1
orpd %xmm3, %xmm1
movd %xmm1, %ecx
orl $0x1, %ecx
xorl %eax, %eax
ucomisd %xmm0, %xmm2
cmovbel %ecx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Isect.cpp
// Function: gaps::R2Intersects(gaps::R2Box const&, gaps::R2Box const&, gaps::R2Box*)
RNClassID R2Intersects(const R2Point& point, const R2Circle& circle)
{
    // Check whether circle contains point
    if (R2Contains(circle, point)) {
	// Point lies in circle
	return R2_POINT_CLASS_ID;
    }
    else {
	// Point does not lie in circle
	return RN_NULL_CLASS_ID;
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movsd 0x8(%rdi), %xmm4
movsd 0x18(%rsi), %xmm2
leaq 0x8c1e0(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm6
movapd %xmm4, %xmm0
subsd %xmm2, %xmm0
xorl %ebx, %ebx
ucomisd %xmm6, %xmm0
ja 0x59a6d
movsd 0x10(%rdi), %xmm5
movsd 0x20(%rsi), %xmm3
movapd %xmm5, %xmm0
subsd %xmm3, %xmm0
ucomisd %xmm6, %xmm0
ja 0x59a6d
movsd 0x8(%rsi), %xmm0
movsd 0x18(%rdi), %xmm7
movapd %xmm0, %xmm1
subsd %xmm7, %xmm1
ucomisd %xmm6, %xmm1
ja 0x59a6d
movsd 0x10(%rsi), %xmm1
movsd 0x20(%rdi), %xmm8
movapd %xmm1, %xmm9
subsd %xmm8, %xmm9
ucomisd %xmm6, %xmm9
ja 0x59a6d
movq %rdx, %r14
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x59a6d
maxsd %xmm4, %xmm0
maxsd %xmm5, %xmm1
minsd %xmm7, %xmm2
minsd %xmm8, %xmm3
movq %rsp, %rdi
callq 0x6611c
leaq 0x8(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0x68f66
addq $0x18, %r14
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x68f66
movq %rsp, %rdi
callq 0x6699c
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6699c
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Isect.cpp
// Function: gaps::R2Intersects(gaps::R2Circle const&, gaps::R2Circle const&)
RNClassID R2Intersects(const R2Circle& circle1, const R2Circle& circle2)
{
    // Return whether circle intersects circle
    R2Vector v = circle1.Center() - circle2.Center();
    RNScalar distance_squared = v.X() * v.X() + v.Y() * v.Y();
    RNScalar radius_sum = circle1.Radius() + circle2.Radius();
    RNScalar radius_sum_squared = radius_sum * radius_sum;
    if (RNIsGreater(distance_squared, radius_sum_squared)) return RN_NULL_CLASS_ID;
    else if (RNIsEqual(distance_squared, radius_sum_squared)) return R2_POINT_CLASS_ID;
    else return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %rsi
leaq 0x8(%rbx), %rdx
movq %rsp, %r15
movq %r15, %rdi
callq 0x6906b
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
movsd 0x18(%r14), %xmm2
addsd 0x18(%rbx), %xmm2
addsd %xmm1, %xmm0
mulsd %xmm2, %xmm2
leaq 0x8c08b(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
subsd %xmm2, %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
ja 0x59b3e
movapd %xmm0, %xmm2
cmpnlepd %xmm1, %xmm2
xorpd 0x484f2(%rip), %xmm1    # 0xa2020
cmpnlepd %xmm0, %xmm1
orpd %xmm2, %xmm1
movd %xmm1, %eax
orl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::R2Grid(int, int)
R2Grid::
R2Grid(int xresolution, int yresolution)
{
  // Set grid resolution
  grid_resolution[0] = xresolution;
  grid_resolution[1] = yresolution;
  grid_row_size = xresolution;
  grid_size = grid_row_size * yresolution;

  // Allocate grid values
  if (grid_size == 0) grid_values = NULL;
  else grid_values = new RNScalar [ grid_size ];
  assert(!grid_size || grid_values);

  // Set all values to zero
  for (int i = 0; i < grid_size; i++) grid_values[i] = 0;

  // Set transformations
  grid_to_world_transform = R2identity_affine;
  world_to_grid_transform = R2identity_affine;
  world_to_grid_scale_factor = 1.0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
callq 0x669b0
leaq 0x58(%rbx), %r14
movq %r14, %rdi
callq 0x669b0
movl %r15d, 0xc0(%rbx)
movl %ebp, 0xc4(%rbx)
movl %r15d, 0xc8(%rbx)
imull %r15d, %ebp
movl %ebp, 0xcc(%rbx)
testl %ebp, %ebp
je 0x59c52
movslq %ebp, %rax
shlq $0x3, %rax
testl %ebp, %ebp
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0xe030
jmp 0x59c54
xorl %eax, %eax
movq %rax, 0xb8(%rbx)
testl %ebp, %ebp
jle 0x59c73
movq 0xb8(%rbx), %rdi
movl %ebp, %edx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0xe260
leaq 0x8(%rbx), %rdi
leaq 0x48e2da(%rip), %r12    # 0x4e7f58
leaq 0x8(%r12), %r15
movq %r15, %rsi
callq 0x67944
movl 0x50(%r12), %eax
movl %eax, 0x50(%rbx)
leaq 0x60(%rbx), %rdi
movq %r15, %rsi
callq 0x67944
movl 0x50(%r12), %eax
movl %eax, 0xa8(%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0xb0(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x59cd4
movq %rax, %r15
movq %r14, %rdi
callq 0x66ce4
movq %rbx, %rdi
callq 0x66ce4
movq %r15, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::R2Grid(int, int, gaps::R2Box const&)
R2Grid::
R2Grid(int xresolution, int yresolution, const R2Box& bbox)
{
  // Set grid resolution
  grid_resolution[0] = xresolution;
  grid_resolution[1] = yresolution;
  grid_row_size = xresolution;
  grid_size = grid_row_size * yresolution;

  // Allocate grid values
  if (grid_size == 0) grid_values = NULL;
  else grid_values = new RNScalar [ grid_size ];
  assert(!grid_size || grid_values);

  // Set all values to zero
  for (int i = 0; i < grid_size; i++) grid_values[i] = 0;

  // Set transformation
  SetWorldToGridTransformation(bbox);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %rbx
callq 0x669b0
leaq 0x58(%rbx), %r14
movq %r14, %rdi
callq 0x669b0
movl %r12d, 0xc0(%rbx)
movl %ebp, 0xc4(%rbx)
movl %r12d, 0xc8(%rbx)
imull %r12d, %ebp
movl %ebp, 0xcc(%rbx)
testl %ebp, %ebp
je 0x59d45
movslq %ebp, %rax
shlq $0x3, %rax
testl %ebp, %ebp
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0xe030
jmp 0x59d47
xorl %eax, %eax
movq %rax, 0xb8(%rbx)
testl %ebp, %ebp
jle 0x59d66
movq 0xb8(%rbx), %rdi
movl %ebp, %edx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0xe260
movq %rbx, %rdi
movq %r15, %rsi
callq 0x59d9a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x59d8a
movq %rax, %r15
movq %r14, %rdi
callq 0x66ce4
movq %rbx, %rdi
callq 0x66ce4
movq %r15, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::R2Grid(int, int, gaps::R2Affine const&)
R2Grid::
R2Grid(int xresolution, int yresolution, const R2Affine& world_to_grid)
{
  // Set grid resolution
  grid_resolution[0] = xresolution;
  grid_resolution[1] = yresolution;
  grid_row_size = xresolution;
  grid_size = grid_row_size * yresolution;

  // Allocate grid values
  if (grid_size == 0) grid_values = NULL;
  else grid_values = new RNScalar [ grid_size ];
  assert(!grid_size || grid_values);

  // Set all values to zero
  for (int i = 0; i < grid_size; i++) grid_values[i] = 0;

  // Set transformation
  SetWorldToGridTransformation(world_to_grid);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %rbx
callq 0x669b0
leaq 0x58(%rbx), %r14
movq %r14, %rdi
callq 0x669b0
movl %r12d, 0xc0(%rbx)
movl %ebp, 0xc4(%rbx)
movl %r12d, 0xc8(%rbx)
imull %r12d, %ebp
movl %ebp, 0xcc(%rbx)
testl %ebp, %ebp
je 0x5a00b
movslq %ebp, %rax
shlq $0x3, %rax
testl %ebp, %ebp
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0xe030
jmp 0x5a00d
xorl %eax, %eax
movq %rax, 0xb8(%rbx)
testl %ebp, %ebp
jle 0x5a02c
movq 0xb8(%rbx), %rdi
movl %ebp, %edx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0xe260
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5a060
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x5a050
movq %rax, %r15
movq %r14, %rdi
callq 0x66ce4
movq %rbx, %rdi
callq 0x66ce4
movq %r15, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::SetWorldToGridTransformation(gaps::R2Affine const&)
void R2Grid::
SetWorldToGridTransformation(const R2Affine& affine)
{
  // Set transformations
  world_to_grid_transform = affine;
  grid_to_world_transform = affine.Inverse();
  world_to_grid_scale_factor = affine.ScaleFactor();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x60, %rdi
leaq 0x8(%rsi), %r15
movq %r15, %rsi
callq 0x67944
movl 0x50(%r14), %eax
movl %eax, 0xa8(%rbx)
leaq 0x60(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x672d4
movl 0x50(%r14), %edx
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x669e6
leaq 0x8(%rbx), %rdi
leaq 0x10(%rsp), %rsi
callq 0x67944
leaq 0x8(%rsp), %rdi
movl 0x50(%rdi), %eax
movl %eax, 0x50(%rbx)
callq 0x66ce4
movq %r14, %rdi
callq 0x66a2e
movsd %xmm0, 0xb0(%rbx)
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x66ce4
movq %rbx, %rdi
callq 0xe7e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::operator=(gaps::R2Grid const&)
R2Grid& R2Grid::
operator=(const R2Grid& grid) 
{
  // Copy grid resolution
  grid_resolution[0] = grid.grid_resolution[0];
  grid_resolution[1] = grid.grid_resolution[1];
  grid_row_size = grid.grid_row_size;
  grid_size = grid.grid_size;

  // Copy grid values
  if (grid_values) delete [] grid_values;
  if (grid_size == 0) grid_values = NULL;
  else grid_values = new RNScalar [ grid_size ];
  assert(!grid_size || grid_values);
  for (int i = 0; i < grid_size; i++) {
    grid_values[i] = grid.grid_values[i];
  }

  // Copy transforms
  grid_to_world_transform = grid.grid_to_world_transform;
  world_to_grid_transform = grid.world_to_grid_transform;
  world_to_grid_scale_factor = grid.world_to_grid_scale_factor;

  // Return this
  return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc0(%rsi), %eax
movl %eax, 0xc0(%rdi)
movl 0xc4(%rsi), %eax
movl %eax, 0xc4(%rdi)
movq 0xc8(%rsi), %rax
movq %rax, 0xc8(%rdi)
movq 0xb8(%rdi), %rdi
testq %rdi, %rdi
je 0x5a5a2
callq 0xe5b0
movslq 0xcc(%rbx), %r15
testq %r15, %r15
je 0x5a5cb
leaq (,%r15,8), %rax
testl %r15d, %r15d
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0xe030
jmp 0x5a5cd
xorl %eax, %eax
movq %rax, 0xb8(%rbx)
testl %r15d, %r15d
jle 0x5a5f4
movq 0xb8(%r14), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0x5a5e2
leaq 0x8(%rbx), %rdi
leaq 0x8(%r14), %rsi
callq 0x67944
movl 0x50(%r14), %eax
movl %eax, 0x50(%rbx)
leaq 0x60(%rbx), %rdi
leaq 0x60(%r14), %rsi
callq 0x67944
movl 0xa8(%r14), %eax
movl %eax, 0xa8(%rbx)
movsd 0xb0(%r14), %xmm0
movsd %xmm0, 0xb0(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::R2Grid(gaps::R2Image const&, int)
R2Grid::
R2Grid(const R2Image& image, int dummy)
  : grid_values(NULL)
{
  // Determine grid resolution
  grid_resolution[0] = image.Width();
  grid_resolution[1] = image.Height();
  grid_row_size = grid_resolution[0];
  grid_size = grid_row_size * grid_resolution[1];

  // Allocate grid values
  if (grid_size <= 0) grid_values = NULL;
  else grid_values = new RNScalar [ grid_size ];
  assert(!grid_size || grid_values);

  // Copy grid values
  for (int j = 0; j < grid_resolution[1]; j++) {
    for (int i = 0; i < grid_resolution[0]; i++) {
      RNRgb rgb = image.PixelRGB(i, j);
      SetGridValue(i, j, rgb.Luminance());
    }
  }

  // Set transformations
  grid_to_world_transform = R2identity_affine;
  world_to_grid_transform = R2identity_affine;
  world_to_grid_scale_factor = 1.0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x669b0
leaq 0x58(%rbx), %rdi
movq %rdi, 0x8(%rsp)
callq 0x669b0
movq $0x0, 0xb8(%rbx)
movl (%r15), %ecx
movl %ecx, 0xc0(%rbx)
movl 0x4(%r15), %eax
movl %eax, 0xc4(%rbx)
movl %ecx, 0xc8(%rbx)
imull %ecx, %eax
movl %eax, 0xcc(%rbx)
testl %eax, %eax
jle 0x5a6f9
movl %eax, %edi
shlq $0x3, %rdi
callq 0xe030
jmp 0x5a6fb
xorl %eax, %eax
movq %rax, 0xb8(%rbx)
cmpl $0x0, 0xc4(%rbx)
jle 0x5a79c
xorl %r12d, %r12d
leaq 0x10(%rsp), %r13
cmpl $0x0, 0xc0(%rbx)
jle 0x5a78c
movslq %r12d, %r14
xorl %ebp, %ebp
movq %r13, %rdi
movq %r15, %rsi
movl %ebp, %edx
movl %r12d, %ecx
callq 0x69cbc
movsd 0x18(%rsp), %xmm0
mulsd 0x4ebad(%rip), %xmm0    # 0xa92f0
movsd 0x10(%rsp), %xmm1
mulsd 0x4eba7(%rip), %xmm1    # 0xa92f8
addsd %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
mulsd 0x4eb9d(%rip), %xmm0    # 0xa9300
addsd %xmm1, %xmm0
movq 0xb8(%rbx), %rax
movslq 0xc8(%rbx), %rcx
imulq %r14, %rcx
addq %rbp, %rcx
movsd %xmm0, (%rax,%rcx,8)
incq %rbp
cmpl 0xc0(%rbx), %ebp
jl 0x5a725
incl %r12d
cmpl 0xc4(%rbx), %r12d
jl 0x5a717
leaq 0x8(%rbx), %rdi
leaq 0x48d7b1(%rip), %r14    # 0x4e7f58
leaq 0x8(%r14), %r15
movq %r15, %rsi
callq 0x67944
movl 0x50(%r14), %eax
movl %eax, 0x50(%rbx)
leaq 0x60(%rbx), %rdi
movq %r15, %rsi
callq 0x67944
movl 0x50(%r14), %eax
movl %eax, 0xa8(%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0xb0(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x5a804
jmp 0x5a7f7
movq %rax, %r15
movq 0x8(%rsp), %rdi
callq 0x66ce4
movq %rbx, %rdi
callq 0x66ce4
movq %r15, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::Percentile(double) const
RNScalar R2Grid::
Percentile(RNScalar percentile) const
{
  // Return value at given percentile
  if (grid_size == 0) return 0.0;
  int tmp_count = 0;
  RNScalar *tmp_values = new RNScalar [ grid_size ];
  for (int i = 0; i < grid_size; i++) {
    if (grid_values[i] != R2_GRID_UNKNOWN_VALUE) {
      tmp_values[tmp_count++] = grid_values[i];
    }
  }
  if (tmp_count == 0) return R2_GRID_UNKNOWN_VALUE;
  qsort(tmp_values, tmp_count, sizeof(RNScalar), RNCompareScalars);
  int percentile_index = percentile * tmp_count;
  RNScalar value = tmp_values[percentile_index];
  delete [] tmp_values;
  return value;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movslq 0xcc(%rdi), %r15
testq %r15, %r15
je 0x5a930
movq %rdi, %r14
movsd %xmm0, (%rsp)
leaq (,%r15,8), %rax
testl %r15d, %r15d
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0xe030
movq %rax, %rbx
testl %r15d, %r15d
jle 0x5a935
movq 0xb8(%r14), %rax
xorl %ecx, %ecx
movsd 0x486ab(%rip), %xmm0    # 0xa2fb8
xorl %ebp, %ebp
movsd (%rax,%rcx,8), %xmm1
ucomisd %xmm0, %xmm1
jne 0x5a91c
jnp 0x5a926
movslq %ebp, %rdx
incl %ebp
movsd %xmm1, (%rbx,%rdx,8)
incq %rcx
cmpq %rcx, %r15
jne 0x5a90f
jmp 0x5a937
xorps %xmm0, %xmm0
jmp 0x5a985
xorl %ebp, %ebp
testl %ebp, %ebp
je 0x5a97d
movslq %ebp, %rsi
leaq 0x17d24(%rip), %rcx     # 0x72669
movl $0x8, %edx
movq %rbx, %rdi
callq 0xe880
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
mulsd (%rsp), %xmm0
cvttsd2si %xmm0, %eax
cltq
movsd (%rbx,%rax,8), %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0xe5b0
movsd (%rsp), %xmm0
jmp 0x5a985
movsd 0x48633(%rip), %xmm0    # 0xa2fb8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::L1Norm() const
RNScalar R2Grid::
L1Norm(void) const
{
  // Return L1 norm of grid
  RNScalar sum = 0.0;
  for (int i = 0; i < grid_size; i++) {
    if (grid_values[i] != R2_GRID_UNKNOWN_VALUE) {
      sum += grid_values[i];
    }
  }
  return sum;
}

// Assembly:
movslq 0xcc(%rdi), %rax
testq %rax, %rax
jle 0x5a9dc
movq 0xb8(%rdi), %rcx
xorpd %xmm2, %xmm2
xorl %edx, %edx
movsd 0x48607(%rip), %xmm1    # 0xa2fb8
movsd (%rcx,%rdx,8), %xmm0
movapd %xmm2, %xmm3
addsd %xmm0, %xmm3
cmpneqsd %xmm1, %xmm0
andpd %xmm0, %xmm3
andnpd %xmm2, %xmm0
orpd %xmm3, %xmm0
incq %rdx
movapd %xmm0, %xmm2
cmpq %rdx, %rax
jne 0x5a9b1
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::L2Norm() const
RNScalar R2Grid::
L2Norm(void) const
{
  // Return L2 norm of grid
  RNScalar sum = 0.0;
  for (int i = 0; i < grid_size; i++) {
    if (grid_values[i] != R2_GRID_UNKNOWN_VALUE) {
      RNScalar value = grid_values[i];
      sum += value * value;
    }
  }
  return sqrt(sum);
}

// Assembly:
movslq 0xcc(%rdi), %rax
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
testq %rax, %rax
jle 0x5aa37
movq 0xb8(%rdi), %rcx
xorpd %xmm3, %xmm3
xorl %edx, %edx
movsd 0x485af(%rip), %xmm2    # 0xa2fb8
movsd (%rcx,%rdx,8), %xmm0
movapd %xmm0, %xmm4
mulsd %xmm0, %xmm4
addsd %xmm3, %xmm4
cmpneqsd %xmm2, %xmm0
andpd %xmm0, %xmm4
andnpd %xmm3, %xmm0
orpd %xmm4, %xmm0
incq %rdx
movapd %xmm0, %xmm3
cmpq %rdx, %rax
jne 0x5aa09
ucomisd %xmm1, %xmm0
jb 0xe340
sqrtsd %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::Cardinality() const
int R2Grid::
Cardinality(void) const
{
  // Return number of non-zero grid values
  int count = 0;
  for (int i = 0; i < grid_size; i++) {
    if (grid_values[i] != R2_GRID_UNKNOWN_VALUE) {
      if (grid_values[i] != 0) count++;
    }
  }
  return count;
}

// Assembly:
movslq 0xcc(%rdi), %rcx
testq %rcx, %rcx
jle 0x5aa8f
movq 0xb8(%rdi), %rdx
xorl %esi, %esi
xorpd %xmm0, %xmm0
movsd 0x48551(%rip), %xmm1    # 0xa2fb8
xorl %eax, %eax
movsd (%rdx,%rsi,8), %xmm2
movapd %xmm2, %xmm3
cmpneqpd %xmm0, %xmm3
cmpneqpd %xmm1, %xmm2
andpd %xmm3, %xmm2
movd %xmm2, %edi
subl %edi, %eax
incq %rsi
cmpq %rsi, %rcx
jne 0x5aa69
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::Mean() const
RNScalar R2Grid::
Mean(void) const
{
  // Sum values
  int count = 0;
  RNScalar sum = 0;
  for (int i = 0; i < grid_size; i++) {
    if (grid_values[i] != R2_GRID_UNKNOWN_VALUE) {
      sum += grid_values[i];
      count++;
    }
  }

  // Return mean
  if (count == 0) return 0.0;
  else return sum / count;
}

// Assembly:
movslq 0xcc(%rdi), %rax
xorpd %xmm0, %xmm0
testq %rax, %rax
jle 0x5aaec
movq 0xb8(%rdi), %rdx
xorl %esi, %esi
xorpd %xmm3, %xmm3
movsd 0x48501(%rip), %xmm2    # 0xa2fb8
xorl %ecx, %ecx
movapd %xmm3, %xmm1
movsd (%rdx,%rsi,8), %xmm4
ucomisd %xmm2, %xmm4
addsd %xmm4, %xmm1
jne 0x5aad2
jp 0x5aad2
movapd %xmm3, %xmm1
cmpneqsd %xmm2, %xmm4
movq %xmm4, %rdi
subl %edi, %ecx
incq %rsi
movapd %xmm1, %xmm3
cmpq %rsi, %rax
jne 0x5aabd
jmp 0x5aaf2
xorl %ecx, %ecx
xorpd %xmm1, %xmm1
testl %ecx, %ecx
je 0x5ab05
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::GridCentroid() const
R2Point R2Grid::
GridCentroid(void) const
{
  // Compute weighted sum
  RNScalar total_value = 0;
  R2Point centroid(0,0);
  RNScalar *grid_valuesp = grid_values;
  for (int j = 0; j < grid_resolution[1]; j++) {
    for (int i = 0; i < grid_resolution[0]; i++) {
      R2Vector position(i, j);
      RNScalar value = *(grid_valuesp++);
      centroid += value * position;
      total_value += value;
    }
  }

  // Divide by total value
  if (total_value > 0) centroid /= total_value;

  // Return centroid
  return centroid;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
callq 0x68e2e
cmpl $0x0, 0xc4(%r14)
xorpd %xmm0, %xmm0
jle 0x5abd3
movq 0xb8(%r14), %r13
xorl %eax, %eax
leaq 0x38(%rsp), %r15
leaq 0x28(%rsp), %r12
cmpl $0x0, 0xc0(%r14)
movl %eax, 0xc(%rsp)
jle 0x5abc0
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd %xmm1, 0x10(%rsp)
xorl %ebp, %ebp
movsd %xmm0, 0x20(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movq %r15, %rdi
movsd 0x10(%rsp), %xmm1
callq 0x6915a
movsd (%r13), %xmm0
movsd %xmm0, 0x18(%rsp)
addq $0x8, %r13
movq %r12, %rdi
movq %r15, %rsi
callq 0x694f6
movq %rbx, %rdi
movq %r12, %rsi
callq 0x68f14
movsd 0x20(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
incl %ebp
cmpl 0xc0(%r14), %ebp
jl 0x5ab68
movl 0xc(%rsp), %eax
incl %eax
cmpl 0xc4(%r14), %eax
jl 0x5ab4b
ucomisd 0x4760d(%rip), %xmm0    # 0xa21e8
jbe 0x5abe5
movq %rbx, %rdi
callq 0x69014
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::Abs()
void R2Grid::
Abs(void) 
{
  // Take absolute value of every grid value
  for (int i = 0; i < grid_size; i++) {
    RNScalar value = grid_values[i];
    if (value != R2_GRID_UNKNOWN_VALUE) grid_values[i] = fabs(value);
  }
}

// Assembly:
movslq 0xcc(%rdi), %rax
testq %rax, %rax
jle 0x5b147
movq 0xb8(%rdi), %rcx
xorl %edx, %edx
movsd 0x47e97(%rip), %xmm0    # 0xa2fb8
movapd 0x47147(%rip), %xmm1    # 0xa2270
movsd (%rcx,%rdx,8), %xmm2
ucomisd %xmm0, %xmm2
jne 0x5b136
jnp 0x5b13f
andpd %xmm1, %xmm2
movlpd %xmm2, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x5b129
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::Sqrt()
void R2Grid::
Sqrt(void) 
{
  // Take sqrt of every grid value
  for (int i = 0; i < grid_size; i++) {
    RNScalar value = grid_values[i];
    if (value != R2_GRID_UNKNOWN_VALUE) grid_values[i] = sqrt(value);
  }
}

// Assembly:
cmpl $0x0, 0xcc(%rdi)
jle 0x5b1bc
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movsd 0x47e55(%rip), %xmm1    # 0xa2fb8
xorpd %xmm2, %xmm2
movq 0xb8(%rbx), %rax
movsd (%rax,%r14,8), %xmm0
ucomisd %xmm1, %xmm0
jne 0x5b17c
jnp 0x5b1a6
ucomisd %xmm2, %xmm0
jb 0x5b188
sqrtsd %xmm0, %xmm0
jmp 0x5b199
callq 0xe340
xorpd %xmm2, %xmm2
movsd 0x47e1f(%rip), %xmm1    # 0xa2fb8
movq 0xb8(%rbx), %rax
movsd %xmm0, (%rax,%r14,8)
incq %r14
movslq 0xcc(%rbx), %rax
cmpq %rax, %r14
jl 0x5b167
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::IsLocalExtremum(gaps::R2Grid const&, int, int, int)
void R2Grid::
Square(void) 
{
  // Square every grid value
  for (int i = 0; i < grid_size; i++) {
    RNScalar value = grid_values[i];
    if (value != R2_GRID_UNKNOWN_VALUE) grid_values[i] *= value;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movq 0xb8(%rdi), %r9
movslq 0xc8(%rdi), %rax
movl %eax, %r8d
imull %edx, %r8d
addl %esi, %r8d
movslq %r8d, %r8
movsd (%r9,%r8,8), %xmm0
movslq 0xc0(%rdi), %r8
movslq 0xc4(%rdi), %rdi
movslq %edx, %rdx
movslq %esi, %rsi
leaq -0x1(%rdx), %r10
imulq %rax, %r10
leaq (,%rsi,8), %r11
leaq (%r11,%r10,8), %r10
addq %r10, %r9
addq $-0x8, %r9
shlq $0x3, %rax
movq $-0x1, %r10
xorl %r11d, %r11d
movq %r10, %rbx
addq %rsi, %rbx
movl $0x4, %ebp
js 0x5d679
cmpq %r8, %rbx
jge 0x5d679
movq $-0x1, %rbx
movq %r9, %r14
movl %ebx, %ebp
orl %r10d, %ebp
je 0x5d661
movq %rdx, %r15
addq %rbx, %r15
movl $0x7, %ebp
js 0x5d658
cmpq %rdi, %r15
jge 0x5d658
movsd (%r14), %xmm1
testl %ecx, %ecx
jne 0x5d643
movl $0x1, %ebp
ucomisd %xmm1, %xmm0
ja 0x5d658
testl %ecx, %ecx
setne %bpl
ucomisd %xmm0, %xmm1
seta %r15b
andb %bpl, %r15b
movzbl %r15b, %ebp
cmpl $0x7, %ebp
je 0x5d661
testl %ebp, %ebp
jne 0x5d672
incq %rbx
addq %rax, %r14
cmpq $0x2, %rbx
jne 0x5d616
movl $0x5, %ebp
cmpl $0x5, %ebp
cmovel %r11d, %ebp
testb $0x3, %bpl
jne 0x5d695
incq %r10
addq $0x8, %r9
cmpq $0x2, %r10
jne 0x5d5fa
movl $0x2, %ebp
xorl %eax, %eax
cmpl $0x2, %ebp
sete %al
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::Negate()
void R2Grid::
Negate(void) 
{
  // Square every grid value
  for (int i = 0; i < grid_size; i++) {
    RNScalar value = grid_values[i];
    if (value != R2_GRID_UNKNOWN_VALUE) grid_values[i] = -value;
  }
}

// Assembly:
movslq 0xcc(%rdi), %rax
testq %rax, %rax
jle 0x5b23d
movq 0xb8(%rdi), %rcx
xorl %edx, %edx
movsd 0x47da1(%rip), %xmm0    # 0xa2fb8
movapd 0x46e01(%rip), %xmm1    # 0xa2020
movsd (%rcx,%rdx,8), %xmm2
ucomisd %xmm0, %xmm2
jne 0x5b22c
jnp 0x5b235
xorpd %xmm1, %xmm2
movlpd %xmm2, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x5b21f
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::Invert()
void R2Grid::
Invert(void) 
{
  // Invert every grid value
  for (int i = 0; i < grid_size; i++) {
    RNScalar value = grid_values[i];
    if ((value != R2_GRID_UNKNOWN_VALUE) && (value != 0)) {
      grid_values[i] = 1.0 / value;
    }
  }
}

// Assembly:
movslq 0xcc(%rdi), %rax
testq %rax, %rax
jle 0x5b291
movq 0xb8(%rdi), %rcx
xorl %edx, %edx
movsd 0x47d5d(%rip), %xmm0    # 0xa2fb8
xorpd %xmm1, %xmm1
movsd 0x46dd1(%rip), %xmm2    # 0xa2038
movsd (%rcx,%rdx,8), %xmm3
ucomisd %xmm0, %xmm3
jne 0x5b274
jnp 0x5b289
ucomisd %xmm1, %xmm3
jne 0x5b27c
jnp 0x5b289
movapd %xmm2, %xmm4
divsd %xmm3, %xmm4
movsd %xmm4, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x5b267
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::Transpose()
void R2Grid::
Transpose(void)
{
  // Transpose values
  R2Grid copy(*this);
  int xres = XResolution();
  int yres = YResolution();
  for (int iy = 0; iy < yres; iy++) {
    for (int ix = 0; ix < xres; ix++) {
      RNScalar value = copy.GridValue(xres-1 - ix, yres-1 - iy);
      SetGridValue(ix, iy, value);
    }
  }
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x5a63c
movslq 0xc4(%rbx), %rax
testq %rax, %rax
jle 0x5b338
movslq 0xc0(%rbx), %rcx
movl %ecx, %edx
movq 0xb8(%rsp), %r9
movslq 0xc8(%rsp), %rsi
movq 0xb8(%rbx), %rdi
movslq 0xc8(%rbx), %r8
shlq $0x3, %r8
leaq -0x1(%rax), %r10
imulq %rsi, %r10
movq %rcx, %r11
shlq $0x3, %r11
leaq (%r11,%r10,8), %r10
addq %r10, %r9
addq $-0x8, %r9
shlq $0x3, %rsi
negq %rsi
negq %rdx
xorl %r10d, %r10d
testl %ecx, %ecx
jle 0x5b32a
xorl %r11d, %r11d
movq %rdi, %rbx
movsd (%r9,%r11,8), %xmm0
movsd %xmm0, (%rbx)
addq $0x8, %rbx
decq %r11
cmpq %r11, %rdx
jne 0x5b314
incq %r10
addq %r8, %rdi
addq %rsi, %r9
cmpq %rax, %r10
jne 0x5b30a
movq %rsp, %rdi
callq 0x5a814
addq $0xd0, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::Divide(double)
void R2Grid::
Divide(RNScalar value) 
{
  // Just checking
  if (RNIsZero(value)) return;

  // Multiply by recipricol
  Multiply(1.0 / value);
}

// Assembly:
leaq 0x8a7d1(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd 0x46c4d(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x5b3e3
ucomisd %xmm0, %xmm1
jae 0x5b42a
movslq 0xcc(%rdi), %rax
testq %rax, %rax
jle 0x5b42a
movsd 0x46c41(%rip), %xmm1    # 0xa2038
divsd %xmm0, %xmm1
movq 0xb8(%rdi), %rcx
xorl %edx, %edx
movsd 0x47bac(%rip), %xmm0    # 0xa2fb8
movsd (%rcx,%rdx,8), %xmm2
ucomisd %xmm0, %xmm2
jne 0x5b419
jnp 0x5b422
mulsd %xmm1, %xmm2
movsd %xmm2, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x5b40c
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::Clear(double)
void R2Grid::
Clear(RNScalar value) 
{
  // Set all grid values to value
  for (int i = 0; i < grid_size; i++) {
    if (grid_values[i] == R2_GRID_UNKNOWN_VALUE) continue;
    grid_values[i] = value;
  }
}

// Assembly:
movslq 0xcc(%rdi), %rax
testq %rax, %rax
jle 0x5bddd
movq 0xb8(%rdi), %rcx
xorl %edx, %edx
movsd 0x471f5(%rip), %xmm1    # 0xa2fb8
movsd (%rcx,%rdx,8), %xmm2
ucomisd %xmm1, %xmm2
jne 0x5bdd0
jnp 0x5bdd5
movsd %xmm0, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x5bdc3
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Grid.cpp
// Function: gaps::R2Grid::Dilate(double)
void R2Grid::
Dilate(RNLength grid_distance) 
{
  // Make copy so that can restore unknown values
  R2Grid copy(*this);

  // Set pixels (to one) within grid_distance from some non-zero pixel
  SquaredDistanceTransform();
  Threshold(grid_distance * grid_distance, 1, 0);

  // Restore unknown values
  for (int i = 0; i < grid_size; i++) {
    if (copy.grid_values[i] == R2_GRID_UNKNOWN_VALUE) {
      grid_values[i] = R2_GRID_UNKNOWN_VALUE;
    }
  }
}

// Assembly:
pushq %rbx
subq $0xe0, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x5a63c
movq %rbx, %rdi
callq 0x5bebe
movslq 0xcc(%rbx), %rax
testq %rax, %rax
movsd 0x8(%rsp), %xmm3
jle 0x5be56
mulsd %xmm3, %xmm3
movq 0xb8(%rbx), %rcx
xorl %edx, %edx
movsd 0x4718d(%rip), %xmm0    # 0xa2fb8
movsd 0x46205(%rip), %xmm1    # 0xa2038
movsd (%rcx,%rdx,8), %xmm2
ucomisd %xmm0, %xmm2
jne 0x5be40
jnp 0x5be4e
cmpnlesd %xmm3, %xmm2
andnpd %xmm1, %xmm2
movlpd %xmm2, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x5be33
testl %eax, %eax
jle 0x5be96
movq 0xc8(%rsp), %rcx
movq 0xb8(%rbx), %rdx
xorl %esi, %esi
movsd 0x47145(%rip), %xmm0    # 0xa2fb8
movabsq $-0x3f8bf00000000000, %rdi # imm = 0xC074100000000000
movsd (%rcx,%rsi,8), %xmm1
ucomisd %xmm0, %xmm1
jne 0x5be8e
jp 0x5be8e
movq %rdi, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x5be7d
leaq 0x10(%rsp), %rdi
callq 0x5a814
addq $0xe0, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5a814
movq %rbx, %rdi
callq 0xe7e0