// File: TooruAkagi[P]GCIS_Index/gcis_nep_build.cpp
// Function: makedic(unsigned int*, int*, int*, int*, unsigned int*, unsigned int*, int*, int*, int)
void makedic(unsigned int *T,int *P,int *P_2,int *K,unsigned int *NS,unsigned int *D,int *D_2,int *D_3,int f){ 
    //make dictionary
    printf("\nf = %d / dcs[%d]=%d dc2s[%d] = %d\n",f,f+1,dcs[f+1],f+1,dc2s[f+1]);
    int t = 0; //the number of the kind of different purse
    int starti = dc2s[f];
    int starts = dcs[f]; 
    int s = starts;
    if(DEBUGFLAG==1){printf("\n%d,%d,%d",dc2s[f+1],dcs[f+1],starts);}
    for(int i = starti;i<=dc2s[f+1];i++){ //t = dc2s[f+1]
        int a = 0;
        D_3[i] = 0;
        D_2[i] = s;
        if(DEBUGFLAG==1){printf("\n[%d]",i);}
        while(a<P_2[K[t]]){
            D[s] = T[P[K[t]]+a];
            if(DEBUGFLAG==1){printf("%x ",D[s]);}
            if(f>0){D_3[i]+= D_3[dc2s[f-1]+T[P[K[t]]+a]];}
            if(f==0){D_3[i]++;}
            s++;
            a++;
        }
        if(DEBUGFLAG==1){printf(" / %d:%d:%d /",i,D_2[i],D_3[i]);}
        t++;
    }
    dc2s[f+1]++;
    D_2[dc2s[f+1]] = s;
    printf("\ns = %d, t = %d, dc2s[f+1] = %d\n",s,t,dc2s[f+1]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x20(%rbp), %eax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl 0x20(%rbp), %esi
movl 0x20(%rbp), %edx
addl $0x1, %edx
movl 0x20(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x44dc(%rip), %rax      # 0x7190
movl (%rax,%rcx,4), %ecx
movl 0x20(%rbp), %r8d
addl $0x1, %r8d
movl 0x20(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
leaq 0x4511(%rip), %rax      # 0x71e0
movl (%rax,%rdi,4), %r9d
leaq 0x233e(%rip), %rdi      # 0x5018
movb $0x0, %al
callq 0x2030
movl $0x0, -0x34(%rbp)
movslq 0x20(%rbp), %rcx
leaq 0x44ed(%rip), %rax      # 0x71e0
movl (%rax,%rcx,4), %eax
movl %eax, -0x38(%rbp)
movslq 0x20(%rbp), %rcx
leaq 0x448c(%rip), %rax      # 0x7190
movl (%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl 0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rdx
leaq 0x44b7(%rip), %rcx      # 0x71e0
cmpl (%rcx,%rdx,4), %eax
jg 0x2e32
movl $0x0, -0x48(%rbp)
movq 0x18(%rbp), %rax
movslq -0x44(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x40(%rbp), %edx
movq 0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x48(%rbp), %eax
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rdx
movslq -0x34(%rbp), %rsi
movslq (%rdx,%rsi,4), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x2e1b
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rdx
movslq -0x34(%rbp), %rsi
movslq (%rdx,%rsi,4), %rdx
movl (%rcx,%rdx,4), %ecx
addl -0x48(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x30(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
cmpl $0x0, 0x20(%rbp)
jle 0x2ded
movq 0x18(%rbp), %rax
movl 0x20(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rdx
leaq 0x4429(%rip), %rcx      # 0x71e0
movl (%rcx,%rdx,4), %ecx
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %r8
movslq (%rdi,%r8,4), %rdi
movl (%rsi,%rdi,4), %esi
addl -0x48(%rbp), %esi
movslq %esi, %rsi
addl (%rdx,%rsi,4), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movq 0x18(%rbp), %rax
movslq -0x44(%rbp), %rcx
addl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
cmpl $0x0, 0x20(%rbp)
jne 0x2e04
movq 0x18(%rbp), %rax
movslq -0x44(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x2d56
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x2d16
movl 0x20(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x439e(%rip), %rax      # 0x71e0
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x4391(%rip), %rax      # 0x71e0
movl %edx, (%rax,%rcx,4)
movl -0x40(%rbp), %edx
movq 0x10(%rbp), %rax
movl 0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rsi
leaq 0x4377(%rip), %rcx      # 0x71e0
movslq (%rcx,%rsi,4), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x40(%rbp), %esi
movl -0x34(%rbp), %edx
movl 0x20(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x435a(%rip), %rax      # 0x71e0
movl (%rax,%rcx,4), %ecx
leaq 0x21ac(%rip), %rdi      # 0x503c
movb $0x0, %al
callq 0x2030
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)