// File: /workspace/github_c_makefile_star2_O0/mbitsnbites[P]SoftFP/./softfptest_template.h
// Function: test_cvt_sf64_sf128
void test_cvt_sf64_sf(F_UINT a, RoundingModeEnum rm, int it)
{
    uint64_t a64, a64_ref;
    float_status st;
    uint32_t fflags;
    F_UINT a_ref;

    /* to 64 bit */
    fflags = 0;
    a64 = glue(glue(cvt_sf, F_SIZE), _sf64)(a, rm, &fflags);

    softfloat_init_ctx(&st, rm);
    a64_ref = softfloat_to_sf64(glue(glue(float, F_SIZE), _to_float64)(sf_to_softfloat(a), &st));
    if (a64 != a64_ref || softfloat_to_fflags(&st) != fflags) {
        printf("ERROR op=cvt_sf_sf64 size=%d rm=%s it=%d:\n",
               F_SIZE, rm_to_str[rm], it);
        printf("a  = "); print_sf(a); printf("\n");
        printf("ref= "); print_sf64(a64_ref); printf("\n");
        printf("r  = "); print_sf64(a64); printf("\n");
        exit(1);
    }
    
    /* from 64 bit */
    fflags = 0;
    a = glue(cvt_sf64_sf, F_SIZE)(a64, &fflags);
    
    softfloat_init_ctx(&st, rm);
    a_ref = softfloat_to_sf(glue(float64_to_float, F_SIZE)(sf_to_softfloat64(a64), &st));
    if (a != a_ref || softfloat_to_fflags(&st) != fflags) {
        printf("ERROR op=cvt_sf64_sf size=%d rm=%s it=%d\n",
               F_SIZE, rm_to_str[rm], it);
        printf("a  = "); print_sf64(a64); 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 $0x110, %rsp            # imm = 0x110
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rsi
movq %rsi, -0x18(%rbp)
movq %rax, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movl %ecx, -0x28(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movl -0x24(%rbp), %edx
movq %rcx, -0x68(%rbp)
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
leaq -0x44(%rbp), %rcx
callq 0xf690
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %esi
leaq -0x3f(%rbp), %rdi
callq 0x1510
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, -0x88(%rbp)
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x4910
movq %rax, -0x80(%rbp)
movq %rdx, -0x78(%rbp)
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
leaq -0x3f(%rbp), %rdx
callq 0x1eb20
movq %rax, %rdi
callq 0x2d90
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x53ce
leaq -0x3f(%rbp), %rdi
callq 0x1580
cmpl -0x44(%rbp), %eax
je 0x5497
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x26cc6(%rip), %rax     # 0x2c0a0
movq (%rax,%rcx,8), %rdx
movl -0x28(%rbp), %ecx
leaq 0x2000e(%rip), %rdi     # 0x253f6
xorl %eax, %eax
movb %al, -0xf1(%rbp)
movl $0x80, %esi
callq 0x1050
movb -0xf1(%rbp), %al
leaq 0x1fd5f(%rip), %rdi     # 0x25166
callq 0x1050
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, -0x98(%rbp)
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x4f10
leaq 0x20035(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
leaq 0x1fd28(%rip), %rdi     # 0x25172
movb $0x0, %al
callq 0x1050
movq -0x38(%rbp), %rdi
callq 0x2fa0
leaq 0x20010(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
leaq 0x1fd19(%rip), %rdi     # 0x25188
movb $0x0, %al
callq 0x1050
movq -0x30(%rbp), %rdi
callq 0x2fa0
leaq 0x1ffeb(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
movl $0x1, %edi
callq 0x10a0
movl $0x0, -0x44(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x44(%rbp), %rsi
callq 0xf4d0
movq %rax, -0xb0(%rbp)
movq %rdx, -0xa8(%rbp)
movq -0xb0(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %esi
leaq -0x3f(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x1510
movq -0x30(%rbp), %rdi
callq 0x2d80
movq -0x100(%rbp), %rsi
movq %rax, %rdi
callq 0x17a80
movq %rax, -0xc0(%rbp)
movq %rdx, -0xb8(%rbp)
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x4950
movq %rax, -0xd0(%rbp)
movq %rdx, -0xc8(%rbp)
movq -0xd0(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq %rcx, -0x58(%rbp)
movq %rax, -0x60(%rbp)
movaps -0x20(%rbp), %xmm0
movaps -0x60(%rbp), %xmm1
pcmpeqb %xmm1, %xmm0
pmovmskb %xmm0, %eax
subl $0xffff, %eax           # imm = 0xFFFF
jne 0x556a
jmp 0x5558
leaq -0x3f(%rbp), %rdi
callq 0x1580
cmpl -0x44(%rbp), %eax
je 0x566a
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x26b2a(%rip), %rax     # 0x2c0a0
movq (%rax,%rcx,8), %rdx
movl -0x28(%rbp), %ecx
leaq 0x1fe9d(%rip), %rdi     # 0x25421
xorl %eax, %eax
movb %al, -0x101(%rbp)
movl $0x80, %esi
callq 0x1050
movb -0x101(%rbp), %al
leaq 0x1fbc3(%rip), %rdi     # 0x25166
callq 0x1050
movq -0x30(%rbp), %rdi
callq 0x2fa0
movb -0x101(%rbp), %al
leaq 0x1feb3(%rip), %rdi     # 0x25471
movq %rdi, -0x110(%rbp)
callq 0x1050
movb -0x101(%rbp), %al
leaq 0x1fb9b(%rip), %rdi     # 0x25172
callq 0x1050
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, -0xd8(%rbp)
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
callq 0x4f10
movq -0x110(%rbp), %rdi
movb -0x101(%rbp), %al
callq 0x1050
movb -0x101(%rbp), %al
leaq 0x1fb64(%rip), %rdi     # 0x25188
callq 0x1050
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, -0xe8(%rbp)
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rdi
movq -0xe8(%rbp), %rsi
callq 0x4f10
leaq 0x1fe18(%rip), %rdi     # 0x25471
movb $0x0, %al
callq 0x1050
movl $0x1, %edi
callq 0x10a0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)