// File: /workspace/github_cpp_makefile_star2_O2/tylerkaraszewski[P]Argyle/Config.cpp
// Function: Config::import()
void Config::import()
{

  FILE* file = fopen(m_configFile.c_str(), "r");
  if (file == NULL)
  {
    return;
  }

  char buffer[S_READ_SIZE];
  bool doneReading = false;
  size_t remaining = 0;
  while (!doneReading)
  {
    size_t readSize = S_READ_SIZE - remaining;
    size_t bytesRead = fread(buffer + remaining, 1, readSize, file);
    if (bytesRead < readSize)
    {
      doneReading = true;
    }

    // parse what we've read so far.
    vector<string> lines;
    char* start = buffer;
    char* end = buffer;
    while (end < (buffer + bytesRead + remaining))
    {
      // Skip to a useful character.
      if ((*start == '\n') || (*start == '\r'))
      {
        start++;
        end++;
        continue;
      }

      end++;
      if ((*end == '\n') || (*end == '\r'))
      {
        lines.push_back(string(start, end - start));
        start = end;
      }
    }
    for (size_t i = 0; i < lines.size(); i++)
    {
      parseLine(lines[i]);
    }
    remaining = end - start;
    memmove(buffer, start, remaining);
  }
  // We still have one line in the buffer if it didn't have a terminating newline.
  parseLine(string(buffer, remaining));

  int fileError = ferror(file);
  if (fileError)
  {
    // Log?
  }
  fclose(file);
  return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, -0x38(%rbp)
movq (%rdi), %rdi
leaq 0x11e7(%rip), %rsi      # 0x9527
callq 0x3330
movq %rax, -0x30(%rbp)
testq %rax, %rax
je 0x84fd
movq %rsp, -0x58(%rbp)
movq 0x5fab(%rip), %rax      # 0xe308
movq %rsp, %r12
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
xorl %r14d, %r14d
leaq -0xc8(%rbp), %rbx
xorl %eax, %eax
movq %r12, -0x60(%rbp)
leaq (%r12,%r14), %r13
testb $0x1, %al
jne 0x84ad
movq 0x5f77(%rip), %r15      # 0xe308
subq %r14, %r15
movq %r13, %rdi
pushq $0x1
popq %rsi
movq %r15, %rdx
movq -0x30(%rbp), %rcx
callq 0x3420
cmpq %r15, %rax
setb %cl
movq %rcx, -0x68(%rbp)
andq $0x0, -0x40(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
addq %rax, %r13
movq %r12, %r15
leaq 0x1(%r12), %rax
subq %r15, %r12
movq %r12, %r14
movq %rax, %r12
leaq -0x1(%r12), %rax
cmpq %r13, %rax
jae 0x8447
movzbl (%r15), %eax
cmpl $0xd, %eax
je 0x83ff
cmpl $0xa, %eax
je 0x83ff
movzbl (%r12), %eax
incq %r12
incq %r14
cmpl $0xd, %eax
je 0x8404
cmpl $0xa, %eax
jne 0x83d0
jmp 0x8404
incq %r15
jmp 0x83c2
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
addq %r15, %r14
leaq -0x88(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x480e
leaq -0x50(%rbp), %rdi
leaq -0x88(%rbp), %r14
movq %r14, %rsi
callq 0x88fc
decq %r12
movq %r14, %rdi
callq 0x35d8
jmp 0x83bf
xorl %r12d, %r12d
xorl %r13d, %r13d
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %r13
jae 0x8489
addq %r12, %rsi
movq %rbx, %rdi
callq 0x33d0
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x8550
movq %rbx, %rdi
callq 0x35d8
incq %r13
addq $0x20, %r12
jmp 0x844d
movq -0x60(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x34c0
leaq -0x50(%rbp), %rdi
callq 0x8858
movq -0x68(%rbp), %rax
jmp 0x837e
leaq -0x98(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0xa8(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x480e
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x8550
leaq -0xa8(%rbp), %rdi
callq 0x35d8
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x3550
movq %rbx, %rdi
callq 0x32b0
movq -0x58(%rbp), %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x35d8
jmp 0x8548
jmp 0x853c
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
jmp 0x8535
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x35d8
jmp 0x853f
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x8858
movq %rbx, %rdi
callq 0x3510