// File: /workspace/github_c_makefile_star2_O3/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, %r14
movq %rdi, %rbx
callq 0x10b0
addl $0x14, %eax
movslq %eax, %rsi
movl $0x1, %edi
callq 0x1140
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1050
movq %r15, %rdi
callq 0x10b0
movups 0x1f35(%rip), %xmm0     # 0xe5a0
movups %xmm0, (%r15,%rax)
movb $0x0, 0x10(%r15,%rax)
movq %r15, %rdi
xorl %esi, %esi
callq 0x11c0
cmpl $-0x1, %eax
je 0xc7ab
leaq 0x1b8b(%rip), %rsi      # 0xe21b
movq %r15, %rdi
callq 0x11d0
testq %rax, %rax
je 0xc7b4
movq %rax, %r12
movq %r15, -0x40(%rbp)
movq %r14, -0x48(%rbp)
leaq -0x180(%rbp), %rbx
movl $0x12d, %edx            # imm = 0x12D
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1100
leaq 0x1ee8(%rip), %rsi      # 0xe5b1
leaq -0x2c(%rbp), %rcx
movq %r12, -0x38(%rbp)
movq %r12, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1060
cmpl $-0x1, %eax
je 0xc778
movb $0x1, %bl
leaq -0x180(%rbp), %r15
movl $0x140, %edi            # imm = 0x140
callq 0x11a0
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 0xc730
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 0x1e5b(%rip), %rsi      # 0xe5b1
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 0xc6f0
jmp 0xc778
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 0x1a9d(%rip), %rdi      # 0xe24f
jmp 0xc7bb
leaq 0x1ce5(%rip), %rdi      # 0xe4a0
movq %r15, %rsi
xorl %eax, %eax
callq 0x10c0
movl $0x1, %edi
callq 0x1200