// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/specials.c
// Function: janetc_check_nil_form
static int janetc_check_nil_form(Janet x, Janet *capture, uint32_t fun_tag) {
    if (!janet_checktype(x, JANET_TUPLE)) return 0;
    JanetTuple tup = janet_unwrap_tuple(x);
    if (3 != janet_tuple_length(tup)) return 0;
    Janet op1 = tup[0];
    if (!janet_checktype(op1, JANET_FUNCTION)) return 0;
    JanetFunction *fun = janet_unwrap_function(op1);
    uint32_t tag = fun->def->flags & JANET_FUNCDEF_FLAG_TAG;
    if (tag != fun_tag) return 0;
    if (janet_checktype(tup[1], JANET_NIL)) {
        *capture = tup[2];
        return 1;
    } else if (janet_checktype(tup[2], JANET_NIL)) {
        *capture = tup[1];
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x637ab
jmp 0x637d1
movsd -0x10(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x637bd
jmp 0x637fa
movq -0x10(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x637fa
jmp 0x637ee
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x10(%rbp), %rax
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
cmpq %rcx, %rax
je 0x637fa
movl $0x0, -0x4(%rbp)
jmp 0x6399e
movq -0x10(%rbp), %rdi
callq 0x7b260
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movl $0x3, %eax
cmpl -0x10(%rcx), %eax
je 0x63821
movl $0x0, -0x4(%rbp)
jmp 0x6399e
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x63834
jmp 0x6385a
movsd -0x30(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x63846
jmp 0x63883
movq -0x30(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x63883
jmp 0x63877
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x30(%rbp), %rax
movabsq $-0x2000000000000, %rcx # imm = 0xFFFE000000000000
cmpq %rcx, %rax
je 0x63883
movl $0x0, -0x4(%rbp)
jmp 0x6399e
movq -0x30(%rbp), %rdi
callq 0x7b260
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x58(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
je 0x638b7
movl $0x0, -0x4(%rbp)
jmp 0x6399e
xorl %eax, %eax
testb $0x1, %al
jne 0x638bf
jmp 0x638ed
movq -0x28(%rbp), %rax
movsd 0x8(%rax), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x638d5
jmp 0x6390e
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x6390e
jmp 0x63926
movq -0x28(%rbp), %rcx
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq 0x8(%rcx), %rax
movabsq $-0x7800000000000, %rcx # imm = 0xFFF8800000000000
cmpq %rcx, %rax
jne 0x63926
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x6399e
xorl %eax, %eax
testb $0x1, %al
jne 0x6392e
jmp 0x6395c
movq -0x28(%rbp), %rax
movsd 0x10(%rax), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x63944
jmp 0x6397d
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x6397d
jmp 0x63995
movq -0x28(%rbp), %rcx
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq 0x10(%rcx), %rax
movabsq $-0x7800000000000, %rcx # imm = 0xFFF8800000000000
cmpq %rcx, %rax
jne 0x63995
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x6399e
jmp 0x63997
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)