// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %r8, %r9
movq %rdx, %r8
movl %esi, %r11d
movl $0x7fff, %eax           # imm = 0x7FFF
movl %ecx, %r10d
andl %eax, %r10d
movl %ecx, %edx
xorl %esi, %edx
movl %esi, %ebx
notl %ebx
testl $0x7fff, %ebx           # imm = 0x7FFF
jne 0x104db
leaq (,%rdi,2), %rax
testq %rax, %rax
jne 0x104f7
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpl $0x7fff, %r10d          # imm = 0x7FFF
setne %sil
testq %rax, %r8
sete %bl
orb %sil, %bl
je 0x104f7
movl %r10d, %ecx
orq %r8, %rcx
jne 0x105c1
jmp 0x105cc
andl %eax, %esi
cmpl $0x7fff, %r10d          # imm = 0x7FFF
jne 0x1050a
leaq (,%r8,2), %rax
testq %rax, %rax
je 0x105b0
movl %r11d, %esi
movq %r8, %rdx
movq %r9, %r8
callq 0xfecb
jmp 0x105fb
testl %esi, %esi
jne 0x10529
testq %rdi, %rdi
je 0x10603
bsrq %rdi, %rcx
xorq $0x3f, %rcx
shlq %cl, %rdi
movl $0x1, %esi
subl %ecx, %esi
testl %r10d, %r10d
jne 0x1054b
testq %r8, %r8
je 0x10603
bsrq %r8, %rcx
xorq $0x3f, %rcx
shlq %cl, %r8
movl $0x1, %r10d
subl %ecx, %r10d
movzwl %dx, %eax
shrl $0xf, %eax
movq %rdi, %rcx
shrq $0x20, %rcx
movq %r8, %rdx
shrq $0x20, %rdx
movl %edi, %r11d
movl %r8d, %ebx
imulq %rdx, %r11
imulq %rcx, %rbx
imulq %rcx, %rdx
xorl %r14d, %r14d
addq %r11, %rbx
setb %r14b
shlq $0x20, %r14
movq %rbx, %rcx
shrq $0x20, %rcx
addq %rdx, %rcx
shlq $0x20, %rbx
imulq %rdi, %r8
cmpq %rbx, %r8
adcq %r14, %rcx
testq %rcx, %rcx
jle 0x105e1
addl %esi, %r10d
shldq $0x1, %r8, %rcx
addq %r8, %r8
addl $0xffffc001, %r10d      # imm = 0xFFFFC001
jmp 0x105eb
movl %esi, %eax
orq %rdi, %rax
je 0x105cc
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
orl $0x7fff, %edx           # imm = 0x7FFF
incq %rax
jmp 0x105fb
orb $0x1, 0x2(%r9)
movw $0xffff, %dx            # imm = 0xFFFF
movabsq $-0x4000000000000000, %rax # imm = 0xC000000000000000
jmp 0x105fb
addl %esi, %r10d
addl $0xffffc002, %r10d      # imm = 0xFFFFC002
movsbl 0x3(%r9), %edi
movzbl %al, %esi
movl %r10d, %edx
callq 0x1060d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
andl $0x8000, %edx           # imm = 0x8000
xorl %eax, %eax
jmp 0x105fb