// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq %rdx, %r8
movabsq $0xfffffffffffff, %rax  # imm = 0xFFFFFFFFFFFFF
cmpb $0x0, 0x5(%rdx)
je 0xc47f
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movabsq $0x7ff0000000000000, %rdx # imm = 0x7FF0000000000000
testq %rdx, %rdi
setne %r9b
testq %rax, %rdi
sete %r10b
orb %r9b, %r10b
jne 0xc465
orb $0x40, 0x2(%r8)
andq %rcx, %rdi
testq %rdx, %rsi
setne %dl
testq %rax, %rsi
sete %r9b
orb %dl, %r9b
jne 0xc47f
orb $0x40, 0x2(%r8)
andq %rcx, %rsi
movq %rdi, %r11
andq %rax, %r11
movq %rdi, %rbx
shrq $0x34, %rbx
movl $0x7ff, %ecx            # imm = 0x7FF
andq %rcx, %rbx
andq %rsi, %rax
movq %rsi, %r10
shrq $0x34, %r10
andq %rcx, %r10
movq %rsi, %r9
xorq %rdi, %r9
cmpq %rcx, %rbx
jne 0xc4e2
testq %r11, %r11
jne 0xc4f4
cmpl $0x7ff, %r10d           # imm = 0x7FF
setne %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
je 0xc4f4
orq %rax, %r10
jne 0xc5f6
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
orb $0x1, 0x2(%r8)
jmp 0xc618
cmpl $0x7ff, %r10d           # imm = 0x7FF
jne 0xc4fd
testq %rax, %rax
je 0xc5ed
movq %r8, %rdx
popq %rbx
jmp 0xdbdb
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
testq %rbx, %rbx
jne 0xc532
testq %r11, %r11
je 0xc612
bsrq %r11, %rcx
xorl $0x3f, %ecx
addl $0xf5, %ecx
movzbl %cl, %ecx
shlq %cl, %r11
movl $0x1, %esi
subl %ecx, %esi
movslq %esi, %rbx
testq %r10, %r10
jne 0xc55d
testq %rax, %rax
je 0xc612
bsrq %rax, %rcx
xorl $0x3f, %ecx
addl $0xf5, %ecx
movzbl %cl, %ecx
shlq %cl, %rax
movl $0x1, %esi
subl %ecx, %esi
movslq %esi, %r10
addq %rbx, %r10
shrq $0x3f, %r9
shlq $0xa, %r11
movq %r11, %rcx
btsq $0x3e, %rcx
shlq $0xb, %rax
orq %rax, %rdx
movq %rcx, %rsi
shrq $0x20, %rsi
movq %rdx, %rdi
shrq $0x20, %rdi
movl %r11d, %r11d
movl %eax, %eax
imulq %rdi, %r11
imulq %rsi, %rax
imulq %rsi, %rdi
xorl %esi, %esi
addq %r11, %rax
setb %sil
shlq $0x20, %rsi
movq %rax, %r11
shrq $0x20, %r11
addq %rdi, %r11
shlq $0x20, %rax
imulq %rcx, %rdx
cmpq %rax, %rdx
adcq %rsi, %r11
xorl %eax, %eax
testq %rdx, %rdx
setne %al
orq %r11, %rax
xorl %esi, %esi
movq %rax, %rdx
addq %rax, %rdx
cmovsq %rax, %rdx
setns %sil
xorq $-0x3ff, %rsi           # imm = 0xFC01
addq %r10, %rsi
movzbl %r9b, %edi
movq %r8, %rcx
popq %rbx
jmp 0xa25f
orq %r11, %rbx
je 0xc4ce
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq %rax, %r9
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
orq %r9, %rax
jmp 0xc618
andq %rdx, %r9
movq %r9, %rax
popq %rbx
retq