LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/postingList.c
// Function: getNamesAsStringPL
char* getNamesAsStringPL(ePostingList *self){//self != NULL here
	if(self->pl==NULL) return NULL;
	postingList1 *temp = self->pl;
	char *name = temp->name;
	replaceSpaces(&name);
	int rescount=strlen(name)+4;
	char *tmp=" : ";
	char *res = malloc(rescount*sizeof(char));
	strcpy(res,tmp);
	strcat(res,name);
	while((temp=temp->next) != NULL){
		name = temp->name;
		replaceSpaces(&name);
		rescount+=strlen(name)+3;
		res = realloc(res,rescount*sizeof(char));
		strcat(res,tmp);
		strcat(res,name);
	}
	res[rescount-1] = '\0';
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1e54
movq $0x0, -0x8(%rbp)
jmp 0x1f46
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1db0
movq -0x20(%rbp), %rdi
callq 0x1110
addq $0x4, %rax
movl %eax, -0x24(%rbp)
leaq 0x643d(%rip), %rax      # 0x82c9
movq %rax, -0x30(%rbp)
movslq -0x24(%rbp), %rdi
shlq $0x0, %rdi
callq 0x11e0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1080
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1280
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1f2d
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1db0
movq -0x20(%rbp), %rdi
callq 0x1110
movq %rax, %rcx
addq $0x3, %rcx
movslq -0x24(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x24(%rbp)
movq -0x38(%rbp), %rdi
movslq -0x24(%rbp), %rsi
shlq $0x0, %rsi
callq 0x1200
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1280
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1280
jmp 0x1ebb
movq -0x38(%rbp), %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/postingList.c
// Function: getNodeDataPL
void getNodeDataPL(ePostingList *self, int*** info, int* infoc){
	if(self->pl==NULL) return;
	int fcounter = self->counter;
	int flcounter = 0;
	postingList1 *temp = self->pl;
	for(int i=0;i<fcounter;i++){
		flcounter += temp->linecounter;
		temp = temp->next;
	}
	if(flcounter == 0) return;
	(*info) = malloc(flcounter*sizeof(int*));
	*infoc = flcounter;
	flcounter = 0;
	temp = self->pl;
	for(int i=0;i<fcounter;i++){
		postingList2 *pl2temp = temp->pl;
		for(int j=0;j<temp->linecounter;j++){
			(*info)[flcounter + j] = malloc(2*sizeof(int));//[fileid,line]
			(*info)[flcounter + j][0] = temp->id;
			(*info)[flcounter + j][1] = pl2temp->line;
			pl2temp = pl2temp->next;
		}
		flcounter += temp->linecounter;
		temp = temp->next;
	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1f74
jmp 0x20ce
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x1fc3
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1f97
cmpl $0x0, -0x20(%rbp)
jne 0x1fce
jmp 0x20ce
movslq -0x20(%rbp), %rdi
shlq $0x3, %rdi
callq 0x11e0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x20cc
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x20a5
movl $0x8, %edi
callq 0x11e0
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %edx
addl -0x3c(%rbp), %edx
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %edx
addl -0x3c(%rbp), %edx
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x4(%rax)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x2027
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x2008
jmp 0x20ce
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/trie.c
// Function: nodeConstruct
node* nodeConstruct(char v){
	node* newNode = malloc(sizeof( node));
	newNode->value=v;
	newNode->next=NULL;
	newNode->child=NULL;
	newNode->myPL=NULL;
//	newNode->myPL=ePostingListConstuct();
	return newNode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movl $0x20, %edi
callq 0x11e0
movq %rax, -0x10(%rbp)
movb -0x1(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/trie.c
// Function: nodeDestruct
void nodeDestruct(node* self){
	if(self==NULL) return;
	ePostingListDestruct(self->myPL);
	nodeDestruct(self->next);
	nodeDestruct(self->child);
	free(self);
	self=NULL;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x2155
jmp 0x218d
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1920
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2140
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2140
movq -0x8(%rbp), %rdi
callq 0x1030
movq $0x0, -0x8(%rbp)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/trieInsertion.c
// Function: createTrie
int createTrie(char** Doc,int lines,char* name,int id,node** trie,int sorted){
	char* word=NULL;
	int start;
	int counter = 0;
	for(int f=0;f<lines;f++){
		start=0;
		while((start = nextWord(Doc[f],&word,start))!=-2){
			insertInTrie(trie,word,f,name,id,sorted);//f=line
			counter++;
			free(word);
		}
	}
	return counter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x28f0
movl $0x0, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x3c(%rbp), %edx
leaq -0x38(%rbp), %rsi
callq 0x2430
movl %eax, -0x3c(%rbp)
cmpl $-0x2, %eax
je 0x28e3
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x44(%rbp), %edx
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %r8d
movl -0x2c(%rbp), %r9d
callq 0x2620
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x1030
jmp 0x2893
jmp 0x28e5
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x2884
movl -0x40(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/jobExec/child.c
// Function: Csighandler
void Csighandler(int sig){
	if(sig == SIGINT || sig == SIGTERM || sig == SIGQUIT || sig == SIGPIPE){
		flagCINT=1;
	}
	else if(sig == SIGUSR1){
		flagUSR1 = 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
cmpl $0x2, -0x4(%rbp)
je 0x291f
cmpl $0xf, -0x4(%rbp)
je 0x291f
cmpl $0x3, -0x4(%rbp)
je 0x291f
cmpl $0xd, -0x4(%rbp)
jne 0x292b
movl $0x1, 0x8873(%rip)      # 0xb19c
jmp 0x293d
cmpl $0xa, -0x4(%rbp)
jne 0x293b
movl $0x1, 0x8865(%rip)      # 0xb1a0
jmp 0x293d
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/jobExec/fifo_fcts.c
// Function: initNames
void initNames(fifo_info **fifo,int n){
	if(fifo==NULL) return ;
	char *f1="../PantoulasStefanosProject2/jobExec/tmp/fifo1_w";
	char *f2="../PantoulasStefanosProject2/jobExec/tmp/fifo2_w";
	char *buf;
	for(int i=0;i<n;i++){
		buf = myitoa(i+1);
		(*fifo)[2*i].name = malloc((49 + itol(i+1))*sizeof(char));
		strcpy((*fifo)[2*i].name,f1);
		strcat((*fifo)[2*i].name,buf);
		(*fifo)[2*i+1].name = malloc((49 + itol(i+1))*sizeof(char));
		strcpy((*fifo)[2*i+1].name,f2);
		strcat((*fifo)[2*i+1].name,buf);
		free(buf);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x435b
jmp 0x44a7
leaq 0x3ff5(%rip), %rax      # 0x8357
movq %rax, -0x18(%rbp)
leaq 0x401b(%rip), %rax      # 0x8388
movq %rax, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x44a7
movl -0x2c(%rbp), %edi
addl $0x1, %edi
callq 0x4620
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %edi
addl $0x1, %edi
callq 0x45e0
addl $0x31, %eax
movslq %eax, %rdi
shlq $0x0, %rdi
callq 0x11e0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x2c(%rbp), %edx
shll %edx
movslq %edx, %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x1080
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x1280
movl -0x2c(%rbp), %edi
addl $0x1, %edi
callq 0x45e0
addl $0x31, %eax
movslq %eax, %rdi
shlq $0x0, %rdi
callq 0x11e0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x2c(%rbp), %edx
shll %edx
addl $0x1, %edx
movslq %edx, %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x1080
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x1280
movq -0x28(%rbp), %rdi
callq 0x1030
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4378
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/jobExec/functions.c
// Function: read_command
int read_command(int fd,char **buf,int size){
	char c;
	int n;
	int counter=0;
	while(1){
		if((n=read(fd,&c,1)) < 0) return n;
		if(!n){
			strcpy((*buf),"_BROKEN_FIFO_");
			counter = 13;
			break;
		}
		if(counter == size){//then realloc 
			size *=2;
			(*buf) = realloc((*buf),size*sizeof(char));
		}
		if(c == '\0' || c == EOF){
			(*buf)[counter] = '\0';
			break;
		}
		else (*buf)[counter++] = c;
	}
	return counter+1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x8(%rbp), %edi
leaq -0x15(%rbp), %rsi
movl $0x1, %edx
callq 0x1150
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
jge 0x452d
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x45c9
cmpl $0x0, -0x1c(%rbp)
jne 0x454f
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x3cc3(%rip), %rsi      # 0x8204
callq 0x1080
movl $0xd, -0x20(%rbp)
jmp 0x45c0
movl -0x20(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x457d
movl -0x14(%rbp), %eax
shll %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movslq -0x14(%rbp), %rsi
shlq $0x0, %rsi
callq 0x1200
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movsbl -0x15(%rbp), %eax
cmpl $0x0, %eax
je 0x458f
movsbl -0x15(%rbp), %eax
cmpl $-0x1, %eax
jne 0x45a0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x45c0
movb -0x15(%rbp), %dl
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x4509
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/jobExec/functions.c
// Function: itol
int itol(int value){
	int counter=1;
	if(value<0) value*=-1;
	while((value/=10)>0) counter++;
	return counter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl $0x1, -0x8(%rbp)
cmpl $0x0, -0x4(%rbp)
jge 0x45fb
imull $-0x1, -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x45fd
movl -0x4(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, -0x4(%rbp)
cmpl $0x0, %eax
jle 0x461b
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x45fd
movl -0x8(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/jobExec/functions.c
// Function: myitoa
char* myitoa(int value){
	int c=itol(value);
	char *ptr = malloc((c+1)*sizeof(char));
	ptr[c--] = '\0';
	if(value == 0) ptr[0] = '0';
	while(value){
		ptr[c--] = value%10 + '0';
		value/=10;
	}
	return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
callq 0x45e0
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x0, %rdi
callq 0x11e0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
movl %ecx, %edx
addl $-0x1, %edx
movl %edx, -0x8(%rbp)
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
cmpl $0x0, -0x4(%rbp)
jne 0x466f
movq -0x10(%rbp), %rax
movb $0x30, (%rax)
jmp 0x4671
cmpl $0x0, -0x4(%rbp)
je 0x46aa
movl -0x4(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
addl $0x30, %edx
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
movl %ecx, %esi
addl $-0x1, %esi
movl %esi, -0x8(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, -0x4(%rbp)
jmp 0x4671
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/jobExec/functions.c
// Function: findChildPos
int findChildPos(pid_t chid,pid_t *pids,int w){
	int pos = 0;
	for(int i=0;i<w;i++)
		if(pids[i]==chid){
			pos=i;
			break;
		}
	return pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x4749
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x4(%rbp), %eax
jne 0x473c
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x4749
jmp 0x473e
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x471c
movl -0x18(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/jobExec/parent.c
// Function: Psighandler
void Psighandler(int sig, siginfo_t* info, void *secret){
	if(sig == SIGINT || sig == SIGTERM || sig == SIGQUIT){
		flagINT=1;
	}
	else if(sig == SIGCHLD){
		while(1){
			pid_t pid = waitpid(-1,NULL,WNOHANG);//wait for any child or ret 0
			if(pid <= 0) break;
			deadCHILD[deadChildCounter++] = pid;//save what you find
		}
	}
	else if(sig == SIGPIPE){}//ignore it
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpl $0x2, -0x4(%rbp)
je 0x4d25
cmpl $0xf, -0x4(%rbp)
je 0x4d25
cmpl $0x3, -0x4(%rbp)
jne 0x4d31
movl $0x1, 0x6479(%rip)      # 0xb1a8
jmp 0x4d88
cmpl $0x11, -0x4(%rbp)
jne 0x4d7c
jmp 0x4d39
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x1230
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jg 0x4d57
jmp 0x4d7a
movl -0x1c(%rbp), %edx
movq 0x644f(%rip), %rax      # 0xb1b0
movl 0x6445(%rip), %ecx      # 0xb1ac
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x643a(%rip)      # 0xb1ac
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x4d39
jmp 0x4d86
cmpl $0xd, -0x4(%rbp)
jne 0x4d84
jmp 0x4d84
jmp 0x4d86
jmp 0x4d88
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/jobExec/PCOptions.c
// Function: decode_plus
void decode_plus(char* buffer,int *bytes,int *words,int *lines){//for WC
	if(buffer==NULL) return;
	int start;
	char* word = NULL;
	start = nextWord(buffer,&word,0);//read bytes
	*bytes += atoi(word);
	free(word);
	word = NULL;
	start = nextWord(buffer,&word,start);
	*words += atoi(word);
	free(word);
	word = NULL;
	start = nextWord(buffer,&word,start);
	*lines += atoi(word);
	free(word);
	word = NULL;
	if(start != -1) printf("Unexpected result!(%s)\n",buffer);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x6da4
jmp 0x6e6a
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0x2430
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rdi
callq 0x1270
movl %eax, %ecx
movq -0x10(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rdi
callq 0x1030
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq -0x30(%rbp), %rsi
callq 0x2430
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rdi
callq 0x1270
movl %eax, %ecx
movq -0x18(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rdi
callq 0x1030
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq -0x30(%rbp), %rsi
callq 0x2430
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rdi
callq 0x1270
movl %eax, %ecx
movq -0x20(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rdi
callq 0x1030
movq $0x0, -0x30(%rbp)
cmpl $-0x1, -0x24(%rbp)
je 0x6e68
movq -0x8(%rbp), %rsi
leaq 0x1871(%rip), %rdi      # 0x86d2
movb $0x0, %al
callq 0x1120
jmp 0x6e6a
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/jobExec/PCOptions.c
// Function: decode_MAX
void decode_MAX(char* buffer,char** myname,int *maxcounter){//for MAXCOUNT
	if(!strcmp(buffer,"-")) return;//no result from child
	char* name;
	char* word;
	int counter;
	int start = nextWord(buffer,&word,0);
	int name_len = strlen(word) + 1;
	name = malloc(name_len*sizeof(char));
	strcpy(name,word);
	free(word);
	while((start = nextWord(buffer,&word,start)) != -1){//name maybe has spaces
		name_len += strlen(word) + 2;
		name = realloc(name,name_len*sizeof(char));
		strcat(name," ");
		strcat(name,word);
		free(word);
	}
	counter = atoi(word);
	free(word);
	if(counter>*maxcounter || (counter==*maxcounter && strcmp(name,*myname)<0)){
		*maxcounter = counter;
		if(*myname != NULL) free(*myname);
		*myname = name;
	}
	else free(name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x1611(%rip), %rsi      # 0x84a0
callq 0x1160
cmpl $0x0, %eax
jne 0x6e9e
jmp 0x6fcb
movq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x2430
movl %eax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1110
addq $0x1, %rax
movl %eax, -0x34(%rbp)
movslq -0x34(%rbp), %rdi
shlq $0x0, %rdi
callq 0x11e0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1080
movq -0x28(%rbp), %rdi
callq 0x1030
movq -0x8(%rbp), %rdi
movl -0x30(%rbp), %edx
leaq -0x28(%rbp), %rsi
callq 0x2430
movl %eax, -0x30(%rbp)
cmpl $-0x1, %eax
je 0x6f56
movq -0x28(%rbp), %rdi
callq 0x1110
movq %rax, %rcx
addq $0x2, %rcx
movslq -0x34(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rsi
shlq $0x0, %rsi
callq 0x1200
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x1392(%rip), %rsi      # 0x82cb
callq 0x1280
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1280
movq -0x28(%rbp), %rdi
callq 0x1030
jmp 0x6ee7
movq -0x28(%rbp), %rdi
callq 0x1270
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1030
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jg 0x6f96
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x6fc2
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x1160
cmpl $0x0, %eax
jge 0x6fc2
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x6fb5
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x1030
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x6fcb
movq -0x20(%rbp), %rdi
callq 0x1030
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/jobExec/PCOptions.c
// Function: decode_MIN
void decode_MIN(char* buffer,char** myname,int *mincounter){//for MINCOUNT
	if(!strcmp(buffer,"-")) return;//no result from child
	char *name;
	char* word;
	int counter;	
	int start = nextWord(buffer,&word,0);
	int name_len = strlen(word) + 1;
	name = malloc(name_len*sizeof(char));
	strcpy(name,word);
	free(word);
	while((start = nextWord(buffer,&word,start)) != -1){//name maybe has spaces
		name_len += strlen(word) + 2;
		name = realloc(name,name_len*sizeof(char));
		strcat(name," ");
		strcat(name,word);
		free(word);
	}
	counter = atoi(word);
	free(word);
	if(counter<*mincounter || *mincounter==-1 || (counter==*mincounter && strcmp(name,*myname)<0)){
		*mincounter = counter;
		if(*myname != NULL) free(*myname);
		*myname = name;
	}
	else free(name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x14a1(%rip), %rsi      # 0x84a0
callq 0x1160
cmpl $0x0, %eax
jne 0x700e
jmp 0x7144
movq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x2430
movl %eax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1110
addq $0x1, %rax
movl %eax, -0x34(%rbp)
movslq -0x34(%rbp), %rdi
shlq $0x0, %rdi
callq 0x11e0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1080
movq -0x28(%rbp), %rdi
callq 0x1030
movq -0x8(%rbp), %rdi
movl -0x30(%rbp), %edx
leaq -0x28(%rbp), %rsi
callq 0x2430
movl %eax, -0x30(%rbp)
cmpl $-0x1, %eax
je 0x70c6
movq -0x28(%rbp), %rdi
callq 0x1110
movq %rax, %rcx
addq $0x2, %rcx
movslq -0x34(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rsi
shlq $0x0, %rsi
callq 0x1200
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x1222(%rip), %rsi      # 0x82cb
callq 0x1280
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1280
movq -0x28(%rbp), %rdi
callq 0x1030
jmp 0x7057
movq -0x28(%rbp), %rdi
callq 0x1270
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1030
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jl 0x710f
movq -0x18(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x710f
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x713b
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x1160
cmpl $0x0, %eax
jge 0x713b
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x712e
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x1030
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x7144
movq -0x20(%rbp), %rdi
callq 0x1030
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x1, -0x34(%rbp)
jmp 0x7309
movsbl -0x21(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x21c0
movb %al, %cl
movl -0x38(%rbp), %eax
movsbl %cl, %ecx
cmpl %ecx, %eax
jne 0x732e
movl $0x0, -0x34(%rbp)
jmp 0x737f
movsbl -0x21(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rdi
callq 0x21c0
movb %al, %cl
movl -0x3c(%rbp), %eax
movsbl %cl, %ecx
cmpl %ecx, %eax
jge 0x7352
cmpl $0x0, -0x1c(%rbp)
je 0x7352
jmp 0x737f
jmp 0x7354
movq -0x30(%rbp), %rdi
callq 0x21f0
cmpq $0x0, %rax
jne 0x7370
movq $0x0, -0x8(%rbp)
jmp 0x73fa
movq -0x30(%rbp), %rdi
callq 0x21f0
movq %rax, -0x30(%rbp)
jmp 0x7309
cmpl $0x0, -0x34(%rbp)
je 0x738f
movq $0x0, -0x8(%rbp)
jmp 0x73fa
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x20(%rbp)
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x21(%rbp)
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x73cf
movq -0x30(%rbp), %rdi
callq 0x22f0
cmpl $0x0, %eax
jne 0x73c5
movq $0x0, -0x8(%rbp)
jmp 0x73fa
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x73fa
movq -0x30(%rbp), %rdi
callq 0x2230
cmpq $0x0, %rax
jne 0x73e8
movq $0x0, -0x8(%rbp)
jmp 0x73fa
movq -0x30(%rbp), %rdi
callq 0x2230
movq %rax, -0x30(%rbp)
jmp 0x7307
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq 0x2d5f(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd61(%rip), %rsi       # 0x2004
movb $0x0, %al
callq 0x10e0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movl $0x44, %edx
callq 0x1040
cmpq $0x44, %rax
je 0x12d7
leaq 0xd57(%rip), %rdi       # 0x201f
callq 0x1120
movl $0x1, %edi
callq 0x1150
movq 0x2d1a(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd53(%rip), %rsi       # 0x203b
movb $0x0, %al
callq 0x10e0
movl -0x8(%rbp), %edi
leaq -0x14(%rbp), %rsi
movl $0x4, %edx
callq 0x10b0
cmpq $0x4, %rax
je 0x131c
leaq 0xd58(%rip), %rdi       # 0x2065
callq 0x1120
movl $0x1, %edi
callq 0x1150
cmpl $0x0, -0x14(%rbp)
jge 0x136a
movq 0x2ccf(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movl -0x14(%rbp), %edx
leaq 0xd50(%rip), %rsi       # 0x2086
movb $0x0, %al
callq 0x10e0
movq 0x2cb4(%rip), %rax      # 0x3ff8
movq (%rax), %rax
movq %rax, -0x20(%rbp)
xorl %edi, %edi
subl -0x14(%rbp), %edi
callq 0x1160
movq -0x20(%rbp), %rdi
movq %rax, %rdx
leaq 0xd49(%rip), %rsi       # 0x20ac
movb $0x0, %al
callq 0x10e0
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x8(%rbp), %rdx
callq 0x10c0
cmpq $0x0, %rax
jne 0x13bb
movq 0x2c58(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd0d(%rip), %rsi       # 0x20b7
movb $0x0, %al
callq 0x10e0
movl $0x1, %edi
callq 0x1150
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1060
movq %rax, %rcx
movq -0x20(%rbp), %rax
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x1400
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1060
movq %rax, %rcx
movq -0x28(%rbp), %rax
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x3, -0x8(%rbp)
je 0x16a1
movq 0x2972(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xb94(%rip), %rsi       # 0x2224
movb $0x0, %al
callq 0x10e0
movl $0x1, %edi
callq 0x1150
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1140
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1140
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x16cd
cmpl $0x0, -0x14(%rbp)
jne 0x16f5
movq 0x2924(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movl -0x18(%rbp), %edx
movl -0x14(%rbp), %ecx
leaq 0xb73(%rip), %rsi       # 0x2257
movb $0x0, %al
callq 0x10e0
movl $0x1, %edi
callq 0x1150
leaq 0xb94(%rip), %rdi       # 0x2290
movb $0x0, %al
callq 0x1090
leaq 0xba5(%rip), %rdi       # 0x22af
movb $0x0, %al
callq 0x1090
movq 0x28b8(%rip), %rax      # 0x3fd0
movq (%rax), %rdi
callq 0x1100
movq 0x28b1(%rip), %rax      # 0x3fd8
movq (%rax), %rdi
leaq -0x80(%rbp), %rsi
movl $0x64, %edx
callq 0x1370
leaq -0x80(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0x1430
jmp 0x1703
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x2d4b
leaq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0xe681(%rip), %rsi      # 0x1132d
movb $0x0, %al
callq 0x2310
leaq -0x40(%rbp), %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x20d0
cmpl $0x0, %eax
je 0x2d0a
jmp 0x2cc8
callq 0x20a0
cmpl $0x0, (%rax)
je 0x2cf1
leaq -0x40(%rbp), %rsi
leaq 0xd535(%rip), %rdi      # 0x10212
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x2d03
leaq -0x40(%rbp), %rsi
leaq 0xd516(%rip), %rdi      # 0x10212
movb $0x0, %al
callq 0x4490
jmp 0x2d05
jmp 0x2e09
leaq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0xd503(%rip), %rsi      # 0x1021c
callq 0x2e20
cmpl $0x0, %eax
je 0x2d28
jmp 0x2e09
leaq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0xd385(%rip), %rsi      # 0x100bc
callq 0x2e20
cmpl $0x0, %eax
je 0x2d46
jmp 0x2e09
jmp 0x2df0
movq -0x18(%rbp), %rdi
movq 0x13282(%rip), %rax     # 0x15fd8
movq (%rax), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x2340
cmpq $0x1, %rax
je 0x2d71
jmp 0x2e09
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %esi
movq 0x1324f(%rip), %rax     # 0x15fd8
movq (%rax), %rcx
movl $0x1, %edx
callq 0x2340
cmpq $0x1, %rax
je 0x2d9e
jmp 0x2e09
movq -0x20(%rbp), %rdi
movq 0x1322f(%rip), %rax     # 0x15fd8
movq (%rax), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x2340
cmpq $0x1, %rax
je 0x2dc1
jmp 0x2e09
movq -0x20(%rbp), %rdi
addq $0x1, %rdi
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %esi
movq 0x131ff(%rip), %rax     # 0x15fd8
movq (%rax), %rcx
movl $0x1, %edx
callq 0x2340
cmpq $0x1, %rax
je 0x2dee
jmp 0x2e09
jmp 0x2df0
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x2e10
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x28(%rbp), %rdi
leaq 0xd3d7(%rip), %rsi      # 0x1021e
movb $0x0, %al
callq 0x3010
cmpl $-0x1, %eax
jne 0x2e8f
jmp 0x2e55
callq 0x20a0
cmpl $0x0, (%rax)
je 0x2e7a
leaq 0xd3be(%rip), %rdi      # 0x10224
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x2e88
leaq 0xd3a3(%rip), %rdi      # 0x10224
movb $0x0, %al
callq 0x4490
jmp 0x2e8a
jmp 0x2ffe
movq -0x28(%rbp), %rdi
leaq 0xd393(%rip), %rsi      # 0x1022d
callq 0x22d0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x2eed
jmp 0x2eab
callq 0x20a0
cmpl $0x0, (%rax)
je 0x2ed4
movq -0x28(%rbp), %rsi
leaq 0xd370(%rip), %rdi      # 0x10230
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x2ee6
movq -0x28(%rbp), %rsi
leaq 0xd351(%rip), %rdi      # 0x10230
movb $0x0, %al
callq 0x4490
jmp 0x2ee8
jmp 0x2ff5
movq -0x20(%rbp), %rdi
addq $0x1, %rdi
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %esi
movq -0x30(%rbp), %rcx
movl $0x1, %edx
callq 0x2340
cmpq $0x1, %rax
je 0x2f53
jmp 0x2f14
callq 0x20a0
cmpl $0x0, (%rax)
je 0x2f3d
movq -0x28(%rbp), %rsi
leaq 0xd311(%rip), %rdi      # 0x1023a
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x2f4f
movq -0x28(%rbp), %rsi
leaq 0xd2f2(%rip), %rdi      # 0x1023a
movb $0x0, %al
callq 0x4490
jmp 0x2f51
jmp 0x2fac
movq -0x30(%rbp), %rdi
callq 0x2120
cmpl $0x0, %eax
je 0x2f9a
jmp 0x2f63
callq 0x20a0
cmpl $0x0, (%rax)
je 0x2f88
leaq 0xd2d1(%rip), %rdi      # 0x10245
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x2f96
leaq 0xd2b6(%rip), %rdi      # 0x10245
movb $0x0, %al
callq 0x4490
jmp 0x2f98
jmp 0x2f9a
movq -0x28(%rbp), %rdi
callq 0x2040
movl $0x0, -0x4(%rbp)
jmp 0x3005
movq -0x30(%rbp), %rdi
callq 0x2120
cmpl $0x0, %eax
je 0x2ff3
jmp 0x2fbc
callq 0x20a0
cmpl $0x0, (%rax)
je 0x2fe1
leaq 0xd278(%rip), %rdi      # 0x10245
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x2fef
leaq 0xd25d(%rip), %rdi      # 0x10245
movb $0x0, %al
callq 0x4490
jmp 0x2ff1
jmp 0x2ff3
jmp 0x2ff5
movq -0x28(%rbp), %rdi
callq 0x2040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x18, %edi
callq 0x2240
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x4959
jmp 0x4ad0
movq -0x10(%rbp), %rdi
callq 0x7160
movq -0x20(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x49b4
jmp 0x4972
callq 0x20a0
cmpl $0x0, (%rax)
je 0x499b
movq -0x10(%rbp), %rsi
leaq 0xbc63(%rip), %rdi      # 0x105ea
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x49ad
movq -0x10(%rbp), %rsi
leaq 0xbc44(%rip), %rdi      # 0x105ea
movb $0x0, %al
callq 0x4490
jmp 0x49af
jmp 0x4ac7
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
cmpq $0x0, (%rax)
jne 0x49e6
jmp 0x49c4
movq -0x10(%rbp), %rsi
leaq 0xbc3e(%rip), %rdi      # 0x1060d
movb $0x0, %al
callq 0x4490
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4aba
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x8030
movq -0x20(%rbp), %rcx
movl %eax, 0x8(%rcx)
cmpl $-0x1, %eax
jne 0x4a04
jmp 0x4aba
movq -0x20(%rbp), %rax
movl 0x8(%rax), %edi
callq 0xab60
movq -0x20(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x4a56
jmp 0x4a1f
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4a44
leaq 0xbbf7(%rip), %rdi      # 0x10627
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4a52
leaq 0xbbdc(%rip), %rdi      # 0x10627
movb $0x0, %al
callq 0x4490
jmp 0x4a54
jmp 0x4a6e
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4ad8
movq -0x20(%rbp), %rax
movl 0x8(%rax), %edi
callq 0x21c0
cmpl $0x0, %eax
je 0x4ab8
jmp 0x4a81
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4aa6
leaq 0xb7b4(%rip), %rdi      # 0x10246
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4ab4
leaq 0xb799(%rip), %rdi      # 0x10246
movb $0x0, %al
callq 0x4490
jmp 0x4ab6
jmp 0x4ab8
jmp 0x4aba
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x7d90
movq -0x20(%rbp), %rdi
callq 0x2040
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xb130
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xb170
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edi
callq 0x21c0
cmpl $0x0, %eax
je 0x4b66
jmp 0x4b2f
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4b54
leaq 0xb706(%rip), %rdi      # 0x10246
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4b62
leaq 0xb6eb(%rip), %rdi      # 0x10246
movb $0x0, %al
callq 0x4490
jmp 0x4b64
jmp 0x4b66
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x7d90
movq -0x10(%rbp), %rdi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x28(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4c50
cmpl $0x0, %eax
je 0x4be9
jmp 0x4c3c
leaq -0x50(%rbp), %rdi
addq $0x28, %rdi
callq 0x5580
cmpl $0x0, %eax
je 0x4c34
jmp 0x4bfd
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4c22
leaq 0xba35(%rip), %rdi      # 0x10643
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4c30
leaq 0xba1a(%rip), %rdi      # 0x10643
movb $0x0, %al
callq 0x4490
jmp 0x4c32
jmp 0x4c3c
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4c43
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x4c6b
jmp 0x4d65
movq -0x10(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0x4c7a
jmp 0x4d65
jmp 0x4c7c
movq -0x10(%rbp), %rax
cmpq $0x1000, 0x18(%rax)     # imm = 0x1000
jae 0x4d63
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdi
leaq -0x18(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq *%rax
cmpl $0x0, %eax
je 0x4cbd
movq -0x10(%rbp), %rax
movl $0x1, 0x24(%rax)
jmp 0x4d65
cmpq $0x0, -0x18(%rbp)
jne 0x4cd4
movq -0x10(%rbp), %rax
movl $0x1, 0x20(%rax)
jmp 0x4d65
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %r8
leaq 0x562(%rip), %rcx       # 0x5250
callq 0x8f00
cmpl $0x0, %eax
je 0x4d3c
jmp 0x4cfa
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4d1f
leaq 0xb96c(%rip), %rdi      # 0x10677
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4d2d
leaq 0xb951(%rip), %rdi      # 0x10677
movb $0x0, %al
callq 0x4490
jmp 0x4d2f
movq -0x10(%rbp), %rax
movl $0x1, 0x24(%rax)
jmp 0x4d6e
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rdi
callq 0x2040
movq -0x20(%rbp), %rdi
callq 0x2040
jmp 0x4c7c
jmp 0x4d65
movl $0x0, -0x4(%rbp)
jmp 0x4d75
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq 0xc3(%rip), %rcx        # 0x4e90
leaq 0xfc(%rip), %r8         # 0x4ed0
leaq -0x48(%rbp), %r9
callq 0xa400
cmpl $0x0, %eax
je 0x4e1b
jmp 0x4de4
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4e09
leaq 0xb867(%rip), %rdi      # 0x1065c
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4e17
leaq 0xb84c(%rip), %rdi      # 0x1065c
movb $0x0, %al
callq 0x4490
jmp 0x4e19
jmp 0x4e72
leaq -0x48(%rbp), %rdi
addq $0x10, %rdi
addq $0x4, %rdi
callq 0x5580
cmpl $0x0, %eax
je 0x4e6a
jmp 0x4e33
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4e58
leaq 0xb7ff(%rip), %rdi      # 0x10643
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4e66
leaq 0xb7e4(%rip), %rdi      # 0x10643
movb $0x0, %al
callq 0x4490
jmp 0x4e68
jmp 0x4e72
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4e79
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)