LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/inflex[P]ripMIME/ripOLE/olestream-unwrap.c
// Function: OLEUNWRAP_seach_for_file_sig
int OLEUNWRAP_seach_for_file_sig( struct OLEUNWRAP_object *oleuw, char *block, size_t block_len )
{
	int result = -1;
	int hit = 0;
	char *p;		/** signature pointer **/
	char *bp; /** pointer in the block **/
	struct typesig sigs[]= {
		{ "\x89\x50\x4e\x47", 4, 0 }, /** PNG **/
		{ "\xff\xd8\xff", 3, 0 }, /** JPEG **/
		{ NULL, -1, -1 } /** End of array **/
	};

	bp = block;
	block_len -= 4;

	/** While there's more data in the block and we're not found a match **/
	while ((block_len > 0)&&(hit==0)) {
		struct typesig *tsp; /** Type signature pointer **/

		block_len--;

		tsp = sigs; /** tsp points to the first signature in the array **/

		/** While there's more valid signatures in the array **/
		while (tsp->length > 0) {
			int cmpresult = 0;

			p = tsp->sequence; /** set p to point to the start of the image signature sequence **/
			cmpresult = memcmp(bp, p, 3);
			if (cmpresult == 0) {
				DUW LOGGER_log("%s:%d:OLEUNWRAP_seach_for_file_sig:DEBUG: Hit at offset %d for signature %d",FL,(bp-block),(tsp -sigs));
				hit = 1;
				break;
			} /** If we had a match in the signatures **/

			tsp++; /** go to the next signature **/

		} /** While more signatures **/

		if (hit == 0) bp++; /** If we didn't get a hit, move to the next byte in the file **/

	} /** while more data in the block **/

	if (hit == 1) {
		result =  bp -block;
	} else { 
		result = -1;
	}

	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, 0x18(%rsp)
movaps 0xf36e(%rip), %xmm0     # 0x1fdd0
movaps %xmm0, 0x40(%rsp)
movaps 0xf352(%rip), %xmm0     # 0x1fdc0
movaps %xmm0, 0x30(%rsp)
movaps 0xf336(%rip), %xmm0     # 0x1fdb0
movaps %xmm0, 0x20(%rsp)
addq $-0x4, %rdx
je 0x10b46
movq %rsi, %rbp
movq %rsi, 0x8(%rsp)
decq %rdx
movq %rdx, 0x10(%rsp)
movq %rbp, %rbx
subq %rsi, %rbx
xorl %r13d, %r13d
leaq 0x20(%rsp), %r12
cmpl $0x0, 0x8(%r12)
jle 0x10b1a
movq (%r12), %rax
movzwl (%rbp), %ecx
xorw (%rax), %cx
movb 0x2(%rbp), %dl
xorb 0x2(%rax), %dl
movzbl %dl, %eax
xorl %r14d, %r14d
orw %cx, %ax
setne %r15b
je 0x10ad5
addq $0x10, %r12
jmp 0x10b12
movl $0x1, %r13d
movq 0x18(%rsp), %rax
cmpl $0x0, 0x8(%rax)
je 0x10b12
movq %r12, %r8
leaq 0x20(%rsp), %rax
subq %rax, %r8
sarq $0x4, %r8
leaq 0x9b17(%rip), %rdi      # 0x1a613
leaq 0x99d7(%rip), %rsi      # 0x1a4da
movl $0x10f, %edx            # imm = 0x10F
movq %rbx, %rcx
xorl %eax, %eax
callq 0xc960
movb %r15b, %r14b
testl %r14d, %r14d
jne 0x10aa7
xorl %eax, %eax
testl %r13d, %r13d
sete %al
addq %rax, %rbp
testl %r13d, %r13d
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
jne 0x10b3d
testq %rdx, %rdx
jne 0x10a91
cmpl $0x1, %r13d
sete %al
jmp 0x10b4b
xorl %eax, %eax
movq %rsi, %rbp
subl %esi, %ebp
testb %al, %al
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovnel %ebp, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inflex[P]ripMIME/ripOLE/olestream-unwrap.c
// Function: OLEUNWRAP_decodestream
int OLEUNWRAP_decodestream( struct OLEUNWRAP_object *oleuw, char *element_string, char *stream, size_t stream_size, char *decode_path )
{
	int result = OLEUW_OK;

	if (strstr(element_string, OLEUW_ELEMENT_10NATIVE_STRING) != NULL) 
	{
		
		DUW LOGGER_log("%s:%d:OLEUNWRAP_decodestream:DEBUG: Debugging element '%s'",FL, element_string);
		OLEUNWRAP_decode_attachment( oleuw, stream, stream_size, decode_path );

	} else if (strstr(element_string, OLEUW_ELEMENT_DATA) != NULL)  {

		DUW LOGGER_log("%s:%d:OLEUNWRAP_decodestream:DEBUG: Debugging element '%s'",FL, element_string);
		OLEUNWRAP_decode_attachment( oleuw, stream, stream_size, decode_path );

	} else {
		DUW LOGGER_log("%s:%d:OLEUNWRAP_decode_attachment:DEBUG: Unable to decode stream with element string '%s'\n", FL, element_string);
		result = OLEUW_STREAM_NOT_DECODED;
	}

	return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0x9b98(%rip), %rsi      # 0x1abce
movq %r12, %rdi
callq 0x23d0
testq %rax, %rax
je 0x1105f
cmpl $0x0, 0x8(%r13)
je 0x11098
leaq 0x9b89(%rip), %rdi      # 0x1abda
leaq 0x9482(%rip), %rsi      # 0x1a4da
movl $0x1dc, %edx            # imm = 0x1DC
jmp 0x1108e
leaq 0x9baf(%rip), %rsi      # 0x1ac15
movq %r12, %rdi
callq 0x23d0
movl 0x8(%r13), %ecx
testq %rax, %rax
je 0x110b7
testl %ecx, %ecx
je 0x11098
leaq 0x9b58(%rip), %rdi      # 0x1abda
leaq 0x9451(%rip), %rsi      # 0x1a4da
movl $0x1e1, %edx            # imm = 0x1E1
movq %r12, %rcx
xorl %eax, %eax
callq 0xc960
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x10b66
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x64, %ebx
testl %ecx, %ecx
je 0x110ab
leaq 0x9b53(%rip), %rdi      # 0x1ac1a
leaq 0x940c(%rip), %rsi      # 0x1a4da
movl $0x1e5, %edx            # imm = 0x1E5
movq %r12, %rcx
xorl %eax, %eax
callq 0xc960
jmp 0x110ab
// File: /workspace/github_c_makefile_star2_O1/inflex[P]ripMIME/ripOLE/bt-int.c
// Function: BTI_add
int BTI_add( struct bti_node **n, int value )
{
	int collision = 0;
	int dir = 0;
	struct bti_node *p = NULL, *node = *n;

//	fprintf(stdout,"Adding %d to %p\n", value, *n);
	while (node != NULL)
	{
		if (value > node->data) { p = node; dir=1;  node = node->r; }
		else if (value < node->data) { p = node; dir=-1; node = node->l; }
		else if (value == node->data) 
		{
			collision = 1;
			break;
		}
	}

	if (collision == 0)
	{
		struct bti_node *leaf;

		leaf = malloc(sizeof(struct bti_node));
		if (leaf == NULL)
		{
			return -1;
		}

		leaf->data = value;
		leaf->l = leaf->r = NULL;

		if (p != NULL)
		{
			switch (dir) {
				case 1: 
					p->r = leaf;
					break;
				case -1: 
					p->l = leaf;
					break;
			}
		} else {
			*n = leaf;
		}


	}

	return collision;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
sete %cl
je 0x1115d
xorl %r12d, %r12d
xorl %r15d, %r15d
movl (%rax), %edx
cmpl %ebp, %edx
jge 0x1113b
movl $0x1, %r15d
movl $0x10, %ecx
jmp 0x11148
jle 0x11151
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl $0x8, %ecx
movq %rax, %r12
movq (%rax,%rcx), %rax
jmp 0x11153
je 0x111a2
testq %rax, %rax
sete %cl
jne 0x11128
jmp 0x11163
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %r14d, %r14d
testb $0x1, %cl
je 0x111b4
movl $0x18, %edi
callq 0x22b0
testq %rax, %rax
je 0x1119a
movl %ebp, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
testq %r12, %r12
je 0x111b1
cmpl $-0x1, %r15d
je 0x111aa
cmpl $0x1, %r15d
jne 0x111b4
addq $0x10, %r12
jmp 0x111ae
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x111b4
movl $0x1, %r14d
jmp 0x11166
addq $0x8, %r12
movq %r12, %rbx
movq %rax, (%rbx)
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inflex[P]ripMIME/ripOLE/bt-int.c
// Function: BTI_dump
int BTI_dump( struct bti_node **n )
{
		struct bti_node *node;

	node = *n;
	
	if (node->l) BTI_dump(&(node->l)); 
	if (*n) { fprintf(stdout,"%d, ", node->data); }
	if (node->r) BTI_dump(&(node->r));

	return 0;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
xorl %ebp, %ebp
leaq 0x9a9e(%rip), %rbx      # 0x1ac75
xorl %r13d, %r13d
movq (%r12), %r14
cmpq $0x0, 0x8(%r14)
je 0x111ee
leaq 0x8(%r14), %rdi
callq 0x111c0
cmpq $0x0, (%r12)
je 0x1120c
movq 0xedd4(%rip), %rax      # 0x1ffd0
movq (%rax), %rdi
movl (%r14), %edx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2220
cmpq $0x0, 0x10(%r14)
je 0x11227
addq $0x10, %r14
testb $0x1, %r13b
cmovel %ebp, %r15d
movb $0x1, %r13b
movq %r14, %r12
jmp 0x111da
xorl %eax, %eax
testb $0x1, %r13b
cmovnel %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/inflex[P]ripMIME/ripOLE/bt-int.c
// Function: BTI_done
int BTI_done( struct bti_node **n )
{
	struct bti_node *node;

	if (n == NULL) return 0;
	if (*n == NULL) return 0;

	node = *n;
	
	if (node->l) BTI_done(&(node->l)); 
	if (node->r) BTI_done(&(node->r));
	if (*n) { free(*n); *n = NULL; }

	return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x11292
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x1128b
cmpq $0x0, 0x8(%r14)
je 0x11264
leaq 0x8(%r14), %rdi
callq 0x11240
cmpq $0x0, 0x10(%r14)
je 0x11277
addq $0x10, %r14
movq %r14, %rdi
callq 0x11240
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1128b
callq 0x2030
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/writeseek3.c
// Function: testcase_prepare
void testcase_prepare(unsigned long nr_tasks)
{
	char buf[BUFLEN];
	int fd = mkstemp(tmpfile);
	unsigned long left = getpagesize() * nr_tasks;

	memset(buf, 0, sizeof(buf));
	assert(fd >= 0);

	while (left > 0) {
		int n = write(fd, buf, sizeof(buf));
		assert(n > 0);
		left -= n;
	}
	close(fd);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %r14
leaq 0x257e(%rip), %rdi      # 0x5190
callq 0x21e0
movl %eax, %ebx
movq %rsp, %rdi
movl $0x1000, %edx           # imm = 0x1000
xorl %esi, %esi
callq 0x2140
testl %ebx, %ebx
js 0x2c8f
callq 0x2290
movslq %eax, %r15
imulq %r14, %r15
testq %r15, %r15
je 0x2c5d
movq %rsp, %r14
movl $0x1000, %edx           # imm = 0x1000
movl %ebx, %edi
movq %r14, %rsi
callq 0x20d0
testl %eax, %eax
jle 0x2c70
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
subq %rax, %r15
jne 0x2c40
movl %ebx, %edi
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %r15
jmp 0x2150
leaq 0x65b(%rip), %rdi       # 0x32d2
leaq 0x61c(%rip), %rsi       # 0x329a
leaq 0x628(%rip), %rcx       # 0x32ad
movl $0x18, %edx
callq 0x2130
leaq 0x5fc(%rip), %rdi       # 0x3292
leaq 0x5fd(%rip), %rsi       # 0x329a
leaq 0x609(%rip), %rcx       # 0x32ad
movl $0x14, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/writeseek3.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	char buf[BUFLEN];
	int fd = open(tmpfile, O_RDWR);
	unsigned long offset = getpagesize() * nr;

	assert(fd >= 0);

	while (1) {
		lseek(fd, offset, SEEK_SET);
		assert(write(fd, buf, BUFLEN) == BUFLEN);

		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x24c8(%rip), %rdi      # 0x5190
movl $0x2, %esi
xorl %eax, %eax
callq 0x2220
movl %eax, %ebp
callq 0x2290
testl %ebp, %ebp
js 0x2d51
movslq %eax, %r14
imulq %r15, %r14
movl %ebp, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2120
movq %rsp, %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
callq 0x20d0
cmpq $0x1000, %rax           # imm = 0x1000
jne 0x2d32
movq %rsp, %r15
incq (%rbx)
movl %ebp, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2120
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
movq %r15, %rsi
callq 0x20d0
cmpq $0x1000, %rax           # imm = 0x1000
je 0x2d0c
leaq 0x5d2(%rip), %rdi       # 0x330b
leaq 0x55a(%rip), %rsi       # 0x329a
leaq 0x591(%rip), %rcx       # 0x32d8
movl $0x28, %edx
callq 0x2130
leaq 0x53a(%rip), %rdi       # 0x3292
leaq 0x53b(%rip), %rsi       # 0x329a
leaq 0x572(%rip), %rcx       # 0x32d8
movl $0x24, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O1/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/input_parse.c
// Function: read_doc
int read_doc(char *name,char ***map,int *lines){
	char c,pr_c;
	FILE* fp;
	*lines = 0;
	int counter = 0;//byte counter here
	if((fp=fopen(name,"r"))==NULL){
		printf("Given file doesn't exists!\n");
		return -1;
	}
	if(fp == NULL ){fclose(fp); return -1;}//error
	while((c=getc(fp)) != EOF){//1st parsing to find the lines
		if(c == '\n' && pr_c != '\n') (*lines)++;
		pr_c = c;
	}
	if(!(*lines)){printf("Empty input file!\n");fclose(fp);return -2;}
	//printf("Read %d folders!\n",*lines);
	*map = malloc((*lines)*sizeof(char*));
	if(fseek(fp,0L,SEEK_SET) !=0) {fclose(fp); return -2;}
	for(int i=0;i<(*lines);i++){
		fscanf(fp,"%m[^\n]s",&(*map)[i]);//read and save line
		getc(fp);//skip the remaining '\n'
		counter += strlen((*map)[i]) + 1;//the '+1' for '\n'
	}
	fclose(fp);
	return counter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r13
movl $0x0, (%rdx)
leaq 0x4d3a(%rip), %rsi      # 0x71f7
callq 0x2280
testq %rax, %rax
je 0x25ac
movq %rax, %rbx
movq %rax, %rdi
callq 0x2320
movl %eax, %ecx
shll $0x18, %ecx
cmpl $0xff000000, %ecx       # imm = 0xFF000000
je 0x2515
xorl %r15d, %r15d
cmpl $0xa000000, %ecx        # imm = 0xA000000
setne %cl
cmpb $0xa, %r15b
movl %eax, %r15d
sete %al
orb %cl, %al
jne 0x2500
incl (%r14)
movq %rbx, %rdi
callq 0x2320
movl %eax, %ecx
shll $0x18, %ecx
cmpl $0xff000000, %ecx       # imm = 0xFF000000
jne 0x24e6
movslq (%r14), %rdi
testq %rdi, %rdi
je 0x25c0
shlq $0x3, %rdi
callq 0x2210
movq %rax, (%r13)
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2220
testl %eax, %eax
jne 0x25cc
cmpl $0x0, (%r14)
movq %rbx, %rdi
jle 0x25a5
movq %r13, %rbx
xorl %r13d, %r13d
xorl %r15d, %r15d
xorl %r12d, %r12d
movq %r14, -0x30(%rbp)
movq (%rbx), %rdx
addq %r13, %rdx
movq %rdi, %r14
leaq 0x4a96(%rip), %rsi      # 0x7004
xorl %eax, %eax
callq 0x2090
movq %r14, %rdi
callq 0x2320
movq (%rbx), %rax
movq (%rax,%r13), %rdi
callq 0x2120
movq %r14, %rdi
movq -0x30(%rbp), %r14
addl %eax, %r12d
incl %r12d
incq %r15
movslq (%r14), %rax
addq $0x8, %r13
cmpq %rax, %r15
jl 0x255e
callq 0x2100
jmp 0x25da
leaq 0x4a7c(%rip), %rdi      # 0x702f
callq 0x20a0
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x25da
leaq 0x4a56(%rip), %rdi      # 0x701d
callq 0x20a0
movq %rbx, %rdi
callq 0x2100
movl $0xfffffffe, %r12d      # imm = 0xFFFFFFFE
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/postingList.c
// Function: ePostingListConstuct
ePostingList* ePostingListConstuct(){
	ePostingList* epl = malloc(sizeof(ePostingList));
	epl->counter=0;
	epl->pl = NULL;
	epl->last=NULL;
	return epl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x18, %edi
callq 0x2210
movl $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/postingList.c
// Function: ePostingListDestruct
void ePostingListDestruct(ePostingList* self){
	if(self==NULL) return;
	postingList1Destruct(self->pl);
	self->last = NULL;
	free(self);
	return;
}

// Assembly:
testq %rdi, %rdi
je 0x28a2
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x28a3
movq $0x0, 0x10(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2030
retq
// File: /workspace/github_c_makefile_star2_O1/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/postingList.c
// Function: postingList1Destruct
void postingList1Destruct(postingList1* self){//recursive destruction
	if(self==NULL) return;
	postingList2Destruct(self->pl);
	postingList1Destruct(self->next);
	self->name = NULL;
	self->last = NULL;
	free(self);
	return;
}

// Assembly:
testq %rdi, %rdi
je 0x28db
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x28dc
movq 0x18(%rbx), %rdi
callq 0x28a3
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq %rax, 0x28(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2030
retq
// File: /workspace/github_c_makefile_star2_O1/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/postingList.c
// Function: insertInPL2
postingList2* insertInPL2(int line){
	postingList2* pl = malloc(sizeof(postingList2));
	pl->line = line;
	pl->next = NULL;
	return pl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x10, %edi
callq 0x2210
movl %ebx, (%rax)
movq $0x0, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/postingList.c
// Function: insertInPL
postingList1* insertInPL(int line,char* name,int id){//creates new pl's node
	postingList1* pl = malloc(sizeof(postingList1));
	pl->name = name;//just point to real name
	pl->id = id;
	pl->counter=1;
	pl->linecounter=1;
	pl->next=NULL;
	pl->pl = insertInPL2(line);
	pl->last = pl->pl;
	return pl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %r15d
movl $0x30, %edi
callq 0x2210
movq %rax, %r12
movq %r14, 0x8(%rax)
movl %ebx, 0x10(%rax)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, (%r12)
xorl %ebx, %ebx
movq %rbx, 0x18(%r12)
movl $0x10, %edi
callq 0x2210
movl %r15d, (%rax)
movq %rbx, 0x8(%rax)
movq %rax, 0x20(%r12)
movq %rax, 0x28(%r12)
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/postingList.c
// Function: getMaxCounter
void getMaxCounter(ePostingList *self,char **name,int *counter){
	postingList1 *temp = self->pl;
	*name = temp->name;
	*counter = temp->counter;
	while((temp = temp->next) != NULL){
		if(temp->counter>*counter || (temp->counter==*counter && strcmp(temp->name,*name)<0)){
			*name = temp->name;
			*counter = temp->counter;
		}
	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rcx
movq %rcx, (%rsi)
movl (%rax), %ecx
movl %ecx, (%rdx)
movq 0x18(%rax), %r15
testq %r15, %r15
je 0x29e9
movq %rdx, %rbx
movq %rsi, %r14
movl (%rdx), %r12d
movl (%r15), %r13d
cmpl %r12d, %r13d
jle 0x29ce
movq 0x8(%r15), %rax
movq %rax, (%r14)
movl %r13d, (%rbx)
movl %r13d, %r12d
jmp 0x29e0
jne 0x29e0
movq 0x8(%r15), %rdi
movq (%r14), %rsi
callq 0x2190
testl %eax, %eax
js 0x29bf
movq 0x18(%r15), %r15
testq %r15, %r15
jne 0x29b7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/postingList.c
// Function: updatePL
void updatePL(ePostingList **self,int line,char *name,int id){
	if((*self)->pl==NULL){
		(*self)->pl=insertInPL(line,name,id);
		(*self)->last = (*self)->pl;
		(*self)->counter++;//new PL node
		return;
	}
	postingList1 *temp = (*self)->last;
	if(!strcmp(temp->name,name) && (temp->last)->line>line){//that will never happen :-)
		printf("You shouldn't come here,leave me alone ~_~'\n");
		return ;
	}
	//checking name or id is the same in PL
	if(!strcmp(temp->name,name)){//now lets check pl2
		temp->counter++;//increase counter for the file
		if((temp->last)->line == line){}//do nothing
			//(temp->last)->freq++;//freq deleted
		else{//new line,create next pl2
			temp->linecounter++;
			(temp->last)->next = insertInPL2(line);
			((*self)->last)->last = (temp->last)->next;
		}
		return;
	}
	temp->next = insertInPL(line,name,id);
	(*self)->last = temp->next;
	(*self)->counter++;//new PL node
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %rbx
movq (%rdi), %r14
cmpq $0x0, 0x8(%r14)
je 0x2b02
movq 0x10(%r14), %r14
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0x2190
testl %eax, %eax
je 0x2b6e
movl $0x30, %edi
callq 0x2210
movl %r13d, -0x2c(%rbp)
movq %rax, %r13
movq %r12, 0x8(%rax)
movl %r15d, 0x10(%rax)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, (%r13)
xorl %r15d, %r15d
movq %r15, 0x18(%r13)
movl $0x10, %edi
callq 0x2210
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
movq %r15, 0x8(%rax)
movq %rax, 0x20(%r13)
movq %rax, 0x28(%r13)
movq %r13, 0x18(%r14)
movq (%rbx), %rax
movq %r13, 0x10(%rax)
jmp 0x2b5a
movl $0x30, %edi
callq 0x2210
movl %r13d, -0x2c(%rbp)
movq %rax, %r13
movq %r12, 0x8(%rax)
movl %r15d, 0x10(%rax)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, (%r13)
xorl %r15d, %r15d
movq %r15, 0x18(%r13)
movl $0x10, %edi
callq 0x2210
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
movq %r15, 0x8(%rax)
movq %rax, 0x20(%r13)
movq %rax, 0x28(%r13)
movq %r13, 0x8(%r14)
movq (%rbx), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x10(%rax)
movq (%rbx), %rax
incl (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x28(%r14), %rcx
cmpl %r13d, (%rcx)
jle 0x2b91
leaq 0x458d(%rip), %rdi      # 0x710b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20a0
testl %eax, %eax
jne 0x2aac
incl (%r14)
movq 0x28(%r14), %r15
cmpl %r13d, (%r15)
je 0x2b5f
incl 0x4(%r14)
movl $0x10, %edi
callq 0x2210
movl %r13d, (%rax)
movq $0x0, 0x8(%rax)
movq %rax, 0x8(%r15)
movq (%rbx), %rcx
movq 0x10(%rcx), %rcx
movq %rax, 0x28(%rcx)
jmp 0x2b5f
// File: /workspace/github_c_makefile_star2_O1/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/postingList.c
// Function: replaceSpaces
void replaceSpaces(char** str){
	if(str == NULL) return;
	int len;
	if((len = strlen(*str)) == 0) return;
	for(int i=0;i<len;i++)
		if((*str)[i] == ' ') (*str)[i]='_';
	return;
}

// Assembly:
testq %rdi, %rdi
je 0x2c0b
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2120
testl %eax, %eax
jle 0x2c05
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
movq (%rbx), %rdx
cmpb $0x20, (%rdx,%rcx)
jne 0x2bfd
movb $0x5f, (%rdx,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x2bf0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r12
testq %r12, %r12
je 0x2cd4
movq 0x8(%r12), %rax
leaq -0x30(%rbp), %rbx
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x2bcf
movq (%rbx), %r15
movq %r15, %rdi
callq 0x2120
movq %rax, %rbx
addl $0x4, %ebx
movslq %ebx, %rdi
callq 0x2210
movq %rax, %r14
movl $0x203a20, (%rax)       # imm = 0x203A20
movq %rax, %rdi
movq %r15, %rsi
callq 0x22b0
movq 0x18(%r12), %r13
testq %r13, %r13
je 0x2cc9
leaq -0x30(%rbp), %r15
movq 0x8(%r13), %rax
movq %rax, -0x30(%rbp)
movq %r15, %rdi
callq 0x2bcf
movq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x2120
addl %eax, %ebx
addl $0x3, %ebx
movslq %ebx, %rsi
movq %r14, %rdi
callq 0x2230
movq %rax, %r14
movq %rax, %rdi
callq 0x2120
movl $0x203a20, (%r14,%rax)  # imm = 0x203A20
movq %r14, %rdi
movq %r12, %rsi
callq 0x22b0
movq 0x18(%r13), %r13
testq %r13, %r13
jne 0x2c76
movslq %ebx, %rax
movb $0x0, -0x1(%rax,%r14)
jmp 0x2cd7
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x2dd4
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %r12d
xorl %r13d, %r13d
testl %r12d, %r12d
jle 0x2d2a
movl %r12d, %ecx
addl 0x4(%rax), %r13d
movq 0x18(%rax), %rax
decl %ecx
jne 0x2d1e
testl %r13d, %r13d
je 0x2dc6
movslq %r13d, %rdi
shlq $0x3, %rdi
callq 0x2210
movq %rax, (%rbx)
movl %r13d, (%r15)
testl %r12d, %r12d
jle 0x2dc6
addq $0x8, %r14
xorl %ecx, %ecx
xorl %edx, %edx
movl %r12d, -0x2c(%rbp)
movq (%r14), %r14
movl 0x4(%r14), %eax
testl %eax, %eax
jle 0x2db9
movq %rcx, -0x38(%rbp)
leaq 0x20(%r14), %r12
movl %edx, -0x30(%rbp)
movslq %edx, %r13
xorl %r15d, %r15d
movq (%r12), %r12
movl $0x8, %edi
callq 0x2210
movq (%rbx), %rcx
movq %rax, (%rcx,%r13,8)
movl 0x10(%r14), %eax
movq (%rbx), %rcx
movq (%rcx,%r13,8), %rcx
movl %eax, (%rcx)
movl (%r12), %eax
movl %eax, 0x4(%rcx)
addq $0x8, %r12
incq %r15
movslq 0x4(%r14), %rax
incq %r13
cmpq %rax, %r15
jl 0x2d72
movl -0x2c(%rbp), %r12d
movq -0x38(%rbp), %rcx
movl -0x30(%rbp), %edx
addl %eax, %edx
addq $0x18, %r14
incl %ecx
cmpl %r12d, %ecx
jne 0x2d56
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x20, %edi
callq 0x2210
movb %bl, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq $0x0, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x2e39
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x2875
movq 0x8(%rbx), %rdi
callq 0x2e02
movq 0x10(%rbx), %rdi
callq 0x2e02
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2030
retq
// File: /workspace/github_c_makefile_star2_O1/stefpant[P]TCPserver/PantoulasStefanosProject2/trie/trieInsertion.c
// Function: nextWord
int nextWord(char* text,char** word,int start){
	if(text==NULL) return -2;//error
	if(start>strlen(text) || start<=-1) return -2;//error or END
	while(text[start]==' ' || text[start]=='\t') start++;//skip ws
	//now in text[start] starts the word which we return
	if(text[start]=='\0') return -2;//or maybe we reached '\0'
	int temp=start;//if not return the word
	while(text[temp]!=' ' && text[temp]!='\t' && text[temp]!='\0') temp++;
	if((*word = malloc((temp-start+1)*sizeof(char)))==NULL){
		printf("Allocation Error!\n");
		return -3;
	}
	strncpy(*word,text+start,temp-start);
	(*word)[temp-start] = '\0';
	while(text[temp]==' ' || text[temp]=='\t') temp++;//again skip ws
	if(text[temp]=='\0')//if after this word we reached the end
		return -1;
	return temp;//first char to check next time
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x3025
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %r14
callq 0x2120
testl %r12d, %r12d
js 0x3025
movslq %r12d, %rcx
cmpq %rcx, %rax
jb 0x3025
movl %r12d, %r13d
addq %r13, %r14
movzbl (%r14), %eax
cmpl $0x9, %eax
je 0x2f8f
cmpl $0x20, %eax
jne 0x2f97
incq %r13
incq %r14
jmp 0x2f81
testl %eax, %eax
je 0x3025
xorl %ebx, %ebx
movabsq $0x100000201, %rax      # imm = 0x100000201
movzbl (%r14,%rbx), %ecx
cmpq $0x20, %rcx
ja 0x2fbc
btq %rcx, %rax
jb 0x2fc1
incq %rbx
jmp 0x2fab
leal 0x1(%rbx), %eax
movslq %eax, %rdi
callq 0x2210
movq %rax, (%r15)
testq %rax, %rax
je 0x3014
movq %rax, %r12
leaq (%r14,%rbx), %r15
movslq %ebx, %rbx
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2070
movb $0x0, (%r12,%rbx)
addl %r13d, %ebx
movzbl (%r15), %eax
cmpl $0x9, %eax
je 0x3002
cmpl $0x20, %eax
jne 0x3009
incl %ebx
incq %r15
jmp 0x2ff4
testl %eax, %eax
jne 0x3025
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x3025
leaq 0x411c(%rip), %rdi      # 0x7137
callq 0x20a0
movl $0xfffffffd, %ebx       # imm = 0xFFFFFFFD
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq $0x0, -0x30(%rbp)
testl %esi, %esi
jle 0x32d9
movq %rdi, %r12
movq %rdx, -0x50(%rbp)
movl %ecx, -0x34(%rbp)
movq %r8, -0x58(%rbp)
movl %r9d, -0x38(%rbp)
movl %esi, %eax
movq %rax, -0x48(%rbp)
xorl %eax, %eax
leaq -0x30(%rbp), %r13
xorl %ebx, %ebx
movq %rax, %r14
movq (%r12,%rax,8), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2f3c
cmpl $-0x2, %eax
movq %r14, -0x40(%rbp)
je 0x32ca
movl %eax, %r15d
movq %r12, %r13
movq -0x30(%rbp), %r12
movq -0x58(%rbp), %rdi
movq %r12, %rsi
movq -0x40(%rbp), %r14
movl %r14d, %edx
movq -0x50(%rbp), %rcx
movl -0x34(%rbp), %r8d
movl -0x38(%rbp), %r9d
callq 0x3036
incl %ebx
movq %r12, %rdi
movq %r13, %r12
leaq -0x30(%rbp), %r13
callq 0x2030
movq (%r12,%r14,8), %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0x2f3c
movl %eax, %r15d
cmpl $-0x2, %eax
jne 0x327c
movq -0x40(%rbp), %rax
incq %rax
cmpq -0x48(%rbp), %rax
jne 0x325f
jmp 0x32db
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
sete %al
testl %esi, %esi
setle %cl
orb %al, %cl
jne 0x4567
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %eax
shlq $0x5, %rax
movq %rax, -0x30(%rbp)
movl $0x1, %r14d
xorl %r13d, %r13d
movl %r14d, %edi
callq 0x4675
movq %rax, %r15
movl %r14d, %edi
callq 0x4646
addl $0x31, %eax
movslq %eax, %rdi
callq 0x2210
movq (%rbx), %rcx
movq %rax, (%rcx,%r13)
movq (%rbx), %rax
movq (%rax,%r13), %rax
movups 0x2e89(%rip), %xmm0     # 0x7343
movups %xmm0, (%rax)
xorl %r12d, %r12d
movb %r12b, 0x30(%rax)
movups 0x2e98(%rip), %xmm0     # 0x7363
movups %xmm0, 0x20(%rax)
movups 0x2e7d(%rip), %xmm0     # 0x7353
movups %xmm0, 0x10(%rax)
movq (%rbx), %rax
movq (%rax,%r13), %rdi
movq %r15, %rsi
callq 0x22b0
movl %r14d, %edi
callq 0x4646
addl $0x31, %eax
movslq %eax, %rdi
callq 0x2210
movq (%rbx), %rcx
movq %rax, 0x10(%rcx,%r13)
movq (%rbx), %rax
movq 0x10(%rax,%r13), %rax
movups 0x2e61(%rip), %xmm0     # 0x7374
movups %xmm0, (%rax)
movb %r12b, 0x30(%rax)
movups 0x2e73(%rip), %xmm0     # 0x7394
movups %xmm0, 0x20(%rax)
movups 0x2e58(%rip), %xmm0     # 0x7384
movups %xmm0, 0x10(%rax)
movq (%rbx), %rax
movq 0x10(%rax,%r13), %rdi
movq %r15, %rsi
callq 0x22b0
movq %r15, %rdi
callq 0x2030
addq $0x20, %r13
incl %r14d
cmpq %r13, -0x30(%rbp)
jne 0x4487
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %rbx
movl %edi, %r15d
leaq -0x29(%rbp), %rsi
movl $0x1, %edx
callq 0x2180
testl %eax, %eax
js 0x4637
xorl %r13d, %r13d
leaq -0x29(%rbp), %r12
testl %eax, %eax
je 0x4602
movl %r14d, %eax
cmpq %rax, %r13
jne 0x45d7
addl %r14d, %r14d
movq (%rbx), %rdi
movslq %r14d, %rsi
callq 0x2230
movq %rax, (%rbx)
movb -0x29(%rbp), %al
leal 0x1(%rax), %ecx
cmpb $0x1, %cl
jbe 0x4627
movq (%rbx), %rcx
movb %al, (%rcx,%r13)
incq %r13
movl $0x1, %edx
movl %r15d, %edi
movq %r12, %rsi
callq 0x2180
testl %eax, %eax
jns 0x45ba
jmp 0x4637
movq (%rbx), %rax
movabsq $0x5f4f4649465f4e, %rcx # imm = 0x5F4F4649465F4E
movq %rcx, 0x6(%rax)
movabsq $0x5f4e454b4f52425f, %rcx # imm = 0x5F4E454B4F52425F
movq %rcx, (%rax)
movl $0xe, %eax
jmp 0x4637
movq (%rbx), %rax
movl %r13d, %ecx
movb $0x0, (%rax,%rcx)
incl %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, %ecx
negl %ecx
cmovsl %edi, %ecx
movl $0x1, %eax
cmpl $0xa, %ecx
jb 0x4673
movl $0xcccccccd, %edx       # imm = 0xCCCCCCCD
movl %ecx, %esi
imulq %rdx, %rsi
shrq $0x23, %rsi
incl %eax
cmpl $0x63, %ecx
movl %esi, %ecx
ja 0x4660
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r14
pushq %rbx
movl %edi, %ebx
movl %edi, %eax
negl %eax
cmovsl %edi, %eax
movl $0x1, %r14d
cmpl $0xa, %eax
jb 0x46af
movl $0x1, %r14d
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
movl %eax, %edx
imulq %rcx, %rdx
shrq $0x23, %rdx
incl %r14d
cmpl $0x63, %eax
movl %edx, %eax
ja 0x469b
leal 0x1(%r14), %eax
movslq %eax, %rdi
callq 0x2210
movslq %r14d, %rcx
movb $0x0, (%rax,%rcx)
testl %ebx, %ebx
je 0x4701
addq %rax, %rcx
decq %rcx
movslq %ebx, %rdx
imulq $0x66666667, %rdx, %rbx # imm = 0x66666667
movq %rbx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rbx
addl %esi, %ebx
leal (%rbx,%rbx), %esi
leal (%rsi,%rsi,4), %esi
movl %edx, %edi
subl %esi, %edi
addb $0x30, %dil
movb %dil, (%rcx)
addl $0x9, %edx
decq %rcx
cmpl $0x12, %edx
ja 0x46cc
jmp 0x4704
movb $0x30, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
testl %edx, %edx
jle 0x473d
movl %edx, %ecx
xorl %eax, %eax
cmpl %edi, (%rsi,%rax,4)
je 0x473f
incq %rax
cmpq %rax, %rcx
jne 0x4730
xorl %eax, %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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:
leal -0x2(%rdi), %eax
cmpl $0x2, %eax
jb 0x4bbf
cmpl $0xf, %edi
je 0x4bbf
cmpl $0x11, %edi
jne 0x4bc9
pushq %rbp
movq %rsp, %rbp
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
xorl %esi, %esi
movl $0x1, %edx
callq 0x2260
testl %eax, %eax
jle 0x4bca
movq 0x5626(%rip), %rcx      # 0xa1d0
movslq 0x561b(%rip), %rdx      # 0xa1cc
leal 0x1(%rdx), %esi
movl %esi, 0x5612(%rip)      # 0xa1cc
movl %eax, (%rcx,%rdx,4)
jmp 0x4b8e
movl $0x1, 0x55ff(%rip)      # 0xa1c8
retq
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x6107
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r13
movq %rdi, %rbx
xorl %eax, %eax
leaq -0x40(%rbp), %r15
movq %rax, (%r15)
movq %r15, %rsi
movq %rdx, -0x30(%rbp)
xorl %edx, %edx
movq %rcx, -0x38(%rbp)
callq 0x2f3c
movl %eax, %r14d
movq (%r15), %r12
movq %r12, %rdi
callq 0x22a0
addl %eax, (%r13)
movq %r12, %rdi
callq 0x2030
xorl %r13d, %r13d
movq %r13, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x2f3c
movl %eax, %r14d
movq (%r15), %r12
movq %r12, %rdi
callq 0x22a0
movq -0x30(%rbp), %rcx
addl %eax, (%rcx)
movq %r12, %rdi
callq 0x2030
movq %r13, (%r15)
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x2f3c
movl %eax, %r14d
movq (%r15), %r12
movq %r12, %rdi
callq 0x22a0
movq -0x38(%rbp), %rcx
addl %eax, (%rcx)
movq %r12, %rdi
callq 0x2030
movq %r13, (%r15)
cmpl $-0x1, %r14d
je 0x60f9
leaq 0x15c3(%rip), %rdi      # 0x76b2
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2130
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x15a1(%rip), %rsi      # 0x76ca
callq 0x2190
testl %eax, %eax
je 0x6242
movq %r14, -0x38(%rbp)
movq %rbx, -0x40(%rbp)
leaq -0x30(%rbp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2f3c
movl %eax, %r14d
movq (%rbx), %rbx
movq %rbx, %rdi
callq 0x2120
movq %rax, %r13
incl %r13d
movslq %r13d, %rdi
callq 0x2210
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2080
movq %rbx, %rdi
callq 0x2030
movq %r12, %rdi
leaq -0x30(%rbp), %rsi
movl %r14d, %edx
callq 0x2f3c
cmpl $-0x1, %eax
je 0x61ef
movl %eax, %ebx
movq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x2120
addl %eax, %r13d
addl $0x2, %r13d
movslq %r13d, %rsi
movq %r15, %rdi
callq 0x2230
movq %rax, %r15
movq %rax, %rdi
callq 0x2120
movw $0x20, (%r15,%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x22b0
movq %r14, %rdi
callq 0x2030
movq %r12, %rdi
leaq -0x30(%rbp), %rsi
movl %ebx, %edx
callq 0x2f3c
movl %eax, %ebx
cmpl $-0x1, %eax
jne 0x6197
movq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x22a0
movl %eax, %ebx
movq %r14, %rdi
callq 0x2030
movq -0x38(%rbp), %r12
cmpl (%r12), %ebx
movq -0x40(%rbp), %r14
jle 0x6229
movl %ebx, (%r12)
movq (%r14), %rdi
testq %rdi, %rdi
je 0x6224
callq 0x2030
movq %r15, (%r14)
jmp 0x6242
jne 0x623a
movq (%r14), %rsi
movq %r15, %rdi
callq 0x2190
testl %eax, %eax
js 0x6213
movq %r15, %rdi
callq 0x2030
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x1458(%rip), %rsi      # 0x76ca
callq 0x2190
testl %eax, %eax
je 0x639a
movq %r14, -0x38(%rbp)
movq %rbx, -0x40(%rbp)
leaq -0x30(%rbp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2f3c
movl %eax, %r14d
movq (%rbx), %rbx
movq %rbx, %rdi
callq 0x2120
movq %rax, %r13
incl %r13d
movslq %r13d, %rdi
callq 0x2210
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2080
movq %rbx, %rdi
callq 0x2030
movq %r12, %rdi
leaq -0x30(%rbp), %rsi
movl %r14d, %edx
callq 0x2f3c
cmpl $-0x1, %eax
je 0x6338
movl %eax, %ebx
movq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x2120
addl %eax, %r13d
addl $0x2, %r13d
movslq %r13d, %rsi
movq %r15, %rdi
callq 0x2230
movq %rax, %r15
movq %rax, %rdi
callq 0x2120
movw $0x20, (%r15,%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x22b0
movq %r14, %rdi
callq 0x2030
movq %r12, %rdi
leaq -0x30(%rbp), %rsi
movl %ebx, %edx
callq 0x2f3c
movl %eax, %ebx
cmpl $-0x1, %eax
jne 0x62e0
movq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x22a0
movl %eax, %ebx
movq %r14, %rdi
callq 0x2030
movq -0x38(%rbp), %r12
movl (%r12), %eax
cmpl %eax, %ebx
setl %cl
cmpl $-0x1, %eax
sete %dl
orb %cl, %dl
movq -0x40(%rbp), %r14
je 0x637f
movl %ebx, (%r12)
movq (%r14), %rdi
testq %rdi, %rdi
je 0x637a
callq 0x2030
movq %r15, (%r14)
jmp 0x639a
cmpl %eax, %ebx
jne 0x6392
movq (%r14), %rsi
movq %r15, %rdi
callq 0x2190
testl %eax, %eax
js 0x6369
movq %r15, %rdi
callq 0x2030
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stefpant[P]TCPserver/PantoulasStefanosProject2/jobExec/PCOptions.c
// Function: searchWordInTrie
nc_pair* searchWordInTrie(node* trie,char* word,int sorted,int max){//for min/maxcount
	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

	nc_pair* p = malloc(sizeof(nc_pair));
	p->name = NULL;//means word not exists
	p->counter = -1;

	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 p;//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 p;

		//now temp has the 'c' value so we check its child
		if((c=word[++i])=='\0'){
			if(max)
				getMaxCounterEPL(temp,&(p->name),&(p->counter));
			else
				getMinCounterEPL(temp,&(p->name),&(p->counter));
			return p;
		}
		if(getChild(temp)==NULL) return p;//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
subq $0x28, %rsp
movl %ecx, -0x34(%rbp)
movl %edx, %r13d
movq %rdi, %r12
movq %rsi, -0x48(%rbp)
movb (%rsi), %bl
movl $0x10, %edi
callq 0x2210
movq $0x0, (%rax)
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movq %rax, -0x30(%rbp)
addq $0x8, %rax
movq %rax, -0x40(%rbp)
movl $0x1, %r14d
xorl %r15d, %r15d
movq %r12, %rdi
callq 0x2e43
movb $0x1, %cl
cmpb %al, %bl
je 0x6442
movq %r12, %rdi
callq 0x2e43
testl %r13d, %r13d
je 0x6415
cmpb %al, %bl
jl 0x643c
movq %r12, %rdi
callq 0x2e55
testq %rax, %rax
je 0x649b
movq %r12, %rdi
callq 0x2e55
movq %rax, %r12
movq %rax, %rdi
callq 0x2e43
cmpb %al, %bl
jne 0x6404
xorl %r14d, %r14d
testl %r14d, %r14d
sete %cl
testb %cl, %cl
je 0x649b
movq -0x48(%rbp), %rax
movb 0x1(%rax,%r15), %bl
testb %bl, %bl
je 0x6473
movq %r12, %rdi
callq 0x2e69
testq %rax, %rax
je 0x649b
incq %r15
movq %r12, %rdi
callq 0x2e69
movq %rax, %r12
xorl %r14d, %r14d
jmp 0x63f6
cmpl $0x0, -0x34(%rbp)
je 0x648b
movq %r12, %rdi
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x2e73
jmp 0x649b
movq %r12, %rdi
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x2e8d
movq -0x30(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq