// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x216e6
jmp 0x2188c
movq 0x30(%rsp), %rdi
callq 0x4140
addq $0x5, %rax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, %edi
callq 0x4780
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl 0x4(%rsp), %eax
movl %eax, %esi
movq 0x30(%rsp), %rcx
leaq 0x149e6(%rip), %rdx     # 0x36105
movb $0x0, %al
callq 0x9470
movq 0x28(%rsp), %rdi
callq 0xaa60
testb $0x1, %al
jne 0x21739
jmp 0x2188c
movq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xac10
movl %eax, 0x24(%rsp)
cmpl $0x0, %eax
je 0x2188a
movq 0x28(%rsp), %rsi
leaq 0x188af(%rip), %rdi     # 0x3a010
movb $0x0, %al
callq 0xb060
movl $0x0, 0x20c9176(%rip)   # 0x20ea8e8
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0x21888
movq 0x10(%rsp), %rax
movslq 0x20(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x217c4
movq 0x10(%rsp), %rax
movslq 0x20(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xd, %eax
jne 0x21876
movq 0x10(%rsp), %rax
movslq 0x20(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x8(%rsp), %rdi
callq 0x4140
cmpq $0x0, %rax
je 0x21860
movl 0x20c9100(%rip), %eax   # 0x20ea8e8
cmpl 0x20c90fe(%rip), %eax   # 0x20ea8ec
jne 0x2181e
movl 0x20c90f6(%rip), %eax   # 0x20ea8ec
addl $0x40, %eax
movl %eax, 0x20c90ed(%rip)   # 0x20ea8ec
movq 0x20c90ea(%rip), %rdi   # 0x20ea8f0
movl 0x20c90e0(%rip), %eax   # 0x20ea8ec
movl %eax, %esi
shlq $0x3, %rsi
callq 0x4500
movq %rax, 0x20c90d2(%rip)   # 0x20ea8f0
movq 0x8(%rsp), %rdx
movq 0x20c90c6(%rip), %rax   # 0x20ea8f0
movl 0x1c(%rsp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x1c(%rsp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x20c90a4(%rip), %eax   # 0x20ea8e8
addl $0x1, %eax
movl %eax, 0x20c909b(%rip)   # 0x20ea8e8
movq 0x8(%rsp), %rsi
leaq 0x187e7(%rip), %rdi     # 0x3a040
movb $0x0, %al
callq 0xba90
movq 0x10(%rsp), %rax
movslq 0x20(%rsp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x21878
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x2178c
jmp 0x2188a
jmp 0x2188c
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)