// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/softfloat.c
// Function: float128_mul
float128 float128_mul(float128 a, float128 b, float_status *status)
{
    flag aSign, bSign, zSign;
    int32 aExp, bExp, zExp;
    uint64_t aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2, zSig3;
    float128 z;

    aSig1 = extractFloat128Frac1( a );
    aSig0 = extractFloat128Frac0( a );
    aExp = extractFloat128Exp( a );
    aSign = extractFloat128Sign( a );
    bSig1 = extractFloat128Frac1( b );
    bSig0 = extractFloat128Frac0( b );
    bExp = extractFloat128Exp( b );
    bSign = extractFloat128Sign( b );
    zSign = aSign ^ bSign;
    if ( aExp == 0x7FFF ) {
        if (    ( aSig0 | aSig1 )
             || ( ( bExp == 0x7FFF ) && ( bSig0 | bSig1 ) ) ) {
            return propagateFloat128NaN(a, b, status);
        }
        if ( ( bExp | bSig0 | bSig1 ) == 0 ) goto invalid;
        return packFloat128( zSign, 0x7FFF, 0, 0 );
    }
    if ( bExp == 0x7FFF ) {
        if (bSig0 | bSig1) {
            return propagateFloat128NaN(a, b, status);
        }
        if ( ( aExp | aSig0 | aSig1 ) == 0 ) {
 invalid:
            float_raise(float_flag_invalid, status);
            z.low = float128_default_nan_low;
            z.high = float128_default_nan_high;
            return z;
        }
        return packFloat128( zSign, 0x7FFF, 0, 0 );
    }
    if ( aExp == 0 ) {
        if ( ( aSig0 | aSig1 ) == 0 ) return packFloat128( zSign, 0, 0, 0 );
        normalizeFloat128Subnormal( aSig0, aSig1, &aExp, &aSig0, &aSig1 );
    }
    if ( bExp == 0 ) {
        if ( ( bSig0 | bSig1 ) == 0 ) return packFloat128( zSign, 0, 0, 0 );
        normalizeFloat128Subnormal( bSig0, bSig1, &bExp, &bSig0, &bSig1 );
    }
    zExp = aExp + bExp - 0x4000;
    aSig0 |= LIT64( 0x0001000000000000 );
    shortShift128Left( bSig0, bSig1, 16, &bSig0, &bSig1 );
    mul128To256( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1, &zSig2, &zSig3 );
    add128( zSig0, zSig1, aSig0, aSig1, &zSig0, &zSig1 );
    zSig2 |= ( zSig3 != 0 );
    if ( LIT64( 0x0002000000000000 ) <= zSig0 ) {
        shift128ExtraRightJamming(
            zSig0, zSig1, zSig2, 1, &zSig0, &zSig1, &zSig2 );
        ++zExp;
    }
    return roundAndPackFloat128(zSign, zExp, zSig0, zSig1, zSig2, status);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r8, %rbx
movq %rdx, %r14
movq %rdi, %rax
movabsq $0xffffffffffff, %rbp   # imm = 0xFFFFFFFFFFFF
movq %rdi, 0x38(%rsp)
movq %rsi, %rdi
andq %rbp, %rdi
movq %rdi, 0x40(%rsp)
movq %rsi, %rdx
shrq $0x30, %rdx
movl $0x7fff, %r10d          # imm = 0x7FFF
movl %edx, %r9d
andl %r10d, %r9d
movl %r9d, 0x4(%rsp)
movq %r14, 0x68(%rsp)
movq %rcx, %r12
andq %rbp, %r12
movq %r12, 0x70(%rsp)
movq %rcx, %r8
shrq $0x30, %r8
movl %r8d, %r15d
andl %r10d, %r15d
movl %r15d, 0x24(%rsp)
movq %rcx, %r13
xorq %rsi, %r13
cmpl %r10d, %r9d
jne 0x12afc
orq %rax, %rdi
jne 0x12b0a
cmpl $0x7fff, %r15d          # imm = 0x7FFF
setne %dl
movq %r12, %rdi
orq %r14, %rdi
sete %dil
orb %dl, %dil
je 0x12b0a
andl $0x7fff, %r8d           # imm = 0x7FFF
orq %r14, %r8
orq %r12, %r8
je 0x12b5f
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq %rax, %r13
movabsq $0x7fff000000000000, %rdx # imm = 0x7FFF000000000000
orq %r13, %rdx
jmp 0x12b6d
cmpl $0x7fff, %r15d          # imm = 0x7FFF
jne 0x12b1d
orq %r14, %r12
je 0x12b51
movq %rax, %rdi
movq %r14, %rdx
movq %rbx, %r8
callq 0x122b1
jmp 0x12dd0
testl %r9d, %r9d
jne 0x12b45
movq %rdi, %rcx
orq %rax, %rcx
je 0x12dbe
leaq 0x4(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x38(%rsp), %r8
movq %rax, %rsi
callq 0x11f34
testl %r15d, %r15d
je 0x12b74
movq %rbx, 0x18(%rsp)
jmp 0x12bb4
andl $0x7fff, %edx           # imm = 0x7FFF
orq %rax, %rdx
orq %rdi, %rdx
jne 0x12ae0
orb $0x1, 0x2(%rbx)
movabsq $0x7fff800000000000, %rdx # imm = 0x7FFF800000000000
xorl %eax, %eax
jmp 0x12dd0
movq %r12, %rax
orq %r14, %rax
je 0x12dbe
movq %rbx, 0x18(%rsp)
leaq 0x24(%rsp), %r15
leaq 0x70(%rsp), %rbx
leaq 0x68(%rsp), %rax
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movq %rax, %r14
movq %rax, %r8
callq 0x11f34
movl (%r15), %r15d
movq (%rbx), %r12
movq (%r14), %r14
shrq $0x3f, %r13
movq %r13, 0x60(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
incq %rbp
shldq $0x10, %r14, %r12
orq %rax, %rbp
shlq $0x10, %r14
movq 0x38(%rsp), %rcx
movq %rcx, %r8
shrq $0x20, %r8
movq %r14, %rsi
shrq $0x20, %rsi
movq %rsi, 0x58(%rsp)
movl %ecx, %eax
movq %rcx, %rdx
movq %rcx, 0x28(%rsp)
movl %r14d, %r10d
movq %rax, %rcx
imulq %rsi, %rcx
movq %r8, %rbx
imulq %r10, %rbx
movq %r8, %r9
imulq %rsi, %r9
xorl %r11d, %r11d
addq %rcx, %rbx
setb %r11b
shlq $0x20, %r11
movq %rbx, %rcx
shrq $0x20, %rcx
movq %rcx, 0x8(%rsp)
shlq $0x20, %rbx
movq %rdx, %rcx
imulq %r14, %rcx
movq %rcx, 0x30(%rsp)
movq %r12, %rdx
shrq $0x20, %rdx
imulq %rdx, %rax
movl %r12d, %edi
movq %r8, %rsi
imulq %rdi, %rsi
imulq %rdx, %r8
xorl %ecx, %ecx
addq %rax, %rsi
setb %cl
shlq $0x20, %rcx
movq %rsi, %rax
shrq $0x20, %rax
movq %rax, 0x48(%rsp)
shlq $0x20, %rsi
movq 0x28(%rsp), %r13
imulq %r12, %r13
xorl %eax, %eax
cmpq %rsi, %r13
setb %al
movq %rax, 0x50(%rsp)
addq %r13, %r9
addq 0x8(%rsp), %r9
cmpq %rbx, 0x30(%rsp)
adcq %r11, %r9
movq %rbp, %r11
shrq $0x20, %r11
movl 0x10(%rsp), %esi
movq %rdx, %rbx
imulq %rsi, %rbx
imulq %r11, %rdi
imulq %r11, %rdx
addq %rbx, %rdi
movl $0x0, %eax
setb %al
shlq $0x20, %rax
movq %rax, 0x10(%rsp)
movq %rdi, %rbx
shrq $0x20, %rbx
shlq $0x20, %rdi
imulq %rbp, %r12
xorl %eax, %eax
cmpq %rdi, %r12
setb %al
movq %rax, 0x8(%rsp)
addq %r12, %r8
addq 0x48(%rsp), %r8
addq %rcx, %r8
cmpq %r13, %r9
adcq 0x50(%rsp), %r8
movq 0x58(%rsp), %rcx
imulq %rcx, %rsi
imulq %r11, %r10
imulq %rcx, %r11
xorl %edi, %edi
addq %rsi, %r10
setb %dil
shlq $0x20, %rdi
movq %r10, %rcx
shrq $0x20, %rcx
shlq $0x20, %r10
imulq %rbp, %r14
xorl %eax, %eax
cmpq %r10, %r14
setb %al
addq %r11, %rcx
addq %rdi, %rcx
addq %r9, %r14
adcq %rax, %rcx
xorl %eax, %eax
addq %r8, %rcx
setb %al
addq %rbp, %rdx
addq %rbx, %rdx
addq 0x10(%rsp), %rdx
cmpq %r12, %r8
adcq 0x8(%rsp), %rdx
addq 0x28(%rsp), %rcx
adcq %rax, %rdx
xorl %r8d, %r8d
cmpq $0x0, 0x30(%rsp)
setne %r8b
orq %r14, %r8
movq %rdx, %rax
shrq $0x31, %rax
movl 0x4(%rsp), %eax
je 0x12da0
addl %eax, %r15d
movq %rdx, %rax
shldq $0x3f, %rcx, %rax
shlq $0x3f, %rcx
shrq %rdx
xorl %esi, %esi
testq %r8, %r8
setne %sil
orq %rcx, %rsi
addl $0xffffc001, %r15d      # imm = 0xFFFFC001
movq %rax, %rcx
movq %rsi, %r8
jmp 0x12daa
addl %eax, %r15d
addl $0xffffc000, %r15d      # imm = 0xFFFFC000
movq 0x18(%rsp), %r9
movzbl 0x60(%rsp), %edi
movl %r15d, %esi
callq 0x12ddf
jmp 0x12dd0
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq %rax, %r13
xorl %eax, %eax
movq %r13, %rdx
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq