// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: g_is_nan
static s7_pointer g_is_nan(s7_scheme *sc, s7_pointer args)
    {
#define H_is_nan "(nan? obj) returns #t if obj is a NaN"
#define Q_is_nan sc->pl_bt

        s7_pointer x;
        x = car(args);
        switch (type(x))
        {
            case T_INTEGER:
            case T_RATIO:
                return(sc->F);

            case T_REAL:
                return(make_boolean(sc, is_NaN(real(x))));

            case T_COMPLEX:
                return(make_boolean(sc, (is_NaN(real_part(x))) || (is_NaN(imag_part(x)))));

#if WITH_GMP
            case T_BIG_INTEGER:
            case T_BIG_RATIO:
                return(sc->F);

            case T_BIG_REAL:
                return(make_boolean(sc, is_NaN(s7_real_part(x))));

            case T_BIG_COMPLEX:
                return(make_boolean(sc, (is_NaN(s7_real_part(x))) || (is_NaN(s7_imag_part(x)))));
#endif

            default:
                if (g_is_number(sc, args) != sc->F)
                    return(method_or_bust_with_type_one_arg(sc, x, sc->is_nan_symbol, list_1(sc, x), a_number_string));
        }
        return(sc->F);
    }

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movzbl (%rax), %eax
movl %eax, 0x34(%rsp)
addl $-0xb, %eax
subl $0x2, %eax
jb 0x70c8b
jmp 0x70c72
movl 0x34(%rsp), %eax
subl $0xd, %eax
je 0x70ca1
jmp 0x70c7d
movl 0x34(%rsp), %eax
subl $0xe, %eax
je 0x70ce9
jmp 0x70d44
movq 0x68(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0x70e58
movq 0x58(%rsp), %rax
movsd 0x8(%rax), %xmm0
callq 0x13860
testb $0x1, %al
jne 0x70cb6
jmp 0x70cc9
movq 0x68(%rsp), %rax
movq 0x118(%rax), %rax
movq %rax, 0x28(%rsp)
jmp 0x70cda
movq 0x68(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x70e58
movq 0x58(%rsp), %rax
movsd 0x8(%rax), %xmm0
callq 0x13860
testb $0x1, %al
jne 0x70d11
movq 0x58(%rsp), %rax
movsd 0x10(%rax), %xmm0
callq 0x13860
testb $0x1, %al
jne 0x70d11
jmp 0x70d24
movq 0x68(%rsp), %rax
movq 0x118(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x70d35
movq 0x68(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x70e58
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x63910
movq 0x68(%rsp), %rcx
cmpq 0x120(%rcx), %rax
je 0x70e45
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x68(%rsp), %rax
movq 0x1108(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x68(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x68(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x70dc9
movq 0x68(%rsp), %rdi
callq 0xc670
movq 0x68(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x50(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rcx
movq 0x1b40b7(%rip), %r8     # 0x224ef0
callq 0x1ba7e0
movq %rax, 0x70(%rsp)
jmp 0x70e58
jmp 0x70e47
movq 0x68(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)