// File: /workspace/github_c_makefile_star2_O1/mbitsnbites[P]SoftFP/./softfptest_template.h
// Function: test_op128
void test_op(FloatOpEnum op, F_UINT a, F_UINT b, RoundingModeEnum rm,
             int it)
{
    F_UINT ref, r;
    uint32_t fflags, ref_fflags;

    ref = exec_ref_op(&ref_fflags, op, a, b, rm);
    fflags = 0;
    switch(op) {
    case OP_FADD:
        r = glue(add_sf, F_SIZE)(a, b, rm, &fflags);
        break;
    case OP_FMUL:
        r = glue(mul_sf, F_SIZE)(a, b, rm, &fflags);
        break;
    case OP_FDIV:
        r = glue(div_sf, F_SIZE)(a, b, rm, &fflags);
        break;
    case OP_FSQRT:
        r = glue(sqrt_sf, F_SIZE)(a, rm, &fflags);
        break;
    case OP_FMIN:
        r = glue(min_sf, F_SIZE)(a, b, &fflags);
        break;
    case OP_FMAX:
        r = glue(max_sf, F_SIZE)(a, b, &fflags);
        break;
    default:
        abort();
    }
    if (r != ref || ref_fflags != fflags) {
        printf("ERROR op=%s size=%d rm=%s it=%d:\n", 
               op_to_str[op], F_SIZE, rm_to_str[rm], it);
        printf("a  = "); print_sf(a); printf("\n");
        if (op != OP_FSQRT) {
            printf("b  = "); print_sf(b); printf("\n");
        }
        printf("ref= "); print_sf(ref);
        printf(" fflags=0x%02x\n", ref_fflags);
        printf("r  = "); print_sf(r);
        printf(" fflags=0x%02x\n", fflags);
        exit(1);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %r15d
movq %r8, %r9
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movl %edi, %ebp
movl %r15d, (%rsp)
leaq 0x24(%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %r13, %rcx
movq %r12, %r8
movq %r9, 0x18(%rsp)
callq 0x3b5f
movq %rax, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movl $0x0, 0x14(%rsp)
cmpl $0x5, %ebp
ja 0x3e7c
movl %ebp, %ebx
leaq 0x123fe(%rip), %rax     # 0x160b0
movslq (%rax,%rbx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x14(%rsp), %r9
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq 0x18(%rsp), %rcx
movl %r15d, %r8d
callq 0x7846
jmp 0x3d5c
leaq 0x14(%rsp), %r8
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq 0x18(%rsp), %rcx
callq 0x8a96
jmp 0x3d5c
leaq 0x14(%rsp), %r9
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq 0x18(%rsp), %rcx
movl %r15d, %r8d
callq 0x8527
jmp 0x3d5c
leaq 0x14(%rsp), %rcx
movq %r14, %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0x886d
jmp 0x3d5c
leaq 0x14(%rsp), %r9
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq 0x18(%rsp), %rcx
movl %r15d, %r8d
callq 0x7ad8
jmp 0x3d5c
leaq 0x14(%rsp), %r8
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq 0x18(%rsp), %rcx
callq 0x8b9d
movq %rax, %rsi
xorq 0x30(%rsp), %rsi
movq %rdx, %rcx
xorq 0x28(%rsp), %rcx
orq %rsi, %rcx
jne 0x3d8a
movl 0x24(%rsp), %ecx
cmpl 0x14(%rsp), %ecx
jne 0x3d8a
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movl 0x80(%rsp), %r8d
leaq 0x17fed(%rip), %rax     # 0x1bd90
movq (%rax,%rbx,8), %rsi
movl %r15d, %eax
leaq 0x1800f(%rip), %rcx     # 0x1bdc0
movq (%rcx,%rax,8), %rcx
leaq 0x123bc(%rip), %rdi     # 0x16178
movl $0x80, %edx
xorl %eax, %eax
callq 0x1070
leaq 0x123cb(%rip), %rdi     # 0x1619a
xorl %eax, %eax
callq 0x1070
movq %r14, %rdi
movq %r13, %rsi
callq 0x3e81
movl $0xa, %edi
callq 0x1030
cmpl $0x3, %ebp
je 0x3e15
leaq 0x123a9(%rip), %rdi     # 0x161a0
xorl %eax, %eax
callq 0x1070
movq %r12, %rdi
movq 0x18(%rsp), %rsi
callq 0x3e81
movl $0xa, %edi
callq 0x1030
leaq 0x1238a(%rip), %rdi     # 0x161a6
xorl %eax, %eax
callq 0x1070
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x3e81
movl 0x24(%rsp), %esi
leaq 0x1236f(%rip), %rbx     # 0x161ac
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1070
leaq 0x1236e(%rip), %rdi     # 0x161bc
xorl %eax, %eax
callq 0x1070
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x3e81
movl 0x14(%rsp), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1070
movl $0x1, %edi
callq 0x10b0
callq 0x1040