// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: g_integer_decode_float
static s7_pointer g_integer_decode_float(s7_scheme *sc, s7_pointer args)
    {
#define H_integer_decode_float "(integer-decode-float x) returns a list containing the significand, exponent, and \
        sign of 'x' (1 = positive, -1 = negative).  (integer-decode-float 0.0): (0 0 1)"
#define Q_integer_decode_float s7_make_signature(sc, 2, sc->is_pair_symbol, sc->is_float_symbol)

        /* no matter what s7_double is, integer-decode-float acts as if x is a C double */

        typedef union {
            int64_t ix;
            double fx;
        } decode_float_t;

        decode_float_t num;
        s7_pointer x;
        x = car(args);

        switch (type(x))
        {
            case T_REAL:
                num.fx = (double)real(x);
                break;

#if WITH_GMP
            case T_BIG_REAL:
                num.fx = (double)s7_real(x);
                break;
#endif

            default:
                return(method_or_bust_with_type_one_arg(sc, x, sc->integer_decode_float_symbol, args, wrap_string(sc, "a non-rational real", 19)));
        }

        if (num.fx == 0.0)
            return(list_3(sc, small_int(0), small_int(0), small_int(1)));

        return(list_3(sc,
                    make_integer(sc, (s7_int)((num.ix & 0xfffffffffffffLL) | 0x10000000000000LL)),
                    make_integer(sc, (s7_int)(((num.ix & 0x7fffffffffffffffLL) >> 52) - 1023 - 52)),
                    make_integer(sc, ((num.ix & 0x8000000000000000LL) != 0) ? -1 : 1)));
    }

// Assembly:
subq $0x148, %rsp            # imm = 0x148
movq %rdi, 0x138(%rsp)
movq %rsi, 0x130(%rsp)
movq 0x130(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x120(%rsp)
movq 0x120(%rsp), %rax
movb (%rax), %al
subb $0xd, %al
jne 0x897c3
jmp 0x897ab
movq 0x120(%rsp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x128(%rsp)
jmp 0x89840
movq 0x138(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x138(%rsp), %rax
movq 0xfc0(%rax), %rax
movq %rax, 0x70(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x138(%rsp), %rdi
leaq 0x169e96(%rip), %rsi    # 0x1f36a3
movl $0x13, %edx
callq 0xb880
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x78(%rsp), %rcx
movq %rax, %r8
callq 0x1ba7e0
movq %rax, 0x140(%rsp)
jmp 0x89dae
movsd 0x128(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x89987
jp 0x89987
movq 0x138(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x18cc10(%rip), %rax    # 0x216480
movq %rax, 0x48(%rsp)
movq 0x138(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x18cbf7(%rip), %rax    # 0x216480
movq %rax, 0x58(%rsp)
movq 0x18cbf3(%rip), %rax    # 0x216488
movq %rax, 0x110(%rsp)
movq 0x138(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0x108(%rsp)
movq 0x138(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x138(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x898e1
movq 0x138(%rsp), %rdi
callq 0xc670
movq 0x138(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x118(%rsp)
movq 0x118(%rsp), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdi
movq 0x110(%rsp), %rcx
movq 0x118(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x108(%rsp), %rcx
movq 0x118(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x118(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0x100(%rsp), %rdx
callq 0xd9f0
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq %rax, %rdx
callq 0xd9f0
movq %rax, 0x140(%rsp)
jmp 0x89dae
movq 0x138(%rsp), %rax
movq %rax, 0x38(%rsp)
movabsq $0xfffffffffffff, %rax  # imm = 0xFFFFFFFFFFFFF
andq 0x128(%rsp), %rax
movabsq $0x10000000000000, %rcx # imm = 0x10000000000000
orq %rcx, %rax
movq %rax, 0xf8(%rsp)
movq 0xf8(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0x899ec
movq 0xf8(%rsp), %rcx
leaq 0x18caa2(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x30(%rsp)
jmp 0x89a84
jmp 0x899ee
movq 0x138(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x138(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x89a1b
movq 0x138(%rsp), %rdi
callq 0xc670
movq 0x138(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq $0xb, (%rax)
movq 0xf8(%rsp), %rcx
movq 0xe8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xe8(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x138(%rsp), %rax
movq %rax, 0x28(%rsp)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
andq 0x128(%rsp), %rax
sarq $0x34, %rax
subq $0x3ff, %rax            # imm = 0x3FF
subq $0x34, %rax
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0x89b04
movq 0xd8(%rsp), %rcx
leaq 0x18c98a(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
jmp 0x89b9c
jmp 0x89b06
movq 0x138(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x138(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x89b33
movq 0x138(%rsp), %rdi
callq 0xc670
movq 0x138(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0xc8(%rsp)
movq 0xc8(%rsp), %rax
movq $0xb, (%rax)
movq 0xd8(%rsp), %rcx
movq 0xc8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xc8(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x10(%rsp)
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
andq 0x128(%rsp), %rdx
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq $0x0, %rdx
cmovnel %ecx, %eax
cltq
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0x89c14
movq 0xa0(%rsp), %rcx
leaq 0x18c87a(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
jmp 0x89cac
jmp 0x89c16
movq 0x138(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x138(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x89c43
movq 0x138(%rsp), %rdi
callq 0xc670
movq 0x138(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq $0xb, (%rax)
movq 0xa0(%rsp), %rcx
movq 0x90(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x90(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x138(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0x138(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x138(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x89d0d
movq 0x138(%rsp), %rdi
callq 0xc670
movq 0x138(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq 0x10(%rsp), %rsi
movq 0x28(%rsp), %rdi
movq 0xb0(%rsp), %rcx
movq 0xb8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xa8(%rsp), %rcx
movq 0xb8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0xb8(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdx
callq 0xd9f0
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rax, %rdx
callq 0xd9f0
movq %rax, 0x140(%rsp)
movq 0x140(%rsp), %rax
addq $0x148, %rsp            # imm = 0x148
retq
nop