// File: /workspace/github_c_makefile_star2_O1/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, %rbx
movq %rbx, %rdi
callq 0x1190
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x1100
movq %r15, %rdi
movq %r13, %rsi
callq 0x1050
movq %r15, %rdi
callq 0x10b0
movabsq $0x6f6f6c6172746574, %rcx # imm = 0x6F6F6C6172746574
movq %rcx, (%r15,%rax)
movabsq $0x73642e706f6f6c, %rcx # imm = 0x73642E706F6F6C
movq %rcx, 0x5(%r15,%rax)
movq %r15, %rdi
xorl %esi, %esi
callq 0x11b0
cmpl $-0x1, %eax
je 0x3107
leaq 0xb2cd(%rip), %rsi      # 0xe20e
movq %r15, %rdi
callq 0x11c0
testq %rax, %rax
je 0x3110
movq %rax, %rbx
leaq 0xb26e(%rip), %rsi      # 0xe1ca
leaq -0x3c(%rbp), %rdx
leaq -0x32(%rbp), %rcx
movq %rax, %rdi
xorl %eax, %eax
callq 0x1060
cmpl $-0x1, %eax
je 0x2ff0
movq %r13, -0x50(%rbp)
movq %r15, -0x58(%rbp)
xorl %r13d, %r13d
xorl %r15d, %r15d
movsbl -0x3c(%rbp,%r15), %edi
callq 0x130c
movb %al, (%r12,%r15)
incq %r15
cmpq $0x6, %r15
jne 0x2f81
cmpb $0x69, -0x32(%rbp)
movsd 0xb083(%rip), %xmm0     # 0xe028
je 0x2fb0
leaq -0x32(%rbp), %rdi
callq 0x1090
movq -0x68(%rbp), %rax
movsd %xmm0, (%rax,%r13,8)
incq %r13
movq %rbx, %rdi
leaq 0xb203(%rip), %rsi      # 0xe1ca
leaq -0x3c(%rbp), %rdx
leaq -0x32(%rbp), %rcx
xorl %eax, %eax
callq 0x1060
addq $0x6, %r12
cmpl $-0x1, %eax
jne 0x2f7e
movl $0x6, %eax
movq %rax, -0x48(%rbp)
movq -0x58(%rbp), %r15
movq -0x50(%rbp), %r13
movq %rbx, %rdi
callq 0x10a0
movslq -0x48(%rbp), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x1100
movq %r15, %rdi
movq %r13, %rsi
callq 0x1050
movq %r15, %rdi
callq 0x10b0
movabsq $0x6f6f6c6172746574, %rcx # imm = 0x6F6F6C6172746574
movq %rcx, (%r15,%rax)
movabsq $0x68642e706f6f6c, %rcx # imm = 0x68642E706F6F6C
movq %rcx, 0x5(%r15,%rax)
movq %r15, %rdi
xorl %esi, %esi
callq 0x11b0
cmpl $-0x1, %eax
je 0x3107
leaq 0xb1be(%rip), %rsi      # 0xe20e
movq %r15, %rdi
callq 0x11c0
testq %rax, %rax
je 0x3110
movq %rax, %rbx
movq %r15, %rdi
callq 0x1030
leaq 0xb157(%rip), %rsi      # 0xe1ca
leaq -0x3c(%rbp), %rdx
leaq -0x32(%rbp), %rcx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1060
cmpl $-0x1, %eax
je 0x30f0
leaq -0x32(%rbp), %r13
xorl %r15d, %r15d
xorl %r12d, %r12d
movsbl -0x3c(%rbp,%r12), %edi
callq 0x130c
movb %al, (%r14,%r12)
incq %r12
cmpq $0x6, %r12
jne 0x3094
cmpb $0x69, -0x32(%rbp)
movsd 0xaf70(%rip), %xmm0     # 0xe028
je 0x30c2
movq %r13, %rdi
callq 0x1090
movq -0x60(%rbp), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
movq %rbx, %rdi
leaq 0xb0f1(%rip), %rsi      # 0xe1ca
leaq -0x3c(%rbp), %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x1060
addq $0x6, %r14
cmpl $-0x1, %eax
jne 0x3091
movq %rbx, %rdi
callq 0x10a0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaffb(%rip), %rdi      # 0xe109
jmp 0x3117
leaq 0xb00e(%rip), %rdi      # 0xe125
movq %r15, %rsi
xorl %eax, %eax
callq 0x10c0
movl $0x1, %edi
callq 0x11f0