// File: /workspace/github_c_makefile_star2_O0/stefpant[P]TCPserver/PantoulasStefanosProject2/jobExec/child.c
// Function: mergeNodeInfo
void mergeNodeInfo(int ***A,int *Ac,int **B,int Bc){
	if((*A) == NULL){//copy B array to A
		(*A) = malloc(Bc*sizeof(int*));
		for(int i=0;i<Bc;i++){
			(*A)[i] = malloc(2*sizeof(int));
			(*A)[i][0] = B[i][0];
			(*A)[i][1] = B[i][1];
		}
		*Ac = Bc;
		return;
	}
	else if(Bc == 0) return;
	int p1=0,p2=0;
	int fcounter=0;
	int **final = malloc((*Ac + Bc)*sizeof(int*));//allocate for max elements
	while(1){
		if(flagUSR1 == 1) break;//reached deadline stop
		if(p1==*Ac){
			while(p2!=Bc){
				final[fcounter] = malloc(2*sizeof(int));
				final[fcounter][0] = B[p2][0];
				final[fcounter][1] = B[p2][1];
				p2++;fcounter++;
			}
			break;
		}
		if(p2==Bc){
			while(p1!=*Ac){
				final[fcounter] = malloc(2*sizeof(int));
				final[fcounter][0] = (*A)[p1][0];
				final[fcounter][1] = (*A)[p1][1];
				p1++;fcounter++;
			}
			break;
		}
		final[fcounter] = malloc(2*sizeof(int));
		if((*A)[p1][0]<B[p2][0]){//insert in final sorted
			final[fcounter][0] = (*A)[p1][0];
			final[fcounter++][1] = (*A)[p1++][1];
		}
		else if((*A)[p1][0]>B[p2][0]){
			final[fcounter][0] = B[p2][0];
			final[fcounter++][1] = B[p2++][1];
		}
		else{//now lets check second member of array
			if((*A)[p1][1]<B[p2][1]){
				final[fcounter][0] = (*A)[p1][0];
				final[fcounter++][1] = (*A)[p1++][1];
			}
			else if((*A)[p1][1]>B[p2][1]){
				final[fcounter][0] = B[p2][0];
				final[fcounter++][1] = B[p2++][1];
			}
			else{
				final[fcounter][0] = (*A)[p1][0];
				final[fcounter++][1] = (*A)[p1++][1];
				p2++;
			}
		}
	}
	if(flagUSR1 == 1){//reached deadline free(final) and return
		for(int i=0;i<fcounter;i++)
			free(final[i]);
		free(final);
		return;//and in childs main check flag and stop!
	}
	if(!fcounter) return;
	for(int h=0;h<*Ac;h++) free((*A)[h]);
	if(*Ac!=0) free(*A);
	*A = realloc(final,fcounter*sizeof(int*));//in the end resize the array
	*Ac = fcounter;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x3ed0
movslq -0x1c(%rbp), %rdi
shlq $0x3, %rdi
callq 0x11e0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x3ec2
movl $0x8, %edi
callq 0x11e0
movq %rax, %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x20(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x20(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %ecx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x20(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x4(%rax)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x3e53
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x4334
cmpl $0x0, -0x1c(%rbp)
jne 0x3edb
jmp 0x4334
jmp 0x3edd
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
addl -0x1c(%rbp), %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x11e0
movq %rax, -0x38(%rbp)
movl 0x728f(%rip), %eax      # 0xb1a0
cmpl $0x1, %eax
jne 0x3f1b
jmp 0x4281
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x3f9c
jmp 0x3f28
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
je 0x3f97
movl $0x8, %edi
callq 0x11e0
movq %rax, %rdx
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %ecx
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x4(%rax)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3f28
jmp 0x4281
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jne 0x4023
jmp 0x3fa6
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
je 0x401e
movl $0x8, %edi
callq 0x11e0
movq %rax, %rdx
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %ecx
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x4(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3fa6
jmp 0x4281
movl $0x8, %edi
callq 0x11e0
movq %rax, %rdx
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl (%rcx), %eax
jge 0x40b6
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %ecx
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x24(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x4(%rax)
jmp 0x427c
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl (%rcx), %eax
jle 0x412a
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %ecx
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x4(%rax)
jmp 0x427a
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %eax
movq -0x18(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl 0x4(%rcx), %eax
jge 0x41a6
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %ecx
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x24(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x4(%rax)
jmp 0x4278
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %eax
movq -0x18(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl 0x4(%rcx), %eax
jle 0x4219
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %ecx
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x4(%rax)
jmp 0x4276
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %ecx
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x24(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %edx, %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x4(%rax)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4278
jmp 0x427a
jmp 0x427c
jmp 0x3f0b
movl 0x6f19(%rip), %eax      # 0xb1a0
cmpl $0x1, %eax
jne 0x42c2
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x42b7
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1030
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x4293
movq -0x38(%rbp), %rdi
callq 0x1030
jmp 0x4334
cmpl $0x0, -0x2c(%rbp)
jne 0x42ca
jmp 0x4334
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x42fb
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1030
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x42d1
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x4310
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1030
movq -0x38(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
shlq $0x3, %rsi
callq 0x1200
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)