// File: /workspace/github_c_makefile_star2_O0/mbitsnbites[P]SoftFP/softfloat.c
// Function: float32_rem
float32 float32_rem(float32 a, float32 b, float_status *status)
{
    flag aSign, zSign;
    int_fast16_t aExp, bExp, expDiff;
    uint32_t aSig, bSig;
    uint32_t q;
    uint64_t aSig64, bSig64, q64;
    uint32_t alternateASig;
    int32_t sigMean;
    a = float32_squash_input_denormal(a, status);
    b = float32_squash_input_denormal(b, status);

    aSig = extractFloat32Frac( a );
    aExp = extractFloat32Exp( a );
    aSign = extractFloat32Sign( a );
    bSig = extractFloat32Frac( b );
    bExp = extractFloat32Exp( b );
    if ( aExp == 0xFF ) {
        if ( aSig || ( ( bExp == 0xFF ) && bSig ) ) {
            return propagateFloat32NaN(a, b, status);
        }
        float_raise(float_flag_invalid, status);
        return float32_default_nan;
    }
    if ( bExp == 0xFF ) {
        if (bSig) {
            return propagateFloat32NaN(a, b, status);
        }
        return a;
    }
    if ( bExp == 0 ) {
        if ( bSig == 0 ) {
            float_raise(float_flag_invalid, status);
            return float32_default_nan;
        }
        normalizeFloat32Subnormal( bSig, &bExp, &bSig );
    }
    if ( aExp == 0 ) {
        if ( aSig == 0 ) return a;
        normalizeFloat32Subnormal( aSig, &aExp, &aSig );
    }
    expDiff = aExp - bExp;
    aSig |= 0x00800000;
    bSig |= 0x00800000;
    if ( expDiff < 32 ) {
        aSig <<= 8;
        bSig <<= 8;
        if ( expDiff < 0 ) {
            if ( expDiff < -1 ) return a;
            aSig >>= 1;
        }
        q = ( bSig <= aSig );
        if ( q ) aSig -= bSig;
        if ( 0 < expDiff ) {
            q = ( ( (uint64_t) aSig )<<32 ) / bSig;
            q >>= 32 - expDiff;
            bSig >>= 2;
            aSig = ( ( aSig>>1 )<<( expDiff - 1 ) ) - bSig * q;
        }
        else {
            aSig >>= 2;
            bSig >>= 2;
        }
    }
    else {
        if ( bSig <= aSig ) aSig -= bSig;
        aSig64 = ( (uint64_t) aSig )<<40;
        bSig64 = ( (uint64_t) bSig )<<40;
        expDiff -= 64;
        while ( 0 < expDiff ) {
            q64 = estimateDiv128To64( aSig64, 0, bSig64 );
            q64 = ( 2 < q64 ) ? q64 - 2 : 0;
            aSig64 = - ( ( bSig * q64 )<<38 );
            expDiff -= 62;
        }
        expDiff += 64;
        q64 = estimateDiv128To64( aSig64, 0, bSig64 );
        q64 = ( 2 < q64 ) ? q64 - 2 : 0;
        q = q64>>( 64 - expDiff );
        bSig <<= 6;
        aSig = ( ( aSig64>>33 )<<( expDiff - 1 ) ) - bSig * q;
    }
    do {
        alternateASig = aSig;
        ++q;
        aSig -= bSig;
    } while ( 0 <= (int32_t) aSig );
    sigMean = aSig + alternateASig;
    if ( ( sigMean < 0 ) || ( ( sigMean == 0 ) && ( q & 1 ) ) ) {
        aSig = alternateASig;
    }
    zSign = ( (int32_t) aSig < 0 );
    if ( zSign ) aSig = - aSig;
    return normalizeRoundAndPackFloat32(aSign ^ zSign, bExp, aSig, status);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl -0x8(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x11570
movl %eax, -0x8(%rbp)
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x11570
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %edi
callq 0x115f0
movl %eax, -0x3c(%rbp)
movl -0x8(%rbp), %edi
callq 0x115d0
movq %rax, -0x28(%rbp)
movl -0x8(%rbp), %edi
callq 0x12810
movb %al, -0x19(%rbp)
movl -0xc(%rbp), %edi
callq 0x115f0
movl %eax, -0x40(%rbp)
movl -0xc(%rbp), %edi
callq 0x115d0
movq %rax, -0x30(%rbp)
cmpq $0xff, -0x28(%rbp)
jne 0x148ad
cmpl $0x0, -0x3c(%rbp)
jne 0x1487c
cmpq $0xff, -0x30(%rbp)
jne 0x14893
cmpl $0x0, -0x40(%rbp)
je 0x14893
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x13be0
movl %eax, -0x4(%rbp)
jmp 0x14bd6
movq -0x18(%rbp), %rsi
movl $0x1, %edi
callq 0x11080
movl $0x7fc00000, -0x4(%rbp) # imm = 0x7FC00000
jmp 0x14bd6
cmpq $0xff, -0x30(%rbp)
jne 0x148df
cmpl $0x0, -0x40(%rbp)
je 0x148d4
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x13be0
movl %eax, -0x4(%rbp)
jmp 0x14bd6
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x14bd6
cmpq $0x0, -0x30(%rbp)
jne 0x14916
cmpl $0x0, -0x40(%rbp)
jne 0x14906
movq -0x18(%rbp), %rsi
movl $0x1, %edi
callq 0x11080
movl $0x7fc00000, -0x4(%rbp) # imm = 0x7FC00000
jmp 0x14bd6
movl -0x40(%rbp), %edi
leaq -0x30(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x135b0
cmpq $0x0, -0x28(%rbp)
jne 0x1493e
cmpl $0x0, -0x3c(%rbp)
jne 0x1492e
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x14bd6
movl -0x3c(%rbp), %edi
leaq -0x28(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
callq 0x135b0
movq -0x28(%rbp), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
orl $0x800000, %eax         # imm = 0x800000
movl %eax, -0x3c(%rbp)
movl -0x40(%rbp), %eax
orl $0x800000, %eax         # imm = 0x800000
movl %eax, -0x40(%rbp)
cmpq $0x20, -0x38(%rbp)
jge 0x14a28
movl -0x3c(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x3c(%rbp)
movl -0x40(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x40(%rbp)
cmpq $0x0, -0x38(%rbp)
jge 0x1499e
cmpq $-0x1, -0x38(%rbp)
jge 0x14996
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x14bd6
movl -0x3c(%rbp), %eax
shrl %eax
movl %eax, -0x3c(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x3c(%rbp), %eax
setbe %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0x149c0
movl -0x40(%rbp), %ecx
movl -0x3c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
xorl %eax, %eax
cmpq -0x38(%rbp), %rax
jge 0x14a11
movl -0x3c(%rbp), %eax
shlq $0x20, %rax
movl -0x40(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movl %eax, -0x44(%rbp)
movl $0x20, %ecx
subq -0x38(%rbp), %rcx
movl -0x44(%rbp), %eax
shrl %cl, %eax
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %eax
shrl $0x2, %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
shrl %eax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
shll %cl, %eax
movl -0x40(%rbp), %ecx
imull -0x44(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
jmp 0x14a23
movl -0x3c(%rbp), %eax
shrl $0x2, %eax
movl %eax, -0x3c(%rbp)
movl -0x40(%rbp), %eax
shrl $0x2, %eax
movl %eax, -0x40(%rbp)
jmp 0x14b50
movl -0x40(%rbp), %eax
cmpl -0x3c(%rbp), %eax
ja 0x14a3b
movl -0x40(%rbp), %ecx
movl -0x3c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
shlq $0x28, %rax
movq %rax, -0x50(%rbp)
movl -0x40(%rbp), %eax
shlq $0x28, %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
subq $0x40, %rax
movq %rax, -0x38(%rbp)
xorl %eax, %eax
cmpq -0x38(%rbp), %rax
jge 0x14ac8
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x14bf0
movq %rax, -0x60(%rbp)
movl $0x2, %eax
cmpq -0x60(%rbp), %rax
jae 0x14a93
movq -0x60(%rbp), %rax
subq $0x2, %rax
movq %rax, -0x70(%rbp)
jmp 0x14a9b
xorl %eax, %eax
movq %rax, -0x70(%rbp)
jmp 0x14a9b
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x40(%rbp), %eax
movl %eax, %ecx
imulq -0x60(%rbp), %rcx
shlq $0x26, %rcx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
subq $0x3e, %rax
movq %rax, -0x38(%rbp)
jmp 0x14a5d
movq -0x38(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x38(%rbp)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x14bf0
movq %rax, -0x60(%rbp)
movl $0x2, %eax
cmpq -0x60(%rbp), %rax
jae 0x14b02
movq -0x60(%rbp), %rax
subq $0x2, %rax
movq %rax, -0x78(%rbp)
jmp 0x14b0a
xorl %eax, %eax
movq %rax, -0x78(%rbp)
jmp 0x14b0a
movq -0x78(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl $0x40, %ecx
subq -0x38(%rbp), %rcx
shrq %cl, %rax
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %eax
shll $0x6, %eax
movl %eax, -0x40(%rbp)
movq -0x50(%rbp), %rax
shrq $0x21, %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
shlq %cl, %rax
movl -0x40(%rbp), %ecx
imull -0x44(%rbp), %ecx
movl %ecx, %ecx
subq %rcx, %rax
movl %eax, -0x3c(%rbp)
jmp 0x14b52
movl -0x3c(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %ecx
movl -0x3c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
xorl %eax, %eax
cmpl -0x3c(%rbp), %eax
jle 0x14b52
movl -0x3c(%rbp), %eax
addl -0x64(%rbp), %eax
movl %eax, -0x68(%rbp)
cmpl $0x0, -0x68(%rbp)
jl 0x14b93
cmpl $0x0, -0x68(%rbp)
jne 0x14b99
movl -0x44(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x14b99
movl -0x64(%rbp), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
setl %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1a(%rbp)
cmpb $0x0, -0x1a(%rbp)
je 0x14bb6
xorl %eax, %eax
subl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movzbl -0x19(%rbp), %eax
movzbl -0x1a(%rbp), %ecx
xorl %ecx, %eax
movq -0x30(%rbp), %rsi
movl -0x3c(%rbp), %edx
movq -0x18(%rbp), %rcx
movzbl %al, %edi
callq 0x11780
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)