// File: /workspace/github_cpp_makefile_star2_O3/JohnCGriffin[P]BrainForked/bf_io.cpp
// Function: bf::read_instructions(std::istream&)
Instructions read_instructions(std::istream& is)
    {
	static std::map<char,int> direction = {{'>', 1}, {'<', -1}, {'+', 1}, {'-', -1}};
	static std::map<char,Action>
	    charActions = {{ '>', MOVE },
			   { '<', MOVE },
			   { '+', INCR },
			   { '-', INCR },
			   { '[', FALSEJUMP },
			   { ']', TRUEJUMP },
			   { '.', PRINT },
			   { ',', READ }};

	Instructions instructions;
	char c;

	while(is >> c){
	    switch(c){
	    case '<':
	    case '>':
	    case '+':
	    case '-':
		{
		    int increment = direction.at(c);
		    Action action = charActions.at(c);
		    if(instructions.empty() || instructions.back().action != action){
			instructions.push_back({ action });
		    }
		    instructions.back().val += increment;
		}
		break;
	    case '.':
	    case ',':
	    case '[':
	    case ']':
		instructions.push_back({ charActions.at(c) });
		break;
	    }
	}

	return instructions;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb 0x5852(%rip), %al       # 0x91e0
testb %al, %al
je 0x3af8
movb 0x587c(%rip), %al       # 0x9218
testb %al, %al
je 0x3b6c
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
leaq 0xe(%rsp), %r15
leaq 0x28b6(%rip), %rbp      # 0x6274
leaq 0x5823(%rip), %r13      # 0x91e8
movq %r14, %rdi
movq %r15, %rsi
callq 0x21f0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3ae6
movzbl 0xe(%rsp), %eax
cmpl $0x3b, %eax
jg 0x39fe
addl $-0x2b, %eax
cmpl $0x3, %eax
ja 0x39c5
movslq (%rbp,%rax,4), %rax
addq %rbp, %rax
jmpq *%rax
cmpl $0x5a, %eax
jg 0x3a6e
cmpl $0x3c, %eax
je 0x3a0d
cmpl $0x3e, %eax
jne 0x39c5
leaq 0x579c(%rip), %rdi      # 0x91b0
movq %r15, %rsi
callq 0x3d4a
movl (%rax), %r12d
movq %r13, %rdi
movq %r15, %rsi
callq 0x3d90
movl (%rax), %eax
movq 0x8(%rbx), %rsi
cmpq %rsi, (%rbx)
je 0x3a3e
cmpl %eax, -0x10(%rsi)
je 0x3adc
movl %eax, 0x10(%rsp)
movw $0x0, 0x14(%rsp)
movq $0x0, 0x18(%rsp)
cmpq 0x10(%rbx), %rsi
je 0x3acb
movups 0x10(%rsp), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rbx), %rsi
addq $0x10, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3adc
cmpl $0x5b, %eax
je 0x3a7c
cmpl $0x5d, %eax
jne 0x39c5
movq %r13, %rdi
movq %r15, %rsi
callq 0x3d90
movl (%rax), %eax
movl %eax, 0x10(%rsp)
movw $0x0, 0x14(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3ab9
movups 0x10(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rbx)
jmp 0x39c5
movq %rbx, %rdi
leaq 0x10(%rsp), %rdx
callq 0x3200
jmp 0x39c5
movq %rbx, %rdi
leaq 0x10(%rsp), %rdx
callq 0x3200
movq 0x8(%rbx), %rsi
addw %r12w, -0xc(%rsi)
jmp 0x39c5
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x56e1(%rip), %rdi      # 0x91e0
callq 0x22f0
testl %eax, %eax
je 0x3996
movups 0x27c1(%rip), %xmm0     # 0x62d4
leaq 0x10(%rsp), %rsi
movaps %xmm0, 0x10(%rsi)
movups 0x27a1(%rip), %xmm0     # 0x62c4
movaps %xmm0, (%rsi)
leaq 0x5683(%rip), %rdi      # 0x91b0
leaq 0xe(%rsp), %rcx
leaq 0xf(%rsp), %r8
movl $0x4, %edx
callq 0x3c3a
leaq 0x174(%rip), %rdi       # 0x3cbc
leaq 0x5661(%rip), %rsi      # 0x91b0
leaq 0x563a(%rip), %rdx      # 0x9190
callq 0x2170
leaq 0x567e(%rip), %rdi      # 0x91e0
callq 0x2110
jmp 0x3996
leaq 0x56a5(%rip), %rdi      # 0x9218
callq 0x22f0
testl %eax, %eax
je 0x39a4
movups 0x272d(%rip), %xmm0     # 0x62b4
leaq 0x10(%rsp), %rsi
movaps %xmm0, 0x30(%rsi)
movups 0x270d(%rip), %xmm0     # 0x62a4
movaps %xmm0, 0x20(%rsi)
movups 0x26f2(%rip), %xmm0     # 0x6294
movaps %xmm0, 0x10(%rsi)
movups 0x26d7(%rip), %xmm0     # 0x6284
movaps %xmm0, (%rsi)
leaq 0x5631(%rip), %rdi      # 0x91e8
leaq 0xe(%rsp), %rcx
leaq 0xf(%rsp), %r8
movl $0x8, %edx
callq 0x3cc2
leaq 0x172(%rip), %rdi       # 0x3d44
leaq 0x560f(%rip), %rsi      # 0x91e8
leaq 0x55b0(%rip), %rdx      # 0x9190
callq 0x2170
leaq 0x562c(%rip), %rdi      # 0x9218
callq 0x2110
jmp 0x39a4
movq %rax, %r14
leaq 0x5618(%rip), %rdi      # 0x9218
jmp 0x3c0c
movq %rax, %r14
leaq 0x55d4(%rip), %rdi      # 0x91e0
callq 0x2100
jmp 0x3c32
jmp 0x3c1b
jmp 0x3c1b
jmp 0x3c1b
jmp 0x3c1b
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3c32
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22e0