// File: /workspace/github_cpp_makefile_star2_O3/dannycalegari[P]circle_pack/./Packing.cc
// Function: Packing::read_packing(std::basic_ifstream<char, std::char_traits<char>>&)
void Packing::read_packing(ifstream &packing_file){	// read packing from a file
	/* should give the option of reading radii, geometry, INFV and ZERV; these are commented out */
	int vertices, valence, i, j, k;
	vector<int> L;	// adjacency_list
//	double d;
//	char c;
//	int I;
	adj.clear();				// initialize, in case we already have a packing
	packing_file >> vertices;	// reading adj
	for(i=0;i<vertices;i++){
		packing_file >> valence;
		for(j=0;j<valence;j++){
			packing_file >> k;
			L.push_back(k);
		};
		adj.push_back(L);
		L.clear();
	};
	
	/* for the moment, just sets radii all to 0.1 and sets geometry to 'H', INFV to 0 and ZERV to -1 */
//	if(packing_file.eof()){	// didn't bother to set radii
		for(i=0;i<vertices;i++){ 
			rad.push_back(0.01);	// setting all initial radii to 0.01; default value
		};
//	} else {
	//	for(i=0;i<vertices;i++){
	//		packing_file >> d;	// reading radii; 
	//	};
//	};

//	if(packing_file.eof()){	// default values - old format
		geometry='H';		
		INFV=0;
		ZERV=-1;
//	} else {
//		packing_file >> c;	// reading geometry
//		geometry=c;
//		packing_file >> I;	// reading INFV
//		INFV=I;
//		packing_file >> I;	// reading ZERV
//		ZERV=I;
//	};
	verbose=true;			//	default values
	VIEWMATRIX=ROT(0.0);	//	default values
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq (%rdi), %rsi
callq 0x99f0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x20f0
cmpl $0x0, 0x8(%rsp)
jle 0x4ded
xorl %ebp, %ebp
leaq 0x2c(%rsp), %r12
leaq 0x10(%rsp), %r13
movq %r14, %rdi
leaq 0xc(%rsp), %rsi
callq 0x20f0
cmpl $0x0, 0xc(%rsp)
jle 0x4d7d
xorl %r15d, %r15d
movq %r14, %rdi
movq %r12, %rsi
callq 0x20f0
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x4d68
movl 0x2c(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x4d73
movq %r13, %rdi
movq %r12, %rdx
callq 0x98b4
incl %r15d
cmpl 0xc(%rsp), %r15d
jl 0x4d40
movq %rbx, %rdi
movq %r13, %rsi
callq 0x8df4
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x4d99
movq %rax, 0x18(%rsp)
incl %ebp
movl 0x8(%rsp), %eax
cmpl %eax, %ebp
jl 0x4d29
testl %eax, %eax
jle 0x4ded
leaq 0x18(%rbx), %r14
xorl %ebp, %ebp
movabsq $0x3f847ae147ae147b, %r12 # imm = 0x3F847AE147AE147B
leaq 0x30(%rsp), %r15
movq %r12, 0x30(%rsp)
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x4dd8
movq %r12, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x20(%rbx)
jmp 0x4de7
movq %r14, %rdi
movq %r15, %rdx
callq 0x94a6
movl 0x8(%rsp), %eax
incl %ebp
cmpl %eax, %ebp
jl 0x4dbc
movb $0x48, 0x60(%rbx)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0xbc(%rbx)
movb $0x1, 0xb8(%rbx)
leaq 0x50(%rsp), %rdi
xorps %xmm0, %xmm0
callq 0x2859
movq 0xd8(%rbx), %rax
leaq 0x50(%rsp), %r14
movaps (%r14), %xmm0
movq 0x10(%r14), %rcx
movq %rcx, 0xd8(%rbx)
movups 0xc8(%rbx), %xmm1
movups %xmm0, 0xc8(%rbx)
leaq 0x30(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
callq 0x9106
movq %r14, %rdi
callq 0x9106
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4e7e
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e95
jmp 0x4e95
jmp 0x4e95
jmp 0x4e95
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4eaf
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x23b0
nop