// File: /workspace/github_c_makefile_star2_O0/mbitsnbites[P]SoftFP/./softfptest_template.h
// Function: test_fma32
void test_fma(F_UINT a, F_UINT b, F_UINT c, RoundingModeEnum rm, int it)
{
#if F_SIZE <= 64
    F_UINT r, ref;
    float_status st;
    uint32_t fflags, ref_fflags;

    fflags = 0;
    r = glue(fma_sf, F_SIZE)(a, b, c, rm, &fflags);
    
    softfloat_init_ctx(&st, rm);

    ref = softfloat_to_sf(glue(glue(float, F_SIZE), _muladd)(
                sf_to_softfloat(a),
                sf_to_softfloat(b),
                sf_to_softfloat(c),
                0, &st));
    ref_fflags = softfloat_to_fflags(&st);

    if (r != ref || ref_fflags != fflags) {
        printf("ERROR op=%s size=%d rm=%s it=%d:\n", 
               "fma", F_SIZE, rm_to_str[rm], it);
        printf("a  = "); print_sf(a); printf("\n");
        printf("b  = "); print_sf(b); printf("\n");
        printf("c  = "); print_sf(c); 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);
    }

#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %r8d, -0x14(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
leaq -0x28(%rbp), %r8
callq 0x7220
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %esi
leaq -0x23(%rbp), %rdi
callq 0x1510
movl -0x4(%rbp), %edi
callq 0x1560
movl %eax, -0x34(%rbp)
movl -0x8(%rbp), %edi
callq 0x1560
movl %eax, -0x30(%rbp)
movl -0xc(%rbp), %edi
callq 0x1560
movl -0x34(%rbp), %edi
movl -0x30(%rbp), %esi
movl %eax, %edx
xorl %ecx, %ecx
leaq -0x23(%rbp), %r8
callq 0x14d40
movl %eax, %edi
callq 0x1570
movl %eax, -0x1c(%rbp)
leaq -0x23(%rbp), %rdi
callq 0x1580
movl %eax, -0x2c(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jne 0x254e
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
je 0x2640
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x29b46(%rip), %rax     # 0x2c0a0
movq (%rax,%rcx,8), %rcx
movl -0x14(%rbp), %r8d
leaq 0x22bdb(%rip), %rdi     # 0x25144
leaq 0x22dfc(%rip), %rsi     # 0x2536c
movl $0x20, %edx
movb $0x0, %al
callq 0x1050
leaq 0x22be3(%rip), %rdi     # 0x25166
movb $0x0, %al
callq 0x1050
movl -0x4(%rbp), %edi
callq 0x1800
leaq 0x22ed8(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
leaq 0x22bc5(%rip), %rdi     # 0x2516c
movb $0x0, %al
callq 0x1050
movl -0x8(%rbp), %edi
callq 0x1800
leaq 0x22eb4(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
leaq 0x22da5(%rip), %rdi     # 0x25370
movb $0x0, %al
callq 0x1050
movl -0xc(%rbp), %edi
callq 0x1800
leaq 0x22e90(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
leaq 0x22b83(%rip), %rdi     # 0x25172
movb $0x0, %al
callq 0x1050
movl -0x1c(%rbp), %edi
callq 0x1800
movl -0x2c(%rbp), %esi
leaq 0x22b70(%rip), %rdi     # 0x25178
movb $0x0, %al
callq 0x1050
leaq 0x22b72(%rip), %rdi     # 0x25188
movb $0x0, %al
callq 0x1050
movl -0x18(%rbp), %edi
callq 0x1800
movl -0x28(%rbp), %esi
leaq 0x22b49(%rip), %rdi     # 0x25178
movb $0x0, %al
callq 0x1050
movl $0x1, %edi
callq 0x10a0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)