Quickly divide in Manufactoria Background

Manufactoria has been marketed as a game, but we code-golfers can see it for what it really is: a two-dimensional programming language.  The Manufactoria programming language is based around a single queue, which contains a series of colorful markers.  The instruction pointer moves around the game board using conveyor belts, and it encounters a series of writers and branches which read from and write to the queue.

The language is very easy to understand, so the quickest way to learn it is to play the first few levels of the game (linked above).

Challenge

Your challenge is to create a program that can divide one number by another number in the least amount of time.  

The input to the program will be a string of X blue markers followed by Y red markers.  The required output will be a string of red markers with a length of X/Y.

The game board to be used is found in this official contest level:

http://pleasingfungus.com/Manufactoria/?ctm=Divide_and_Conquer;Input_will_be_X_blues_followed_by_Y_reds,_output_X/Y_reds;bbbbbbrr:rrr|bbbrrr:r|bbbbr:rrrr|r:|bbbbbbbbbbbbrrrr:rrr|bbbbbbbbbbbbrrr:rrrr|bbbbbbbbbrrr:rrr|bbbbbbbbbbrr:rrrrr;13;3;0

It is 13x13 (the maximum size) and it is pre-equipped with the correct tests (see the scoring section).

Scoring

The score of your program is the total amount of time that it takes for the program to pass all of the tests in the official contest level.  The total time is given on the level-complete screen.  

While running the tests, you will most likely have to use the 50x accelerate slider in the bottom left in order to receive the results quickly (time acceleration does not affect the score).

Here is a list of division problems that are involved in the tests:

 6/2 = 3
 3/3 = 1
 4/1 = 4
 0/1 = 0
12/4 = 3
12/3 = 4
 9/3 = 3
10/2 = 5


Example I/O

12/3=4
in:  BBBBBBBBBBBBRRR
out: RRRR

10/2=5
in:  BBBBBBBBBBRR
out: RRRRR

9/3=3
in:  BBBBBBBBBRRR
out: RRR

0/1=0
in:  R
out:
Score 3:29

Might as well special case dividing by 1,2,3,4.  Makes it a lot faster.



http://pleasingfungus.com/Manufactoria/?lvl=34&amp;code=c9:13f2;c10:13f2;c11:13f2;p12:2f7;y13:2f0;p11:2f0;c11:4f3;c10:3f0;p11:5f0;c10:5f0;c9:5f0;c11:6f3;p11:7f0;c10:7f0;p11:3f0;r10:6f1;q8:5f4;q8:6f1;q9:6f1;c7:5f3;c7:6f3;q10:2f0;r10:1f3;r10:4f1;q9:3f4;q9:4f1;c9:2f3;c8:3f3;c8:4f3;r10:8f1;q10:9f6;q9:9f1;q9:8f4;q9:7f4;c8:8f3;c8:9f3;c8:10f3;c8:11f3;c8:12f3;c8:13f2;c7:7f2;c8:7f3;r11:9f3;r11:10f0;r10:10f0;r9:10f3;r9:11f2;p11:11f6;r11:12f1;g11:8f3;b10:11f2;c16:10f2;q17:10f6;q17:11f3;g18:11f0;c12:11f1;c12:10f2;c13:10f2;c14:10f2;c15:10f2;c17:12f0;p16:12f4;c16:11f3;c16:13f1;q15:12f0;r15:13f1;c14:12f3;c14:13f0;c13:13f0;q17:7f6;q17:9f1;q18:9f6;q18:8f5;q17:6f1;g16:6f2;y18:6f0;p17:5f5;r18:5f0;c16:5f0;p15:5f0;r15:6f3;b15:7f2;p16:7f6;r16:8f1;q14:5f0;y14:4f3;g14:6f1;p13:5f0;p13:6f0;p13:7f0;p13:8f0;p13:9f1;g12:9f0;c17:8f1;&amp;ctm=Divide_and_Conquer;Input_will_be_X_blues_followed_by_Y_reds,_output_X/Y_reds;bbbbbbrr:rrr|bbbrrr:r|bbbbr:rrrr|r:|bbbbbbbbbbbbrrrr:rrr|bbbbbbbbbbbbrrr:rrrr|bbbbbbbbbrrr:rrr|bbbbbbbbbbrr:rrrrr;13;3;0;