// File: /workspace/github_cpp_makefile_star2_O3/josh0xA[P]bf/src/bf.cc
// Function: main
int main(int argc, char** argv) {

  bf::Environment env;
  bf::Stream<std::string, std::istream, bf_word> bf_stream;
  bf::Parser parser;

  if (argc == BF_SUCCESS_CODE_STANDARD + 1) {
    bf::User usr;
    std::cout << "The Brainfuck Interactive Console Interpreter\n\t\tJosh Schiavone\n";
    usr.load_interactive_interpreter(env);
  } else {
      if (env.check_program_file_extension(argv[1])) {
        std::ifstream stream = std::ifstream(argv[1]);
        if (stream.is_open()) {
          bfint_t bracks = bf_stream.entry_point_stream(env, stream);
          if (bracks == BF_SUCCESS_CODE_STANDARD) {
            parser.interpret_bf_instructions(env);
          } else {
              throw bf::exp::BFException("(error): could not match brackets\n");
          }
        } else {
            throw bf::exp::BFException("(error): .bf source could not be located\n");
        }
      } else {
          throw bf::exp::BFException("(error): source file must contain a valid brainfuck extension\n");
      }
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5f8, %rsp            # imm = 0x5F8
movl %edi, %r12d
movl $0x7530, %edi           # imm = 0x7530
movq %rsi, %r15
callq 0x2120
leaq 0x7530(%rax), %r14
movl $0x7530, %edx           # imm = 0x7530
movq %rax, -0x68(%rbp)
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq %r14, -0x58(%rbp)
callq 0x20b0
vxorps %xmm0, %xmm0, %xmm0
movq %r14, -0x60(%rbp)
vmovups %ymm0, -0x50(%rbp)
movq %rbx, -0x30(%rbp)
movl $0x7530, %edi           # imm = 0x7530
vzeroupper
callq 0x2120
movq %rax, %r13
leaq -0x5e0(%rbp), %rbx
addq $0x7530, %r13           # imm = 0x7530
movl $0x7530, %edx           # imm = 0x7530
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rax, -0x40(%rbx)
movq %r13, -0x30(%rbx)
callq 0x20b0
vxorps %xmm0, %xmm0, %xmm0
movq %r13, -0x38(%rbx)
vmovups %ymm0, -0x28(%rbx)
movq %r14, -0x8(%rbx)
movq %rbx, %rdi
vzeroupper
callq 0x20e0
vxorps %xmm0, %xmm0, %xmm0
movq $0x0, -0x450(%rbp)
vmovaps %xmm0, -0x460(%rbp)
movl $0x7530, %edi           # imm = 0x7530
callq 0x2120
movq %rax, %r13
leaq -0x420(%rbp), %r14
addq $0x7530, %r13           # imm = 0x7530
movl $0x7530, %edx           # imm = 0x7530
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq %rax, -0x40(%r14)
movq %r13, -0x30(%r14)
callq 0x20b0
vxorps %xmm0, %xmm0, %xmm0
movq %r13, -0x38(%r14)
vmovups %ymm0, -0x28(%r14)
movq %rbx, -0x8(%r14)
movq %r14, %rdi
vzeroupper
callq 0x20e0
cmpl $0x1, %r12d
jne 0x2a05
movl $0x7530, %edi           # imm = 0x7530
callq 0x2120
movq %rax, %rbx
leaq -0x250(%rbp), %r15
addq $0x7530, %rbx           # imm = 0x7530
movl $0x7530, %edx           # imm = 0x7530
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %rax, -0x40(%r15)
movq %rbx, -0x30(%r15)
callq 0x20b0
vxorps %xmm0, %xmm0, %xmm0
movq %rbx, -0x38(%r15)
vmovups %ymm0, -0x28(%r15)
movq %r12, -0x8(%r15)
movq %r15, %rdi
vzeroupper
callq 0x20e0
leaq -0xb8(%rbp), %r12
movl $0x0, -0x14(%r12)
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq 0x3654(%rip), %rdi      # 0x5fc0
leaq 0x1708(%rip), %rsi      # 0x407b
movl $0x3f, %edx
callq 0x2160
leaq -0x290(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x26a0
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x29a8
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2140
movq 0x3609(%rip), %rsi      # 0x5fb8
movq %r15, %rdi
callq 0x2180
leaq -0x1d8(%rbp), %r15
movq %r15, %rdi
callq 0x2070
movq -0xa0(%r15), %rdi
testq %rdi, %rdi
je 0x29e1
movq -0x268(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0x290(%rbp), %rdi
testq %rdi, %rdi
je 0x2ab3
movq -0x280(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
jmp 0x2ab3
movq 0x8(%r15), %rsi
leaq -0x88(%rbp), %rdi
leaq -0x290(%rbp), %rdx
callq 0x2e74
leaq -0x88(%rbp), %rsi
callq 0x23fa
leaq -0x78(%rbp), %rcx
movl %eax, %r12d
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x2a44
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2140
testb %r12b, %r12b
je 0x2b9d
movq 0x8(%r15), %rsi
leaq -0x290(%rbp), %rdi
movl $0x8, %edx
callq 0x2210
leaq -0x218(%rbp), %rdi
callq 0x2040
testb %al, %al
je 0x2bd4
leaq -0x620(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0x290(%rbp), %rdx
xorl %ecx, %ecx
callq 0x2eb2
testl %eax, %eax
jne 0x2c0b
leaq -0x460(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x2504
leaq -0x290(%rbp), %rdi
callq 0x2050
movq 0x34fe(%rip), %rsi      # 0x5fb8
movq %r14, %rdi
callq 0x2180
leaq -0x3a8(%rbp), %r14
movq %r14, %rdi
callq 0x2070
movq -0xa0(%r14), %rdi
testq %rdi, %rdi
je 0x2aec
movq -0x438(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0x460(%rbp), %rdi
testq %rdi, %rdi
je 0x2b07
movq -0x450(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq 0x34aa(%rip), %rsi      # 0x5fb8
leaq -0x5e0(%rbp), %rdi
callq 0x2180
leaq -0x568(%rbp), %rbx
movq %rbx, %rdi
callq 0x2070
movq -0xa0(%rbx), %rdi
testq %rdi, %rdi
je 0x2b44
movq -0x5f8(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0x620(%rbp), %rdi
testq %rdi, %rdi
je 0x2b5f
movq -0x610(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x2b74
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x2b89
movq -0x58(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
xorl %eax, %eax
addq $0x5f8, %rsp            # imm = 0x5F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x2090
leaq 0x31d2(%rip), %rcx      # 0x5d80
leaq 0x1553(%rip), %r8       # 0x4108
movq %rcx, (%rax)
movq %r8, 0x8(%rax)
movq 0x3415(%rip), %rdx      # 0x5fd8
leaq 0x318e(%rip), %rsi      # 0x5d58
movq %rax, %rdi
callq 0x21c0
jmp 0x2c40
movl $0x10, %edi
callq 0x2090
leaq 0x319b(%rip), %rcx      # 0x5d80
leaq 0x14f2(%rip), %r8       # 0x40de
movq %rcx, (%rax)
movq %r8, 0x8(%rax)
movq 0x33de(%rip), %rdx      # 0x5fd8
leaq 0x3157(%rip), %rsi      # 0x5d58
movq %rax, %rdi
callq 0x21c0
jmp 0x2c40
movl $0x10, %edi
callq 0x2090
leaq 0x3164(%rip), %rcx      # 0x5d80
leaq 0x1498(%rip), %r8       # 0x40bb
movq %rcx, (%rax)
movq %r8, 0x8(%rax)
movq 0x33a7(%rip), %rdx      # 0x5fd8
leaq 0x3120(%rip), %rsi      # 0x5d58
movq %rax, %rdi
callq 0x21c0
jmp 0x2cb9
jmp 0x2c77
jmp 0x2c77
leaq -0x78(%rbp), %rcx
movq %rax, %rbx
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x2cc8
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2140
jmp 0x2cc8
leaq -0x290(%rbp), %rdi
movq %rax, %rbx
callq 0x30a8
jmp 0x2cc8
jmp 0x2c77
movq %rax, %rbx
jmp 0x2cc8
leaq -0x290(%rbp), %rdi
movq %rax, %rbx
callq 0x2dfa
jmp 0x2cc8
leaq -0x460(%rbp), %rdi
movq %rax, %rbx
callq 0x30a8
jmp 0x2cd4
movq %rax, %rbx
jmp 0x2cd4
leaq -0x620(%rbp), %rdi
movq %rax, %rbx
callq 0x30a8
jmp 0x2ce0
movq %rax, %rbx
jmp 0x2ce0
leaq -0x290(%rbp), %rdi
movq %rax, %rbx
callq 0x2050
leaq -0x460(%rbp), %rdi
callq 0x304c
leaq -0x620(%rbp), %rdi
callq 0x304c
leaq -0x68(%rbp), %rdi
callq 0x30a8
movq %rbx, %rdi
callq 0x21e0
nop