// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %r14d
cmpb $0x2f, -0x1(%r15,%r14)
leaq 0x1(%r14), %r14
jne 0x45c7
movq %r15, %rdi
callq 0x10c0
movl %r14d, %ecx
cmpq %rcx, %rax
jbe 0x4604
xorl %ecx, %ecx
leaq (%r15,%rcx), %rdx
movb (%r14,%rdx), %dl
movb %dl, -0x60(%rbp,%rcx)
leaq (%rcx,%r14), %rdx
incq %rdx
incq %rcx
cmpq %rdx, %rax
ja 0x45e5
movl %ecx, %eax
jmp 0x4606
xorl %eax, %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)
movl $0x1, %r13d
cmpb $0x2f, -0x1(%rbx,%r13)
leaq 0x1(%r13), %r13
jne 0x464b
movq %rbx, %rdi
callq 0x10c0
movl %r13d, %ecx
cmpq %rcx, %rax
jbe 0x4689
xorl %ecx, %ecx
leaq (%rbx,%rcx), %rdx
movb (%r13,%rdx), %dl
movb %dl, -0x60(%rbp,%rcx)
leaq (%rcx,%r13), %rdx
incq %rdx
incq %rcx
cmpq %rdx, %rax
ja 0x4669
movl %ecx, %eax
jmp 0x468b
xorl %eax, %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 0x36f1
movq %rax, %r15
cmpl $0x0, -0x2c(%rbp)
je 0x46f5
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 0x36f1
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x36f1
movq %r15, %rdi
movq %rax, %rsi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x32a6