// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: num_eq_p_pp
static s7_pointer num_eq_p_pp(s7_scheme *sc, s7_pointer x, s7_pointer y)
    {
#if (!MS_WINDOWS)
        if (type(x) == type(y))
        {
            if (type(x) == T_INTEGER)
                return(make_boolean(sc, integer(x) == integer(y)));
            if (type(x) == T_REAL)
                return(make_boolean(sc, real(x) == real(y)));
            if (type(x) == T_COMPLEX)
                return(make_boolean(sc, (real_part(x) == real_part(y)) && (imag_part(x) == imag_part(y))));
            if (type(x) == T_RATIO)
                return(make_boolean(sc, (numerator(x) == numerator(y)) && (denominator(x) == denominator(y))));
        }
#endif

        switch (type(x))
        {
            case T_INTEGER:
                switch (type(y))
                {
                    case T_INTEGER: return(make_boolean(sc, integer(x) == integer(y)));
                    case T_RATIO:   return(sc->F);
                    case T_REAL:    return(make_boolean(sc, integer(x) == real(y)));
                    case T_COMPLEX: return(sc->F);
                    default:
                                    return(eq_out_y(sc, x, y));
                }
                break;

            case T_RATIO:
                switch (type(y))
                {
                    case T_INTEGER: return(sc->F);
                    case T_RATIO:   return(make_boolean(sc, (numerator(x) == numerator(y)) && (denominator(x) == denominator(y))));
                    case T_REAL:    return(make_boolean(sc, fraction(x) == real(y)));            /* this could avoid the divide via numerator == denominator * x */
                    case T_COMPLEX: return(sc->F);
                    default:
                                    return(eq_out_y(sc, x, y));
                }
                break;

            case T_REAL:
                switch (type(y))
                {
                    case T_INTEGER: return(make_boolean(sc, real(x) == integer(y)));
                    case T_RATIO:   return(make_boolean(sc, real(x) == fraction(y)));
                    case T_REAL:    return(make_boolean(sc, real(x) == real(y)));
                    case T_COMPLEX: return(sc->F);
                    default:
                                    return(eq_out_y(sc, x, y));
                }
                break;

            case T_COMPLEX:
                switch (type(y))
                {
                    case T_INTEGER:
                    case T_RATIO:
                    case T_REAL:
                        return(sc->F);

#if (!MS_WINDOWS)
                    case T_COMPLEX:
                        return(make_boolean(sc, (real_part(x) == real_part(y)) && (imag_part(x) == imag_part(y))));
#else
                    case T_COMPLEX:
                        if ((real_part(x) == real_part(y)) && (imag_part(x) == imag_part(y))) return(sc->T); else return(sc->F);
#endif
                    default:
                        return(eq_out_y(sc, x, y));
                }
                break;

            default:
                return(eq_out_x(sc, x, y));
        }
        return(sc->F);
    }

// Assembly:
movzbl (%rsi), %ecx
movzbl (%rdx), %eax
cmpb %al, %cl
jne 0x89629
addl $-0xb, %ecx
cmpl $0x3, %ecx
ja 0xd8e70
leaq 0x7e7f6(%rip), %rax     # 0x107e00
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x8(%rsi), %rax
xorl %ecx, %ecx
cmpq 0x8(%rdx), %rax
setne %cl
movq 0x118(%rdi,%rcx,8), %rax
retq
addl $-0xb, %ecx
cmpl $0x3, %ecx
ja 0xd8e70
leaq 0x7e784(%rip), %r8      # 0x107dc0
movslq (%r8,%rcx,4), %rcx
addq %r8, %rcx
jmpq *%rcx
addl $-0xb, %eax
cmpl $0x3, %eax
ja 0x1044e4
leaq 0x7e798(%rip), %rcx     # 0x107df0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cvtsi2sdq 0x8(%rsi), %xmm0
cmpneqsd 0x8(%rdx), %xmm0
jmp 0x8969e
addl $-0xb, %eax
cmpl $0x3, %eax
ja 0x1044e4
leaq 0x7e74e(%rip), %rcx     # 0x107dd0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cvtsi2sdq 0x8(%rdx), %xmm0
jmp 0x89698
movsd 0x8(%rdx), %xmm0
cmpneqsd 0x8(%rsi), %xmm0
movq %xmm0, %rax
andl $0x1, %eax
jmp 0x89777
leal -0xb(%rax), %ecx
cmpl $0x3, %ecx
jb 0x896fb
cmpl $0xe, %eax
jne 0x1044e4
movsd 0x8(%rsi), %xmm0
ucomisd 0x8(%rdx), %xmm0
jne 0x8971c
jp 0x8971c
movsd 0x10(%rsi), %xmm0
movl $0x118, %eax            # imm = 0x118
ucomisd 0x10(%rdx), %xmm0
jne 0x8971c
jnp 0x89721
jmp 0x8971c
addl $-0xb, %eax
cmpl $0x3, %eax
ja 0x1044e4
leaq 0x7e6ee(%rip), %rcx     # 0x107de0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x120(%rdi), %rax
retq
movq 0x8(%rsi), %rax
cmpq 0x8(%rdx), %rax
jne 0x8971c
movq 0x10(%rsi), %rcx
movl $0x118, %eax            # imm = 0x118
cmpq 0x10(%rdx), %rcx
je 0x89721
movl $0x120, %eax            # imm = 0x120
movq (%rdi,%rax), %rax
retq
fldl 0x8(%rsi)
movq 0x8(%rdx), %rax
movq 0x10(%rdx), %rcx
movq %rax, -0x8(%rsp)
fildll -0x8(%rsp)
movq %rcx, -0x10(%rsp)
fildll -0x10(%rsp)
fdivrp %st, %st(1)
jmp 0x89768
movq 0x8(%rsi), %rax
movq 0x10(%rsi), %rcx
movq %rax, -0x18(%rsp)
fildll -0x18(%rsp)
movq %rcx, -0x20(%rsp)
fildll -0x20(%rsp)
fdivrp %st, %st(1)
fldl 0x8(%rdx)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
setp %al
setne %cl
orb %al, %cl
movzbl %cl, %eax
movq 0x118(%rdi,%rax,8), %rax
retq