// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfptest_template.h
// Function: test_cmp32
void test_cmp(F_UINT a, F_UINT b, int it)
{
    int r, ref;
    float_status st;
    uint32_t fflags, ref_fflags;
    const char *op_str;

    fflags = 0;
    r = glue(eq_quiet_sf, F_SIZE)(a, b, &fflags);
    
    softfloat_init_ctx(&st, RM_RNE);

    ref = glue(glue(float, F_SIZE), _eq_quiet)(sf_to_softfloat(a), 
                                               sf_to_softfloat(b), &st);
    ref_fflags = softfloat_to_fflags(&st);
    
    if (r != ref || ref_fflags != fflags) {
        op_str = "eq_quiet";
        goto error;
    }

    fflags = 0;
    r = glue(le_sf, F_SIZE)(a, b, &fflags);
    
    softfloat_init_ctx(&st, RM_RNE);

    ref = glue(glue(float, F_SIZE), _le)(sf_to_softfloat(a), 
                                         sf_to_softfloat(b), &st);
    ref_fflags = softfloat_to_fflags(&st);
    
    if (r != ref || ref_fflags != fflags) {
        op_str = "le";
        goto error;
    }

    fflags = 0;
    r = glue(lt_sf, F_SIZE)(a, b, &fflags);
    
    softfloat_init_ctx(&st, RM_RNE);

    ref = glue(glue(float, F_SIZE), _lt)(sf_to_softfloat(a), 
                                         sf_to_softfloat(b), &st);
    ref_fflags = softfloat_to_fflags(&st);
    
    if (r != ref || ref_fflags != fflags) {
        op_str = "lt";
    error:
        printf("ERROR op=%s size=%d it=%d:\n", 
               op_str, F_SIZE, it);
        printf("a  = "); print_sf(a); printf("\n");
        printf("b  = "); print_sf(b); printf("\n");
        printf("ref= %d", ref);
        printf(" fflags=0x%02x\n", ref_fflags);
        printf("r  = %d", r);
        printf(" fflags=0x%02x\n", fflags);
        exit(1);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r15d
movl %esi, %ebx
movl %edi, %r14d
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
callq 0x51b0
movl %eax, %ebp
leaq 0x10(%rsp), %r13
andl $0x0, (%r13)
andw $0x0, 0x4(%r13)
movb $0x1, 0x6(%r13)
movl %r14d, %edi
movl %ebx, %esi
movq %r13, %rdx
callq 0xbc5f
movl %eax, %r12d
movq %r13, %rdi
callq 0x137c
movl %eax, %r13d
leaq 0x123b8(%rip), %rsi     # 0x143aa
cmpl %r12d, %ebp
jne 0x20c3
cmpl 0xc(%rsp), %r13d
jne 0x20c3
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
movl %r14d, %edi
movl %ebx, %esi
callq 0x523c
movl %eax, %ebp
leaq 0x10(%rsp), %r13
andl $0x0, (%r13)
andw $0x0, 0x4(%r13)
movb $0x1, 0x6(%r13)
movl %r14d, %edi
movl %ebx, %esi
movq %r13, %rdx
callq 0xbaec
movl %eax, %r12d
movq %r13, %rdi
callq 0x137c
movl %eax, %r13d
leaq 0x12362(%rip), %rsi     # 0x143b3
cmpl %r12d, %ebp
jne 0x20c3
cmpl 0xc(%rsp), %r13d
jne 0x20c3
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
movl %r14d, %edi
movl %ebx, %esi
callq 0x52a3
movl %eax, %ebp
leaq 0x10(%rsp), %r13
andl $0x0, (%r13)
andw $0x0, 0x4(%r13)
movb $0x1, 0x6(%r13)
movl %r14d, %edi
movl %ebx, %esi
movq %r13, %rdx
callq 0xbb75
movl %eax, %r12d
movq %r13, %rdi
callq 0x137c
movl %eax, %r13d
leaq 0x1230e(%rip), %rsi     # 0x143b6
cmpl %r12d, %ebp
jne 0x20c3
cmpl 0xc(%rsp), %r13d
jne 0x20c3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x122ef(%rip), %rdi     # 0x143b9
pushq $0x20
popq %rdx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x1070
leaq 0x120bc(%rip), %rdi     # 0x1419a
xorl %eax, %eax
callq 0x1070
movl %r14d, %edi
callq 0x1565
pushq $0xa
popq %r14
movl %r14d, %edi
callq 0x1030
leaq 0x120a0(%rip), %rdi     # 0x141a0
xorl %eax, %eax
callq 0x1070
movl %ebx, %edi
callq 0x1565
movl %r14d, %edi
callq 0x1030
leaq 0x120cf(%rip), %rdi     # 0x141ec
movl %r12d, %esi
xorl %eax, %eax
callq 0x1070
leaq 0x1207e(%rip), %rbx     # 0x141ac
movq %rbx, %rdi
movl %r13d, %esi
xorl %eax, %eax
callq 0x1070
leaq 0x120b2(%rip), %rdi     # 0x141f4
movl %ebp, %esi
xorl %eax, %eax
callq 0x1070
movl 0xc(%rsp), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1070
pushq $0x1
popq %rdi
callq 0x10b0