// File: /workspace/github_c_makefile_star2_O0/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
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
je 0x5ed4
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x5eb8
movl -0x34(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x34(%rbp)
movslq -0x34(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10a0
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
jae 0x5f27
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb (%rax,%rcx), %cl
movslq -0x38(%rbp), %rax
movb %cl, -0x70(%rbp,%rax)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x5edd
movslq -0x38(%rbp), %rax
movb $0x0, -0x70(%rbp,%rax)
leaq -0x70(%rbp), %rdi
callq 0x1230
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %edi
movq -0x8(%rbp), %rax
movl (%rax), %esi
callq 0x5970
movl %eax, -0x74(%rbp)
movq -0x8(%rbp), %rax
movslq -0x74(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
je 0x5f8e
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x5f72
movl -0x34(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x34(%rbp)
movslq -0x34(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rdi
callq 0x10a0
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
jae 0x5fe1
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb (%rax,%rcx), %cl
movslq -0x38(%rbp), %rax
movb %cl, -0x70(%rbp,%rax)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x5f97
movslq -0x38(%rbp), %rax
movb $0x0, -0x70(%rbp,%rax)
leaq -0x70(%rbp), %rdi
callq 0x1230
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %edi
movq -0x8(%rbp), %rax
movl (%rax), %esi
callq 0x5970
movl %eax, -0x74(%rbp)
movq -0x8(%rbp), %rax
movslq -0x74(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x604c
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x4950
movq %rax, -0x80(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x80(%rbp), %rdx
callq 0x4950
jmp 0x608f
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x4950
movq %rax, -0x88(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x4950
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x4290
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)