// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/softfloat.c
// Function: addFloatx80Sigs
static floatx80 addFloatx80Sigs(floatx80 a, floatx80 b, flag zSign,
                                float_status *status)
{
    int32 aExp, bExp, zExp;
    uint64_t aSig, bSig, zSig0, zSig1;
    int32 expDiff;

    aSig = extractFloatx80Frac( a );
    aExp = extractFloatx80Exp( a );
    bSig = extractFloatx80Frac( b );
    bExp = extractFloatx80Exp( b );
    expDiff = aExp - bExp;
    if ( 0 < expDiff ) {
        if ( aExp == 0x7FFF ) {
            if ((uint64_t)(aSig << 1)) {
                return propagateFloatx80NaN(a, b, status);
            }
            return a;
        }
        if ( bExp == 0 ) --expDiff;
        shift64ExtraRightJamming( bSig, 0, expDiff, &bSig, &zSig1 );
        zExp = aExp;
    }
    else if ( expDiff < 0 ) {
        if ( bExp == 0x7FFF ) {
            if ((uint64_t)(bSig << 1)) {
                return propagateFloatx80NaN(a, b, status);
            }
            return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) );
        }
        if ( aExp == 0 ) ++expDiff;
        shift64ExtraRightJamming( aSig, 0, - expDiff, &aSig, &zSig1 );
        zExp = bExp;
    }
    else {
        if ( aExp == 0x7FFF ) {
            if ( (uint64_t) ( ( aSig | bSig )<<1 ) ) {
                return propagateFloatx80NaN(a, b, status);
            }
            return a;
        }
        zSig1 = 0;
        zSig0 = aSig + bSig;
        if ( aExp == 0 ) {
            normalizeFloatx80Subnormal( zSig0, &zExp, &zSig0 );
            goto roundAndPack;
        }
        zExp = aExp;
        goto shiftRight1;
    }
    zSig0 = aSig + bSig;
    if ( (int64_t) zSig0 < 0 ) goto roundAndPack;
 shiftRight1:
    shift64ExtraRightJamming( zSig0, zSig1, 1, &zSig0, &zSig1 );
    zSig0 |= LIT64( 0x8000000000000000 );
    ++zExp;
 roundAndPack:
    return roundAndPackFloatx80(status->floatx80_rounding_precision,
                                zSign, zExp, zSig0, zSig1, status);
}

// Assembly:
pushq %rax
movq %rdi, %rax
movl $0x7fff, %edi           # imm = 0x7FFF
movl %esi, %r10d
andl %edi, %r10d
movl %ecx, %r11d
andl %edi, %r11d
movl %r10d, %edi
subl %r11d, %edi
jle 0x1008e
cmpl $0x7fff, %r10d          # imm = 0x7FFF
jne 0x100bf
leaq (,%rax,2), %rdi
jmp 0x100a6
js 0x100ed
cmpl $0x7fff, %r10d          # imm = 0x7FFF
jne 0x10122
movq %rdx, %rdi
orq %rax, %rdi
shlq %rdi
testq %rdi, %rdi
je 0x10231
movq %rax, %rdi
movq %r9, %r8
callq 0xff00
jmp 0x1022f
cmpl $0x1, %r11d
sbbl $0x0, %edi
je 0x10131
cmpl $0x3f, %edi
ja 0x1013e
movl %edi, %ecx
negl %ecx
andl $0x3f, %ecx
movq %rdx, %r11
shlq %cl, %r11
movl %edi, %ecx
shrq %cl, %rdx
movq %rax, %rcx
movq %rdx, %rsi
movq %r11, %rdx
jmp 0x101e3
cmpl $0x7fff, %r11d          # imm = 0x7FFF
jne 0x1014d
leaq (,%rdx,2), %rdi
testq %rdi, %rdi
jne 0x100af
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movzbl %r8b, %esi
shll $0xf, %esi
orl $0x7fff, %esi           # imm = 0x7FFF
incq %rax
jmp 0x10231
addq %rax, %rdx
testl %r10d, %r10d
je 0x1017d
xorl %eax, %eax
jmp 0x101ee
movq %rax, %rcx
movq %rdx, %rsi
xorl %edx, %edx
jmp 0x101e3
cmpl $0x40, %edi
jne 0x1016a
xorl %esi, %esi
movq %rax, %rcx
jmp 0x101e3
cmpl $0x1, %r10d
movl $0x0, %esi
sbbl %esi, %esi
movl %esi, %ecx
subl %edi, %ecx
subl %edi, %esi
jne 0x1018c
movq %rax, %rcx
movq %rdx, %rsi
xorl %edx, %edx
jmp 0x101e0
xorl %edi, %edi
testq %rdx, %rdx
setne %dil
xorl %esi, %esi
movq %rax, %rcx
movq %rdi, %rdx
jmp 0x101e3
testq %rdx, %rdx
je 0x101bb
bsrq %rdx, %rcx
xorq $0x3f, %rcx
jmp 0x101c0
cmpl $0x3f, %esi
ja 0x101ac
negl %ecx
andl $0x3f, %ecx
movq %rax, %rdi
shlq %cl, %rdi
movl %esi, %ecx
shrq %cl, %rax
movq %rdx, %rsi
movq %rax, %rcx
movq %rdi, %rdx
jmp 0x101e0
cmpl $0x40, %esi
jne 0x101d3
xorl %ecx, %ecx
movq %rdx, %rsi
movq %rax, %rdx
jmp 0x101e0
movl $0x40, %ecx
shlq %cl, %rdx
movl $0x1, %r10d
subl %ecx, %r10d
xorl %eax, %eax
movq %rdx, %rcx
jmp 0x1021b
movq %rdx, %rsi
xorl %edx, %edx
testq %rax, %rax
setne %dl
xorl %ecx, %ecx
movl %r11d, %r10d
movq %rdx, %rax
addq %rsi, %rcx
movq %rcx, %rdx
js 0x1021b
movq %rdx, %rcx
shlq $0x3f, %rcx
xorl %esi, %esi
testq %rax, %rax
setne %sil
orq %rcx, %rsi
shrq %rdx
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq (%rdx,%rax), %rcx
incq %rcx
incl %r10d
movq %rsi, %rax
movsbl 0x3(%r9), %edi
movzbl %r8b, %esi
movl %r10d, %edx
movq %rax, %r8
callq 0x10615
movl %edx, %esi
movl %esi, %edx
popq %rcx
retq