// File: FreeSlave[P]vhlt/hlcsg/brushunion.cpp
// Function: isInvalidHull(brushhull_t const*)
static bool     isInvalidHull(const brushhull_t* const hull)
{
    int             x = 0;
    bface_t*        face;

    vec3_t          mins = { 99999.0, 99999.0, 99999.0 };
    vec3_t          maxs = { -99999.0, -99999.0, -99999.0 };

    for (face = hull->faces; face; face = face->next)
    {
        unsigned int    y;
        Winding*        winding = face->w;

        for (y = 0; y < winding->m_NumPoints; y++)
        {
            VectorCompareMinimum(mins, winding->m_Points[y], mins);
            VectorCompareMaximum(maxs, winding->m_Points[y], maxs);
        }
    }

    for (x = 0; x < 3; x++)
    {
        if ((mins[x] < (-BOGUS_RANGE / 2)) || (maxs[x] > (BOGUS_RANGE / 2)))
        {
            return true;
        }
    }
    return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movq 0x14738(%rip), %rax     # 0x2de30
movq %rax, -0x20(%rsp)
movq 0x14734(%rip), %rax     # 0x2de38
movq %rax, -0x18(%rsp)
movq 0x14730(%rip), %rax     # 0x2de40
movq %rax, -0x10(%rsp)
movq 0x14734(%rip), %rax     # 0x2de50
movq %rax, -0x40(%rsp)
movq 0x14730(%rip), %rax     # 0x2de58
movq %rax, -0x38(%rsp)
movq 0x1472c(%rip), %rax     # 0x2de60
movq %rax, -0x30(%rsp)
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x8(%rsp)
cmpq $0x0, -0x8(%rsp)
je 0x199c3
movq -0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rsp)
movl $0x0, -0x44(%rsp)
movl -0x44(%rsp), %eax
movq -0x50(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x199af
movsd -0x20(%rsp), %xmm1
movq -0x50(%rsp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x197ad
movsd -0x20(%rsp), %xmm0
movsd %xmm0, -0x58(%rsp)
jmp 0x197cb
movq -0x50(%rsp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x58(%rsp)
movsd -0x58(%rsp), %xmm0
movsd %xmm0, -0x20(%rsp)
movsd -0x18(%rsp), %xmm1
movq -0x50(%rsp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1980a
movsd -0x18(%rsp), %xmm0
movsd %xmm0, -0x60(%rsp)
jmp 0x19829
movq -0x50(%rsp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x60(%rsp)
movsd -0x60(%rsp), %xmm0
movsd %xmm0, -0x18(%rsp)
movsd -0x10(%rsp), %xmm1
movq -0x50(%rsp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x19868
movsd -0x10(%rsp), %xmm0
movsd %xmm0, -0x68(%rsp)
jmp 0x19887
movq -0x50(%rsp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x68(%rsp)
movsd -0x68(%rsp), %xmm0
movsd %xmm0, -0x10(%rsp)
movsd -0x40(%rsp), %xmm0
movq -0x50(%rsp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
ucomisd (%rax), %xmm0
jbe 0x198c1
movsd -0x40(%rsp), %xmm0
movsd %xmm0, -0x70(%rsp)
jmp 0x198df
movq -0x50(%rsp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x70(%rsp)
movsd -0x70(%rsp), %xmm0
movsd %xmm0, -0x40(%rsp)
movsd -0x38(%rsp), %xmm0
movq -0x50(%rsp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
ucomisd 0x8(%rax), %xmm0
jbe 0x1991a
movsd -0x38(%rsp), %xmm0
movsd %xmm0, -0x78(%rsp)
jmp 0x19939
movq -0x50(%rsp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x78(%rsp)
movsd -0x78(%rsp), %xmm0
movsd %xmm0, -0x38(%rsp)
movsd -0x30(%rsp), %xmm0
movq -0x50(%rsp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
ucomisd 0x10(%rax), %xmm0
jbe 0x19974
movsd -0x30(%rsp), %xmm0
movsd %xmm0, -0x80(%rsp)
jmp 0x19993
movq -0x50(%rsp), %rax
movq 0x10(%rax), %rax
movl -0x44(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x80(%rsp)
movsd -0x80(%rsp), %xmm0
movsd %xmm0, -0x30(%rsp)
movl -0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rsp)
jmp 0x19769
jmp 0x199b1
movq -0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x19747
movl $0x0, 0x4(%rsp)
cmpl $0x3, 0x4(%rsp)
jge 0x19a16
movslq 0x4(%rsp), %rax
movsd 0x13cb9(%rip), %xmm0    # 0x2d698
ucomisd -0x20(%rsp,%rax,8), %xmm0
ja 0x19a00
movslq 0x4(%rsp), %rax
movsd -0x40(%rsp,%rax,8), %xmm0
movsd 0x13ca6(%rip), %xmm1    # 0x2d6a0
ucomisd %xmm1, %xmm0
jbe 0x19a07
movb $0x1, 0x17(%rsp)
jmp 0x19a1b
jmp 0x19a09
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x199cb
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)