// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/cfuns.c
// Function: do_apply
static JanetSlot do_apply(JanetFopts opts, JanetSlot *args) {
    /* Push phase */
    JanetCompiler *c = opts.compiler;
    int32_t i;
    for (i = 1; i < janet_v_count(args) - 3; i += 3)
        janetc_emit_sss(c, JOP_PUSH_3, args[i], args[i + 1], args[i + 2], 0);
    if (i == janet_v_count(args) - 3)
        janetc_emit_ss(c, JOP_PUSH_2, args[i], args[i + 1], 0);
    else if (i == janet_v_count(args) - 2)
        janetc_emit_s(c, JOP_PUSH, args[i], 0);
    /* Push array phase */
    janetc_emit_s(c, JOP_PUSH_ARRAY, janet_v_last(args), 0);
    /* Call phase */
    JanetSlot target;
    if (opts.flags & JANET_FOPTS_TAIL) {
        janetc_emit_s(c, JOP_TAILCALL, args[0], 0);
        target = janetc_cslot(janet_wrap_nil());
        target.flags |= JANET_SLOT_RETURNED;
    } else {
        target = janetc_gettarget(opts);
        janetc_emit_ss(c, JOP_CALL, target, args[0], 1);
    }
    return target;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, -0x60(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq %rsi, -0x8(%rbp)
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x6c(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1da76
movq -0x8(%rbp), %rax
movl -0x4(%rax), %eax
movl %eax, -0x70(%rbp)
jmp 0x1da7d
xorl %eax, %eax
movl %eax, -0x70(%rbp)
jmp 0x1da7d
movl -0x6c(%rbp), %eax
movl -0x70(%rbp), %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jge 0x1db2f
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %r8
movslq -0x14(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %r8
movq -0x8(%rbp), %rcx
movl -0x14(%rbp), %eax
addl $0x1, %eax
cltq
imulq $0x18, %rax, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl $0x33, %esi
xorl %edx, %edx
movq (%r8), %r9
movq %r9, (%rsp)
movq 0x8(%r8), %r9
movq %r9, 0x8(%rsp)
movq 0x10(%r8), %r8
movq %r8, 0x10(%rsp)
movq (%rcx), %r8
movq %r8, 0x18(%rsp)
movq 0x8(%rcx), %r8
movq %r8, 0x20(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x28(%rsp)
movq (%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x40(%rsp)
callq 0x2a2c0
movl -0x14(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x14(%rbp)
jmp 0x1da5d
movl -0x14(%rbp), %eax
movl %eax, -0x74(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1db48
movq -0x8(%rbp), %rax
movl -0x4(%rax), %eax
movl %eax, -0x78(%rbp)
jmp 0x1db4f
xorl %eax, %eax
movl %eax, -0x78(%rbp)
jmp 0x1db4f
movl -0x74(%rbp), %eax
movl -0x78(%rbp), %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jne 0x1dbc4
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rcx
movslq -0x14(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rcx
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl $0x32, %esi
xorl %edx, %edx
movq (%rcx), %r8
movq %r8, (%rsp)
movq 0x8(%rcx), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x29e90
jmp 0x1dc2b
movl -0x14(%rbp), %eax
movl %eax, -0x7c(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1dbdd
movq -0x8(%rbp), %rax
movl -0x4(%rax), %eax
movl %eax, -0x80(%rbp)
jmp 0x1dbe4
xorl %eax, %eax
movl %eax, -0x80(%rbp)
jmp 0x1dbe4
movl -0x7c(%rbp), %eax
movl -0x80(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jne 0x1dc29
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0x31, %esi
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29990
jmp 0x1dc2b
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movl -0x4(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0x34, %esi
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29990
movq -0x58(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
je 0x1dcf6
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl $0x36, %esi
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x29990
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x1ff40
movq -0x68(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl 0x10(%rax), %ecx
orl $0x100000, %ecx         # imm = 0x100000
movl %ecx, 0x10(%rax)
jmp 0x1dd81
movq -0x58(%rbp), %rcx
movq 0x20(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x50(%rbp), %rdi
callq 0x213c0
movq -0x68(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rax, (%rcx)
movq -0x48(%rbp), %rax
movq %rax, 0x8(%rcx)
movq -0x40(%rbp), %rax
movq %rax, 0x10(%rcx)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl $0x35, %esi
movl $0x1, %edx
movq (%rcx), %r8
movq %r8, (%rsp)
movq 0x8(%rcx), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x29e90
movq -0x60(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
nop