// File: /workspace/github_cpp_makefile_star2_O2/dannycalegari[P]circle_pack/./Layout_routine.cc
// Function: Packing::determine_centers()
void Packing::determine_centers(){			// figure out centers of vertices
	Point P;
	int i,j,k,l;
	double d;
	initialize_centers();
	if(verbose){
		cout << "determining centers.\n";
		if(geometry=='H'){
			cout << "hyperbolic geometry.\n";
		};
	};
	i=lay[0][0];	// special case
	j=lay[1][0];	// special case
	P.x=0.0;
	P.y=0.0;
	P.z=1.0;
	// P=ORIGIN;
	center[i]=P;
//	cout << "center " << 0 << " index " << i << " laid out at " << P.x << " " << P.y << " " << P.z << "\n";
	d=rad[i]+rad[j];
	P=HTR(d)(P);
	center[j]=P;
//	cout << "center " << 1 << " index " << j << " laid out at " << P.x << " " << P.y << " " << P.z << "\n";
	for(l=2;l<(int) lay.size();l++){
		i=lay[l][0];
		k=lay[l][1];
		j=lay[l][2];
		P=layout_point(rad[i], center[j], rad[j], center[k], rad[k], geometry);
		center[i]=P;
//		cout << "center " << l << " index " << i << " laid out on " << j << " and " << k << " at " << P.x << " " << P.y << " " << P.z << "\n";
	};
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
callq 0x4d1c
cmpb $0x1, 0xb8(%rbx)
jne 0x4de6
movq 0x820f(%rip), %rdi      # 0xcfd0
leaq 0x45e0(%rip), %rsi      # 0x93a8
callq 0x21e0
cmpb $0x48, 0x60(%rbx)
jne 0x4de6
movq 0x81f6(%rip), %rdi      # 0xcfd0
leaq 0x4433(%rip), %rsi      # 0x9214
callq 0x21e0
movq 0x68(%rbx), %rax
movq 0xa0(%rbx), %rcx
movq (%rax), %rdx
movq 0x18(%rax), %rax
movslq (%rdx), %rdx
movslq (%rax), %r12
imulq $0x18, %rdx, %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rcx,%rax)
movabsq $0x3ff0000000000000, %r14 # imm = 0x3FF0000000000000
movq %r14, 0x10(%rcx,%rax)
movq 0x18(%rbx), %rax
movsd (%rax,%rdx,8), %xmm0
addsd (%rax,%r12,8), %xmm0
leaq 0x90(%rsp), %r15
movq %r15, %rdi
callq 0x2c7d
xorpd %xmm0, %xmm0
movapd %xmm0, 0x40(%rsp)
movq %r14, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x70(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x7600
movsd 0x10(%r14), %xmm0
movsd %xmm0, 0x38(%rsp)
movaps (%r14), %xmm0
movaps %xmm0, 0x60(%rsp)
movq %r15, %rdi
callq 0x78f0
movq 0xa0(%rbx), %rcx
imulq $0x18, %r12, %rax
movaps 0x60(%rsp), %xmm0
movups %xmm0, (%rcx,%rax)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x10(%rcx,%rax)
pushq $0x2
popq %r15
pushq $0x30
popq %r12
pushq $0x18
popq %r13
movq 0x68(%rbx), %rsi
movq 0x70(%rbx), %rax
subq %rsi, %rax
cqto
idivq %r13
cltq
cmpq %rax, %r15
jge 0x4f57
movq (%rsi,%r12), %rax
movslq (%rax), %rbp
movslq 0x4(%rax), %rdx
movslq 0x8(%rax), %rax
movq 0x18(%rbx), %rsi
movsd (%rsi,%rbp,8), %xmm0
imulq $0x18, %rax, %rdi
movsd (%rsi,%rax,8), %xmm1
imulq $0x18, %rdx, %rax
movsd (%rsi,%rdx,8), %xmm2
movsbl 0x60(%rbx), %esi
movq 0x10(%rcx,%rax), %rdx
movq %rdx, 0x28(%rsp)
movups (%rcx,%rax), %xmm3
movups %xmm3, 0x18(%rsp)
movq 0x10(%rcx,%rdi), %rax
movq %rax, 0x10(%rsp)
movups (%rcx,%rdi), %xmm3
movups %xmm3, (%rsp)
movq %r14, %rdi
callq 0x4971
movsd 0x80(%rsp), %xmm0
movaps 0x70(%rsp), %xmm1
movq 0xa0(%rbx), %rcx
imulq $0x18, %rbp, %rax
movups %xmm1, (%rcx,%rax)
movsd %xmm0, 0x10(%rcx,%rax)
incq %r15
addq $0x18, %r12
jmp 0x4eb2
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop