// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: c_rem_dbl
static s7_double c_rem_dbl(s7_scheme *sc, s7_double x, s7_double y)
    {
        s7_int quo;
        s7_double pre_quo;
        if (y == 0.0)
            division_by_zero_error(sc, sc->remainder_symbol, set_elist_2(sc, wrap_real(sc, x), wrap_real2(sc, y)));
        if ((is_inf(y)) || (is_NaN(y)))
            wrong_type_argument_with_type(sc, sc->remainder_symbol, 2, set_elist_1(sc, wrap_real(sc, y)), a_normal_real_string);

        pre_quo = x / y;
        if ((pre_quo > s7_int_max) || (pre_quo < s7_int_min))
            simple_out_of_range(sc, sc->remainder_symbol, set_elist_2(sc, make_real(sc, x), wrap_real(sc, y)), its_too_large_string);
        if (pre_quo > 0.0)
            quo = (s7_int)floor(pre_quo);
        else quo = (s7_int)ceil(pre_quo);
        return(x - (y * quo));
    }

// Assembly:
subq $0xc8, %rsp
movq %rdi, 0xc0(%rsp)
movsd %xmm0, 0xb8(%rsp)
movsd %xmm1, 0xb0(%rsp)
movsd 0xb0(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1d9930
jp 0x1d9930
movq 0xc0(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xc0(%rsp), %rax
movq 0x1470(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xc0(%rsp), %rdi
movsd 0xb8(%rsp), %xmm0
callq 0x1bc2f0
movq %rax, 0x50(%rsp)
movq 0xc0(%rsp), %rdi
movsd 0xb0(%rsp), %xmm0
callq 0x1c1630
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq %rax, %rdx
callq 0xb830
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq %rax, %rdx
callq 0x123b0
movsd 0xb0(%rsp), %xmm1
movaps %xmm1, %xmm0
movaps 0x815d(%rip), %xmm2     # 0x1e1aa0
pand %xmm2, %xmm0
movq %xmm1, %rdx
movl $0x1, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x0, %rdx
cmovll %eax, %ecx
movsd 0x800b(%rip), %xmm1     # 0x1e1970
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setnp %sil
sete %dl
testb %sil, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
jne 0x1d9994
movsd 0xb0(%rsp), %xmm0
callq 0x13860
testb $0x1, %al
jne 0x1d9994
jmp 0x1d9b05
movq 0xc0(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xc0(%rsp), %rax
movq 0x1470(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x40(%rsp)
movq $0x2, 0x98(%rsp)
movq 0x98(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0x1d99f6
movq 0x98(%rsp), %rcx
leaq 0x3ca98(%rip), %rax     # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x30(%rsp)
jmp 0x1d9a8e
jmp 0x1d99f8
movq 0xc0(%rsp), %rax
movq 0x90(%rax), %rax
movq 0xc0(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x1d9a25
movq 0xc0(%rsp), %rdi
callq 0xc670
movq 0xc0(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq $0xb, (%rax)
movq 0x98(%rsp), %rcx
movq 0x88(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x88(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xc0(%rsp), %rdi
movsd 0xb0(%rsp), %xmm0
callq 0x1bc2f0
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0xc3820
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rax, %rcx
movq 0xc0(%rsp), %rax
movq 0x140(%rax), %r8
movq 0x40a68(%rip), %r9      # 0x21a568
callq 0xc560
movsd 0xb8(%rsp), %xmm0
divsd 0xb0(%rsp), %xmm0
movsd %xmm0, 0xa0(%rsp)
movsd 0xa0(%rsp), %xmm0
cvtsi2sdq 0x40c06(%rip), %xmm1 # 0x21a738
ucomisd %xmm1, %xmm0
ja 0x1d9b54
movsd 0xa0(%rsp), %xmm1
cvtsi2sdq 0x40a0e(%rip), %xmm0 # 0x21a558
ucomisd %xmm1, %xmm0
jbe 0x1d9c57
movq 0xc0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xc0(%rsp), %rax
movq 0x1470(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x18(%rsp)
movsd 0xb8(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
movq 0xc0(%rsp), %rax
movq 0x90(%rax), %rax
movq 0xc0(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x1d9bc2
movq 0xc0(%rsp), %rdi
callq 0xc670
movq 0xc0(%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, (%rsp)
movq 0xc0(%rsp), %rdi
movsd 0xb0(%rsp), %xmm0
callq 0x1bc2f0
movq 0x18(%rsp), %rdi
movq (%rsp), %rsi
movq %rax, %rdx
callq 0xb830
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rdx
movq 0x4091e(%rip), %rcx     # 0x21a570
callq 0x45240
movsd 0xa0(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x1d9c86
movsd 0xa0(%rsp), %xmm0
callq 0x95f0
cvttsd2si %xmm0, %rax
movq %rax, 0xa8(%rsp)
jmp 0x1d9ca1
movsd 0xa0(%rsp), %xmm0
callq 0x96c0
cvttsd2si %xmm0, %rax
movq %rax, 0xa8(%rsp)
movsd 0xb8(%rsp), %xmm1
movsd 0xb0(%rsp), %xmm0
cvtsi2sdq 0xa8(%rsp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)