// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
leaq -0x20(%rbp), %rdx
callq 0x7ed0
movl %eax, -0x10(%rbp)
leaq -0x1b(%rbp), %rdi
xorl %esi, %esi
callq 0x1510
movl -0x4(%rbp), %edi
callq 0x1560
movl %eax, -0x34(%rbp)
movl -0x8(%rbp), %edi
callq 0x1560
movl -0x34(%rbp), %edi
movl %eax, %esi
leaq -0x1b(%rbp), %rdx
callq 0x16430
movl %eax, -0x14(%rbp)
leaq -0x1b(%rbp), %rdi
callq 0x1580
movl %eax, -0x24(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x26c5
movl -0x24(%rbp), %eax
cmpl -0x20(%rbp), %eax
je 0x26d5
leaq 0x22caa(%rip), %rax     # 0x25376
movq %rax, -0x30(%rbp)
jmp 0x27b9
movl $0x0, -0x20(%rbp)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
leaq -0x20(%rbp), %rdx
callq 0x7f60
movl %eax, -0x10(%rbp)
leaq -0x1b(%rbp), %rdi
xorl %esi, %esi
callq 0x1510
movl -0x4(%rbp), %edi
callq 0x1560
movl %eax, -0x38(%rbp)
movl -0x8(%rbp), %edi
callq 0x1560
movl -0x38(%rbp), %edi
movl %eax, %esi
leaq -0x1b(%rbp), %rdx
callq 0x16150
movl %eax, -0x14(%rbp)
leaq -0x1b(%rbp), %rdi
callq 0x1580
movl %eax, -0x24(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x2739
movl -0x24(%rbp), %eax
cmpl -0x20(%rbp), %eax
je 0x2746
leaq 0x22c3f(%rip), %rax     # 0x2537f
movq %rax, -0x30(%rbp)
jmp 0x27b9
movl $0x0, -0x20(%rbp)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
leaq -0x20(%rbp), %rdx
callq 0x8020
movl %eax, -0x10(%rbp)
leaq -0x1b(%rbp), %rdi
xorl %esi, %esi
callq 0x1510
movl -0x4(%rbp), %edi
callq 0x1560
movl %eax, -0x3c(%rbp)
movl -0x8(%rbp), %edi
callq 0x1560
movl -0x3c(%rbp), %edi
movl %eax, %esi
leaq -0x1b(%rbp), %rdx
callq 0x16270
movl %eax, -0x14(%rbp)
leaq -0x1b(%rbp), %rdi
callq 0x1580
movl %eax, -0x24(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x27ae
movl -0x24(%rbp), %eax
cmpl -0x20(%rbp), %eax
je 0x2869
leaq 0x22bcd(%rip), %rax     # 0x25382
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
movl -0xc(%rbp), %ecx
leaq 0x22bbe(%rip), %rdi     # 0x25385
movl $0x20, %edx
movb $0x0, %al
callq 0x1050
leaq 0x2298c(%rip), %rdi     # 0x25166
movb $0x0, %al
callq 0x1050
movl -0x4(%rbp), %edi
callq 0x1800
leaq 0x22c81(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
leaq 0x2296e(%rip), %rdi     # 0x2516c
movb $0x0, %al
callq 0x1050
movl -0x8(%rbp), %edi
callq 0x1800
leaq 0x22c5d(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
movl -0x14(%rbp), %esi
leaq 0x22993(%rip), %rdi     # 0x251b8
movb $0x0, %al
callq 0x1050
movl -0x24(%rbp), %esi
leaq 0x22942(%rip), %rdi     # 0x25178
movb $0x0, %al
callq 0x1050
movl -0x10(%rbp), %esi
leaq 0x22979(%rip), %rdi     # 0x251c0
movb $0x0, %al
callq 0x1050
movl -0x20(%rbp), %esi
leaq 0x22920(%rip), %rdi     # 0x25178
movb $0x0, %al
callq 0x1050
movl $0x1, %edi
callq 0x10a0
addq $0x40, %rsp
popq %rbp
retq
nop