LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/adelciotto[P]plasma/src/gl_rgb_plasma.c
// Function: DrawFrame
void DrawFrame(double elapsedTimeSecs) {
    glClear(GL_COLOR_BUFFER_BIT);

    glUseProgram(gProgramId);

    glUniform1f(gUniformScaleLocation, 20.0f);
    glUniform2i(gUniformResolutionLocation, gWidth, gHeight);
    glUniform1f(gUniformTimeLocation, elapsedTimeSecs);

    glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movl $0x4000, %edi           # imm = 0x4000
callq 0x2160
movq 0x33e6(%rip), %rax      # 0x5ff0
movl 0x3570(%rip), %edi      # 0x6180
callq *(%rax)
movq 0x3367(%rip), %rbx      # 0x5f80
movl 0x3539(%rip), %edi      # 0x6158
movss 0x141d(%rip), %xmm0     # 0x4044
callq *(%rbx)
movq 0x32d0(%rip), %rax      # 0x5f00
movl 0x351e(%rip), %edi      # 0x6154
movl 0x3520(%rip), %esi      # 0x615c
movl 0x351e(%rip), %edx      # 0x6160
callq *(%rax)
movl 0x3506(%rip), %edi      # 0x6150
xorps %xmm0, %xmm0
cvtsd2ss 0x8(%rsp), %xmm0
callq *(%rbx)
movl $0x4, %edi
movl $0x6, %esi
movl $0x1405, %edx           # imm = 0x1405
xorl %ecx, %ecx
addq $0x10, %rsp
popq %rbx
jmp 0x2090
// File: /workspace/github_c_makefile_star2_O1/adelciotto[P]plasma/src/gl_rgb_plasma.c
// Function: DestroyGL
void DestroyGL(void) {
    glDeleteBuffers(1, &gEBO);
    glDeleteBuffers(1, &gVBO);
    glDeleteVertexArrays(1, &gVAO);
    glDeleteProgram(gProgramId);
}

// Assembly:
pushq %rbx
movq 0x32f0(%rip), %rbx      # 0x5f68
leaq 0x350d(%rip), %rsi      # 0x618c
movl $0x1, %edi
callq *(%rbx)
leaq 0x34fb(%rip), %rsi      # 0x6188
movl $0x1, %edi
callq *(%rbx)
movq 0x3315(%rip), %rax      # 0x5fb0
leaq 0x34e2(%rip), %rsi      # 0x6184
movl $0x1, %edi
callq *(%rax)
movq 0x32d8(%rip), %rax      # 0x5f88
movl 0x34ca(%rip), %edi      # 0x6180
popq %rbx
jmpq *(%rax)
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_7/exercise_7_08/print.c
// Function: main
int main(int argc, char *argv[])
{
  if (!parse_arg_list(argc, argv))
  {
    exit(EXIT_FAILURE);
  }

  while (--argc > 0)
  {
    print_file(*++argv);

    if (argc != 1)
    {
      putc('\n', stdout);
    }
  }

  exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpl $0x2, %edi
jge 0x120d
movq (%rbx), %rdx
movq 0x2e06(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xe08(%rip), %rsi       # 0x2004
xorl %eax, %eax
callq 0x1060
movl $0x1, %edi
callq 0x1080
movl %edi, %ebp
incl %ebp
addq $0x8, %rbx
movq 0x2dbc(%rip), %r14      # 0x3fd8
movq (%rbx), %rdi
callq 0x1263
cmpl $0x3, %ebp
je 0x1236
movq (%r14), %rsi
movl $0xa, %edi
callq 0x1050
decl %ebp
addq $0x8, %rbx
cmpl $0x2, %ebp
jg 0x121c
xorl %edi, %edi
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_7/exercise_7_08/print.c
// Function: print_file
void print_file(char *file_name)
{
  FILE *file_p;
  if ((file_p = fopen(file_name, "r")) == NULL)
  {
    fprintf(stderr, "%s: can't open %s.\n", program_name, file_name);
    exit(EXIT_FAILURE);
  }

  size_t line_number = 1;
  char line[MAX_LINE_LEN];
  while (fgets(line, MAX_LINE_LEN, file_p) != NULL)
  {
    if ((line_number - 1) % LINES_PER_PAGE == 0)
    {
      printf("[%s]: page %zu\n", file_name, line_number / LINES_PER_PAGE + 1);
    }

    printf("%zu: %s", line_number, line);
    ++line_number;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3f8, %rsp            # imm = 0x3F8
leaq 0xd9e(%rip), %rsi       # 0x2019
movq %rdi, 0x8(%rsp)
callq 0x1070
testq %rax, %rax
je 0x1346
movq %rax, %r14
leaq 0x10(%rsp), %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %rax, %rdx
callq 0x1040
testq %rax, %rax
je 0x1334
movl $0x1, %r15d
movabsq $-0x3333333333333333, %rbx # imm = 0xCCCCCCCCCCCCCCCD
leaq 0xd7c(%rip), %r13       # 0x203f
leaq 0x10(%rsp), %rbp
xorl %r12d, %r12d
movq %r12, %rax
mulq %rbx
shrq $0x2, %rdx
andq $-0x2, %rdx
leaq (%rdx,%rdx,4), %rax
movq %r15, %rcx
subq %rax, %rcx
cmpq $0x1, %rcx
jne 0x1309
movq %r15, %rax
mulq %rbx
shrq $0x3, %rdx
incq %rdx
leaq 0xd32(%rip), %rdi       # 0x202f
movq 0x8(%rsp), %rsi
xorl %eax, %eax
callq 0x1030
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x1030
incq %r15
movq %rbp, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %r14, %rdx
callq 0x1040
incq %r12
testq %rax, %rax
jne 0x12cb
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rdi
callq 0x10bb
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/fallocate2.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	char tmpfile[] = "/tmp/willitscale.XXXXXX";
	int fd = mkstemp(tmpfile);
	unsigned long place = 0;
	assert(fd >= 0);
	unlink(tmpfile);

	while (1) {
		int ret = fallocate(fd, 0, place, BUFLEN);
		if (errno != EINTR)
			assert(ret == 0);
		place += BUFLEN;
		if (place >= FILESIZE) {
			ret = ftruncate(fd, 0);
			assert(ret == 0);
			place = 0;
		}
		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movaps 0x65c(%rip), %xmm0      # 0x22d0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movabsq $0x5858585858582e, %rax # imm = 0x5858585858582E
movq %rax, 0x10(%rdi)
callq 0x11f0
testl %eax, %eax
js 0x1d27
movl %eax, %ebp
movq %rsp, %rdi
callq 0x1080
movl $0x2000, %ecx           # imm = 0x2000
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1170
movl %eax, %r15d
callq 0x1070
movq %rax, %r14
cmpl $0x4, (%rax)
je 0x1cc4
testl %r15d, %r15d
jne 0x1d08
xorl %r15d, %r15d
addq $0x2000, %r15           # imm = 0x2000
cmpq $0x100000, %r15         # imm = 0x100000
jb 0x1cea
movl %ebp, %edi
xorl %esi, %esi
callq 0x1120
movl $0x0, %r15d
testl %eax, %eax
jne 0x1d46
incq (%rbx)
movl $0x2000, %ecx           # imm = 0x2000
movl %ebp, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1170
cmpl $0x4, (%r14)
je 0x1cc7
testl %eax, %eax
je 0x1cc7
leaq 0x5af(%rip), %rdi       # 0x22be
leaq 0x562(%rip), %rsi       # 0x2278
leaq 0x56e(%rip), %rcx       # 0x228b
movl $0x1a, %edx
callq 0x1130
leaq 0x542(%rip), %rdi       # 0x2270
leaq 0x543(%rip), %rsi       # 0x2278
leaq 0x54f(%rip), %rcx       # 0x228b
movl $0x14, %edx
callq 0x1130
leaq 0x571(%rip), %rdi       # 0x22be
leaq 0x524(%rip), %rsi       # 0x2278
leaq 0x530(%rip), %rcx       # 0x228b
movl $0x1e, %edx
callq 0x1130
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/ADTQueue_test.c
// Function: test_create
void test_create(void) {
	Queue queue = queue_create(NULL);
	queue_set_destroy_value(queue, NULL);

	TEST_ASSERT(queue != NULL);
	TEST_ASSERT(queue_size(queue) == 0);

	queue_destroy(queue);
}

// Assembly:
pushq %rbx
xorl %edi, %edi
callq 0x4598
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x462b
xorl %edi, %edi
testq %rbx, %rbx
setne %dil
leaq 0x1547(%rip), %rsi      # 0x5318
leaq 0x16a9(%rip), %rcx      # 0x5481
leaq 0x1549(%rip), %r8       # 0x5328
movl $0x11, %edx
xorl %eax, %eax
callq 0x25cc
testl %eax, %eax
je 0x3e2d
movq %rbx, %rdi
callq 0x45c2
xorl %edi, %edi
testl %eax, %eax
sete %dil
leaq 0x1512(%rip), %rsi      # 0x5318
leaq 0x1674(%rip), %rcx      # 0x5481
leaq 0x1522(%rip), %r8       # 0x5336
movl $0x12, %edx
xorl %eax, %eax
callq 0x25cc
testl %eax, %eax
je 0x3e2d
movq %rbx, %rdi
popq %rbx
jmp 0x4633
callq 0x2e13
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/ADTQueue_test.c
// Function: test_insert
void test_insert(void) {
	Queue queue = queue_create(NULL);
	int N = 1000;
	int* array = malloc(N * sizeof(*array));					// Στο queue θα προσθέσουμε pointers προς τα στοιχεία αυτού του πίνακα

	// insert 1000 στοιχεία
	for (int i = 0; i < 1000; i++) {
		queue_insert_back(queue, &array[i]);
		TEST_ASSERT(queue_size(queue) == i+1);			// Το size πρέπει να μεγαλώσει
		TEST_ASSERT(queue_front(queue) == &array[0]);	// Το μπροστινό στοιχείο στην κορυφή είναι πάντα το array[0]
		TEST_ASSERT(queue_back(queue) == &array[i]);		// Το πίσω στοιχείο είναι αυτό που μόλις βάλαμε
	}

	queue_destroy(queue);
	free(array);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %edi, %edi
callq 0x4598
movq %rax, %rbx
movl $0xfa0, %edi            # imm = 0xFA0
callq 0x21b0
movq %rax, %rbp
movl $0x1, %r13d
leaq 0x14b7(%rip), %r15      # 0x5318
leaq 0x1619(%rip), %r12      # 0x5481
movq %rax, %r14
cmpq $0x3e9, %r13            # imm = 0x3E9
je 0x3f1f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x45fa
movq %rbx, %rdi
callq 0x45c2
movl %eax, %eax
xorl %edi, %edi
cmpq %rax, %r13
sete %dil
movq %r15, %rsi
movl $0x1f, %edx
movq %r12, %rcx
leaq 0x14a5(%rip), %r8       # 0x534d
xorl %eax, %eax
callq 0x25cc
testl %eax, %eax
je 0x3f1a
movq %rbx, %rdi
callq 0x45ca
xorl %edi, %edi
cmpq %rbp, %rax
sete %dil
movq %r15, %rsi
movl $0x20, %edx
movq %r12, %rcx
leaq 0x1490(%rip), %r8       # 0x5366
xorl %eax, %eax
callq 0x25cc
testl %eax, %eax
je 0x3f1a
movq %rbx, %rdi
callq 0x45e2
xorl %edi, %edi
cmpq %rax, %r14
sete %dil
movq %r15, %rsi
movl $0x21, %edx
movq %r12, %rcx
leaq 0x1482(%rip), %r8       # 0x5386
xorl %eax, %eax
callq 0x25cc
incq %r13
addq $0x4, %r14
testl %eax, %eax
jne 0x3e6b
callq 0x2e13
movq %rbx, %rdi
callq 0x4633
movq %rbp, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/ADTQueue_test.c
// Function: test_remove
void test_remove(void) {
	Queue queue = queue_create(NULL);
	int N = 1000;
	int* array = malloc(N * sizeof(*array));

	// insert για προσθήκη δεδομένων, χωρίς ελέγχους (έχουμε ξεχωριστό test για το insert)
	for (int i = 0; i < 1000; i++)
		queue_insert_back(queue, &array[i]);

	// Διαδοχικά remove, πρέπει να βγουν με την ίδια σειρά που είναι στο array
	for (int i = 0; i < 1000; i++) {
		TEST_ASSERT(queue_front(queue) == &array[i]);
		queue_remove_front(queue);
		TEST_ASSERT(queue_size(queue) == 999-i);
	}

	queue_destroy(queue);
	free(array);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x4598
movq %rax, %rbx
movl $0xfa0, %edi            # imm = 0xFA0
callq 0x21b0
movq %rax, %rbp
leaq (%r14,%rbp), %rsi
movq %rbx, %rdi
callq 0x45fa
addq $0x4, %r14
cmpq $0xfa0, %r14            # imm = 0xFA0
jne 0x3f62
movl $0x3e7, %r13d           # imm = 0x3E7
leaq 0x1390(%rip), %r15      # 0x5318
leaq 0x14f2(%rip), %r12      # 0x5481
movq %rbp, %r14
movq %rbx, %rdi
callq 0x45ca
xorl %edi, %edi
cmpq %rax, %r14
sete %dil
movq %r15, %rsi
movl $0x33, %edx
movq %r12, %rcx
leaq 0x13f0(%rip), %r8       # 0x53a5
xorl %eax, %eax
callq 0x25cc
testl %eax, %eax
je 0x4020
movq %rbx, %rdi
callq 0x4621
movq %rbx, %rdi
callq 0x45c2
movl %eax, %eax
xorl %edi, %edi
cmpq %rax, %r13
sete %dil
movq %r15, %rsi
movl $0x35, %edx
movq %r12, %rcx
leaq 0x13d8(%rip), %r8       # 0x53c5
xorl %eax, %eax
callq 0x25cc
testl %eax, %eax
je 0x4020
addq $0x4, %r14
addq $-0x1, %r13
jb 0x3f92
movq %rbx, %rdi
callq 0x4633
movq %rbp, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2030
callq 0x2e13
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/lib/../modules/UsingADTList/ADTQueue.c
// Function: queue_create
Queue queue_create(DestroyFunc destroy_value) {
	// Φτιάχνουμε ένα struct και αποθηκεύουμε μέσα μια νέα λίστα
	//
	Queue queue = malloc(sizeof(*queue));
	queue->list = list_create(destroy_value);
	return queue;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x8, %edi
callq 0x21b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x4648
movq %rax, (%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/lib/../modules/UsingLinkedList/ADTList.c
// Function: list_create
List list_create(DestroyFunc destroy_value) {
	// Πρώτα δημιουργούμε το stuct
	List list = malloc(sizeof(*list));
	list->size = 0;
	list->destroy_value = destroy_value;

	// Χρησιμοποιούμε dummy κόμβο, ώστε ακόμα και μια άδεια λίστα να έχει ένα κόμβο
	// (απλοποιεί τους αλγορίθμους). Οπότε πρέπει να τον δημιουργήσουμε.
	//
	list->dummy = malloc(sizeof(*list->dummy));
	list->dummy->next = NULL;		// άδεια λίστα, ο dummy δεν έχει επόμενο

	// Σε μια κενή λίστα, τελευταίος κόμβος είναι επίσης ο dummy
	list->last = list->dummy;

	return list;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x20, %edi
callq 0x21b0
movq %rax, %r14
movl $0x0, 0x10(%rax)
movq %rbx, 0x18(%rax)
movl $0x10, %edi
callq 0x21b0
movq %rax, (%r14)
movq $0x0, (%rax)
movq %rax, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/lib/../modules/UsingLinkedList/ADTList.c
// Function: list_insert_next
void list_insert_next(List list, ListNode node, Pointer value) {
	// Αν το node είναι NULL απλά εισάγουμε μετά τον dummy κόμβο!
	// Αυτή ακριβώς είναι η αξία του dummy, δε χρειαζόμαστε ξεχωριστή υλοποίηση.
	if (node == NULL)
		node = list->dummy;

	// Δημιουργία του νέου κόμβου
	ListNode new = malloc(sizeof(*new));
	new->value = value;

	// Σύνδεση του new ανάμεσα στο node και το node->next
	new->next = node->next;
	node->next = new;

	// Ενημέρωση των size & last
	list->size++;
	if (list->last == node)
		list->last = new;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
jne 0x46a4
movq (%rbx), %r14
movl $0x10, %edi
callq 0x21b0
movq %r15, 0x8(%rax)
movq (%r14), %rcx
movq %rcx, (%rax)
movq %rax, (%r14)
incl 0x10(%rbx)
cmpq %r14, 0x8(%rbx)
jne 0x46c8
movq %rax, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/lib/../modules/UsingLinkedList/ADTList.c
// Function: list_remove_next
void list_remove_next(List list, ListNode node) {
	// Αν το node είναι NULL απλά διαγράφουμε μετά τον dummy κόμβο!
	// Αυτή ακριβώς είναι η αξία του dummy, δε χρειαζόμαστε ξεχωριστή υλοποίηση.
	if (node == NULL)
		node = list->dummy;

	// Ο κόμβος προς διαγραφή είναι ο επόμενος του node, ο οποίος πρέπει να υπάρχει
	ListNode removed = node->next;
	assert(removed != NULL);		// LCOV_EXCL_LINE

	if (list->destroy_value != NULL)
		list->destroy_value(removed->value);

	// Σύνδεση του node με τον επόμενο του removed
	node->next = removed->next;		// πριν το free!

	free(removed);

	// Ενημέρωση των size & last
	list->size--;
	if (list->last == removed)
		list->last = node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
jne 0x46e1
movq (%rbx), %r14
movq (%r14), %r15
testq %r15, %r15
je 0x4719
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x46f8
movq 0x8(%r15), %rdi
callq *%rax
movq (%r15), %rax
movq %rax, (%r14)
movq %r15, %rdi
callq 0x2030
decl 0x10(%rbx)
cmpq %r15, 0x8(%rbx)
jne 0x4713
movq %r14, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x16f1(%rip), %rdi      # 0x5e11
leaq 0x16fa(%rip), %rsi      # 0x5e21
leaq 0x1718(%rip), %rcx      # 0x5e46
movl $0x4d, %edx
callq 0x2120
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/lib/../modules/UsingLinkedList/ADTList.c
// Function: list_destroy
void list_destroy(List list) {
	// Διασχίζουμε όλη τη λίστα και κάνουμε free όλους τους κόμβους,
	// συμπεριλαμβανομένου και του dummy!
	//
	ListNode node = list->dummy;
	while (node != NULL) {				// while αντί για for, γιατί θέλουμε να διαβάσουμε
		ListNode next = node->next;		// το node->next _πριν_ κάνουμε free!

		// Καλούμε τη destroy_value, αν υπάρχει (προσοχή, όχι στον dummy!)
		if (node != list->dummy && list->destroy_value != NULL)
			list->destroy_value(node->value);

		free(node);
		node = next;
	}

	// Τέλος free το ίδιο το struct
	free(list);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x47e9
movq %r15, %r14
movq (%r15), %r15
cmpq (%rbx), %r14
je 0x47df
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x47df
movq 0x8(%r14), %rdi
callq *%rax
movq %r14, %rdi
callq 0x2030
jmp 0x47c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: memalloc
void* memalloc(size_t size) {
  void* ans = malloc(size);
  if (ans == NULL)
    exit(error("", ERRMEM));
  return ans;
}

// Assembly:
pushq %rax
callq 0x2230
testq %rax, %rax
je 0x3910
popq %rcx
retq
callq 0x29e9
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: memrealloc
void* memrealloc(void* ptr, size_t size) {
  void* ans = realloc(ptr, size);
  if (ans == NULL)
    exit(error("", ERRMEM));
  return ans;
}

// Assembly:
pushq %rax
callq 0x2250
testq %rax, %rax
je 0x3922
popq %rcx
retq
callq 0x2a01
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: getFloat
float getFloat(char* in) {
  char* endptr;
  float ans = strtof(in, &endptr);
  if (*endptr != '\0')
    exit(error(in, ERRFLOAT));
  return ans;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rsi
callq 0x2130
movq (%r14), %rax
cmpb $0x0, (%rax)
jne 0x3949
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x2a19
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: getInt
int getInt(char* in) {
  char* endptr;
  int ans = (int) strtol(in, &endptr, 10);
  if (*endptr != '\0')
    exit(error(in, ERRINT));
  return ans;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rsi
movl $0xa, %edx
callq 0x2200
movq (%r14), %rcx
cmpb $0x0, (%rcx)
jne 0x3978
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x2a2a
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: getLong
uint64_t getLong(char* in) {
  char* endptr;
  uint64_t ans = (uint64_t) strtol(in, &endptr, 10);
  if (*endptr != '\0')
    exit(error(in, ERRINT));
  return ans;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rsi
movl $0xa, %edx
callq 0x2200
movq (%r14), %rcx
cmpb $0x0, (%rcx)
jne 0x39a7
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x2a3b
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: getLine
char* getLine(char* line, int size, File in, bool gz) {
  if (gz)
    return gzgets(in.gzf, line, size);
  else
    return fgets(line, size, in.f);
}

// Assembly:
movl %esi, %eax
movq %rdi, %rsi
testl %ecx, %ecx
je 0x39c2
movq %rdx, %rdi
movl %eax, %edx
jmp 0x2090
movq %rsi, %rdi
movl %eax, %esi
jmp 0x21a0
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: partition
int64_t partition(float* pVal, uint64_t* pEnd,
    int64_t low, int64_t high) {
  float pivot = pVal[high];  // pivot value: last elt
  int64_t idx = low - 1;

  for (int64_t j = low; j < high; j++) {
    if (pVal[j] < pivot) {
      idx++;
      swapFloat(pVal + idx, pVal + j);
      swapInt(pEnd + idx, pEnd + j);  // swap int values too
    }
  }
  idx++;
  swapFloat(pVal + idx, pVal + high);
  swapInt(pEnd + idx, pEnd + high);
  return idx;
}

// Assembly:
movq %rdx, %rax
cmpq %rcx, %rdx
jge 0x3a39
movss (%rdi,%rcx,4), %xmm0
leaq -0x1(%rax), %rdx
movss (%rdi,%rax,4), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x3a2b
movss 0x4(%rdi,%rdx,4), %xmm2
movss %xmm1, 0x4(%rdi,%rdx,4)
movss %xmm2, (%rdi,%rax,4)
movq 0x8(%rsi,%rdx,8), %r8
movq (%rsi,%rax,8), %r9
movq %r9, 0x8(%rsi,%rdx,8)
incq %rdx
movq %r8, (%rsi,%rax,8)
incq %rax
cmpq %rax, %rcx
jne 0x39fb
incq %rdx
movq %rdx, %rax
movss (%rdi,%rax,4), %xmm0
movss (%rdi,%rcx,4), %xmm1
movss %xmm1, (%rdi,%rax,4)
movss %xmm0, (%rdi,%rcx,4)
movq (%rsi,%rax,8), %rdx
movq (%rsi,%rcx,8), %rdi
movq %rdi, (%rsi,%rax,8)
movq %rdx, (%rsi,%rcx,8)
retq
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: quickSort
void quickSort(float* pVal, uint64_t* pEnd,
    int64_t low, int64_t high) {
  if (low < high) {
    int64_t idx = partition(pVal, pEnd, low, high);
    quickSort(pVal, pEnd, low, idx - 1);
    quickSort(pVal, pEnd, idx + 1, high);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
cmpq %rbx, %r12
jge 0x3aa6
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x39ea
movq %rax, %r13
leaq -0x1(%rax), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3a5e
incq %r13
movq %r13, %r12
jmp 0x3a73
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: lookup
float lookup(float* pVal, uint64_t low, uint64_t high,
    float* qVal, float p) {
  if (low == high)
    return qVal[low];
  uint64_t idx = (low + high) / 2;
  if (pVal[idx] == p)
    return qVal[idx];
  if (pVal[idx] > p)
    return lookup(pVal, low, idx - 1, qVal, p);
  return lookup(pVal, idx + 1, high, qVal, p);
}

// Assembly:
cmpq %rdx, %rsi
je 0x3ada
leaq (%rdx,%rsi), %rax
shrq %rax
movss (%rdi,%rax,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x3ac8
jnp 0x3ae0
jbe 0x3ad2
decq %rax
movq %rax, %rdx
jmp 0x3ab0
incq %rax
movq %rax, %rsi
jmp 0x3ab0
movss (%rcx,%rsi,4), %xmm0
retq
movss (%rcx,%rax,4), %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: jenkins_one_at_a_time_hash
uint32_t jenkins_one_at_a_time_hash(float f) {
  uint32_t hash = 0;
  unsigned char* p = (unsigned char*) &f;
  for (int i = 0; i < sizeof(float); i++) {
    hash += p[i];
    hash += hash << 10;
    hash ^= hash >> 6;
  }
  hash += hash << 3;
  hash ^= hash >> 11;
  hash += hash << 15;
  return hash % HASH_SIZE;
}

// Assembly:
movss %xmm0, -0x4(%rsp)
xorl %eax, %eax
xorl %ecx, %ecx
movzbl -0x4(%rsp,%rax), %edx
addl %ecx, %edx
movl %edx, %esi
shll $0xa, %esi
addl %edx, %esi
movl %esi, %ecx
shrl $0x6, %ecx
xorl %esi, %ecx
incq %rax
cmpq $0x4, %rax
jne 0x3d8b
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0xb, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xf, %eax
addl %ecx, %eax
movl $0xccd8ec3d, %ecx       # imm = 0xCCD8EC3D
imulq %rax, %rcx
shrq $0x34, %rcx
imull $0x13fed1, %ecx, %ecx   # imm = 0x13FED1
subl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: recordPval
int recordPval(Hash** table, float p, uint32_t length) {

  // check hashtable for matching p-value
  uint32_t idx = jenkins_one_at_a_time_hash(p);
  for (Hash* h = table[idx]; h != NULL; h = h->next)
    if (p == h->val) {
      // match: add length to bucket
      h->len += length;
      return 0;
    }

  // no match: add info into bucket
  Hash* newVal = (Hash*) memalloc(sizeof(Hash));
  newVal->val = p;
  newVal->len = length;
  newVal->next = table[idx];
  table[idx] = newVal;
  return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movss %xmm0, 0xc(%rsp)
xorl %eax, %eax
xorl %ecx, %ecx
movzbl 0xc(%rsp,%rax), %edx
addl %ecx, %edx
movl %edx, %esi
shll $0xa, %esi
addl %edx, %esi
movl %esi, %ecx
shrl $0x6, %ecx
xorl %esi, %ecx
incq %rax
cmpq $0x4, %rax
jne 0x3de7
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0xb, %ecx
xorl %eax, %ecx
movl %ecx, %r14d
shll $0xf, %r14d
addl %ecx, %r14d
movl $0xccd8ec3d, %eax       # imm = 0xCCD8EC3D
imulq %r14, %rax
shrq $0x34, %rax
imull $0x13fed1, %eax, %eax   # imm = 0x13FED1
subl %eax, %r14d
movq (%rbx,%r14,8), %rax
testq %rax, %rax
je 0x3e49
movss (%rax), %xmm1
ucomiss %xmm0, %xmm1
jne 0x3e43
jnp 0x3e7c
movq 0x10(%rax), %rax
jmp 0x3e33
movl $0x18, %edi
movss %xmm0, 0x8(%rsp)
callq 0x3903
movss 0x8(%rsp), %xmm0
movss %xmm0, (%rax)
movl %ebp, %ecx
movq %rcx, 0x8(%rax)
movq (%rbx,%r14,8), %rcx
movq %rcx, 0x10(%rax)
movq %rax, (%rbx,%r14,8)
movl $0x1, %eax
jmp 0x3e84
movl %ebp, %ecx
addq %rcx, 0x8(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: hashPval
Hash** hashPval(Chrom* chrom, int chromLen, int n,
    int64_t* pLen) {

  // create hashtable for conversion of p-values to q-values
  Hash** table = (Hash**) memalloc(HASH_SIZE * sizeof(Hash*));
  for (int i = 0; i < HASH_SIZE; i++)
    table[i] = NULL;

  // loop through chroms
  for (int i = 0; i < chromLen; i++) {
    Chrom* chr = chrom + i;
    if (chr->skip || chr->pval[n] == NULL)
      continue;

    // populate hashtable
    Pileup* p = chr->pval[n]; // use the last p-value array
    uint32_t start = 0;
    for (uint32_t m = 0; m < chr->pvalLen[n]; m++) {
      // record p-value and length in hashtable
      if (p->cov[m] != SKIP)
        *pLen += recordPval(table, p->cov[m],
          p->end[m] - start);
      start = p->end[m];
    }
  }

  return table;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movl %edx, %r12d
movl %esi, %ebp
movq %rdi, (%rsp)
movl $0x9ff688, %edi         # imm = 0x9FF688
callq 0x3903
movq %rax, %r15
movl $0x9ff688, %edx         # imm = 0x9FF688
movq %rax, %rdi
xorl %esi, %esi
callq 0x2140
testl %ebp, %ebp
jle 0x3f57
movslq %r12d, %r12
movl %ebp, %eax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
imulq $0x68, %rbp, %r13
movq (%rsp), %rax
cmpb $0x0, 0xc(%rax,%r13)
jne 0x3f4d
addq (%rsp), %r13
movq 0x48(%r13), %rax
movq (%rax,%r12,8), %r14
testq %r14, %r14
je 0x3f4d
movq 0x50(%r13), %rax
cmpl $0x0, (%rax,%r12,4)
je 0x3f4d
xorl %ebx, %ebx
xorl %eax, %eax
movq 0x8(%r14), %rcx
movss (%rcx,%rbx,4), %xmm0
ucomiss 0xe23f(%rip), %xmm0     # 0x12158
jne 0x3f1d
jnp 0x3f37
movq (%r14), %rcx
movl (%rcx,%rbx,4), %esi
subl %eax, %esi
movq %r15, %rdi
callq 0x3dd0
movl %eax, %eax
movq 0x10(%rsp), %rcx
addq %rax, (%rcx)
movq (%r14), %rax
movl (%rax,%rbx,4), %eax
incq %rbx
movq 0x50(%r13), %rcx
movl (%rcx,%r12,4), %ecx
cmpq %rcx, %rbx
jb 0x3f09
incq %rbp
cmpq 0x8(%rsp), %rbp
jne 0x3ed9
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: collectPval
float* collectPval(Hash** table, uint64_t** pEnd,
    int64_t pLen, uint64_t* checkLen) {
  float* pVal = (float*) memalloc(pLen * sizeof(float));
  int64_t idx = 0;
  for (int i = 0; i < HASH_SIZE; i++)
    for (Hash* h = table[i]; h != NULL; h = h->next) {
      pVal[idx] = h->val;
      (*pEnd)[idx] = h->len;
      *checkLen += h->len;
      idx++;
    }
  if (idx != pLen)
    exit(error(errMsg[ERRPVAL], ERRISSUE));
  return pVal;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
leaq (,%rdx,4), %rdi
callq 0x3903
xorl %ecx, %ecx
xorl %edx, %edx
movq (%r12,%rcx,8), %rsi
testq %rsi, %rsi
je 0x3fbe
movq (%r15), %rdi
movss (%rsi), %xmm0
movss %xmm0, (%rax,%rdx,4)
movq 0x8(%rsi), %r8
movq %r8, (%rdi,%rdx,8)
movq 0x8(%rsi), %r8
addq %r8, (%r14)
incq %rdx
movq 0x10(%rsi), %rsi
testq %rsi, %rsi
jne 0x3f9a
incq %rcx
cmpq $0x13fed1, %rcx         # imm = 0x13FED1
jne 0x3f8e
cmpq %rbx, %rdx
jne 0x3fdb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x2a68
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: bd0
double bd0(double x, double np) {
  double ej, s, s1, v;
  if (fabs(x-np) < 0.1*(x+np)) {
    v = (x-np)/(x+np);
    s = (x-np)*v;
    if (fabs(s) < DBL_MIN)
      return s;
    ej = 2*x*v;
    v = v*v;
    for (int j = 1; j < 1000; j++) {
      ej *= v;
      s1 = s+ej/((j<<1)+1);
      if (s1 == s)
        return s1;
      s = s1;
    }
  }
  return x * log(x / np) + np - x;
}

// Assembly:
movapd %xmm0, %xmm5
subsd %xmm1, %xmm0
movapd 0xe025(%rip), %xmm4     # 0x12190
andpd %xmm0, %xmm4
movapd %xmm5, %xmm2
addsd %xmm1, %xmm2
movsd 0xde99(%rip), %xmm3     # 0x12018
mulsd %xmm2, %xmm3
ucomisd %xmm4, %xmm3
jbe 0x423f
movapd %xmm0, %xmm6
divsd %xmm2, %xmm6
mulsd %xmm6, %xmm0
movapd 0xdfef(%rip), %xmm2     # 0x12190
andpd %xmm0, %xmm2
movsd 0xde73(%rip), %xmm3     # 0x12020
ucomisd %xmm2, %xmm3
ja 0x4274
movapd %xmm5, %xmm3
addsd %xmm5, %xmm3
mulsd %xmm6, %xmm3
mulsd %xmm6, %xmm6
mulsd %xmm6, %xmm3
movapd %xmm3, %xmm2
divsd 0xde51(%rip), %xmm2     # 0x12028
addsd %xmm0, %xmm2
ucomisd %xmm0, %xmm2
jne 0x41e7
jp 0x41e7
xorl %eax, %eax
jmp 0x4237
movl $0x1, %edx
movl $0x5, %eax
movl %edx, %ecx
cmpl $0x3e7, %edx            # imm = 0x3E7
je 0x4226
mulsd %xmm6, %xmm3
xorps %xmm4, %xmm4
cvtsi2sd %eax, %xmm4
movapd %xmm3, %xmm0
divsd %xmm4, %xmm0
addsd %xmm2, %xmm0
addl $0x2, %eax
leal 0x1(%rcx), %edx
ucomisd %xmm2, %xmm0
movapd %xmm0, %xmm2
jne 0x41f1
jp 0x41f1
jmp 0x422a
movapd %xmm2, %xmm0
cmpl $0x3e7, %ecx            # imm = 0x3E7
setae %al
movapd %xmm0, %xmm2
movapd %xmm2, %xmm0
testb %al, %al
je 0x4274
subq $0x18, %rsp
movapd %xmm5, %xmm0
divsd %xmm1, %xmm0
movsd %xmm5, 0x8(%rsp)
movsd %xmm1, 0x10(%rsp)
callq 0x2170
movsd 0x8(%rsp), %xmm1
mulsd %xmm1, %xmm0
addsd 0x10(%rsp), %xmm0
subsd %xmm1, %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: stirlerr
double stirlerr(double n) {
  double S0 = 1.0 / 12;
  double S1 = 1.0 / 360;
  double S2 = 1.0 / 1260;
  double S3 = 1.0 / 1680;
  double S4 = 1.0 / 1188;
  double sferr[16] = {
    0.0,
    0.0810614667953272582196702,
    0.0413406959554092940938221,
    0.02767792568499833914878929,
    0.02079067210376509311152277,
    0.01664469118982119216319487,
    0.01387612882307074799874573,
    0.01189670994589177009505572,
    0.010411265261972096497478567,
    0.009255462182712732917728637,
    0.008330563433362871256469318,
    0.007573675487951840794972024,
    0.006942840107209529865664152,
    0.006408994188004207068439631,
    0.005951370112758847735624416,
    0.005554733551962801371038690
  };

  double nn = n * n;
  if (n > 80.0)
    return (S0-(S1-S2/nn)/nn)/n;
  if (n > 35.0)
    return (S0-(S1-(S2-S3/nn)/nn)/nn)/n;
  if (n > 15.0)
    return (S0-(S1-(S2-(S3-S4/nn)/nn)/nn)/nn)/n;
  return sferr[(int) n];
}

// Assembly:
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
ucomisd 0xddab(%rip), %xmm0     # 0x12030
jbe 0x42ad
movsd 0xdde9(%rip), %xmm2     # 0x12078
divsd %xmm1, %xmm2
addsd 0xddc5(%rip), %xmm2     # 0x12060
divsd %xmm1, %xmm2
movsd 0xddc1(%rip), %xmm1     # 0x12068
subsd %xmm2, %xmm1
jmp 0x42eb
ucomisd 0xdd83(%rip), %xmm0     # 0x12038
jbe 0x42f4
movsd 0xddb1(%rip), %xmm2     # 0x12070
divsd %xmm1, %xmm2
addsd 0xdd8d(%rip), %xmm2     # 0x12058
divsd %xmm1, %xmm2
movsd 0xdd89(%rip), %xmm3     # 0x12060
subsd %xmm2, %xmm3
divsd %xmm1, %xmm3
movsd 0xdd81(%rip), %xmm1     # 0x12068
subsd %xmm3, %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
retq
ucomisd 0xdd44(%rip), %xmm0     # 0x12040
jbe 0x4337
movsd 0xdd42(%rip), %xmm2     # 0x12048
divsd %xmm1, %xmm2
addsd 0xdd3e(%rip), %xmm2     # 0x12050
divsd %xmm1, %xmm2
movsd 0xdd3a(%rip), %xmm3     # 0x12058
subsd %xmm2, %xmm3
divsd %xmm1, %xmm3
movsd 0xdd32(%rip), %xmm2     # 0x12060
subsd %xmm3, %xmm2
jmp 0x429b
cvttsd2si %xmm0, %eax
cltq
leaq 0xe14c(%rip), %rcx      # 0x12490
movsd (%rcx,%rax,8), %xmm1
jmp 0x42ef
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: pd_upper_series
double pd_upper_series(double x, double alph) {
  double term = x / alph;
  double sum = term;
  do {
    alph++;
    term *= x / alph;
    sum += term;
  } while (term > sum * DBL_EPSILON);
  return log(sum);
}

// Assembly:
movapd %xmm0, %xmm3
divsd %xmm1, %xmm3
movsd 0xdcc7(%rip), %xmm4     # 0x12090
movsd 0xdcc7(%rip), %xmm5     # 0x12098
movapd %xmm3, %xmm2
addsd %xmm4, %xmm1
movapd %xmm0, %xmm6
divsd %xmm1, %xmm6
mulsd %xmm6, %xmm3
addsd %xmm3, %xmm2
movapd %xmm2, %xmm6
mulsd %xmm5, %xmm6
ucomisd %xmm6, %xmm3
ja 0x43d5
movapd %xmm2, %xmm0
jmp 0x2170
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: pd_lower_series
double pd_lower_series(double lambda, double y) {
  double term = 1, sum = 0;
  while (y >= 1 && term > sum * DBL_EPSILON) {
    term *= y / lambda;
    sum += term;
    y--;
  }
  return log1p(sum);
}

// Assembly:
movapd %xmm0, %xmm2
xorpd %xmm0, %xmm0
ucomisd 0xdc80(%rip), %xmm1     # 0x12090
jb 0x2160
movsd 0xdc72(%rip), %xmm3     # 0x12090
movsd 0xdc7a(%rip), %xmm4     # 0x120a0
movsd 0xdc6a(%rip), %xmm5     # 0x12098
movapd %xmm3, %xmm6
movapd %xmm6, %xmm7
movapd %xmm1, %xmm6
divsd %xmm2, %xmm6
mulsd %xmm7, %xmm6
addsd %xmm6, %xmm0
addsd %xmm4, %xmm1
ucomisd %xmm3, %xmm1
movapd %xmm0, %xmm7
mulsd %xmm5, %xmm7
jb 0x2160
ucomisd %xmm7, %xmm6
ja 0x4432
jmp 0x2160
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: pgamma_smallx
double pgamma_smallx(double x, double alph) {
  double sum = 0.0;
  double c = alph;
  double n = 0.0;
  double term;
  do {
    n++;
    c *= -x / n;
    term = c / (alph + n);
    sum += term;
  } while (fabs(term) > DBL_EPSILON * fabs(sum));
  double lf2 = alph * log(x) - lgamma(alph + 1);
  return R_Log1_Exp(log1p(sum) + lf2);
}

// Assembly:
subq $0x28, %rsp
movapd 0xdd2c(%rip), %xmm9     # 0x121a0
xorpd %xmm0, %xmm9
xorpd %xmm2, %xmm2
movsd 0xdc0b(%rip), %xmm3     # 0x12090
movapd 0xdd03(%rip), %xmm4     # 0x12190
movsd 0xdc03(%rip), %xmm5     # 0x12098
movapd %xmm1, %xmm6
xorpd %xmm10, %xmm10
addsd %xmm3, %xmm2
movapd %xmm9, %xmm7
divsd %xmm2, %xmm7
mulsd %xmm7, %xmm6
movapd %xmm2, %xmm7
addsd %xmm1, %xmm7
movapd %xmm6, %xmm8
divsd %xmm7, %xmm8
addsd %xmm8, %xmm10
movapd %xmm10, %xmm7
andpd %xmm4, %xmm8
andpd %xmm4, %xmm7
mulsd %xmm5, %xmm7
ucomisd %xmm7, %xmm8
ja 0x449e
movsd %xmm1, (%rsp)
movapd %xmm10, 0x10(%rsp)
callq 0x2170
movsd %xmm0, 0x8(%rsp)
movsd 0xdb92(%rip), %xmm0     # 0x12090
addsd (%rsp), %xmm0
callq 0x21f0
movsd 0x8(%rsp), %xmm1
mulsd (%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movapd 0x10(%rsp), %xmm0
callq 0x2160
addsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rsp)
movapd 0x10(%rsp), %xmm0
callq 0x2160
movsd (%rsp), %xmm1
ucomisd 0xdb5d(%rip), %xmm1     # 0x120a8
addsd 0x8(%rsp), %xmm0
jbe 0x4569
callq 0x2210
xorpd 0xdc40(%rip), %xmm0     # 0x121a0
addq $0x28, %rsp
jmp 0x2170
callq 0x22d0
xorpd 0xdc2a(%rip), %xmm0     # 0x121a0
addq $0x28, %rsp
jmp 0x2160
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: pgamma
double pgamma(double x, double alph) {

  if (x < 1)
    // small values of x
    return pgamma_smallx(x, alph);

  else if (x <= alph - 1) {
    // larger alph than x
    double sum = pd_upper_series(x, alph);
    double d = dpois(alph - 1, x);
    return R_Log1_Exp(sum + d);
  }

  // x > alph - 1
  double sum = pd_lower_series(x, alph - 1);
  double d = dpois(alph - 1, x);
  return sum + d;
}

// Assembly:
subq $0x18, %rsp
movapd %xmm0, %xmm6
movsd 0xdb01(%rip), %xmm2     # 0x12090
ucomisd %xmm0, %xmm2
jbe 0x45a2
movapd %xmm6, %xmm0
addq $0x18, %rsp
jmp 0x4467
movsd 0xdaf6(%rip), %xmm3     # 0x120a0
addsd %xmm1, %xmm3
ucomisd %xmm6, %xmm3
movsd %xmm3, 0x10(%rsp)
movsd %xmm6, 0x8(%rsp)
jae 0x45ed
movapd %xmm6, %xmm0
movapd %xmm3, %xmm1
callq 0x4400
movsd %xmm0, (%rsp)
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x434b
addsd (%rsp), %xmm0
addq $0x18, %rsp
retq
movapd %xmm6, %xmm3
divsd %xmm1, %xmm3
movsd 0xda9b(%rip), %xmm4     # 0x12098
movapd %xmm3, %xmm0
addsd %xmm2, %xmm1
movapd %xmm6, %xmm5
divsd %xmm1, %xmm5
mulsd %xmm5, %xmm3
addsd %xmm3, %xmm0
movapd %xmm0, %xmm5
mulsd %xmm4, %xmm5
ucomisd %xmm5, %xmm3
ja 0x4601
callq 0x2170
movsd %xmm0, (%rsp)
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x434b
addsd (%rsp), %xmm0
ucomisd 0xda5d(%rip), %xmm0     # 0x120a8
jbe 0x4663
callq 0x2210
xorpd 0xdb46(%rip), %xmm0     # 0x121a0
addq $0x18, %rsp
jmp 0x2170
callq 0x22d0
xorpd 0xdb30(%rip), %xmm0     # 0x121a0
addq $0x18, %rsp
jmp 0x2160
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: multPval
float multPval(Pileup** pval, int n, uint32_t idx[]) {
  double sum = 0.0;
  int df = 0;
  for (int j = 0; j < n; j++)
    if (pval[j] != NULL && pval[j]->cov[idx[j]] != SKIP) {
      sum += pval[j]->cov[idx[j]];
      df += 2;
    }
  if (df == 0)
    return SKIP;
  if (df == 2 || ! sum)
    return (float) sum;

  // calculate p-value using chi-squared dist.
  double p = pchisq(2.0 * sum / M_LOG10E, df);
  return p > FLT_MAX ? FLT_MAX : (float) p;
}

// Assembly:
pushq %rax
testl %esi, %esi
jle 0x470c
movq %rdi, %rax
movl %esi, %ecx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movss 0xda81(%rip), %xmm1     # 0x12158
xorl %edi, %edi
movq (%rax,%rsi,8), %r8
testq %r8, %r8
je 0x4702
movq 0x8(%r8), %r8
movl (%rdx,%rsi,4), %r9d
movss (%r8,%r9,4), %xmm2
ucomiss %xmm1, %xmm2
jne 0x46f7
jnp 0x4702
cvtss2sd %xmm2, %xmm2
addsd %xmm2, %xmm0
addl $0x2, %edi
incq %rsi
cmpq %rsi, %rcx
jne 0x46d9
jmp 0x4712
xorl %edi, %edi
xorpd %xmm0, %xmm0
testl %edi, %edi
je 0x474c
cmpl $0x2, %edi
je 0x4756
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4726
jnp 0x4756
addsd %xmm0, %xmm0
divsd 0xd98e(%rip), %xmm0     # 0x120c0
callq 0x4679
movsd 0xd989(%rip), %xmm1     # 0x120c8
minsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
jmp 0x475a
movss 0xda04(%rip), %xmm0     # 0x12158
jmp 0x475a
cvtsd2ss %xmm0, %xmm0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: countIntervals2
uint32_t countIntervals2(Chrom* c, int n) {
  uint32_t num = 1;
  uint32_t idx[n];  // indexes into each pval array
  for (int j = 0; j < n; j++)
    idx[j] = 0;
  for (uint32_t k = 1; k < c->len; k++) {
    bool add = false;
    for (int j = 0; j < n; j++)
      if (c->pval[j] != NULL
          && c->pval[j]->end[idx[j]] == k) {
        if (! add) {
          num++;
          add = true;
        }
        idx[j]++;
      }
  }
  return num;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %r12d
movq %rsp, %r15
leaq 0xf(,%r12,4), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
testl %esi, %esi
jle 0x479a
leaq (,%r12,4), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x2140
movl 0x8(%r14), %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jb 0x4808
movl $0x1, %edx
movl $0x1, %esi
testl %ebx, %ebx
jle 0x4802
movq 0x48(%r14), %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
movq (%rdi,%r8,8), %r10
testq %r10, %r10
je 0x47fa
movq (%r10), %r11
movl (%r15,%r8,4), %r10d
cmpl %esi, (%r11,%r10,4)
jne 0x47fa
movzbl %r9b, %r11d
notb %r9b
movzbl %r9b, %r9d
andl $0x1, %r9d
addl %r9d, %eax
testb $0x1, %r11b
cmovel %edx, %r11d
incl %r10d
movl %r10d, (%r15,%r8,4)
movl %r11d, %r9d
incq %r8
cmpq %r8, %r12
jne 0x47c0
incl %esi
cmpl %ecx, %esi
jne 0x47b2
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: printLog
void printLog(File log, bool gzOut, Chrom* chr,
    uint32_t start, int n, uint32_t m, uint32_t j,
    uint32_t k, uint32_t idx[], bool qvalOpt,
    bool sig) {
  if (! n) {
    // single replicate
    printInterval(log, gzOut, chr->name,
      start, chr->pval[n]->end[m],
      chr->expt->cov[j], chr->ctrl->cov[k],
      chr->pval[n]->cov[m], qvalOpt,
      qvalOpt ? chr->qval->cov[m] : SKIP, sig);
  } else {
    // multiple replicates
    printIntervalN(log, gzOut, chr->name,
      start, chr->pval[n]->end[m], chr->pval, n, idx,
      chr->pval[n]->cov[m], qvalOpt,
      qvalOpt ? chr->qval->cov[m] : SKIP, sig);
    // update indexes into pval arrays
    for (int r = 0; r < n; r++)
      if (chr->pval[r] != NULL
          && chr->pval[r]->end[idx[r]] == chr->pval[n]->end[m])
        idx[r]++;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %eax
movq %rdx, %rbx
movb 0x60(%rsp), %r11b
movb 0x58(%rsp), %r10b
movq (%rdx), %rdx
movq 0x48(%rbx), %r9
testl %r8d, %r8d
je 0x50d1
movl %r8d, %r14d
movq 0x50(%rsp), %r15
movslq %r8d, %r12
movq (%r9,%r12,8), %r8
movl %eax, %r13d
movq (%r8), %rax
movq 0x8(%r8), %rbp
movl (%rax,%r13,4), %r8d
movss (%rbp,%r13,4), %xmm0
testb %r10b, %r10b
je 0x5122
movq 0x60(%rbx), %rax
movq 0x8(%rax), %rax
movss (%rax,%r13,4), %xmm1
jmp 0x512a
movq (%r9), %r8
movl %eax, %eax
movq (%r8), %r9
movq 0x8(%r8), %r14
movl (%r9,%rax,4), %r8d
movq 0x28(%rbx), %r9
movq 0x38(%rbx), %r15
movq 0x8(%r9), %r9
movl 0x40(%rsp), %r12d
movss (%r9,%r12,4), %xmm0
movq 0x8(%r15), %r9
movl 0x48(%rsp), %r15d
movss (%r9,%r15,4), %xmm1
movss (%r14,%rax,4), %xmm2
testb %r10b, %r10b
je 0x5188
movq 0x60(%rbx), %r9
movq 0x8(%r9), %r9
movss (%r9,%rax,4), %xmm3
jmp 0x5190
movss 0xd02e(%rip), %xmm1     # 0x12158
movzbl %r11b, %eax
movzbl %r10b, %r10d
movzbl %sil, %esi
pushq %rax
pushq %r10
pushq %r15
pushq %r14
callq 0x4bfe
addq $0x20, %rsp
testl %r14d, %r14d
jle 0x5182
movq 0x48(%rbx), %rax
movl %r14d, %ecx
xorl %edx, %edx
movq (%rax,%rdx,8), %rsi
testq %rsi, %rsi
je 0x517a
movq (%rsi), %rdi
movl (%r15,%rdx,4), %esi
movl (%rdi,%rsi,4), %edi
movq (%rax,%r12,8), %r8
movq (%r8), %r8
cmpl (%r8,%r13,4), %edi
jne 0x517a
incl %esi
movl %esi, (%r15,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x5154
addq $0x8, %rsp
jmp 0x51aa
movss 0xcfc8(%rip), %xmm3     # 0x12158
subq $0x8, %rsp
movzbl %r11b, %eax
movzbl %sil, %esi
movzbl %r10b, %r9d
pushq %rax
callq 0x4eba
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: printPeak
void printPeak(File out, bool gzOut, char* name,
    int64_t start, int64_t end, int count, float signal,
    float pval, float qval, uint32_t pos) {
  if (gzOut) {
    gzprintf(out.gzf, "%s\t%ld\t%ld\tpeak_%d\t%d\t.\t%f\t%f",
      name, start, end, count,
      MIN((unsigned int) (1000.0f * signal / (end - start)
        + 0.5f), 1000),
      signal, pval);
    if (qval == SKIP)
      gzprintf(out.gzf, "\t-1\t%d\n", pos);
    else
      gzprintf(out.gzf, "\t%f\t%d\n", qval, pos);
  } else {
    fprintf(out.f, "%s\t%ld\t%ld\tpeak_%d\t%d\t.\t%f\t%f",
      name, start, end, count,
      MIN((unsigned int) (1000.0f * signal / (end - start)
        + 0.5f), 1000),
      signal, pval);
    if (qval == SKIP)
      fprintf(out.f, "\t-1\t%d\n", pos);
    else
      fprintf(out.f, "\t%f\t%d\n", qval, pos);
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movss %xmm2, 0x14(%rsp)
movaps %xmm0, %xmm2
movq %rdi, %r14
cvtss2sd %xmm0, %xmm0
mulss 0xcdd2(%rip), %xmm2     # 0x1215c
movq %r8, %rax
subq %rcx, %rax
cvtsi2ss %rax, %xmm3
movl 0x30(%rsp), %ebx
divss %xmm3, %xmm2
addss 0xcdbb(%rip), %xmm2     # 0x12160
cvttss2si %xmm2, %rdi
movl $0x3e8, %eax            # imm = 0x3E8
cmpl %eax, %edi
cmovbl %edi, %eax
cvtss2sd %xmm1, %xmm1
testl %esi, %esi
je 0x53fb
movl %eax, (%rsp)
leaq 0xe117(%rip), %rsi      # 0x134dd
movq %r14, %rdi
movb $0x2, %al
callq 0x20e0
movss 0x14(%rsp), %xmm0
ucomiss 0xcd7b(%rip), %xmm0     # 0x12158
jne 0x543a
jp 0x543a
leaq 0xe113(%rip), %rsi      # 0x134fb
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x20e0
movl %eax, (%rsp)
leaq 0xe0d8(%rip), %rsi      # 0x134dd
movq %r14, %rdi
movb $0x2, %al
callq 0x21d0
movss 0x14(%rsp), %xmm0
ucomiss 0xcd3c(%rip), %xmm0     # 0x12158
jne 0x5458
jp 0x5458
leaq 0xe0d4(%rip), %rsi      # 0x134fb
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x21d0
cvtss2sd %xmm0, %xmm0
leaq 0xe0be(%rip), %rsi      # 0x13503
movq %r14, %rdi
movl %ebx, %edx
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x20e0
cvtss2sd %xmm0, %xmm0
leaq 0xe0a0(%rip), %rsi      # 0x13503
movq %r14, %rdi
movl %ebx, %edx
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x21d0
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: checkPeak
void checkPeak(File out, bool gzOut, char* name,
    int64_t start, int64_t end, int* count, float auc,
    float pval, float qval, uint32_t pos, float minAUC,
    int minLen, uint64_t* peakBP) {
  if (start != -1 && auc >= minAUC
      && end - start >= minLen) {
    printPeak(out, gzOut, name, start, end, *count,
      auc, pval, qval, pos);
    (*peakBP) += end - start;
    (*count)++;
  }
}

// Assembly:
cmpq $-0x1, %rcx
je 0x54c3
ucomiss %xmm3, %xmm0
jb 0x54c3
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r8, %r14
subq %rcx, %r14
movslq 0x38(%rsp), %rax
cmpq %rax, %r14
jl 0x54ba
movq %r9, %rbx
movq 0x40(%rsp), %r15
movl 0x30(%rsp), %eax
movl (%r9), %r9d
movl %eax, (%rsp)
movzbl %sil, %esi
callq 0x536b
addq %r14, (%r15)
incl (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: resetVars
void resetVars(int64_t* peakStart, float* summitVal,
    uint32_t* summitLen, float* auc) {
  *peakStart = -1;
  *summitVal = -1.0f;
  *summitLen = 0;
  *auc = 0.0f;
}

// Assembly:
movq $-0x1, (%rdi)
movl $0xbf800000, (%rsi)     # imm = 0xBF800000
xorl %eax, %eax
movl %eax, (%rdx)
movl %eax, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: updatePeak
void updatePeak(int64_t* peakStart, int64_t* peakEnd,
    uint32_t start, uint32_t end, float* auc, float pqval,
    float minPQval, float pval, float qval,
    float* summitVal, float* summitPval, float* summitQval,
    uint32_t* summitPos, uint32_t* summitLen) {
  // update peak AUC, coordinates
  uint32_t len = end - start;
  *auc += len * (pqval - minPQval); // sum AUC
  if (*peakStart == -1)
    *peakStart = start; // start new potential peak
  *peakEnd = end;       // end of potential peak (for now)

  // check if interval is summit for this peak
  if (pqval > *summitVal) {
    *summitVal = pqval;
    *summitPval = pval;
    *summitQval = qval;
    *summitPos = (end + start)/2 - *peakStart; // midpoint of interval
    *summitLen = len;
  } else if (pqval == *summitVal) {
    // update summitPos only if interval is longer
    if (len > *summitLen) {
      *summitPos = (end + start)/2 - *peakStart; // midpoint of interval
      *summitLen = len;
      // assume summitPval, summitQval remain the same
    }
  }
}

// Assembly:
movl %ecx, %eax
subl %edx, %eax
cvtsi2ss %rax, %xmm4
movaps %xmm0, %xmm5
subss %xmm1, %xmm5
mulss %xmm4, %xmm5
addss (%r8), %xmm5
movss %xmm5, (%r8)
cmpq $-0x1, (%rdi)
jne 0x5502
movl %edx, %r8d
movq %r8, (%rdi)
movq 0x20(%rsp), %r8
movl %ecx, %r10d
movq %r10, (%rsi)
movss (%r9), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x5531
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %r10
movss %xmm0, (%r9)
movss %xmm2, (%r10)
movss %xmm3, (%rsi)
jmp 0x553d
ucomiss %xmm0, %xmm1
jne 0x554d
jp 0x554d
cmpl (%r8), %eax
jbe 0x554d
movq 0x18(%rsp), %rsi
addl %edx, %ecx
shrl %ecx
subl (%rdi), %ecx
movl %ecx, (%rsi)
movl %eax, (%r8)
retq
// File: /workspace/github_c_makefile_star2_O1/jsh58[P]Genrich/Genrich.c
// Function: checkChrom
bool checkChrom(char* chr, int xcount, char** xchrList) {
  for (int i = 0; i < xcount; i++)
    if (!strcmp(xchrList[i], chr))
      return true;
  return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %esi, %esi
setg %bpl
jle 0x5fc8
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
movq (%rdx), %rdi
movq %r14, %rsi
callq 0x21b0
testl %eax, %eax
je 0x5fc8
movl %r15d, %r15d
movl $0x1, %ecx
movq %rcx, %r12
cmpq %rcx, %r15
je 0x5fc1
movq (%rbx,%r12,8), %rdi
movq %r14, %rsi
callq 0x21b0
leaq 0x1(%r12), %rcx
testl %eax, %eax
jne 0x5fa4
cmpq %r15, %r12
setb %bpl
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq