// File: /workspace/github_c_makefile_star2_O0/jiqingxiaoxi[P]RPA/RPA.c
// Function: getTetraloop
void getTetraloop(char *tetraloopEntropies1,char *tetraloopEnthalpies1,double *tetraloopEntropies2,double *tetraloopEnthalpies2,char *path)
{
        FILE *sFile, *hFile;
        int i, turn;
        char *line,seq[10],value[10];

        i=strlen(path)+20;
        line=(char *)malloc(i);
        memset(line,'\0',i);
        strcpy(line,path);
        strcat(line,"tetraloop.ds");
        if(access(line,0)==-1)
        {
                printf("Error! Don't have %s file!\n",line);
                exit(1);
        }
        sFile=fopen(line,"r");
        if(sFile==NULL)
        {
                printf("Error! Can't open the %s file!\n",line);
                exit(1);
        }

	turn=0;
        while(fscanf(sFile,"%s\t%s\n",seq,value)!=EOF)
        {
		for(i=0;i<6;i++)
			tetraloopEntropies1[turn*6+i]=str2int(seq[i]);
		if(value[0]=='i')
			tetraloopEntropies2[turn]=1.0*INFINITY;
		else
			tetraloopEntropies2[turn]=atof(value);
		turn++;
        }
        fclose(sFile);

        memset(line,'\0',i);
        strcpy(line,path);
        strcat(line,"tetraloop.dh");
        if(access(line,0)==-1)
        {
                printf("Error! Don't have %s file!\n",line);
                exit(1);
        }
        hFile=fopen(line,"r");
        if(hFile==NULL)
        {
                printf("Error! Can't open the %s file!\n",line);
                exit(1);
        }
        free(line);
        
	turn=0;
        while(fscanf(hFile,"%s\t%s\n",seq,value)!=EOF)
        {
		for(i=0;i<6;i++)
			tetraloopEnthalpies1[6*turn+i]=str2int(seq[i]);
		if(value[0]=='i')
			tetraloopEnthalpies2[turn]=1.0*INFINITY;
		else
			tetraloopEnthalpies2[turn]=atof(value);
		turn++;
        }
        fclose(hFile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x10a0
addq $0x14, %rax
movl %eax, -0x3c(%rbp)
movslq -0x3c(%rbp), %rdi
callq 0x1160
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movslq -0x3c(%rbp), %rdx
xorl %esi, %esi
callq 0x10e0
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1050
movq -0x48(%rbp), %rdi
leaq 0x13d64(%rip), %rsi     # 0x173d4
callq 0x11b0
movq -0x48(%rbp), %rdi
xorl %esi, %esi
callq 0x1180
cmpl $-0x1, %eax
jne 0x36a1
movq -0x48(%rbp), %rsi
leaq 0x13b89(%rip), %rdi     # 0x17219
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movq -0x48(%rbp), %rdi
leaq 0x142c0(%rip), %rsi     # 0x1796c
callq 0x1190
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x36d8
movq -0x48(%rbp), %rsi
leaq 0x13b6e(%rip), %rdi     # 0x17235
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movl $0x0, -0x40(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x52(%rbp), %rdx
leaq -0x5c(%rbp), %rcx
leaq 0x13cef(%rip), %rsi     # 0x173e1
movb $0x0, %al
callq 0x1060
cmpl $-0x1, %eax
je 0x377b
movl $0x0, -0x3c(%rbp)
cmpl $0x6, -0x3c(%rbp)
jge 0x3737
movslq -0x3c(%rbp), %rax
movsbl -0x52(%rbp,%rax), %edi
callq 0x12e0
movb %al, %dl
movq -0x8(%rbp), %rax
imull $0x6, -0x40(%rbp), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3705
movsbl -0x5c(%rbp), %eax
cmpl $0x69, %eax
jne 0x3757
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd 0x139e0(%rip), %xmm0    # 0x17130
movsd %xmm0, (%rax,%rcx,8)
jmp 0x376d
leaq -0x5c(%rbp), %rdi
callq 0x1080
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x36df
movq -0x30(%rbp), %rdi
callq 0x1090
movq -0x48(%rbp), %rdi
movslq -0x3c(%rbp), %rdx
xorl %esi, %esi
callq 0x10e0
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1050
movq -0x48(%rbp), %rdi
leaq 0x13c48(%rip), %rsi     # 0x173f3
callq 0x11b0
movq -0x48(%rbp), %rdi
xorl %esi, %esi
callq 0x1180
cmpl $-0x1, %eax
jne 0x37dc
movq -0x48(%rbp), %rsi
leaq 0x13a4e(%rip), %rdi     # 0x17219
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movq -0x48(%rbp), %rdi
leaq 0x14185(%rip), %rsi     # 0x1796c
callq 0x1190
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x3813
movq -0x48(%rbp), %rsi
leaq 0x13a33(%rip), %rdi     # 0x17235
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movq -0x48(%rbp), %rdi
callq 0x1030
movl $0x0, -0x40(%rbp)
movq -0x38(%rbp), %rdi
leaq -0x52(%rbp), %rdx
leaq -0x5c(%rbp), %rcx
leaq 0x13bab(%rip), %rsi     # 0x173e1
movb $0x0, %al
callq 0x1060
cmpl $-0x1, %eax
je 0x38bf
movl $0x0, -0x3c(%rbp)
cmpl $0x6, -0x3c(%rbp)
jge 0x387b
movslq -0x3c(%rbp), %rax
movsbl -0x52(%rbp,%rax), %edi
callq 0x12e0
movb %al, %dl
movq -0x10(%rbp), %rax
imull $0x6, -0x40(%rbp), %ecx
addl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3849
movsbl -0x5c(%rbp), %eax
cmpl $0x69, %eax
jne 0x389b
movq -0x20(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd 0x1389c(%rip), %xmm0    # 0x17130
movsd %xmm0, (%rax,%rcx,8)
jmp 0x38b1
leaq -0x5c(%rbp), %rdi
callq 0x1080
movq -0x20(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x3823
movq -0x38(%rbp), %rdi
callq 0x1090
addq $0x60, %rsp
popq %rbp
retq
nop