// File: /workspace/github_cpp_makefile_star2_O3/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)
xorl %eax, %eax
movq %rax, 0xc0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movups %xmm0, 0xd8(%rsp)
movq %rax, 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 0x2210
cmpl $0x2, %ebp
jl 0x8ca9
movq 0x8(%rbx), %rsi
leaq 0xf8(%rsp), %rdi
movl $0x8, %edx
callq 0x2110
leaq 0x10(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x4cd8
leaq 0xf8(%rsp), %rdi
callq 0x2050
leaq 0x10(%rsp), %rdi
callq 0x901a
leaq 0x10(%rsp), %rdi
movsd 0x14bf(%rip), %xmm0     # 0xa120
callq 0x4642
leaq 0x10(%rsp), %rdi
callq 0x51be
leaq 0x10(%rsp), %rdi
callq 0x5e2c
leaq 0x10(%rsp), %rdi
movl $0x45, %esi
callq 0x61e6
leaq 0x10(%rsp), %rdi
callq 0x3d30
leaq 0x10(%rsp), %rdi
movl $0x53, %esi
callq 0x61e6
movb $0x1, 0xf(%rsp)
jmp 0x8d09
movq 0x5320(%rip), %rdi      # 0xdfd0
leaq 0x1d5c(%rip), %rsi      # 0xaa13
movl $0x24, %edx
callq 0x2220
movq 0x5308(%rip), %rdi      # 0xdfd0
leaq 0x1d69(%rip), %rsi      # 0xaa38
movl $0x2b, %edx
callq 0x2220
movq 0x52f0(%rip), %rdi      # 0xdfd0
leaq 0x1d7d(%rip), %rsi      # 0xaa64
movl $0x26, %edx
callq 0x2220
movq 0x52d8(%rip), %rdi      # 0xdfd0
leaq 0x1d8c(%rip), %rsi      # 0xaa8b
movl $0x21, %edx
callq 0x2220
leaq 0x10(%rsp), %rbx
leaq 0xf(%rsp), %r14
cmpb $0x0, 0xf(%rsp)
jne 0x8d27
movq %rbx, %rdi
movq %r14, %rsi
callq 0x84fe
jmp 0x8d13
callq 0x6f40
movq 0x54f5(%rip), %rdi      # 0xe228
callq 0x2300
movl $0x186a0, %edi          # imm = 0x186A0
callq 0x22a0
movq 0x54df(%rip), %rdi      # 0xe228
movq 0x55b8(%rip), %rsi      # 0xe308
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2150
leaq 0xf(%rsp), %rbx
movb $0x0, (%rbx)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7dce
cmpb $0x0, 0xf(%rsp)
je 0x8d66
leaq 0xf8(%rsp), %rdi
callq 0x2070
leaq 0x10(%rsp), %rdi
callq 0x906e
xorl %eax, %eax
addq $0x300, %rsp            # imm = 0x300
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
jmp 0x8db6
jmp 0x8da6
jmp 0x8da6
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x2070
leaq 0x10(%rsp), %rdi
callq 0x906e
movq %rbx, %rdi
callq 0x23b0