// File: /workspace/github_cpp_makefile_star2_O1/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 0x900e
movq 0x8(%rbx), %rsi
leaq 0xf8(%rsp), %rdi
movl $0x8, %edx
callq 0x2110
leaq 0x10(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x4dce
leaq 0xf8(%rsp), %rdi
callq 0x2050
leaq 0x10(%rsp), %rdi
callq 0x93aa
leaq 0x10(%rsp), %rdi
movsd 0x20f2(%rip), %xmm0     # 0xb0b8
callq 0x4738
leaq 0x10(%rsp), %rdi
callq 0x52da
leaq 0x10(%rsp), %rdi
callq 0x5f68
leaq 0x10(%rsp), %rdi
movl $0x45, %esi
callq 0x6322
leaq 0x10(%rsp), %rdi
callq 0x3e38
leaq 0x10(%rsp), %rdi
movl $0x53, %esi
callq 0x6322
movb $0x1, 0xf(%rsp)
jmp 0x906e
movq 0x5fbb(%rip), %rdi      # 0xefd0
leaq 0x29df(%rip), %rsi      # 0xb9fb
movl $0x24, %edx
callq 0x2220
movq 0x5fa3(%rip), %rdi      # 0xefd0
leaq 0x29ec(%rip), %rsi      # 0xba20
movl $0x2b, %edx
callq 0x2220
movq 0x5f8b(%rip), %rdi      # 0xefd0
leaq 0x2a00(%rip), %rsi      # 0xba4c
movl $0x26, %edx
callq 0x2220
movq 0x5f73(%rip), %rdi      # 0xefd0
leaq 0x2a0f(%rip), %rsi      # 0xba73
movl $0x21, %edx
callq 0x2220
leaq 0x10(%rsp), %rbx
leaq 0xf(%rsp), %r14
cmpb $0x0, 0xf(%rsp)
jne 0x908c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8857
jmp 0x9078
callq 0x7202
movq 0x6190(%rip), %rdi      # 0xf228
callq 0x2300
movl $0x186a0, %edi          # imm = 0x186A0
callq 0x22a0
movq 0x617a(%rip), %rdi      # 0xf228
movq 0x6253(%rip), %rsi      # 0xf308
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2150
leaq 0xf(%rsp), %rbx
movb $0x0, (%rbx)
leaq 0x10(%rsp), %r14
cmpb $0x0, 0xf(%rsp)
jne 0x90df
movq %r14, %rdi
movq %rbx, %rsi
callq 0x811e
jmp 0x90cb
leaq 0xf8(%rsp), %rdi
callq 0x2070
leaq 0x10(%rsp), %rdi
callq 0x93fe
xorl %eax, %eax
addq $0x300, %rsp            # imm = 0x300
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
jmp 0x911d
jmp 0x910d
jmp 0x910d
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x2070
leaq 0x10(%rsp), %rdi
callq 0x93fe
movq %rbx, %rdi
callq 0x23b0
nop