// File: /workspace/github_c_makefile_star2_O1/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 0x1ccf8(%rip), %xmm0    # 0x278cc
movups %xmm0, 0x5c(%rsp)
movaps 0x1cce0(%rip), %xmm0    # 0x278c0
movaps %xmm0, 0x50(%rsp)
movaps 0x1ccc4(%rip), %xmm0    # 0x278b0
movaps %xmm0, 0x40(%rsp)
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
callq 0xa369
testl %ebx, %ebx
leaq 0x26259(%rip), %rax     # 0x30e60
leaq 0x2624a(%rip), %rcx     # 0x30e58
cmoveq %rax, %rcx
movq (%rcx), %rax
cmpl $0x0, 0x8(%rax)
je 0xaca4
cmpl $0x1, %ebp
je 0xacbf
testl %ebp, %ebp
jne 0xacec
leaq 0x1c717(%rip), %rsi     # 0x2734e
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 0xad01
leaq 0x1c6ff(%rip), %rsi     # 0x2735c
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3500
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0xad01
leaq 0x1c6e4(%rip), %rsi     # 0x27367
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3500
leaq 0x20(%rsp), %rdi
movl $0x2, %esi
movq %r14, %rdx
callq 0xad01
jmp 0xacec
leaq 0x1c68d(%rip), %rdi     # 0x27338
movl $0x15, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x3790
jmp 0xacf6
leaq 0x1c6b0(%rip), %rsi     # 0x27376
leaq 0x40(%rsp), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x3500
movq %rsp, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xad01
movq 0x30(%rsp), %rdi
callq 0x3390
movq %rsp, %rdi
movl %ebx, %esi
callq 0xae0b
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq