// File: /workspace/github_cpp_makefile_star2_O2/micahcc[P]polygon_skeleton/./debug.h
// Function: draw_parabola(svg::Document&, double, double, Vector const&, double)
inline
void draw_parabola(svg::Document& doc, double min_x, double max_x,
    const Point& pt, double sweep_y)
{
    size_t h1 = std::hash<double>{}(pt.x);
    size_t h2 = std::hash<double>{}(pt.y);
    size_t r = ((h1 >> 1 ^ h2) & 0x0000FF);
    size_t g = ((h1 >> 1 ^ h2) & 0x00FF00) >> 8;
    size_t b = ((h1 >> 1 ^ h2) & 0xFF0000) >> 16;

    std::ostringstream tmp;
    svg::Color color(r, g, b);

    doc << svg::Circle(svg::Point(pt.x, pt.y), 5, svg::Fill(color));

    tmp << &pt;
    doc << svg::Text(svg::Point(pt.x, pt.y), tmp.str(), svg::Fill(color));

    // line defined by
    // (x - p.x)^2 + (y - p.y)^2 == (y - sweep_y)
    svg::Polyline parabola(svg::Fill(svg::Color::Transparent), svg::Stroke(1, color));
    if(sweep_y == pt.y) {
        for(double y = sweep_y; y < sweep_y + 1000; y += 1) {
            parabola << svg::Point(pt.x, y);
        }
    } else {
        for(double x = min_x; x < max_x; x += 1) {
            double y = 0.5*(pt.x*pt.x + pt.y*pt.y - 2*pt.x*x + x*x - sweep_y*sweep_y)/
                (pt.y - sweep_y);
            parabola << svg::Point(x, y);
        }
    }

    doc << parabola;
    doc.save();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
movapd %xmm2, -0x50(%rbp)
movq %rsi, %r14
movsd %xmm1, -0x68(%rbp)
movsd %xmm0, -0x38(%rbp)
movq %rdi, %r13
cvtss2sd (%rsi), %xmm0
leaq -0x368(%rbp), %rdi
callq 0xac6e
movq %rax, %r12
cvtss2sd 0x4(%r14), %xmm0
leaq -0x368(%rbp), %rdi
callq 0xac6e
movq %rax, %r15
shrq %r12
xorl %r12d, %r15d
leaq -0x368(%rbp), %rdi
callq 0x3260
movl $0xff, %eax
movl %r15d, %ecx
andl %eax, %ecx
movl %r15d, %ebx
shrl $0x8, %ebx
andl %eax, %ebx
shrl $0x10, %r15d
cvtss2sd (%r14), %xmm0
andl %eax, %r15d
cvtss2sd 0x4(%r14), %xmm1
leaq -0xe8(%rbp), %rsi
movsd %xmm0, (%rsi)
movsd %xmm1, 0x8(%rsi)
leaq 0x91fe(%rip), %rax      # 0x13a68
leaq -0x138(%rbp), %rdx
movq %rax, (%rdx)
leaq 0x923d(%rip), %rax      # 0x13ab8
movq %rax, 0x8(%rdx)
movb $0x0, 0x10(%rdx)
movl %ecx, -0x60(%rbp)
movl %ecx, 0x14(%rdx)
movl %ebx, 0x18(%rdx)
leaq 0x9265(%rip), %rdi      # 0x13af8
leaq -0x98(%rbp), %rcx
movq %rdi, (%rcx)
movabsq $-0x4010000000000000, %rdi # imm = 0xBFF0000000000000
movq %rdi, 0x8(%rcx)
movq %rax, 0x10(%rcx)
movb $0x1, 0x18(%rcx)
andq $0x0, 0x1c(%rcx)
movl %r15d, 0x1c(%rdx)
andq $0x0, 0x21(%rcx)
leaq -0x1f0(%rbp), %r12
movsd 0x2760(%rip), %xmm0     # 0xd030
movq %r12, %rdi
callq 0x3b88
movq %r13, -0x40(%rbp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x3a20
leaq -0x368(%rbp), %rdi
movq %r14, %rsi
callq 0x3190
cvtss2sd (%r14), %xmm0
cvtss2sd 0x4(%r14), %xmm1
movsd %xmm0, -0xc8(%rbp)
movsd %xmm1, -0xc0(%rbp)
leaq -0x360(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
callq 0x32f0
movl -0x60(%rbp), %r12d
leaq 0x9189(%rip), %r13      # 0x13ab8
leaq 0x9132(%rip), %rax      # 0x13a68
movq %rax, -0xb8(%rbp)
movq %r13, -0xb0(%rbp)
movb $0x0, -0xa8(%rbp)
movl %r12d, -0xa4(%rbp)
movl %ebx, -0xa0(%rbp)
movl %r15d, -0x9c(%rbp)
leaq 0x337c(%rip), %rsi      # 0xdce2
leaq -0x108(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x3090
leaq -0x98(%rbp), %rdi
movsd 0x2913(%rip), %xmm0     # 0xd298
leaq -0x108(%rbp), %rsi
callq 0xaca2
leaq -0x138(%rbp), %r9
leaq 0x9159(%rip), %rax      # 0x13af8
movq %rax, (%r9)
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x8(%r9)
movq %r13, 0x10(%r9)
movb $0x1, 0x18(%r9)
andq $0x0, 0x1c(%r9)
andq $0x0, 0x21(%r9)
leaq -0x1f0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xe8(%rbp), %rdx
leaq -0xb8(%rbp), %rcx
leaq -0x98(%rbp), %r8
callq 0xacc0
leaq -0x1f0(%rbp), %rsi
movq -0x40(%rbp), %rdi
callq 0x3a20
leaq -0x1f0(%rbp), %rdi
callq 0xad34
leaq -0x98(%rbp), %rdi
callq 0xad66
leaq -0x108(%rbp), %rdi
callq 0x30c0
leaq -0xe8(%rbp), %rdi
callq 0x30c0
leaq -0x138(%rbp), %rdi
pushq $-0x1
popq %rsi
callq 0x3a74
leaq -0x98(%rbp), %rdx
leaq 0x90b0(%rip), %rax      # 0x13af8
movq %rax, (%rdx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x8(%rdx)
movq %r13, 0x10(%rdx)
xorl %eax, %eax
movb %al, 0x18(%rdx)
movl %r12d, 0x1c(%rdx)
movl %ebx, 0x20(%rdx)
movl %r15d, 0x24(%rdx)
movb %al, 0x28(%rdx)
leaq -0x1f0(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0xad7e
cvtss2sd 0x4(%r14), %xmm0
movapd -0x50(%rbp), %xmm4
ucomisd %xmm4, %xmm0
leaq -0x198(%rbp), %r15
jne 0xaaf8
jp 0xaaf8
movsd 0x2803(%rip), %xmm0     # 0xd2a8
addsd %xmm4, %xmm0
movsd %xmm0, -0x38(%rbp)
leaq -0x98(%rbp), %r12
movsd -0x38(%rbp), %xmm0
ucomisd %xmm4, %xmm0
jbe 0xabb2
cvtss2sd (%r14), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd %xmm4, -0x90(%rbp)
movq %r15, %rdi
movq %r12, %rsi
movapd %xmm4, -0x50(%rbp)
callq 0xb684
movapd -0x50(%rbp), %xmm4
addsd 0x27aa(%rip), %xmm4     # 0xd2a0
jmp 0xaab5
movapd 0x27c0(%rip), %xmm0     # 0xd2c0
xorpd %xmm4, %xmm0
mulsd %xmm4, %xmm0
movapd %xmm0, -0x60(%rbp)
leaq -0x98(%rbp), %r12
movsd -0x38(%rbp), %xmm5
movsd -0x68(%rbp), %xmm0
ucomisd %xmm5, %xmm0
jbe 0xabb2
movss (%r14), %xmm0
movss 0x4(%r14), %xmm1
cvtss2sd %xmm1, %xmm2
mulss %xmm1, %xmm1
movaps %xmm0, %xmm3
mulss %xmm0, %xmm3
addss %xmm1, %xmm3
cvtss2sd %xmm3, %xmm1
addss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd %xmm5, %xmm0
subsd %xmm0, %xmm1
movapd %xmm5, %xmm0
mulsd %xmm5, %xmm0
addsd %xmm1, %xmm0
addsd -0x60(%rbp), %xmm0
mulsd 0x24c5(%rip), %xmm0     # 0xd038
subsd %xmm4, %xmm2
divsd %xmm2, %xmm0
movsd %xmm5, -0x98(%rbp)
movsd %xmm0, -0x90(%rbp)
movq %r15, %rdi
movq %r12, %rsi
movsd %xmm5, -0x38(%rbp)
callq 0xb684
movsd -0x38(%rbp), %xmm5
addsd 0x26f8(%rip), %xmm5     # 0xd2a0
movapd -0x50(%rbp), %xmm4
jmp 0xab19
leaq -0x1f0(%rbp), %rsi
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
callq 0x3a20
movq %rbx, %rdi
callq 0x3c86
leaq -0x1f0(%rbp), %rdi
callq 0xadaa
leaq -0x368(%rbp), %rdi
callq 0x3060
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xac41
movq %rax, %rbx
leaq -0x1f0(%rbp), %rdi
callq 0xad34
jmp 0xac0d
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0xad66
jmp 0xac1e
movq %rax, %rbx
leaq -0x108(%rbp), %rdi
callq 0x30c0
jmp 0xac2f
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x30c0
jmp 0xac59
jmp 0xac41
jmp 0xac41
movq %rax, %rbx
jmp 0xac59
jmp 0xac4a
jmp 0xac4a
movq %rax, %rbx
leaq -0x1f0(%rbp), %rdi
callq 0xadaa
leaq -0x368(%rbp), %rdi
callq 0x3060
movq %rbx, %rdi
callq 0x3360
nop