// File: /workspace/github_c_makefile_star2_O2/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
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %r14d
movq %rdx, %rsi
callq 0x91e7
movl %eax, %ebp
movl %r14d, %edi
movq %rbx, %rsi
callq 0x91e7
movl $0x7fffff, %r9d         # imm = 0x7FFFFF
movl %ebp, %edi
andl %r9d, %edi
movl %ebp, %edx
shrl $0x17, %edx
movl $0xff, %esi
andl %esi, %edx
andl %eax, %r9d
movl %eax, %r10d
shrl $0x17, %r10d
movl %r10d, %ecx
andl %esi, %ecx
movl %eax, %r8d
xorl %ebp, %r8d
cmpl %esi, %edx
jne 0xaa36
testl %edi, %edi
jne 0xaa54
cmpl $0xff, %ecx
jne 0xab17
testl %r9d, %r9d
jne 0xaa54
orb $0x1, 0x2(%rbx)
jmp 0xab2c
pushq $0x9
popq %rsi
testb %r10b, %r10b
je 0xaa64
movzbl %r10b, %r10d
cmpl $0xff, %r10d
jne 0xaa83
testl %r9d, %r9d
je 0xab02
movl %ebp, %edi
movl %eax, %esi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0xa3b6
testl %r9d, %r9d
je 0xab0b
bsrl %r9d, %eax
xorl $0x1f, %eax
leal -0x8(%rax), %ecx
shll %cl, %r9d
movl %esi, %ecx
subl %eax, %ecx
movslq %ecx, %rax
jmp 0xaa85
movl %ecx, %eax
testq %rdx, %rdx
jne 0xaa9e
testl %edi, %edi
je 0xab02
bsrl %edi, %edx
xorl $0x1f, %edx
leal -0x8(%rdx), %ecx
shll %cl, %edi
subl %edx, %esi
movslq %esi, %rdx
shrl $0x1f, %r8d
subq %rax, %rdx
shll $0x7, %edi
orl $0x40000000, %edi       # imm = 0x40000000
shll $0x8, %r9d
orl $0x80000000, %r9d       # imm = 0x80000000
leal (%rdi,%rdi), %eax
xorl %ecx, %ecx
cmpl %eax, %r9d
setbe %cl
shrl %cl, %edi
leaq (%rcx,%rdx), %rsi
addq $0x7d, %rsi
shlq $0x20, %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r9
testb $0x3f, %al
jne 0xaaf0
movl %eax, %ecx
imulq %r9, %rcx
xorl %edx, %edx
cmpq %rdi, %rcx
setne %dl
orl %eax, %edx
movl %edx, %eax
movzbl %r8b, %edi
movl %eax, %edx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %rbp
jmp 0x9421
andl $0x80000000, %r8d       # imm = 0x80000000
jmp 0xab32
orl %edi, %edx
movb 0x2(%rbx), %al
je 0xab27
orb $0x4, %al
movb %al, 0x2(%rbx)
andl $0x80000000, %r8d       # imm = 0x80000000
orl $0x7f800000, %r8d       # imm = 0x7F800000
jmp 0xab32
orb $0x1, %al
movb %al, 0x2(%rbx)
movl $0x7fc00000, %r8d       # imm = 0x7FC00000
movl %r8d, %eax
popq %rbx
popq %r14
popq %rbp
retq