// File: /workspace/github_c_makefile_star2_O0/FredTheDino[P]Fog/src/engine/renderer/opengl_renderer.cpp
// Function: Renderer::Impl::push_line(unsigned int, Vec2, Vec2, Vec4, Vec4, float)
void push_line(u32 layer, Vec2 start, Vec2 end, Vec4 start_color, Vec4 end_color,
                      f32 thickness) {
    LAYER_CHECK(layer);
    Vec2 normal = normalize(rotate_ccw(start - end));
    Vec2 offset = normal * thickness * 0.5;
    Vertex verticies[] = {
        {start + offset, V2(0, 0), OPENGL_INVALID_SPRITE, start_color},
        {start - offset, V2(0, 0), OPENGL_INVALID_SPRITE, start_color},
        {end - offset, V2(0, 0), OPENGL_INVALID_SPRITE, end_color},

        {start + offset, V2(0, 0), OPENGL_INVALID_SPRITE, start_color},
        {end - offset, V2(0, 0), OPENGL_INVALID_SPRITE, end_color},
        {end + offset, V2(0, 0), OPENGL_INVALID_SPRITE, end_color},
    };
    sprite_render_queues[layer].push(LEN(verticies), verticies);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movlpd %xmm0, -0x8(%rbp)
movlpd %xmm1, -0x10(%rbp)
movlpd %xmm2, -0x20(%rbp)
movlpd %xmm3, -0x18(%rbp)
movlpd %xmm4, -0x30(%rbp)
movlpd %xmm5, -0x28(%rbp)
movl %edi, -0x34(%rbp)
movss %xmm6, -0x38(%rbp)
xorl %eax, %eax
xorl %ecx, %ecx
cmpl -0x34(%rbp), %ecx
movb %al, -0x171(%rbp)
ja 0x2c8fd
cmpl $0x10, -0x34(%rbp)
setb %al
movb %al, -0x171(%rbp)
movb -0x171(%rbp), %al
movzbl %al, %ecx
andl $0x1, %ecx
leaq 0x19735(%rip), %rdi     # 0x46045
leaq 0x197b0(%rip), %rdx     # 0x460c7
movl $0x1d7, %esi            # imm = 0x1D7
callq 0xb210
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movsd -0x58(%rbp), %xmm0
leaq -0x8(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x5850
movlpd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
callq 0xb4d0
movlpd %xmm0, -0x48(%rbp)
movsd -0x48(%rbp), %xmm0
callq 0xb410
movlpd %xmm0, -0x40(%rbp)
movss -0x38(%rbp), %xmm0
leaq -0x40(%rbp), %rdi
callq 0x5810
movlpd %xmm0, -0x68(%rbp)
leaq -0x68(%rbp), %rdi
movss 0x18690(%rip), %xmm0    # 0x45010
callq 0x5810
movq -0x188(%rbp), %rdi
movlpd %xmm0, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x148(%rbp)
movsd -0x148(%rbp), %xmm0
callq 0x40dc0
movlpd %xmm0, -0x140(%rbp)
xorps %xmm1, %xmm1
movss %xmm1, -0x178(%rbp)
movaps %xmm1, %xmm0
callq 0xbc10
movq -0x188(%rbp), %rdi
movlpd %xmm0, -0x138(%rbp)
movl $0xbf800000, -0x130(%rbp) # imm = 0xBF800000
movups -0x20(%rbp), %xmm0
movups %xmm0, -0x12c(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x150(%rbp)
movsd -0x150(%rbp), %xmm0
callq 0x5850
movss -0x178(%rbp), %xmm1
movlpd %xmm0, -0x11c(%rbp)
movaps %xmm1, %xmm0
callq 0xbc10
movlpd %xmm0, -0x114(%rbp)
movl $0xbf800000, -0x10c(%rbp) # imm = 0xBF800000
movups -0x20(%rbp), %xmm0
movups %xmm0, -0x108(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x158(%rbp)
movsd -0x158(%rbp), %xmm0
leaq -0x10(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x5850
movss -0x178(%rbp), %xmm1
movlpd %xmm0, -0xf8(%rbp)
movaps %xmm1, %xmm0
callq 0xbc10
movq -0x188(%rbp), %rdi
movlpd %xmm0, -0xf0(%rbp)
movl $0xbf800000, -0xe8(%rbp) # imm = 0xBF800000
movups -0x30(%rbp), %xmm0
movups %xmm0, -0xe4(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x160(%rbp)
movsd -0x160(%rbp), %xmm0
callq 0x40dc0
movss -0x178(%rbp), %xmm1
movlpd %xmm0, -0xd4(%rbp)
movaps %xmm1, %xmm0
callq 0xbc10
movq -0x180(%rbp), %rdi
movlpd %xmm0, -0xcc(%rbp)
movl $0xbf800000, -0xc4(%rbp) # imm = 0xBF800000
movups -0x20(%rbp), %xmm0
movups %xmm0, -0xc0(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x168(%rbp)
movsd -0x168(%rbp), %xmm0
callq 0x5850
movss -0x178(%rbp), %xmm1
movlpd %xmm0, -0xb0(%rbp)
movaps %xmm1, %xmm0
callq 0xbc10
movq -0x180(%rbp), %rdi
movlpd %xmm0, -0xa8(%rbp)
movl $0xbf800000, -0xa0(%rbp) # imm = 0xBF800000
movups -0x30(%rbp), %xmm0
movups %xmm0, -0x9c(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x170(%rbp)
movsd -0x170(%rbp), %xmm0
callq 0x40dc0
movss -0x178(%rbp), %xmm1
movlpd %xmm0, -0x8c(%rbp)
movaps %xmm1, %xmm0
callq 0xbc10
movlpd %xmm0, -0x84(%rbp)
movss 0x1849c(%rip), %xmm0    # 0x45018
movss %xmm0, -0x7c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
movl -0x34(%rbp), %eax
leaq 0x58475(%rip), %rdi     # 0x85010
shlq $0x5, %rax
addq %rax, %rdi
leaq -0x140(%rbp), %rdx
movl $0x6, %esi
callq 0x41b80
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
nopl (%rax)