// File: /workspace/github_cpp_makefile_star2_O1/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 0x844e
cmpl $0x45, %eax
jne 0x8660
leaq 0x30d2(%rip), %rsi      # 0xb3c6
movl $0x19, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x30d8(%rip), %rsi      # 0xb3e0
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x30e1(%rip), %rsi      # 0xb3fd
movl $0x27, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x30f5(%rip), %rsi      # 0xb425
movl $0x2d, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x310f(%rip), %rsi      # 0xb453
movl $0x36, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x3132(%rip), %rsi      # 0xb48a
movl $0x24, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x3143(%rip), %rsi      # 0xb4af
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 0x843d
xorl %ebp, %ebp
leaq 0x3305(%rip), %r15      # 0xb6a0
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 0x2ce2(%rip), %xmm0     # 0xb0e0
movq %r13, %rdi
callq 0x2330
movl $0x3, %edx
movq %rax, %rdi
leaq 0x30c4(%rip), %rsi      # 0xb4d9
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 0x839e
leaq 0x324b(%rip), %rsi      # 0xb68f
movl $0xf, %edx
jmp 0x864a
leaq 0x2f71(%rip), %rsi      # 0xb3c6
movl $0x19, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x2f77(%rip), %rsi      # 0xb3e0
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x3060(%rip), %rsi      # 0xb4dd
movl $0x40, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x308d(%rip), %rsi      # 0xb51e
movl $0x40, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x30ba(%rip), %rsi      # 0xb55f
movl $0x22, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x30c9(%rip), %rsi      # 0xb582
movl $0x22, %edx
movq %rbx, %rdi
callq 0x2220
movsd 0x2b5a(%rip), %xmm0     # 0xb028
movq %rbx, %rdi
callq 0x2330
leaq 0x30c8(%rip), %rsi      # 0xb5a5
movl $0xa, %edx
movq %rax, %rdi
callq 0x2220
leaq 0x30bf(%rip), %rsi      # 0xb5b0
movl $0x13, %edx
movq %rbx, %rdi
callq 0x2220
movq %rbx, %rdi
movsd 0x2b1f(%rip), %xmm0     # 0xb028
callq 0x2330
movq %rax, %r15
leaq 0x30ac(%rip), %rsi      # 0xb5c4
movl $0x1d, %edx
movq %rax, %rdi
callq 0x2220
movq %r15, %rdi
movsd 0x2af8(%rip), %xmm0     # 0xb028
callq 0x2330
leaq 0x30a6(%rip), %rsi      # 0xb5e2
movl $0x6, %edx
movq %rax, %rdi
callq 0x2220
leaq 0x3099(%rip), %rsi      # 0xb5e9
movl $0x3f, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x30c5(%rip), %rsi      # 0xb629
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 0x863e
xorl %ebp, %ebp
leaq 0x310d(%rip), %r15      # 0xb6a0
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 0x2ec3(%rip), %rsi      # 0xb4d9
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 0x8596
leaq 0x302b(%rip), %rsi      # 0xb670
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