LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/stefpant[P]TCPserver/PantoulasStefanosProject2/jobExec/PCOptions.c
// Function: getWordLastNode
node* getWordLastNode(node* trie,char* word,int sorted){//for search - child
	int i=0;//character's index
	char c = word[i];
	node* temp=trie;
	int flag=1;
	//flag:if temp->next==NULL then create new next

	while(1){//for all word's chars(has at least 1 char)
		while(1){//for all childs in temp's list(temp -> next -> next -> ...)
			if(c==getValue(temp)){
				flag=0;
				break;//check next char
			}
			else if((c<getValue(temp))&&sorted) break;
			if(getNext(temp)==NULL) return NULL;//word doesn't exists in trie :(
			temp = getNext(temp);//search until c found in trie
		}//or we reached the end of temp's list
		if(flag)//c not found in trie...exiting
			return NULL;
		//now temp has the 'c' value so we check its child
		if((c=word[++i])=='\0'){
			if(getCounterEPL(temp)==0) return NULL;//word found but is subword in trie
			return temp;
		}
		if(getChild(temp)==NULL) return NULL;//word not found
		temp=getChild(temp);//else continue with child
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rdi, %r14
movq %rsi, -0x30(%rbp)
movb (%rsi), %bl
movl $0x1, %r12d
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x2e43
movb $0x1, %cl
cmpb %al, %bl
je 0x651d
movq %r14, %rdi
callq 0x2e43
testl %r15d, %r15d
je 0x64f0
cmpb %al, %bl
jl 0x6517
movq %r14, %rdi
callq 0x2e55
testq %rax, %rax
je 0x654e
movq %r14, %rdi
callq 0x2e55
movq %rax, %r14
movq %rax, %rdi
callq 0x2e43
cmpb %al, %bl
jne 0x64df
xorl %r12d, %r12d
testl %r12d, %r12d
sete %cl
testb %cl, %cl
je 0x654e
movq -0x30(%rbp), %rax
movb 0x1(%rax,%r13), %bl
movq %r14, %rdi
testb %bl, %bl
je 0x6562
callq 0x2e69
testq %rax, %rax
je 0x654e
incq %r13
movq %r14, %rdi
callq 0x2e69
movq %rax, %r14
xorl %r12d, %r12d
jmp 0x64d1
xorl %ecx, %ecx
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2ea7
xorl %ecx, %ecx
testl %eax, %eax
cmovneq %r14, %rcx
jmp 0x6550
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/shell.c
// Function: issue_request
void issue_request(int wfd, int rfd, struct request_struct *rq)
{
	int ret;

	/* Issue the request */
	fprintf(stderr, "Shell: issuing request...\n");
	if (write(wfd, rq, sizeof(*rq)) != sizeof(*rq)) {
		perror("Shell: write request struct");
		exit(1);
	}

	/* Block until a reply has been received */
	fprintf(stderr, "Shell: receiving request return value...\n");

	if (read(rfd, &ret, sizeof(ret)) != sizeof(ret)) {
		perror("Shell: read request return value");
		exit(1);
	}

	if(ret < 0){
		fprintf(stderr, "Shell: request return value ret = %d\n", ret);
		fprintf(stderr, "       %s\n", strerror(-ret));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebx
movl %edi, %ebp
movq 0x2e33(%rip), %r15      # 0x3ff8
movq (%r15), %rcx
leaq 0xe9d(%rip), %rdi       # 0x206c
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
callq 0x1170
pushq $0x44
popq %rdx
movl %ebp, %edi
movq %r14, %rsi
callq 0x1050
cmpq $0x44, %rax
jne 0x1267
movq (%r15), %rcx
leaq 0xeac(%rip), %rdi       # 0x20a3
pushq $0x29
popq %rsi
pushq $0x1
popq %rdx
callq 0x1170
leaq 0x4(%rsp), %rsi
pushq $0x4
popq %rdx
movl %ebx, %edi
callq 0x10c0
cmpq $0x4, %rax
jne 0x127b
movl 0x4(%rsp), %ebx
testl %ebx, %ebx
js 0x122a
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %rdi
leaq 0xeba(%rip), %rsi       # 0x20ee
movl %ebx, %edx
xorl %eax, %eax
callq 0x10f0
movq (%r15), %r14
negl %ebx
movl %ebx, %edi
callq 0x1180
leaq 0xec4(%rip), %rsi       # 0x2114
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x10f0
leaq 0xe19(%rip), %rdi       # 0x2087
callq 0x1130
pushq $0x1
popq %rdi
callq 0x1160
leaq 0xe4b(%rip), %rdi       # 0x20cd
jmp 0x126e
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/shell.c
// Function: get_cmdline
void get_cmdline(FILE *fp, char *buf, int bufsz)
{
	if (fgets(buf, bufsz, fp) == NULL) {
		fprintf(stderr, "Shell: could not read command line, exiting.\n");
		exit(1);
	}
	if (buf[strlen(buf) - 1] == '\n')
		buf[strlen(buf) - 1] = '\0';
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rax
movq %rsi, %rdi
movl %edx, %esi
movq %rax, %rdx
callq 0x10d0
testq %rax, %rax
je 0x14eb
movq %rbx, %rdi
callq 0x1070
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x14e9
movb $0x0, -0x1(%rbx,%rax)
popq %rbx
retq
callq 0x1284
// File: /workspace/github_c_makefile_star2_O1/chrispanag[P]operating-systems-scheduler/shell.c
// Function: main
int main(int argc, char *argv[])
{
	int rfd, wfd;
	char cmdline[SHELL_CMDLINE_SZ];

	/*
	 * Communication with the scheduler happens over two UNIX pipes.
	 *
	 * The scheduler first creates the pipes, then execve()s the shell
	 * program. It passes two file descriptors as command-line arguments:
	 *
	 * argument 1: wfd: the file descriptor to write request structures into.
	 * argument 2: rfd: the file descriptor to read request return values from.
	 */

	if (argc != 3) {
		fprintf(stderr, "Shell: must be called with exactly two arguments.\n");
		exit(1);
	}

	wfd = atoi(argv[1]);
	rfd = atoi(argv[2]);
	if (!wfd || !rfd) {
		fprintf(stderr, "Shell: descriptors must be non-zero: wfd = %d, rfd = %d\n",
			wfd, rfd);
		exit(1);
	}

	/*
	 * Forever: show the prompt, read a command line, then process it.
	 */
	printf("\nThis is the Shell. Welcome.\n\n");

	for (;;) {
		printf("Shell> ");
		fflush(stdout);
		get_cmdline(stdin, cmdline, SHELL_CMDLINE_SZ);
		process_cmdline(cmdline, wfd, rfd);
	}

	/* Unreachable */
	fprintf(stderr, "Shell: reached unreachable point.\n");
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
cmpl $0x3, %edi
jne 0x178c
movq %rsi, %r14
movq 0x8(%rsi), %rdi
callq 0x1150
movl %eax, %ebx
movq 0x10(%r14), %rdi
callq 0x1150
movl %eax, %ebp
testl %ebx, %ebx
je 0x17ae
testl %ebp, %ebp
je 0x17ae
leaq 0xbc2(%rip), %rdi       # 0x22ff
callq 0x1040
leaq 0xab0(%rip), %r14       # 0x21f9
movq 0x2880(%rip), %r12      # 0x3fd0
movq 0x2881(%rip), %r13      # 0x3fd8
movq %rsp, %r15
movq %r14, %rdi
xorl %eax, %eax
callq 0x10a0
movq (%r12), %rdi
callq 0x1110
movq (%r13), %rdi
movq %r15, %rsi
movl $0x64, %edx
callq 0x14bc
movq %r15, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x14fc
jmp 0x175a
movq 0x2865(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0x9f0(%rip), %rdi       # 0x218d
movl $0x32, %esi
movl $0x1, %edx
callq 0x1170
jmp 0x17ca
movq 0x2843(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xa01(%rip), %rsi       # 0x21c0
movl %ebx, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x10f0
movl $0x1, %edi
callq 0x1160
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/kvlds-dump/main.c
// Function: callback_pair
static int
callback_pair(void * cookie,
    const struct kvldskey * key, const struct kvldskey * value)
{
	struct dumpstate * C = cookie;
	char kvnum[17];

	/* Filesystem or stdout? */
	if (C->tofs) {
		sprintf(kvnum, "%016" PRIx64, C->N);
		if (mkdir(kvnum, 0700)) {
			warnp("mkdir(%s)", kvnum);
			goto err0;
		}
		if (writefile(kvnum, "k", key))
			goto err0;
		if (writefile(kvnum, "v", value))
			goto err0;
	} else {
		if (fwrite(&key->len, 1, 1, stdout) != 1)
			goto err0;
		if (fwrite(key->buf, key->len, 1, stdout) != 1)
			goto err0;
		if (fwrite(&value->len, 1, 1, stdout) != 1)
			goto err0;
		if (fwrite(value->buf, value->len, 1, stdout) != 1)
			goto err0;
	}

	/* Done another key-value pair. */
	C->N++;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x0, (%rdi)
je 0x2f4f
movq 0x8(%rbx), %rdx
leaq 0xa305(%rip), %rsi      # 0xd205
movq %rsp, %r12
movq %r12, %rdi
xorl %eax, %eax
callq 0x2300
movq %r12, %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x20d0
testl %eax, %eax
je 0x2fd9
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3012
movq %rax, %rbx
leaq 0x92a8(%rip), %rdi      # 0xc1e2
movq %rsp, %rsi
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%rbx)
jmp 0x3023
movq 0xf082(%rip), %r12      # 0x11fd8
movq (%r12), %rcx
movl $0x1, %esi
movl $0x1, %edx
movq %r15, %rdi
callq 0x2330
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq $0x1, %rax
jne 0x3028
movzbl (%r15), %esi
incq %r15
movq (%r12), %rcx
movl $0x1, %edx
movq %r15, %rdi
callq 0x2330
cmpq $0x1, %rax
jne 0x3028
movq (%r12), %rcx
movl $0x1, %esi
movl $0x1, %edx
movq %r14, %rdi
callq 0x2330
cmpq $0x1, %rax
jne 0x3028
movzbl (%r14), %esi
incq %r14
movq (%r12), %rcx
movl $0x1, %edx
movq %r14, %rdi
callq 0x2330
cmpq $0x1, %rax
je 0x300a
jmp 0x3028
leaq 0x920c(%rip), %rsi      # 0xc1ec
movq %rsp, %rdi
movq %r15, %rdx
callq 0x3037
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x3028
leaq 0x9091(%rip), %rsi      # 0xc08c
movq %rsp, %rdi
movq %r14, %rdx
callq 0x3037
testl %eax, %eax
jne 0x3028
incq 0x8(%rbx)
xorl %ebp, %ebp
jmp 0x3028
leaq 0x91c9(%rip), %rdi      # 0xc1e2
movq %rsp, %rsi
xorl %eax, %eax
callq 0x3cab
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/kvlds-dump/main.c
// Function: writefile
static int
writefile(const char * dir, const char * fname, const struct kvldskey * v)
{
	char * s;
	FILE * f;

	/* Construct file name. */
	if (asprintf(&s, "%s/%s", dir, fname) == -1) {
		warnp("asprintf");
		goto err0;
	}

	/* Open file. */
	if ((f = fopen(s, "wb")) == NULL) {
		warnp("fopen(%s)", s);
		goto err1;
	}

	/* Write value. */
	if (fwrite(v->buf, v->len, 1, f) != 1) {
		warnp("fwrite(%s)", s);
		goto err2;
	}

	/* Close file and free file name. */
	if (fclose(f))
		warnp("fclose");
	free(s);

	/* Success! */
	return (0);

err2:
	if (fclose(f))
		warnp("fclose");
err1:
	free(s);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rcx
movq %rdi, %rdx
leaq 0x91a3(%rip), %rsi      # 0xc1ee
movq %rsp, %rdi
xorl %eax, %eax
callq 0x31d8
cmpl $-0x1, %eax
je 0x30d1
movq (%rsp), %rdi
leaq 0x9198(%rip), %rsi      # 0xc1fd
callq 0x22d0
testq %rax, %rax
je 0x30f7
movq %rax, %rbx
movzbl (%r14), %esi
incq %r14
movl $0x1, %edx
movq %r14, %rdi
movq %rax, %rcx
callq 0x2330
cmpq $0x1, %rax
jne 0x3121
movq %rbx, %rdi
callq 0x2120
testl %eax, %eax
je 0x31a7
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3199
movq %rax, %rbx
leaq 0x9156(%rip), %rdi      # 0xc215
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%rbx)
jmp 0x31a7
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3149
movq %rax, %rbx
leaq 0x910f(%rip), %rdi      # 0xc1f4
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%rbx)
jmp 0x31cb
callq 0x20a0
cmpl $0x0, (%rax)
movq (%rsp), %rsi
je 0x3159
movq %rax, %rbx
leaq 0x90f1(%rip), %rdi      # 0xc200
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%rbx)
jmp 0x31c2
callq 0x20a0
movq %rax, %r14
cmpl $0x0, (%rax)
movq (%rsp), %rsi
leaq 0x90d3(%rip), %rdi      # 0xc20a
je 0x3169
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%r14)
jmp 0x3170
leaq 0x90a4(%rip), %rdi      # 0xc1f4
xorl %eax, %eax
callq 0x3cab
jmp 0x31cb
leaq 0x90a0(%rip), %rdi      # 0xc200
xorl %eax, %eax
callq 0x3cab
jmp 0x31c2
xorl %eax, %eax
callq 0x3cab
movq %rbx, %rdi
callq 0x2120
testl %eax, %eax
je 0x31c2
cmpl $0x0, (%r14)
je 0x31b4
leaq 0x908c(%rip), %rdi      # 0xc215
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%r14)
jmp 0x31c2
leaq 0x9075(%rip), %rdi      # 0xc215
xorl %eax, %eax
callq 0x3cab
movq (%rsp), %rdi
callq 0x2040
xorl %eax, %eax
jmp 0x31d0
leaq 0x905a(%rip), %rdi      # 0xc215
xorl %eax, %eax
callq 0x3cab
movq (%rsp), %rdi
callq 0x2040
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/util/kivaloo.c
// Function: kivaloo_open
void *
kivaloo_open(const char * addr, struct wire_requestqueue ** Q)
{
	struct kivaloo_cookie * K;

	/* Allocate a cookie. */
	if ((K = malloc(sizeof(struct kivaloo_cookie))) == NULL)
		goto err0;

	/* Resolve the target address. */
	if ((K->sas = sock_resolve(addr)) == NULL) {
		warnp("Error resolving socket address: %s", addr);
		goto err1;
	}
	if (K->sas[0] == NULL) {
		warn0("No addresses found for %s", addr);
		goto err2;
	}

	/* Open a connection to it. */
	if ((K->s = sock_connect(K->sas)) == -1)
		goto err2;

	/* Create a request queue. */
	if ((K->Q = wire_requestqueue_init(K->s)) == NULL) {
		warnp("Cannot create request queue");
		goto err3;
	}

	/* Return the request queue and cookie. */
	*Q = K->Q;
	return (K);

err3:
	if (close(K->s))
		warnp("close");
err2:
	sock_addr_freelist(K->sas);
err1:
	free(K);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %r15
movl $0x18, %edi
callq 0x2240
testq %rax, %rax
je 0x3fdb
movq %rax, %rbx
movq %r15, %rdi
callq 0x594c
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x3f75
movq %rax, %r14
cmpq $0x0, (%rax)
je 0x3f9c
movq %r14, %rdi
callq 0x6269
movl %eax, 0x8(%rbx)
cmpl $-0x1, %eax
je 0x3fb8
movl %eax, %ebp
movl %eax, %edi
callq 0x7e40
movq %rax, (%rbx)
testq %rax, %rax
je 0x3fe9
movq %rax, (%r12)
jmp 0x3fdd
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3fc2
movq %rax, %r14
leaq 0x8631(%rip), %rdi      # 0xc5ba
movq %r15, %rsi
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%r14)
jmp 0x3fd3
leaq 0x863a(%rip), %rdi      # 0xc5dd
movq %r15, %rsi
xorl %eax, %eax
callq 0x3cab
callq 0x20a0
movl $0x0, (%rax)
movq %r14, %rdi
callq 0x6063
jmp 0x3fd3
leaq 0x85f1(%rip), %rdi      # 0xc5ba
movq %r15, %rsi
xorl %eax, %eax
callq 0x3cab
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x20a0
movq %rax, %r15
cmpl $0x0, (%rax)
je 0x400d
leaq 0x85fa(%rip), %rdi      # 0xc5f7
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%r15)
jmp 0x401b
leaq 0x85e3(%rip), %rdi      # 0xc5f7
xorl %eax, %eax
callq 0x3cab
movl %ebp, %edi
callq 0x21c0
testl %eax, %eax
je 0x3fb8
cmpl $0x0, (%r15)
je 0x4046
leaq 0x81e3(%rip), %rdi      # 0xc216
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%r15)
jmp 0x3fb8
leaq 0x81c9(%rip), %rdi      # 0xc216
xorl %eax, %eax
callq 0x3cab
jmp 0x3fb8
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/util/kivaloo.c
// Function: kivaloo_close
void
kivaloo_close(void * cookie)
{
	struct kivaloo_cookie * K = cookie;

	/* Shut down the request queue. */
	wire_requestqueue_destroy(K->Q);
	wire_requestqueue_free(K->Q);

	/* Close the socket. */
	if (close(K->s))
		warnp("close");

	/* Free socket addresses. */
	sock_addr_freelist(K->sas);

	/* Free our cookie. */
	free(K);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x8505
movq (%rbx), %rdi
callq 0x8519
movl 0x8(%rbx), %edi
callq 0x21c0
testl %eax, %eax
je 0x40ae
callq 0x20a0
cmpl $0x0, (%rax)
je 0x40a0
movq %rax, %r14
leaq 0x8186(%rip), %rdi      # 0xc216
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%r14)
jmp 0x40ae
leaq 0x816f(%rip), %rdi      # 0xc216
xorl %eax, %eax
callq 0x3cab
movq 0x10(%rbx), %rdi
callq 0x6063
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2040
nop
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: kvlds_multiset
int
kvlds_multiset(struct wire_requestqueue * Q,
    int (* callback_pair)(void *, struct kvldskey **, struct kvldskey **),
    void * cookie)
{
	struct multisetcookie C = {
		.Q = Q,
		.callback = callback_pair,
		.cookie = cookie,
		.inflight = 0,
		.eof = 0,
		.failed = 0,
		.done = 0
	};

	/* Start sending requests. */
	if (multiset_send(&C))
		goto err0;

	/* Wait until we've finished. */
	if (events_spin(&C.done)) {
		warnp("Error running event loop");
		goto err0;
	}

	/* Did we succeed? */
	return (C.failed);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
leaq 0x8(%rsp), %rax
movq %rdi, (%rax)
movq %rsi, 0x8(%rax)
movq %rdx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movl $0x0, 0x28(%rax)
movq %rax, %rdi
callq 0x4150
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x4108
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x30(%rsp), %rdi
callq 0x47dd
testl %eax, %eax
je 0x413a
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4140
movq %rax, %r14
leaq 0x84e9(%rip), %rdi      # 0xc613
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%r14)
jmp 0x40fe
movl 0x2c(%rsp), %ebx
jmp 0x40fe
leaq 0x84cc(%rip), %rdi      # 0xc613
xorl %eax, %eax
callq 0x3cab
jmp 0x40fe
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: multiset_send
static int
multiset_send(struct multisetcookie * C)
{
	struct kvldskey * key;
	struct kvldskey * value;

	/* If we've hit EOF, there's nothing to do. */
	if (C->eof)
		goto done;

	/* If requests are failing, there's nothing to do. */
	if (C->failed)
		goto done;

	/* Send requests as long as we don't have too many in flight. */
	while (C->inflight < 4096) {
		if ((C->callback)(C->cookie, &key, &value)) {
			/* Failing to get more key-value pairs. */
			C->failed = 1;
			goto done;
		}

		/* Are we at EOF? */
		if (key == NULL) {
			C->eof = 1;
			goto done;
		}

		/* Store this key-value pair. */
		if (proto_kvlds_request_set(C->Q, key, value,
		    callback_multiset, C)) {
			warnp("proto_kvlds_request_set");
			C->failed = 1;
			goto err0;
		}

		/* Another request is in flight. */
		C->inflight += 1;

		/* Free the key and value. */
		kvldskey_free(key);
		kvldskey_free(value);
	}

done:
	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
xorl %ebp, %ebp
cmpl $0x0, 0x20(%rdi)
jne 0x4236
movq %rdi, %rbx
cmpl $0x0, 0x24(%rdi)
jne 0x4236
cmpq $0xfff, 0x18(%rbx)      # imm = 0xFFF
ja 0x4236
leaq 0x8(%rsp), %r14
movq %rsp, %r15
leaq 0x34f(%rip), %r12       # 0x44e1
movq 0x10(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *0x8(%rbx)
testl %eax, %eax
jne 0x41e6
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x41ef
movq (%rbx), %rdi
movq (%rsp), %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x6a65
testl %eax, %eax
jne 0x41f8
incq 0x18(%rbx)
movq 0x8(%rsp), %rdi
callq 0x2040
movq (%rsp), %rdi
callq 0x2040
cmpq $0x1000, 0x18(%rbx)     # imm = 0x1000
jb 0x4192
jmp 0x4236
movl $0x1, 0x24(%rbx)
jmp 0x4236
movl $0x1, 0x20(%rbx)
jmp 0x4236
callq 0x20a0
cmpl $0x0, (%rax)
je 0x421c
movq %rax, %r14
leaq 0x843b(%rip), %rdi      # 0xc647
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%r14)
jmp 0x422a
leaq 0x8424(%rip), %rdi      # 0xc647
xorl %eax, %eax
callq 0x3cab
movl $0x1, 0x24(%rbx)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: kvlds_range
int
kvlds_range(struct wire_requestqueue * Q, const struct kvldskey * start,
    const struct kvldskey * end, int (* callback)(void *,
        const struct kvldskey *, const struct kvldskey *),
    void * cookie)
{
	struct rangecookie C = {
		.callback = callback,
		.cookie = cookie,
		.C = { .done = 0 }
	};

	/* Start dumping key-value pairs. */
	if (proto_kvlds_request_range2(Q, start, end,
	    callback_range_item, callback_range_done, &C)) {
		warnp("proto_kvlds_request_range2");
		goto err0;
	}

	/* Wait until we've finished. */
	if (events_spin(&C.C.done)) {
		warnp("Error running event loop");
		goto err0;
	}

	/* Did we succeed? */
	return (C.C.failed);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
leaq 0x8(%rsp), %r9
movq %rcx, (%r9)
movq %r8, 0x8(%r9)
movq $0x0, 0x10(%r9)
leaq 0x7f(%rip), %rcx        # 0x42e4
leaq 0x81(%rip), %r8         # 0x42ed
callq 0x7a65
testl %eax, %eax
je 0x428b
callq 0x20a0
cmpl $0x0, (%rax)
je 0x42bc
movq %rax, %rbx
leaq 0x83a3(%rip), %rdi      # 0xc62c
jmp 0x42ad
leaq 0x1c(%rsp), %rdi
callq 0x47dd
testl %eax, %eax
je 0x42c5
callq 0x20a0
cmpl $0x0, (%rax)
je 0x42cb
movq %rax, %rbx
leaq 0x8366(%rip), %rdi      # 0xc613
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%rbx)
jmp 0x42d9
leaq 0x8369(%rip), %rdi      # 0xc62c
jmp 0x42d2
movl 0x18(%rsp), %eax
jmp 0x42de
leaq 0x8341(%rip), %rdi      # 0xc613
xorl %eax, %eax
callq 0x3cab
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: kvlds_set
int
kvlds_set(struct wire_requestqueue * Q, const struct kvldskey * key,
    const struct kvldskey * value)
{
	struct donecookie C = {
		.done = 0,
		.failed = 0
	};

	/* Initiate the request. */
	if (proto_kvlds_request_set(Q, key, value, callback_done, &C)) {
		warnp("proto_kvlds_request_set");
		goto err0;
	}

	/* Wait until we've finished. */
	if (events_spin(&C.done)) {
		warnp("Error running event loop");
		goto err0;
	}

	/* Interpret results. */
	if (C.failed)
		goto err0;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %r8
movq $0x0, (%r8)
leaq 0x7d(%rip), %rcx        # 0x438f
callq 0x6a65
testl %eax, %eax
je 0x4331
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4362
movq %rax, %rbx
leaq 0x8318(%rip), %rdi      # 0xc647
jmp 0x4353
leaq 0xc(%rsp), %rdi
callq 0x47dd
testl %eax, %eax
je 0x436b
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4376
movq %rax, %rbx
leaq 0x82c0(%rip), %rdi      # 0xc613
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%rbx)
jmp 0x4384
leaq 0x82de(%rip), %rdi      # 0xc647
jmp 0x437d
cmpl $0x0, 0x8(%rsp)
jne 0x4384
xorl %eax, %eax
jmp 0x4389
leaq 0x8296(%rip), %rdi      # 0xc613
xorl %eax, %eax
callq 0x3cab
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: kvlds_get
int
kvlds_get(struct wire_requestqueue * Q, const struct kvldskey * key,
    struct kvldskey ** value)
{
	struct getcookie C = {
		.done = 0,
		.failed = 0,
		.value = NULL
	};

	/* Initiate the request. */
	if (proto_kvlds_request_get(Q, key, callback_get, &C)) {
		warnp("proto_kvlds_request_get");
		goto err0;
	}

	/* Wait until we've finished. */
	if (events_spin(&C.done)) {
		warnp("Error running event loop");
		goto err0;
	}

	/* Interpret results. */
	if (C.failed)
		goto err0;
	*value = C.value;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
leaq 0x89(%rip), %rdx        # 0x443c
callq 0x738a
testl %eax, %eax
je 0x43d2
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4403
movq %rax, %rbx
leaq 0x828f(%rip), %rdi      # 0xc65f
jmp 0x43f4
leaq 0x4(%rsp), %rdi
callq 0x47dd
testl %eax, %eax
je 0x440c
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4423
movq %rax, %rbx
leaq 0x821f(%rip), %rdi      # 0xc613
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%rbx)
jmp 0x4431
leaq 0x8255(%rip), %rdi      # 0xc65f
jmp 0x442a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x0, (%rsp)
jne 0x4436
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x4436
leaq 0x81e9(%rip), %rdi      # 0xc613
xorl %eax, %eax
callq 0x3cab
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: kvlds_delete
int
kvlds_delete(struct wire_requestqueue * Q, const struct kvldskey * key)
{
	struct donecookie C = {
		.done = 0,
		.failed = 0
	};

	/* Initiate the request. */
	if (proto_kvlds_request_delete(Q, key, callback_done, &C)) {
		warnp("proto_kvlds_request_delete");
		goto err0;
	}

	/* Wait until we've finished. */
	if (events_spin(&C.done)) {
		warnp("Error running event loop");
		goto err0;
	}

	/* Interpret results. */
	if (C.failed)
		goto err0;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rcx
movq $0x0, (%rcx)
leaq -0xd5(%rip), %rdx       # 0x438f
callq 0x711e
testl %eax, %eax
je 0x4483
callq 0x20a0
cmpl $0x0, (%rax)
je 0x44b4
movq %rax, %rbx
leaq 0x81f6(%rip), %rdi      # 0xc677
jmp 0x44a5
leaq 0xc(%rsp), %rdi
callq 0x47dd
testl %eax, %eax
je 0x44bd
callq 0x20a0
cmpl $0x0, (%rax)
je 0x44c8
movq %rax, %rbx
leaq 0x816e(%rip), %rdi      # 0xc613
xorl %eax, %eax
callq 0x3b8c
movl $0x0, (%rbx)
jmp 0x44d6
leaq 0x81bc(%rip), %rdi      # 0xc677
jmp 0x44cf
cmpl $0x0, 0x8(%rsp)
jne 0x44d6
xorl %eax, %eax
jmp 0x44db
leaq 0x8144(%rip), %rdi      # 0xc613
xorl %eax, %eax
callq 0x3cab
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Keith-S-Thompson[P]kst-time-utils/clock_gettime.c
// Function: usage
static void usage(void) {
    puts("Usage: clock_gettime [options]");
    puts("  -r    CLOCK_REALTIME, system-wide real-time clock (default)");
    puts("  -T    CLOCK_TAI, International Atomic Time (no leap seconds)");
#ifndef CLOCK_TAI
    puts("        CLOCK_TAI is not supported on this system");
#endif
    puts("  -m    CLOCK_MONOTONIC, monotonic time since some unspecified starting point");
    puts("  -M    CLOCK_MONOTONIC_RAW, hardware-based timer with no ntp adjustments");
#ifndef CLOCK_MONOTONIC_RAW
    puts("        CLOCK_MONOTONIC_RAW is not supported on this system");
#endif
    puts("  -p    CLOCK_PROCESS_CPUTIME_ID, high-resolution per-process timer from the CPU");
    puts("  -t    CLOCK_THREAD_CPUTIME_ID, thread-specific CPU-time clock");
    puts("(-p and -t are not particularly meaningful in this context.)");
    puts("  -R    Show resolution (calls clock_getres), may be followed by other options");
    puts("Multiple arguments may be given");
    exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rax
leaq 0xd51(%rip), %rdi       # 0x204a
callq 0x1030
leaq 0xd64(%rip), %rdi       # 0x2069
callq 0x1030
leaq 0xd96(%rip), %rdi       # 0x20a7
callq 0x1030
leaq 0xdc9(%rip), %rdi       # 0x20e6
callq 0x1030
leaq 0xe0b(%rip), %rdi       # 0x2134
callq 0x1030
leaq 0xe49(%rip), %rdi       # 0x217e
callq 0x1030
leaq 0xe8e(%rip), %rdi       # 0x21cf
callq 0x1030
leaq 0xec2(%rip), %rdi       # 0x220f
callq 0x1030
leaq 0xef3(%rip), %rdi       # 0x224c
callq 0x1030
leaq 0xf36(%rip), %rdi       # 0x229b
callq 0x1030
xorl %edi, %edi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O1/Keith-S-Thompson[P]kst-time-utils/clock_gettime.c
// Function: show_res
static bool show_res(clockid_t clk_id) {
    struct timespec ts = { 0, 0 };
    if (clock_getres(clk_id, &ts) == 0) {
        printf("%ld.%09ld\n", (long)ts.tv_sec, (long)ts.tv_nsec);
        return true;
    }
    else {
        perror("clock_getres");
        return false;
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
callq 0x1070
movl %eax, %ebx
testl %eax, %eax
jne 0x13ac
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0xc8a(%rip), %rdi       # 0x2024
xorl %eax, %eax
callq 0x1060
testl %ebx, %ebx
sete %al
addq $0x10, %rsp
popq %rbx
retq
leaq 0xc7c(%rip), %rdi       # 0x202f
callq 0x1080
jmp 0x13a1
// File: /workspace/github_c_makefile_star2_O1/Keith-S-Thompson[P]kst-time-utils/clock_gettime.c
// Function: show_time
static bool show_time(clockid_t clk_id) {
    struct timespec ts = { 0, 0 };
    if (clock_gettime(clk_id, &ts) == 0) {
        printf("%ld.%09ld\n", (long)ts.tv_sec, (long)ts.tv_nsec);
        return true;
    }
    else {
        perror("clock_gettime");
        return false;
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
callq 0x1040
movl %eax, %ebx
testl %eax, %eax
jne 0x13f5
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0xc41(%rip), %rdi       # 0x2024
xorl %eax, %eax
callq 0x1060
testl %ebx, %ebx
sete %al
addq $0x10, %rsp
popq %rbx
retq
leaq 0xc40(%rip), %rdi       # 0x203c
callq 0x1080
jmp 0x13ea
// File: /workspace/github_c_makefile_star2_O1/randyrossi[P]fisher-modem/mkfilter/src/mkaverage.C
// Function: main.cold.1
static void giveup(const char* msg, int p1) {
  fprintf(stderr, "mkaverage: ");
  fprintf(stderr, msg, p1);
  putc('\n', stderr);
  exit(1);
}

// Assembly:
pushq %rbx
movq 0x2ea8(%rip), %rbx      # 0x3fe0
movq (%rbx), %rcx
leaq 0xf46(%rip), %rdi       # 0x2088
pushq $0xb
popq %rsi
pushq $0x1
popq %rdx
callq 0x1110
movq (%rbx), %rdi
leaq 0xeb4(%rip), %rsi       # 0x200b
movl $0x201, %edx            # imm = 0x201
xorl %eax, %eax
callq 0x10b0
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1080
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O1/randyrossi[P]fisher-modem/mkfilter/src/mkaverage.C
// Function: main
static void readcmdline(char* argv[]) {
  int ap = 0, n = 0;
  unless(argv[ap] == NULL) ap++; /* skip program name */
  unless(argv[ap] != NULL && seq(argv[ap++], "-Av")) usage();
  lflag = false;
  until(argv[ap] == NULL) {
    char* s = argv[ap++];
    if (seq(s, "-l"))
      lflag = true;
    else if (n == 0) {
      numcoeffs = atoi(s);
      n++;
    } else
      usage();
  }
  unless(n == 1) usage();
  /* (num.zeros) = (num.coeffs) - 1 */
  if (numcoeffs < 1 || numcoeffs > MAXPZ + 1)
    giveup("filter length must be in range 1 .. %d", MAXPZ + 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r14
xorl %eax, %eax
testq %r14, %r14
setne %al
movq (%rsi,%rax,8), %rdi
testq %rdi, %rdi
je 0x1438
movq %rsi, %rbx
leaq 0xd6b(%rip), %rsi       # 0x2004
callq 0x10a0
testl %eax, %eax
jne 0x1438
movq %r14, (%rsp)
cmpq $0x1, %r14
movl $0x1, %eax
sbbq $-0x1, %rax
movl %eax, %ecx
movq (%rbx,%rcx,8), %r15
testq %r15, %r15
je 0x1438
leaq (%rbx,%rax,8), %r13
addq $0x8, %r13
xorl %ebp, %ebp
leaq 0xd31(%rip), %r14       # 0x2008
xorl %r12d, %r12d
movq %r15, %rdi
movq %r14, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1308
testl %r12d, %r12d
jne 0x1438
movq %r15, %rdi
callq 0x10d0
movl %eax, 0x2da4(%rip)      # 0x40a4
movl $0x1, %r12d
jmp 0x130b
movb $0x1, %bpl
movq (%r13), %r15
addq $0x8, %r13
testq %r15, %r15
jne 0x12da
cmpl $0x1, %r12d
jne 0x1438
movl $0xfffffdfe, %eax       # imm = 0xFFFFFDFE
movl 0x2d77(%rip), %ecx      # 0x40a4
addl %eax, %ecx
cmpl %eax, %ecx
jbe 0x143d
testb $0x1, %bpl
je 0x1418
cmpq $0x0, (%rsp)
je 0x137c
xorl %r14d, %r14d
movq 0x2c76(%rip), %r15      # 0x3fc8
testq %r14, %r14
je 0x1361
movl $0x20, %edi
callq 0x1090
leaq 0x1(%r14), %r12
movq (%rbx,%r14,8), %rdi
movq (%r15), %rsi
callq 0x1070
cmpq $0x0, 0x8(%rbx,%r14,8)
movq %r12, %r14
jne 0x1352
movl $0xa, %edi
callq 0x1090
movl 0x2d18(%rip), %esi      # 0x40a4
leaq 0xd01(%rip), %rdi       # 0x2094
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1030
movl 0x2d02(%rip), %esi      # 0x40a4
decl %esi
leaq 0xcf2(%rip), %rdi       # 0x209d
xorl %eax, %eax
callq 0x1030
movl 0x2cec(%rip), %esi      # 0x40a4
testl %esi, %esi
jle 0x13d7
leaq 0xcf1(%rip), %rbx       # 0x20b4
movq %rbx, %rdi
callq 0x10c0
incl %ebp
movl 0x2cd1(%rip), %esi      # 0x40a4
cmpl %esi, %ebp
jl 0x13c3
decl %esi
leaq 0xcc6(%rip), %rdi       # 0x20a6
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1030
leaq 0xcc3(%rip), %rbx       # 0x20b3
cmpl $0x2, 0x2cad(%rip)      # 0x40a4
jl 0x141f
leaq 0xcb6(%rip), %r14       # 0x20b6
movq %r14, %rdi
callq 0x10c0
incl %ebp
movl 0x2c94(%rip), %eax      # 0x40a4
decl %eax
cmpl %eax, %ebp
jl 0x1400
jmp 0x141f
leaq 0xc90(%rip), %rbx       # 0x20af
movq %rbx, %rdi
callq 0x10c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1442
callq 0x1130
// File: /workspace/github_c_makefile_star2_O1/randyrossi[P]fisher-modem/mkfilter/src/complex.C
// Function: csqrt(complex)
global complex csqrt(complex x) {
  double r = hypot(x);
  complex z = complex(Xsqrt(0.5 * (r + x.re)), Xsqrt(0.5 * (r - x.re)));
  if (x.im < 0.0)
    z.im = -z.im;
  return z;
}

// Assembly:
subq $0x38, %rsp
movapd %xmm0, %xmm2
movsd %xmm0, (%rsp)
movapd %xmm1, 0x20(%rsp)
movapd %xmm1, %xmm0
movapd %xmm2, %xmm1
callq 0x1050
movsd (%rsp), %xmm5
movapd %xmm0, %xmm2
addsd %xmm5, %xmm0
mulsd 0xacf(%rip), %xmm0      # 0x20b8
xorpd %xmm4, %xmm4
ucomisd %xmm4, %xmm0
xorpd %xmm3, %xmm3
jb 0x1628
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x160a
xorps %xmm3, %xmm3
sqrtsd %xmm0, %xmm3
jmp 0x1628
movsd %xmm2, 0x18(%rsp)
callq 0x1060
movsd (%rsp), %xmm5
movsd 0x18(%rsp), %xmm2
xorpd %xmm4, %xmm4
movapd %xmm0, %xmm3
subsd %xmm5, %xmm2
mulsd 0xa84(%rip), %xmm2      # 0x20b8
ucomisd %xmm4, %xmm2
jb 0x1664
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jb 0x164d
xorps %xmm4, %xmm4
sqrtsd %xmm2, %xmm4
jmp 0x1664
movapd %xmm2, %xmm0
movapd %xmm3, (%rsp)
callq 0x1060
movapd (%rsp), %xmm3
movapd %xmm0, %xmm4
movapd 0xa54(%rip), %xmm0      # 0x20c0
xorpd %xmm4, %xmm0
xorpd %xmm2, %xmm2
movapd 0x20(%rsp), %xmm1
cmpltsd %xmm2, %xmm1
andpd %xmm1, %xmm0
andnpd %xmm4, %xmm1
orpd %xmm0, %xmm1
movapd %xmm3, %xmm0
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/kisom[P]kam/stack.c
// Function: push8
void
push8(stack8 st, uint8_t val)
{
	struct node8	*node;

	node = malloc(sizeof(struct node8));

	/* memory problems can only lead to more memory problems. */
	if (NULL == node)
		abort();

	node->val = val;
	node->next = st->st;
	st->st = node;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x10, %edi
callq 0x10b0
testq %rax, %rax
je 0x12c4
movb %bpl, (%rax)
movq (%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/kisom[P]kam/stack.c
// Function: destroy8
void
destroy8(stack8 st)
{
	struct node8 *node = NULL;

	while (NULL != (node = st->st)) {
		st->st = node->next;
		free(node);
	}
	free(st);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1313
movq 0x8(%rdi), %rax
movq %rax, (%rbx)
callq 0x1030
movq (%rbx), %rdi
jmp 0x12fd
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/kisom[P]kam/stack.c
// Function: push16
void
push16(stack16 st, uint16_t val)
{
	struct node16	*node;

	node = malloc(sizeof(struct node16));

	/* memory problems can only lead to more memory problems. */
	if (NULL == node)
		abort();

	node->val = val;
	node->next = st->st;
	st->st = node;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x10, %edi
callq 0x10b0
testq %rax, %rax
je 0x1364
movw %bp, (%rax)
movq (%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/kisom[P]kam/stack.c
// Function: destroy16
void
destroy16(stack16 st)
{
	struct node16 *node = NULL;

	while (NULL != (node = st->st)) {
		st->st = node->next;
		free(node);
	}
	free(st);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x13b4
movq 0x8(%rdi), %rax
movq %rax, (%rbx)
callq 0x1030
movq (%rbx), %rdi
jmp 0x139e
movq %rbx, %rdi
popq %rbx
jmp 0x1030
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/kisom[P]kam/vm.c
// Function: vm_new
machine
vm_new(void)
{
	machine vm = NULL;

	vm = malloc(sizeof(struct s_vm));
	if (NULL == vm)
		return NULL;

	vm->vals = new_stack16();
	vm->opers = new_stack8();
	vm->pc = 0;

	if ((NULL == vm->vals) || (NULL == vm->opers)) {
		vm_destroy(vm);
		return NULL;
	}
	return vm;
}

// Assembly:
pushq %rbx
movl $0x18, %edi
callq 0x10b0
testq %rax, %rax
je 0x1405
movq %rax, %rbx
callq 0x131c
movq %rax, (%rbx)
callq 0x127c
movq %rax, 0x8(%rbx)
movw $0x0, 0x10(%rbx)
cmpq $0x0, (%rbx)
sete %cl
testq %rax, %rax
sete %al
orb %cl, %al
cmpb $0x1, %al
jne 0x1407
movq %rbx, %rdi
callq 0x140c
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/kisom[P]kam/vm.c
// Function: vm_destroy
void
vm_destroy(machine vm)
{
	if (vm) {
		if (vm->vals)
			destroy16(vm->vals);
		if (vm->opers)
			destroy8(vm->opers);
		free(vm);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x1439
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1422
callq 0x1397
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x1430
callq 0x12f6
movq %rbx, %rdi
popq %rbx
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O1/kisom[P]kam/vm.c
// Function: vm_step
int
vm_step(machine vm, uint8_t *prog, uint16_t prog_len)
{
	uint16_t	val;
	uint8_t		oper;

	if (NULL == vm) {
		fprintf(stderr, "[!] VM not initialised.\n");
		return VM_ERR;
	}

	if (vm->pc == prog_len)
		return VM_STOP;

	oper = prog[vm->pc];
	vm->pc++;
	switch (oper) {
	case INSTR_STOP:
		return VM_STOP;
	case INSTR_ADD:  /* fall through: store the operator in */
	case INSTR_SUB:  /* the op stack                        */
	case INSTR_DIV:
	case INSTR_MUL:
		push8(vm->opers, oper);
		break;
	case INSTR_IMM:
		/* detect wrap around */
		if ((prog_len - vm->pc) >= prog_len) {
			fprintf(stderr, "[!] PC overflow.\n");
			return VM_ERR;
		}
		/* ensure we have enough progspace left */
		if ((prog_len - vm->pc) < 2) {
			fprintf(stderr, "[!] Out of program space.\n");
			fprintf(stderr, "    %d bytes remain.\n", 
			    prog_len - vm->pc);
			return VM_ERR;
		}
		memcpy(&val, prog + vm->pc, sizeof(val));
		push16(vm->vals, val);
		vm->pc += 2; /* 2 bytes == 16 bits */
		break;
	case INSTR_DO:
		return eval(vm);
	default:
		fprintf(stderr, "[!] Unknown operator: %d.\n", oper);
		return VM_ERR;

	}
	return VM_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1506
movq %rdi, %rbx
movzwl 0x10(%rdi), %ecx
movl $0x2, %ebp
cmpw %dx, %cx
je 0x1490
leaq 0x10(%rbx), %rdi
movzbl (%rsi,%rcx), %eax
incl %ecx
movw %cx, (%rdi)
cmpq $0x6, %rax
ja 0x153c
leaq 0xb8e(%rip), %r8        # 0x2004
movslq (%r8,%rax,4), %r9
addq %r8, %r9
jmpq *%r9
movq 0x8(%rbx), %rdi
movl %eax, %esi
callq 0x1299
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
testw %cx, %cx
je 0x155d
movzwl %dx, %eax
movzwl %cx, %ecx
movl %eax, %edx
subl %ecx, %edx
cmpl $0x1, %edx
jle 0x1564
movzwl (%rsi,%rcx), %esi
movq (%rbx), %rdi
callq 0x1339
addw $0x2, 0x10(%rbx)
jmp 0x148b
movq (%rbx), %rdi
callq 0x1369
movl %eax, %ebp
movq (%rbx), %rdi
callq 0x1369
movl %eax, %r14d
movq 0x8(%rbx), %rdi
callq 0x12c9
movzbl %al, %eax
decl %eax
cmpl $0x3, %eax
ja 0x156d
leaq 0xb2b(%rip), %rcx       # 0x2020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rbx), %rdi
addl %ebp, %r14d
jmp 0x152e
callq 0x1150
xorl %ebp, %ebp
jmp 0x1490
movq (%rbx), %rdi
imull %ebp, %r14d
jmp 0x152e
movq (%rbx), %rdi
movl %r14d, %eax
xorl %edx, %edx
divw %bp
movzwl %ax, %esi
jmp 0x1532
movq (%rbx), %rdi
subl %ebp, %r14d
movzwl %r14w, %esi
callq 0x1339
jmp 0x148b
movq 0x2ab5(%rip), %rcx      # 0x3ff8
movq (%rcx), %rdi
leaq 0xb3f(%rip), %rsi       # 0x208c
xorl %ebp, %ebp
movl %eax, %edx
xorl %eax, %eax
callq 0x1090
jmp 0x1490
callq 0x1134
jmp 0x150b
movl %eax, %esi
callq 0x10f0
jmp 0x150b
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/kisom[P]kam/vm.c
// Function: vm_peek
uint16_t
vm_peek(machine vm)
{
	uint16_t val;

	if (NULL == vm)
		return 0;
	if (NULL == vm->vals)
		return 0;
	if (empty16(vm->vals))
		return 0;

	val = pop16(vm->vals);
	push16(vm->vals, val);
	return val;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x15b3
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x15b3
callq 0x138d
testl %eax, %eax
je 0x15bf
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r14), %rdi
callq 0x1369
movl %eax, %ebx
movq (%r14), %rdi
movzwl %ax, %esi
callq 0x1339
jmp 0x15b5
nop
// File: /workspace/github_c_makefile_star2_O1/kisom[P]kam/kamvm.c
// Function: main
int
main(int argc, const char *argv[])
{
	if (0 == argc)
		return interpreter();
	else
		return run(argv[1]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x90, %rsp
testl %edi, %edi
je 0x1712
movq 0x8(%rsi), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x10a0
movl $0x1, %ebx
cmpl $-0x1, %eax
je 0x16c2
movq 0x30(%rsp), %r13
leaq 0xab7(%rip), %rdi       # 0x20d0
xorl %r12d, %r12d
movq %r13, %rsi
xorl %eax, %eax
callq 0x1080
movq %r13, %rdi
callq 0x10b0
testq %rax, %rax
je 0x16c5
movq %rax, %r15
leaq 0xaaa(%rip), %rsi       # 0x20eb
movq %r14, %rdi
callq 0x10c0
testq %rax, %rax
je 0x16d2
movq %rax, %r14
movl $0x1, %esi
movq %r15, %rdi
movq %r13, %rdx
movq %rax, %rcx
callq 0x1060
cmpq %rax, %r13
jne 0x16cd
callq 0x13c0
testq %rax, %rax
je 0x16cd
movq %rax, %r12
leaq 0xa73(%rip), %rdi       # 0x20f4
callq 0x1050
movzwl %r13w, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1572
testl %eax, %eax
je 0x16d8
movq %r12, %rdi
callq 0x1596
movzwl %ax, %esi
leaq 0xa43(%rip), %rdi       # 0x20ee
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1080
leaq 0xa46(%rip), %rdi       # 0x2101
callq 0x1050
jmp 0x16d8
xorl %r12d, %r12d
xorl %r14d, %r14d
xorl %r15d, %r15d
jmp 0x16d8
xorl %r12d, %r12d
jmp 0x16d8
xorl %r12d, %r12d
xorl %r14d, %r14d
testq %r15, %r15
je 0x16e5
movq %r15, %rdi
callq 0x1030
testq %r12, %r12
je 0x16f2
movq %r12, %rdi
callq 0x140c
testq %r14, %r14
je 0x16ff
movq %r14, %rdi
callq 0x1070
movl %ebx, %eax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x116c
movl $0x1, %ebx
jmp 0x16ff
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/bgzf.c
// Function: bgzf_mt
int bgzf_mt(BGZF *fp, int n_threads, int n_sub_blks)
{
	int i;
	mtaux_t *mt;
	pthread_attr_t attr;
	if (!fp->is_write || fp->mt || n_threads <= 1) return -1;
	mt = (mtaux_t*)calloc(1, sizeof(mtaux_t));
	mt->n_threads = n_threads;
	mt->n_blks = n_threads * n_sub_blks;
	mt->len = (int*)calloc(mt->n_blks, sizeof(int));
	mt->blk = (void**)calloc(mt->n_blks, sizeof(void*));
	for (i = 0; i < mt->n_blks; ++i)
		mt->blk[i] = malloc(BGZF_MAX_BLOCK_SIZE);
	mt->tid = (pthread_t*)calloc(mt->n_threads, sizeof(pthread_t)); // tid[0] is not used, as the worker 0 is launched by the master
	mt->w = (worker_t*)calloc(mt->n_threads, sizeof(worker_t));
	for (i = 0; i < mt->n_threads; ++i) {
		mt->w[i].i = i;
		mt->w[i].mt = mt;
		mt->w[i].fp = fp;
		mt->w[i].buf = malloc(BGZF_MAX_BLOCK_SIZE);
	}
	pthread_attr_init(&attr);
	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
	pthread_mutex_init(&mt->lock, 0);
	pthread_cond_init(&mt->cv, 0);
	for (i = 1; i < mt->n_threads; ++i) // worker 0 is effectively launched by the master thread
		pthread_create(&mt->tid[i], &attr, mt_worker, &mt->w[i]);
	fp->mt = mt;
	return 0;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x3, 0x2(%rdi)
je 0x4113
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebp
cmpl $0x2, %esi
jl 0x4105
movq %rdi, %r13
cmpq $0x0, 0x38(%rdi)
jne 0x4105
movl %edx, %r12d
movl $0x1, %edi
movl $0x90, %esi
callq 0x21f0
movq %rax, %r14
movl %ebp, (%rax)
imull %ebp, %r12d
movl %r12d, 0x4(%rax)
movslq %r12d, %r15
movl $0x4, %esi
movq %r15, %rdi
callq 0x21f0
movq %rax, 0x20(%r14)
movl $0x8, %esi
movq %r15, %rdi
callq 0x21f0
movq %rax, 0x18(%r14)
testl %r15d, %r15d
jle 0x401c
movl %r12d, %ebx
xorl %r15d, %r15d
movl $0x10000, %edi          # imm = 0x10000
callq 0x22a0
movq 0x18(%r14), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
cmpq %r15, %rbx
jne 0x4002
movl %ebp, %r15d
movl $0x8, %esi
movq %r15, %rdi
callq 0x21f0
movq %rax, 0x30(%r14)
movl $0x28, %esi
movq %r15, %rdi
callq 0x21f0
movq %rax, 0x28(%r14)
testl %ebp, %ebp
jle 0x4077
movq %rax, %r12
addq $0x18, %r12
xorl %ebx, %ebx
movl %ebx, (%r12)
movq %r14, -0x10(%r12)
movq %r13, -0x18(%r12)
movl $0x10000, %edi          # imm = 0x10000
callq 0x22a0
movq %rax, -0x8(%r12)
incq %rbx
addq $0x28, %r12
cmpq %rbx, %r15
jne 0x404e
movq %r13, 0x8(%rsp)
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x21e0
movq %r12, %rdi
xorl %esi, %esi
callq 0x2280
leaq 0x38(%r14), %rdi
xorl %esi, %esi
callq 0x23e0
movq %r14, %rdi
addq $0x60, %rdi
xorl %esi, %esi
callq 0x2270
cmpl $0x2, (%r14)
jl 0x40fa
movl $0x1, %ebp
movl $0x28, %r15d
movl $0x8, %ebx
leaq 0x4b(%rip), %r12        # 0x4114
leaq 0x10(%rsp), %r13
movq 0x30(%r14), %rdi
addq %rbx, %rdi
movq 0x28(%r14), %rcx
addq %r15, %rcx
movq %r13, %rsi
movq %r12, %rdx
callq 0x2300
incq %rbp
movslq (%r14), %rax
addq $0x28, %r15
addq $0x8, %rbx
cmpq %rax, %rbp
jl 0x40ce
movq 0x8(%rsp), %rax
movq %r14, 0x38(%rax)
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_O1/DReichLab[P]adna/bgzf.c
// Function: bgzf_flush
int bgzf_flush(BGZF *fp)
{
	if (!fp->is_write) return 0;
#ifdef BGZF_MT
	if (fp->mt) return mt_flush(fp);
#endif
	while (fp->block_offset > 0) {
		int block_length;
		block_length = deflate_block(fp, fp->block_offset);
		if (block_length < 0) return -1;
		if (fwrite(fp->compressed_block, 1, block_length, (FILE*)fp->fp) != (size_t)block_length) {
			fp->errcode |= BGZF_ERR_IO; // possibly truncated file
			return -1;
		}
		fp->block_address += block_length;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
testb $0x3, 0x2(%rdi)
je 0x4189
movq %rdi, %r14
cmpq $0x0, 0x38(%rdi)
je 0x4176
movq %r14, %rdi
callq 0x4191
jmp 0x4189
movq %r14, %rdi
callq 0x4283
testl %eax, %eax
js 0x4184
movl %eax, %r15d
movq 0x20(%r14), %rdi
movq 0x30(%r14), %rcx
movl $0x1, %esi
movq %r15, %rdx
callq 0x23b0
cmpq %r15, %rax
jne 0x4180
addq %r15, 0x10(%r14)
movl 0xc(%r14), %esi
testl %esi, %esi
jg 0x4149
jmp 0x4189
orb $0x4, (%r14)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/bgzf.c
// Function: bgzf_write
ssize_t bgzf_write(BGZF *fp, const void *data, ssize_t length)
{
	const uint8_t *input = (const uint8_t*)data;
	int block_length = BGZF_BLOCK_SIZE, bytes_written = 0;
	assert(fp->is_write);
#ifdef BGZF_MT
	if (fp->mt) return mt_write(fp, data, length);
#endif
	while (bytes_written < length) {
		uint8_t* buffer = (uint8_t*)fp->uncompressed_block;
		int copy_length = block_length - fp->block_offset < length - bytes_written? block_length - fp->block_offset : length - bytes_written;
		memcpy(buffer + fp->block_offset, input, copy_length);
		fp->block_offset += copy_length;
		input += copy_length;
		bytes_written += copy_length;
		if (fp->block_offset == block_length && bgzf_flush(fp)) break;
	}
	return bytes_written;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testb $0x3, 0x2(%rdi)
je 0x4414
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x0, 0x38(%rdi)
je 0x43a0
testq %rbx, %rbx
je 0x4407
movq %rbx, %r13
movslq 0xc(%r15), %rdi
movl $0xff00, %eax           # imm = 0xFF00
subq %rdi, %rax
cmpq %rax, %r13
movl %r13d, %ecx
cmovgl %eax, %ecx
addq 0x18(%r15), %rdi
movslq %ecx, %r12
movq %r14, %rsi
movq %r12, %rdx
callq 0x2240
movl 0xc(%r15), %eax
addl %r12d, %eax
movl %eax, 0xc(%r15)
cmpl $0xff00, %eax           # imm = 0xFF00
jne 0x4396
movq %r15, %rdi
callq 0x42ec
addq %r12, %r14
subq %r12, %r13
jne 0x4355
jmp 0x4407
xorl %r13d, %r13d
testq %rbx, %rbx
jle 0x4405
xorl %eax, %eax
movslq 0xc(%r15), %rdi
movl $0xff00, %ecx           # imm = 0xFF00
subq %rdi, %rcx
movq %rbx, %rdx
subq %rax, %rdx
cmpq %rcx, %rdx
cmovgl %ecx, %edx
addq 0x18(%r15), %rdi
movslq %edx, %r12
movq %r14, %rsi
movq %r12, %rdx
callq 0x2240
addl %r12d, %r13d
movl 0xc(%r15), %eax
addl %r12d, %eax
movl %eax, 0xc(%r15)
addq %r12, %r14
cmpl $0xff00, %eax           # imm = 0xFF00
jne 0x43f8
movq %r15, %rdi
callq 0x4128
testl %eax, %eax
jne 0x4400
movslq %r13d, %rax
cmpq %rbx, %rax
jl 0x43aa
movslq %r13d, %rbx
jmp 0x4407
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x9e2e(%rip), %rdi      # 0xe249
leaq 0x9d93(%rip), %rsi      # 0xe1b5
leaq 0x9e2d(%rip), %rcx      # 0xe256
movl $0x23d, %edx            # imm = 0x23D
callq 0x2180