// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/builtin.c
// Function: builtin_window_draw_line
struct value*
builtin_window_draw_line(struct vm* vm, struct value* args)
{
    ASSERT_ARITY("window-draw-line!", args, 5);
    ASSERT_TYPE("window-draw-line!", args, 0, VALUE_WINDOW);
    ASSERT_TYPE("window-draw-line!", args, 1, VALUE_NUMBER);
    ASSERT_TYPE("window-draw-line!", args, 2, VALUE_NUMBER);
    ASSERT_TYPE("window-draw-line!", args, 3, VALUE_NUMBER);
    ASSERT_TYPE("window-draw-line!", args, 4, VALUE_NUMBER);

    struct value* window = list_nth(args, 0);
    struct value* x1 = list_nth(args, 1);
    struct value* y1 = list_nth(args, 2);
    struct value* x2 = list_nth(args, 3);
    struct value* y2 = list_nth(args, 4);

    SDL_SetRenderDrawColor(window->as.window.renderer, 255, 255, 255, 255);
    SDL_RenderDrawLine(window->as.window.renderer,
        x1->as.number, y1->as.number,
        x2->as.number, y2->as.number);

    return vm_make_empty_list(vm);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x502c
cmpq $0x5, %rax
jne 0x45c6
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5075
cmpl $0xc, (%rax)
jne 0x45fb
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x5075
cmpl $0x4, (%rax)
jne 0x4639
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x5075
cmpl $0x4, (%rax)
jne 0x468a
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x5075
cmpl $0x4, (%rax)
jne 0x46c3
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x5075
cmpl $0x4, (%rax)
jne 0x4700
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5075
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x5075
movq %rax, %r12
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x5075
movq %rax, %r13
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x5075
movq %rax, %rbp
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x5075
movq %rax, %rbx
movq 0x18(%r15), %rdi
movl $0xff, %esi
movl $0xff, %edx
movl $0xff, %ecx
movl $0xff, %r8d
callq 0x1210
movq 0x18(%r15), %rdi
movl 0x10(%r12), %esi
movl 0x10(%r13), %edx
movl 0x10(%rbp), %ecx
movl 0x10(%rbx), %r8d
callq 0x10a0
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x66fc
movq 0x7a13(%rip), %rax      # 0xbfe0
movq (%rax), %r14
movq %rbx, %rdi
callq 0x502c
leaq 0x2c25(%rip), %rsi      # 0x7204
leaq 0x2bc1(%rip), %rdx      # 0x71a7
pushq $0x5
popq %rcx
movq %r14, %rdi
movq %rax, %r8
xorl %eax, %eax
callq 0x1220
jmp 0x4749
movq 0x79de(%rip), %rax      # 0xbfe0
movq (%rax), %r14
pushq $0xc
popq %rdi
callq 0x6409
movq %rax, %r15
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5075
movl (%rax), %edi
callq 0x6409
leaq 0x2c5b(%rip), %rsi      # 0x7283
leaq 0x2b78(%rip), %rdx      # 0x71a7
movq %r14, %rdi
xorl %ecx, %ecx
jmp 0x473c
movq 0x79a0(%rip), %rax      # 0xbfe0
movq (%rax), %r14
pushq $0x4
popq %rdi
callq 0x6409
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x5075
movl (%rax), %edi
callq 0x6409
leaq 0x2c1c(%rip), %rsi      # 0x7283
leaq 0x2b39(%rip), %rdx      # 0x71a7
pushq $0x1
popq %rbx
movq %r14, %rdi
movl %ebx, %ecx
movq %r15, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x1220
movl %ebx, %edi
callq 0x11b0
movq 0x794f(%rip), %rax      # 0xbfe0
movq (%rax), %r14
pushq $0x4
popq %rdi
callq 0x6409
movq %rax, %r15
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x5075
movl (%rax), %edi
callq 0x6409
leaq 0x2bcb(%rip), %rsi      # 0x7283
leaq 0x2ae8(%rip), %rdx      # 0x71a7
pushq $0x2
jmp 0x46fa
movq 0x7916(%rip), %rax      # 0xbfe0
movq (%rax), %r14
pushq $0x4
popq %rdi
callq 0x6409
movq %rax, %r15
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x5075
movl (%rax), %edi
callq 0x6409
leaq 0x2b92(%rip), %rsi      # 0x7283
leaq 0x2aaf(%rip), %rdx      # 0x71a7
pushq $0x3
popq %rcx
movq %r14, %rdi
jmp 0x473c
movq 0x78d9(%rip), %rax      # 0xbfe0
movq (%rax), %r14
pushq $0x4
popq %rbp
movl %ebp, %edi
callq 0x6409
movq %rax, %r15
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x5075
movl (%rax), %edi
callq 0x6409
leaq 0x2b53(%rip), %rsi      # 0x7283
leaq 0x2a70(%rip), %rdx      # 0x71a7
movq %r14, %rdi
movl %ebp, %ecx
movq %r15, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x1220
pushq $0x1
popq %rdi
callq 0x11b0