// File: /workspace/github_c_makefile_star2_O0/DVaronos[P]AnLogProject1/hash.c
// Function: Lrehash
LHash* Lrehash(LHash* H){
  LHash*  Temp;
  int i,index,j;
  Temp=(LHash* )malloc( (H->size*2) *  sizeof(LHash) ); //Dimiourgo ena neo HasTable me thn diplasia xoritikotita
  Temp->size=H->size * 2;
  Temp->count=H->count;
  for(i=0 ; i< Temp->size ; i++){
    Temp[i].word=NULL;
    Temp[i].idf=0.0;
    Temp[i].tfcount=0;
    Temp[i].wordperj=0;
  }
  for(i=0 ; i< H->size ; i++){  //Pernaw ta dedomena tou paliou sto neo HasTable

    if(H[i].word!=NULL){  //Ean to arxiko Hash exei dedomena se afthn thn thesh
      j=0;
      while(1){ //Evresi tou bucket pou tha paei to neo product
        if(!j){ //Sthn proth epanalipsh ipologizoume mono thn sinartish hash
          index=hash1(H[i].word,Temp->size);
          j=1;
        }else{
          index++;
          if(index>=Temp->size) index-=Temp->size;
        }
        if(Temp[index].word==NULL){  //Ean einai adio to bucket tha isagoume se afto thn camera
          break;
        }
      }
      Temp[index].word=strdup(H[i].word);
      Temp[index].wordperj=H[i].wordperj;
      Temp[index].idf=H[i].idf;
      Temp[index].tfcount=H[i].tfcount;
    }
  }
  FreeLHash(H);
  H=Temp;
  return H;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
shll %eax
cltq
imulq $0x28, %rax, %rdi
callq 0x1190
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
shll %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jge 0x689a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rax)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x20(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6829
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jge 0x69f0
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x69e0
movl $0x0, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x6901
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %esi
callq 0x6560
movl %eax, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
jmp 0x6927
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jl 0x6925
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
movl -0x18(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rbp)
jmp 0x6927
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x693e
jmp 0x6940
jmp 0x68d1
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x1250
movq %rax, %rcx
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %ecx
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x10(%rax)
jmp 0x69e2
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x68a1
movq -0x8(%rbp), %rdi
callq 0x6a10
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)