// File: /workspace/github_c_makefile_star2_O2/DVaronos[P]AnLogProject1/hash.c
// Function: HashConect
void HashConect(Hash* H,char* first,char* second,int match){ /*Eisagei enan neo product sto HashTable*/
  NList* F;
  NList* S;
	int i=0,j=0,in;
	char name[40];
	while(first[i]!='/'){//Vrisko to simio pou teliwnei to onoma ths istoselidas tou proiontos
    i++;
  }
	i+=2;//pigeno to i sthn thesh pou arxizei o arithmos tou proiontos
	while(i<strlen(first)){
		name[j]=first[i];
		j++;
		i++;
	}
	name[j]='\0';
	in=atoi(name);//apothievo ton arithmo tou proiontos ston int in
	int index=hash(in,H->size);
  F=(NList*)H[index].Head;//pernw thn lista pou vriskete sto index bucket tou HashTable

  i=0;
  j=0;
  while(second[i]!='/'){//Vrisko to simio pou teliwnei to onoma ths istoselidas tou proiontos
    i++;
  }
	i+=2;//pigeno to i sthn thesh pou arxizei o arithmos tou proiontos
	while(i<strlen(second)){
		name[j]=second[i];
		j++;
		i++;
	}
	name[j]='\0';
	in=atoi(name);//apothievo ton arithmo tou proiontos ston int in
	index=hash(in,H->size);
  S=(NList*)H[index].Head;//pernw thn lista pou vriskete sto index bucket tou HashTable


  if(match){ //Ean match ==1 ta proionta teriazoun
    CList* clique;
    clique=ConectNList(F,first,NULL);
    ConectNList(S,second,clique);
  }else{ //Ean match==0 ta proionta den teriazoun
    CList* CF;
    CList* CS;
    CF=ConectNList(F,first,NULL);
    CS=ConectNList(S,second,NULL);
    Diff(CF,CS);
  }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, -0x2c(%rbp)
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
pushq $0x1
popq %r14
cmpb $0x2f, -0x1(%r15,%r14)
leaq 0x1(%r14), %r14
jne 0x4069
movq %r15, %rdi
callq 0x10c0
xorl %ecx, %ecx
cmpq %r14, %rax
jbe 0x4094
movb (%r15,%r14), %dl
movb %dl, -0x60(%rbp,%rcx)
incq %rcx
incq %r14
jmp 0x407f
movl %ecx, %eax
movb $0x0, -0x60(%rbp,%rax)
leaq -0x60(%rbp), %rdi
callq 0x1240
movl (%r12), %r14d
movl %eax, %ecx
shll $0xd, %ecx
xorl %ecx, %eax
movl %eax, %ecx
sarl $0x11, %ecx
xorl %ecx, %eax
movl %eax, %ecx
shll $0x5, %ecx
xorl %ecx, %eax
cltd
idivl %r14d
movl %edx, %eax
negl %eax
cmovsl %edx, %eax
shlq $0x4, %rax
movq 0x8(%r12,%rax), %rax
movq %rax, -0x38(%rbp)
pushq $0x1
popq %r13
cmpb $0x2f, -0x1(%rbx,%r13)
leaq 0x1(%r13), %r13
jne 0x40d9
movq %rbx, %rdi
callq 0x10c0
xorl %ecx, %ecx
cmpq %r13, %rax
jbe 0x4104
movb (%rbx,%r13), %dl
movb %dl, -0x60(%rbp,%rcx)
incq %rcx
incq %r13
jmp 0x40ef
movl %ecx, %eax
movb $0x0, -0x60(%rbp,%rax)
leaq -0x60(%rbp), %rdi
callq 0x1240
movl %eax, %ecx
shll $0xd, %ecx
xorl %ecx, %eax
movl %eax, %ecx
sarl $0x11, %ecx
xorl %ecx, %eax
movl %eax, %ecx
shll $0x5, %ecx
xorl %ecx, %eax
cltd
idivl %r14d
movl %edx, %eax
negl %eax
cmovsl %edx, %eax
shlq $0x4, %rax
movq 0x8(%r12,%rax), %r12
movq -0x38(%rbp), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x33c0
movq %rax, %r15
cmpl $0x0, -0x2c(%rbp)
je 0x4170
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x33c0
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x33c0
movq %r15, %rdi
movq %rax, %rsi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3038