// File: /workspace/github_c_makefile_star2_O3/jiqingxiaoxi[P]RPA/RPA.c
// Function: getLoop
void getLoop(double hairpinLoopEntropies[30],double interiorLoopEntropies[30],double bulgeLoopEntropies[30],double hairpinLoopEnthalpies[30],double interiorLoopEnthalpies[30],double bulgeLoopEnthalpies[30],char *path)
{
        int k;
        FILE *sFile, *hFile;
        char *line;

        k=strlen(path)+20;
        line=(char *)malloc(k);
        memset(line,'\0',k);
        strcpy(line,path);
        strcat(line,"loops.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);
        }

        memset(line,'\0',k);
        strcpy(line,path);
        strcat(line,"loops.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);

        for (k = 0; k < 30; ++k)
        {
                readLoop(sFile, &interiorLoopEntropies[k], &bulgeLoopEntropies[k], &hairpinLoopEntropies[k]);
                readLoop(hFile, &interiorLoopEnthalpies[k], &bulgeLoopEnthalpies[k], &hairpinLoopEnthalpies[k]);
        }
        fclose(sFile);
        fclose(hFile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, -0x58(%rbp)
movq %r8, -0x60(%rbp)
movq %rcx, -0x50(%rbp)
movq %rdx, %r14
movq %rsi, -0x48(%rbp)
movq %rdi, -0x40(%rbp)
movq 0x10(%rbp), %rbx
movq %rbx, %rdi
callq 0x10b0
addl $0x14, %eax
movslq %eax, %r15
movl $0x1, %edi
movq %r15, %rsi
callq 0x1140
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %r13
movq %rbx, %rsi
callq 0x1050
movq %r12, %rdi
callq 0x10b0
movabsq $0x73642e73706f6f6c, %rcx # imm = 0x73642E73706F6F6C
movq %rcx, (%r12,%rax)
movb $0x0, 0x8(%r12,%rax)
movq %r12, %rbx
movq %r12, %rdi
xorl %esi, %esi
callq 0x11c0
cmpl $-0x1, %eax
je 0x2418
leaq 0xbef8(%rip), %rsi      # 0xe21b
movq %rbx, %rdi
callq 0x11d0
testq %rax, %rax
je 0x2421
movq %rax, %r12
movq %r14, -0x38(%rbp)
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1100
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1050
movq %rbx, %rdi
callq 0x10b0
movabsq $0x68642e73706f6f6c, %rcx # imm = 0x68642E73706F6F6C
movq %rcx, (%rbx,%rax)
movb $0x0, 0x8(%rbx,%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11c0
cmpl $-0x1, %eax
je 0x2418
movq %r12, %r15
leaq 0xbe90(%rip), %rsi      # 0xe21b
movq %rbx, %rdi
callq 0x11d0
movq %rax, -0x30(%rbp)
testq %rax, %rax
je 0x2421
movq %rbx, %rdi
callq 0x1030
xorl %r12d, %r12d
movq -0x38(%rbp), %r14
movq -0x48(%rbp), %rbx
movq -0x40(%rbp), %r13
leaq (%rbx,%r12), %rsi
leaq (%r14,%r12), %rdx
leaq (%r12,%r13), %rcx
movq %r15, %rdi
callq 0x137e
movq -0x60(%rbp), %rax
leaq (%rax,%r12), %rsi
movq -0x58(%rbp), %rax
leaq (%rax,%r12), %rdx
movq -0x50(%rbp), %rax
leaq (%rax,%r12), %rcx
movq -0x30(%rbp), %rdi
callq 0x137e
addq $0x8, %r12
cmpq $0xf0, %r12
jne 0x23b7
movq %r15, %rdi
callq 0x10a0
movq -0x30(%rbp), %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10a0
leaq 0xbcfa(%rip), %rdi      # 0xe119
jmp 0x2428
leaq 0xbd0d(%rip), %rdi      # 0xe135
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10c0
movl $0x1, %edi
callq 0x1200