// File: /workspace/github_c_makefile_star2_O1/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
movq %r13, %rdi
callq 0x1190
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x1100
movq %rbx, %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 0x11b0
cmpl $-0x1, %eax
je 0x2afa
leaq 0xb9c3(%rip), %rsi      # 0xe20e
movq %rbx, %rdi
callq 0x11c0
movq %rax, -0x50(%rbp)
testq %rax, %rax
je 0x2b03
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 0x11b0
cmpl $-0x1, %eax
je 0x2afa
leaq 0xb968(%rip), %rsi      # 0xe20e
movq %rbx, %rdi
callq 0x11c0
movq %rax, -0x48(%rbp)
movq %rbx, %rdi
callq 0x1030
movl $0x14, %edi
callq 0x1190
movq %rax, %rdi
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movl $0x0, 0x10(%rax)
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 0x2941
movq %r13, (%r14,%r12,8)
movq %r8, (%rbx,%r12,8)
jmp 0x2a4b
cmpq $0x4, %rdx
setne %al
cmpq $0x4, %r12
setne %cl
testb %cl, %al
jne 0x296e
movabsq $0x3da5fd7fe1796495, %rax # imm = 0x3DA5FD7FE1796495
movq %rax, (%rbx,%r12,8)
movq $0x0, (%r14,%r12,8)
jmp 0x2a4b
movq %rdi, %r15
movl $0x14, %esi
movq -0x50(%rbp), %rdx
callq 0x1130
testq %rax, %rax
je 0x2ae4
movl $0x3, %edx
movq %r15, %rdi
leaq 0xb761(%rip), %rsi      # 0xe0f8
callq 0x1040
movsd 0xb684(%rip), %xmm0     # 0xe028
testl %eax, %eax
je 0x29b0
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 0x2ae4
movl $0x3, %edx
movq %r15, %rdi
leaq 0xb719(%rip), %rsi      # 0xe0f8
callq 0x1040
movsd 0xb63c(%rip), %xmm0     # 0xe028
testl %eax, %eax
je 0x29f8
movq %r15, %rdi
callq 0x1090
movsd %xmm0, (%r14,%r12,8)
movsd (%rbx,%r12,8), %xmm0
andpd 0xb6a4(%rip), %xmm0     # 0xe0b0
ucomisd 0xb61c(%rip), %xmm0     # 0xe030
movq %r15, %rdi
movabsq $-0x4010000000000000, %r8 # imm = 0xBFF0000000000000
movq -0x78(%rbp), %rdx
movb -0x29(%rbp), %r11b
ja 0x2a43
movsd (%r14,%r12,8), %xmm0
andpd 0xb677(%rip), %xmm0     # 0xe0b0
ucomisd 0xb5ef(%rip), %xmm0     # 0xe030
jbe 0x2a4b
movq %r8, (%rbx,%r12,8)
movq %r13, (%r14,%r12,8)
incq %r12
cmpq $0x5, %r12
jne 0x292f
movq -0x70(%rbp), %rcx
incq %rcx
addq $0x28, %r14
addq $0x28, %rbx
cmpq $0x5, %rcx
jne 0x2911
incq %rdx
movl $0xc8, %eax
movq -0x60(%rbp), %r14
addq %rax, %r14
movq -0x68(%rbp), %rbx
addq %rax, %rbx
cmpq $0x5, %rdx
jne 0x2903
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 0x28f6
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 0xbb8e(%rip), %rdi      # 0xe679
callq 0x1070
movl $0x1, %edi
callq 0x11f0
leaq 0xb608(%rip), %rdi      # 0xe109
jmp 0x2b0a
leaq 0xb61b(%rip), %rdi      # 0xe125
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10c0
jmp 0x2af0