// File: /workspace/github_c_makefile_star2_O2/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 0x6e90e
addl $-0xb, %ecx
cmpl $0x3, %ecx
ja 0xab5fc
leaq 0x654f1(%rip), %rax     # 0xd3de0
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 0xab5fc
leaq 0x6547f(%rip), %r8      # 0xd3da0
movslq (%r8,%rcx,4), %rcx
addq %r8, %rcx
jmpq *%rcx
addl $-0xb, %eax
cmpl $0x3, %eax
ja 0xd095b
leaq 0x65493(%rip), %rcx     # 0xd3dd0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cvtsi2sdq 0x8(%rsi), %xmm0
cmpneqsd 0x8(%rdx), %xmm0
jmp 0x6e983
addl $-0xb, %eax
cmpl $0x3, %eax
ja 0xd095b
leaq 0x65449(%rip), %rcx     # 0xd3db0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cvtsi2sdq 0x8(%rdx), %xmm0
jmp 0x6e97d
movsd 0x8(%rdx), %xmm0
cmpneqsd 0x8(%rsi), %xmm0
movq %xmm0, %rax
andl $0x1, %eax
jmp 0x6ea5c
leal -0xb(%rax), %ecx
cmpl $0x3, %ecx
jb 0x6e9e0
cmpl $0xe, %eax
jne 0xd095b
movsd 0x8(%rsi), %xmm0
ucomisd 0x8(%rdx), %xmm0
jne 0x6ea01
jp 0x6ea01
movsd 0x10(%rsi), %xmm0
movl $0x118, %eax            # imm = 0x118
ucomisd 0x10(%rdx), %xmm0
jne 0x6ea01
jnp 0x6ea06
jmp 0x6ea01
addl $-0xb, %eax
cmpl $0x3, %eax
ja 0xd095b
leaq 0x653e9(%rip), %rcx     # 0xd3dc0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x120(%rdi), %rax
retq
movq 0x8(%rsi), %rax
cmpq 0x8(%rdx), %rax
jne 0x6ea01
movq 0x10(%rsi), %rcx
movl $0x118, %eax            # imm = 0x118
cmpq 0x10(%rdx), %rcx
je 0x6ea06
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 0x6ea4d
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