// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/outside.cpp
// Function: LoadAllowableOutsideList(char const*)
void            LoadAllowableOutsideList(const char* const filename)
{
    char*           fname;
    int             i, x, y;
    char*           pData;
    char*           pszData;

    if (!filename)
    {
        return;
    }
    else
    {
        unsigned        len = strlen(filename) + 5;

        fname = (char*)Alloc(len);
        safe_snprintf(fname, len, "%s", filename);
    }

    if (q_exists(fname))
    {
        if ((i = LoadFile(fname, &pData)))
        {
            Log("Reading allowable void entities from file '%s'\n", fname);
            g_nAllowableOutside = 0;
            for (pszData = pData, y = 0, x = 0; x < i; x++)
            {
                if ((pData[x] == '\n') || (pData[x] == '\r'))
                {
                    pData[x] = 0;
                    if (strlen(pszData))
                    {
                        if (g_nAllowableOutside == g_maxAllowableOutside)
                        {
                            g_maxAllowableOutside += MAX_ALLOWABLE_OUTSIDE_GROWTH_SIZE;
                            g_strAllowableOutsideList =

                                (char**)realloc(g_strAllowableOutsideList, sizeof(char*) * g_maxAllowableOutside);
                        }

                        g_strAllowableOutsideList[y++] = pszData;
                        g_nAllowableOutside++;

                        Verbose("Adding entity '%s' to the allowable void list\n", pszData);
                    }
                    pszData = pData + x + 1;
                }
            }
        }
    }
}

// Assembly:
testq %rdi, %rdi
je 0x13140
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
callq 0x4140
leal 0x5(%rax), %r15d
movq %r15, %rdi
callq 0x48c4
movq %rax, %rbx
leaq 0xb18b(%rip), %rdx      # 0x1e1bd
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rcx
xorl %eax, %eax
callq 0x8863
movq %rbx, %rdi
callq 0x97be
testb %al, %al
je 0x13134
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x98cf
testl %eax, %eax
je 0x13134
movl %eax, %ebp
leaq 0xee08(%rip), %rdi      # 0x21e78
movq %rbx, %rsi
xorl %eax, %eax
callq 0x9c96
movl $0x0, 0x20bc854(%rip)   # 0x20cf8d8
testl %ebp, %ebp
jle 0x13134
movq 0x8(%rsp), %r14
movl %ebp, %r15d
negq %r15
movl $0x1, %r12d
leaq 0xee04(%rip), %rbx      # 0x21ea8
xorl %ebp, %ebp
movq 0x8(%rsp), %rax
movzbl -0x1(%rax,%r12), %ecx
cmpl $0xd, %ecx
je 0x130bb
cmpl $0xa, %ecx
jne 0x13120
movb $0x0, -0x1(%rax,%r12)
cmpb $0x0, (%r14)
je 0x13118
movl 0x20bc80f(%rip), %esi   # 0x20cf8dc
cmpl %esi, 0x20bc805(%rip)   # 0x20cf8d8
jne 0x130f5
addl $0x40, %esi
movl %esi, 0x20bc7fe(%rip)   # 0x20cf8dc
movq 0x20bc7fb(%rip), %rdi   # 0x20cf8e0
shlq $0x3, %rsi
callq 0x4520
movq %rax, 0x20bc7eb(%rip)   # 0x20cf8e0
movq 0x20bc7e4(%rip), %rax   # 0x20cf8e0
movslq %ebp, %rcx
incl %ebp
movq %r14, (%rax,%rcx,8)
incl 0x20bc7cd(%rip)         # 0x20cf8d8
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0xa3d7
movq 0x8(%rsp), %r14
addq %r12, %r14
leaq (%r15,%r12), %rax
incq %rax
incq %r12
cmpq $0x1, %rax
jne 0x130a6
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq