// File: /workspace/github_c_makefile_star2_O3/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, %r12
movq %rsi, %r15
movq %rdi, -0x38(%rbp)
movq %rdx, %rdi
callq 0x10b0
addl $0x14, %eax
movslq %eax, %r13
movl $0x1, %edi
movq %r13, %rsi
callq 0x1140
movq %rax, %rbx
movq %rax, %rdi
movq %r12, %rsi
callq 0x1050
movq %rbx, %rdi
callq 0x10b0
movabsq $0x2e326b6361747374, %r14 # imm = 0x2E326B6361747374
movq %r14, (%rbx,%rax)
movl $0x73642e, 0x7(%rbx,%rax) # imm = 0x73642E
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11c0
cmpl $-0x1, %eax
je 0x2a92
leaq 0xba28(%rip), %rsi      # 0xe21b
movq %rbx, %rdi
callq 0x11d0
movq %rax, -0x50(%rbp)
testq %rax, %rax
je 0x2a9b
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x1100
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1050
movq %rbx, %rdi
callq 0x10b0
movq %r14, (%rbx,%rax)
movl $0x68642e, 0x7(%rbx,%rax) # imm = 0x68642E
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11c0
cmpl $-0x1, %eax
je 0x2a92
leaq 0xb9cd(%rip), %rsi      # 0xe21b
movq %rbx, %rdi
callq 0x11d0
movq %rax, -0x48(%rbp)
movq %rbx, %rdi
callq 0x1030
movl $0x1, %edi
movl $0x14, %esi
callq 0x1140
movq %rax, %rdi
movq $0x0, -0x40(%rbp)
movabsq $0x7ff0000000000000, %r13 # imm = 0x7FF0000000000000
movabsq $-0x4010000000000000, %r8 # imm = 0xBFF0000000000000
movq -0x38(%rbp), %rbx
movq %rbx, -0x38(%rbp)
movq %r15, -0x58(%rbp)
movq %r15, %r14
xorl %edx, %edx
movq %rbx, -0x68(%rbp)
movq %r14, -0x60(%rbp)
xorl %ecx, %ecx
movq %rdx, -0x78(%rbp)
cmpq $0x4, -0x40(%rbp)
sete %al
movq %rcx, -0x70(%rbp)
cmpq $0x4, %rcx
sete %r11b
orb %al, %r11b
xorl %r12d, %r12d
movb %r11b, -0x29(%rbp)
testb %r11b, %r11b
je 0x28df
movq %r13, (%r14,%r12,8)
movq %r8, (%rbx,%r12,8)
jmp 0x29e3
cmpq $0x4, %rdx
setne %al
cmpq $0x4, %r12
setne %cl
testb %cl, %al
jne 0x290c
movabsq $0x3da5fd7fe1796495, %rax # imm = 0x3DA5FD7FE1796495
movq %rax, (%rbx,%r12,8)
movq $0x0, (%r14,%r12,8)
jmp 0x29e3
movq %rdi, %r15
movl $0x14, %esi
movq -0x50(%rbp), %rdx
callq 0x1130
testq %rax, %rax
je 0x2a7c
movl $0x3, %edx
movq %r15, %rdi
leaq 0xb7d3(%rip), %rsi      # 0xe108
callq 0x1040
movsd 0xb6d6(%rip), %xmm0     # 0xe018
testl %eax, %eax
je 0x294e
movq %r15, %rdi
callq 0x1090
movsd %xmm0, (%rbx,%r12,8)
movq %r15, %rdi
movl $0x14, %esi
movq -0x48(%rbp), %rdx
callq 0x1130
testq %rax, %rax
je 0x2a7c
movl $0x3, %edx
movq %r15, %rdi
leaq 0xb78b(%rip), %rsi      # 0xe108
callq 0x1040
movsd 0xb68e(%rip), %xmm0     # 0xe018
testl %eax, %eax
je 0x2996
movq %r15, %rdi
callq 0x1090
movsd %xmm0, (%r14,%r12,8)
movsd (%rbx,%r12,8), %xmm1
andpd 0xb716(%rip), %xmm1     # 0xe0c0
ucomisd 0xb66e(%rip), %xmm1     # 0xe020
movq %r15, %rdi
movabsq $-0x4010000000000000, %r8 # imm = 0xBFF0000000000000
movq -0x78(%rbp), %rdx
movb -0x29(%rbp), %r11b
ja 0x29db
andpd 0xb6ef(%rip), %xmm0     # 0xe0c0
ucomisd 0xb647(%rip), %xmm0     # 0xe020
jbe 0x29e3
movq %r8, (%rbx,%r12,8)
movq %r13, (%r14,%r12,8)
incq %r12
cmpq $0x5, %r12
jne 0x28cd
movq -0x70(%rbp), %rcx
incq %rcx
addq $0x28, %r14
addq $0x28, %rbx
cmpq $0x5, %rcx
jne 0x28af
incq %rdx
movl $0xc8, %eax
movq -0x60(%rbp), %r14
addq %rax, %r14
movq -0x68(%rbp), %rbx
addq %rax, %rbx
cmpq $0x5, %rdx
jne 0x28a1
movq -0x40(%rbp), %rdx
incq %rdx
movq -0x58(%rbp), %r15
movl $0x3e8, %ecx            # imm = 0x3E8
addq %rcx, %r15
movq -0x38(%rbp), %rbx
addq %rcx, %rbx
movq %rdx, -0x40(%rbp)
cmpq $0x5, %rdx
jne 0x2894
movq %rdi, %rbx
movq -0x50(%rbp), %rdi
callq 0x10a0
movq -0x48(%rbp), %rdi
callq 0x10a0
movq %rbx, %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
leaq 0xbc03(%rip), %rdi      # 0xe686
callq 0x1070
movl $0x1, %edi
callq 0x1200
leaq 0xb680(%rip), %rdi      # 0xe119
jmp 0x2aa2
leaq 0xb693(%rip), %rdi      # 0xe135
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10c0
jmp 0x2a88