// File: /workspace/github_c_makefile_star2_O0/mbitsnbites[P]SoftFP/softfloat.c
// Function: float64_mul
float64 float64_mul(float64 a, float64 b, float_status *status)
{
    flag aSign, bSign, zSign;
    int_fast16_t aExp, bExp, zExp;
    uint64_t aSig, bSig, zSig0, zSig1;

    a = float64_squash_input_denormal(a, status);
    b = float64_squash_input_denormal(b, status);

    aSig = extractFloat64Frac( a );
    aExp = extractFloat64Exp( a );
    aSign = extractFloat64Sign( a );
    bSig = extractFloat64Frac( b );
    bExp = extractFloat64Exp( b );
    bSign = extractFloat64Sign( b );
    zSign = aSign ^ bSign;
    if ( aExp == 0x7FF ) {
        if ( aSig || ( ( bExp == 0x7FF ) && bSig ) ) {
            return propagateFloat64NaN(a, b, status);
        }
        if ( ( bExp | bSig ) == 0 ) {
            float_raise(float_flag_invalid, status);
            return float64_default_nan;
        }
        return packFloat64( zSign, 0x7FF, 0 );
    }
    if ( bExp == 0x7FF ) {
        if (bSig) {
            return propagateFloat64NaN(a, b, status);
        }
        if ( ( aExp | aSig ) == 0 ) {
            float_raise(float_flag_invalid, status);
            return float64_default_nan;
        }
        return packFloat64( zSign, 0x7FF, 0 );
    }
    if ( aExp == 0 ) {
        if ( aSig == 0 ) return packFloat64( zSign, 0, 0 );
        normalizeFloat64Subnormal( aSig, &aExp, &aSig );
    }
    if ( bExp == 0 ) {
        if ( bSig == 0 ) return packFloat64( zSign, 0, 0 );
        normalizeFloat64Subnormal( bSig, &bExp, &bSig );
    }
    zExp = aExp + bExp - 0x3FF;
    aSig = ( aSig | LIT64( 0x0010000000000000 ) )<<10;
    bSig = ( bSig | LIT64( 0x0010000000000000 ) )<<11;
    mul64To128( aSig, bSig, &zSig0, &zSig1 );
    zSig0 |= ( zSig1 != 0 );
    if ( 0 <= (int64_t) ( zSig0<<1 ) ) {
        zSig0 <<= 1;
        --zExp;
    }
    return roundAndPackFloat64(zSign, zExp, zSig0, status);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x11610
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x11610
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x116a0
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x11680
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x168f0
movb %al, -0x21(%rbp)
movq -0x18(%rbp), %rdi
callq 0x116a0
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x11680
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x168f0
movb %al, -0x22(%rbp)
movzbl -0x21(%rbp), %eax
movzbl -0x22(%rbp), %ecx
xorl %ecx, %eax
movb %al, -0x23(%rbp)
cmpq $0x7ff, -0x30(%rbp)     # imm = 0x7FF
jne 0x15bc5
cmpq $0x0, -0x48(%rbp)
jne 0x15b61
cmpq $0x7ff, -0x38(%rbp)     # imm = 0x7FF
jne 0x15b7b
cmpq $0x0, -0x50(%rbp)
je 0x15b7b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x17f70
movq %rax, -0x8(%rbp)
jmp 0x15d54
movq -0x38(%rbp), %rax
orq -0x50(%rbp), %rax
cmpq $0x0, %rax
jne 0x15baa
movq -0x20(%rbp), %rsi
movl $0x1, %edi
callq 0x11080
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, -0x8(%rbp)
jmp 0x15d54
movl $0x7ff, %esi            # imm = 0x7FF
xorl %eax, %eax
movl %eax, %edx
movzbl -0x23(%rbp), %edi
callq 0x118b0
movq %rax, -0x8(%rbp)
jmp 0x15d54
cmpq $0x7ff, -0x38(%rbp)     # imm = 0x7FF
jne 0x15c3a
cmpq $0x0, -0x50(%rbp)
je 0x15bf0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x17f70
movq %rax, -0x8(%rbp)
jmp 0x15d54
movq -0x30(%rbp), %rax
orq -0x48(%rbp), %rax
cmpq $0x0, %rax
jne 0x15c1f
movq -0x20(%rbp), %rsi
movl $0x1, %edi
callq 0x11080
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, -0x8(%rbp)
jmp 0x15d54
movl $0x7ff, %esi            # imm = 0x7FF
xorl %eax, %eax
movl %eax, %edx
movzbl -0x23(%rbp), %edi
callq 0x118b0
movq %rax, -0x8(%rbp)
jmp 0x15d54
cmpq $0x0, -0x30(%rbp)
jne 0x15c72
cmpq $0x0, -0x48(%rbp)
jne 0x15c61
xorl %eax, %eax
movl %eax, %edx
movzbl -0x23(%rbp), %edi
movq %rdx, %rsi
callq 0x118b0
movq %rax, -0x8(%rbp)
jmp 0x15d54
movq -0x48(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x17a20
cmpq $0x0, -0x38(%rbp)
jne 0x15caa
cmpq $0x0, -0x50(%rbp)
jne 0x15c99
xorl %eax, %eax
movl %eax, %edx
movzbl -0x23(%rbp), %edi
movq %rdx, %rsi
callq 0x118b0
movq %rax, -0x8(%rbp)
jmp 0x15d54
movq -0x50(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x17a20
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
subq $0x3ff, %rax            # imm = 0x3FF
movq %rax, -0x40(%rbp)
movabsq $0x10000000000000, %rax # imm = 0x10000000000000
orq -0x48(%rbp), %rax
shlq $0xa, %rax
movq %rax, -0x48(%rbp)
movabsq $0x10000000000000, %rax # imm = 0x10000000000000
orq -0x50(%rbp), %rax
shlq $0xb, %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x58(%rbp), %rdx
leaq -0x60(%rbp), %rcx
callq 0x18730
cmpq $0x0, -0x60(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
orq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rcx
shlq %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jg 0x15d39
movq -0x58(%rbp), %rax
shlq %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
movb -0x23(%rbp), %al
movq -0x40(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x20(%rbp), %rcx
movzbl %al, %edi
callq 0x12390
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nop