// File: /workspace/github_c_makefile_star2_O1/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 $0x68, %rsp
movq %r8, %r12
movq %rdx, %r14
movq %rdi, %rax
movabsq $0xffffffffffff, %r13   # imm = 0xFFFFFFFFFFFF
movq %rdi, 0x40(%rsp)
movq %rsi, %rdi
andq %r13, %rdi
movq %rdi, 0x20(%rsp)
movq %rsi, %rdx
shrq $0x30, %rdx
movl $0x7fff, %r10d          # imm = 0x7FFF
movl %edx, %r9d
andl %r10d, %r9d
movl %r9d, 0x4(%rsp)
movq %r14, 0x10(%rsp)
movq %rcx, %r15
andq %r13, %r15
movq %r15, 0x18(%rsp)
movq %rcx, %r8
shrq $0x30, %r8
movl %r8d, %ebx
andl %r10d, %ebx
movl %ebx, (%rsp)
movq %rcx, %rbp
xorq %rsi, %rbp
cmpl %r10d, %r9d
jne 0x12aab
orq %rax, %rdi
jne 0x12abc
cmpl $0x7fff, %ebx           # imm = 0x7FFF
setne %dl
movq %r15, %rdi
orq %r14, %rdi
sete %dil
orb %dl, %dil
je 0x12abc
andl $0x7fff, %r8d           # imm = 0x7FFF
orq %r14, %r8
orq %r15, %r8
je 0x12d2d
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq %rax, %rbp
movabsq $0x7fff000000000000, %rdx # imm = 0x7FFF000000000000
orq %rbp, %rdx
jmp 0x12d3d
cmpl $0x7fff, %ebx           # imm = 0x7FFF
jne 0x12acf
orq %r14, %r15
je 0x12d1b
movq %rax, %rdi
movq %r14, %rdx
movq %r12, %r8
callq 0x12261
jmp 0x12d6c
testl %r9d, %r9d
jne 0x12af7
movq %rdi, %rcx
orq %rax, %rcx
je 0x12d5a
leaq 0x4(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x40(%rsp), %r8
movq %rax, %rsi
callq 0x11f08
testl %ebx, %ebx
jne 0x12b1f
movq %r15, %rax
orq %r14, %rax
je 0x12d5a
movq %rsp, %rdx
leaq 0x18(%rsp), %rcx
leaq 0x10(%rsp), %r8
movq %r15, %rdi
movq %r14, %rsi
callq 0x11f08
movq %r12, 0x28(%rsp)
shrq $0x3f, %rbp
movq %rbp, 0x60(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
incq %r13
orq %rax, %r13
movq 0x18(%rsp), %r14
movq 0x10(%rsp), %r9
shldq $0x10, %r9, %r14
shlq $0x10, %r9
movq 0x40(%rsp), %rcx
movq %rcx, %r10
shrq $0x20, %r10
movq %r9, %rdi
shrq $0x20, %rdi
movq %rdi, 0x58(%rsp)
movl %ecx, %eax
movq %rcx, %rdx
movq %rcx, 0x30(%rsp)
movl %r9d, %r11d
movq %rax, %rcx
imulq %rdi, %rcx
movq %r10, %r15
imulq %r11, %r15
movq %r10, %rsi
imulq %rdi, %rsi
xorl %edi, %edi
addq %rcx, %r15
setb %dil
shlq $0x20, %rdi
movq %r15, %rcx
shrq $0x20, %rcx
shlq $0x20, %r15
movq %rdx, %r8
imulq %r9, %r8
movq %r8, 0x38(%rsp)
movq %r14, %rdx
shrq $0x20, %rdx
imulq %rdx, %rax
movl %r14d, %ebx
movq %r10, %r8
imulq %rbx, %r8
imulq %rdx, %r10
xorl %r12d, %r12d
addq %rax, %r8
setb %r12b
shlq $0x20, %r12
movq %r8, %rax
shrq $0x20, %rax
movq %rax, 0x48(%rsp)
shlq $0x20, %r8
movq 0x30(%rsp), %rbp
imulq %r14, %rbp
xorl %eax, %eax
cmpq %r8, %rbp
setb %al
movq %rax, 0x50(%rsp)
addq %rbp, %rsi
addq %rcx, %rsi
cmpq %r15, 0x38(%rsp)
adcq %rdi, %rsi
movq %r13, %r15
shrq $0x20, %r15
movl 0x8(%rsp), %eax
movq %rdx, %rcx
imulq %rax, %rcx
imulq %r15, %rbx
imulq %r15, %rdx
xorl %r8d, %r8d
addq %rcx, %rbx
movq %r14, 0x18(%rsp)
setb %r8b
shlq $0x20, %r8
movq %rbx, %rdi
shrq $0x20, %rdi
shlq $0x20, %rbx
imulq %r13, %r14
xorl %ecx, %ecx
cmpq %rbx, %r14
setb %cl
movq %rcx, 0x8(%rsp)
addq %r14, %r10
addq 0x48(%rsp), %r10
addq %r12, %r10
cmpq %rbp, %rsi
adcq 0x50(%rsp), %r10
movq %r9, 0x10(%rsp)
movq 0x58(%rsp), %rcx
imulq %rcx, %rax
imulq %r15, %r11
imulq %rcx, %r15
xorl %ebx, %ebx
addq %rax, %r11
setb %bl
shlq $0x20, %rbx
movq %r11, %rcx
shrq $0x20, %rcx
shlq $0x20, %r11
imulq %r13, %r9
xorl %eax, %eax
cmpq %r11, %r9
setb %al
addq %r15, %rcx
addq %rbx, %rcx
addq %rsi, %r9
adcq %rax, %rcx
xorl %eax, %eax
addq %r10, %rcx
setb %al
addq %r13, %rdx
addq %rdi, %rdx
addq %r8, %rdx
cmpq %r14, %r10
adcq 0x8(%rsp), %rdx
movq %r13, 0x20(%rsp)
addq 0x30(%rsp), %rcx
adcq %rax, %rdx
xorl %r8d, %r8d
cmpq $0x0, 0x38(%rsp)
movl 0x4(%rsp), %eax
setne %r8b
orq %r9, %r8
movq %rdx, %rsi
shrq $0x31, %rsi
movl (%rsp), %esi
je 0x12d41
addl %eax, %esi
movq %rdx, %rax
shldq $0x3f, %rcx, %rax
shlq $0x3f, %rcx
shrq %rdx
xorl %edi, %edi
testq %r8, %r8
setne %dil
orq %rcx, %rdi
addl $0xffffc001, %esi       # imm = 0xFFFFC001
movq %rax, %rcx
movq %rdi, %r8
jmp 0x12d49
andl $0x7fff, %edx           # imm = 0x7FFF
orq %rax, %rdx
orq %rdi, %rdx
jne 0x12a8c
orb $0x1, 0x2(%r12)
movabsq $0x7fff800000000000, %rdx # imm = 0x7FFF800000000000
xorl %eax, %eax
jmp 0x12d6c
addl %eax, %esi
addl $0xffffc000, %esi       # imm = 0xFFFFC000
movq 0x28(%rsp), %r9
movzbl 0x60(%rsp), %edi
callq 0x12d7b
jmp 0x12d6c
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq %rax, %rbp
xorl %eax, %eax
movq %rbp, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq