// File: Luthaf[P]zeopp/voro++/src/cell.cc
// Function: voro::voronoicell_base::output_custom(char const*, int, double, double, double, double, _IO_FILE*)
void voronoicell_base::output_custom(const char *format,int i,double x,double y,double z,double r,FILE *fp) {
	char *fmp=(const_cast<char*>(format));
	std::vector<int> vi;
	std::vector<double> vd;
	while(*fmp!=0) {
		if(*fmp=='%') {
			fmp++;
			switch(*fmp) {

				// Particle-related output
				case 'i': fprintf(fp,"%d",i);break;
				case 'x': fprintf(fp,"%g",x);break;
				case 'y': fprintf(fp,"%g",y);break;
				case 'z': fprintf(fp,"%g",z);break;
				case 'q': fprintf(fp,"%g %g %g",x,y,z);break;
				case 'r': fprintf(fp,"%g",r);break;

				// Vertex-related output
				case 'w': fprintf(fp,"%d",p);break;
				case 'p': output_vertices(fp);break;
				case 'P': output_vertices(x,y,z,fp);break;
				case 'o': output_vertex_orders(fp);break;
				case 'm': fprintf(fp,"%g",0.25*max_radius_squared());break;

				// Edge-related output
				case 'g': fprintf(fp,"%d",number_of_edges());break;
				case 'E': fprintf(fp,"%g",total_edge_distance());break;
				case 'e': face_perimeters(vd);voro_print_vector(vd,fp);break;

				// Face-related output
				case 's': fprintf(fp,"%d",number_of_faces());break;
				case 'F': fprintf(fp,"%g",surface_area());break;
				case 'A': {
						  face_freq_table(vi);
						  voro_print_vector(vi,fp);
					  } break;
				case 'a': face_orders(vi);voro_print_vector(vi,fp);break;
				case 'f': face_areas(vd);voro_print_vector(vd,fp);break;
				case 't': {
						  face_vertices(vi);
						  voro_print_face_vertices(vi,fp);
					  } break;
				case 'l': normals(vd);
					  voro_print_positions(vd,fp);
					  break;
				case 'n': neighbors(vi);
					  voro_print_vector(vi,fp);
					  break;

				// Volume-related output
				case 'v': fprintf(fp,"%g",volume());break;
				case 'c': {
						  double cx,cy,cz;
						  centroid(cx,cy,cz);
						  fprintf(fp,"%g %g %g",cx,cy,cz);
					  } break;
				case 'C': {
						  double cx,cy,cz;
						  centroid(cx,cy,cz);
						  fprintf(fp,"%g %g %g",x+cx,y+cy,z+cz);
					  } break;

				// End-of-string reached
				case 0: fmp--;break;

				// The percent sign is not part of a
				// control sequence
				default: putc('%',fp);putc(*fmp,fp);
			}
		} else putc(*fmp,fp);
		fmp++;
	}
	fputs("\n",fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
movsd %xmm1, -0x28(%rbp)
movsd %xmm2, -0x30(%rbp)
movsd %xmm3, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x17230
leaq -0x78(%rbp), %rdi
callq 0x17250
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xdd82
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x25, %eax
jne 0xdd5d
movq -0x48(%rbp), %rax
incq %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
movl %eax, %ecx
movq %rcx, -0xc8(%rbp)
subl $0x7a, %eax
ja 0xdd37
movq -0xc8(%rbp), %rax
leaq 0x49dcb(%rip), %rcx     # 0x57680
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x40(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x4a293(%rip), %rsi     # 0x57b5f
movb $0x0, %al
callq 0x21a0
jmp 0xdd5b
movq -0x40(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
leaq 0x4a55d(%rip), %rsi     # 0x57e45
movb $0x1, %al
callq 0x21a0
jmp 0xdd5b
movq -0x40(%rbp), %rdi
movsd -0x28(%rbp), %xmm0
leaq 0x4a541(%rip), %rsi     # 0x57e45
movb $0x1, %al
callq 0x21a0
jmp 0xdd5b
movq -0x40(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
leaq 0x4a525(%rip), %rsi     # 0x57e45
movb $0x1, %al
callq 0x21a0
jmp 0xdd5b
movq -0x40(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
leaq 0x4a4f9(%rip), %rsi     # 0x57e3f
movb $0x3, %al
callq 0x21a0
jmp 0xdd5b
movq -0x40(%rbp), %rdi
movsd -0x38(%rbp), %xmm0
leaq 0x4a4e3(%rip), %rsi     # 0x57e45
movb $0x1, %al
callq 0x21a0
jmp 0xdd5b
movq -0xc0(%rbp), %rax
movq -0x40(%rbp), %rdi
movl 0x1c(%rax), %edx
leaq 0x4a1dc(%rip), %rsi     # 0x57b5f
movb $0x0, %al
callq 0x21a0
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0xc960
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
movq -0x40(%rbp), %rsi
callq 0xcbb0
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0xc7b0
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0xd0(%rbp)
callq 0xb9c0
movq -0xd0(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0x49c22(%rip), %xmm0    # 0x57628
mulsd %xmm1, %xmm0
leaq 0x4a434(%rip), %rsi     # 0x57e45
movb $0x1, %al
callq 0x21a0
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0xd8(%rbp)
callq 0xd7b0
movq -0xd8(%rbp), %rdi
movl %eax, %edx
leaq 0x4a11b(%rip), %rsi     # 0x57b5f
movb $0x0, %al
callq 0x21a0
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0xe0(%rbp)
callq 0xbaf0
movq -0xe0(%rbp), %rdi
leaq 0x4a3d0(%rip), %rsi     # 0x57e45
movb $0x1, %al
callq 0x21a0
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xcd10
jmp 0xda93
movq -0x40(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x1ba90
jmp 0xdaa2
jmp 0xdd5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x17270
leaq -0x60(%rbp), %rdi
callq 0x172d0
jmp 0xddaf
movq -0xc0(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0xf0(%rbp)
callq 0xc5d0
movl %eax, -0xe4(%rbp)
jmp 0xdaec
movl -0xe4(%rbp), %edx
movq -0xf0(%rbp), %rdi
leaq 0x4a05f(%rip), %rsi     # 0x57b5f
movb $0x0, %al
callq 0x21a0
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0x100(%rbp)
callq 0xb060
movsd %xmm0, -0xf8(%rbp)
jmp 0xdb2d
movsd -0xf8(%rbp), %xmm0
movq -0x100(%rbp), %rdi
leaq 0x4a302(%rip), %rsi     # 0x57e45
movb $0x1, %al
callq 0x21a0
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xd370
jmp 0xdb61
movq -0x40(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x1b860
jmp 0xdb70
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xd1f0
jmp 0xdb87
movq -0x40(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x1b860
jmp 0xdb96
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xac70
jmp 0xdbad
movq -0x40(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x1ba90
jmp 0xdbbc
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xd020
jmp 0xdbd3
movq -0x40(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x1bd10
jmp 0xdbe2
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xc520
jmp 0xdbf9
movq -0x40(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x1b6d0
jmp 0xdc08
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
movq (%rdi), %rax
movq (%rax), %rax
leaq -0x60(%rbp), %rsi
callq *%rax
jmp 0xdc22
movq -0x40(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x1b860
jmp 0xdc31
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0x110(%rbp)
callq 0x9c90
movsd %xmm0, -0x108(%rbp)
jmp 0xdc57
movsd -0x108(%rbp), %xmm0
movq -0x110(%rbp), %rdi
leaq 0x4a1d8(%rip), %rsi     # 0x57e45
movb $0x1, %al
callq 0x21a0
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0x98(%rbp), %rdx
leaq -0xa0(%rbp), %rcx
callq 0xb420
jmp 0xdc9c
movq -0x40(%rbp), %rdi
movsd -0x90(%rbp), %xmm0
movsd -0x98(%rbp), %xmm1
movsd -0xa0(%rbp), %xmm2
leaq 0x4a180(%rip), %rsi     # 0x57e3f
movb $0x3, %al
callq 0x21a0
jmp 0xdd5b
movq -0xc0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
leaq -0xb8(%rbp), %rcx
callq 0xb420
jmp 0xdcee
movq -0x40(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
addsd -0xa8(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
addsd -0xb0(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
addsd -0xb8(%rbp), %xmm2
leaq 0x4a11f(%rip), %rsi     # 0x57e3f
movb $0x3, %al
callq 0x21a0
jmp 0xdd5b
movq -0x48(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0xdd5b
movq -0x40(%rbp), %rsi
movl $0x25, %edi
callq 0x2250
jmp 0xdd47
movq -0x48(%rbp), %rax
movsbl (%rax), %edi
movq -0x40(%rbp), %rsi
callq 0x2250
jmp 0xdd59
jmp 0xdd5b
jmp 0xdd71
movq -0x48(%rbp), %rax
movsbl (%rax), %edi
movq -0x40(%rbp), %rsi
callq 0x2250
jmp 0xdd6f
jmp 0xdd71
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0xd863
movq -0x40(%rbp), %rsi
leaq 0x4e607(%rip), %rdi     # 0x5c394
callq 0x2140
jmp 0xdd94
leaq -0x78(%rbp), %rdi
callq 0x17270
leaq -0x60(%rbp), %rdi
callq 0x172d0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x2220
nopl (%rax,%rax)