// File: jsteemann[P]jshund/src/jshund.cpp
// Function: ProcessFiles(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, bool, bool, bool)
static bool ProcessFiles (std::vector<std::string>& files, bool colors, bool globals, bool debug) {
  bool hasError = false;

  FileReader f;
  for (size_t i = 0; i < files.size(); ++i) {
    const std::string filename = files[i];

    char* fileContent = f.read(filename);

    if (fileContent == 0) {
      std::cerr << "could not read input file '" << filename << "'" << std::endl;
      hasError = true;
    }
    else {
      if (debug) {
        std::cout << "parsing input file '" << filename << "'" << std::endl;
        std::cout << "----------------------------------------------------------" << std::endl << std::endl;
      }
      Tokenizer t(debug);
      Validator v(colors, globals);
      if (! v.validate(filename, t.tokenize(fileContent))) {
        hasError = true;
      }
    }

    delete[] fileContent;
  }

  return hasError;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movb %cl, %al
movb %dl, %cl
movb %sil, %dl
movq %rdi, -0x8(%rbp)
andb $0x1, %dl
movb %dl, -0x9(%rbp)
andb $0x1, %cl
movb %cl, -0xa(%rbp)
andb $0x1, %al
movb %al, -0xb(%rbp)
movb $0x0, -0xc(%rbp)
leaq -0xd(%rbp), %rdi
callq 0x5330
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4eb0
movq %rax, %rcx
movq -0x188(%rbp), %rax
cmpq %rcx, %rax
jae 0x4026
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5340
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
callq 0x3110
jmp 0x3d9e
leaq -0xd(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x5360
movq %rax, -0x190(%rbp)
jmp 0x3db4
movq -0x190(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x3e5b
movq 0x1421f(%rip), %rdi     # 0x17ff0
leaq 0xd39e(%rip), %rsi      # 0x11176
callq 0x3240
movq %rax, -0x198(%rbp)
jmp 0x3de6
movq -0x198(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3220
movq %rax, -0x1a0(%rbp)
jmp 0x3dff
movq -0x1a0(%rbp), %rdi
leaq 0xd530(%rip), %rsi      # 0x1133d
callq 0x3240
movq %rax, -0x1a8(%rbp)
jmp 0x3e1b
movq -0x1a8(%rbp), %rdi
movq 0x14197(%rip), %rsi     # 0x17fc0
callq 0x32a0
jmp 0x3e30
movb $0x1, -0xc(%rbp)
jmp 0x3fe4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4049
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x401b
testb $0x1, -0xb(%rbp)
je 0x3f1a
movq 0x14164(%rip), %rdi     # 0x17fd0
leaq 0xd31f(%rip), %rsi      # 0x11192
callq 0x3240
movq %rax, -0x1b0(%rbp)
jmp 0x3e81
movq -0x1b0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3220
movq %rax, -0x1b8(%rbp)
jmp 0x3e9a
movq -0x1b8(%rbp), %rdi
leaq 0xd495(%rip), %rsi      # 0x1133d
callq 0x3240
movq %rax, -0x1c0(%rbp)
jmp 0x3eb6
movq -0x1c0(%rbp), %rdi
movq 0x140fc(%rip), %rsi     # 0x17fc0
callq 0x32a0
jmp 0x3ecb
movq 0x140fe(%rip), %rdi     # 0x17fd0
leaq 0xd2ce(%rip), %rsi      # 0x111a7
callq 0x3240
movq %rax, -0x1c8(%rbp)
jmp 0x3ee7
movq -0x1c8(%rbp), %rdi
movq 0x140cb(%rip), %rsi     # 0x17fc0
callq 0x32a0
movq %rax, -0x1d0(%rbp)
jmp 0x3f03
movq -0x1d0(%rbp), %rdi
movq 0x140af(%rip), %rsi     # 0x17fc0
callq 0x32a0
jmp 0x3f18
jmp 0x3f1a
movzbl -0xb(%rbp), %esi
andl $0x1, %esi
leaq -0xf8(%rbp), %rdi
callq 0x5550
jmp 0x3f2f
movzbl -0xa(%rbp), %edx
movzbl -0x9(%rbp), %esi
andl $0x1, %esi
andl $0x1, %edx
leaq -0x180(%rbp), %rdi
callq 0x88b0
jmp 0x3f4b
movq -0x50(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x9870
movq %rax, -0x1d8(%rbp)
jmp 0x3f64
movq -0x1d8(%rbp), %rdx
leaq -0x180(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x89c0
movl %eax, -0x1dc(%rbp)
jmp 0x3f83
movl -0x1dc(%rbp), %eax
cmpl $0x0, %eax
jne 0x3fbc
movb $0x1, -0xc(%rbp)
jmp 0x3fbc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3fd6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x9950
jmp 0x3fd6
leaq -0x180(%rbp), %rdi
callq 0x9950
leaq -0xf8(%rbp), %rdi
callq 0x99a0
jmp 0x3fe4
leaq -0xf8(%rbp), %rdi
callq 0x99a0
jmp 0x401b
movq -0x50(%rbp), %rax
movq %rax, -0x1e8(%rbp)
cmpq $0x0, %rax
je 0x4001
movq -0x1e8(%rbp), %rdi
callq 0x3360
leaq -0x38(%rbp), %rdi
callq 0x3170
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3d5c
leaq -0x38(%rbp), %rdi
callq 0x3170
jmp 0x4049
movb -0xc(%rbp), %al
movb %al, -0x1e9(%rbp)
leaq -0xd(%rbp), %rdi
callq 0x99e0
movb -0x1e9(%rbp), %al
andb $0x1, %al
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
leaq -0xd(%rbp), %rdi
callq 0x99e0
movq -0x40(%rbp), %rdi
callq 0x3460
nopl (%rax,%rax)