// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x3651
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
leaq 0x1c07(%rip), %rsi      # 0x5253
callq 0x4510
jmp 0x3653
movl $0x1, %esi
movl %esi, %edi
callq 0x33a0
testb $0x1, %al
jne 0x3668
jmp 0x3771
movq -0x18(%rbp), %rdi
leaq -0x1d(%rbp), %rsi
callq 0x2280
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x20c0
testb $0x1, %al
jne 0x368b
jmp 0x3690
jmp 0x3771
movsbl -0x1d(%rbp), %eax
addl $-0x2b, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x32, %eax
ja 0x376a
movq -0x28(%rbp), %rax
leaq 0x1953(%rip), %rcx      # 0x5004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
leaq -0x1d(%rbp), %rsi
callq 0x4510
jmp 0x376c
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
leaq -0x1d(%rbp), %rsi
callq 0x4510
jmp 0x376c
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
leaq -0x1d(%rbp), %rsi
callq 0x4510
jmp 0x376c
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
leaq -0x1d(%rbp), %rsi
callq 0x4510
jmp 0x376c
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
leaq -0x1d(%rbp), %rsi
callq 0x4510
jmp 0x376c
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
leaq -0x1d(%rbp), %rsi
callq 0x4510
jmp 0x376c
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
leaq -0x1d(%rbp), %rsi
callq 0x4510
jmp 0x376c
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
leaq -0x1d(%rbp), %rsi
callq 0x4510
jmp 0x376c
jmp 0x376c
jmp 0x3653
cmpl $0x0, -0x1c(%rbp)
jne 0x378b
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
leaq 0x1acd(%rip), %rsi      # 0x5253
callq 0x4510
movl -0x1c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop