// File: /workspace/github_cpp_makefile_star2_O2/jsteemann[P]jshund/src/jshund.cpp
// Function: main
int main (int argc, char* argv[]) {
  if (argc < 2) {
    // not enough arguments
    Bark();
    std::cout << "usage: " << argv[0] << " <file>" << std::endl;
    return EXIT_FAILURE;
  }
 
  // parse options
  bool colors  = true;
  bool globals = true; 
  bool debug   = false; 

  for (int i = 1; i < argc; ++i) {
    const std::string argument(argv[i]);

    if (argument.size() > 2 && argument.substr(0, 2) == "--") { 
      if (argument == "--colors") {
        colors = true;
      }
      else if (argument == "--no-colors") {
        colors = false;
      }
      else if (argument == "--globals") {
        globals = true;
      }
      else if (argument == "--no-globals") {
        globals = false;
      }
      else if (argument == "--debug") {
        debug = true;
      }
      else if (argument == "--help" || argument == "--version" || argument == "--bark") {
        Bark();
        return EXIT_SUCCESS;
      }
    }
  }

  // add files
  std::vector<std::string> files = AddFiles(argc, argv);

  int errors = ProcessFiles(files, colors, globals, debug);

  // return status code based on whether there were any errors
  if (errors == 0) {
    return EXIT_SUCCESS;
  }

  return EXIT_FAILURE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %rbx
cmpl $0x2, %edi
jge 0x2537
callq 0x2961
movq 0x8acf(%rip), %rdi      # 0xafd0
leaq 0x4b34(%rip), %rsi      # 0x703c
callq 0x21e0
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x21e0
leaq 0x4b25(%rip), %rsi      # 0x7044
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x2100
pushq $0x1
popq %rbx
jmp 0x28e2
movl %edi, %eax
movq %rax, 0x10(%rsp)
movb $0x1, %al
movl %eax, 0x8(%rsp)
pushq $0x1
popq %r12
movq $0x0, 0x18(%rsp)
leaq 0x58(%rsp), %r14
leaq 0x100(%rsp), %r13
movb $0x1, %al
movl %eax, 0x4(%rsp)
cmpq %r12, 0x10(%rsp)
je 0x26b6
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x29fc
movb $0x1, %r15b
cmpq $0x3, 0x60(%rsp)
jb 0x269b
movq %r13, %rdi
movq %r14, %rsi
xorl %edx, %edx
pushq $0x2
popq %rcx
callq 0x2220
movq %r13, %rdi
leaq 0x4c9a(%rip), %rsi      # 0x7241
callq 0x2a37
movq %r13, %rdi
movl %eax, %ebp
callq 0x20f0
testb %bpl, %bpl
je 0x269b
movq %r14, %rdi
leaq 0x4a83(%rip), %rsi      # 0x704c
callq 0x2a37
movb $0x1, %r15b
testb %al, %al
je 0x25e0
movb $0x1, %al
movl %eax, 0x8(%rsp)
jmp 0x269b
movq %r14, %rdi
leaq 0x4a6b(%rip), %rsi      # 0x7055
callq 0x2a37
testb %al, %al
je 0x2600
movl $0x0, 0x8(%rsp)
jmp 0x269b
movq %r14, %rdi
leaq 0x4a57(%rip), %rsi      # 0x7061
callq 0x2a37
movb $0x1, %r15b
testb %al, %al
je 0x261e
movb $0x1, %al
movl %eax, 0x4(%rsp)
jmp 0x269b
movq %r14, %rdi
leaq 0x4a43(%rip), %rsi      # 0x706b
callq 0x2a37
testb %al, %al
je 0x263b
movl $0x0, 0x4(%rsp)
jmp 0x269b
movq %r14, %rdi
leaq 0x4a33(%rip), %rsi      # 0x7078
callq 0x2a37
movb $0x1, %r15b
testb %al, %al
je 0x265a
movb $0x1, %al
movq %rax, 0x18(%rsp)
jmp 0x269b
movq %r14, %rdi
leaq 0x4a1c(%rip), %rsi      # 0x7080
callq 0x2a37
testb %al, %al
jne 0x2693
movq %r14, %rdi
leaq 0x4a10(%rip), %rsi      # 0x7087
callq 0x2a37
testb %al, %al
jne 0x2693
movq %r14, %rdi
leaq 0x4a07(%rip), %rsi      # 0x7091
callq 0x2a37
testb %al, %al
je 0x269b
callq 0x2961
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x20f0
incq %r12
testb %r15b, %r15b
jne 0x2564
xorl %ebx, %ebx
jmp 0x28e2
movq %rbx, %r13
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rax
andq $0x0, 0x10(%rax)
movaps %xmm0, (%rax)
pushq $0x1
popq %rbp
xorl %ebx, %ebx
leaq 0x58(%rsp), %r15
leaq 0x100(%rsp), %r12
cmpq %rbp, 0x10(%rsp)
je 0x2752
movq (%r13,%rbp,8), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x29fc
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
pushq $0x2
popq %rcx
callq 0x2220
movq %r12, %rdi
leaq 0x4b35(%rip), %rsi      # 0x7241
callq 0x2a37
movl %eax, %r14d
movq %r12, %rdi
callq 0x20f0
notb %r14b
orb %bl, %r14b
testb $0x1, %r14b
je 0x273c
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %r15, %rdx
callq 0x2a66
jmp 0x2745
cmpq $0x2, 0x60(%rsp)
sete %bl
movq %r15, %rdi
callq 0x20f0
incq %rbp
jmp 0x26db
xorl %ebp, %ebp
leaq 0x38(%rsp), %rbx
movzbl 0x18(%rsp), %eax
andl $0x1, %eax
movl %eax, 0x10(%rsp)
movzbl 0x8(%rsp), %eax
andl $0x1, %eax
movl %eax, 0x8(%rsp)
movzbl 0x4(%rsp), %eax
andl $0x1, %eax
movl %eax, 0x4(%rsp)
leaq 0x100(%rsp), %r14
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %r13
jae 0x28d1
addq %rbp, %rsi
movq %rbx, %rdi
callq 0x22d0
leaq 0xf(%rsp), %rdi
movq %rbx, %rsi
callq 0x2fcc
movq %rax, %r15
testq %rax, %rax
je 0x2885
testb $0x1, 0x18(%rsp)
je 0x2828
movq 0x87f9(%rip), %rdi      # 0xafd0
leaq 0x4a16(%rip), %rsi      # 0x71f4
callq 0x21e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
movq %rax, %rdi
leaq 0x4ba7(%rip), %rsi      # 0x739f
callq 0x21e0
movq %rax, %rdi
callq 0x2100
movq 0x87c4(%rip), %rdi      # 0xafd0
leaq 0x49f6(%rip), %rsi      # 0x7209
callq 0x21e0
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
callq 0x2100
leaq 0x58(%rsp), %rdi
movl 0x10(%rsp), %esi
callq 0x3098
movq %r14, %rdi
movl 0x8(%rsp), %esi
movl 0x4(%rsp), %edx
callq 0x4150
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x4a80
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4222
testl %eax, %eax
sete %al
orb %al, %r12b
movq %r14, %rdi
callq 0x4b14
leaq 0x58(%rsp), %rdi
callq 0x4b3c
movq %r15, %rdi
callq 0x2290
jmp 0x28bd
movq 0x8764(%rip), %rdi      # 0xaff0
leaq 0x4945(%rip), %rsi      # 0x71d8
callq 0x21e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
movq %rax, %rdi
leaq 0x4af2(%rip), %rsi      # 0x739f
callq 0x21e0
movb $0x1, %r12b
movq %rax, %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x20f0
incq %r13
addq $0x20, %rbp
jmp 0x278b
movzbl %r12b, %ebx
andl $0x1, %ebx
leaq 0x20(%rsp), %rdi
callq 0x2a44
movl %ebx, %eax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28fa
jmp 0x2917
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x20f0
jmp 0x2959
movq %rax, %rbx
jmp 0x2936
jmp 0x2942
jmp 0x2912
movq %rax, %rbx
jmp 0x294f
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0x294a
movq %rax, %rbx
jmp 0x2959
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x4b14
leaq 0x58(%rsp), %rdi
callq 0x4b3c
jmp 0x2945
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x20f0
leaq 0x20(%rsp), %rdi
callq 0x2a44
movq %rbx, %rdi
callq 0x2380