// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdx, %rsi
callq 0x920d
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x920d
movabsq $0xfffffffffffff, %rsi  # imm = 0xFFFFFFFFFFFFF
movq %r14, %rdi
andq %rsi, %rdi
movq %r14, %rdx
shrq $0x34, %rdx
movl $0x7ff, %ecx            # imm = 0x7FF
andq %rcx, %rdx
andq %rax, %rsi
movq %rax, %r13
shrq $0x34, %r13
andq %rcx, %r13
movq %rax, %r12
xorq %r14, %r12
cmpq %rcx, %rdx
jne 0xb75e
testq %rdi, %rdi
jne 0xb770
cmpl $0x7ff, %r13d           # imm = 0x7FF
setne %cl
testq %rsi, %rsi
sete %dl
orb %cl, %dl
je 0xb770
orq %rsi, %r13
jne 0xb85b
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
orb $0x1, 0x2(%rbx)
jmp 0xb87d
cmpl $0x7ff, %r13d           # imm = 0x7FF
jne 0xb78b
testq %rsi, %rsi
je 0xb852
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xcb8c
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
pushq $0x1
popq %r8
testq %rdx, %rdx
jne 0xb7c2
testq %rdi, %rdi
je 0xb877
bsrq %rdi, %rcx
xorl $0x3f, %ecx
addl $0xf5, %ecx
movzbl %cl, %ecx
shlq %cl, %rdi
movl %r8d, %edx
subl %ecx, %edx
movslq %edx, %rdx
testq %r13, %r13
jne 0xb7e9
testq %rsi, %rsi
je 0xb877
bsrq %rsi, %rcx
xorl $0x3f, %ecx
addl $0xf5, %ecx
movzbl %cl, %ecx
shlq %cl, %rsi
subl %ecx, %r8d
movslq %r8d, %r13
addq %rdx, %r13
shrq $0x3f, %r12
shlq $0xa, %rdi
btsq $0x3e, %rdi
shlq $0xb, %rsi
orq %rax, %rsi
leaq 0x8(%rsp), %r14
movq %rsp, %r15
movq %r14, %rdx
movq %r15, %rcx
callq 0xd0a6
xorl %eax, %eax
cmpq $0x0, (%r15)
setne %al
orq (%r14), %rax
xorl %esi, %esi
movq %rax, %rdx
addq %rax, %rdx
cmovsq %rax, %rdx
setns %sil
xorq $-0x3ff, %rsi           # imm = 0xFC01
addq %r13, %rsi
movzbl %r12b, %edi
movq %rbx, %rcx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x973e
orq %rdi, %rdx
je 0xb74b
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq %rax, %r12
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
orq %r12, %rax
jmp 0xb87d
andq %rax, %r12
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq