// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/softfloat.c
// Function: subFloat64Sigs
static float64 subFloat64Sigs(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 <<= 10;
    bSig <<= 10;
    if ( 0 < expDiff ) goto aExpBigger;
    if ( expDiff < 0 ) goto bExpBigger;
    if ( aExp == 0x7FF ) {
        if (aSig | bSig) {
            return propagateFloat64NaN(a, b, status);
        }
        float_raise(float_flag_invalid, status);
        return float64_default_nan;
    }
    if ( aExp == 0 ) {
        aExp = 1;
        bExp = 1;
    }
    if ( bSig < aSig ) goto aBigger;
    if ( aSig < bSig ) goto bBigger;
    return packFloat64(status->float_rounding_mode == float_round_down, 0, 0);
 bExpBigger:
    if ( bExp == 0x7FF ) {
        if (bSig) {
            return propagateFloat64NaN(a, b, status);
        }
        return packFloat64( zSign ^ 1, 0x7FF, 0 );
    }
    if ( aExp == 0 ) {
        ++expDiff;
    }
    else {
        aSig |= LIT64( 0x4000000000000000 );
    }
    shift64RightJamming( aSig, - expDiff, &aSig );
    bSig |= LIT64( 0x4000000000000000 );
 bBigger:
    zSig = bSig - aSig;
    zExp = bExp;
    zSign ^= 1;
    goto normalizeRoundAndPack;
 aExpBigger:
    if ( aExp == 0x7FF ) {
        if (aSig) {
            return propagateFloat64NaN(a, b, status);
        }
        return a;
    }
    if ( bExp == 0 ) {
        --expDiff;
    }
    else {
        bSig |= LIT64( 0x4000000000000000 );
    }
    shift64RightJamming( bSig, expDiff, &bSig );
    aSig |= LIT64( 0x4000000000000000 );
 aBigger:
    zSig = aSig - bSig;
    zExp = aExp;
 normalizeRoundAndPack:
    --zExp;
    return normalizeRoundAndPackFloat64(zSign, zExp, zSig, status);

}

// Assembly:
pushq %rbx
movq %rcx, %rax
movq %rsi, %rcx
movabsq $0x4000000000000000, %r10 # imm = 0x4000000000000000
movq %rdi, %rbx
shrq $0x34, %rbx
movl $0x7ff, %r8d            # imm = 0x7FF
andq %r8, %rbx
shrq $0x34, %rsi
andq %r8, %rsi
movq %rdi, %r11
shlq $0xa, %r11
leaq -0x400(%r10), %r9
andq %r9, %r11
movq %rcx, %r8
shlq $0xa, %r8
andq %r9, %r8
movq %rbx, %r9
subq %rsi, %r9
jle 0xdf02
cmpl $0x7ff, %ebx            # imm = 0x7FF
jne 0xdf31
testq %r11, %r11
je 0xdfc6
movq %rcx, %rsi
movq %rax, %rdx
popq %rbx
jmp 0xdbdb
js 0xdf3b
testq %rbx, %rbx
je 0xdfa7
cmpl $0x7ff, %ebx            # imm = 0x7FF
jne 0xdfb1
orq %r11, %r8
jne 0xdef6
orb $0x1, 0x2(%rax)
movabsq $0x7ff8000000000000, %rdi # imm = 0x7FF8000000000000
jmp 0xdfc6
testq %rsi, %rsi
je 0xdf64
orq %r10, %r8
jmp 0xdf69
cmpl $0x7ff, %esi            # imm = 0x7FF
jne 0xdfcb
testq %r8, %r8
jne 0xdef6
notb %dl
movzbl %dl, %eax
shlq $0x3f, %rax
movabsq $0x7ff0000000000000, %rdi # imm = 0x7FF0000000000000
orq %rax, %rdi
jmp 0xdfc6
decq %r9
je 0xdf99
cmpq $0x3f, %r9
ja 0xdf8e
movq %r8, %rsi
movl %r9d, %ecx
shrq %cl, %rsi
negb %r9b
movl %r9d, %ecx
shlq %cl, %r8
xorl %ecx, %ecx
testq %r8, %r8
setne %cl
orq %rsi, %rcx
jmp 0xdf96
xorl %ecx, %ecx
testq %r8, %r8
setne %cl
movq %rcx, %r8
orq %r10, %r11
subq %r8, %r11
movq %rbx, %rsi
movq %r11, %r8
jmp 0xe01e
movl $0x1, %ebx
movl $0x1, %esi
cmpq %r11, %r8
jb 0xdf9c
ja 0xe018
xorl %edi, %edi
cmpb $0x1, 0x1(%rax)
sete %dil
shlq $0x3f, %rdi
movq %rdi, %rax
popq %rbx
retq
movq %r11, %rdi
orq %r10, %rdi
xorl %ecx, %ecx
testq %rbx, %rbx
sete %cl
cmoveq %r11, %rdi
addq %rcx, %r9
je 0xe012
movq %r9, %rcx
negq %rcx
cmpq $0x3f, %rcx
ja 0xe007
movq %rdi, %r11
shrq %cl, %r11
movl %r9d, %ecx
shlq %cl, %rdi
xorl %ecx, %ecx
testq %rdi, %rdi
setne %cl
orq %r11, %rcx
jmp 0xe00f
xorl %ecx, %ecx
testq %rdi, %rdi
setne %cl
movq %rcx, %rdi
orq %r10, %r8
movq %rdi, %r11
subq %r11, %r8
xorb $0x1, %dl
testq %r8, %r8
je 0xe02d
bsrq %r8, %rcx
xorq $0x3f, %rcx
jmp 0xe032
movl $0x40, %ecx
subq %rcx, %rsi
decb %cl
shlq %cl, %r8
movzbl %dl, %edi
movq %r8, %rdx
movq %rax, %rcx
popq %rbx
jmp 0xa25f