// File: 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
subq $0x600, %rsp            # imm = 0x600
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movsd %xmm2, -0x28(%rbp)
movq -0x20(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq -0x31(%rbp), %rdi
callq 0x19270
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq -0x41(%rbp), %rdi
callq 0x19270
movq %rax, -0x40(%rbp)
movl -0x30(%rbp), %eax
shrl %eax
movzbl %al, %eax
movzbl -0x40(%rbp), %ecx
xorl %ecx, %eax
movq %rax, -0x50(%rbp)
movl -0x30(%rbp), %eax
shrl %eax
movzwl %ax, %eax
movzwl -0x40(%rbp), %ecx
xorl %ecx, %eax
shrl $0x8, %eax
movq %rax, -0x58(%rbp)
movl -0x30(%rbp), %eax
shrl %eax
movl -0x40(%rbp), %ecx
xorl %ecx, %eax
andl $0xff0000, %eax         # imm = 0xFF0000
shrl $0x10, %eax
movq %rax, -0x60(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x3300
movl -0x50(%rbp), %esi
movl -0x58(%rbp), %edx
movl -0x60(%rbp), %ecx
leaq -0x1f0(%rbp), %rdi
callq 0x192d0
jmp 0x18a75
movq -0x8(%rbp), %rax
movq %rax, -0x5d8(%rbp)
movq -0x20(%rbp), %rax
movss (%rax), %xmm0
movss 0x4(%rax), %xmm1
cvtss2sd %xmm0, %xmm0
cvtss2sd %xmm1, %xmm1
leaq -0x280(%rbp), %rdi
callq 0x4280
jmp 0x18aa3
leaq -0x2b8(%rbp), %rdi
movq %rdi, -0x5e0(%rbp)
leaq -0x1f0(%rbp), %rsi
callq 0x5340
movq -0x5e0(%rbp), %rsi
leaq -0x2a0(%rbp), %rdi
callq 0x7150
jmp 0x18ad2
leaq -0x300(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4510
jmp 0x18ae5
leaq -0x2e8(%rbp), %rdi
movsd 0xa52c(%rip), %xmm0     # 0x23020
leaq -0x300(%rbp), %rsi
xorl %edx, %edx
callq 0x4720
jmp 0x18b04
leaq -0x270(%rbp), %rdi
leaq -0x280(%rbp), %rsi
movsd 0xa50e(%rip), %xmm0     # 0x23028
leaq -0x2a0(%rbp), %rdx
leaq -0x2e8(%rbp), %rcx
callq 0x4790
jmp 0x18b2f
movq -0x5d8(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x4430
jmp 0x18b44
leaq -0x270(%rbp), %rdi
callq 0x4810
leaq -0x2e8(%rbp), %rdi
callq 0x4830
leaq -0x300(%rbp), %rdi
callq 0x4860
leaq -0x2a0(%rbp), %rdi
callq 0x4880
leaq -0x2b8(%rbp), %rdi
callq 0x4860
movq -0x20(%rbp), %rsi
leaq -0x1d8(%rbp), %rdi
callq 0x31e0
jmp 0x18b92
movq -0x8(%rbp), %rax
movq %rax, -0x5e8(%rbp)
movq -0x20(%rbp), %rax
movss (%rax), %xmm0
movss 0x4(%rax), %xmm1
cvtss2sd %xmm0, %xmm0
cvtss2sd %xmm1, %xmm1
leaq -0x3c8(%rbp), %rdi
callq 0x4280
jmp 0x18bc0
leaq -0x3e8(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x3270
jmp 0x18bd5
leaq -0x420(%rbp), %rdi
movq %rdi, -0x5f0(%rbp)
leaq -0x1f0(%rbp), %rsi
callq 0x5340
movq -0x5f0(%rbp), %rsi
leaq -0x408(%rbp), %rdi
callq 0x7150
jmp 0x18c04
leaq -0x471(%rbp), %rdi
movq %rdi, -0x5f8(%rbp)
callq 0x3410
movq -0x5f8(%rbp), %rdx
leaq 0xb0e5(%rip), %rsi      # 0x23d0a
leaq -0x470(%rbp), %rdi
callq 0x3310
jmp 0x18c33
leaq -0x450(%rbp), %rdi
movsd 0xa636(%rip), %xmm0     # 0x23278
leaq -0x470(%rbp), %rsi
callq 0x19320
jmp 0x18c50
leaq -0x4c0(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4510
jmp 0x18c63
leaq -0x4a8(%rbp), %rdi
movsd 0xa3ae(%rip), %xmm0     # 0x23020
leaq -0x4c0(%rbp), %rsi
xorl %edx, %edx
callq 0x4720
jmp 0x18c82
leaq -0x3b8(%rbp), %rdi
leaq -0x3c8(%rbp), %rsi
leaq -0x3e8(%rbp), %rdx
leaq -0x408(%rbp), %rcx
leaq -0x450(%rbp), %r8
leaq -0x4a8(%rbp), %r9
callq 0x19390
jmp 0x18cb3
movq -0x5e8(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x4430
jmp 0x18cc8
leaq -0x3b8(%rbp), %rdi
callq 0x19450
leaq -0x4a8(%rbp), %rdi
callq 0x4830
leaq -0x4c0(%rbp), %rdi
callq 0x4860
leaq -0x450(%rbp), %rdi
callq 0x194a0
leaq -0x470(%rbp), %rdi
callq 0x3160
leaq -0x471(%rbp), %rdi
callq 0x32a0
leaq -0x408(%rbp), %rdi
callq 0x4880
leaq -0x420(%rbp), %rdi
callq 0x4860
leaq -0x3e8(%rbp), %rdi
callq 0x3160
leaq -0x550(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x44b0
jmp 0x18d47
leaq -0x598(%rbp), %rdi
movq %rdi, -0x600(%rbp)
leaq -0x1f0(%rbp), %rsi
callq 0x5340
movq -0x600(%rbp), %rsi
leaq -0x580(%rbp), %rdi
movsd 0xa299(%rip), %xmm0     # 0x23010
xorl %edx, %edx
callq 0x4720
jmp 0x18d80
leaq -0x530(%rbp), %rdi
leaq -0x550(%rbp), %rsi
leaq -0x580(%rbp), %rdx
callq 0x194e0
jmp 0x18d9c
leaq -0x580(%rbp), %rdi
callq 0x4830
leaq -0x598(%rbp), %rdi
callq 0x4860
leaq -0x550(%rbp), %rdi
callq 0x4880
movsd -0x28(%rbp), %xmm0
movq -0x20(%rbp), %rax
movss 0x4(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x190aa
jp 0x190aa
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x5a0(%rbp)
movsd -0x5a0(%rbp), %xmm1
movsd 0xa481(%rip), %xmm0     # 0x23280
addsd -0x28(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x190a5
movq -0x20(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd -0x5a0(%rbp), %xmm1
leaq -0x5b0(%rbp), %rdi
callq 0x4280
jmp 0x18e30
leaq -0x530(%rbp), %rdi
leaq -0x5b0(%rbp), %rsi
callq 0x19530
jmp 0x18e45
jmp 0x18e47
movsd 0xa1c1(%rip), %xmm0     # 0x23010
addsd -0x5a0(%rbp), %xmm0
movsd %xmm0, -0x5a0(%rbp)
jmp 0x18def
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x191eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x191df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x18f21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x18f15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x18f09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x18efd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
leaq -0x270(%rbp), %rdi
callq 0x4810
leaq -0x2e8(%rbp), %rdi
callq 0x4830
leaq -0x300(%rbp), %rdi
callq 0x4860
leaq -0x2a0(%rbp), %rdi
callq 0x4880
leaq -0x2b8(%rbp), %rdi
callq 0x4860
jmp 0x191df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x19016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x18ffe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x18ff2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x18fe6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x18fda
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x18fce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
leaq -0x3b8(%rbp), %rdi
callq 0x19450
leaq -0x4a8(%rbp), %rdi
callq 0x4830
leaq -0x4c0(%rbp), %rdi
callq 0x4860
leaq -0x450(%rbp), %rdi
callq 0x194a0
leaq -0x470(%rbp), %rdi
callq 0x3160
leaq -0x471(%rbp), %rdi
callq 0x32a0
leaq -0x408(%rbp), %rdi
callq 0x4880
leaq -0x420(%rbp), %rdi
callq 0x4860
leaq -0x3e8(%rbp), %rdi
callq 0x3160
jmp 0x191df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x19065
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
leaq -0x580(%rbp), %rdi
callq 0x4830
leaq -0x598(%rbp), %rdi
callq 0x4860
leaq -0x550(%rbp), %rdi
callq 0x4880
jmp 0x191df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
leaq -0x530(%rbp), %rdi
callq 0x19560
jmp 0x191df
jmp 0x19195
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x5b8(%rbp)
movsd -0x5b8(%rbp), %xmm1
movsd -0x18(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x19193
movq -0x20(%rbp), %rax
movss (%rax), %xmm0
movss 0x4(%rax), %xmm1
movaps %xmm1, %xmm3
mulss %xmm3, %xmm3
movaps %xmm0, %xmm2
mulss %xmm2, %xmm2
addss %xmm3, %xmm2
cvtss2sd %xmm2, %xmm2
addss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm3
movsd -0x5b8(%rbp), %xmm0
mulsd %xmm0, %xmm3
subsd %xmm3, %xmm2
mulsd %xmm0, %xmm0
addsd %xmm2, %xmm0
movsd -0x28(%rbp), %xmm2
movaps %xmm2, %xmm3
mulsd %xmm3, %xmm3
subsd %xmm3, %xmm0
movsd 0xa127(%rip), %xmm3     # 0x23250
mulsd %xmm3, %xmm0
cvtss2sd %xmm1, %xmm1
subsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x5c0(%rbp)
movsd -0x5b8(%rbp), %xmm0
movsd -0x5c0(%rbp), %xmm1
leaq -0x5d0(%rbp), %rdi
callq 0x4280
jmp 0x1915f
leaq -0x530(%rbp), %rdi
leaq -0x5d0(%rbp), %rsi
callq 0x19530
jmp 0x19174
jmp 0x19176
movsd 0x9e92(%rip), %xmm0     # 0x23010
addsd -0x5b8(%rbp), %xmm0
movsd %xmm0, -0x5b8(%rbp)
jmp 0x190b7
jmp 0x19195
movq -0x8(%rbp), %rdi
leaq -0x530(%rbp), %rsi
callq 0x4430
jmp 0x191a7
movq -0x8(%rbp), %rdi
callq 0x4b80
jmp 0x191b2
leaq -0x530(%rbp), %rdi
callq 0x19560
leaq -0x1f0(%rbp), %rdi
callq 0x4860
leaq -0x1d8(%rbp), %rdi
callq 0x3070
addq $0x600, %rsp            # imm = 0x600
popq %rbp
retq
leaq -0x1f0(%rbp), %rdi
callq 0x4860
leaq -0x1d8(%rbp), %rdi
callq 0x3070
movq -0x1f8(%rbp), %rdi
callq 0x3400
nopw %cs:(%rax,%rax)
nopl (%rax)