// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xa0, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
leaq -0x90(%rbp), %rdi
leaq 0x2cda9(%rip), %rsi     # 0x39790
movl $0x2c, %edx
callq 0x3250
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
leaq -0x50(%rbp), %rdx
movq -0x18(%rbp), %r8
leaq -0x60(%rbp), %rcx
callq 0xbe20
movl -0x8(%rbp), %edi
callq 0xbdc0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0xca35
movq -0x10(%rbp), %rdi
leaq 0x2c7df(%rip), %rsi     # 0x39208
movb $0x0, %al
callq 0x34e0
jmp 0xcb1d
movl -0x4(%rbp), %eax
movl %eax, -0x94(%rbp)
testl %eax, %eax
je 0xca58
jmp 0xca44
movl -0x94(%rbp), %eax
subl $0x1, %eax
je 0xcae0
jmp 0xcb11
movq -0x10(%rbp), %rdi
leaq -0x90(%rbp), %rdx
leaq 0x2c7b4(%rip), %rsi     # 0x3921e
movb $0x0, %al
callq 0x34e0
leaq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rdx
xorl %esi, %esi
callq 0xcb30
movq -0x10(%rbp), %rdi
leaq -0x90(%rbp), %rdx
leaq 0x2c79a(%rip), %rsi     # 0x3922c
movb $0x0, %al
callq 0x34e0
leaq -0x50(%rbp), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rdx
movl $0x1, %esi
callq 0xcb30
movq -0x10(%rbp), %rdi
leaq -0x90(%rbp), %rdx
leaq 0x2c776(%rip), %rsi     # 0x39237
movb $0x0, %al
callq 0x34e0
leaq -0x50(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rdx
movl $0x2, %esi
callq 0xcb30
jmp 0xcb11
movq -0x10(%rbp), %rdi
leaq -0x90(%rbp), %rdx
leaq 0x2c754(%rip), %rsi     # 0x39246
movb $0x0, %al
callq 0x34e0
leaq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rdx
xorl %esi, %esi
callq 0xcb30
leaq -0x60(%rbp), %rdi
callq 0xcd80
leaq -0x50(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0xcda0
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)