// File: /workspace/github_c_makefile_star2_O3/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:
movq %rdx, %r8
cmpb $0x0, 0x5(%rdx)
je 0xb5e8
testl $0x7f800000, %edi       # imm = 0x7F800000
setne %al
testl $0x7fffff, %edi         # imm = 0x7FFFFF
sete %cl
orb %al, %cl
jne 0xb5c7
orb $0x40, 0x2(%r8)
andl $0x80000000, %edi       # imm = 0x80000000
testl $0x7f800000, %esi       # imm = 0x7F800000
setne %al
testl $0x7fffff, %esi         # imm = 0x7FFFFF
sete %cl
orb %al, %cl
jne 0xb5e8
orb $0x40, 0x2(%r8)
andl $0x80000000, %esi       # imm = 0x80000000
pushq %rbx
movl $0x7fffff, %r11d        # imm = 0x7FFFFF
movl %edi, %r10d
andl %r11d, %r10d
movl %edi, %eax
shrl $0x17, %eax
movl $0xff, %ebx
andl %ebx, %eax
andl %esi, %r11d
movl %esi, %edx
shrl $0x17, %edx
movl %edx, %ecx
andl %ebx, %ecx
movl %esi, %r9d
xorl %edi, %r9d
cmpl %ebx, %eax
popq %rbx
jne 0xb638
testl %r10d, %r10d
jne 0xb650
cmpl $0xff, %ecx
jne 0xb719
testl %r11d, %r11d
jne 0xb650
orb $0x1, 0x2(%r8)
jmp 0xb72f
testb %dl, %dl
je 0xb658
movzbl %dl, %edx
cmpl $0xff, %edx
jne 0xb67a
testl %r11d, %r11d
je 0xb701
movq %r8, %rdx
jmp 0xaf64
testl %r11d, %r11d
je 0xb70a
bsrl %r11d, %edx
xorl $0x1f, %edx
leal -0x8(%rdx), %ecx
shll %cl, %r11d
movl $0x9, %ecx
subl %edx, %ecx
movslq %ecx, %rdx
jmp 0xb67c
movl %ecx, %edx
testq %rax, %rax
jne 0xb69d
testl %r10d, %r10d
je 0xb701
bsrl %r10d, %eax
xorl $0x1f, %eax
leal -0x8(%rax), %ecx
shll %cl, %r10d
movl $0x9, %ecx
subl %eax, %ecx
movslq %ecx, %rax
shrl $0x1f, %r9d
subq %rdx, %rax
shll $0x7, %r10d
orl $0x40000000, %r10d      # imm = 0x40000000
shll $0x8, %r11d
orl $0x80000000, %r11d      # imm = 0x80000000
leal (%r10,%r10), %edx
xorl %ecx, %ecx
cmpl %edx, %r11d
setbe %cl
shrl %cl, %r10d
leaq (%rcx,%rax), %rsi
addq $0x7d, %rsi
shlq $0x20, %r10
movq %r10, %rax
xorl %edx, %edx
divq %r11
testb $0x3f, %al
jne 0xb6f3
movl %eax, %ecx
imulq %r11, %rcx
xorl %edx, %edx
cmpq %r10, %rcx
setne %dl
orl %eax, %edx
movl %edx, %eax
movzbl %r9b, %edi
movl %eax, %edx
movq %r8, %rcx
jmp 0x9f46
andl $0x80000000, %r9d       # imm = 0x80000000
jmp 0xb735
orl %r10d, %eax
movb 0x2(%r8), %al
je 0xb729
orb $0x4, %al
movb %al, 0x2(%r8)
andl $0x80000000, %r9d       # imm = 0x80000000
orl $0x7f800000, %r9d       # imm = 0x7F800000
jmp 0xb735
orb $0x1, %al
movb %al, 0x2(%r8)
movl $0x7fc00000, %r9d       # imm = 0x7FC00000
movl %r9d, %eax
retq