// File: /workspace/github_c_makefile_star2_O1/jiqingxiaoxi[P]RPA/RPA.c
// Function: getTriloop
void getTriloop(char *triloopEntropies1,char *triloopEnthalpies1,double *triloopEntropies2,double *triloopEnthalpies2,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,"triloop.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<5;i++)
			triloopEntropies1[5*turn+i]=str2int(seq[i]);
		if(value[0]=='i')
			triloopEntropies2[turn]=1.0*INFINITY;
		else
			triloopEntropies2[turn]=atof(value);
		turn++;
        }
        fclose(sFile);

	i=strlen(path)+20;
        memset(line,'\0',i);
        strcpy(line,path);
        strcat(line,"triloop.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<5;i++)
			triloopEnthalpies1[turn*5+i]=str2int(seq[i]);
		if(value[0]=='i')
			triloopEnthalpies2[turn]=1.0*INFINITY;
		else
			triloopEnthalpies2[turn]=atof(value);
		turn++;
        }
        fclose(hFile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r13
movq %rcx, -0x58(%rbp)
movq %rdx, -0x60(%rbp)
movq %rsi, %r14
movq %rdi, %r12
movq %r8, %rdi
callq 0x10b0
addl $0x14, %eax
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 $0x2e706f6f6c697274, %rcx # imm = 0x2E706F6F6C697274
movq %rcx, (%r15,%rax)
movl $0x73642e, 0x7(%r15,%rax) # imm = 0x73642E
movq %r15, %rdi
xorl %esi, %esi
callq 0x11b0
cmpl $-0x1, %eax
je 0x2e6e
movq %r13, -0x50(%rbp)
leaq 0xb569(%rip), %rsi      # 0xe20e
movq %r15, -0x48(%rbp)
movq %r15, %rdi
callq 0x11c0
testq %rax, %rax
je 0x2e7a
movq %rax, %rbx
leaq 0xb506(%rip), %rsi      # 0xe1ca
leaq -0x3c(%rbp), %rdx
leaq -0x32(%rbp), %rcx
movq %rax, %rdi
xorl %eax, %eax
callq 0x1060
cmpl $-0x1, %eax
je 0x2d3f
xorl %r13d, %r13d
xorl %r15d, %r15d
movsbl -0x3c(%rbp,%r15), %edi
callq 0x130c
movb %al, (%r12,%r15)
incq %r15
cmpq $0x5, %r15
jne 0x2ce1
cmpb $0x69, -0x32(%rbp)
movsd 0xb323(%rip), %xmm0     # 0xe028
je 0x2d10
leaq -0x32(%rbp), %rdi
callq 0x1090
movq -0x60(%rbp), %rax
movsd %xmm0, (%rax,%r13,8)
incq %r13
movq %rbx, %rdi
leaq 0xb4a3(%rip), %rsi      # 0xe1ca
leaq -0x3c(%rbp), %rdx
leaq -0x32(%rbp), %rcx
xorl %eax, %eax
callq 0x1060
addq $0x5, %r12
cmpl $-0x1, %eax
jne 0x2cde
movq %rbx, %rdi
callq 0x10a0
movq -0x50(%rbp), %r15
movq %r15, %rdi
callq 0x10b0
shlq $0x20, %rax
movabsq $0x1400000000, %rdx     # imm = 0x1400000000
addq %rax, %rdx
sarq $0x20, %rdx
movq -0x48(%rbp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1100
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1050
movq %rbx, %rdi
callq 0x10b0
movabsq $0x2e706f6f6c697274, %rcx # imm = 0x2E706F6F6C697274
movq %rcx, (%rbx,%rax)
movl $0x68642e, 0x7(%rbx,%rax) # imm = 0x68642E
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11b0
cmpl $-0x1, %eax
je 0x2e87
leaq 0xb455(%rip), %rsi      # 0xe20e
movq %rbx, %rdi
callq 0x11c0
testq %rax, %rax
je 0x2e90
movq %rax, %r12
movq %rbx, %rdi
callq 0x1030
leaq 0xb3ee(%rip), %rsi      # 0xe1ca
leaq -0x3c(%rbp), %rdx
leaq -0x32(%rbp), %rcx
movq %r12, %rdi
xorl %eax, %eax
callq 0x1060
cmpl $-0x1, %eax
je 0x2e57
leaq -0x32(%rbp), %r13
xorl %ebx, %ebx
xorl %r15d, %r15d
movsbl -0x3c(%rbp,%r15), %edi
callq 0x130c
movb %al, (%r14,%r15)
incq %r15
cmpq $0x5, %r15
jne 0x2dfc
cmpb $0x69, -0x32(%rbp)
movsd 0xb208(%rip), %xmm0     # 0xe028
je 0x2e2a
movq %r13, %rdi
callq 0x1090
movq -0x58(%rbp), %rax
movsd %xmm0, (%rax,%rbx,8)
incq %rbx
movq %r12, %rdi
leaq 0xb38a(%rip), %rsi      # 0xe1ca
leaq -0x3c(%rbp), %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x1060
addq $0x5, %r14
cmpl $-0x1, %eax
jne 0x2df9
movq %r12, %rdi
callq 0x10a0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb294(%rip), %rdi      # 0xe109
movq %r15, %rsi
jmp 0x2e9a
leaq 0xb2a4(%rip), %rdi      # 0xe125
movq -0x48(%rbp), %rsi
jmp 0x2e9a
leaq 0xb27b(%rip), %rdi      # 0xe109
jmp 0x2e97
leaq 0xb28e(%rip), %rdi      # 0xe125
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10c0
movl $0x1, %edi
callq 0x11f0