// File: /workspace/github_c_makefile_star2_O0/mbitsnbites[P]SoftFP/./softfptest_template.h
// Function: test_cvt_sf32_sf64
void test_cvt_sf32_sf(F_UINT a, RoundingModeEnum rm, int it)
{
    uint32_t a32, a32_ref;
    float_status st;
    uint32_t fflags;
    F_UINT a_ref;

    /* to 32 bit */
    fflags = 0;
    a32 = glue(glue(cvt_sf, F_SIZE), _sf32)(a, rm, &fflags);

    softfloat_init_ctx(&st, rm);
    a32_ref = softfloat_to_sf32(glue(glue(float, F_SIZE), _to_float32)(sf_to_softfloat(a), &st));
    if (a32 != a32_ref || softfloat_to_fflags(&st) != fflags) {
        printf("ERROR op=cvt_sf_sf32 size=%d rm=%s it=%d:\n",
               F_SIZE, rm_to_str[rm], it);
        printf("a  = "); print_sf(a); printf("\n");
        printf("ref= "); print_sf32(a32_ref); printf("\n");
        printf("r  = "); print_sf32(a32); printf("\n");
        exit(1);
    }
    
    /* from 32 bit */
    fflags = 0;
    a = glue(cvt_sf32_sf, F_SIZE)(a32, &fflags);
    
    softfloat_init_ctx(&st, rm);
    a_ref = softfloat_to_sf(glue(float32_to_float, F_SIZE)(sf_to_softfloat32(a32), &st));
    if (a != a_ref || softfloat_to_fflags(&st) != fflags) {
        printf("ERROR op=cvt_sf32_sf size=%d rm=%s it=%d\n",
               F_SIZE, rm_to_str[rm], it);
        printf("a  = "); print_sf32(a32); printf("\n");
        printf("ref= "); print_sf(a_ref); printf("\n");
        printf("r  = "); print_sf(a); printf("\n");
        exit(1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x24(%rbp), %rdx
callq 0xa980
movl %eax, -0x14(%rbp)
movl -0xc(%rbp), %esi
leaq -0x1f(%rbp), %rdi
callq 0x1510
movq -0x8(%rbp), %rdi
callq 0x2d80
movq %rax, %rdi
leaq -0x1f(%rbp), %rsi
callq 0x15e00
movl %eax, %edi
callq 0x1570
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x3081
leaq -0x1f(%rbp), %rdi
callq 0x1580
cmpl -0x24(%rbp), %eax
je 0x311e
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x29013(%rip), %rax     # 0x2c0a0
movq (%rax,%rcx,8), %rdx
movl -0x10(%rbp), %ecx
leaq 0x22306(%rip), %rdi     # 0x253a1
movl $0x40, %esi
movb $0x0, %al
callq 0x1050
leaq 0x220b8(%rip), %rdi     # 0x25166
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
callq 0x2fa0
leaq 0x223ac(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
leaq 0x2209f(%rip), %rdi     # 0x25172
movb $0x0, %al
callq 0x1050
movl -0x18(%rbp), %edi
callq 0x1800
leaq 0x22388(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
leaq 0x22091(%rip), %rdi     # 0x25188
movb $0x0, %al
callq 0x1050
movl -0x14(%rbp), %edi
callq 0x1800
leaq 0x22364(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
movl $0x1, %edi
callq 0x10a0
movl $0x0, -0x24(%rbp)
movl -0x14(%rbp), %edi
leaq -0x24(%rbp), %rsi
callq 0xa850
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %esi
leaq -0x1f(%rbp), %rdi
callq 0x1510
movl -0x14(%rbp), %edi
callq 0x1560
movl %eax, %edi
leaq -0x1f(%rbp), %rsi
callq 0x133c0
movq %rax, %rdi
callq 0x2d90
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x317c
leaq -0x1f(%rbp), %rdi
callq 0x1580
cmpl -0x24(%rbp), %eax
je 0x321a
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x28f18(%rip), %rax     # 0x2c0a0
movq (%rax,%rcx,8), %rdx
movl -0x10(%rbp), %ecx
leaq 0x22236(%rip), %rdi     # 0x253cc
movl $0x40, %esi
movb $0x0, %al
callq 0x1050
leaq 0x21fbd(%rip), %rdi     # 0x25166
movb $0x0, %al
callq 0x1050
movl -0x14(%rbp), %edi
callq 0x1800
leaq 0x222b2(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
leaq 0x21fa5(%rip), %rdi     # 0x25172
movb $0x0, %al
callq 0x1050
movq -0x30(%rbp), %rdi
callq 0x2fa0
leaq 0x2228d(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
leaq 0x21f96(%rip), %rdi     # 0x25188
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
callq 0x2fa0
leaq 0x22268(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
movl $0x1, %edi
callq 0x10a0
addq $0x30, %rsp
popq %rbp
retq