// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movw %cx, %ax
movw %si, %cx
movq %rdi, -0x20(%rbp)
movw %cx, -0x18(%rbp)
movq %rdx, -0x30(%rbp)
movw %ax, -0x28(%rbp)
movq %r8, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movzwl -0x18(%rbp), %esi
callq 0x1ab30
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rdi
movzwl -0x18(%rbp), %esi
callq 0x1ab50
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movzwl -0x18(%rbp), %esi
callq 0x1ab70
movb %al, -0x39(%rbp)
movq -0x30(%rbp), %rdi
movzwl -0x28(%rbp), %esi
callq 0x1ab30
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rdi
movzwl -0x28(%rbp), %esi
callq 0x1ab50
movl %eax, -0x44(%rbp)
movq -0x30(%rbp), %rdi
movzwl -0x28(%rbp), %esi
callq 0x1ab70
movb %al, -0x3a(%rbp)
movzbl -0x39(%rbp), %eax
movzbl -0x3a(%rbp), %ecx
xorl %ecx, %eax
movb %al, -0x3b(%rbp)
cmpl $0x7fff, -0x40(%rbp)    # imm = 0x7FFF
jne 0x1c052
movq -0x50(%rbp), %rax
shlq %rax
cmpq $0x0, %rax
jne 0x1bff4
cmpl $0x7fff, -0x44(%rbp)    # imm = 0x7FFF
jne 0x1c01d
movq -0x58(%rbp), %rax
shlq %rax
cmpq $0x0, %rax
je 0x1c01d
movq -0x38(%rbp), %r8
movq -0x20(%rbp), %rdi
movw -0x18(%rbp), %ax
movq -0x30(%rbp), %rdx
movzwl %ax, %esi
movzwl -0x28(%rbp), %ecx
callq 0x1b670
movq %rax, -0x10(%rbp)
movw %dx, -0x8(%rbp)
jmp 0x1c1f1
movslq -0x44(%rbp), %rax
orq -0x58(%rbp), %rax
cmpq $0x0, %rax
jne 0x1c02d
jmp 0x1c0a5
movl $0x7fff, %esi           # imm = 0x7FFF
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
movzbl -0x3b(%rbp), %edi
callq 0x11990
movq %rax, -0x10(%rbp)
movw %dx, -0x8(%rbp)
jmp 0x1c1f1
cmpl $0x7fff, -0x44(%rbp)    # imm = 0x7FFF
jne 0x1c101
movq -0x58(%rbp), %rax
shlq %rax
cmpq $0x0, %rax
je 0x1c095
movq -0x38(%rbp), %r8
movq -0x20(%rbp), %rdi
movw -0x18(%rbp), %ax
movq -0x30(%rbp), %rdx
movzwl %ax, %esi
movzwl -0x28(%rbp), %ecx
callq 0x1b670
movq %rax, -0x10(%rbp)
movw %dx, -0x8(%rbp)
jmp 0x1c1f1
movslq -0x40(%rbp), %rax
orq -0x50(%rbp), %rax
cmpq $0x0, %rax
jne 0x1c0dc
jmp 0x1c0a5
movq -0x38(%rbp), %rsi
movl $0x1, %edi
callq 0x11080
movabsq $-0x4000000000000000, %rax # imm = 0xC000000000000000
movq %rax, -0x78(%rbp)
movw $0xffff, -0x70(%rbp)    # imm = 0xFFFF
movq -0x78(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1c1f1
movl $0x7fff, %esi           # imm = 0x7FFF
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
movzbl -0x3b(%rbp), %edi
callq 0x11990
movq %rax, -0x10(%rbp)
movw %dx, -0x8(%rbp)
jmp 0x1c1f1
cmpl $0x0, -0x40(%rbp)
jne 0x1c13b
cmpq $0x0, -0x50(%rbp)
jne 0x1c12a
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
movzbl -0x3b(%rbp), %edi
callq 0x11990
movq %rax, -0x10(%rbp)
movw %dx, -0x8(%rbp)
jmp 0x1c1f1
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x1c210
cmpl $0x0, -0x44(%rbp)
jne 0x1c175
cmpq $0x0, -0x58(%rbp)
jne 0x1c164
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
movzbl -0x3b(%rbp), %edi
callq 0x11990
movq %rax, -0x10(%rbp)
movw %dx, -0x8(%rbp)
jmp 0x1c1f1
movq -0x58(%rbp), %rdi
leaq -0x44(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x1c210
movl -0x40(%rbp), %eax
addl -0x44(%rbp), %eax
subl $0x3ffe, %eax           # imm = 0x3FFE
movl %eax, -0x48(%rbp)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
leaq -0x60(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0x18730
xorl %eax, %eax
cmpq -0x60(%rbp), %rax
jge 0x1c1c3
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
movl $0x1, %edx
leaq -0x60(%rbp), %rcx
leaq -0x68(%rbp), %r8
callq 0x121c0
movl -0x48(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movb 0x3(%rax), %sil
movb -0x3b(%rbp), %al
movl -0x48(%rbp), %edx
movq -0x60(%rbp), %rcx
movq -0x68(%rbp), %r8
movq -0x38(%rbp), %r9
movsbl %sil, %edi
movzbl %al, %esi
callq 0x1c260
movq %rax, -0x10(%rbp)
movw %dx, -0x8(%rbp)
movq -0x10(%rbp), %rax
movw -0x8(%rbp), %dx
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)