// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/softfloat.c
// Function: floatx80_mul
floatx80 floatx80_mul(floatx80 a, floatx80 b, float_status *status)
{
    flag aSign, bSign, zSign;
    int32 aExp, bExp, zExp;
    uint64_t aSig, bSig, zSig0, zSig1;
    floatx80 z;

    aSig = extractFloatx80Frac( a );
    aExp = extractFloatx80Exp( a );
    aSign = extractFloatx80Sign( a );
    bSig = extractFloatx80Frac( b );
    bExp = extractFloatx80Exp( b );
    bSign = extractFloatx80Sign( b );
    zSign = aSign ^ bSign;
    if ( aExp == 0x7FFF ) {
        if (    (uint64_t) ( aSig<<1 )
             || ( ( bExp == 0x7FFF ) && (uint64_t) ( bSig<<1 ) ) ) {
            return propagateFloatx80NaN(a, b, status);
        }
        if ( ( bExp | bSig ) == 0 ) goto invalid;
        return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) );
    }
    if ( bExp == 0x7FFF ) {
        if ((uint64_t)(bSig << 1)) {
            return propagateFloatx80NaN(a, b, status);
        }
        if ( ( aExp | aSig ) == 0 ) {
 invalid:
            float_raise(float_flag_invalid, status);
            z.low = floatx80_default_nan_low;
            z.high = floatx80_default_nan_high;
            return z;
        }
        return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) );
    }
    if ( aExp == 0 ) {
        if ( aSig == 0 ) return packFloatx80( zSign, 0, 0 );
        normalizeFloatx80Subnormal( aSig, &aExp, &aSig );
    }
    if ( bExp == 0 ) {
        if ( bSig == 0 ) return packFloatx80( zSign, 0, 0 );
        normalizeFloatx80Subnormal( bSig, &bExp, &bSig );
    }
    zExp = aExp + bExp - 0x3FFE;
    mul64To128( aSig, bSig, &zSig0, &zSig1 );
    if ( 0 < (int64_t) zSig0 ) {
        shortShift128Left( zSig0, zSig1, 1, &zSig0, &zSig1 );
        --zExp;
    }
    return roundAndPackFloatx80(status->floatx80_rounding_precision,
                                zSign, zExp, zSig0, zSig1, status);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rdx, %r8
movl $0x7fff, %eax           # imm = 0x7FFF
movl %ecx, %r14d
andl %eax, %r14d
movl %ecx, %edx
xorl %esi, %edx
movl %esi, %r9d
notl %r9d
testw $0x7fff, %r9w           # imm = 0x7FFF
jne 0xf14f
leaq (,%rdi,2), %rax
testq %rax, %rax
jne 0xf16f
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpl $0x7fff, %r14d          # imm = 0x7FFF
setne %r9b
testq %rax, %r8
sete %r10b
orb %r9b, %r10b
je 0xf16f
movl %r14d, %ecx
orq %r8, %rcx
jne 0xf210
jmp 0xf21b
movl %esi, %r15d
andl %eax, %r15d
cmpl $0x7fff, %r14d          # imm = 0x7FFF
jne 0xf17f
leaq (,%r8,2), %rax
testq %rax, %rax
je 0xf1fe
movq %r8, %rdx
movq %rbx, %r8
callq 0xec53
jmp 0xf24c
pushq $0x1
popq %rax
testl %r15d, %r15d
jne 0xf1a1
testq %rdi, %rdi
je 0xf25b
bsrq %rdi, %rcx
xorq $0x3f, %rcx
shlq %cl, %rdi
movl %eax, %r15d
subl %ecx, %r15d
testl %r14d, %r14d
jne 0xf1bf
testq %r8, %r8
je 0xf25b
bsrq %r8, %rcx
xorq $0x3f, %rcx
shlq %cl, %r8
subl %ecx, %eax
movl %eax, %r14d
movzwl %dx, %ebp
shrl $0xf, %ebp
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
movq %r8, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0xd0a6
movq (%r12), %rcx
movq (%r13), %r8
testq %rcx, %rcx
jle 0xf22f
addl %r15d, %r14d
shldq $0x1, %r8, %rcx
addq %r8, %r8
addl $0xffffc001, %r14d      # imm = 0xFFFFC001
jmp 0xf239
movl %r15d, %eax
orq %rdi, %rax
je 0xf21b
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
orl $0x7fff, %edx           # imm = 0x7FFF
incq %rax
jmp 0xf24c
orb $0x1, 0x2(%rbx)
movw $0xffff, %dx            # imm = 0xFFFF
movabsq $-0x4000000000000000, %rax # imm = 0xC000000000000000
jmp 0xf24c
addl %r15d, %r14d
addl $0xffffc002, %r14d      # imm = 0xFFFFC002
movsbl 0x3(%rbx), %edi
movzbl %bpl, %esi
movl %r14d, %edx
movq %rbx, %r9
callq 0xf265
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andl $0x8000, %edx           # imm = 0x8000
xorl %eax, %eax
jmp 0xf24c