// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: c_acos
static s7_pointer c_acos(s7_scheme *sc, s7_double x)
    {
        s7_double absx, recip;
        s7_complex result;

        absx = fabs(x);
        if (absx <= 1.0)
            return(make_real(sc, acos(x)));

        /* else follow maxima again: */
        recip = 1.0 / absx;
        if (x > 0.0)
            result = _Complex_I * clog(absx * (1.0 + (sqrt(1.0 + recip) * csqrt(1.0 - recip))));
        else result = M_PI - _Complex_I * clog(absx * (1.0 + (sqrt(1.0 + recip) * csqrt(1.0 - recip))));
        return(s7_from_c_complex(sc, result));
    }

// Assembly:
subq $0x128, %rsp            # imm = 0x128
movq %rdi, 0x118(%rsp)
movsd %xmm0, 0x110(%rsp)
movsd 0x110(%rsp), %xmm0
movaps 0x26018(%rip), %xmm1    # 0x1e1aa0
pand %xmm1, %xmm0
movsd %xmm0, 0x108(%rsp)
movsd 0x25ecb(%rip), %xmm0    # 0x1e1968
ucomisd 0x108(%rsp), %xmm0
jb 0x1bbb63
movsd 0x110(%rsp), %xmm0
callq 0x9320
movsd %xmm0, 0xe0(%rsp)
movq 0x118(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x118(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x1bbaf0
movq 0x118(%rsp), %rdi
callq 0xc670
movq 0x118(%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 $0xd, (%rax)
movsd 0xe0(%rsp), %xmm0
movq 0xe8(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movq 0xe8(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x120(%rsp)
jmp 0x1bbf20
movsd 0x25dfd(%rip), %xmm0    # 0x1e1968
divsd 0x108(%rsp), %xmm0
movsd %xmm0, 0x100(%rsp)
movsd 0x110(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x1bbd2b
movsd 0x108(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x25dbe(%rip), %xmm0    # 0x1e1968
addsd 0x100(%rsp), %xmm0
callq 0x9690
movsd %xmm0, 0x48(%rsp)
movsd 0x25da2(%rip), %xmm0    # 0x1e1968
subsd 0x100(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xd0(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd 0xd0(%rsp), %xmm1
callq 0x9560
movsd 0x48(%rsp), %xmm2
movaps %xmm0, %xmm4
movsd 0x50(%rsp), %xmm0
movaps %xmm1, %xmm3
movaps %xmm2, %xmm1
mulsd %xmm4, %xmm1
mulsd %xmm3, %xmm2
movsd 0x25d48(%rip), %xmm3    # 0x1e1968
addsd %xmm1, %xmm3
movaps %xmm0, %xmm1
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
movsd %xmm1, 0xb8(%rsp)
movsd %xmm0, 0xc0(%rsp)
movsd 0xb8(%rsp), %xmm0
movsd 0xc0(%rsp), %xmm1
callq 0x92a0
movaps %xmm0, %xmm4
movsd %xmm4, 0x58(%rsp)
movaps %xmm1, %xmm2
movsd %xmm2, 0x60(%rsp)
xorps %xmm0, %xmm0
mulsd %xmm4, %xmm0
movsd 0x25cef(%rip), %xmm3    # 0x1e1968
mulsd %xmm2, %xmm3
xorps %xmm1, %xmm1
mulsd %xmm2, %xmm1
movsd 0x25cdc(%rip), %xmm2    # 0x1e1968
mulsd %xmm4, %xmm2
subsd %xmm3, %xmm0
movsd %xmm0, 0x68(%rsp)
addsd %xmm2, %xmm1
movsd %xmm1, 0x70(%rsp)
ucomisd %xmm0, %xmm0
movsd %xmm0, 0x78(%rsp)
movsd %xmm1, 0x80(%rsp)
jnp 0x1bbd05
movsd 0x70(%rsp), %xmm1
movsd 0x68(%rsp), %xmm0
ucomisd %xmm1, %xmm1
movsd %xmm0, 0x78(%rsp)
movsd %xmm1, 0x80(%rsp)
jnp 0x1bbd05
movsd 0x60(%rsp), %xmm3
movsd 0x58(%rsp), %xmm2
xorps %xmm0, %xmm0
movsd 0x25c77(%rip), %xmm1    # 0x1e1968
callq 0x1dc190
movsd %xmm0, 0x78(%rsp)
movsd %xmm1, 0x80(%rsp)
movsd 0x78(%rsp), %xmm1
movsd 0x80(%rsp), %xmm0
movsd %xmm1, 0xf0(%rsp)
movsd %xmm0, 0xf8(%rsp)
jmp 0x1bbed5
movsd 0x108(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x25c26(%rip), %xmm0    # 0x1e1968
addsd 0x100(%rsp), %xmm0
callq 0x9690
movsd %xmm0, 0x8(%rsp)
movsd 0x25c0a(%rip), %xmm0    # 0x1e1968
subsd 0x100(%rsp), %xmm0
movsd %xmm0, 0xa8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xb0(%rsp)
movsd 0xa8(%rsp), %xmm0
movsd 0xb0(%rsp), %xmm1
callq 0x9560
movsd 0x8(%rsp), %xmm2
movaps %xmm0, %xmm4
movsd 0x10(%rsp), %xmm0
movaps %xmm1, %xmm3
movaps %xmm2, %xmm1
mulsd %xmm4, %xmm1
mulsd %xmm3, %xmm2
movsd 0x25bb0(%rip), %xmm3    # 0x1e1968
addsd %xmm1, %xmm3
movaps %xmm0, %xmm1
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
movsd %xmm1, 0x98(%rsp)
movsd %xmm0, 0xa0(%rsp)
movsd 0x98(%rsp), %xmm0
movsd 0xa0(%rsp), %xmm1
callq 0x92a0
movaps %xmm0, %xmm4
movsd %xmm4, 0x18(%rsp)
movaps %xmm1, %xmm2
movsd %xmm2, 0x20(%rsp)
xorps %xmm0, %xmm0
mulsd %xmm4, %xmm0
movsd 0x25b57(%rip), %xmm3    # 0x1e1968
mulsd %xmm2, %xmm3
xorps %xmm1, %xmm1
mulsd %xmm2, %xmm1
movsd 0x25b44(%rip), %xmm2    # 0x1e1968
mulsd %xmm4, %xmm2
subsd %xmm3, %xmm0
movsd %xmm0, 0x28(%rsp)
addsd %xmm2, %xmm1
movsd %xmm1, 0x30(%rsp)
ucomisd %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
movsd %xmm1, 0x40(%rsp)
jnp 0x1bbe94
movsd 0x30(%rsp), %xmm1
movsd 0x28(%rsp), %xmm0
ucomisd %xmm1, %xmm1
movsd %xmm0, 0x38(%rsp)
movsd %xmm1, 0x40(%rsp)
jnp 0x1bbe94
movsd 0x20(%rsp), %xmm3
movsd 0x18(%rsp), %xmm2
xorps %xmm0, %xmm0
movsd 0x25ae5(%rip), %xmm1    # 0x1e1968
callq 0x1dc190
movsd %xmm0, 0x38(%rsp)
movsd %xmm1, 0x40(%rsp)
movsd 0x38(%rsp), %xmm2
movsd 0x40(%rsp), %xmm0
movsd 0x25b30(%rip), %xmm1    # 0x1e19d8
subsd %xmm2, %xmm1
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm1, 0xf0(%rsp)
movsd %xmm0, 0xf8(%rsp)
movq 0x118(%rsp), %rdi
movsd 0xf0(%rsp), %xmm1
movsd 0xf8(%rsp), %xmm0
movsd %xmm1, 0x88(%rsp)
movsd %xmm0, 0x90(%rsp)
movsd 0x88(%rsp), %xmm0
movsd 0x90(%rsp), %xmm1
callq 0x1bb560
movq %rax, 0x120(%rsp)
movq 0x120(%rsp), %rax
addq $0x128, %rsp            # imm = 0x128
retq