// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r13
movq %rcx, -0x60(%rbp)
movq %rdx, -0x68(%rbp)
movq %rsi, %r14
movq %rdi, %r12
movq %r8, %rdi
callq 0x10b0
addl $0x14, %eax
movq %rax, -0x48(%rbp)
movslq %eax, %rsi
movl $0x1, %edi
callq 0x1140
movq %rax, %rbx
movq %rax, %rdi
movq %r13, %rsi
callq 0x1050
movq %rbx, %rdi
callq 0x10b0
movabsq $0x6f6f6c6172746574, %rcx # imm = 0x6F6F6C6172746574
movq %rcx, (%rbx,%rax)
movabsq $0x73642e706f6f6c, %rcx # imm = 0x73642E706F6F6C
movq %rcx, 0x5(%rbx,%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11c0
cmpl $-0x1, %eax
je 0x3062
leaq 0xb37b(%rip), %rsi      # 0xe21b
movq %rbx, %rdi
callq 0x11d0
testq %rax, %rax
je 0x306b
movq %rax, %r15
leaq 0xb31f(%rip), %rsi      # 0xe1da
leaq -0x3c(%rbp), %rdx
leaq -0x32(%rbp), %rcx
movq %rax, %rdi
xorl %eax, %eax
callq 0x1060
cmpl $-0x1, %eax
je 0x2f4d
movq %r13, -0x50(%rbp)
movq %rbx, -0x58(%rbp)
xorl %r13d, %r13d
xorl %ebx, %ebx
movsbl -0x3c(%rbp,%rbx), %edi
callq 0x131c
movb %al, (%r12,%rbx)
incq %rbx
cmpq $0x6, %rbx
jne 0x2edf
cmpb $0x69, -0x32(%rbp)
movsd 0xb116(%rip), %xmm0     # 0xe018
je 0x2f0d
leaq -0x32(%rbp), %rdi
callq 0x1090
movq -0x68(%rbp), %rax
movsd %xmm0, (%rax,%r13,8)
incq %r13
movq %r15, %rdi
leaq 0xb2b6(%rip), %rsi      # 0xe1da
leaq -0x3c(%rbp), %rdx
leaq -0x32(%rbp), %rcx
xorl %eax, %eax
callq 0x1060
addq $0x6, %r12
cmpl $-0x1, %eax
jne 0x2edd
movl $0x6, %eax
movq %rax, -0x48(%rbp)
movq -0x58(%rbp), %rbx
movq -0x50(%rbp), %r13
movq %r15, %rdi
callq 0x10a0
movslq -0x48(%rbp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1100
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1050
movq %rbx, %rdi
callq 0x10b0
movabsq $0x6f6f6c6172746574, %rcx # imm = 0x6F6F6C6172746574
movq %rcx, (%rbx,%rax)
movabsq $0x68642e706f6f6c, %rcx # imm = 0x68642E706F6F6C
movq %rcx, 0x5(%rbx,%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11c0
cmpl $-0x1, %eax
je 0x3062
leaq 0xb26e(%rip), %rsi      # 0xe21b
movq %rbx, %rdi
callq 0x11d0
testq %rax, %rax
je 0x306b
movq %rax, %r15
movq %rbx, %rdi
callq 0x1030
leaq 0xb20a(%rip), %rsi      # 0xe1da
leaq -0x3c(%rbp), %rdx
leaq -0x32(%rbp), %rcx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1060
cmpl $-0x1, %eax
je 0x304b
leaq -0x32(%rbp), %r13
xorl %ebx, %ebx
xorl %r12d, %r12d
movsbl -0x3c(%rbp,%r12), %edi
callq 0x131c
movb %al, (%r14,%r12)
incq %r12
cmpq $0x6, %r12
jne 0x2ff0
cmpb $0x69, -0x32(%rbp)
movsd 0xb004(%rip), %xmm0     # 0xe018
je 0x301e
movq %r13, %rdi
callq 0x1090
movq -0x60(%rbp), %rax
movsd %xmm0, (%rax,%rbx,8)
incq %rbx
movq %r15, %rdi
leaq 0xb1a6(%rip), %rsi      # 0xe1da
leaq -0x3c(%rbp), %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x1060
addq $0x6, %r14
cmpl $-0x1, %eax
jne 0x2fed
movq %r15, %rdi
callq 0x10a0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb0b0(%rip), %rdi      # 0xe119
jmp 0x3072
leaq 0xb0c3(%rip), %rdi      # 0xe135
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10c0
movl $0x1, %edi
callq 0x1200