// File: /workspace/github_cpp_makefile_star2_O2/dannycalegari[P]circle_pack/circle_pack.cc
// Function: main
int main(int argc, char *argv[]){

	bool finished=false;
	Packing P;
	ifstream packing_input_file;
	
	if(argc>1){
		packing_input_file.open(argv[1]);
		P.read_packing(packing_input_file);
		packing_input_file.close();
		P.toggle_verbose();
		P.find_radii(0.000000001);
		P.determine_layout();
		P.determine_centers();
		P.change_geometry('E');
		P.rescale();
		P.change_geometry('S');
		finished=true;
	} else {
		cout << "Welcome to interactive circle_pack.\n";
		cout << "For a list of commands, type [h] for help.\n";
		cout << "To run circle_pack non-interactively,\n";
		cout << "Type circle_pack <filename.txt> \n";	
	};

	while(finished==false){
		input_routine(P,finished);
	};
	
	setup_graphics();
	XFlush(display);
	usleep(100000);
	XSetInputFocus(display, win, RevertToNone, CurrentTime);
	finished=false;
	while(finished==false){
		graphics_routine(P,finished);
	};
		
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x300, %rsp            # imm = 0x300
movq %rsi, %rbx
movl %edi, %ebp
movb $0x0, 0xf(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
andq $0x0, 0xc0(%rsp)
movups %xmm0, 0xd8(%rsp)
andq $0x0, 0xe8(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movups %xmm0, 0x78(%rsp)
movups %xmm0, 0x88(%rsp)
movups %xmm0, 0x98(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x2220
cmpl $0x2, %ebp
jl 0x7448
movq 0x8(%rbx), %rsi
leaq 0xf8(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x2110
leaq 0x10(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x4216
leaq 0xf8(%rsp), %rdi
callq 0x2050
leaq 0x10(%rsp), %rdi
callq 0x785c
leaq 0x10(%rsp), %rdi
movsd 0x1d2c(%rip), %xmm0     # 0x9130
callq 0x3cd4
leaq 0x10(%rsp), %rdi
callq 0x45c6
leaq 0x10(%rsp), %rdi
callq 0x4d98
leaq 0x10(%rsp), %rdi
pushq $0x45
popq %rsi
callq 0x5098
leaq 0x10(%rsp), %rdi
callq 0x3488
leaq 0x10(%rsp), %rdi
pushq $0x53
popq %rsi
callq 0x5098
movb $0x1, 0xf(%rsp)
jmp 0x7494
movq 0x5b81(%rip), %rdi      # 0xcfd0
leaq 0x25cd(%rip), %rsi      # 0x9a23
callq 0x21e0
movq 0x5b6e(%rip), %rdi      # 0xcfd0
leaq 0x25df(%rip), %rsi      # 0x9a48
callq 0x21e0
movq 0x5b5b(%rip), %rdi      # 0xcfd0
leaq 0x25f8(%rip), %rsi      # 0x9a74
callq 0x21e0
movq 0x5b48(%rip), %rdi      # 0xcfd0
leaq 0x260c(%rip), %rsi      # 0x9a9b
callq 0x21e0
leaq 0x10(%rsp), %rbx
leaq 0xf(%rsp), %r14
cmpb $0x0, 0xf(%rsp)
jne 0x74b2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6e0a
jmp 0x749e
callq 0x5c50
movq 0x5d72(%rip), %rdi      # 0xd230
callq 0x2310
movl $0x186a0, %edi          # imm = 0x186A0
callq 0x22b0
movq 0x5d5c(%rip), %rdi      # 0xd230
movq 0x5e35(%rip), %rsi      # 0xd310
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2150
leaq 0xf(%rsp), %rbx
movb $0x0, (%rbx)
xorl %eax, %eax
leaq 0x10(%rsp), %r14
testb %al, %al
jne 0x7508
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6808
movb 0xf(%rsp), %al
jmp 0x74f3
leaq 0xf8(%rsp), %rdi
callq 0x2070
leaq 0x10(%rsp), %rdi
callq 0x789a
xorl %eax, %eax
addq $0x300, %rsp            # imm = 0x300
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
jmp 0x7546
jmp 0x7536
jmp 0x7536
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x2070
leaq 0x10(%rsp), %rdi
callq 0x789a
movq %rbx, %rdi
callq 0x23c0