// File: /workspace/github_c_makefile_star2_O1/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 0x8fd05
addl $-0xb, %ecx
cmpl $0x3, %ecx
ja 0xe16d4
leaq 0x8109a(%rip), %rax     # 0x110d80
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 0xe16d4
leaq 0x81028(%rip), %r8      # 0x110d40
movslq (%r8,%rcx,4), %rcx
addq %r8, %rcx
jmpq *%rcx
addl $-0xb, %eax
cmpl $0x3, %eax
ja 0x10da66
leaq 0x8103c(%rip), %rcx     # 0x110d70
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cvtsi2sdq 0x8(%rsi), %xmm0
cmpneqsd 0x8(%rdx), %xmm0
jmp 0x8fd7a
addl $-0xb, %eax
cmpl $0x3, %eax
ja 0x10da66
leaq 0x80ff2(%rip), %rcx     # 0x110d50
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cvtsi2sdq 0x8(%rdx), %xmm0
jmp 0x8fd74
movsd 0x8(%rdx), %xmm0
cmpneqsd 0x8(%rsi), %xmm0
movq %xmm0, %rax
andl $0x1, %eax
jmp 0x8fe53
leal -0xb(%rax), %ecx
cmpl $0x3, %ecx
jb 0x8fdd7
cmpl $0xe, %eax
jne 0x10da66
movsd 0x8(%rsi), %xmm0
ucomisd 0x8(%rdx), %xmm0
jne 0x8fdf8
jp 0x8fdf8
movsd 0x10(%rsi), %xmm0
movl $0x118, %eax            # imm = 0x118
ucomisd 0x10(%rdx), %xmm0
jne 0x8fdf8
jnp 0x8fdfd
jmp 0x8fdf8
addl $-0xb, %eax
cmpl $0x3, %eax
ja 0x10da66
leaq 0x80f92(%rip), %rcx     # 0x110d60
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x120(%rdi), %rax
retq
movq 0x8(%rsi), %rax
cmpq 0x8(%rdx), %rax
jne 0x8fdf8
movq 0x10(%rsi), %rcx
movl $0x118, %eax            # imm = 0x118
cmpq 0x10(%rdx), %rcx
je 0x8fdfd
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 0x8fe44
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