Campfire

Campfire: an esoteric programming language which is just a heap of branches - and you'll want to set them on fire.

Introduction
We all know that the standard flow of execution is so dull and boring, that's why every code anyone writes after "Hello world" has at least a conditional branch or a loop in it. With this in mind, I present you the most interesting language ever produced! In campfire every instruction doubles up as a (possibly conditional) branch, and since instructions are composed by a single byte this gives us an incredible 100% score on the branches per byte executed category!

Base concepts
The instruction pointer starts from the first byte moving forward, but after every instruction:
 * If the instruction just executed occurs only once in the code, terminate.
 * If the top of the main stack is not 0, invert the direction
 * Jump to just after the next occurrence of the just executed instruction

The code is considered to be cyclic (the first and last characters are next to each other). Whats the next occurrence of an instruction and what's the instruction after that depend on the current direction.

The memory is composed by two stacks (main and auxiliary) which can contain an unlimited amount of arbitrary integers: most commands operate on the main stack, but every time a value is popped from a stack it is automatically pushed on the other one. Every stack has an infinite amount of implicit 0s on the bottom.

Instructions
Lines starting with `#` are considered comments. Any newline is ignored.

Instruction pointer jumps on noops as it does on any other command. Even during string mode branches are performed after every character pushed.

Example of program flow
ab1dabc1ca 1 36 24 5 (First line is the code, second line the order of execution)

In this code, all letters are noops, while the  pushes a 1 on the stack. After executing the first, the top of stack is still 0 (an empty stack is considered as full of 0s), so the direction doesn't change and the next instruction to be executed is the one after the next. We reach, and then jump again in the same way (while wrapping from the end to the start of the code). The  then puts a 1 to the top of the stack, so now we need to switch direction and execute the instruction before the previous   (wrapping again). In the same way, we execute  and , changing direction every time (there's still a 1 on top of the stack). We finally execute  then, since it's the only   in the whole code, the program terminates.

Computational class
Campfire's computational class is still unknow, any help in its determination is well appreciated.

External resources
Official github repository