// File: /workspace/github_c_makefile_star2_O0/mbitsnbites[P]SoftFP/softfloat.c
// Function: float32_div
float32 float32_div(float32 a, float32 b, float_status *status)
{
    flag aSign, bSign, zSign;
    int_fast16_t aExp, bExp, zExp;
    uint32_t aSig, bSig, zSig;
    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 );
    bSign = extractFloat32Sign( b );
    zSign = aSign ^ bSign;
    if ( aExp == 0xFF ) {
        if (aSig) {
            return propagateFloat32NaN(a, b, status);
        }
        if ( bExp == 0xFF ) {
            if (bSig) {
                return propagateFloat32NaN(a, b, status);
            }
            float_raise(float_flag_invalid, status);
            return float32_default_nan;
        }
        return packFloat32( zSign, 0xFF, 0 );
    }
    if ( bExp == 0xFF ) {
        if (bSig) {
            return propagateFloat32NaN(a, b, status);
        }
        return packFloat32( zSign, 0, 0 );
    }
    if ( bExp == 0 ) {
        if ( bSig == 0 ) {
            if ( ( aExp | aSig ) == 0 ) {
                float_raise(float_flag_invalid, status);
                return float32_default_nan;
            }
            float_raise(float_flag_divbyzero, status);
            return packFloat32( zSign, 0xFF, 0 );
        }
        normalizeFloat32Subnormal( bSig, &bExp, &bSig );
    }
    if ( aExp == 0 ) {
        if ( aSig == 0 ) return packFloat32( zSign, 0, 0 );
        normalizeFloat32Subnormal( aSig, &aExp, &aSig );
    }
    zExp = aExp - bExp + 0x7D;
    aSig = ( aSig | 0x00800000 )<<7;
    bSig = ( bSig | 0x00800000 )<<8;
    if ( bSig <= ( aSig + aSig ) ) {
        aSig >>= 1;
        ++zExp;
    }
    zSig = ( ( (uint64_t) aSig )<<32 ) / bSig;
    if ( ( zSig & 0x3F ) == 0 ) {
        zSig |= ( (uint64_t) bSig * zSig != ( (uint64_t) aSig )<<32 );
    }
    return roundAndPackFloat32(zSign, zExp, zSig, status);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %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)
movl -0xc(%rbp), %edi
callq 0x12810
movb %al, -0x1a(%rbp)
movzbl -0x19(%rbp), %eax
movzbl -0x1a(%rbp), %ecx
xorl %ecx, %eax
movb %al, -0x1b(%rbp)
cmpq $0xff, -0x28(%rbp)
jne 0x14661
cmpl $0x0, -0x3c(%rbp)
je 0x14608
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x13be0
movl %eax, -0x4(%rbp)
jmp 0x147e5
cmpq $0xff, -0x30(%rbp)
jne 0x14649
cmpl $0x0, -0x40(%rbp)
je 0x1462f
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x13be0
movl %eax, -0x4(%rbp)
jmp 0x147e5
movq -0x18(%rbp), %rsi
movl $0x1, %edi
callq 0x11080
movl $0x7fc00000, -0x4(%rbp) # imm = 0x7FC00000
jmp 0x147e5
movl $0xff, %esi
xorl %edx, %edx
movzbl -0x1b(%rbp), %edi
callq 0x11750
movl %eax, -0x4(%rbp)
jmp 0x147e5
cmpq $0xff, -0x30(%rbp)
jne 0x1469f
cmpl $0x0, -0x40(%rbp)
je 0x14688
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x13be0
movl %eax, -0x4(%rbp)
jmp 0x147e5
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movzbl -0x1b(%rbp), %edi
callq 0x11750
movl %eax, -0x4(%rbp)
jmp 0x147e5
cmpq $0x0, -0x30(%rbp)
jne 0x1470c
cmpl $0x0, -0x40(%rbp)
jne 0x146fc
movq -0x28(%rbp), %rax
movl -0x3c(%rbp), %ecx
orq %rcx, %rax
cmpq $0x0, %rax
jne 0x146d6
movq -0x18(%rbp), %rsi
movl $0x1, %edi
callq 0x11080
movl $0x7fc00000, -0x4(%rbp) # imm = 0x7FC00000
jmp 0x147e5
movq -0x18(%rbp), %rsi
movl $0x4, %edi
callq 0x11080
movl $0xff, %esi
xorl %edx, %edx
movzbl -0x1b(%rbp), %edi
callq 0x11750
movl %eax, -0x4(%rbp)
jmp 0x147e5
movl -0x40(%rbp), %edi
leaq -0x30(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x135b0
cmpq $0x0, -0x28(%rbp)
jne 0x14740
cmpl $0x0, -0x3c(%rbp)
jne 0x14730
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movzbl -0x1b(%rbp), %edi
callq 0x11750
movl %eax, -0x4(%rbp)
jmp 0x147e5
movl -0x3c(%rbp), %edi
leaq -0x28(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
callq 0x135b0
movq -0x28(%rbp), %rax
subq -0x30(%rbp), %rax
addq $0x7d, %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
orl $0x800000, %eax         # imm = 0x800000
shll $0x7, %eax
movl %eax, -0x3c(%rbp)
movl -0x40(%rbp), %eax
orl $0x800000, %eax         # imm = 0x800000
shll $0x8, %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl -0x3c(%rbp), %ecx
addl -0x3c(%rbp), %ecx
cmpl %ecx, %eax
ja 0x1478d
movl -0x3c(%rbp), %eax
shrl %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
shlq $0x20, %rax
movl -0x40(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
andl $0x3f, %eax
cmpl $0x0, %eax
jne 0x147cc
movl -0x40(%rbp), %eax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
movl -0x3c(%rbp), %ecx
shlq $0x20, %rcx
cmpq %rcx, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
orl -0x44(%rbp), %eax
movl %eax, -0x44(%rbp)
movb -0x1b(%rbp), %al
movq -0x38(%rbp), %rsi
movl -0x44(%rbp), %edx
movq -0x18(%rbp), %rcx
movzbl %al, %edi
callq 0x11cb0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop