// File: /workspace/github_c_makefile_star2_O1/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:
movq %rdx, %r8
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
movabsq $0xfffffffffffff, %rdx  # imm = 0xFFFFFFFFFFFFF
movb 0x5(%r8), %al
testb %al, %al
je 0xc395
testq %rcx, %rdi
setne %r9b
testq %rdx, %rdi
sete %r10b
orb %r9b, %r10b
jne 0xc395
orb $0x40, 0x2(%r8)
movabsq $-0x8000000000000000, %r9 # imm = 0x8000000000000000
andq %r9, %rdi
testb %al, %al
je 0xc3bd
testq %rcx, %rsi
setne %al
testq %rdx, %rsi
sete %r9b
orb %al, %r9b
jne 0xc3bd
orb $0x40, 0x2(%r8)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq %rax, %rsi
pushq %rbx
movq %rdi, %r10
andq %rdx, %r10
movq %rdi, %r11
shrq $0x34, %r11
movl $0x7ff, %ebx            # imm = 0x7FF
andq %rbx, %r11
andq %rsi, %rdx
movq %rsi, %r9
shrq $0x34, %r9
andq %rbx, %r9
movq %rsi, %rax
xorq %rdi, %rax
cmpq %rbx, %r11
popq %rbx
jne 0xc421
testq %r10, %r10
jne 0xc433
cmpl $0x7ff, %r9d            # imm = 0x7FF
setne %r10b
testq %rdx, %rdx
sete %r11b
orb %r10b, %r11b
je 0xc433
orq %rdx, %r9
jne 0xc532
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
orb $0x1, 0x2(%r8)
retq
cmpl $0x7ff, %r9d            # imm = 0x7FF
jne 0xc43b
testq %rdx, %rdx
je 0xc529
movq %r8, %rdx
jmp 0xdb26
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
testq %r11, %r11
jne 0xc470
testq %r10, %r10
je 0xc543
bsrq %r10, %rcx
xorl $0x3f, %ecx
addl $0xf5, %ecx
movzbl %cl, %ecx
shlq %cl, %r10
movl $0x1, %edi
subl %ecx, %edi
movslq %edi, %r11
testq %r9, %r9
jne 0xc49b
testq %rdx, %rdx
je 0xc543
bsrq %rdx, %rcx
xorl $0x3f, %ecx
addl $0xf5, %ecx
movzbl %cl, %ecx
shlq %cl, %rdx
movl $0x1, %edi
subl %ecx, %edi
movslq %edi, %r9
addq %r11, %r9
shrq $0x3f, %rax
shlq $0xa, %r10
movq %r10, %rcx
btsq $0x3e, %rcx
shlq $0xb, %rdx
orq %rdx, %rsi
movq %rcx, %rdi
shrq $0x20, %rdi
movq %rsi, %r11
shrq $0x20, %r11
movl %r10d, %r10d
movl %edx, %edx
imulq %r11, %r10
imulq %rdi, %rdx
imulq %rdi, %r11
xorl %edi, %edi
addq %r10, %rdx
setb %dil
shlq $0x20, %rdi
movq %rdx, %r10
shrq $0x20, %r10
addq %r11, %r10
shlq $0x20, %rdx
imulq %rcx, %rsi
cmpq %rdx, %rsi
adcq %rdi, %r10
xorl %ecx, %ecx
testq %rsi, %rsi
setne %cl
orq %r10, %rcx
xorl %esi, %esi
movq %rcx, %rdx
addq %rcx, %rdx
cmovsq %rcx, %rdx
setns %sil
xorq $-0x3ff, %rsi           # imm = 0xFC01
addq %r9, %rsi
movzbl %al, %edi
movq %r8, %rcx
jmp 0xa1a9
orq %r10, %r11
je 0xc411
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
andq %rdx, %rax
orq %rcx, %rax
retq
andq %rsi, %rax
retq