LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/optional_mutex/pthread/../main.c
// Function: inc_dec_counter
static void *
inc_dec_counter(void * cookie)
{
	int i;
	int rc;

	(void)cookie; /* UNUSED */

	for (i = 0; i < NUM_TIMES; i++) {
		/* Lock if we're using pthread. */
		if ((rc = optional_mutex_lock(&mutex)) != 0) {
			warn0("optional_mutex_lock: %s", strerror(rc));
			goto err0;
		}

		/* Increment, wait, decrement value. */
		value++;
		millisleep(10);
		value--;

		/* Increment overall counter. */
		counter++;

		/* Unlock if we're using pthread. */
		if ((rc = optional_mutex_unlock(&mutex)) != 0) {
			warn0("optional_mutex_unlock: %s", strerror(rc));
			goto err0;
		}
	}

	/* Success! */
	return (NULL);

err0:
	/* Failure! */
	pthread_exit(NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
pushq $0x65
popq %rbp
leaq 0x2d65(%rip), %r14      # 0x40e8
leaq 0xc9e(%rip), %rbx       # 0x2028
movq %rsp, %r15
leaq 0xcac(%rip), %r12       # 0x2040
decl %ebp
je 0x1400
movq %r14, %rdi
callq 0x17a0
testl %eax, %eax
jne 0x13dd
incl 0x2d66(%rip)            # 0x4110
andq $0x0, (%rsp)
movq $0x989680, 0x8(%rsp)    # imm = 0x989680
movq %r15, %rdi
xorl %esi, %esi
callq 0x1080
decl 0x2d48(%rip)            # 0x4110
incl 0x2d46(%rip)            # 0x4114
movq %r14, %rdi
callq 0x17a5
testl %eax, %eax
je 0x1394
movq %r12, %rbx
movl %eax, %edi
callq 0x1170
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x161c
callq 0x1060
andl $0x0, (%rax)
xorl %edi, %edi
callq 0x10e0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.5/detached.c
// Function: thread_function
void* thread_function (void* thread_arg)
{
	/* Do work here... */
	struct DatosCliente cliente;
	FILE *cuentaPtr, *salida;
	float total = 0;

	salida = fopen("deuda_total.txt", "w");
	
	if ((cuentaPtr = fopen("../../src/capitulo_4/4.5/cliente.dat","r")) == NULL)
		printf("No se puede abrir el archivo\n");
	else
	{
		while (!feof(cuentaPtr))
		{
			fread(&cliente, sizeof(struct DatosCliente), 1, cuentaPtr);
			if (cliente.id != 0){
				total += cliente.deuda;
			}
		}
	}

	fprintf(salida, "%.2f\n", total);
	
	fclose(cuentaPtr);
	fclose(salida);

	complete = 1;

	printf("La deuda total es: %.2f\n", total);

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0xe14(%rip), %rdi       # 0x2008
leaq 0xe1d(%rip), %rsi       # 0x2018
callq 0x10c0
movq %rax, %rbx
leaq 0xe10(%rip), %rdi       # 0x201a
leaq 0xe2e(%rip), %rsi       # 0x203f
callq 0x10c0
movq %rax, %r14
testq %rax, %rax
je 0x126d
xorps %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
leaq -0x6c(%rbp), %r15
pushq $0x3c
popq %r12
pushq $0x1
popq %r13
movq %r14, %rdi
callq 0x1090
testl %eax, %eax
jne 0x1266
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x1040
cmpl $0x0, -0x6c(%rbp)
je 0x1232
movss -0x30(%rbp), %xmm0
addss -0x34(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0x1232
cvtss2sd -0x30(%rbp), %xmm0
jmp 0x127c
leaq 0xe05(%rip), %rdi       # 0x2079
callq 0x1030
xorps %xmm0, %xmm0
leaq 0xdd1(%rip), %rsi       # 0x2054
movq %rbx, %rdi
movsd %xmm0, -0x30(%rbp)
movb $0x1, %al
callq 0x1080
movq %r14, %rdi
callq 0x1050
movq %rbx, %rdi
callq 0x1050
movl $0x1, 0x2dd8(%rip)      # 0x4084
leaq 0xd8e(%rip), %rdi       # 0x2041
movsd -0x30(%rbp), %xmm0
movb $0x1, %al
callq 0x1060
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.5/detached.c
// Function: main
int main ()
{
	pthread_attr_t attr;
	pthread_t thread;
	pthread_attr_init (&attr);
	pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
	pthread_create (&thread, &attr, &thread_function, NULL);
	pthread_attr_destroy (&attr);

	/* Do work here...*/

	struct DatosCliente cliente;
	FILE *cuentaPtr, *salida;

	salida = fopen("deudas_altas.txt", "w");
	
	if ((cuentaPtr = fopen("../../src/capitulo_4/4.5/cliente.dat","r")) == NULL)
		printf("No se puede abrir el archivo\n");
	else
	{
		while (!feof(cuentaPtr))
		{
			fread(&cliente, sizeof(struct DatosCliente), 1, cuentaPtr);
			if (cliente.id != 0){
				if(cliente.deuda > 6000.0)
					fprintf(salida, "%d; %s; %.2f\n", cliente.id,cliente.nombre, cliente.deuda);
			}
		}
	}
	fclose(cuentaPtr);
	fclose(salida);

	while(!complete);

	/* No need to join the second thread.*/

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
leaq -0xa8(%rbp), %rbx
movq %rbx, %rdi
callq 0x1070
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x10a0
leaq -0x129(%rip), %rdx      # 0x11dc
leaq -0x30(%rbp), %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x10b0
movq %rbx, %rdi
callq 0x10d0
leaq 0xd38(%rip), %rdi       # 0x205a
leaq 0xcef(%rip), %rsi       # 0x2018
callq 0x10c0
movq %rax, %rbx
leaq 0xce2(%rip), %rdi       # 0x201a
leaq 0xd00(%rip), %rsi       # 0x203f
callq 0x10c0
movq %rax, %r14
testq %rax, %rax
je 0x13a5
leaq -0x6c(%rbp), %r12
pushq $0x3c
popq %r13
pushq $0x1
popq %r15
movq %r14, %rdi
callq 0x1090
testl %eax, %eax
jne 0x13b1
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1040
movl -0x6c(%rbp), %edx
testl %edx, %edx
je 0x1358
movss -0x34(%rbp), %xmm0
ucomiss 0xc7c(%rip), %xmm0      # 0x2004
jbe 0x1358
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
leaq 0xcd3(%rip), %rsi       # 0x206b
leaq -0x68(%rbp), %rcx
movb $0x1, %al
callq 0x1080
jmp 0x1358
leaq 0xccd(%rip), %rdi       # 0x2079
callq 0x1030
movq %r14, %rdi
callq 0x1050
movq %rbx, %rdi
callq 0x1050
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mesbahamin[P]star-sim/src/star.c
// Function: star_accelerate
void star_accelerate(struct Star *s, float angle, float acceleration)
{
    struct Vec2d *new_vec = vec2d_add(s->angle, s->speed, angle, acceleration);
    s->angle = new_vec->angle;
    s->speed = new_vec->length;
    free(new_vec);
}

// Assembly:
pushq %rbx
movaps %xmm1, %xmm3
movaps %xmm0, %xmm2
movq %rdi, %rbx
movss (%rdi), %xmm0
movss 0x4(%rdi), %xmm1
callq 0x2694
movss (%rax), %xmm0
movss %xmm0, (%rbx)
movss 0x4(%rax), %xmm0
movss %xmm0, 0x4(%rbx)
movq %rax, %rdi
popq %rbx
jmp 0x11b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/redis-cli.c
// Function: cliRefreshPrompt
static void cliRefreshPrompt(void) {
    int len;

    if (config.hostsocket != NULL)
        len = snprintf(config.prompt,sizeof(config.prompt),"redis %s",
                       config.hostsocket);
    else
        len = snprintf(config.prompt,sizeof(config.prompt),
                       strchr(config.hostip,':') ? "[%s]:%d" : "%s:%d",
                       config.hostip, config.hostport);
    /* Add [dbnum] if needed */
    if (config.dbnum != 0)
        len += snprintf(config.prompt+len,sizeof(config.prompt)-len,"[%d]",
            config.dbnum);
    snprintf(config.prompt+len,sizeof(config.prompt)-len,"> ");
}

// Assembly:
pushq %rbx
movq 0x2fab6(%rip), %rcx     # 0x41d48
testq %rcx, %rcx
je 0x122b3
leaq 0x2fb3a(%rip), %rdi     # 0x41dd8
leaq 0x1d6a8(%rip), %rdx     # 0x2f94d
movl $0x80, %esi
xorl %eax, %eax
callq 0xd1e0
jmp 0x122f7
movq 0x2fa7e(%rip), %rbx     # 0x41d38
pushq $0x3a
popq %rsi
movq %rbx, %rdi
callq 0xd1c0
testq %rax, %rax
leaq 0x1d68f(%rip), %rax     # 0x2f95e
leaq 0x1d680(%rip), %rdx     # 0x2f956
cmoveq %rax, %rdx
movl 0x2fa5f(%rip), %r8d     # 0x41d40
leaq 0x2faf0(%rip), %rdi     # 0x41dd8
movl $0x80, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0xd1e0
movl %eax, %ebx
movl 0x2fa61(%rip), %ecx     # 0x41d60
testl %ecx, %ecx
je 0x12330
movslq %ebx, %rbx
leaq 0x2fa2b(%rip), %rax     # 0x41d38
leaq (%rbx,%rax), %rdi
addq $0xa0, %rdi
movl $0x80, %esi
subq %rbx, %rsi
leaq 0x1d63d(%rip), %rdx     # 0x2f964
xorl %eax, %eax
callq 0xd1e0
addl %eax, %ebx
movslq %ebx, %rax
leaq 0x2f9fe(%rip), %rcx     # 0x41d38
leaq (%rax,%rcx), %rdi
addq $0xa0, %rdi
movl $0x80, %esi
subq %rax, %rsi
leaq 0x1dd98(%rip), %rdx     # 0x300ec
xorl %eax, %eax
popq %rbx
jmp 0xd1e0
// File: /workspace/github_c_makefile_star2_O2/sos22[P]unexec/unexec.c
// Function: free_with_mmap
static void free_with_mmap(void const * what) {
    if (what == NULL) return;
    size_t const * sizes = what;
    sizes--;
    assert(sizes[0] != 0);
    assert(!(sizes[0] & (PAGE_SIZE - 1)));
    munmap((void *)sizes, sizes[0]); }

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x1293
movq -0x8(%rdi), %rsi
testq %rsi, %rsi
je 0x1295
movq %rsi, %rax
shlq $0x34, %rax
jne 0x12ae
addq $-0x8, %rdi
popq %rbp
jmp 0x1130
popq %rbp
retq
leaq 0x1d74(%rip), %rdi      # 0x3010
leaq 0x1d7b(%rip), %rsi      # 0x301e
leaq 0x1d7d(%rip), %rcx      # 0x3027
pushq $0x75
jmp 0x12c5
leaq 0x1d94(%rip), %rdi      # 0x3049
leaq 0x1d62(%rip), %rsi      # 0x301e
leaq 0x1d64(%rip), %rcx      # 0x3027
pushq $0x76
popq %rdx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O2/sos22[P]unexec/unexec.c
// Function: alloc_with_mmap
static void * alloc_with_mmap(size_t sz) {
    sz = (sz + sizeof(size_t) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
    void * res = mmap(NULL,
                      sz,
                      PROT_READ|PROT_WRITE,
                      MAP_PRIVATE|MAP_ANONYMOUS,
                      -1,
                      0);
    assert(res != MAP_FAILED);
    size_t * res_sz = res;
    res_sz[0] = sz;
    return res_sz + 1; }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x1007, %rbx           # imm = 0x1007
andq $-0x1000, %rbx          # imm = 0xF000
pushq $0x3
popq %rdx
pushq $0x22
popq %rcx
pushq $-0x1
popq %r8
xorl %edi, %edi
movq %rbx, %rsi
xorl %r9d, %r9d
callq 0x1080
cmpq $-0x1, %rax
je 0x2303
movq %rbx, (%rax)
addq $0x8, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xdb3(%rip), %rdi       # 0x30bd
leaq 0xd0d(%rip), %rsi       # 0x301e
leaq 0xdb7(%rip), %rcx       # 0x30cf
pushq $0x6c
popq %rdx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O2/sos22[P]unexec/unexec.c
// Function: alloc_in_trampoline
static void * alloc_in_trampoline(size_t sz, struct trampoline * tramp) {
    static char failure[PAGE_SIZE];
    assert(sz < sizeof(failure));
    tramp->used += sz;
    if (tramp->used > tramp->allocated) return failure;
    else return tramp->allocator + tramp->used - sz; }

// Assembly:
cmpq $0x1000, %rdi           # imm = 0x1000
jae 0x234a
movl 0x4(%rsi), %eax
addl %edi, %eax
movl %eax, 0x4(%rsi)
leaq (%rax,%rsi), %rcx
subq %rdi, %rcx
subq $-0x80, %rcx
cmpl (%rsi), %eax
leaq 0x2d9b(%rip), %rax      # 0x50e0
cmovbeq %rcx, %rax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0xe0d(%rip), %rdi       # 0x3162
leaq 0xcc2(%rip), %rsi       # 0x301e
leaq 0xe14(%rip), %rcx       # 0x3177
movl $0x8f, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O2/sos22[P]unexec/unexec.c
// Function: strdup_in_trampoline
static char * strdup_in_trampoline(const char *what, struct trampoline * tramp){
    size_t sz = strlen(what);
    void * res = alloc_in_trampoline(sz + 1, tramp);
    memcpy(res, what, sz + 1);
    return res; }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1070
leaq 0x1(%rax), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2320
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1110
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/comment.c
// Function: redditCommentFreeReplies
EXPORT_SYMBOL void redditCommentFreeReplies (RedditComment *comment)
{
    int i;
    if (comment == NULL)
        return ;
    for (i = 0; i < comment->replyCount; i++)
        redditCommentFree(comment->replies[i]);

    free(comment->replies);
}

// Assembly:
testq %rdi, %rdi
je 0x23cc
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movslq (%rbx), %rax
movq 0x8(%rbx), %rdi
cmpq %rax, %r14
jge 0x23c0
movq (%rdi,%r14,8), %rdi
callq 0x20f0
incq %r14
jmp 0x23a6
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/comment.c
// Function: redditCommentFree
EXPORT_SYMBOL void redditCommentFree (RedditComment *comment)
{
    if (comment == NULL)
        return ;

    free(comment->body);
    free(comment->bodyEsc);
    free(comment->wbodyEsc);
    free(comment->id);
    free(comment->author);
    free(comment->parentId);
    free(comment->linkId);
    redditCommentFreeChildren(comment);
    free(comment->childrenId);
    redditCommentFreeReplies(comment);
    free(comment);
}

// Assembly:
testq %rdi, %rdi
je 0x2437
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
callq 0x2050
movq 0x40(%rbx), %rdi
callq 0x2050
movq 0x48(%rbx), %rdi
callq 0x2050
movq 0x18(%rbx), %rdi
callq 0x2050
movq 0x20(%rbx), %rdi
callq 0x2050
movq 0x28(%rbx), %rdi
callq 0x2050
movq 0x30(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2438
movq 0x68(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2120
movq %rbx, %rdi
popq %rbx
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/comment.c
// Function: redditCommentFreeChildren
static void redditCommentFreeChildren (RedditComment *comment)
{
    int i;
    if (comment == NULL || comment->directChildrenIds == NULL)
        return ;

    for (i = 0; i < comment->directChildrenCount; i++)
        free(comment->directChildrenIds[i]);

    free(comment->directChildrenIds);
    comment->directChildrenIds = NULL;
}

// Assembly:
testq %rdi, %rdi
je 0x247a
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x70(%rdi)
je 0x2473
xorl %r14d, %r14d
movslq 0x60(%rbx), %rax
movq 0x70(%rbx), %rdi
cmpq %rax, %r14
jge 0x2469
movq (%rdi,%r14,8), %rdi
callq 0x2050
incq %r14
jmp 0x244e
callq 0x2050
andq $0x0, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/comment.c
// Function: redditCommentAddReply
EXPORT_SYMBOL void redditCommentAddReply (RedditComment *comment, RedditComment *reply)
{
    comment->replyCount++;
    RedditComment* ptr = comment;
    while (ptr != NULL) {
        ptr->totalReplyCount += reply->totalReplyCount + 1;
        ptr = ptr->parent;
    }
    comment->replies = rrealloc(comment->replies, (comment->replyCount) * sizeof(RedditComment*));
    comment->replies[comment->replyCount - 1] = reply;
    reply->parent = comment;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movslq (%rdi), %rsi
incq %rsi
movl %esi, (%rdi)
movq %rdi, %rax
testq %rax, %rax
je 0x24a8
movl 0x5c(%rbx), %ecx
movl 0x5c(%rax), %edx
addl %edx, %ecx
incl %ecx
movl %ecx, 0x5c(%rax)
movq 0x10(%rax), %rax
jmp 0x2490
movq 0x8(%r14), %rdi
shlq $0x3, %rsi
callq 0x34f5
movq %rax, 0x8(%r14)
movslq (%r14), %rcx
movq %rbx, -0x8(%rax,%rcx,8)
movq %r14, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/comment.c
// Function: redditCommentListFree
EXPORT_SYMBOL void redditCommentListFree (RedditCommentList *list)
{
    if (list == NULL)
        return ;
    redditCommentFree(list->baseComment);
    redditLinkFree(list->post);
    free(list->permalink);
    free(list->id);
    free(list);
}

// Assembly:
testq %rdi, %rdi
je 0x2517
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x20f0
movq 0x8(%rbx), %rdi
callq 0x21b0
movq 0x10(%rbx), %rdi
callq 0x2050
movq 0x18(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/comment.c
// Function: getCommentReplies
DEF_TOKEN_CALLBACK(getCommentReplies)
{
    ARG_COMMENT_LISTING
    char *kindStr = NULL;

    TokenIdent ids[] = {
        ADD_TOKEN_IDENT_STRING("kind", kindStr),
        ADD_TOKEN_IDENT_FUNC  ("data", getCommentListHelper),
        {0}
    };

    parseTokens(parser, ids, list, comment);
    free(kindStr);
}

// Assembly:
movq %rdx, %rax
movl (%rdx), %esi
cmpq $0x29, %rsi
jae 0x28d1
movq 0x10(%rax), %rdx
movq %rsi, %rcx
addq $0x8, %rcx
movl %ecx, (%rax)
movq (%rdx,%rsi), %rdx
cmpl $0x20, %esi
ja 0x28e0
addq 0x10(%rax), %rcx
addl $0x10, %esi
movl %esi, (%rax)
jmp 0x28ec
movq 0x8(%rax), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq (%rcx), %rdx
movq 0x8(%rax), %rcx
leaq 0x8(%rcx), %rsi
movq %rsi, 0x8(%rax)
pushq %rbx
subq $0xc0, %rsp
movq (%rcx), %rcx
leaq 0x8(%rsp), %rbx
andq $0x0, (%rbx)
leaq 0x37ff(%rip), %rax      # 0x6106
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq $0x2, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsi)
andl $0x0, 0x28(%rsi)
movb $0x1, 0x2c(%rsi)
andq $0x0, 0x30(%rsi)
leaq 0x37d5(%rip), %rax      # 0x610b
movq %rax, 0x38(%rsi)
movabsq $0x200000003, %rax      # imm = 0x200000003
movq %rax, 0x40(%rsi)
movups %xmm0, 0x48(%rsi)
movups %xmm0, 0x55(%rsi)
leaq 0x1a3(%rip), %rax       # 0x2afa
movq %rax, 0x68(%rsi)
movaps %xmm0, 0x70(%rsi)
movaps %xmm0, 0x80(%rsi)
movaps %xmm0, 0x90(%rsi)
andq $0x0, 0xa0(%rsi)
xorl %eax, %eax
callq 0x47af
movq (%rbx), %rdi
callq 0x2050
addq $0xc0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/comment.c
// Function: redditGetCommentList
EXPORT_SYMBOL RedditErrno redditGetCommentList (RedditCommentList *list)
{
    char fullLink[2048], *kindStr = NULL;
    TokenParserResult res;

    TokenIdent ids[] = {
        ADD_TOKEN_IDENT_STRING("id",   list->id),
        ADD_TOKEN_IDENT_STRING("kind", kindStr),
        ADD_TOKEN_IDENT_FUNC  ("data", getCommentListHelper),
        {0}
    };

    strcpy(fullLink, REDDIT_URL);
    strcat(fullLink, list->permalink);
    strcat(fullLink, REDDIT_JSON);

    if (list->baseComment == NULL)
        list->baseComment = redditCommentNew();

    res = redditRunParser(fullLink, NULL, ids, list, list->baseComment);

    free(kindStr);

    if (res == TOKEN_PARSER_SUCCESS)
        return REDDIT_SUCCESS;
    else
        return REDDIT_ERROR_RESPONSE;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x8f8, %rsp            # imm = 0x8F8
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
andq $0x0, (%rax)
leaq 0x370b(%rip), %rcx      # 0x60b5
movq %rcx, 0x10(%rsp)
pushq $0x2
popq %rcx
movq %rcx, 0x18(%rsp)
leaq 0x18(%rdi), %rdx
movq %rdx, 0x20(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rsp)
andl $0x0, 0x38(%rsp)
movb $0x1, %dl
movb %dl, 0x3c(%rsp)
andq $0x0, 0x40(%rsp)
leaq 0x3726(%rip), %rsi      # 0x6106
movq %rsi, 0x48(%rsp)
movq %rcx, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movaps %xmm0, 0x60(%rsp)
andl $0x0, 0x70(%rsp)
movb %dl, 0x74(%rsp)
andq $0x0, 0x78(%rsp)
leaq 0x3701(%rip), %rax      # 0x610b
movq %rax, 0x80(%rsp)
movabsq $0x200000003, %rax      # imm = 0x200000003
movq %rax, 0x88(%rsp)
movups %xmm0, 0x9d(%rsp)
movaps %xmm0, 0x90(%rsp)
leaq 0xbf(%rip), %rax        # 0x2afa
movq %rax, 0xb0(%rsp)
movups %xmm0, 0xb8(%rsp)
andq $0x0, 0xe8(%rsp)
movups %xmm0, 0xc8(%rsp)
movups %xmm0, 0xd8(%rsp)
movabsq $0x6d6f632e746964, %rax # imm = 0x6D6F632E746964
leaq 0xf0(%rsp), %r14
movq %rax, 0xe(%r14)
movups 0x368f(%rip), %xmm0     # 0x6110
movaps %xmm0, (%r14)
movq 0x10(%rdi), %rsi
movq %r14, %rdi
callq 0x2260
movq %r14, %rdi
callq 0x20d0
movl $0x6f736a2e, 0xf0(%rsp,%rax) # imm = 0x6F736A2E
movw $0x6e, 0xf4(%rsp,%rax)
movq (%rbx), %r8
testq %r8, %r8
jne 0x2ac1
callq 0x2110
movq %rax, %r8
movq %rax, (%rbx)
leaq 0xf0(%rsp), %rdi
leaq 0x10(%rsp), %rdx
xorl %esi, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4ac0
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
movq 0x8(%rsp), %rdi
callq 0x2050
addl %ebx, %ebx
movl %ebx, %eax
addq $0x8f8, %rsp            # imm = 0x8F8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/comment.c
// Function: redditGetCommentChildren
EXPORT_SYMBOL RedditErrno redditGetCommentChildren (RedditCommentList *list, RedditComment *parent)
{
    TokenParserResult res;
    char postText[4096];
    int i, endCount, children;
    int preCheck;

    TokenIdent ids[] = {
        ADD_TOKEN_IDENT_FUNC  ("things", getMoreChildren),
        {0}
    };

    sprintf(postText, "api_type=json&link_id=t3_%s&children=", list->post->id);
    if (parent->directChildrenCount > 20)
        children = 20;
    else
        children = parent->directChildrenCount;

    if (children == 0)
        return REDDIT_ERROR;

    strcat(postText, parent->directChildrenIds[0]);
    for (i = 1; i < children; i++) {
        strcat(postText, ",");
        strcat(postText, parent->directChildrenIds[i]);
    }

    preCheck = parent->totalReplyCount;

    res = redditRunParser(REDDIT_API_MORECHILDREN, postText, ids, list, parent);

    if (preCheck == parent->totalReplyCount)
        parent->totalReplyCount -= children;

    endCount = parent->directChildrenCount - children;
    for (i = parent->directChildrenCount - 1; i >= endCount; i--)
        free(parent->directChildrenIds[i]);

    parent->directChildrenCount = endCount;

    if (res == TOKEN_PARSER_SUCCESS)
        return REDDIT_SUCCESS;
    else
        return REDDIT_ERROR_RESPONSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1088, %rsp           # imm = 0x1088
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x5ffc(%rip), %rsi      # 0x8cf0
pushq $0xe
popq %rcx
leaq 0x10(%rsp), %rdi
rep  movsq (%rsi), %es:(%rdi)
movq 0x8(%r14), %rax
movq 0x8(%rax), %rdx
leaq 0x341f(%rip), %rsi      # 0x612d
leaq 0x80(%rsp), %rdi
xorl %eax, %eax
callq 0x2290
movl 0x60(%rbx), %eax
cmpl $0x14, %eax
pushq $0x14
popq %r12
cmovll %eax, %r12d
testl %eax, %eax
je 0x2de7
movq %r14, 0x8(%rsp)
movq 0x70(%rbx), %rbp
movq (%rbp), %rsi
leaq 0x80(%rsp), %r15
movq %r15, %rdi
callq 0x2260
movslq %r12d, %r13
pushq $0x1
popq %r14
cmpq %r13, %r14
jge 0x2d80
movq %r15, %rdi
callq 0x20d0
movw $0x2c, 0x80(%rsp,%rax)
movq (%rbp,%r14,8), %rsi
movq %r15, %rdi
callq 0x2260
incq %r14
jmp 0x2d57
movl 0x5c(%rbx), %r14d
leaq 0x33c8(%rip), %rdi      # 0x6153
leaq 0x80(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x4ac0
movl %eax, %ebp
cmpl 0x5c(%rbx), %r14d
jne 0x2db6
subl %r12d, %r14d
movl %r14d, 0x5c(%rbx)
movslq 0x60(%rbx), %r15
movq %r15, %r14
subq %r13, %r14
cmpq %r14, %r15
jle 0x2dd8
movq 0x70(%rbx), %rax
movq -0x8(%rax,%r15,8), %rdi
decq %r15
callq 0x2050
jmp 0x2dc0
movl %r14d, 0x60(%rbx)
xorl %eax, %eax
testl %ebp, %ebp
setne %al
addl %eax, %eax
jmp 0x2dea
pushq $0x1
popq %rax
addq $0x1088, %rsp           # imm = 0x1088
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/comment.c
// Function: getMoreChildren
DEF_TOKEN_CALLBACK(getMoreChildren)
{
    ARG_MORECHILDREN
    char *kind = NULL;
    int arry_size = parser->tokens[parser->currentToken].size;
    int i = 0;

    TokenIdent ids[] = {
        ADD_TOKEN_IDENT_STRING("kind", kind), /* Note -- Keep this key first in
                                                 the array, or change the
                                                 number in readChild */
        ADD_TOKEN_IDENT_FUNC("data", readChild),
        {0}
    };

    parser->currentToken++;
    for (; i < arry_size; i++) {
        int nextObj = parser->currentToken + parser->tokens[parser->currentToken].full_size + 1;
        parseTokens(parser, ids, list, parent);
        free(kind);
        kind = NULL;
        parser->currentToken = nextObj;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
movl (%rdx), %ecx
cmpq $0x29, %rcx
jae 0x2e39
movq 0x10(%rdx), %rsi
movq %rcx, %rax
addq $0x8, %rax
movl %eax, (%rdx)
movq (%rsi,%rcx), %r14
cmpl $0x20, %ecx
ja 0x2e48
addq 0x10(%rdx), %rax
addl $0x10, %ecx
movl %ecx, (%rdx)
jmp 0x2e54
movq 0x8(%rdx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdx)
movq (%rax), %r14
movq 0x8(%rdx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdx)
movq (%rax), %r15
leaq 0x8(%rsp), %rax
andq $0x0, (%rax)
movq 0x8(%rbx), %rcx
movslq 0x14(%rbx), %rdx
imulq $0x1c, %rdx, %rsi
movl 0xc(%rcx,%rsi), %ebp
leaq 0x328f(%rip), %rcx      # 0x6106
leaq 0x10(%rsp), %r12
movq %rcx, (%r12)
movq $0x2, 0x8(%r12)
movq %rax, 0x10(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r12)
andl $0x0, 0x28(%r12)
movb $0x1, 0x2c(%r12)
andq $0x0, 0x30(%r12)
leaq 0x325b(%rip), %rax      # 0x610b
movq %rax, 0x38(%r12)
movabsq $0x200000003, %rax      # imm = 0x200000003
movq %rax, 0x40(%r12)
movups %xmm0, 0x48(%r12)
movups %xmm0, 0x55(%r12)
leaq 0x15e(%rip), %rax       # 0x3035
movq %rax, 0x68(%r12)
movaps %xmm0, 0x70(%r12)
andq $0x0, 0xa0(%r12)
movaps %xmm0, 0x80(%r12)
movaps %xmm0, 0x90(%r12)
leal 0x1(%rdx), %r13d
movl %r13d, 0x14(%rbx)
xorl %eax, %eax
testl %ebp, %ebp
cmovlel %eax, %ebp
subl $0x1, %ebp
jb 0x2f50
movq 0x8(%rbx), %rax
movslq %r13d, %rcx
imulq $0x1c, %rcx, %rdx
movl 0x14(%rax,%rdx), %eax
leal (%rcx,%rax), %r13d
incl %r13d
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x47af
movq 0x8(%rsp), %rdi
callq 0x2050
andq $0x0, 0x8(%rsp)
movl %r13d, 0x14(%rbx)
jmp 0x2f0c
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/comment.c
// Function: redditCommentAddMore
static void redditCommentAddMore (TokenParser *parser, RedditComment *parent)
{
    int i;

    redditCommentFreeChildren(parent);

    parent->directChildrenCount = parser->tokens[parser->currentToken].full_size;
    parent->directChildrenIds = rmalloc(parent->directChildrenCount * sizeof(char*));

    for (i = 0; i < parent->directChildrenCount; i++) {
        parser->currentToken++;
        parent->directChildrenIds[i] = getCopyOfToken(parser->block->memory, parser->tokens[parser->currentToken]);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2438
movq 0x8(%r14), %rax
movslq 0x14(%r14), %rcx
imulq $0x1c, %rcx, %rcx
movslq 0x14(%rax,%rcx), %rdi
movl %edi, 0x60(%rbx)
shlq $0x3, %rdi
callq 0x34e0
movq %rax, 0x70(%rbx)
xorl %r15d, %r15d
movslq 0x60(%rbx), %rax
cmpq %rax, %r15
jge 0x302b
movslq 0x14(%r14), %rax
incq %rax
movl %eax, 0x14(%r14)
movq (%r14), %rcx
movq 0x8(%r14), %rdx
movq (%rcx), %rdi
imulq $0x1c, %rax, %rax
movups (%rdx,%rax), %xmm0
movups 0xc(%rdx,%rax), %xmm1
movups %xmm1, 0x2c(%rsp)
movaps %xmm0, 0x20(%rsp)
movups 0x2c(%rsp), %xmm0
movups %xmm0, 0xc(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x42c7
movq 0x70(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
jmp 0x2fd1
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/comment.c
// Function: readChild
DEF_TOKEN_CALLBACK(readChild)
{
    ARG_MORECHILDREN

    struct MoreChildren child = {0};
    RedditComment *comment, *foundParent;

    TokenIdent ids[] = {
        ADD_TOKEN_IDENT_STRING("parent_id",child.parent),
        ADD_TOKEN_IDENT_INT   ("count",    child.count),
        ADD_TOKEN_IDENT_FUNC  ("children", readMore),
        {0}
    };

    /* Note: Requires 'kind' to be the first key in the ids array */
    if (strcmp(*((char**)idents[0].value), "more") == 0) {
        parseTokens(parser, ids, parent, &child);
        free(child.parent);
    } else {
        comment = redditGetComment(parser, list);

        foundParent = redditCommentFindParent(parent, comment->parentId);
        if (foundParent == NULL)
            free(foundParent);
        else
            redditCommentAddReply(foundParent, comment);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xf0, %rsp
movq %rdi, %rbx
movl (%rdx), %ecx
cmpq $0x29, %rcx
jae 0x306d
movq 0x10(%rdx), %rdi
movq %rcx, %rax
addq $0x8, %rax
movl %eax, (%rdx)
movq (%rdi,%rcx), %r14
cmpl $0x20, %ecx
ja 0x307c
addq 0x10(%rdx), %rax
addl $0x10, %ecx
movl %ecx, (%rdx)
jmp 0x3088
movq 0x8(%rdx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdx)
movq (%rax), %r14
movq 0x8(%rdx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdx)
movq (%rax), %r15
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
leaq 0x301d(%rip), %rcx      # 0x60b8
movq %rcx, 0x10(%rsp)
movq $0x2, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movups %xmm0, 0x28(%rsp)
andl $0x0, 0x38(%rsp)
movb $0x1, 0x3c(%rsp)
andq $0x0, 0x40(%rsp)
leaq 0x30b5(%rip), %rax      # 0x617f
movq %rax, 0x48(%rsp)
movq $0x1, 0x50(%rsp)
leaq 0x8(%rsp), %rax
movq %rax, 0x58(%rsp)
andq $0x0, 0x78(%rsp)
movaps %xmm0, 0x60(%rsp)
andq $0x0, 0x6d(%rsp)
leaq 0x308b(%rip), %rax      # 0x6185
movq %rax, 0x80(%rsp)
movabsq $0x200000003, %rax      # imm = 0x200000003
movq %rax, 0x88(%rsp)
movaps %xmm0, 0x90(%rsp)
movups %xmm0, 0x9d(%rsp)
leaq 0x99(%rip), %rax        # 0x31c4
movq %rax, 0xb0(%rsp)
movups %xmm0, 0xd8(%rsp)
andq $0x0, 0xe8(%rsp)
movups %xmm0, 0xc8(%rsp)
movups %xmm0, 0xb8(%rsp)
movq 0x10(%rsi), %rax
movq (%rax), %rdi
leaq 0x302c(%rip), %rsi      # 0x618e
callq 0x2160
testl %eax, %eax
je 0x3197
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2518
movq %rax, %rbx
movq 0x28(%rax), %rsi
movq %r15, %rdi
callq 0x3253
testq %rax, %rax
je 0x31b7
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2190
jmp 0x31b7
leaq 0x10(%rsp), %rsi
movq %rsp, %r14
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x47af
movq (%r14), %rdi
callq 0x2050
addq $0xf0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/comment.c
// Function: readMore
DEF_TOKEN_CALLBACK(readMore)
{
    RedditComment *base        = va_arg(args, RedditComment*);
    struct MoreChildren *child = va_arg(args, struct MoreChildren*);


    RedditComment *parent = redditCommentFindParent(base, child->parent);

    if (parent == NULL) {
        /* If we didn't find parent, we just advance past the array */
        parser->currentToken += parser->tokens[parser->currentToken].full_size;
    } else {
        redditCommentAddMore(parser, parent);
        parent->totalReplyCount = child->count;
    }

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdx), %ecx
cmpq $0x29, %rcx
jae 0x31f5
movq 0x10(%rdx), %rsi
movq %rcx, %rax
addq $0x8, %rax
movl %eax, (%rdx)
movq (%rsi,%rcx), %rdi
cmpl $0x20, %ecx
ja 0x3204
addq 0x10(%rdx), %rax
addl $0x10, %ecx
movl %ecx, (%rdx)
jmp 0x3210
movq 0x8(%rdx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdx)
movq (%rax), %rdi
movq 0x8(%rdx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdx)
movq (%rax), %r15
movq (%r15), %rsi
callq 0x3253
testq %rax, %rax
je 0x3238
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2f96
movl 0x8(%r15), %eax
movl %eax, 0x5c(%r14)
jmp 0x324d
movq 0x8(%rbx), %rax
movslq 0x14(%rbx), %rcx
imulq $0x1c, %rcx, %rdx
movl 0x14(%rax,%rdx), %eax
addl %ecx, %eax
movl %eax, 0x14(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/comment.c
// Function: redditCommentFindParent
static RedditComment *redditCommentFindParent (RedditComment *base, char *parentId)
{
    char pid[8];
    RedditComment *current;

    int stackSize = 100;
    RedditComment **stack = rmalloc(sizeof(RedditComment*) * stackSize);;
    int top = 0;

    /* We might have, Ex. 't1_idvalu', we just want 'idvalu' from that */
    if (parentId[2] == '_')
        strcpy(pid, parentId + 3);
    else
        strcpy(pid, parentId);

    stack[0] = base;
    top = 0;
    /* Keep looping and decrementing our stack index until it's under zero */
    for(; top >= 0; top--) {

        /* Grab the RedditComment on the top of the stack */
        current = stack[top];

        /* If it's the right one, jump to the cleanup code */
        if (strcmp(pid, current->id) == 0)
            goto cleanup;

        /* If it's not and it has some replies to it, add all the replies to
         * the stack and keep going */
        if (current->replyCount > 0) {
            if (top + current->replyCount >= stackSize) {
                stackSize += current->replyCount;
                stack = realloc(stack, sizeof(RedditComment*) * stackSize);
            }
            /* Copy the contents of the replies array right onto the stack. */
            memcpy(stack + top, current->replies, current->replyCount * sizeof(RedditComment*));
            top += current->replyCount;
        }
    }

    current = NULL;

cleanup:;
    free(stack);
    return current;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x320, %edi            # imm = 0x320
callq 0x34e0
xorl %ecx, %ecx
cmpb $0x5f, 0x2(%r14)
movq %rax, %rbx
sete %cl
leaq (%rcx,%rcx,2), %rsi
addq %r14, %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x2080
movq %r15, (%rbx)
pushq $0x64
popq %rbp
xorl %r12d, %r12d
testl %r12d, %r12d
js 0x3306
movl %r12d, %r13d
movq (%rbx,%r13,8), %r15
movq 0x18(%r15), %rsi
movq %r14, %rdi
callq 0x2160
testl %eax, %eax
je 0x3309
movl (%r15), %eax
testl %eax, %eax
jle 0x3301
leal (%rax,%r12), %ecx
cmpl %ebp, %ecx
jl 0x32ea
movl %ebp, %ecx
movq %r14, %rbp
movl %eax, %r14d
addl %ecx, %r14d
leaq (,%r14,8), %rsi
movq %rbx, %rdi
callq 0x21e0
movq %rax, %rbx
movl (%r15), %eax
movl %r14d, %ecx
movq %rbp, %r14
movl %ecx, %ebp
leaq (%rbx,%r13,8), %rdi
movq 0x8(%r15), %rsi
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x2180
addl (%r15), %r12d
decl %r12d
jmp 0x3296
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x2050
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/cookie.c
// Function: redditCookieNew
EXPORT_SYMBOL void redditCookieNew(char *name, char *data)
{
    RedditCookieLink *link = rmalloc(sizeof(RedditCookieLink));

    link->name = rmalloc(strlen(name) + 1);
    link->data = rmalloc(strlen(data) + 1);

    strcpy(link->name, name);
    strcpy(link->data, data);

    /*
     * If for whatever reason we don't have an allocated reddit-state yet
     * Make a new one
     */
    if (currentRedditState == NULL)
        currentRedditState = redditStateNew();

    /* Attach the link */
    link->next = currentRedditState->base;
    currentRedditState->base = link;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x18
popq %rdi
callq 0x34e0
movq %rax, %rbx
movq %r15, %rdi
callq 0x20d0
leaq 0x1(%rax), %rdi
callq 0x34e0
movq %rax, 0x8(%rbx)
movq %r14, %rdi
callq 0x20d0
leaq 0x1(%rax), %rdi
callq 0x34e0
movq %rax, 0x10(%rbx)
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x2080
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x2080
leaq 0x5de5(%rip), %r14      # 0x9168
movq (%r14), %rax
testq %rax, %rax
jne 0x3395
xorl %eax, %eax
callq 0x2230
movq %rax, (%r14)
movq (%rax), %rax
movq %rax, (%rbx)
movq (%r14), %rax
movq %rbx, (%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/cookie.c
// Function: redditCookieFree
EXPORT_SYMBOL void redditCookieFree(RedditCookieLink *link)
{
    if (link == NULL)
        return ;
    free(link->name);
    free(link->data);
    free(link);
}

// Assembly:
testq %rdi, %rdi
je 0x33cb
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x2050
movq 0x10(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/cookie.c
// Function: redditRemoveCookie
EXPORT_SYMBOL void redditRemoveCookie(char *name)
{
    RedditCookieLink *prev = NULL, *node;

    /* Incase no state has yet been set */
    if (currentRedditState == NULL) return ;

    for(node = currentRedditState->base; node != NULL; prev = node, node = node->next) {
        if (strcmp(node->name, name) == 0) {
            /* Found the node */
            if (prev != NULL)
                prev->next = node->next;
            else
                currentRedditState->base = node->next;

            redditCookieFree(node);
            break;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x5d8d(%rip), %rax      # 0x9168
movq (%rax), %r15
testq %r15, %r15
je 0x342a
movq %rdi, %rbx
xorl %r14d, %r14d
movq %r15, %rcx
movq %r14, %r12
movq (%rcx), %r14
testq %r14, %r14
je 0x342a
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x2160
movq %r14, %rcx
testl %eax, %eax
jne 0x33ec
testq %r12, %r12
movq (%r14), %rax
cmovneq %r12, %r15
movq %rax, (%r15)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2150
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/cookie.c
// Function: redditGetCookieString
EXPORT_SYMBOL char *redditGetCookieString()
{
    char *cookieStr = NULL;
    int currentLength = 0;
    RedditCookieLink *node;

    if (currentRedditState == NULL) return NULL;

    for(node = currentRedditState->base; node != NULL; node = node->next) {
        int add_size = strlen(node->name) + strlen(node->data) + 2;
        currentLength += add_size;
        cookieStr = rrealloc(cookieStr, currentLength);
        if (node != currentRedditState->base)
            strcat(cookieStr, "&");
        else
            cookieStr[0] = 0;

        strcat(cookieStr, node->name);
        strcat(cookieStr, "=");
        strcat(cookieStr, node->data);
    }

    return cookieStr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x5d22(%rip), %r15      # 0x9168
movq (%r15), %r12
xorl %r13d, %r13d
xorl %ebx, %ebx
testq %r12, %r12
je 0x34d0
movq (%r12), %r12
testq %r12, %r12
je 0x34d0
movq 0x8(%r12), %rdi
callq 0x20d0
movq %rax, %r14
movq 0x10(%r12), %rdi
callq 0x20d0
addl %r14d, %eax
addl %eax, %r13d
addl $0x2, %r13d
movslq %r13d, %rsi
movq %rbx, %rdi
callq 0x34f5
movq %rax, %rbx
movq (%r15), %rax
cmpq (%rax), %r12
je 0x34a3
movq %rbx, %rdi
callq 0x20d0
movw $0x26, (%rbx,%rax)
jmp 0x34a6
movb $0x0, (%rbx)
movq 0x8(%r12), %rsi
movq %rbx, %rdi
callq 0x2260
movq %rbx, %rdi
callq 0x20d0
movw $0x3d, (%rbx,%rax)
movq 0x10(%r12), %rsi
movq %rbx, %rdi
callq 0x2260
jmp 0x3453
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/global.c
// Function: rmalloc
void *rmalloc(size_t bytes)
{
    void *m = malloc(bytes);
    if (m == NULL)
        exit(EXIT_FAILURE);
    return m;
}

// Assembly:
pushq %rax
callq 0x21a0
testq %rax, %rax
je 0x34ed
popq %rcx
retq
pushq $0x1
popq %rdi
callq 0x22a0
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/global.c
// Function: rrealloc
void *rrealloc(void *old, size_t bytes)
{
    void *m = realloc(old, bytes);
    if (m == NULL)
        exit(EXIT_FAILURE);
    return m;
}

// Assembly:
pushq %rax
callq 0x21e0
testq %rax, %rax
je 0x3502
popq %rcx
retq
pushq $0x1
popq %rdi
callq 0x22a0
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/jsmn.c
// Function: jsmn_alloc_token
static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser,
		jsmntok_t *tokens, size_t num_tokens) {
	jsmntok_t *tok;
	if (parser->toknext >= num_tokens) {
		return NULL;
	}
	tok = &tokens[parser->toknext++];
	tok->start = tok->end = -1;
	tok->size = 0;
	tok->is_key = 0;
#ifdef JSMN_PARENT_LINKS
	tok->parent = -1;
	tok->full_size = 0;
#endif
	return tok;
}

// Assembly:
movslq 0x4(%rdi), %rax
cmpq %rdx, %rax
jae 0x38b6
leal 0x1(%rax), %ecx
movl %ecx, 0x4(%rdi)
imulq $0x1c, %rax, %rcx
orq $-0x1, 0x4(%rsi,%rcx)
andl $0x0, 0xc(%rsi,%rcx)
andb $-0x2, 0x10(%rsi,%rcx)
leaq (%rsi,%rcx), %rax
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
movq %rdx, 0x14(%rsi,%rcx)
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/link.c
// Function: redditLinkFree
EXPORT_SYMBOL void redditLinkFree (RedditLink *link)
{
    if (link == NULL)
        return ;

    free(link->selftext);
    free(link->title);

    free(link->selftextEsc);
    free(link->titleEsc);

    free(link->wselftextEsc);
    free(link->wtitleEsc);

    free(link->id);
    free(link->permalink);
    free(link->author);
    free(link->url);

    free(link);
}

// Assembly:
testq %rdi, %rdi
je 0x395f
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x2050
movq 0x28(%rbx), %rdi
callq 0x2050
movq 0x40(%rbx), %rdi
callq 0x2050
movq 0x38(%rbx), %rdi
callq 0x2050
movq 0x50(%rbx), %rdi
callq 0x2050
movq 0x48(%rbx), %rdi
callq 0x2050
movq 0x8(%rbx), %rdi
callq 0x2050
movq 0x10(%rbx), %rdi
callq 0x2050
movq 0x18(%rbx), %rdi
callq 0x2050
movq 0x20(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/link.c
// Function: redditLinkListFreeLinks
EXPORT_SYMBOL void redditLinkListFreeLinks (RedditLinkList *list)
{
    int i;
    if (list == NULL)
        return ;
    for (i = 0; i < list->linkCount; i++)
        redditLinkFree(list->links[i]);
    free(list->links);
    list->links = NULL;
    list->linkCount = 0;
}

// Assembly:
testq %rdi, %rdi
je 0x39b9
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movslq 0x14(%rbx), %rax
movq 0x18(%rbx), %rdi
cmpq %rax, %r14
jge 0x39a4
movq (%rdi,%r14,8), %rdi
callq 0x21b0
incq %r14
jmp 0x3989
callq 0x2050
andq $0x0, 0x18(%rbx)
andl $0x0, 0x14(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/link.c
// Function: redditLinkListFree
EXPORT_SYMBOL void redditLinkListFree (RedditLinkList *list)
{
    if (list == NULL)
        return ;
    redditLinkListFreeLinks(list);
    free(list->subreddit);
    free(list->modhash);
    free(list->afterId);
    free(list);
}

// Assembly:
testq %rdi, %rdi
je 0x39eb
pushq %rbx
movq %rdi, %rbx
callq 0x2070
movq (%rbx), %rdi
callq 0x2050
movq 0x8(%rbx), %rdi
callq 0x2050
movq 0x20(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/link.c
// Function: getListingHelper
DEF_TOKEN_CALLBACK(getListingHelper)
{
    ARG_LIST_GET_LISTING


    /* Search for the 'kind' ident, and check if it was set to 't3' */
    int i;
    for (i = 0; idents[i].name != NULL; i++)
        if (strcmp(idents[i].name, "kind") == 0)
            if (idents[i].value != NULL && strcmp(*((char**)idents[i].value), "t3") == 0)
                redditLinkListAddLink(list, redditGetLink(parser));

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdx), %ecx
cmpq $0x28, %rcx
ja 0x416a
movq %rcx, %rax
addq 0x10(%rdx), %rax
addl $0x8, %ecx
movl %ecx, (%rdx)
jmp 0x4176
movq 0x8(%rdx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdx)
movq (%rax), %r15
addq $0x10, %rbx
leaq 0x1f82(%rip), %r12      # 0x6106
movq -0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x41d0
movq %r12, %rsi
callq 0x2160
testl %eax, %eax
je 0x419f
addq $0x38, %rbx
jmp 0x4184
movq (%rbx), %rax
testq %rax, %rax
je 0x4199
movq (%rax), %rax
cmpb $0x74, (%rax)
jne 0x4199
cmpb $0x33, 0x1(%rax)
jne 0x4199
cmpb $0x0, 0x2(%rax)
jne 0x4199
movq %r14, %rdi
callq 0x3a27
movq %r15, %rdi
movq %rax, %rsi
callq 0x2270
jmp 0x4199
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/state.c
// Function: redditStateFree
EXPORT_SYMBOL void redditStateFree(RedditState *state)
{
    if (state == NULL)
        return ;
    /* First free the linked-list of cookies */
    RedditCookieLink *tmp;
    RedditCookieLink *node;
    for(node = state->base; node != NULL; node = tmp) {
        tmp = node->next;
        redditCookieFree(node);
    }

    free(state->userAgent);

    /* Free the actual state */
    free(state);
}

// Assembly:
testq %rdi, %rdi
je 0x4226
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x420e
movq (%rdi), %r14
callq 0x2150
movq %r14, %rdi
jmp 0x41fc
movq 0x8(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/token.c
// Function: memoryBlockNew
MemoryBlock *memoryBlockNew()
{
    MemoryBlock *block = rmalloc(sizeof(MemoryBlock));
    block->memory = rmalloc(1);
    block->memory[0] = 0;
    block->size   = 0;
    return block;
}

// Assembly:
pushq %rbx
pushq $0x10
popq %rdi
callq 0x34e0
movq %rax, %rbx
pushq $0x1
popq %rdi
callq 0x34e0
movq %rax, (%rbx)
movb $0x0, (%rax)
andq $0x0, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/token.c
// Function: tokenParserNew
TokenParser *tokenParserNew()
{
    TokenParser *parser = rmalloc(sizeof(TokenParser));
    memset(parser, 0, sizeof(TokenParser));
    parser->block = memoryBlockNew();
    return parser;
}

// Assembly:
pushq %rbx
pushq $0x18
popq %rdi
callq 0x34e0
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
callq 0x4240
movq %rax, (%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/token.c
// Function: tokenParserFree
void tokenParserFree(TokenParser *parser)
{
    if (parser == NULL)
        return ;
    memoryBlockFree(parser->block);
    free(parser->tokens);
    free(parser);
}

// Assembly:
testq %rdi, %rdi
je 0x42c6
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x4264
movq 0x8(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/token.c
// Function: getCopyOfToken
char *getCopyOfToken(const char *json, jsmntok_t token)
{
    char *copy;
    if (token.end - token.start + 1 < 1)
        return NULL;

    copy = rmalloc(token.end - token.start + 1);
    memcpy(copy, json + token.start, token.end - token.start);
    copy[token.end - token.start] = 0;
    return copy;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x38(%rsp), %r15d
movslq 0x34(%rsp), %r12
subl %r12d, %r15d
js 0x4308
movq %rdi, %rbx
leal 0x1(%r15), %edi
callq 0x34e0
movq %rax, %r14
addq %r12, %rbx
movl %r15d, %r15d
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2180
movb $0x0, (%r14,%r15)
jmp 0x430b
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/token.c
// Function: trueFalseString
char *trueFalseString(char *string, bool tf)
{
    if (tf)
        strcpy(string, "true");
    else
        strcpy(string, "false");

    return string;
}

// Assembly:
movq %rdi, %rax
testl %esi, %esi
je 0x432c
movb $0x0, 0x4(%rax)
movl $0x65757274, (%rax)     # imm = 0x65757274
retq
movw $0x65, 0x4(%rax)
movl $0x736c6166, (%rax)     # imm = 0x736C6166
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/token.c
// Function: vparseTokens
void vparseTokens (TokenParser *p, TokenIdent *identifiers, va_list args)
{
    int tokenCount = 0, i;
    int identCount = 0;

    while (identifiers[identCount].name != NULL)
        identCount++;

    if (identCount == 0)
        return ;

    tokenCount = p->tokens[p->currentToken].full_size;
    if (tokenCount == 0)
        return ;

    tokenCount += p->currentToken;

    for (; p->currentToken < tokenCount; (p->currentToken)++) {
        if (p->tokens[p->currentToken].type == JSMN_OBJECT || p->tokens[p->currentToken].type == JSMN_ARRAY)
            continue;

        /* We only need to check key values */
        if (!p->tokens[p->currentToken].is_key)
            continue;

        for (i = 0; i < identCount; i++)
            if (performIdentAction(p, identifiers, i, args)) {
                (p->currentToken)--;
                break;
            }

    }

    return ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %r12
movq %rsi, %rax
decq %r12
cmpq $0x0, (%rax)
leaq 0x38(%rax), %rax
jne 0x471e
testq %r12, %r12
je 0x47a0
movq 0x8(%r15), %rcx
movslq 0x14(%r15), %rax
imulq $0x1c, %rax, %rdx
movl 0x14(%rcx,%rdx), %r13d
testl %r13d, %r13d
je 0x47a0
negq %r12
addl %eax, %r13d
cmpl %r13d, %eax
jge 0x47a0
movq 0x8(%r15), %rcx
movslq %eax, %rdx
imulq $0x1c, %rdx, %rdx
movl (%rcx,%rdx), %esi
decl %esi
cmpl $0x2, %esi
jb 0x4798
addq %rdx, %rcx
testb $0x1, 0x10(%rcx)
je 0x4798
xorl %ebp, %ebp
cmpl %ebp, %r12d
je 0x4794
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movq %rbx, %rcx
callq 0x4357
incl %ebp
testl %eax, %eax
je 0x4771
movl 0x14(%r15), %eax
decl %eax
jmp 0x4798
movl 0x14(%r15), %eax
incl %eax
movl %eax, 0x14(%r15)
jmp 0x474c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq