LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/scriplib.cpp
// Function: AddScriptToStack(char const*)
static void     AddScriptToStack(const char* const filename)
{
    int             size;

    s_script++;

    if (s_script == &s_scriptstack[MAX_INCLUDES])
        Error("s_script file exceeded MAX_INCLUDES");

	strcpy_s(s_script->filename, filename);

    size = LoadFile(s_script->filename, (char**)&s_script->buffer);

    Log("Entering %s\n", s_script->filename);

    s_script->line = 1;
    s_script->script_p = s_script->buffer;
    s_script->end_p = s_script->buffer + size;
}

// Assembly:
pushq %rbx
movl $0x1020, %eax           # imm = 0x1020
addq 0x20b9593(%rip), %rax   # 0x20c44b8
movq %rdi, %rbx
movq %rax, 0x20b9589(%rip)   # 0x20c44b8
leaq 0x20c169a(%rip), %rcx   # 0x20cc5d0
cmpq %rcx, %rax
jne 0xaf49
leaq 0x140f6(%rip), %rdi     # 0x1f038
xorl %eax, %eax
callq 0xa2a0
movq 0x20b9568(%rip), %rdi   # 0x20c44b8
movq %rbx, %rsi
callq 0x42d0
movq 0x20b9559(%rip), %rdi   # 0x20c44b8
leaq 0x1000(%rdi), %rsi
callq 0x9beb
movl %eax, %ebx
movq 0x20b9544(%rip), %rsi   # 0x20c44b8
leaq 0x1416a(%rip), %rdi     # 0x1f0e5
xorl %eax, %eax
callq 0x9fb2
movq 0x20b952f(%rip), %rax   # 0x20c44b8
movl $0x1, 0x1018(%rax)
movq 0x1000(%rax), %rcx
movq %rcx, 0x1008(%rax)
movslq %ebx, %rdx
addq %rcx, %rdx
movq %rdx, 0x1010(%rax)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/scriplib.cpp
// Function: EndOfScript(bool)
bool            EndOfScript(const bool crossline)
{
    if (!crossline)
        Error("Line %i is incomplete (did you place a \" inside an entity string?) \n", s_scriptline);

    if (!strcmp(s_script->filename, "memory buffer"))
    {
        s_endofscript = true;
        return false;
    }

    free(s_script->buffer);

    if (s_script == s_scriptstack + 1)
    {
        s_endofscript = true;
        return false;
    }

    s_script--;
    s_scriptline = s_script->line;

    Log("returning to %s\n", s_script->filename);

    return GetToken(crossline);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
testl %edi, %edi
jne 0xb03a
movl 0x20b9494(%rip), %esi   # 0x20c44c0
leaq 0x14037(%rip), %rdi     # 0x1f06a
xorl %eax, %eax
callq 0xa2a0
movq 0x20b9477(%rip), %r14   # 0x20c44b8
leaq 0x14014(%rip), %rsi     # 0x1f05c
movq %r14, %rdi
callq 0x4450
testl %eax, %eax
je 0xb0a7
movq 0x1000(%r14), %rdi
callq 0x43a0
movq 0x20b9451(%rip), %rax   # 0x20c44b8
leaq 0x20ba482(%rip), %rcx   # 0x20c54f0
cmpq %rcx, %rax
je 0xb0a7
leaq -0x1020(%rax), %rsi
movq %rsi, 0x20b9437(%rip)   # 0x20c44b8
movl -0x8(%rax), %eax
movl %eax, 0x20b9436(%rip)   # 0x20c44c0
leaq 0x1401e(%rip), %rdi     # 0x1f0af
xorl %eax, %eax
callq 0x9fb2
movzbl %bl, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb0b8
movb $0x1, 0x20b9416(%rip)   # 0x20c44c4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/threads.cpp
// Function: ThreadSetDefault()
void            ThreadSetDefault()
{
    if (g_numthreads == -1)
    {
        g_numthreads = PlatformThreadDefault();
        if (g_numthreads == -1) {
            g_numthreads = 1;
        }
    }
}

// Assembly:
cmpl $-0x1, 0x1da93(%rip)    # 0x29364
je 0xb8d4
retq
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, 0x70(%rdx)
movaps %xmm0, 0x60(%rdx)
movaps %xmm0, 0x50(%rdx)
movaps %xmm0, 0x40(%rdx)
movaps %xmm0, 0x30(%rdx)
movaps %xmm0, 0x20(%rdx)
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
xorl %ebp, %ebp
movl $0x80, %esi
xorl %edi, %edi
callq 0x44e0
testl %eax, %eax
je 0xb92a
movl $0x54, %edi
callq 0x41f0
cmpq $0x1, %rax
sbbl %ebp, %ebp
orl %eax, %ebp
jmp 0xb97e
movq %rsp, %rsi
movl $0x80, %edi
callq 0x40a0
testl %eax, %eax
jle 0xb97e
xorl %r14d, %r14d
movq %rsp, %rbx
xorl %ebp, %ebp
movl $0x0, %eax
cmpq $0x3ff, %r14            # imm = 0x3FF
ja 0xb965
movq %r14, %rax
shrq $0x6, %rax
movq (%rsp,%rax,8), %rcx
xorl %eax, %eax
btq %r14, %rcx
setb %al
addl %eax, %ebp
incq %r14
movl $0x80, %edi
movq %rbx, %rsi
callq 0x40a0
cltq
cmpq %rax, %r14
jl 0xb943
cmpl $-0x1, %ebp
movl $0x1, %eax
cmovnel %ebp, %eax
movl %eax, 0x1d9d5(%rip)     # 0x29364
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/threads.cpp
// Function: threads_InitCrit()
void            threads_InitCrit()
{
    pthread_mutexattr_t mattrib;

    if (!my_mutex)
    {
        my_mutex = (pthread_mutex_t*)Alloc(sizeof(*my_mutex));
        if (pthread_mutexattr_init(&mattrib) == -1)
        {
            Error("pthread_mutex_attr_init failed");
        }
        if (pthread_mutex_init(my_mutex, &mattrib) == -1)
        {
            Error("pthread_mutex_init failed");
        }
    }
}

// Assembly:
cmpq $0x0, 0x20c0f85(%rip)   # 0x20cc928
je 0xb9a6
retq
pushq %rax
movl $0x28, %edi
callq 0x4994
movq %rax, 0x20c0f70(%rip)   # 0x20cc928
leaq 0x4(%rsp), %rdi
callq 0x4070
cmpl $-0x1, %eax
jne 0xb9d5
leaq 0x1380a(%rip), %rdi     # 0x1f1d8
xorl %eax, %eax
callq 0xa2a0
movq 0x20c0f4c(%rip), %rdi   # 0x20cc928
leaq 0x4(%rsp), %rsi
callq 0x44c0
cmpl $-0x1, %eax
jne 0xb9f9
leaq 0x13805(%rip), %rdi     # 0x1f1f7
xorl %eax, %eax
callq 0xa2a0
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::getPlane(dplane_t&) const
void     Winding::getPlane(dplane_t& plane) const
{
    vec3_t          v1, v2;
    vec3_t          plane_normal;

    //hlassert(m_NumPoints >= 3);

    if (m_NumPoints >= 3)
    {
        VectorSubtract(m_Points[2], m_Points[1], v1);
        VectorSubtract(m_Points[0], m_Points[1], v2);

        CrossProduct(v2, v1, plane_normal);
        VectorNormalize(plane_normal);
        VectorCopy(plane_normal, plane.normal);               // change from vec_t
        plane.dist = DotProduct(m_Points[0], plane.normal);
    }
    else
    {
        VectorClear(plane.normal);
        plane.dist = 0.0;
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
cmpl $0x3, 0x8(%rdi)
jb 0xbb35
movq %rdi, %r14
movq 0x10(%rdi), %rax
movsd 0x18(%rax), %xmm0
movsd 0x38(%rax), %xmm1
movsd (%rax), %xmm5
subsd %xmm0, %xmm5
movupd 0x20(%rax), %xmm2
subsd %xmm2, %xmm1
movsd 0x40(%rax), %xmm3
movhpd 0x30(%rax), %xmm3       # xmm3 = xmm3[0],mem[0]
movupd 0x8(%rax), %xmm4
subpd %xmm2, %xmm4
shufpd $0x1, %xmm0, %xmm2      # xmm2 = xmm2[1],xmm0[0]
subpd %xmm2, %xmm3
movapd %xmm4, %xmm0
shufpd $0x1, %xmm5, %xmm0      # xmm0 = xmm0[1],xmm5[0]
mulsd %xmm1, %xmm5
unpcklpd %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
mulpd %xmm0, %xmm1
movapd %xmm4, %xmm2
mulpd %xmm3, %xmm2
subpd %xmm1, %xmm2
unpckhpd %xmm3, %xmm3            # xmm3 = xmm3[1,1]
mulsd %xmm4, %xmm3
subsd %xmm3, %xmm5
movapd %xmm2, %xmm0
mulpd %xmm2, %xmm0
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
movapd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movapd %xmm5, %xmm0
mulsd %xmm5, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm0
jb 0xbb40
sqrtsd %xmm0, %xmm0
jmp 0xbb5f
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0xbbe8
movapd %xmm5, 0x10(%rsp)
movapd %xmm2, (%rsp)
callq 0x4260
xorpd %xmm3, %xmm3
movapd (%rsp), %xmm2
movapd 0x10(%rsp), %xmm5
movsd 0x105a9(%rip), %xmm1    # 0x1c110
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
movapd %xmm0, %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
divpd %xmm1, %xmm2
movd %eax, %xmm1
pshufd $0x50, %xmm1, %xmm1     # xmm1 = xmm1[0,0,1,1]
pslld $0x1f, %xmm1
psrad $0x1f, %xmm1
cvtpd2ps %xmm2, %xmm2
ja 0xbb9d
divsd %xmm0, %xmm5
movapd %xmm5, %xmm3
pandn %xmm2, %xmm1
movq %xmm1, (%rbx)
xorps %xmm0, %xmm0
cvtsd2ss %xmm3, %xmm0
movss %xmm0, 0x8(%rbx)
movq 0x10(%r14), %rax
xorps %xmm2, %xmm2
cvtss2sd %xmm1, %xmm2
pshufd $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
cvtss2sd %xmm1, %xmm1
mulsd 0x8(%rax), %xmm1
mulsd (%rax), %xmm2
addsd %xmm1, %xmm2
cvtss2sd %xmm0, %xmm0
mulsd 0x10(%rax), %xmm0
addsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::getPlane(double (&) [3], double&) const
void            Winding::getPlane(vec3_t& normal, vec_t& dist) const
{
    vec3_t          v1, v2;

    //hlassert(m_NumPoints >= 3);

    if (m_NumPoints >= 3)
    {
        VectorSubtract(m_Points[1], m_Points[0], v1);
        VectorSubtract(m_Points[2], m_Points[0], v2);
        CrossProduct(v2, v1, normal);
        VectorNormalize(normal);
        dist = DotProduct(m_Points[0], normal);
    }
    else
    {
        VectorClear(normal);
        dist = 0.0;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
cmpl $0x3, 0x8(%rdi)
jb 0xbca7
movq %rdi, %r15
movq 0x10(%rdi), %rax
movsd (%rax), %xmm1
movsd 0x20(%rax), %xmm2
movsd 0x30(%rax), %xmm0
subsd %xmm1, %xmm0
movupd 0x8(%rax), %xmm3
subsd %xmm3, %xmm2
movsd 0x28(%rax), %xmm4
movhpd 0x18(%rax), %xmm4       # xmm4 = xmm4[0],mem[0]
movupd 0x38(%rax), %xmm5
subpd %xmm3, %xmm5
shufpd $0x1, %xmm1, %xmm3      # xmm3 = xmm3[1],xmm1[0]
subpd %xmm3, %xmm4
movapd %xmm5, %xmm1
shufpd $0x1, %xmm0, %xmm1      # xmm1 = xmm1[1],xmm0[0]
mulsd %xmm2, %xmm0
unpcklpd %xmm4, %xmm2            # xmm2 = xmm2[0],xmm4[0]
mulpd %xmm1, %xmm2
movapd %xmm5, %xmm1
mulpd %xmm4, %xmm1
subpd %xmm2, %xmm1
movupd %xmm1, (%r14)
unpckhpd %xmm4, %xmm4            # xmm4 = xmm4[1,1]
mulsd %xmm5, %xmm4
subsd %xmm4, %xmm0
movsd %xmm0, 0x10(%r14)
movapd %xmm1, %xmm2
mulpd %xmm1, %xmm2
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xbcbe
sqrtsd %xmm0, %xmm0
jmp 0xbcc3
xorpd %xmm0, %xmm0
movupd %xmm0, (%r14)
movq $0x0, 0x10(%r14)
xorpd %xmm0, %xmm0
jmp 0xbd35
callq 0x4260
movsd 0x10445(%rip), %xmm1    # 0x1c110
ucomisd %xmm0, %xmm1
jbe 0xbce4
xorpd %xmm0, %xmm0
movupd %xmm0, (%r14)
movq $0x0, 0x10(%r14)
jmp 0xbd0a
movupd (%r14), %xmm1
movapd %xmm0, %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
divpd %xmm2, %xmm1
movupd %xmm1, (%r14)
movsd 0x10(%r14), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%r14)
movq 0x10(%r15), %rax
movsd 0x8(%rax), %xmm0
mulsd 0x8(%r14), %xmm0
movsd (%rax), %xmm1
mulsd (%r14), %xmm1
addsd %xmm0, %xmm1
movsd 0x10(%rax), %xmm0
mulsd 0x10(%r14), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::getArea() const
vec_t           Winding::getArea() const
{
    unsigned int    i;
    vec3_t          d1, d2, cross;
    vec_t           total;

    //hlassert(m_NumPoints >= 3);

    total = 0.0;
    if (m_NumPoints >= 3)
    {
        for (i = 2; i < m_NumPoints; i++)
        {
            VectorSubtract(m_Points[i - 1], m_Points[0], d1);
            VectorSubtract(m_Points[i], m_Points[0], d2);
            CrossProduct(d1, d2, cross);
            total += 0.5 * VectorLength(cross);
        }
    }
    return total;
}

// Assembly:
xorpd %xmm7, %xmm7
cmpl $0x3, 0x8(%rdi)
jb 0xbe58
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorpd %xmm8, %xmm8
movl $0x2, %r14d
movl $0x40, %r15d
movsd 0x1351c(%rip), %xmm9    # 0x1f290
xorpd %xmm7, %xmm7
movq 0x10(%rbx), %rax
movsd -0x28(%rax,%r15), %xmm1
movsd -0x20(%rax,%r15), %xmm3
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm4
subsd %xmm0, %xmm1
subsd %xmm4, %xmm3
movsd -0x18(%rax,%r15), %xmm2
movsd 0x10(%rax), %xmm5
subsd %xmm5, %xmm2
movsd -0x10(%rax,%r15), %xmm6
subsd %xmm0, %xmm6
movsd -0x8(%rax,%r15), %xmm0
subsd %xmm4, %xmm0
movsd (%rax,%r15), %xmm4
subsd %xmm5, %xmm4
movapd %xmm0, %xmm5
mulsd %xmm2, %xmm5
mulsd %xmm6, %xmm2
mulsd %xmm3, %xmm6
mulsd %xmm4, %xmm3
subsd %xmm5, %xmm3
mulsd %xmm1, %xmm4
subsd %xmm4, %xmm2
mulsd %xmm1, %xmm0
subsd %xmm6, %xmm0
mulsd %xmm2, %xmm2
mulsd %xmm3, %xmm3
addsd %xmm2, %xmm3
mulsd %xmm0, %xmm0
addsd %xmm3, %xmm0
ucomisd %xmm8, %xmm0
jb 0xbe14
sqrtsd %xmm0, %xmm0
jmp 0xbe33
movsd %xmm7, 0x8(%rsp)
callq 0x4260
movsd 0x13468(%rip), %xmm9    # 0x1f290
xorpd %xmm8, %xmm8
movsd 0x8(%rsp), %xmm7
mulsd %xmm9, %xmm0
addsd %xmm0, %xmm7
incq %r14
movl 0x8(%rbx), %eax
addq $0x18, %r15
cmpq %rax, %r14
jb 0xbd78
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
movapd %xmm7, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::getBounds(double (&) [3], double (&) [3]) const
void            Winding::getBounds(vec3_t& mins, vec3_t& maxs) const
{
    BoundingBox     bounds;
    unsigned    x;

    for (x=0; x<m_NumPoints; x++)
    {
        bounds.add(m_Points[x]);
    }
    VectorCopy(bounds.m_Mins, mins);
    VectorCopy(bounds.m_Maxs, maxs);
}

// Assembly:
movl 0x8(%rdi), %ecx
testq %rcx, %rcx
je 0xbeba
movq 0x10(%rdi), %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
movapd 0x13456(%rip), %xmm0    # 0x1f2d0
movapd 0x1345e(%rip), %xmm2    # 0x1f2e0
movsd 0x13416(%rip), %xmm1    # 0x1f2a0
movsd 0x13406(%rip), %xmm3    # 0x1f298
xorl %edi, %edi
movupd (%rax,%rdi), %xmm4
minpd %xmm4, %xmm2
maxpd %xmm4, %xmm0
movsd 0x10(%rax,%rdi), %xmm4
minsd %xmm4, %xmm3
maxsd %xmm4, %xmm1
addq $0x18, %rdi
cmpq %rdi, %rcx
jne 0xbe94
jmp 0xbeda
movapd 0x1340e(%rip), %xmm0    # 0x1f2d0
movapd 0x13416(%rip), %xmm2    # 0x1f2e0
movsd 0x133c6(%rip), %xmm3    # 0x1f298
movsd 0x133c6(%rip), %xmm1    # 0x1f2a0
movupd %xmm2, (%rsi)
movsd %xmm3, 0x10(%rsi)
movupd %xmm0, (%rdx)
movsd %xmm1, 0x10(%rdx)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::getCenter(double (&) [3]) const
void            Winding::getCenter(vec3_t& center) const
{
    unsigned int    i;
    vec_t           scale;

    if (m_NumPoints > 0)
    {
        VectorCopy(vec3_origin, center);
        for (i = 0; i < m_NumPoints; i++)
        {
            VectorAdd(m_Points[i], center, center);
        }

        scale = 1.0 / m_NumPoints;
        VectorScale(center, scale, center);
    }
    else
    {
        VectorClear(center);
    }
}

// Assembly:
cmpl $0x0, 0x8(%rdi)
je 0xbffd
leaq 0x11eab(%rip), %rax     # 0x1de10
movaps (%rax), %xmm0
movups %xmm0, (%rsi)
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rsi)
movl 0x8(%rdi), %edx
testl %edx, %edx
je 0xbfc8
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x10(%rdi), %rdx
movsd (%rdx,%rax), %xmm0
addsd (%rsi), %xmm0
movsd %xmm0, (%rsi)
movq 0x10(%rdi), %rdx
movsd 0x8(%rdx,%rax), %xmm0
addsd 0x8(%rsi), %xmm0
movsd %xmm0, 0x8(%rsi)
movq 0x10(%rdi), %rdx
movsd 0x10(%rdx,%rax), %xmm0
addsd 0x10(%rsi), %xmm0
movsd %xmm0, 0x10(%rsi)
incq %rcx
movl 0x8(%rdi), %edx
addq $0x18, %rax
cmpq %rdx, %rcx
jb 0xbf80
movl %edx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd 0x1311e(%rip), %xmm1    # 0x1f0f8
divsd %xmm0, %xmm1
movupd (%rsi), %xmm0
movapd %xmm1, %xmm2
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
mulpd %xmm0, %xmm2
movupd %xmm2, (%rsi)
mulsd 0x10(%rsi), %xmm1
movsd %xmm1, 0x10(%rsi)
retq
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::Winding(double (*) [3], unsigned int)
Winding::Winding(vec3_t *points, UINT32 numpoints)
{
	hlassert(numpoints >= 3);
	m_NumPoints = numpoints;
	m_MaxPoints = (m_NumPoints + 3) & ~3;	// groups of 4

	m_Points = new vec3_t[m_MaxPoints];
	memcpy(m_Points, points, sizeof(vec3_t) * m_NumPoints);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x1b870(%rip), %rax     # 0x27d60
movq %rax, (%rdi)
movl %edx, 0x8(%rdi)
leal 0x3(%rbx), %eax
andl $-0x4, %eax
movl %eax, 0x18(%rdi)
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
callq 0x4040
movq %rax, 0x10(%r15)
movl %ebx, %ecx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rdx
movq %rax, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x4270
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::initFromPoints(double (*) [3], unsigned int)
void			Winding::initFromPoints(vec3_t *points, UINT32 numpoints)
{
	hlassert(numpoints >= 3);

	Reset();

	m_NumPoints = numpoints;
	m_MaxPoints = (m_NumPoints + 3) & ~3;	// groups of 4

	m_Points = new vec3_t[m_MaxPoints];
	memcpy(m_Points, points, sizeof(vec3_t) * m_NumPoints);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xc54e
callq 0x4420
movq $0x0, 0x10(%r15)
movl %r14d, 0x8(%r15)
leal 0x3(%r14), %eax
andl $-0x4, %eax
movl %eax, 0x18(%r15)
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
callq 0x4040
movq %rax, 0x10(%r15)
movl %r14d, %ecx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rdx
movq %rax, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x4270
nop
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::Reset()
void			Winding::Reset(void)
{
	if(m_Points)
	{
		delete [] m_Points;
		m_Points = NULL;
	}

	m_NumPoints = m_MaxPoints = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xc5a4
callq 0x4420
movq $0x0, 0x10(%rbx)
xorl %eax, %eax
movl %eax, 0x18(%rbx)
movl %eax, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::operator=(Winding const&)
Winding&      Winding::operator=(const Winding& other)
{
    delete[] m_Points;
    m_NumPoints = other.m_NumPoints;
    m_MaxPoints = (m_NumPoints + 3) & ~3;   // groups of 4

    m_Points = new vec3_t[m_MaxPoints];
    memcpy(m_Points, other.m_Points, sizeof(vec3_t) * m_NumPoints);
    return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xc5c7
callq 0x4420
movl 0x8(%r14), %r15d
movl %r15d, 0x8(%rbx)
leal 0x3(%r15), %eax
andl $-0x4, %eax
movl %eax, 0x18(%rbx)
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
callq 0x4040
movq %rax, 0x10(%rbx)
movq 0x10(%r14), %rsi
shlq $0x3, %r15
leaq (%r15,%r15,2), %rdx
movq %rax, %rdi
callq 0x4270
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::Winding(unsigned int)
Winding::Winding(UINT32 numpoints)
{
    hlassert(numpoints >= 3);
    m_NumPoints = numpoints;
    m_MaxPoints = (m_NumPoints + 3) & ~3;   // groups of 4

    m_Points = new vec3_t[m_MaxPoints];
    memset(m_Points, 0, sizeof(vec3_t) * m_NumPoints);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x1b748(%rip), %rax     # 0x27d60
movq %rax, (%rdi)
movl %esi, 0x8(%rdi)
leal 0x3(%rbx), %eax
andl $-0x4, %eax
movl %eax, 0x18(%rdi)
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
callq 0x4040
movq %rax, 0x10(%r14)
movl %ebx, %ecx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rdx
movq %rax, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x41c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::Winding(Winding const&)
Winding::Winding(const Winding& other)
{
    m_NumPoints = other.m_NumPoints;
    m_MaxPoints = (m_NumPoints + 3) & ~3;   // groups of 4

    m_Points = new vec3_t[m_MaxPoints];
    memcpy(m_Points, other.m_Points, sizeof(vec3_t) * m_NumPoints);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1b6fa(%rip), %rax     # 0x27d60
movq %rax, (%rdi)
movl 0x8(%rsi), %r15d
movl %r15d, 0x8(%rdi)
leal 0x3(%r15), %eax
andl $-0x4, %eax
movl %eax, 0x18(%rdi)
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
callq 0x4040
movq %rax, 0x10(%r14)
movq 0x10(%rbx), %rsi
shlq $0x3, %r15
leaq (%r15,%r15,2), %rdx
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4270
nop
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::RemoveColinearPoints(double)
vec_t epsilon
#endif
											  )
{
	unsigned int	i;
	vec3_t			v1, v2;
	vec_t			*p1, *p2, *p3;
	for (i = 0; i < m_NumPoints; i++)
	{
		p1 = m_Points[(i+m_NumPoints-1)%m_NumPoints];
		p2 = m_Points[i];
		p3 = m_Points[(i+1)%m_NumPoints];
		VectorSubtract (p2, p1, v1);
		VectorSubtract (p3, p2, v2);
		// v1 or v2 might be close to 0
		if (DotProduct (v1, v2) * DotProduct (v1, v2) >= DotProduct (v1, v1) * DotProduct (v2, v2) 
			- ON_EPSILON * ON_EPSILON * (DotProduct (v1, v1) + DotProduct (v2, v2) + ON_EPSILON * ON_EPSILON))
			// v2 == k * v1 + v3 && abs (v3) < ON_EPSILON || v1 == k * v2 + v3 && abs (v3) < ON_EPSILON
		{
			m_NumPoints--;
			for (; i < m_NumPoints; i++)
			{
				VectorCopy (m_Points[i+1], m_Points[i]);
			}
			i = -1;
			continue;
		}
	}
}

// Assembly:
movl 0x8(%rdi), %esi
testl %esi, %esi
je 0xcc0f
movapd 0x12851(%rip), %xmm1    # 0x1f300
xorpd %xmm0, %xmm1
mulsd %xmm0, %xmm1
xorl %ecx, %ecx
mulsd %xmm0, %xmm0
xorl %r8d, %r8d
movq 0x10(%rdi), %r9
leal (%rsi,%r8), %eax
decl %eax
xorl %edx, %edx
divl %esi
leaq (%rdx,%rdx,2), %rdx
movl %r8d, %eax
leal 0x1(%r8), %r10d
cmpl %esi, %r10d
cmovel %ecx, %r10d
leaq (%rax,%rax,2), %r11
leaq (%r10,%r10,2), %r10
movsd (%r9,%r11,8), %xmm4
movsd 0x8(%r9,%r11,8), %xmm3
movsd 0x10(%r9,%r11,8), %xmm2
movsd (%r9,%rdx,8), %xmm5
unpcklpd %xmm4, %xmm5            # xmm5 = xmm5[0],xmm4[0]
movhpd (%r9,%r10,8), %xmm4     # xmm4 = xmm4[0],mem[0]
movsd 0x8(%r9,%rdx,8), %xmm6
movsd 0x10(%r9,%rdx,8), %xmm7
subpd %xmm5, %xmm4
unpcklpd %xmm3, %xmm6            # xmm6 = xmm6[0],xmm3[0]
movhpd 0x8(%r9,%r10,8), %xmm3  # xmm3 = xmm3[0],mem[0]
subpd %xmm6, %xmm3
unpcklpd %xmm2, %xmm7            # xmm7 = xmm7[0],xmm2[0]
movhpd 0x10(%r9,%r10,8), %xmm2 # xmm2 = xmm2[0],mem[0]
subpd %xmm7, %xmm2
movapd %xmm3, %xmm5
unpckhpd %xmm3, %xmm5            # xmm5 = xmm5[1],xmm3[1]
mulsd %xmm3, %xmm5
movapd %xmm4, %xmm6
unpckhpd %xmm4, %xmm6            # xmm6 = xmm6[1],xmm4[1]
mulsd %xmm4, %xmm6
addsd %xmm5, %xmm6
movapd %xmm2, %xmm5
unpckhpd %xmm2, %xmm5            # xmm5 = xmm5[1],xmm2[1]
mulsd %xmm2, %xmm5
addsd %xmm6, %xmm5
mulsd %xmm5, %xmm5
mulpd %xmm3, %xmm3
mulpd %xmm4, %xmm4
addpd %xmm3, %xmm4
mulpd %xmm2, %xmm2
addpd %xmm4, %xmm2
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
movapd %xmm2, %xmm4
addsd %xmm3, %xmm4
addsd %xmm0, %xmm4
mulsd %xmm1, %xmm4
mulsd %xmm2, %xmm3
addsd %xmm4, %xmm3
ucomisd %xmm3, %xmm5
jb 0xcc00
decl %esi
movl %esi, 0x8(%rdi)
cmpl %esi, %r8d
jae 0xcbfa
leaq (,%rax,8), %rdx
leaq (%rdx,%rdx,2), %rdx
movq 0x10(%rdi), %rsi
incq %rax
movsd 0x18(%rsi,%rdx), %xmm2
movsd %xmm2, (%rsi,%rdx)
movq 0x10(%rdi), %rsi
movsd 0x20(%rsi,%rdx), %xmm2
movsd %xmm2, 0x8(%rsi,%rdx)
movq 0x10(%rdi), %rsi
movsd 0x28(%rsi,%rdx), %xmm2
movsd %xmm2, 0x10(%rsi,%rdx)
movl 0x8(%rdi), %esi
addq $0x18, %rdx
cmpq %rsi, %rax
jb 0xcbbc
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
incl %r8d
movl 0x8(%rdi), %esi
cmpl %esi, %r8d
jb 0xcac0
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::Chop(double const*, double, double)
bool          Winding::Chop(const vec3_t normal, const vec_t dist
#ifdef ZHLT_WINDING_EPSILON
							, vec_t epsilon
#endif
							)
{
    Winding*      f;
    Winding*      b;

    Clip(normal, dist, &f, &b
#ifdef ZHLT_WINDING_EPSILON
		, epsilon
#endif
		);
    if (b)
    {
        delete b;
    }

    if (f)
    {
        delete[] m_Points;
        m_NumPoints = f->m_NumPoints;
        m_Points = f->m_Points;
        f->m_Points = NULL;
        delete f;
        return true;
    }
    else
    {
        m_NumPoints = 0;
        delete[] m_Points;
        m_Points = NULL;
        return false;
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %r14
movq %r14, %rcx
callq 0xcc7c
movq (%r14), %rdi
testq %rdi, %rdi
je 0xd298
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %r14
testq %r14, %r14
je 0xd2d2
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xd2b0
callq 0x4420
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq $0x0, 0x10(%r14)
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
jmp 0xd2ef
movl $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xd2e7
callq 0x4420
movq $0x0, 0x10(%rbx)
testq %r14, %r14
setne %al
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::WindingOnPlaneSide(double const*, double, double)
int             Winding::WindingOnPlaneSide(const vec3_t normal, const vec_t dist
#ifdef ZHLT_WINDING_EPSILON
											, vec_t epsilon
#endif
											)
{
    bool            front, back;
    unsigned int    i;
    vec_t           d;

    front = false;
    back = false;
    for (i = 0; i < m_NumPoints; i++)
    {
        d = DotProduct(m_Points[i], normal) - dist;
        if (d < -ON_EPSILON)
        {
            if (front)
            {
                return SIDE_CROSS;
            }
            back = true;
            continue;
        }
        if (d > ON_EPSILON)
        {
            if (back)
            {
                return SIDE_CROSS;
            }
            front = true;
            continue;
        }
    }

    if (back)
    {
        return SIDE_BACK;
    }
    if (front)
    {
        return SIDE_FRONT;
    }
    return SIDE_ON;
}

// Assembly:
movl 0x8(%rdi), %ecx
testq %rcx, %rcx
je 0xd39e
movq 0x10(%rdi), %rax
movsd (%rsi), %xmm2
movsd 0x8(%rsi), %xmm3
movsd 0x10(%rsi), %xmm4
movapd 0x11fdc(%rip), %xmm5    # 0x1f300
xorpd %xmm1, %xmm5
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rdx
xorl %esi, %esi
xorl %ecx, %ecx
xorl %edi, %edi
movsd 0x8(%rax,%rsi), %xmm6
mulsd %xmm3, %xmm6
movsd (%rax,%rsi), %xmm7
mulsd %xmm2, %xmm7
addsd %xmm6, %xmm7
movsd 0x10(%rax,%rsi), %xmm6
mulsd %xmm4, %xmm6
addsd %xmm7, %xmm6
subsd %xmm0, %xmm6
ucomisd %xmm6, %xmm5
jbe 0xd36f
movb $0x1, %cl
testb $0x1, %dil
je 0xd37d
jmp 0xd3a4
ucomisd %xmm1, %xmm6
jbe 0xd37d
movb $0x1, %dil
testb $0x1, %cl
jne 0xd3a4
addq $0x18, %rsi
cmpq %rsi, %rdx
jne 0xd336
notb %dil
movzbl %dil, %edx
andl $0x1, %edx
addl %edx, %edx
testb $0x1, %cl
movl $0x1, %eax
cmovel %edx, %eax
retq
movl $0x2, %eax
retq
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::addPoint(double const*)
void            Winding::addPoint(const vec3_t newpoint)
{
    if (m_NumPoints >= m_MaxPoints)
    {
        resize(m_NumPoints + 1);
    }
    VectorCopy(newpoint, m_Points[m_NumPoints]);
    m_NumPoints++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rdi), %esi
cmpl 0x18(%rdi), %esi
jb 0xdd02
incl %esi
movq %rbx, %rdi
callq 0xdd50
movsd (%r14), %xmm0
movq 0x10(%rbx), %rax
movl 0x8(%rbx), %ecx
leaq (%rcx,%rcx,2), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x8(%r14), %xmm0
movq 0x10(%rbx), %rax
movl 0x8(%rbx), %ecx
leaq (%rcx,%rcx,2), %rcx
movsd %xmm0, 0x8(%rax,%rcx,8)
movsd 0x10(%r14), %xmm0
movq 0x10(%rbx), %rax
movl 0x8(%rbx), %ecx
leaq (%rcx,%rcx,2), %rcx
movsd %xmm0, 0x10(%rax,%rcx,8)
incl 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::resize(unsigned int)
void            Winding::resize(UINT32 newsize)
{
    newsize = (newsize + 3) & ~3;   // groups of 4

    vec3_t* newpoints = new vec3_t[newsize];
    m_NumPoints = qmin(newsize, m_NumPoints);
    memcpy(newpoints, m_Points, m_NumPoints);
    delete[] m_Points;
    m_Points = newpoints;
    m_MaxPoints = newsize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
addl $0x3, %ebx
andl $-0x4, %ebx
leaq (,%rbx,8), %rax
leaq (%rax,%rax,2), %rdi
callq 0x4040
movq %rax, %r15
movl 0x8(%r14), %edx
cmpl %edx, %ebx
cmovbl %ebx, %edx
movl %edx, 0x8(%r14)
movq 0x10(%r14), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x4270
testq %r12, %r12
je 0xdda0
movq %r12, %rdi
callq 0x4420
movq %r15, 0x10(%r14)
movl %ebx, 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::insertPoint(double const*, unsigned int)
void            Winding::insertPoint(const vec3_t newpoint, const unsigned int offset)
{
    if (offset >= m_NumPoints)
    {
        addPoint(newpoint);
    }
    else
    {
        if (m_NumPoints >= m_MaxPoints)
        {
            resize(m_NumPoints + 1);
        }

        unsigned x;
        for (x = m_NumPoints; x>offset; x--)
        {
            VectorCopy(m_Points[x-1], m_Points[x]);
        }
        VectorCopy(newpoint, m_Points[x]);

        m_NumPoints++;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rdi), %esi
cmpl %edx, %esi
jbe 0xde6a
movl %edx, %ebp
cmpl 0x18(%rbx), %esi
jb 0xddda
incl %esi
movq %rbx, %rdi
callq 0xdd50
movl 0x8(%rbx), %eax
cmpl %ebp, %eax
jbe 0xde2a
movl %ebp, %ecx
leaq (,%rax,8), %rdx
leaq (%rdx,%rdx,2), %rdx
movq 0x10(%rbx), %rsi
decq %rax
movsd -0x18(%rsi,%rdx), %xmm0
movsd %xmm0, (%rsi,%rdx)
movq 0x10(%rbx), %rsi
movsd -0x10(%rsi,%rdx), %xmm0
movsd %xmm0, 0x8(%rsi,%rdx)
movq 0x10(%rbx), %rsi
movsd -0x8(%rsi,%rdx), %xmm0
movsd %xmm0, 0x10(%rsi,%rdx)
addq $-0x18, %rdx
cmpq %rcx, %rax
ja 0xddef
movsd (%r14), %xmm0
movq 0x10(%rbx), %rcx
movl %eax, %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
movsd %xmm0, (%rcx,%rax)
movsd 0x8(%r14), %xmm0
movq 0x10(%rbx), %rcx
movsd %xmm0, 0x8(%rcx,%rax)
movsd 0x10(%r14), %xmm0
movq 0x10(%rbx), %rcx
movsd %xmm0, 0x10(%rcx,%rax)
incl 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xdce6
nop
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/boundingbox.h
// Function: BoundingBox::add(double const*)
void add(const vec3_t point)
    {
        m_Mins[0] = qmin(m_Mins[0], point[0]);
        m_Maxs[0] = qmax(m_Maxs[0], point[0]);
        m_Mins[1] = qmin(m_Mins[1], point[1]);
        m_Maxs[1] = qmax(m_Maxs[1], point[1]);
        m_Mins[2] = qmin(m_Mins[2], point[2]);
        m_Maxs[2] = qmax(m_Maxs[2], point[2]);
    }

// Assembly:
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm1
minsd (%rsi), %xmm0
movsd %xmm0, (%rdi)
movsd 0x18(%rdi), %xmm0
maxsd (%rsi), %xmm0
movsd %xmm0, 0x18(%rdi)
minsd 0x8(%rsi), %xmm1
movsd %xmm1, 0x8(%rdi)
movsd 0x20(%rdi), %xmm0
maxsd 0x8(%rsi), %xmm0
movsd %xmm0, 0x20(%rdi)
movsd 0x10(%rdi), %xmm0
minsd 0x10(%rsi), %xmm0
movsd %xmm0, 0x10(%rdi)
movsd 0x28(%rdi), %xmm0
maxsd 0x10(%rsi), %xmm0
movsd %xmm0, 0x28(%rdi)
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlcsg/brush.cpp
// Function: PlaneFromPoints(double const*, double const*, double const*)
int PlaneFromPoints(const vec_t* const p0, const vec_t* const p1, const vec_t* const p2)
{
    vec3_t          v1, v2;
    vec3_t          normal;

    VectorSubtract(p0, p1, v1);
    VectorSubtract(p2, p1, v2);
    CrossProduct(v1, v2, normal);
    if (VectorNormalize(normal))
    {
        return FindIntPlane(normal, p0);
    }
    return -1;
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movsd (%rdi), %xmm5
movsd (%rsi), %xmm0
subsd %xmm0, %xmm5
movsd 0x8(%rdx), %xmm1
movupd 0x8(%rdi), %xmm2
movupd 0x8(%rsi), %xmm3
subpd %xmm3, %xmm2
movsd 0x10(%rdx), %xmm4
movhpd (%rdx), %xmm4           # xmm4 = xmm4[0],mem[0]
subsd %xmm3, %xmm1
shufpd $0x1, %xmm0, %xmm3      # xmm3 = xmm3[1],xmm0[0]
subpd %xmm3, %xmm4
movapd %xmm2, %xmm0
shufpd $0x1, %xmm5, %xmm0      # xmm0 = xmm0[1],xmm5[0]
mulsd %xmm1, %xmm5
unpcklpd %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0]
mulpd %xmm0, %xmm1
movapd %xmm2, %xmm3
mulpd %xmm4, %xmm3
subpd %xmm1, %xmm3
movapd %xmm3, (%rsp)
unpckhpd %xmm4, %xmm4            # xmm4 = xmm4[1,1]
mulsd %xmm2, %xmm4
subsd %xmm4, %xmm5
movsd %xmm5, 0x10(%rsp)
movapd %xmm3, %xmm0
mulpd %xmm3, %xmm0
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
movapd %xmm3, %xmm1
mulsd %xmm3, %xmm1
addsd %xmm0, %xmm1
movapd %xmm5, %xmm0
mulsd %xmm5, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xe3d1
sqrtsd %xmm0, %xmm0
jmp 0xe3ee
movapd %xmm5, 0x30(%rsp)
movapd %xmm3, 0x20(%rsp)
callq 0x4260
movapd 0x20(%rsp), %xmm3
movapd 0x30(%rsp), %xmm5
movsd 0xdd1a(%rip), %xmm1     # 0x1c110
ucomisd %xmm0, %xmm1
ja 0xe419
movapd %xmm0, %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
divpd %xmm2, %xmm3
movapd %xmm3, (%rsp)
divsd %xmm0, %xmm5
movsd %xmm5, 0x10(%rsp)
jmp 0xe42b
xorpd %xmm2, %xmm2
movapd %xmm2, (%rsp)
movq $0x0, 0x10(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
ucomisd %xmm0, %xmm1
ja 0xe441
movq %rsp, %rdi
movq %rbx, %rsi
callq 0xdf10
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlcsg/brush.cpp
// Function: AddHullPlane(brushhull_t*, double const*, double const*, bool)
void AddHullPlane(brushhull_t* hull, const vec_t* const normal, const vec_t* const origin, const bool check_planenum)
{
	int planenum = FindIntPlane(normal,origin);
	//check to see if this plane is already in the brush (optional to speed
	//up cases where we know the plane hasn't been added yet, like axial case)
	if(check_planenum)
	{
#ifndef HLCSG_HULLBRUSH
		if(g_mapplanes[planenum].type <= last_axial) //we know axial planes are added in last step
		{ return; }
#endif

		bface_t* current_face;
		for(current_face = hull->faces; current_face; current_face = current_face->next)
		{
			if(current_face->planenum == planenum)
			{ return; } //don't add a plane twice
		}
	}
	bface_t* new_face = (bface_t*)Alloc(sizeof(bface_t)); // TODO: This leaks
	new_face->planenum = planenum;
	new_face->plane = &g_mapplanes[new_face->planenum];
	new_face->next = hull->faces;
	new_face->contents = CONTENTS_EMPTY;
	hull->faces = new_face;
#ifdef HLCSG_HLBSP_VOIDTEXINFO
	new_face->texinfo = -1;
#else
	new_face->texinfo = 0;
#endif
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %r14d
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0xdf10
movl %eax, %ebp
testl %r14d, %r14d
je 0xe48b
leaq 0x30(%rbx), %rax
movq (%rax), %rax
testq %rax, %rax
je 0xe48b
cmpl %ebp, 0x8(%rax)
jne 0xe47c
jmp 0xe4c3
movl $0x68, %edi
callq 0x4994
movl %ebp, 0x8(%rax)
movslq %ebp, %rcx
shlq $0x6, %rcx
leaq 0x20be49a(%rip), %rdx   # 0x20cc940
addq %rcx, %rdx
movq %rdx, 0x10(%rax)
movq 0x30(%rbx), %rcx
movq %rcx, (%rax)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, 0x28(%rax)
movq %rax, 0x30(%rbx)
movl %ecx, 0x20(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlcsg/brush.cpp
// Function: CreateBrush(int)
void CreateBrush(const int brushnum) //--vluzacn
{
	brush_t*        b;
	int             contents;
	int             h;

	b = &g_mapbrushes[brushnum];

	contents = b->contents;

	if (contents == CONTENTS_ORIGIN)
		return;
#ifdef HLCSG_HLBSP_CUSTOMBOUNDINGBOX
	if (contents == CONTENTS_BOUNDINGBOX)
		return;
#endif

	//  HULL 0
	MakeBrushPlanes(b);
	MakeHullFaces(b, &b->hulls[0]);

	if (contents == CONTENTS_HINT)
		return;
#ifdef HLCSG_EMPTYBRUSH
	if (contents == CONTENTS_TOEMPTY)
		return;
#endif

	if (g_noclip)
	{
		if (b->cliphull)
		{
			b->hulls[0].faces = NULL;
		}
		return;
	}

	if (b->cliphull)
	{
		for (h = 1; h < NUM_HULLS; h++)
		{
			if (b->cliphull & (1 << h))
			{
				ExpandBrush(b, h);
				MakeHullFaces(b, &b->hulls[h]);
			}
		}
        b->contents = CONTENTS_SOLID;
		b->hulls[0].faces = NULL;
	}
	else
	{
		if (b->noclip)
			return;
		for (h = 1; h < NUM_HULLS; h++)
		{
			ExpandBrush(b, h);
			MakeHullFaces(b, &b->hulls[h]);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movslq %edi, %rax
leaq (%rax,%rax,4), %r14
shlq $0x6, %r14
leaq 0x30bc839(%rip), %r15   # 0x30cd5e0
movl 0x58(%r15,%r14), %ebp
cmpl $-0x13, %ebp
je 0x10e49
cmpl $-0x7, %ebp
je 0x10e49
leaq (%r15,%r14), %rbx
movq %rbx, %rdi
callq 0x10534
leaq 0x60(%rbx), %rsi
movq %rbx, %rdi
callq 0x10338
orl $0x10, %ebp
cmpl $-0x10, %ebp
je 0x10e49
leaq 0x61bc853(%rip), %rcx   # 0x61cd638
movl 0x1c(%rbx), %eax
cmpb $0x1, (%rcx)
jne 0x10df3
testl %eax, %eax
jne 0x10e3e
jmp 0x10e49
testl %eax, %eax
je 0x10e54
addq %r15, %r14
addq $0x98, %r14
movq $-0x3, %r15
movl 0x1c(%rbx), %eax
leal 0x4(%r15), %ecx
movzbl %cl, %ecx
btl %ecx, %eax
jae 0x10e2e
leal 0x4(%r15), %esi
movq %rbx, %rdi
callq 0xf30e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10338
addq $0x38, %r14
incq %r15
jne 0x10e08
movl $0xfffffffe, 0x58(%rbx) # imm = 0xFFFFFFFE
movq $0x0, 0x90(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x18(%rbx)
jne 0x10e49
addq %r15, %r14
addq $0x98, %r14
movq $-0x3, %r15
leal 0x4(%r15), %esi
movq %rbx, %rdi
callq 0xf30e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10338
addq $0x38, %r14
incq %r15
jne 0x10e6b
jmp 0x10e49
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlcsg/brush.cpp
// Function: CopyHullBrush(hullbrush_t const*)
hullbrush_t *CopyHullBrush (const hullbrush_t *hb)
{
	hullbrush_t *hb2;
	hb2 = (hullbrush_t *)malloc (sizeof (hullbrush_t));
	hlassume (hb2 != NULL, assume_NoMemory);
	memcpy (hb2, hb, sizeof (hullbrush_t));
	hb2->faces = (hullbrushface_t *)malloc (hb->numfaces * sizeof (hullbrushface_t));
	hlassume (hb2->faces != NULL, assume_NoMemory);
	memcpy (hb2->faces, hb->faces, hb->numfaces * sizeof (hullbrushface_t));
	hb2->edges = (hullbrushedge_t *)malloc (hb->numedges * sizeof (hullbrushedge_t));
	hlassume (hb2->edges != NULL, assume_NoMemory);
	memcpy (hb2->edges, hb->edges, hb->numedges * sizeof (hullbrushedge_t));
	hb2->vertexes = (hullbrushvertex_t *)malloc (hb->numvertexes * sizeof (hullbrushvertex_t));
	hlassume (hb2->vertexes != NULL, assume_NoMemory);
	memcpy (hb2->vertexes, hb->vertexes, hb->numvertexes * sizeof (hullbrushvertex_t));
	for (int i = 0; i < hb->numfaces; i++)
	{
		hullbrushface_t *f2 = &hb2->faces[i];
		const hullbrushface_t *f = &hb->faces[i];
		f2->vertexes = (vec3_t *)malloc (f->numvertexes * sizeof (vec3_t));
		hlassume (f2->vertexes != NULL, assume_NoMemory);
		memcpy (f2->vertexes, f->vertexes, f->numvertexes * sizeof (vec3_t));
	}
	return hb2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x30, %edi
callq 0x4430
movq %rax, %r14
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xaa4d
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups %xmm2, 0x20(%r14)
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movslq (%rbx), %rdi
shlq $0x6, %rdi
callq 0x4430
movq %rax, %r15
movq %rax, 0x8(%r14)
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xaa4d
movq 0x8(%rbx), %rsi
movslq (%rbx), %rdx
shlq $0x6, %rdx
movq %r15, %rdi
callq 0x4270
movslq 0x10(%rbx), %rax
shlq $0x4, %rax
leaq (%rax,%rax,8), %rdi
callq 0x4430
movq %rax, %r12
movq %rax, 0x18(%r14)
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xaa4d
movq 0x18(%rbx), %rsi
movslq 0x10(%rbx), %rax
shlq $0x4, %rax
leaq (%rax,%rax,8), %rdx
movq %r12, %rdi
callq 0x4270
movslq 0x20(%rbx), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
callq 0x4430
movq %rax, %r12
movq %rax, 0x28(%r14)
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xaa4d
movq 0x28(%rbx), %rsi
movslq 0x20(%rbx), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdx
movq %r12, %rdi
callq 0x4270
cmpl $0x0, (%rbx)
jle 0x11f21
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x8(%rbx), %rbp
movslq 0x30(%rbp,%r12), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
callq 0x4430
movq %rax, 0x38(%r15,%r12)
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xaa4d
movq 0x38(%r15,%r12), %rdi
movq 0x38(%rbp,%r12), %rsi
movslq 0x30(%rbp,%r12), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdx
callq 0x4270
incq %r13
movslq (%rbx), %rax
addq $0x40, %r12
cmpq %rax, %r13
jl 0x11ec8
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlcsg/brush.cpp
// Function: DeleteHullBrush(hullbrush_t*)
void DeleteHullBrush (hullbrush_t *hb)
{
	for (hullbrushface_t *hbf = hb->faces; hbf < hb->faces + hb->numfaces; hbf++)
	{
		if (hbf->vertexes)
		{
			free (hbf->vertexes);
		}
	}
	free (hb->faces);
	free (hb->edges);
	free (hb->vertexes);
	free (hb);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
cmpl $0x0, (%rdi)
jle 0x11f6a
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x11f51
callq 0x43a0
addq $0x40, %r14
movq 0x8(%rbx), %rdi
movslq (%rbx), %rax
shlq $0x6, %rax
addq %rdi, %rax
cmpq %rax, %r14
jb 0x11f43
jmp 0x11f6d
movq %r14, %rdi
callq 0x43a0
movq 0x18(%rbx), %rdi
callq 0x43a0
movq 0x28(%rbx), %rdi
callq 0x43a0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x43a0
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlcsg/brush.cpp
// Function: InitDefaultHulls()
void InitDefaultHulls ()
{
	for (int h = 0; h < NUM_HULLS; h++)
	{
		hullshape_t *hs = &g_defaulthulls[h];
		hs->id = _strdup ("");
		hs->disabled = true;
		hs->numbrushes = 0;
		hs->brushes = (hullbrush_t **)malloc (0 * sizeof (hullbrush_t *));
		hlassume (hs->brushes != NULL, assume_NoMemory);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl $0x10, %r14d
leaq 0x30ba9ab(%rip), %r15   # 0x30cc950
leaq 0xbd0d(%rip), %rbx      # 0x1dcb9
movq %rbx, %rdi
callq 0x45c0
movq %rax, -0x10(%r14,%r15)
movb $0x1, -0x8(%r14,%r15)
movl $0x0, -0x4(%r14,%r15)
xorl %edi, %edi
callq 0x4430
movq %rax, (%r14,%r15)
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xaa4d
addq $0x18, %r14
cmpq $0x70, %r14
jne 0x11fac
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlcsg/brushunion.cpp
// Function: DumpHullWindings(brushhull_t const*)
static void     DumpHullWindings(const brushhull_t* const hull)
{
    int             x = 0;
    bface_t*        face;

    for (face = hull->faces; face; face = face->next)
    {
        Developer(DEVELOPER_LEVEL_MEGASPAM, "Winding %d\n", x++);
        face->w->Print();
        Developer(DEVELOPER_LEVEL_MEGASPAM, "\n");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x30(%rdi), %r15
testq %r15, %r15
je 0x12886
leaq 0xd435(%rip), %rbx      # 0x1fc7e
leaq 0xb468(%rip), %r14      # 0x1dcb8
xorl %edx, %edx
leal 0x1(%rdx), %ebp
movl $0x6, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa7b2
movq 0x18(%r15), %rdi
callq 0xba24
movl $0x6, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0xa7b2
movq (%r15), %r15
movl %ebp, %edx
testq %r15, %r15
jne 0x12852
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlcsg/map.cpp
// Function: CopyCurrentBrush(entity_t*, brush_s const*)
brush_t *CopyCurrentBrush (entity_t *entity, const brush_t *brush)
{
	if (entity->firstbrush + entity->numbrushes != g_nummapbrushes)
	{
		Error ("CopyCurrentBrush: internal error.");
	}
	brush_t *newb = &g_mapbrushes[g_nummapbrushes];
	g_nummapbrushes++;
	hlassume (g_nummapbrushes <= MAX_MAP_BRUSHES, assume_MAX_MAP_BRUSHES);
	memcpy (newb, brush, sizeof (brush_t));
	newb->firstside = g_numbrushsides;
	g_numbrushsides += brush->numsides;
	hlassume (g_numbrushsides <= MAX_MAP_SIDES, assume_MAX_MAP_SIDES);
	memcpy (&g_brushsides[newb->firstside], &g_brushsides[brush->firstside], brush->numsides * sizeof (side_t));
	newb->entitynum = entity - g_entities;
	newb->brushnum = entity->numbrushes;
	entity->numbrushes++;
#ifdef HLCSG_HULLBRUSH
	for (int h = 0; h < NUM_HULLS; h++)
	{
		if (brush->hullshapes[h] != NULL)
		{
			newb->hullshapes[h] = _strdup (brush->hullshapes[h]);
		}
		else
		{
			newb->hullshapes[h] = NULL;
		}
	}
#endif
	return newb;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movl 0x1c(%rdi), %eax
addl 0x18(%rdi), %eax
cmpl 0x30ba951(%rip), %eax   # 0x30cd5d0
je 0x12c8f
leaq 0xd1d8(%rip), %rdi      # 0x1fe60
xorl %eax, %eax
callq 0xa2a0
movslq 0x30ba93a(%rip), %rax   # 0x30cd5d0
xorl %edi, %edi
cmpq $0x8000, %rax           # imm = 0x8000
setl %dil
leaq (%rax,%rax,4), %r12
shlq $0x6, %r12
leaq 0x30ba92f(%rip), %r13   # 0x30cd5e0
leaq (%r12,%r13), %r14
incl %eax
movl %eax, 0x30ba913(%rip)   # 0x30cd5d0
movl $0x28, %esi
callq 0xaa4d
movl $0x140, %edx            # imm = 0x140
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4270
movl 0x3aba903(%rip), %eax   # 0x3acd5e0
movl %eax, 0x10(%r12,%r13)
addl 0x14(%rbx), %eax
movl %eax, 0x3aba8f5(%rip)   # 0x3acd5e0
xorl %edi, %edi
cmpl $0x30001, %eax          # imm = 0x30001
setl %dil
movl $0x27, %esi
callq 0xaa4d
movslq 0x10(%r12,%r13), %rax
imulq $0xd0, %rax, %rdi
leaq 0x3aba8dd(%rip), %rax   # 0x3acd5f0
addq %rax, %rdi
movslq 0x10(%rbx), %rcx
imulq $0xd0, %rcx, %rsi
addq %rax, %rsi
movslq 0x14(%rbx), %rax
imulq $0xd0, %rax, %rdx
callq 0x4270
movq %r15, %rax
subq 0x1529a(%rip), %rax     # 0x27fd8
shrq $0x3, %rax
imull $0xcccccccd, %eax, %eax # imm = 0xCCCCCCCD
movl %eax, 0x8(%r12,%r13)
movl 0x1c(%r15), %eax
movl %eax, 0xc(%r12,%r13)
incl 0x1c(%r15)
xorl %r15d, %r15d
movq 0x38(%rbx,%r15,8), %rdi
testq %rdi, %rdi
je 0x12d6e
callq 0x45c0
jmp 0x12d70
xorl %eax, %eax
movq %rax, 0x38(%r14,%r15,8)
incq %r15
cmpq $0x4, %r15
jne 0x12d5d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlcsg/map.cpp
// Function: TextureAxisFromPlane(plane_t const*, double*, double*)
void            TextureAxisFromPlane(const plane_t* const pln, vec3_t xv, vec3_t yv)
{
    int             bestaxis;
    vec_t           dot, best;
    int             i;

    best = 0;
    bestaxis = 0;

    for (i = 0; i < 6; i++)
    {
        dot = DotProduct(pln->normal, s_baseaxis[i * 3]);
        if (dot > best)
        {
            best = dot;
            bestaxis = i;
        }
    }

    VectorCopy(s_baseaxis[bestaxis * 3 + 1], xv);
    VectorCopy(s_baseaxis[bestaxis * 3 + 2], yv);
}

// Assembly:
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm1
movsd 0x10(%rdi), %xmm2
xorl %ecx, %ecx
xorpd %xmm3, %xmm3
leaq 0xd52a(%rip), %rdi      # 0x20470
xorl %eax, %eax
movsd -0x8(%rdi), %xmm4
mulsd %xmm1, %xmm4
movsd -0x10(%rdi), %xmm5
mulsd %xmm0, %xmm5
addsd %xmm4, %xmm5
movsd (%rdi), %xmm4
mulsd %xmm2, %xmm4
addsd %xmm5, %xmm4
ucomisd %xmm3, %xmm4
cmoval %ecx, %eax
maxsd %xmm3, %xmm4
incq %rcx
addq $0x48, %rdi
movapd %xmm4, %xmm3
cmpq $0x6, %rcx
jne 0x12f48
leal (%rax,%rax,2), %ecx
incl %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq 0xd4c7(%rip), %rdi      # 0x20460
movups (%rdi,%rcx,8), %xmm0
movups %xmm0, (%rsi)
movsd 0x10(%rdi,%rcx,8), %xmm0
movsd %xmm0, 0x10(%rsi)
leal 0x2(%rax,%rax,2), %eax
cltq
leaq (%rax,%rax,2), %rax
movups (%rdi,%rax,8), %xmm0
movups %xmm0, (%rdx)
movsd 0x10(%rdi,%rax,8), %xmm0
movsd %xmm0, 0x10(%rdx)
retq