// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: g_atanh
static s7_pointer g_atanh(s7_scheme *sc, s7_pointer args)
    {
#define H_atanh "(atanh z) returns atanh(z)"
#define Q_atanh sc->pl_nn
        s7_pointer x;
        x = car(args);
        switch (type(x))
        {
            case T_INTEGER:
                if (integer(x) == 0) return(small_int(0));                    /* (atanh 0) -> 0 */

            case T_REAL:
            case T_RATIO:
                {
                    double x1;
                    x1 = s7_real(x);
                    if (fabs(x1) < 1.0)
                        return(make_real(sc, atanh(x1)));
                }

                /* if we can't distinguish x from 1.0 even with long doubles, we'll get inf.0:
                 *    (atanh 9223372036854775/9223372036854776) -> 18.714973875119
                 *    (atanh 92233720368547758/92233720368547757) -> inf.0
                 */
            case T_COMPLEX:
#if HAVE_COMPLEX_NUMBERS
#if (defined(__OpenBSD__)) || (defined(__NetBSD__))
                return(s7_from_c_complex(sc, catanh_1(s7_to_c_complex(x))));
#else
                return(s7_from_c_complex(sc, catanh(s7_to_c_complex(x))));
#endif
#else
                return(out_of_range(sc, sc->atanh_symbol, small_int(1), x, no_complex_numbers_string));
#endif

            default:
                return(method_or_bust_with_type_one_arg(sc, x, sc->atanh_symbol, list_1(sc, x), a_number_string));
        }
    }

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movzbl (%rax), %eax
movl %eax, 0x24(%rsp)
subl $0xb, %eax
je 0x75fd1
jmp 0x75fb1
movl 0x24(%rsp), %eax
addl $-0xc, %eax
subl $0x2, %eax
jb 0x75ff6
jmp 0x75fbf
movl 0x24(%rsp), %eax
subl $0xe, %eax
je 0x760d3
jmp 0x76139
movq 0x88(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x75ff4
movq 0x1a0499(%rip), %rax    # 0x216480
movq %rax, 0xa0(%rsp)
jmp 0x76233
jmp 0x75ff6
movq 0x88(%rsp), %rdi
callq 0x128d0
movsd %xmm0, 0x80(%rsp)
movsd 0x80(%rsp), %xmm1
movaps 0x16ba84(%rip), %xmm0   # 0x1e1aa0
pand %xmm0, %xmm1
movsd 0x16b940(%rip), %xmm0   # 0x1e1968
ucomisd %xmm1, %xmm0
jbe 0x760d1
movsd 0x80(%rsp), %xmm0
callq 0x9080
movsd %xmm0, 0x70(%rsp)
movq 0x98(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x98(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x76073
movq 0x98(%rsp), %rdi
callq 0xc670
movq 0x98(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq $0xd, (%rax)
movsd 0x70(%rsp), %xmm0
movq 0x78(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x76233
jmp 0x760d3
movq 0x98(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x88(%rsp), %rdi
callq 0x1bb600
movsd %xmm0, 0x58(%rsp)
movsd %xmm1, 0x60(%rsp)
movsd 0x58(%rsp), %xmm0
movsd 0x60(%rsp), %xmm1
callq 0x94d0
movq 0x18(%rsp), %rdi
movsd %xmm0, 0x48(%rsp)
movsd %xmm1, 0x50(%rsp)
movsd 0x48(%rsp), %xmm0
movsd 0x50(%rsp), %xmm1
callq 0x1bb560
movq %rax, 0xa0(%rsp)
jmp 0x76233
movq 0x98(%rsp), %rax
movq %rax, (%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rax
movq 0xc10(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x98(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x98(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x98(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x761b4
movq 0x98(%rsp), %rdi
callq 0xc670
movq 0x98(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rsi
movq (%rsp), %rdi
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x30(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rcx
movq 0x1aecca(%rip), %r8     # 0x224ef0
callq 0x1ba7e0
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)