// File: /workspace/github_c_makefile_star2_O1/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 0x10086
cmpl $0x7fff, %r10d          # imm = 0x7FFF
jne 0x100b7
leaq (,%rax,2), %rdi
jmp 0x1009e
js 0x100e5
cmpl $0x7fff, %r10d          # imm = 0x7FFF
jne 0x1011a
movq %rdx, %rdi
orq %rax, %rdi
shlq %rdi
testq %rdi, %rdi
je 0x10229
movq %rax, %rdi
movq %r9, %r8
callq 0xfecb
jmp 0x10227
cmpl $0x1, %r11d
sbbl $0x0, %edi
je 0x10129
cmpl $0x3f, %edi
ja 0x10136
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 0x101db
cmpl $0x7fff, %r11d          # imm = 0x7FFF
jne 0x10145
leaq (,%rdx,2), %rdi
testq %rdi, %rdi
jne 0x100a7
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movzbl %r8b, %esi
shll $0xf, %esi
orl $0x7fff, %esi           # imm = 0x7FFF
incq %rax
jmp 0x10229
addq %rax, %rdx
testl %r10d, %r10d
je 0x10175
xorl %eax, %eax
jmp 0x101e6
movq %rax, %rcx
movq %rdx, %rsi
xorl %edx, %edx
jmp 0x101db
cmpl $0x40, %edi
jne 0x10162
xorl %esi, %esi
movq %rax, %rcx
jmp 0x101db
cmpl $0x1, %r10d
movl $0x0, %esi
sbbl %esi, %esi
movl %esi, %ecx
subl %edi, %ecx
subl %edi, %esi
jne 0x10184
movq %rax, %rcx
movq %rdx, %rsi
xorl %edx, %edx
jmp 0x101d8
xorl %edi, %edi
testq %rdx, %rdx
setne %dil
xorl %esi, %esi
movq %rax, %rcx
movq %rdi, %rdx
jmp 0x101db
testq %rdx, %rdx
je 0x101b3
bsrq %rdx, %rcx
xorq $0x3f, %rcx
jmp 0x101b8
cmpl $0x3f, %esi
ja 0x101a4
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 0x101d8
cmpl $0x40, %esi
jne 0x101cb
xorl %ecx, %ecx
movq %rdx, %rsi
movq %rax, %rdx
jmp 0x101d8
movl $0x40, %ecx
shlq %cl, %rdx
movl $0x1, %r10d
subl %ecx, %r10d
xorl %eax, %eax
movq %rdx, %rcx
jmp 0x10213
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 0x10213
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 0x1060d
movl %edx, %esi
movl %esi, %edx
popq %rcx
retq