// File: /workspace/github_cpp_makefile_star2_O2/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 0x112bc
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x4140
leal 0x5(%rax), %r15d
movq %r15, %rdi
callq 0x47b2
movq %rax, %r14
leaq 0x9f6b(%rip), %rdx      # 0x1b11d
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x766f
movq %r14, %rdi
callq 0x82ae
testb %al, %al
je 0x112b0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x83bb
testl %eax, %eax
je 0x112b0
movl %eax, %ebx
leaq 0xdbe0(%rip), %rdi      # 0x1edd0
xorl %ebp, %ebp
movq %r14, %rsi
xorl %eax, %eax
callq 0x8780
andl $0x0, 0x20bc6d5(%rip)   # 0x20cd8d8
movq 0x8(%rsp), %rax
testl %ebx, %ebx
cmovlel %ebp, %ebx
negq %rbx
pushq $0x1
popq %r12
leaq 0xdbe5(%rip), %r14      # 0x1ee00
xorl %ebp, %ebp
movq %rax, %r15
leaq (%rbx,%r12), %rcx
cmpq $0x1, %rcx
je 0x112b0
movzbl -0x1(%rax,%r12), %ecx
cmpl $0xd, %ecx
je 0x1123e
cmpl $0xa, %ecx
jne 0x112a8
movb $0x0, -0x1(%rax,%r12)
cmpb $0x0, (%r15)
je 0x1129f
movl 0x20bc688(%rip), %esi   # 0x20cd8d8
movq 0x20bc689(%rip), %rax   # 0x20cd8e0
cmpl 0x20bc67f(%rip), %esi   # 0x20cd8dc
jne 0x11281
addl $0x40, %esi
movl %esi, 0x20bc674(%rip)   # 0x20cd8dc
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x4530
movq %rax, 0x20bc665(%rip)   # 0x20cd8e0
movl 0x20bc657(%rip), %esi   # 0x20cd8d8
movslq %ebp, %rcx
incl %ebp
movq %r15, (%rax,%rcx,8)
incl %esi
movl %esi, 0x20bc646(%rip)   # 0x20cd8d8
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x8f76
movq 0x8(%rsp), %rax
leaq (%rax,%r12), %r15
incq %r12
jmp 0x11220
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq