// File: huiwenliuge[P]EmoAnaer/src/DictCreate.cpp
// Function: fapdDic(_IO_FILE*, _IO_FILE*, _IO_FILE*, int)
void fapdDic(FILE* infp,FILE* srcfp,FILE* outfp,int dim){
	char* tmp  =(char*)calloc(sizeof(char),421);  
	char* sta=tmp;
	int lenTmp,i;

    ChUTF8* hash=fldDic(srcfp,dim);
	ChUTF8 NewS;
    while(fscanf(infp,"%s\n",sta)!=-1){
		tmp=sta;
        while(tmp[0]!='\0'){
            lenTmp=retLenUTF8(tmp);
           if(!hIscontain(hash,tmp,lenTmp)){
                NewS = (ChUTF8)malloc(sizeof(struct chUTF8));
                NewS->schar=(char*)malloc(sizeof(char)*(lenTmp+1));
                memcpy(NewS->schar,tmp,lenTmp);
                NewS->schar[lenTmp]='\0';
//std::cout<<tmp<<":"<<lenTmp<<":"<<NewS->schar<<std::endl;
                NewS->vecftr=(double*)malloc(sizeof(double)*dim);
                for(i=0;i<dim;++i){
                    NewS->vecftr[i]=(rand()%101-50)/50.0;
                }
            
                hashput(hash,NewS);
           }
					
            tmp+=lenTmp;
        }
		memset(sta,'\0',421*sizeof(char));
    }
	
    prtHash2File(hash,outfp,dim);
    fflush(outfp);
    hashFree(hash);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x1, %edi
movl $0x1a5, %esi            # imm = 0x1A5
callq 0x20b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x6df0
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0x13e1(%rip), %rsi      # 0x8072
movb $0x0, %al
callq 0x2260
cmpl $-0x1, %eax
je 0x6dc5
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x6db0
movq -0x28(%rbp), %rdi
callq 0x77d0
movl %eax, -0x34(%rbp)
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x34(%rbp), %edx
callq 0x6f60
testb $0x1, %al
jne 0x6d9a
movl $0x18, %edi
callq 0x21c0
movq %rax, -0x48(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x0, %rdi
callq 0x21c0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
movslq -0x34(%rbp), %rdx
callq 0x20f0
movq -0x48(%rbp), %rax
movq (%rax), %rax
movslq -0x34(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movslq -0x1c(%rbp), %rdi
shlq $0x3, %rdi
callq 0x21c0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x6d8d
callq 0x2040
movl $0x65, %ecx
cltd
idivl %ecx
subl $0x32, %edx
cvtsi2sd %edx, %xmm0
movsd 0x1463(%rip), %xmm1     # 0x81d0
divsd %xmm1, %xmm0
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x38(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x6d49
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x6fe0
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x6ca9
movq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x1a5, %edx            # imm = 0x1A5
callq 0x20a0
jmp 0x6c82
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x7030
movq -0x18(%rbp), %rdi
callq 0x2180
movq -0x40(%rbp), %rdi
callq 0x7110
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)