// File: /workspace/github_c_makefile_star2_O1/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 0x12490
cmpl $0x7fff, %esi           # imm = 0x7FFF
jne 0x124ad
orq %rdi, %rdx
jne 0x12506
jmp 0x124a5
js 0x124f4
cmpl $0x7fff, %esi           # imm = 0x7FFF
jne 0x12519
orq %rdi, %rdx
orq %rax, %rdx
orq %rbx, %rdx
jne 0x12506
movq %rdi, %rax
jmp 0x12699
movq %rbx, %rcx
orq %r14, %rcx
xorl %r11d, %r11d
testl %r15d, %r15d
sete %r11b
cmovneq %rcx, %rbx
subl %r11d, %r10d
je 0x12533
movl %r10d, %ecx
negb %cl
andb $0x3f, %cl
cmpl $0x3f, %r10d
ja 0x1253b
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 0x12546
cmpl $0x7fff, %r15d          # imm = 0x7FFF
jne 0x12560
orq %rax, %rbx
je 0x125e9
movq %r11, %rsi
movq %rax, %rdx
movq %r9, %r8
callq 0x12261
jmp 0x12696
addq %rdi, %rax
adcq %rdx, %rbx
testl %esi, %esi
je 0x1259f
btsq $0x31, %rbx
xorl %r10d, %r10d
movq %rbx, %rdx
jmp 0x12666
xorl %r10d, %r10d
jmp 0x1264a
cmpl $0x40, %r10d
jne 0x12589
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 0x1264a
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 0x125be
xorl %r10d, %r10d
jmp 0x12647
cmpl $0x7f, %r10d
ja 0x12605
movq %rbx, %r11
shlq %cl, %r11
movl %r10d, %ecx
shrq %cl, %rbx
xorl %ecx, %ecx
jmp 0x12548
cmpb $0x0, 0x4(%r9)
je 0x126a2
orq %rax, %rbx
je 0x125b4
orb $-0x80, 0x2(%r9)
movzbl %r8b, %r11d
shlq $0x3f, %r11
jmp 0x125fe
negb %cl
andb $0x3f, %cl
cmpl $0x3f, %r11d
ja 0x12623
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 0x12632
movzbl %r8b, %eax
shlq $0x3f, %rax
movabsq $0x7fff000000000000, %r11 # imm = 0x7FFF000000000000
orq %rax, %r11
xorl %eax, %eax
jmp 0x12699
xorl %r11d, %r11d
testq %rbx, %rbx
setne %r11b
cmpl $0x80, %r10d
cmoveq %rbx, %r11
xorl %ecx, %ecx
xorl %ebx, %ebx
jmp 0x12548
cmpl $0x40, %r11d
jne 0x126af
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 0x12666
decl %esi
jmp 0x12687
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 0x12d7b
movq %rdx, %r11
movq %r11, %rdx
popq %rbx
popq %r14
popq %r15
retq
movzbl %r8b, %r11d
shlq $0x3f, %r11
orq %rbx, %r11
jmp 0x12699
cmpl $0x7f, %r11d
ja 0x126c8
movq %rdx, %rsi
shlq %cl, %rsi
movl %r11d, %ecx
shrq %cl, %rdx
xorl %ecx, %ecx
jmp 0x12634
xorl %esi, %esi
testq %rdx, %rdx
setne %sil
cmpl $0x80, %r11d
cmoveq %rdx, %rsi
xorl %ecx, %ecx
xorl %edx, %edx
jmp 0x12634