// File: /workspace/github_c_makefile_star2_O2/jiqingxiaoxi[P]RPA/RPA.c
// Function: getTstack2
void getTstack2(double tstack2Entropies[],double tstack2Enthalpies[],char *path)
{
        int i1, j1, i2, j2;
        FILE *sFile, *hFile;
        char *line;

        i1=strlen(path)+20;
        line=(char *)malloc(i1);
        memset(line,'\0',i1);
        strcpy(line,path);
        strcat(line,"tstack2.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',i1);
        strcpy(line,path);      
        strcat(line,"tstack2.dh");
        if(access(line,0)==-1)
        {
                printf("Error! Don't have %s file!\n",line);
                exit(1);
        }             
        hFile=fopen(line,"r");
        if(sFile==NULL)
        {
                printf("Error! Can't open the %s file!\n",line);
                exit(1);   
        }
        free(line);

        line=(char *)malloc(20);
        memset(line,'\0',20);
        for (i1 = 0; i1 < 5; ++i1)
                for (i2 = 0; i2 < 5; ++i2)
                        for (j1 = 0; j1 < 5; ++j1)
                                for (j2 = 0; j2 < 5; ++j2)
                                        if (i1 == 4 || j1 == 4)
                                        {
                                                tstack2Enthalpies[i1*125+i2*25+j1*5+j2] =1.0*INFINITY;
                                                tstack2Entropies[i1*125+i2*25+j1*5+j2] = -1.0;
                                        }
                                        else if (i2 == 4 || j2 == 4)
                                        {
                                                tstack2Entropies[i1*125+i2*25+j1*5+j2] = 0.00000000001;
                                                tstack2Enthalpies[i1*125+i2*25+j1*5+j2] = 0.0;
                                        }
                                        else
                                        {
                                                if(fgets(line,20,sFile)==NULL)
                                                {
                                                        printf("Error! When read parameters in getTstack2 function!\n");
                                                        exit(1);
                                                }
                                                if(strncmp(line, "inf", 3)==0)
                                                        tstack2Entropies[i1*125+i2*25+j1*5+j2]=1.0*INFINITY;
                                                else
                                                        tstack2Entropies[i1*125+i2*25+j1*5+j2]=atof(line);

                                                if(fgets(line,20,hFile)==NULL)
                                                {
                                                        printf("Error! When read parameters in getTstack2 function!\n");
                                                        exit(1);
                                                }
                                                if(strncmp(line, "inf", 3)==0)
                                                        tstack2Enthalpies[i1*125+i2*25+j1*5+j2]=1.0*INFINITY;
                                                else
                                                        tstack2Enthalpies[i1*125+i2*25+j1*5+j2]=atof(line);


                                                if (fabs(tstack2Entropies[i1*125+i2*25+j1*5+j2])>999999999||fabs(tstack2Enthalpies[i1*125+i2*25+j1*5+j2])>999999999)
                                                {
                                                        tstack2Entropies[i1*125+i2*25+j1*5+j2] = -1.0;
                                                        tstack2Enthalpies[i1*125+i2*25+j1*5+j2] =1.0*INFINITY;
                                                }
                                        }
        fclose(sFile);
        fclose(hFile);
        free(line);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, -0x40(%rbp)
movq %rdi, -0x38(%rbp)
movq %rdx, %rdi
callq 0x10b0
addl $0x14, %eax
movslq %eax, %r15
pushq $0x1
popq %rdi
movq %r15, %rsi
callq 0x1140
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movq %rbx, %rdi
callq 0x10b0
movabsq $0x2e326b6361747374, %r12 # imm = 0x2E326B6361747374
movq %r12, (%rbx,%rax)
movl $0x73642e, 0x7(%rbx,%rax) # imm = 0x73642E
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11b0
cmpl $-0x1, %eax
je 0x29c3
leaq 0xab05(%rip), %rsi      # 0xd23b
movq %rbx, %rdi
callq 0x11c0
movq %rax, -0x58(%rbp)
testq %rax, %rax
je 0x29cc
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1100
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1050
movq %rbx, %rdi
callq 0x10b0
movq %r12, (%rbx,%rax)
movl $0x68642e, 0x7(%rbx,%rax) # imm = 0x68642E
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11b0
cmpl $-0x1, %eax
je 0x29c3
leaq 0xaaaa(%rip), %rsi      # 0xd23b
movq %rbx, %rdi
callq 0x11c0
movq %rax, -0x50(%rbp)
movq %rbx, %rdi
callq 0x1030
pushq $0x1
popq %rdi
pushq $0x14
popq %rsi
callq 0x1140
movq %rax, %r12
xorl %esi, %esi
movabsq $0x7ff0000000000000, %r13 # imm = 0x7FF0000000000000
movabsq $-0x4010000000000000, %rdi # imm = 0xBFF0000000000000
cmpq $0x5, %rsi
je 0x2987
movq -0x38(%rbp), %rbx
movq -0x40(%rbp), %rcx
movq %rcx, -0x48(%rbp)
xorl %r8d, %r8d
movq %rsi, -0x68(%rbp)
cmpq $0x5, %r8
je 0x2972
movq %rbx, -0x60(%rbp)
movq -0x48(%rbp), %r15
xorl %r11d, %r11d
movq %r8, -0x78(%rbp)
cmpq $0x5, %r11
je 0x295a
cmpq $0x4, %rsi
sete %cl
movq %r11, -0x70(%rbp)
cmpq $0x4, %r11
sete %r11b
orb %cl, %r11b
xorl %r14d, %r14d
movb %r11b, -0x29(%rbp)
cmpq $0x5, %r14
je 0x2942
testb %r11b, %r11b
je 0x2842
movq %r13, (%r15,%r14,8)
movq %rdi, (%rbx,%r14,8)
jmp 0x293a
cmpq $0x4, %r8
setne %sil
cmpq $0x4, %r14
setne %cl
testb %cl, %sil
jne 0x286e
movabsq $0x3da5fd7fe1796495, %rcx # imm = 0x3DA5FD7FE1796495
movq %rcx, (%rbx,%r14,8)
andq $0x0, (%r15,%r14,8)
jmp 0x293a
movq %r12, %rdi
pushq $0x14
popq %rsi
movq -0x58(%rbp), %rdx
callq 0x1130
testq %rax, %rax
je 0x29af
movq %r12, %rdi
leaq 0xa898(%rip), %rsi      # 0xd128
pushq $0x3
popq %rdx
callq 0x1040
movsd 0xa788(%rip), %xmm0     # 0xd028
testl %eax, %eax
je 0x28ac
movq %r12, %rdi
callq 0x1090
movsd %xmm0, (%rbx,%r14,8)
movq %r12, %rdi
pushq $0x14
popq %rsi
movq -0x50(%rbp), %rdx
callq 0x1130
testq %rax, %rax
je 0x29af
movq %r12, %rdi
leaq 0xa854(%rip), %rsi      # 0xd128
pushq $0x3
popq %rdx
callq 0x1040
movsd 0xa744(%rip), %xmm0     # 0xd028
testl %eax, %eax
je 0x28f0
movq %r12, %rdi
callq 0x1090
movsd %xmm0, (%r15,%r14,8)
movsd (%rbx,%r14,8), %xmm1
andpd 0xa7dc(%rip), %xmm1     # 0xd0e0
ucomisd 0xa724(%rip), %xmm1     # 0xd030
movabsq $-0x4010000000000000, %rdi # imm = 0xBFF0000000000000
movq -0x78(%rbp), %r8
movb -0x29(%rbp), %r11b
ja 0x2932
andpd 0xa7b8(%rip), %xmm0     # 0xd0e0
ucomisd 0xa700(%rip), %xmm0     # 0xd030
jbe 0x293a
movq %rdi, (%rbx,%r14,8)
movq %r13, (%r15,%r14,8)
incq %r14
jmp 0x2826
movq -0x70(%rbp), %r11
incq %r11
addq $0x28, %r15
addq $0x28, %rbx
movq -0x68(%rbp), %rsi
jmp 0x27ff
incq %r8
movl $0xc8, %ecx
addq %rcx, -0x48(%rbp)
movq -0x60(%rbp), %rbx
addq %rcx, %rbx
jmp 0x27e6
incq %rsi
movl $0x3e8, %ecx            # imm = 0x3E8
addq %rcx, -0x40(%rbp)
addq %rcx, -0x38(%rbp)
jmp 0x27c9
movq -0x58(%rbp), %rdi
callq 0x10a0
movq -0x50(%rbp), %rdi
callq 0x10a0
movq %r12, %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
leaq 0xacf0(%rip), %rdi      # 0xd6a6
callq 0x1070
pushq $0x1
popq %rdi
callq 0x11f0
leaq 0xa76f(%rip), %rdi      # 0xd139
jmp 0x29d3
leaq 0xa782(%rip), %rdi      # 0xd155
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10c0
jmp 0x29bb