// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/./softfloat-specialize.h
// Function: propagateFloat128NaN
static float128 propagateFloat128NaN(float128 a, float128 b,
                                     float_status *status)
{
    flag aIsQuietNaN, aIsSignalingNaN, bIsQuietNaN, bIsSignalingNaN;
    flag aIsLargerSignificand;

    aIsQuietNaN = float128_is_quiet_nan( a );
    aIsSignalingNaN = float128_is_signaling_nan( a );
    bIsQuietNaN = float128_is_quiet_nan( b );
    bIsSignalingNaN = float128_is_signaling_nan( b );

    if (aIsSignalingNaN | bIsSignalingNaN) {
        float_raise(float_flag_invalid, status);
    }

    if (status->default_nan_mode) {
        a.low = float128_default_nan_low;
        a.high = float128_default_nan_high;
        return a;
    }

    if (lt128(a.high<<1, a.low, b.high<<1, b.low)) {
        aIsLargerSignificand = 0;
    } else if (lt128(b.high<<1, b.low, a.high<<1, a.low)) {
        aIsLargerSignificand = 1;
    } else {
        aIsLargerSignificand = (a.high < b.high) ? 1 : 0;
    }

    if (pickNaN(aIsQuietNaN, aIsSignalingNaN, bIsQuietNaN, bIsSignalingNaN,
                aIsLargerSignificand)) {
        return float128_maybe_silence_nan(b);
    } else {
        return float128_maybe_silence_nan(a);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rax
movabsq $0x7fff800000000000, %rdx # imm = 0x7FFF800000000000
movabsq $0x7fff000000000000, %r11 # imm = 0x7FFF000000000000
movabsq $0x7fffffffffff, %r9    # imm = 0x7FFFFFFFFFFF
leaq (%rsi,%rsi), %r12
movabsq $-0x1000000000001, %r10 # imm = 0xFFFEFFFFFFFFFFFF
incq %r10
cmpq %r10, %r12
setb -0x16(%rsp)
movabsq $0xffffffffffff, %r14   # imm = 0xFFFFFFFFFFFF
movq %rsi, %r10
andq %r14, %r10
orq %rdi, %r10
sete -0x17(%rsp)
movq %rsi, %r10
andq %rdx, %r10
movq %r10, -0x10(%rsp)
cmpq %r11, %r10
sete %bpl
movq %rsi, %rbx
andq %r9, %rbx
movq %rdi, -0x8(%rsp)
orq %rdi, %rbx
setne %r10b
andb %bpl, %r10b
leaq (%rcx,%rcx), %r13
movq %r13, %r15
shrq $0x30, %r15
cmpl $0xffff, %r15d          # imm = 0xFFFF
setae %dil
andq %rcx, %r14
orq %rax, %r14
setne -0x15(%rsp)
movq %rcx, %r14
andq %rdx, %r14
cmpq %r11, %r14
sete %r11b
movq %rcx, %r15
andq %r9, %r15
orq %rax, %r15
setne %bpl
andb %r11b, %bpl
movl %r10d, %r11d
orb %bpl, %r11b
cmpb $0x1, %r11b
jne 0x12383
orb $0x1, 0x2(%r8)
cmpb $0x0, 0x6(%r8)
je 0x12391
xorl %eax, %eax
jmp 0x12465
cmpq %r13, %r12
sete %r8b
movq -0x8(%rsp), %r11
cmpq %rax, %r11
setb %dl
movl $0x0, -0x14(%rsp)
cmpq %r13, %r12
jb 0x123e0
andb %r8b, %dl
jne 0x123e0
cmpq %r13, %r12
sete -0x18(%rsp)
cmpq %r11, %rax
setb %dl
movb $0x1, %r8b
movl %r8d, -0x14(%rsp)
cmpq %r12, %r13
jb 0x123e0
andb -0x18(%rsp), %dl
jne 0x123e0
cmpq %rcx, %rsi
setb %dl
movl %edx, -0x14(%rsp)
andb -0x15(%rsp), %dil
testb %r10b, %r10b
je 0x12406
xorl %edx, %edx
cmpb $0x0, -0x14(%rsp)
sete %dl
movzbl %dil, %r8d
testb %bpl, %bpl
cmovel %r8d, %edx
cmpb $0x1, %dl
je 0x1241f
jmp 0x1243f
movb -0x17(%rsp), %dl
orb %dl, -0x16(%rsp)
jne 0x1241f
movl -0x14(%rsp), %edx
orb %bpl, %dl
sete %dl
testb %dl, %dil
je 0x1243f
incq %r9
orq %rcx, %r9
testq %r15, %r15
cmoveq %rcx, %r9
movabsq $0x7fff000000000000, %rdx # imm = 0x7FFF000000000000
cmpq %rdx, %r14
cmovneq %rcx, %r9
jmp 0x12462
incq %r9
orq %rsi, %r9
testq %rbx, %rbx
cmoveq %rsi, %r9
movabsq $0x7fff000000000000, %rax # imm = 0x7FFF000000000000
cmpq %rax, -0x10(%rsp)
cmovneq %rsi, %r9
movq %r11, %rax
movq %r9, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq