// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
callq 0x5eac
cmpb $0x1, 0xb8(%rbx)
jne 0x5fbc
movq 0x9043(%rip), %rdi      # 0xefd0
leaq 0x53ec(%rip), %rsi      # 0xb380
movl $0x15, %edx
callq 0x2220
cmpb $0x48, 0x60(%rbx)
jne 0x5fbc
movq 0x9025(%rip), %rdi      # 0xefd0
leaq 0x523a(%rip), %rsi      # 0xb1ec
movl $0x15, %edx
callq 0x2220
movq 0x68(%rbx), %rax
movq 0xa0(%rbx), %rcx
movq (%rax), %rdx
movq 0x18(%rax), %rax
movslq (%rdx), %rdx
movslq (%rax), %r15
leaq (%rdx,%rdx,2), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rcx,%rax,8)
movabsq $0x3ff0000000000000, %rsi # imm = 0x3FF0000000000000
movq %rsi, 0x10(%rcx,%rax,8)
movq 0x18(%rbx), %rax
movsd (%rax,%rdx,8), %xmm0
addsd (%rax,%r15,8), %xmm0
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x3152
movq (%r14), %rax
movq (%rax), %rcx
movq 0x18(%rax), %rdx
xorpd %xmm1, %xmm1
movsd 0x8(%rcx), %xmm0
mulsd %xmm1, %xmm0
movsd (%rcx), %xmm2
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
addsd 0x10(%rcx), %xmm2
movsd %xmm2, 0x40(%rsp)
movsd 0x8(%rdx), %xmm0
mulsd %xmm1, %xmm0
movsd (%rdx), %xmm2
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
addsd 0x10(%rdx), %xmm2
movsd %xmm2, 0x38(%rsp)
movq 0x30(%rax), %rax
movsd 0x8(%rax), %xmm0
mulsd %xmm1, %xmm0
mulsd (%rax), %xmm1
addsd %xmm0, %xmm1
addsd 0x10(%rax), %xmm1
movsd %xmm1, 0x30(%rsp)
movq %r14, %rdi
callq 0x9496
movq 0xa0(%rbx), %rax
leaq (%r15,%r15,2), %rcx
movsd 0x40(%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x8(%rax,%rcx,8)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x10(%rax,%rcx,8)
movq 0x68(%rbx), %rax
movq 0x70(%rbx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
cmpl $0x3, %ecx
jl 0x6190
movl $0x2, %r15d
movl $0x30, %r12d
leaq 0x48(%rsp), %r14
movq (%rax,%r12), %rax
movslq (%rax), %r13
movslq 0x4(%rax), %rcx
movslq 0x8(%rax), %rax
movq 0x18(%rbx), %rdx
movq 0xa0(%rbx), %rdi
movsd (%rdx,%r13,8), %xmm0
leaq (%rax,%rax,2), %r8
movsd (%rdx,%rax,8), %xmm1
leaq (%rcx,%rcx,2), %rax
movsd (%rdx,%rcx,8), %xmm2
movsbl 0x60(%rbx), %esi
movq 0x10(%rdi,%rax,8), %rcx
movq %rcx, 0x28(%rsp)
movups (%rdi,%rax,8), %xmm3
movups %xmm3, 0x18(%rsp)
movq 0x10(%rdi,%r8,8), %rax
movq %rax, 0x10(%rsp)
movups (%rdi,%r8,8), %xmm3
movups %xmm3, (%rsp)
movq %r14, %rdi
callq 0x58d1
movups 0x48(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movq 0xa0(%rbx), %rax
leaq (,%r13,2), %rcx
addq %r13, %rcx
movups %xmm0, (%rax,%rcx,8)
movsd %xmm1, 0x10(%rax,%rcx,8)
incq %r15
movq 0x68(%rbx), %rax
movq 0x70(%rbx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
movslq %ecx, %rcx
addq $0x18, %r12
cmpq %rcx, %r15
jl 0x60dd
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq