// File: /workspace/github_cpp_makefile_star2_O3/dannycalegari[P]circle_pack/./output.cc
// Function: Packing::write_packing_eps(std::basic_ofstream<char, std::char_traits<char>>&)
void Packing::write_packing_eps(ofstream &outfile){
	int i;
	if(geometry=='E'){
		outfile << "%!PS-Adobe-2.0 EPSF-2.0 \n";
		outfile << "%%BoundingBox: 0 0 500 500 \n";
		outfile << "gsave 100 100 scale 2.5 2.5 translate \n";
		outfile << "/min { 2 copy gt { exch } if pop } bind def \n";
		outfile << "/c {3 dict begin /r exch def /y exch def /x exch def \n";
		outfile << "1 50 div r 10 div min setlinewidth \n";
		outfile << "newpath x y r 0 360 arc stroke end} def \n";
		for(i=0;i< size();i++){
			outfile << center[i].x << " " << center[i].y << " " << fabs(rad[i]) << " c\n";
		};
		outfile << "grestore %eof \n";
	} else if(geometry=='S'){
		outfile << "%!PS-Adobe-2.0 EPSF-2.0 \n";
		outfile << "%%BoundingBox: 0 0 500 500 \n";
		outfile << "gsave 200 200 scale 1.25 1.25 translate 1 200 div setlinewidth \n";
		outfile << "/arccos { 2 dict begin /base exch def /opp 1 base base mul sub \n";
		outfile << "sqrt def opp base atan end } def \n";
		outfile << "/c { 3 dict begin /R exch 360 mul " << TWOPI <<" div def \n";
		outfile << "/beta exch 360 mul " << TWOPI <<" div def /gamma exch 360 mul " << TWOPI <<" div \n";
		outfile << "def gsave beta rotate 0 gamma sin R cos mul translate 1 gamma \n";
		outfile << "cos scale newpath 0 0 R sin 0 360 arc stroke fill grestore end } def \n";
		for(i=0;i< size();i++){
			outfile << acos(center[i].z) << " " << atan2(center[i].x,center[i].y) 
				<< " " << rad[i] << " c\n";
		};
		outfile << "newpath 0 0 1 0 360 arc stroke grestore %eof \n";
	};
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzbl 0x60(%rdi), %eax
cmpl $0x53, %eax
je 0x80fe
cmpl $0x45, %eax
jne 0x8310
leaq 0x243a(%rip), %rsi      # 0xa3de
movl $0x19, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x2440(%rip), %rsi      # 0xa3f8
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x2449(%rip), %rsi      # 0xa415
movl $0x27, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x245d(%rip), %rsi      # 0xa43d
movl $0x2d, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x2477(%rip), %rsi      # 0xa46b
movl $0x36, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x249a(%rip), %rsi      # 0xa4a2
movl $0x24, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x24ab(%rip), %rsi      # 0xa4c7
movl $0x29, %edx
movq %rbx, %rdi
callq 0x2220
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
testl %eax, %eax
jle 0x80ed
xorl %ebp, %ebp
leaq 0x266d(%rip), %r15      # 0xa6b8
xorl %r12d, %r12d
movq 0xa0(%r14), %rax
movsd (%rax,%rbp), %xmm0
movq %rbx, %rdi
callq 0x2330
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2220
movq 0xa0(%r14), %rax
movsd 0x8(%rax,%rbp), %xmm0
movq %r13, %rdi
callq 0x2330
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2220
movq 0x18(%r14), %rax
movsd (%rax,%r12,8), %xmm0
andps 0x1fa2(%rip), %xmm0     # 0xa050
movq %r13, %rdi
callq 0x2330
movl $0x3, %edx
movq %rax, %rdi
leaq 0x242c(%rip), %rsi      # 0xa4f1
callq 0x2220
incq %r12
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
cltq
addq $0x18, %rbp
cmpq %rax, %r12
jl 0x804e
leaq 0x25b3(%rip), %rsi      # 0xa6a7
movl $0xf, %edx
jmp 0x82fa
leaq 0x22d9(%rip), %rsi      # 0xa3de
movl $0x19, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x22df(%rip), %rsi      # 0xa3f8
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x23c8(%rip), %rsi      # 0xa4f5
movl $0x40, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x23f5(%rip), %rsi      # 0xa536
movl $0x40, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x2422(%rip), %rsi      # 0xa577
movl $0x22, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x2431(%rip), %rsi      # 0xa59a
movl $0x22, %edx
movq %rbx, %rdi
callq 0x2220
movsd 0x1f22(%rip), %xmm0     # 0xa0a0
movq %rbx, %rdi
callq 0x2330
leaq 0x2430(%rip), %rsi      # 0xa5bd
movl $0xa, %edx
movq %rax, %rdi
callq 0x2220
leaq 0x2427(%rip), %rsi      # 0xa5c8
movl $0x13, %edx
movq %rbx, %rdi
callq 0x2220
movq %rbx, %rdi
movsd 0x1ee7(%rip), %xmm0     # 0xa0a0
callq 0x2330
movq %rax, %r15
leaq 0x2414(%rip), %rsi      # 0xa5dc
movl $0x1d, %edx
movq %rax, %rdi
callq 0x2220
movq %r15, %rdi
movsd 0x1ec0(%rip), %xmm0     # 0xa0a0
callq 0x2330
leaq 0x240e(%rip), %rsi      # 0xa5fa
movl $0x6, %edx
movq %rax, %rdi
callq 0x2220
leaq 0x2401(%rip), %rsi      # 0xa601
movl $0x3f, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x242d(%rip), %rsi      # 0xa641
movl $0x46, %edx
movq %rbx, %rdi
callq 0x2220
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
testl %eax, %eax
jle 0x82ee
xorl %ebp, %ebp
leaq 0x2475(%rip), %r15      # 0xa6b8
xorl %r12d, %r12d
movq 0xa0(%r14), %rax
movsd 0x10(%rax,%rbp), %xmm0
callq 0x21c0
movq %rbx, %rdi
callq 0x2330
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2220
movq 0xa0(%r14), %rax
movsd (%rax,%rbp), %xmm0
movsd 0x8(%rax,%rbp), %xmm1
callq 0x2040
movq %r13, %rdi
callq 0x2330
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2220
movq 0x18(%r14), %rax
movsd (%rax,%r12,8), %xmm0
movq %r13, %rdi
callq 0x2330
movl $0x3, %edx
movq %rax, %rdi
leaq 0x222b(%rip), %rsi      # 0xa4f1
callq 0x2220
incq %r12
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
cltq
addq $0x18, %rbp
cmpq %rax, %r12
jl 0x8246
leaq 0x2393(%rip), %rsi      # 0xa688
movl $0x2e, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop