// File: /workspace/github_c_makefile_star2_O1/jiqingxiaoxi[P]RPA/RPA.c
// Function: read_list
struct INFO *read_list(char *path,int common_num[])
{
        char *in,name[301];
        int turn,i,size;
        struct INFO *new_primer,*p_primer,*head;
        FILE *fp;

	i=strlen(path);
	in=(char *)malloc(i+20);
	memset(in,'\0',i+20);
	strcpy(in,path);
	strcat(in,"-common_list.txt");
        if(access(in,0)==-1)
        {
                printf("Error! Don't have the %s file!\n",in);
                exit(1);
        }
        fp=fopen(in,"r");
        if(fp==NULL)
        {
                printf("Error: can't open the %s file!\n",in);
                exit(1);
        }
        
        size=sizeof(struct INFO);
        i=0;
        memset(name,'\0',301);
        while(fscanf(fp,"%s\t%d\n",name,&turn)!=EOF)
        {
                new_primer=(struct INFO *)malloc(size);
                new_primer->turn=turn;
                strcpy(new_primer->name,name);
                new_primer->next=NULL;

                if(i==0)
                {
                        head=new_primer;
                        p_primer=new_primer;
                        i++;
                }
                else
                {
                        p_primer->next=new_primer;
                        p_primer=new_primer;
                }
                memset(name,'\0',301);
        }
        fclose(fp);
	common_num[0]=turn;
	free(in);
	return head;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rsi, %r15
movq %rdi, %rbx
callq 0x10b0
addl $0x14, %eax
movslq %eax, %r14
movq %r14, %rdi
callq 0x1190
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1100
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1050
movq %r12, %rdi
callq 0x10b0
movups 0x1d9f(%rip), %xmm0     # 0xe593
movups %xmm0, (%r12,%rax)
movb $0x0, 0x10(%r12,%rax)
movq %r12, %rdi
xorl %esi, %esi
callq 0x11b0
cmpl $-0x1, %eax
je 0xc934
leaq 0x19f5(%rip), %rsi      # 0xe20e
movq %r12, %rdi
callq 0x11c0
testq %rax, %rax
je 0xc93d
movq %rax, %r14
movq %r12, -0x40(%rbp)
movq %r15, -0x48(%rbp)
leaq -0x180(%rbp), %rbx
movl $0x12d, %edx            # imm = 0x12D
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1100
leaq 0x1d52(%rip), %rsi      # 0xe5a4
leaq -0x2c(%rbp), %rcx
movq %r14, -0x38(%rbp)
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1060
cmpl $-0x1, %eax
je 0xc901
movb $0x1, %bl
leaq -0x180(%rbp), %r15
movl $0x140, %edi            # imm = 0x140
callq 0x1190
movq %rax, %r14
movl -0x2c(%rbp), %eax
movl %eax, 0x130(%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1050
movq $0x0, 0x138(%r14)
movq %r14, %rax
testb $0x1, %bl
jne 0xc8b9
movq %r14, 0x138(%r12)
movq %r13, %rax
xorl %ebx, %ebx
movl $0x12d, %edx            # imm = 0x12D
leaq -0x180(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %r12
callq 0x1100
movq -0x38(%rbp), %rdi
leaq 0x1cc5(%rip), %rsi      # 0xe5a4
movq %r15, %rdx
leaq -0x2c(%rbp), %rcx
xorl %eax, %eax
callq 0x1060
movq %r12, %rcx
movq %r12, %r13
movq %r14, %r12
cmpl $-0x1, %eax
jne 0xc879
jmp 0xc901
movq -0x38(%rbp), %rdi
movq %rcx, %rbx
callq 0x10a0
movl -0x2c(%rbp), %eax
movq -0x48(%rbp), %rcx
movl %eax, (%rcx)
movq -0x40(%rbp), %rdi
callq 0x1030
movq %rbx, %rax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1907(%rip), %rdi      # 0xe242
jmp 0xc944
leaq 0x1b4f(%rip), %rdi      # 0xe493
movq %r12, %rsi
xorl %eax, %eax
callq 0x10c0
movl $0x1, %edi
callq 0x11f0