// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: g_tanh
static s7_pointer g_tanh(s7_scheme *sc, s7_pointer args)
    {
#define H_tanh "(tanh z) returns tanh(z)"
#define Q_tanh sc->pl_nn

        s7_pointer x;
        x = car(args);
        switch (type(x))
        {
            case T_INTEGER:
                if (integer(x) == 0) return(small_int(0));  /* (tanh 0) -> 0 */

            case T_REAL:
            case T_RATIO:
                return(make_real(sc, tanh(s7_real(x))));

            case T_COMPLEX:
#if HAVE_COMPLEX_NUMBERS
                if (real_part(x) > 350.0)
                    return(real_one);                         /* closer than 0.0 which is what ctanh is about to return! */
                if (real_part(x) < -350.0)
                    return(make_real(sc, -1.0));              /* closer than ctanh's -0.0 */
                return(s7_from_c_complex(sc, ctanh(as_c_complex(x))));
#else
                return(out_of_range(sc, sc->tanh_symbol, small_int(1), x, no_complex_numbers_string));
#endif

            default:
                return(method_or_bust_with_type_one_arg(sc, x, sc->tanh_symbol, args, a_number_string));
        }
    }

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movzbl (%rax), %eax
movl %eax, 0x14(%rsp)
subl $0xb, %eax
je 0x755f2
jmp 0x755d2
movl 0x14(%rsp), %eax
addl $-0xc, %eax
subl $0x2, %eax
jb 0x75614
jmp 0x755e0
movl 0x14(%rsp), %eax
subl $0xe, %eax
je 0x756a8
jmp 0x757fa
movq 0x68(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x75612
movq 0x1a0e7b(%rip), %rax    # 0x216480
movq %rax, 0x80(%rsp)
jmp 0x75829
jmp 0x75614
movq 0x68(%rsp), %rdi
callq 0x128d0
callq 0x9610
movsd %xmm0, 0x58(%rsp)
movq 0x78(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x78(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x7564d
movq 0x78(%rsp), %rdi
callq 0xc670
movq 0x78(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq $0xd, (%rax)
movsd 0x58(%rsp), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x75829
movq 0x68(%rsp), %rax
movsd 0x8(%rax), %xmm0
movsd 0x16c336(%rip), %xmm1   # 0x1e19f0
ucomisd %xmm1, %xmm0
jbe 0x756d4
movq 0x1af949(%rip), %rax    # 0x225010
movq %rax, 0x80(%rsp)
jmp 0x75829
movq 0x68(%rsp), %rax
movsd 0x16c317(%rip), %xmm0   # 0x1e19f8
ucomisd 0x8(%rax), %xmm0
jbe 0x75779
movsd 0x16c30c(%rip), %xmm0   # 0x1e1a00
movsd %xmm0, 0x40(%rsp)
movq 0x78(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x78(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x7571e
movq 0x78(%rsp), %rdi
callq 0xc670
movq 0x78(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq $0xd, (%rax)
movsd 0x40(%rsp), %xmm0
movq 0x48(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x75829
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rax
movsd 0x8(%rax), %xmm1
movq 0x68(%rsp), %rax
movsd 0x10(%rax), %xmm0
xorps %xmm3, %xmm3
movaps %xmm0, %xmm2
mulsd %xmm3, %xmm2
movsd 0x16c1bf(%rip), %xmm3   # 0x1e1968
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm1
movsd %xmm1, 0x28(%rsp)
movsd %xmm0, 0x30(%rsp)
movsd 0x28(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
callq 0x9140
movq 0x8(%rsp), %rdi
movsd %xmm0, 0x18(%rsp)
movsd %xmm1, 0x20(%rsp)
movsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
callq 0x1bb560
movq %rax, 0x80(%rsp)
jmp 0x75829
movq 0x78(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x78(%rsp), %rax
movq 0x15e0(%rax), %rdx
movq 0x70(%rsp), %rcx
movq 0x1af6d4(%rip), %r8     # 0x224ef0
callq 0x1ba7e0
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
addq $0x88, %rsp
retq
nopl (%rax)