// File: /workspace/github_c_makefile_star2_O0/mbitsnbites[P]SoftFP/softfloat.c
// Function: addFloat64Sigs
static float64 addFloat64Sigs(float64 a, float64 b, flag zSign,
                              float_status *status)
{
    int_fast16_t aExp, bExp, zExp;
    uint64_t aSig, bSig, zSig;
    int_fast16_t expDiff;

    aSig = extractFloat64Frac( a );
    aExp = extractFloat64Exp( a );
    bSig = extractFloat64Frac( b );
    bExp = extractFloat64Exp( b );
    expDiff = aExp - bExp;
    aSig <<= 9;
    bSig <<= 9;
    if ( 0 < expDiff ) {
        if ( aExp == 0x7FF ) {
            if (aSig) {
                return propagateFloat64NaN(a, b, status);
            }
            return a;
        }
        if ( bExp == 0 ) {
            --expDiff;
        }
        else {
            bSig |= LIT64( 0x2000000000000000 );
        }
        shift64RightJamming( bSig, expDiff, &bSig );
        zExp = aExp;
    }
    else if ( expDiff < 0 ) {
        if ( bExp == 0x7FF ) {
            if (bSig) {
                return propagateFloat64NaN(a, b, status);
            }
            return packFloat64( zSign, 0x7FF, 0 );
        }
        if ( aExp == 0 ) {
            ++expDiff;
        }
        else {
            aSig |= LIT64( 0x2000000000000000 );
        }
        shift64RightJamming( aSig, - expDiff, &aSig );
        zExp = bExp;
    }
    else {
        if ( aExp == 0x7FF ) {
            if (aSig | bSig) {
                return propagateFloat64NaN(a, b, status);
            }
            return a;
        }
        if ( aExp == 0 ) {
            if (status->flush_to_zero) {
                if (aSig | bSig) {
                    float_raise(float_flag_output_denormal, status);
                }
                return packFloat64(zSign, 0, 0);
            }
            return packFloat64( zSign, 0, ( aSig + bSig )>>9 );
        }
        zSig = LIT64( 0x4000000000000000 ) + aSig + bSig;
        zExp = aExp;
        goto roundAndPack;
    }
    aSig |= LIT64( 0x2000000000000000 );
    zSig = ( aSig + bSig )<<1;
    --zExp;
    if ( (int64_t) zSig < 0 ) {
        zSig = aSig + bSig;
        ++zExp;
    }
 roundAndPack:
    return roundAndPackFloat64(zSign, zExp, zSig, status);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x116a0
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x11680
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x116a0
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x11680
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
shlq $0x9, %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
shlq $0x9, %rax
movq %rax, -0x50(%rbp)
xorl %eax, %eax
cmpq -0x60(%rbp), %rax
jge 0x181e6
cmpq $0x7ff, -0x30(%rbp)     # imm = 0x7FF
jne 0x181a1
cmpq $0x0, -0x48(%rbp)
je 0x18194
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x17f70
movq %rax, -0x8(%rbp)
jmp 0x183b4
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x183b4
cmpq $0x0, -0x38(%rbp)
jne 0x181b6
movq -0x60(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x181c8
movabsq $0x2000000000000000, %rax # imm = 0x2000000000000000
orq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x11c20
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x1834b
cmpq $0x0, -0x60(%rbp)
jge 0x18280
cmpq $0x7ff, -0x38(%rbp)     # imm = 0x7FF
jne 0x18237
cmpq $0x0, -0x50(%rbp)
je 0x1821c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x17f70
movq %rax, -0x8(%rbp)
jmp 0x183b4
movl $0x7ff, %esi            # imm = 0x7FF
xorl %eax, %eax
movl %eax, %edx
movzbl -0x19(%rbp), %edi
callq 0x118b0
movq %rax, -0x8(%rbp)
jmp 0x183b4
cmpq $0x0, -0x30(%rbp)
jne 0x1824c
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x1825e
movabsq $0x2000000000000000, %rax # imm = 0x2000000000000000
orq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
subq -0x60(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x11c20
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x18349
cmpq $0x7ff, -0x30(%rbp)     # imm = 0x7FF
jne 0x182bf
movq -0x48(%rbp), %rax
orq -0x50(%rbp), %rax
cmpq $0x0, %rax
je 0x182b2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x17f70
movq %rax, -0x8(%rbp)
jmp 0x183b4
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x183b4
cmpq $0x0, -0x30(%rbp)
jne 0x18329
movq -0x28(%rbp), %rax
cmpb $0x0, 0x4(%rax)
je 0x18305
movq -0x48(%rbp), %rax
orq -0x50(%rbp), %rax
cmpq $0x0, %rax
je 0x182ec
movq -0x28(%rbp), %rsi
movl $0xffffff80, %edi       # imm = 0xFFFFFF80
callq 0x11080
xorl %eax, %eax
movl %eax, %edx
movzbl -0x19(%rbp), %edi
movq %rdx, %rsi
callq 0x118b0
movq %rax, -0x8(%rbp)
jmp 0x183b4
movb -0x19(%rbp), %al
movq -0x48(%rbp), %rdx
addq -0x50(%rbp), %rdx
shrq $0x9, %rdx
xorl %ecx, %ecx
movl %ecx, %esi
movzbl %al, %edi
callq 0x118b0
movq %rax, -0x8(%rbp)
jmp 0x183b4
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
addq -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x18399
jmp 0x1834b
movabsq $0x2000000000000000, %rax # imm = 0x2000000000000000
orq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
shlq %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x58(%rbp)
jge 0x18397
movq -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x18399
movb -0x19(%rbp), %al
movq -0x40(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x28(%rbp), %rcx
movzbl %al, %edi
callq 0x12390
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nop