// File: /workspace/github_c_makefile_star2_O1/mbitsnbites[P]SoftFP/./softfptest_template.h
// Function: test_cmp128
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 $0x38, %rsp
movl %r8d, 0x2c(%rsp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorl %r13d, %r13d
leaq 0x4(%rsp), %r8
movl %r13d, (%r8)
callq 0x8ca4
movl %eax, (%rsp)
leaq 0x30(%rsp), %rbp
movl %r13d, 0x3(%rbp)
movl %r13d, (%rbp)
movb $0x1, 0x6(%rbp)
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
movq %r12, 0x10(%rsp)
movq %r12, %rsi
movq %r15, 0x18(%rsp)
movq %r15, %rdx
movq %r14, 0x20(%rsp)
movq %r14, %rcx
movq %rbp, %r8
callq 0x13e9c
movl %eax, %r13d
movb 0x2(%rbp), %al
movl %eax, %ecx
shlb $0x4, %cl
andb $0x10, %cl
leal (%rax,%rax), %edx
andb $0x8, %dl
orb %cl, %dl
movl %eax, %ecx
shrb %cl
andb $0x4, %cl
orb %dl, %cl
movl %eax, %edx
shrb $0x3, %dl
andb $0x2, %dl
orb %cl, %dl
shrb $0x5, %al
andb $0x1, %al
orb %dl, %al
movzbl %al, %ebp
leaq 0x119ab(%rip), %rsi     # 0x163aa
cmpl %r13d, (%rsp)
jne 0x4b66
cmpl %ebp, 0x4(%rsp)
jne 0x4b66
xorl %r13d, %r13d
leaq 0x4(%rsp), %r8
movl %r13d, (%r8)
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq 0x10(%rsp), %r12
movq %r12, %rsi
movq 0x18(%rsp), %r15
movq %r15, %rdx
movq 0x20(%rsp), %r14
movq %r14, %rcx
callq 0x8d56
movl %eax, (%rsp)
leaq 0x30(%rsp), %rbp
movl %r13d, 0x3(%rbp)
movl %r13d, (%rbp)
movb $0x1, 0x6(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbp, %r8
callq 0x13d17
movl %eax, %r13d
movb 0x2(%rbp), %al
movl %eax, %ecx
shlb $0x4, %cl
andb $0x10, %cl
leal (%rax,%rax), %edx
andb $0x8, %dl
orb %cl, %dl
movl %eax, %ecx
shrb %cl
andb $0x4, %cl
orb %dl, %cl
movl %eax, %edx
shrb $0x3, %dl
andb $0x2, %dl
orb %cl, %dl
shrb $0x5, %al
andb $0x1, %al
orb %dl, %al
movzbl %al, %ebp
leaq 0x1190e(%rip), %rsi     # 0x163b3
cmpl %r13d, (%rsp)
jne 0x4b66
cmpl %ebp, 0x4(%rsp)
jne 0x4b66
xorl %r13d, %r13d
leaq 0x4(%rsp), %r8
movl %r13d, (%r8)
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq 0x10(%rsp), %r12
movq %r12, %rsi
movq 0x18(%rsp), %r15
movq %r15, %rdx
movq 0x20(%rsp), %r14
movq %r14, %rcx
callq 0x8dda
movl %eax, (%rsp)
leaq 0x30(%rsp), %rbp
movl %r13d, 0x3(%rbp)
movl %r13d, (%rbp)
movb $0x1, 0x6(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbp, %r8
callq 0x13db3
movl %eax, %r13d
movb 0x2(%rbp), %al
movl %eax, %ecx
shlb $0x4, %cl
andb $0x10, %cl
leal (%rax,%rax), %edx
andb $0x8, %dl
orb %cl, %dl
movl %eax, %ecx
shrb %cl
andb $0x4, %cl
orb %dl, %cl
movl %eax, %edx
shrb $0x3, %dl
andb $0x2, %dl
orb %cl, %dl
shrb $0x5, %al
andb $0x1, %al
orb %dl, %al
movzbl %al, %ebp
leaq 0x1186b(%rip), %rsi     # 0x163b6
cmpl %r13d, (%rsp)
jne 0x4b66
cmpl %ebp, 0x4(%rsp)
jne 0x4b66
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1184c(%rip), %rdi     # 0x163b9
movl $0x80, %edx
movl 0x2c(%rsp), %ecx
xorl %eax, %eax
callq 0x1070
leaq 0x11616(%rip), %rdi     # 0x1619a
xorl %eax, %eax
callq 0x1070
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x3e81
movl $0xa, %edi
callq 0x1030
leaq 0x115f5(%rip), %rdi     # 0x161a0
xorl %eax, %eax
callq 0x1070
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x3e81
movl $0xa, %edi
callq 0x1030
leaq 0x1161a(%rip), %rdi     # 0x161ec
movl %r13d, %esi
xorl %eax, %eax
callq 0x1070
leaq 0x115c9(%rip), %rbx     # 0x161ac
movq %rbx, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x1070
leaq 0x115fe(%rip), %rdi     # 0x161f4
movl (%rsp), %esi
xorl %eax, %eax
callq 0x1070
movl 0x4(%rsp), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1070
movl $0x1, %edi
callq 0x10b0