// File: /workspace/github_cpp_makefile_star2_O3/josh0xA[P]bf/src/bf.cc
// Function: bf::Stream<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::istream, char>::entry_point_stream(bf::Environment&, std::istream&, int)
bfint_t Stream<BFBytes, BFStream, BFType>::entry_point_stream(Environment& env, BFStream& bfstream, bfint_t bracks) {
    bf_word stream_word;
    if (bracks == BF_SUCCESS_CODE_STANDARD) { env.program_instruction.push_back(bf::nullchar); }
    while (bf::bfuck_should_succeed<bool> (true, true)) {
      bfstream >> stream_word;
      if (!bfstream) {
        break;
      }
      switch (stream_word) {
        case BF_CELL_SHIFT_BACK: env.program_instruction.push_back(stream_word); break;
        case BF_CELL_SHIFT_FRONT: env.program_instruction.push_back(stream_word); break;
        case BF_INCREMENT_VALUE: env.program_instruction.push_back(stream_word); break;
        case BF_DECREMENT_VALUE: env.program_instruction.push_back(stream_word); break;
        case BF_READ_STDIN_BUFFER: env.program_instruction.push_back(stream_word); break;
        case BF_SHOW_STDOUT_BUFFER: env.program_instruction.push_back(stream_word); break;
        case BF_LOOP_BEGIN:
          bracks++;
          env.program_instruction.push_back(stream_word);
          break;
        case BF_LOOP_END:
          bracks--;
          env.program_instruction.push_back(stream_word);
          break;
        default: break;

      }

    }
    if (bracks == BF_SUCCESS_CODE_STANDARD) { env.program_instruction.push_back(bf::nullchar); }
    return bracks;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r14
testl %ecx, %ecx
jne 0x2ef2
movq 0x20(%r14), %rsi
cmpq 0x28(%r14), %rsi
je 0x2ee2
movb $0x0, (%rsi)
incq 0x20(%r14)
jmp 0x2ef2
leaq 0x18(%r14), %rdi
leaq 0x1127(%rip), %rdx      # 0x4014
callq 0x31b2
leaq -0x29(%rbp), %rsi
movq %r15, %rdi
callq 0x2170
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r15,%rax)
jne 0x3010
leaq 0x18(%r14), %rax
leaq 0x1124(%rip), %r12      # 0x4040
leaq -0x29(%rbp), %r13
movq %rax, -0x38(%rbp)
movzbl -0x29(%rbp), %eax
cmpl $0x3b, %eax
jg 0x2f58
addl $-0x2b, %eax
cmpl $0x3, %eax
ja 0x2ff2
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movq 0x20(%r14), %rsi
cmpq 0x28(%r14), %rsi
je 0x2fe6
movb $0x2b, (%rsi)
jmp 0x2fe0
cmpl $0x5a, %eax
jg 0x2f7a
cmpl $0x3c, %eax
je 0x2f95
cmpl $0x3e, %eax
jne 0x2ff2
movq 0x20(%r14), %rsi
cmpq 0x28(%r14), %rsi
je 0x2fe6
movb $0x3e, (%rsi)
jmp 0x2fe0
cmpl $0x5b, %eax
je 0x2fa4
cmpl $0x5d, %eax
jne 0x2ff2
movq 0x20(%r14), %rsi
decl %ebx
cmpq 0x28(%r14), %rsi
je 0x2fe6
movb $0x5d, (%rsi)
jmp 0x2fe0
movq 0x20(%r14), %rsi
cmpq 0x28(%r14), %rsi
je 0x2fe6
movb $0x3c, (%rsi)
jmp 0x2fe0
movq 0x20(%r14), %rsi
incl %ebx
cmpq 0x28(%r14), %rsi
je 0x2fe6
movb $0x5b, (%rsi)
jmp 0x2fe0
movq 0x20(%r14), %rsi
cmpq 0x28(%r14), %rsi
je 0x2fe6
movb $0x2d, (%rsi)
jmp 0x2fe0
movq 0x20(%r14), %rsi
cmpq 0x28(%r14), %rsi
je 0x2fe6
movb $0x2e, (%rsi)
jmp 0x2fe0
movq 0x20(%r14), %rsi
cmpq 0x28(%r14), %rsi
je 0x2fe6
movb $0x2c, (%rsi)
incq 0x20(%r14)
jmp 0x2ff2
movq -0x38(%rbp), %rdi
movq %r13, %rdx
callq 0x31b2
movq %r15, %rdi
movq %r13, %rsi
callq 0x2170
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r15,%rax)
je 0x2f24
testl %ebx, %ebx
jne 0x303a
movq 0x20(%r14), %rsi
cmpq 0x28(%r14), %rsi
je 0x3027
movb $0x0, (%rsi)
incq 0x20(%r14)
jmp 0x303a
addq $0x18, %r14
leaq 0xfe2(%rip), %rdx       # 0x4014
movq %r14, %rdi
callq 0x31b2
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop