// File: /workspace/github_c_makefile_star2_O0/jiqingxiaoxi[P]RPA/RPA.c
// Function: read_parPrimer
struct Primer *read_parPrimer(char *path,int common_flag,int specific_flag)
{
	char *in,line[100];
	int pos,len,gi,position,plus,minus,size,i,flag,total,*store,*temp,*data;
	float Tm;
	struct Primer *new_primer,*p_primer,*head;
	struct Node *new_node,*p_node;
	FILE *fp;

///read the  primer file
	if(access(path,0)==-1)
	{
		printf("Error! Don't have the %s file!\n",path);
		exit(1);
	}
        fp=fopen(path,"r");
        if(fp==NULL)
        {
                printf("Error: can't open the %s file!\n",path);
                exit(1);
        }
	
	size=sizeof(struct Primer);
	i=0;
        while(fscanf(fp,"pos:%d\tlength:%d\t+:%d\t-:%d\t%f\n",&pos,&len,&plus,&minus,&Tm)!=EOF)
        {
		new_primer=(struct Primer *)malloc(size);
		new_primer->pos=pos;
		new_primer->len=len;
		new_primer->total=1;
		new_primer->plus=plus;
		new_primer->minus=minus;
		new_primer->Tm=Tm;
		new_primer->next=NULL;
		new_primer->other=NULL;
		new_primer->common=NULL;
		new_primer->specific=NULL;
		new_primer->ignore=0;

		if(i==0)
		{
			head=new_primer;
			p_primer=new_primer;
			i++;
		}
		else
		{
			p_primer->next=new_primer;
			p_primer=new_primer;
		}
        }
	fclose(fp);
        if(i==0)
        {
                printf("Sorry! Don't have any candidate single primers in %s!\n",path);
                exit(1);
        }

//parameter of common
	if(common_flag==1)
	{
		i=strlen(path);
		in=(char *)malloc(i+20);
        	memset(in,'\0',i+20);
        	strcpy(in,path);
        	strcat(in,"-common.txt"); //suffix of parameter
		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);
        	}
		
		total=0;
		while(fgets(line,100,fp)!=NULL)
			total++;
		rewind(fp);
		store=(int *)malloc(total*sizeof(int));
		temp=(int *)malloc(total*sizeof(int));
		data=(int *)malloc(6*total*sizeof(int));
		total=0;
		while(fscanf(fp,"%d\t%d\t%d\t%d\t%d\t%d\n",&pos,&len,&gi,&position,&plus,&minus)!=EOF)
		{
			data[6*total]=pos;
			data[6*total+1]=len;
			data[6*total+2]=gi;
			data[6*total+3]=position;
			data[6*total+4]=plus;
			data[6*total+5]=minus;
			store[total]=total;
			total++;
		}
		fclose(fp);
		sort_merge(store,temp,data,0,(total-1));

		p_primer=head;
		size=sizeof(struct Node);
		flag=0;
		i=0;
		while(p_primer&&i<total)
		{
		//pos
			if(data[store[i]*6]<p_primer->pos)
			{
				i++;
				continue;
			}
			if(data[store[i]*6]>p_primer->pos)
			{
				p_primer=p_primer->next;
				flag=0;
				continue;
			}
		//len
			if(data[store[i]*6+1]<p_primer->len)
                        {
                                i++;
                                continue;
                        }
                        if(data[store[i]*6+1]>p_primer->len)
                        {
                                p_primer=p_primer->next;
				flag=0;
                                continue;
                        }
			new_node=(struct Node *)malloc(size);
			new_node->gi=data[store[i]*6+2];
			new_node->pos=data[store[i]*6+3];
			new_node->plus=data[store[i]*6+4];
			new_node->minus=data[store[i]*6+5];
                        new_node->next=NULL;
			if(flag==0)
			{
				flag++;
				p_primer->common=new_node;
				p_node=new_node;
			}
			else
			{
                        	p_node->next=new_node;
				p_node=new_node;
			}
			i++;
        	}
		free(in);
		free(data);
		free(store);
		free(temp);
	}
//paramter for specific
	if(specific_flag==1)
	{
		i=strlen(path);
		in=(char *)malloc(i+20);
		memset(in,'\0',i+20);
        	strcpy(in,path);
        	strcat(in,"-specific.txt"); //suffix of parameter
		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);
        	}
		total=0;
                while(fgets(line,100,fp)!=NULL)
                        total++;
                rewind(fp);
                store=(int *)malloc(total*sizeof(int));
                temp=(int *)malloc(total*sizeof(int));
                data=(int *)malloc(6*total*sizeof(int));
                total=0;
                while(fscanf(fp,"%d\t%d\t%d\t%d\t%d\t%d\n",&pos,&len,&gi,&position,&plus,&minus)!=EOF)
                {
                        data[6*total]=pos;
                        data[6*total+1]=len;
                        data[6*total+2]=gi;
                        data[6*total+3]=position;
                        data[6*total+4]=plus;
                        data[6*total+5]=minus;
                        store[total]=total;
                        total++;
                }
                fclose(fp);
                sort_merge(store,temp,data,0,(total-1));

                p_primer=head;
                size=sizeof(struct Node);
                flag=0;
		i=0;
                while(p_primer&&i<total)
                {
                //pos
                        if(data[store[i]*6]<p_primer->pos)
                        {
                                i++;
                                continue;
                        }
                        if(data[store[i]*6]>p_primer->pos)
                        {
                                p_primer=p_primer->next;
				flag=0;
                                continue;
                        }
                //len
                        if(data[store[i]*6+1]<p_primer->len)
                        {
                                i++;
                                continue;
                        }
                        if(data[store[i]*6+1]>p_primer->len)
                        {
                                p_primer=p_primer->next;
				flag=0;
                                continue;
                        }
                        new_node=(struct Node *)malloc(size);
                        new_node->gi=data[store[i]*6+2];
                        new_node->pos=data[store[i]*6+3];
                        new_node->plus=data[store[i]*6+4];
                        new_node->minus=data[store[i]*6+5];
                        new_node->next=NULL;
			if(flag==0)
			{
				flag++;
				p_primer->specific=new_node;
				p_node=new_node;
			}
			else
			{
                        	p_node->next=new_node;
                        	p_node=new_node;
			}
                        i++;
                }
		free(in);
                free(data);
                free(store);
                free(temp);

	//ignore info
		i=strlen(path);
                in=(char *)malloc(i+20);
                memset(in,'\0',i+20);
                strcpy(in,path);
                strcat(in,"-ignore.txt"); //suffix of parameter
                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);
                }
		p_primer=head;
                while(fscanf(fp,"%d\n",&pos)!=EOF)
                {
			while(p_primer)
			{
				if(p_primer->pos<pos)
				{
					p_primer=p_primer->next;
					continue;
				}
				if(p_primer->pos>pos)
					break;
				p_primer->ignore=1;
				p_primer=p_primer->next;
			}
                }
                fclose(fp);
                free(in);
	}
	return head;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x1180
cmpl $-0x1, %eax
jne 0x11e01
movq -0x8(%rbp), %rsi
leaq 0x5cca(%rip), %rdi      # 0x17aba
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movq -0x8(%rbp), %rdi
leaq 0x5b60(%rip), %rsi      # 0x1796c
callq 0x1190
movq %rax, -0xf8(%rbp)
cmpq $0x0, -0xf8(%rbp)
jne 0x11e3e
movq -0x8(%rbp), %rsi
leaq 0x5ede(%rip), %rdi      # 0x17d0b
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movl $0x40, -0x9c(%rbp)
movl $0x0, -0xa0(%rbp)
movq -0xf8(%rbp), %rdi
leaq 0x5ecb(%rip), %rsi      # 0x17d2b
leaq -0x84(%rbp), %rdx
leaq -0x88(%rbp), %rcx
leaq -0x94(%rbp), %r8
leaq -0x98(%rbp), %r9
leaq -0xc4(%rbp), %rax
movq %rax, (%rsp)
movb $0x0, %al
callq 0x1060
cmpl $-0x1, %eax
je 0x11fb0
movslq -0x9c(%rbp), %rdi
callq 0x1160
movq %rax, -0xd0(%rbp)
movl -0x84(%rbp), %ecx
movq -0xd0(%rbp), %rax
movl %ecx, (%rax)
movl -0x88(%rbp), %ecx
movq -0xd0(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0xd0(%rbp), %rax
movl $0x1, 0x10(%rax)
movl -0x94(%rbp), %ecx
movq -0xd0(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x98(%rbp), %ecx
movq -0xd0(%rbp), %rax
movl %ecx, 0xc(%rax)
movss -0xc4(%rbp), %xmm0
movq -0xd0(%rbp), %rax
movss %xmm0, 0x18(%rax)
movq -0xd0(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0xd0(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0xd0(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0xd0(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0xd0(%rbp), %rax
movl $0x0, 0x14(%rax)
cmpl $0x0, -0xa0(%rbp)
jne 0x11f8b
movq -0xd0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl -0xa0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0x11fab
movq -0xd0(%rbp), %rcx
movq -0xd8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0xd0(%rbp), %rax
movq %rax, -0xd8(%rbp)
jmp 0x11e52
movq -0xf8(%rbp), %rdi
callq 0x1090
cmpl $0x0, -0xa0(%rbp)
jne 0x11fe1
movq -0x8(%rbp), %rsi
leaq 0x5d7a(%rip), %rdi      # 0x17d4a
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
cmpl $0x1, -0xc(%rbp)
jne 0x1257f
movq -0x8(%rbp), %rdi
callq 0x10a0
movl %eax, -0xa0(%rbp)
movl -0xa0(%rbp), %eax
addl $0x14, %eax
movslq %eax, %rdi
callq 0x1160
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl -0xa0(%rbp), %eax
addl $0x14, %eax
movslq %eax, %rdx
xorl %esi, %esi
callq 0x10e0
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x1050
movq -0x18(%rbp), %rdi
leaq 0x5d43(%rip), %rsi      # 0x17d81
callq 0x11b0
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x1180
cmpl $-0x1, %eax
jne 0x1206f
movq -0x18(%rbp), %rsi
leaq 0x5a5c(%rip), %rdi      # 0x17aba
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movq -0x18(%rbp), %rdi
leaq 0x58f2(%rip), %rsi      # 0x1796c
callq 0x1190
movq %rax, -0xf8(%rbp)
cmpq $0x0, -0xf8(%rbp)
jne 0x120ac
movq -0x18(%rbp), %rsi
leaq 0x5c70(%rip), %rdi      # 0x17d0b
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movl $0x0, -0xa8(%rbp)
leaq -0x80(%rbp), %rdi
movq -0xf8(%rbp), %rdx
movl $0x64, %esi
callq 0x1110
cmpq $0x0, %rax
je 0x120e2
movl -0xa8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa8(%rbp)
jmp 0x120b6
movq -0xf8(%rbp), %rdi
callq 0x10d0
movslq -0xa8(%rbp), %rdi
shlq $0x2, %rdi
callq 0x1160
movq %rax, -0xb0(%rbp)
movslq -0xa8(%rbp), %rdi
shlq $0x2, %rdi
callq 0x1160
movq %rax, -0xb8(%rbp)
imull $0x6, -0xa8(%rbp), %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1160
movq %rax, -0xc0(%rbp)
movl $0x0, -0xa8(%rbp)
movq -0xf8(%rbp), %rdi
leaq 0x5c3f(%rip), %rsi      # 0x17d8d
leaq -0x84(%rbp), %rdx
leaq -0x88(%rbp), %rcx
leaq -0x8c(%rbp), %r8
leaq -0x90(%rbp), %r9
leaq -0x94(%rbp), %r10
leaq -0x98(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x1060
cmpl $-0x1, %eax
je 0x12267
movl -0x84(%rbp), %edx
movq -0xc0(%rbp), %rax
imull $0x6, -0xa8(%rbp), %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x88(%rbp), %edx
movq -0xc0(%rbp), %rax
imull $0x6, -0xa8(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x8c(%rbp), %edx
movq -0xc0(%rbp), %rax
imull $0x6, -0xa8(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x90(%rbp), %edx
movq -0xc0(%rbp), %rax
imull $0x6, -0xa8(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x94(%rbp), %edx
movq -0xc0(%rbp), %rax
imull $0x6, -0xa8(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x98(%rbp), %edx
movq -0xc0(%rbp), %rax
imull $0x6, -0xa8(%rbp), %ecx
addl $0x5, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0xa8(%rbp), %edx
movq -0xb0(%rbp), %rax
movslq -0xa8(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0xa8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa8(%rbp)
jmp 0x12140
movq -0xf8(%rbp), %rdi
callq 0x1090
movq -0xb0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
movl -0xa8(%rbp), %r8d
subl $0x1, %r8d
xorl %ecx, %ecx
callq 0x11d30
movq -0xe0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl $0x18, -0x9c(%rbp)
movl $0x0, -0xa4(%rbp)
movl $0x0, -0xa0(%rbp)
xorl %eax, %eax
cmpq $0x0, -0xd8(%rbp)
movb %al, -0xf9(%rbp)
je 0x122ed
movl -0xa0(%rbp), %eax
cmpl -0xa8(%rbp), %eax
setl %al
movb %al, -0xf9(%rbp)
movb -0xf9(%rbp), %al
testb $0x1, %al
jne 0x122fc
jmp 0x12552
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movq -0xd8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x12337
movl -0xa0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0x122c6
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movq -0xd8(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x12382
movq -0xd8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xd8(%rbp)
movl $0x0, -0xa4(%rbp)
jmp 0x122c6
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movq -0xd8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x123c4
movl -0xa0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0x122c6
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movq -0xd8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jle 0x12413
movq -0xd8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xd8(%rbp)
movl $0x0, -0xa4(%rbp)
jmp 0x122c6
movslq -0x9c(%rbp), %rdi
callq 0x1160
movq %rax, -0xe8(%rbp)
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movq -0xe8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movq -0xe8(%rbp), %rax
movl %ecx, (%rax)
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movq -0xe8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
addl $0x5, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movq -0xe8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0xe8(%rbp), %rax
movq $0x0, 0x10(%rax)
cmpl $0x0, -0xa4(%rbp)
jne 0x1251e
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
movq -0xe8(%rbp), %rcx
movq -0xd8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0xe8(%rbp), %rax
movq %rax, -0xf0(%rbp)
jmp 0x1253e
movq -0xe8(%rbp), %rcx
movq -0xf0(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0xe8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl -0xa0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0x122c6
movq -0x18(%rbp), %rdi
callq 0x1030
movq -0xc0(%rbp), %rdi
callq 0x1030
movq -0xb0(%rbp), %rdi
callq 0x1030
movq -0xb8(%rbp), %rdi
callq 0x1030
cmpl $0x1, -0x10(%rbp)
jne 0x12c8d
movq -0x8(%rbp), %rdi
callq 0x10a0
movl %eax, -0xa0(%rbp)
movl -0xa0(%rbp), %eax
addl $0x14, %eax
movslq %eax, %rdi
callq 0x1160
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl -0xa0(%rbp), %eax
addl $0x14, %eax
movslq %eax, %rdx
xorl %esi, %esi
callq 0x10e0
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x1050
movq -0x18(%rbp), %rdi
leaq 0x57c4(%rip), %rsi      # 0x17da0
callq 0x11b0
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x1180
cmpl $-0x1, %eax
jne 0x1260d
movq -0x18(%rbp), %rsi
leaq 0x54be(%rip), %rdi      # 0x17aba
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movq -0x18(%rbp), %rdi
leaq 0x5354(%rip), %rsi      # 0x1796c
callq 0x1190
movq %rax, -0xf8(%rbp)
cmpq $0x0, -0xf8(%rbp)
jne 0x1264a
movq -0x18(%rbp), %rsi
leaq 0x56d2(%rip), %rdi      # 0x17d0b
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movl $0x0, -0xa8(%rbp)
leaq -0x80(%rbp), %rdi
movq -0xf8(%rbp), %rdx
movl $0x64, %esi
callq 0x1110
cmpq $0x0, %rax
je 0x12680
movl -0xa8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa8(%rbp)
jmp 0x12654
movq -0xf8(%rbp), %rdi
callq 0x10d0
movslq -0xa8(%rbp), %rdi
shlq $0x2, %rdi
callq 0x1160
movq %rax, -0xb0(%rbp)
movslq -0xa8(%rbp), %rdi
shlq $0x2, %rdi
callq 0x1160
movq %rax, -0xb8(%rbp)
imull $0x6, -0xa8(%rbp), %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1160
movq %rax, -0xc0(%rbp)
movl $0x0, -0xa8(%rbp)
movq -0xf8(%rbp), %rdi
leaq 0x56a1(%rip), %rsi      # 0x17d8d
leaq -0x84(%rbp), %rdx
leaq -0x88(%rbp), %rcx
leaq -0x8c(%rbp), %r8
leaq -0x90(%rbp), %r9
leaq -0x94(%rbp), %r10
leaq -0x98(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x1060
cmpl $-0x1, %eax
je 0x12805
movl -0x84(%rbp), %edx
movq -0xc0(%rbp), %rax
imull $0x6, -0xa8(%rbp), %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x88(%rbp), %edx
movq -0xc0(%rbp), %rax
imull $0x6, -0xa8(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x8c(%rbp), %edx
movq -0xc0(%rbp), %rax
imull $0x6, -0xa8(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x90(%rbp), %edx
movq -0xc0(%rbp), %rax
imull $0x6, -0xa8(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x94(%rbp), %edx
movq -0xc0(%rbp), %rax
imull $0x6, -0xa8(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x98(%rbp), %edx
movq -0xc0(%rbp), %rax
imull $0x6, -0xa8(%rbp), %ecx
addl $0x5, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0xa8(%rbp), %edx
movq -0xb0(%rbp), %rax
movslq -0xa8(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0xa8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa8(%rbp)
jmp 0x126de
movq -0xf8(%rbp), %rdi
callq 0x1090
movq -0xb0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
movl -0xa8(%rbp), %r8d
subl $0x1, %r8d
xorl %ecx, %ecx
callq 0x11d30
movq -0xe0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl $0x18, -0x9c(%rbp)
movl $0x0, -0xa4(%rbp)
movl $0x0, -0xa0(%rbp)
xorl %eax, %eax
cmpq $0x0, -0xd8(%rbp)
movb %al, -0xfa(%rbp)
je 0x1288b
movl -0xa0(%rbp), %eax
cmpl -0xa8(%rbp), %eax
setl %al
movb %al, -0xfa(%rbp)
movb -0xfa(%rbp), %al
testb $0x1, %al
jne 0x1289a
jmp 0x12af0
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movq -0xd8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x128d5
movl -0xa0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0x12864
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movq -0xd8(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x12920
movq -0xd8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xd8(%rbp)
movl $0x0, -0xa4(%rbp)
jmp 0x12864
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movq -0xd8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x12962
movl -0xa0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0x12864
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movq -0xd8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jle 0x129b1
movq -0xd8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xd8(%rbp)
movl $0x0, -0xa4(%rbp)
jmp 0x12864
movslq -0x9c(%rbp), %rdi
callq 0x1160
movq %rax, -0xe8(%rbp)
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movq -0xe8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movq -0xe8(%rbp), %rax
movl %ecx, (%rax)
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movq -0xe8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movslq -0xa0(%rbp), %rdx
imull $0x6, (%rcx,%rdx,4), %ecx
addl $0x5, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movq -0xe8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0xe8(%rbp), %rax
movq $0x0, 0x10(%rax)
cmpl $0x0, -0xa4(%rbp)
jne 0x12abc
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
movq -0xe8(%rbp), %rcx
movq -0xd8(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0xe8(%rbp), %rax
movq %rax, -0xf0(%rbp)
jmp 0x12adc
movq -0xe8(%rbp), %rcx
movq -0xf0(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0xe8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl -0xa0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0x12864
movq -0x18(%rbp), %rdi
callq 0x1030
movq -0xc0(%rbp), %rdi
callq 0x1030
movq -0xb0(%rbp), %rdi
callq 0x1030
movq -0xb8(%rbp), %rdi
callq 0x1030
movq -0x8(%rbp), %rdi
callq 0x10a0
movl %eax, -0xa0(%rbp)
movl -0xa0(%rbp), %eax
addl $0x14, %eax
movslq %eax, %rdi
callq 0x1160
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl -0xa0(%rbp), %eax
addl $0x14, %eax
movslq %eax, %rdx
xorl %esi, %esi
callq 0x10e0
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x1050
movq -0x18(%rbp), %rdi
leaq 0x523e(%rip), %rsi      # 0x17dae
callq 0x11b0
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x1180
cmpl $-0x1, %eax
jne 0x12ba1
movq -0x18(%rbp), %rsi
leaq 0x4f2a(%rip), %rdi      # 0x17aba
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movq -0x18(%rbp), %rdi
leaq 0x4dc0(%rip), %rsi      # 0x1796c
callq 0x1190
movq %rax, -0xf8(%rbp)
cmpq $0x0, -0xf8(%rbp)
jne 0x12bde
movq -0x18(%rbp), %rsi
leaq 0x513e(%rip), %rdi      # 0x17d0b
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movq -0xe0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xf8(%rbp), %rdi
leaq 0x51a2(%rip), %rsi      # 0x17d9c
leaq -0x84(%rbp), %rdx
movb $0x0, %al
callq 0x1060
cmpl $-0x1, %eax
je 0x12c78
jmp 0x12c0f
cmpq $0x0, -0xd8(%rbp)
je 0x12c73
movq -0xd8(%rbp), %rax
movl (%rax), %eax
cmpl -0x84(%rbp), %eax
jge 0x12c3e
movq -0xd8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xd8(%rbp)
jmp 0x12c0f
movq -0xd8(%rbp), %rax
movl (%rax), %eax
cmpl -0x84(%rbp), %eax
jle 0x12c51
jmp 0x12c73
movq -0xd8(%rbp), %rax
movl $0x1, 0x14(%rax)
movq -0xd8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xd8(%rbp)
jmp 0x12c0f
jmp 0x12bec
movq -0xf8(%rbp), %rdi
callq 0x1090
movq -0x18(%rbp), %rdi
callq 0x1030
movq -0xe0(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopl (%rax)