// File: Wheatwizard[P]Waldo/main.cpp
// Function: main
int main(int argc, char** argv) {
	/*if (argc == 1) {
		std::cout << argv[0] << " takes 1 argument." << std::endl;
		std::cout << "Please pass the name of a file to read from." << std::endl;
	}*/
	 Reactor b(10, 10, 2);
	b.addWaldo("red", 0, 0);
	b.addWaldo("blue", 0, 0);
	b.addArrow(RIGHT, 0, 0, 0);
	b.addArrow(DOWN, 0, 9, 0);
	b.addArrow(LEFT, 9, 9, 0);
	b.addArrow(UP, 9, 0, 0);
	b.addInstruction(Instruction(BOND),0,1,0);
	b[1][1].setMat(BONDER);
	b[1][2].setMat(BONDER);
	Atom* one = new Atom(TRADITIONAL, 1);
	Atom* two = new Atom(TRADITIONAL, 1);	
	b[1][1].addAtom(one);
	b[1][2].addAtom(two);
	while (true) {
		b.advance(0);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x50(%rbp), %rdi
movl $0xa, %edx
movl $0x2, %ecx
movl %edx, %esi
callq 0x51b0
leaq -0x71(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x22a0
movq -0xc8(%rbp), %rdx
leaq 0x8b98(%rip), %rsi      # 0xb004
leaq -0x70(%rbp), %rdi
callq 0x27b0
jmp 0x2477
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x6320
jmp 0x248a
leaq -0x70(%rbp), %rdi
callq 0x2100
leaq -0x71(%rbp), %rdi
callq 0x21d0
leaq -0xa9(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x22a0
movq -0xd0(%rbp), %rdx
leaq 0x8b4b(%rip), %rsi      # 0xb008
leaq -0xa8(%rbp), %rdi
callq 0x27b0
jmp 0x24cb
leaq -0x50(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x6320
jmp 0x24e1
leaq -0xa8(%rbp), %rdi
callq 0x2100
leaq -0xa9(%rbp), %rdi
callq 0x21d0
leaq -0x50(%rbp), %rdi
movl $0x1, %esi
xorl %r8d, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x6460
jmp 0x2512
leaq -0x50(%rbp), %rdi
movl $0x4, %esi
movl $0x9, %ecx
xorl %r8d, %r8d
movl %r8d, %edx
callq 0x6460
jmp 0x252d
leaq -0x50(%rbp), %rdi
movl $0x3, %esi
movl $0x9, %ecx
xorl %r8d, %r8d
movl %ecx, %edx
callq 0x6460
jmp 0x2547
leaq -0x50(%rbp), %rdi
movl $0x2, %esi
movl $0x9, %edx
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x6460
jmp 0x2562
leaq -0xb0(%rbp), %rdi
movl $0x1, %esi
callq 0x2860
jmp 0x2575
movl -0xb0(%rbp), %esi
leaq -0x50(%rbp), %rdi
movl $0x1, %ecx
xorl %r8d, %r8d
movl %r8d, %edx
callq 0x63a0
jmp 0x2591
leaq -0x50(%rbp), %rdi
movl $0x1, %esi
callq 0x2880
movq %rax, -0xd8(%rbp)
jmp 0x25a8
movq -0xd8(%rbp), %rdi
addq $0x28, %rdi
movl $0x1, %esi
callq 0x7720
jmp 0x25bf
leaq -0x50(%rbp), %rdi
movl $0x1, %esi
callq 0x2880
movq %rax, -0xe0(%rbp)
jmp 0x25d6
movq -0xe0(%rbp), %rdi
addq $0x50, %rdi
movl $0x1, %esi
callq 0x7720
jmp 0x25ed
movl $0x50, %edi
callq 0x21a0
movq %rax, -0xe8(%rbp)
jmp 0x2600
movq -0xe8(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x28f0
jmp 0x2615
movq -0xe8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl $0x50, %edi
callq 0x21a0
movq %rax, -0xf0(%rbp)
jmp 0x2636
movq -0xf0(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x28f0
jmp 0x264b
movq -0xf0(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq -0x50(%rbp), %rdi
movl $0x1, %esi
callq 0x2880
movq %rax, -0xf8(%rbp)
jmp 0x2670
movq -0xf8(%rbp), %rdi
addq $0x28, %rdi
movq -0xb8(%rbp), %rsi
callq 0x7100
jmp 0x2689
leaq -0x50(%rbp), %rdi
movl $0x1, %esi
callq 0x2880
movq %rax, -0x100(%rbp)
jmp 0x26a0
movq -0x100(%rbp), %rdi
addq $0x50, %rdi
movq -0xc0(%rbp), %rsi
callq 0x7100
jmp 0x26b9
jmp 0x26bb
jmp 0x26bd
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
callq 0x5ed0
jmp 0x26ca
jmp 0x26bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x26f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x2100
leaq -0x71(%rbp), %rdi
callq 0x21d0
jmp 0x2790
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x272f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x2100
leaq -0xa9(%rbp), %rdi
callq 0x21d0
jmp 0x2790
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2790
movq -0xe8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
movl $0x50, %esi
callq 0x21b0
jmp 0x2790
movq -0xf0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
movl $0x50, %esi
callq 0x21b0
leaq -0x50(%rbp), %rdi
callq 0x54f0
movq -0x80(%rbp), %rdi
callq 0x2290
nopw %cs:(%rax,%rax)
nopl (%rax)