// File: /workspace/github_c_makefile_star2_O3/ToniWestbrook[P]paladin/uniprot.c
// Function: renderUniprotReport
void renderUniprotReport(int passType, int passPrimary, FILE * passStream, const char * passProxy) {
	UniprotList * globalLists;
	UniprotList uniprotLists[3];
	CURLBuffer tempBuffer;
    char commonHeader[] = "Count\tAbundance\tQuality (Avg)\tQuality (Max)";

	// Prepare data
	prepareUniprotReport(passType, passPrimary, uniprotLists, &tempBuffer, passProxy);

	// Report no data
	globalLists = getGlobalLists(passPrimary);
	if (globalLists[0].entryCount == 0) {
		fprintf(passStream, "No entries to report\n");
		return;
	}

	// Render requested report
	switch (passType) {
	case OUTPUT_TYPE_UNIPROT_SIMPLE:
		fprintf(passStream, "%s\tUniProtKB\n", commonHeader);
		renderUniprotEntries(uniprotLists + UNIPROT_LIST_FULL, UNIPROT_LIST_FULL, passStream);
		fprintf(passStream, "\n\n%s\tGene\n", commonHeader);
		renderUniprotEntries(uniprotLists + UNIPROT_LIST_GENES, UNIPROT_LIST_GENES, passStream);
		fprintf(passStream, "\n\n%s\tOrganism\n", commonHeader);
		renderUniprotEntries(uniprotLists + UNIPROT_LIST_ORGANISM, UNIPROT_LIST_ORGANISM, passStream);

		break;

	case OUTPUT_TYPE_UNIPROT_FULL:
		fprintf(passStream, "%s\tUniProtKB\tID\tOrganism\tProtein Names\tGenes\tPathway\tFeatures\tGene Ontology\tReviewed\tExistence\tComments\tCross Reference (KEGG)\tCross Reference (GeneID)\tCross Reference (PATRIC)\tCross Reference(EnsemblBacteria)\tTaxonomic ID\tLineage\n", commonHeader);
		renderUniprotEntries(uniprotLists + UNIPROT_LIST_FULL, UNIPROT_LIST_FULL, passStream);
		freeCURLBuffer(&tempBuffer);

		break;
	}

	cleanUniprotLists(uniprotLists, passPrimary);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rcx, %r8
movq %rdx, %r14
movl %esi, %ebx
movl %edi, %ebp
movups 0x1cb61(%rip), %xmm0    # 0x2794c
movups %xmm0, 0x5c(%rsp)
movaps 0x1cb49(%rip), %xmm0    # 0x27940
movaps %xmm0, 0x50(%rsp)
movaps 0x1cb2d(%rip), %xmm0    # 0x27930
movaps %xmm0, 0x40(%rsp)
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
callq 0xa57d
testl %ebx, %ebx
leaq 0x26042(%rip), %rax     # 0x30e60
leaq 0x26033(%rip), %rcx     # 0x30e58
cmoveq %rax, %rcx
movq (%rcx), %rax
cmpl $0x0, 0x8(%rax)
je 0xaebb
cmpl $0x1, %ebp
je 0xaed6
testl %ebp, %ebp
jne 0xaf03
leaq 0x1c580(%rip), %rsi     # 0x273ce
leaq 0x40(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3500
movq %rsp, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xaf18
leaq 0x1c568(%rip), %rsi     # 0x273dc
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3500
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0xaf18
leaq 0x1c54d(%rip), %rsi     # 0x273e7
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3500
leaq 0x20(%rsp), %rdi
movl $0x2, %esi
movq %r14, %rdx
callq 0xaf18
jmp 0xaf03
leaq 0x1c4f6(%rip), %rdi     # 0x273b8
movl $0x15, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x3790
jmp 0xaf0d
leaq 0x1c519(%rip), %rsi     # 0x273f6
leaq 0x40(%rsp), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x3500
movq %rsp, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xaf18
movq 0x30(%rsp), %rdi
callq 0x3390
movq %rsp, %rdi
movl %ebx, %esi
callq 0xb022
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq