// File: /workspace/github_c_makefile_star2_O3/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, %r13
xorl %eax, %eax
movq %rsp, %r8
movl %eax, (%r8)
callq 0x8c7a
movl %eax, %ebx
leaq 0x30(%rsp), %rbp
xorl %eax, %eax
movl %eax, (%rbp)
movw $0x0, 0x4(%rbp)
movb $0x1, 0x6(%rbp)
movq %r13, 0x8(%rsp)
movq %r13, %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 0x13e80
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 0x11954(%rip), %rsi     # 0x163aa
movl %ebx, 0x4(%rsp)
cmpl %r13d, %ebx
jne 0x4bc1
cmpl %ebp, (%rsp)
jne 0x4bc1
xorl %eax, %eax
movq %rsp, %r8
movl %eax, (%r8)
movq 0x8(%rsp), %r13
movq %r13, %rdi
movq 0x10(%rsp), %r12
movq %r12, %rsi
movq 0x18(%rsp), %r15
movq %r15, %rdx
movq 0x20(%rsp), %r14
movq %r14, %rcx
callq 0x8d2c
movl %eax, %ebx
leaq 0x30(%rsp), %rbp
xorl %eax, %eax
movl %eax, (%rbp)
movw $0x0, 0x4(%rbp)
movb $0x1, 0x6(%rbp)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbp, %r8
callq 0x13cfb
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 0x118b6(%rip), %rsi     # 0x163b3
movl %ebx, 0x4(%rsp)
cmpl %r13d, %ebx
jne 0x4bc1
cmpl %ebp, (%rsp)
jne 0x4bc1
xorl %eax, %eax
movq %rsp, %r8
movl %eax, (%r8)
movq 0x8(%rsp), %r13
movq %r13, %rdi
movq 0x10(%rsp), %r12
movq %r12, %rsi
movq 0x18(%rsp), %r15
movq %r15, %rdx
movq 0x20(%rsp), %r14
movq %r14, %rcx
callq 0x8db0
movl %eax, %ebx
leaq 0x30(%rsp), %rbp
xorl %eax, %eax
movl %eax, (%rbp)
movw $0x0, 0x4(%rbp)
movb $0x1, 0x6(%rbp)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbp, %r8
callq 0x13d97
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 0x11812(%rip), %rsi     # 0x163b6
movl %ebx, 0x4(%rsp)
cmpl %r13d, %ebx
jne 0x4bc1
cmpl %ebp, (%rsp)
jne 0x4bc1
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x117f1(%rip), %rdi     # 0x163b9
movl $0x80, %edx
movl 0x2c(%rsp), %ecx
xorl %eax, %eax
callq 0x1070
leaq 0x115bb(%rip), %rdi     # 0x1619a
xorl %eax, %eax
callq 0x1070
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x3ec3
movl $0xa, %edi
callq 0x1030
leaq 0x1159a(%rip), %rdi     # 0x161a0
xorl %eax, %eax
callq 0x1070
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x3ec3
movl $0xa, %edi
callq 0x1030
leaq 0x115bf(%rip), %rdi     # 0x161ec
movl %r13d, %esi
xorl %eax, %eax
callq 0x1070
leaq 0x1156e(%rip), %rbx     # 0x161ac
movq %rbx, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x1070
leaq 0x115a3(%rip), %rdi     # 0x161f4
movl 0x4(%rsp), %esi
xorl %eax, %eax
callq 0x1070
movl (%rsp), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1070
movl $0x1, %edi
callq 0x10b0