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

    aSig1 = extractFloat128Frac1( a );
    aSig0 = extractFloat128Frac0( a );
    aExp = extractFloat128Exp( a );
    bSig1 = extractFloat128Frac1( b );
    bSig0 = extractFloat128Frac0( b );
    bExp = extractFloat128Exp( b );
    expDiff = aExp - bExp;
    if ( 0 < expDiff ) {
        if ( aExp == 0x7FFF ) {
            if (aSig0 | aSig1) {
                return propagateFloat128NaN(a, b, status);
            }
            return a;
        }
        if ( bExp == 0 ) {
            --expDiff;
        }
        else {
            bSig0 |= LIT64( 0x0001000000000000 );
        }
        shift128ExtraRightJamming(
            bSig0, bSig1, 0, expDiff, &bSig0, &bSig1, &zSig2 );
        zExp = aExp;
    }
    else if ( expDiff < 0 ) {
        if ( bExp == 0x7FFF ) {
            if (bSig0 | bSig1) {
                return propagateFloat128NaN(a, b, status);
            }
            return packFloat128( zSign, 0x7FFF, 0, 0 );
        }
        if ( aExp == 0 ) {
            ++expDiff;
        }
        else {
            aSig0 |= LIT64( 0x0001000000000000 );
        }
        shift128ExtraRightJamming(
            aSig0, aSig1, 0, - expDiff, &aSig0, &aSig1, &zSig2 );
        zExp = bExp;
    }
    else {
        if ( aExp == 0x7FFF ) {
            if ( aSig0 | aSig1 | bSig0 | bSig1 ) {
                return propagateFloat128NaN(a, b, status);
            }
            return a;
        }
        add128( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1 );
        if ( aExp == 0 ) {
            if (status->flush_to_zero) {
                if (zSig0 | zSig1) {
                    float_raise(float_flag_output_denormal, status);
                }
                return packFloat128(zSign, 0, 0, 0);
            }
            return packFloat128( zSign, 0, zSig0, zSig1 );
        }
        zSig2 = 0;
        zSig0 |= LIT64( 0x0002000000000000 );
        zExp = aExp;
        goto shiftRight1;
    }
    aSig0 |= LIT64( 0x0001000000000000 );
    add128( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1 );
    --zExp;
    if ( zSig0 < LIT64( 0x0002000000000000 ) ) goto roundAndPack;
    ++zExp;
 shiftRight1:
    shift128ExtraRightJamming(
        zSig0, zSig1, zSig2, 1, &zSig0, &zSig1, &zSig2 );
 roundAndPack:
    return roundAndPackFloat128(zSign, zExp, zSig0, zSig1, zSig2, status);

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rax
movq %rsi, %r11
movabsq $0x1000000000000, %r14  # imm = 0x1000000000000
leaq -0x1(%r14), %rbx
movq %rsi, %rdx
andq %rbx, %rdx
shrq $0x30, %rsi
movl $0x7fff, %r10d          # imm = 0x7FFF
andl %r10d, %esi
andq %rcx, %rbx
movq %rcx, %r15
shrq $0x30, %r15
andl %r10d, %r15d
movl %esi, %r10d
subl %r15d, %r10d
jle 0x124e5
cmpl $0x7fff, %esi           # imm = 0x7FFF
jne 0x12502
orq %rdi, %rdx
jne 0x1255b
jmp 0x124fa
js 0x12549
cmpl $0x7fff, %esi           # imm = 0x7FFF
jne 0x1256e
orq %rdi, %rdx
orq %rax, %rdx
orq %rbx, %rdx
jne 0x1255b
movq %rdi, %rax
jmp 0x126ee
movq %rbx, %rcx
orq %r14, %rcx
xorl %r11d, %r11d
testl %r15d, %r15d
sete %r11b
cmovneq %rcx, %rbx
subl %r11d, %r10d
je 0x12588
movl %r10d, %ecx
negb %cl
andb $0x3f, %cl
cmpl $0x3f, %r10d
ja 0x12590
movq %rax, %r11
shlq %cl, %r11
movq %rbx, %r15
shlq %cl, %r15
movl %r10d, %ecx
shrq %cl, %rax
shrq %cl, %rbx
orq %r15, %rax
movq %rbx, %rcx
movq %rax, %rbx
jmp 0x1259b
cmpl $0x7fff, %r15d          # imm = 0x7FFF
jne 0x125b5
orq %rax, %rbx
je 0x1263e
movq %r11, %rsi
movq %rax, %rdx
movq %r9, %r8
callq 0x122b1
jmp 0x126eb
addq %rdi, %rax
adcq %rdx, %rbx
testl %esi, %esi
je 0x125f4
btsq $0x31, %rbx
xorl %r10d, %r10d
movq %rbx, %rdx
jmp 0x126bb
xorl %r10d, %r10d
jmp 0x1269f
cmpl $0x40, %r10d
jne 0x125de
xorl %ecx, %ecx
movq %rax, %r11
xorl %eax, %eax
xorl %r10d, %r10d
testq %rax, %rax
setne %r10b
orq %r11, %r10
movq %rbx, %rax
movq %rcx, %rbx
jmp 0x1269f
movq %rdx, %rcx
orq %r14, %rcx
xorl %r11d, %r11d
testl %esi, %esi
sete %r11b
cmovneq %rcx, %rdx
negl %r11d
movl %r11d, %ecx
subl %r10d, %ecx
subl %r10d, %r11d
jne 0x12613
xorl %r10d, %r10d
jmp 0x1269c
cmpl $0x7f, %r10d
ja 0x1265a
movq %rbx, %r11
shlq %cl, %r11
movl %r10d, %ecx
shrq %cl, %rbx
xorl %ecx, %ecx
jmp 0x1259d
cmpb $0x0, 0x4(%r9)
je 0x126f7
orq %rax, %rbx
je 0x12609
orb $-0x80, 0x2(%r9)
movzbl %r8b, %r11d
shlq $0x3f, %r11
jmp 0x12653
negb %cl
andb $0x3f, %cl
cmpl $0x3f, %r11d
ja 0x12678
movq %rdi, %rsi
shlq %cl, %rsi
movq %rdx, %r10
shlq %cl, %r10
movl %r11d, %ecx
shrq %cl, %rdi
shrq %cl, %rdx
orq %r10, %rdi
movq %rdx, %rcx
movq %rdi, %rdx
jmp 0x12687
movzbl %r8b, %eax
shlq $0x3f, %rax
movabsq $0x7fff000000000000, %r11 # imm = 0x7FFF000000000000
orq %rax, %r11
xorl %eax, %eax
jmp 0x126ee
xorl %r11d, %r11d
testq %rbx, %rbx
setne %r11b
cmpl $0x80, %r10d
cmoveq %rbx, %r11
xorl %ecx, %ecx
xorl %ebx, %ebx
jmp 0x1259d
cmpl $0x40, %r11d
jne 0x12704
xorl %ecx, %ecx
movq %rdi, %rsi
xorl %edi, %edi
xorl %r10d, %r10d
testq %rdi, %rdi
setne %r10b
orq %rsi, %r10
movq %rdx, %rdi
movq %rcx, %rdx
movl %r15d, %esi
movq %rax, %rcx
orq %r14, %rdx
movq %rdi, %rax
addq %rcx, %rax
adcq %rbx, %rdx
movq %rdx, %rcx
shrq $0x31, %rcx
jne 0x126bb
decl %esi
jmp 0x126dc
movq %rdx, %rcx
shldq $0x3f, %rax, %rcx
shlq $0x3f, %rax
shrq %rdx
xorl %edi, %edi
testq %r10, %r10
setne %dil
orq %rax, %rdi
movq %rcx, %rax
movq %rdi, %r10
movzbl %r8b, %edi
movq %rax, %rcx
movq %r10, %r8
callq 0x12ddf
movq %rdx, %r11
movq %r11, %rdx
popq %rbx
popq %r14
popq %r15
retq
movzbl %r8b, %r11d
shlq $0x3f, %r11
orq %rbx, %r11
jmp 0x126ee
cmpl $0x7f, %r11d
ja 0x1271d
movq %rdx, %rsi
shlq %cl, %rsi
movl %r11d, %ecx
shrq %cl, %rdx
xorl %ecx, %ecx
jmp 0x12689
xorl %esi, %esi
testq %rdx, %rdx
setne %sil
cmpl $0x80, %r11d
cmoveq %rdx, %rsi
xorl %ecx, %ecx
xorl %edx, %edx
jmp 0x12689