// File: /workspace/github_c_makefile_star2_O1/jiqingxiaoxi[P]RPA/RPA.c
// Function: getTstack
void getTstack(double tstackEntropies[],double tstackEnthalpies[],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,"tstack_tm_inf.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,"tstack.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)
                                        {
                                                tstackEnthalpies[i1*125+i2*25+j1*5+j2]=1.0*INFINITY;
                                                tstackEntropies[i1*125+i2*25+j1*5+j2] = -1.0;
                                        }
                                        else if (i2 == 4 || j2 == 4)
                                        {
                                                tstackEntropies[i1*125+i2*25+j1*5+j2] = 0.00000000001;
                                                tstackEnthalpies[i1*125+i2*25+j1*5+j2] = 0.0;
                                        }
                                        else
                                        {
                                                if(fgets(line,20,sFile)==NULL)
                                                {
                                                        printf("Error! When read parameters in getTstack function!\n");
                                                        exit(1);
                                                }
                                                if(strncmp(line, "inf", 3)==0)
                                                        tstackEntropies[i1*125+i2*25+j1*5+j2]=1.0*INFINITY;
                                                else
                                                        tstackEntropies[i1*125+i2*25+j1*5+j2]=atof(line);

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

                                                if (fabs(tstackEntropies[i1*125+i2*25+j1*5+j2])>999999999||fabs(tstackEnthalpies[i1*125+i2*25+j1*5+j2])>999999999)
                                                {
                                                        tstackEntropies[i1*125+i2*25+j1*5+j2] = -1.0;
                                                        tstackEnthalpies[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, %r14
movq %rdi, %r15
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
movupd 0xbcb2(%rip), %xmm0     # 0xe181
movupd %xmm0, (%rbx,%rax)
movb $0x0, 0x10(%rbx,%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11b0
cmpl $-0x1, %eax
je 0x27ab
leaq 0xbd1b(%rip), %rsi      # 0xe20e
movq %rbx, %rdi
callq 0x11c0
movq %rax, -0x48(%rbp)
testq %rax, %rax
je 0x27b4
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x1100
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1050
movq %rbx, %rdi
callq 0x10b0
movabsq $0x642e6b6361747374, %rcx # imm = 0x642E6B6361747374
movq %rcx, (%rbx,%rax)
movw $0x68, 0x8(%rbx,%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11b0
cmpl $-0x1, %eax
je 0x27ab
leaq 0xbcb7(%rip), %rsi      # 0xe20e
movq %rbx, %rdi
callq 0x11c0
movq %rax, -0x40(%rbp)
movq %rbx, %rdi
callq 0x1030
movl $0x14, %edi
callq 0x1190
movq %rax, %rsi
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movl $0x0, 0x10(%rax)
movq $0x0, -0x38(%rbp)
movabsq $0x7ff0000000000000, %r13 # imm = 0x7FF0000000000000
movabsq $-0x4010000000000000, %rdi # imm = 0xBFF0000000000000
movq %r15, -0x50(%rbp)
movq %r15, %rbx
movq %r14, -0x58(%rbp)
xorl %r8d, %r8d
movq %rbx, -0x68(%rbp)
movq %r14, -0x60(%rbp)
xorl %ecx, %ecx
movq %r8, -0x78(%rbp)
cmpq $0x4, -0x38(%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 0x25ef
movq %r13, (%r14,%r12,8)
movq %rdi, (%rbx,%r12,8)
jmp 0x26fc
cmpq $0x4, %r8
setne %al
cmpq $0x4, %r12
setne %cl
testb %cl, %al
jne 0x261c
movabsq $0x3da5fd7fe1796495, %rax # imm = 0x3DA5FD7FE1796495
movq %rax, (%rbx,%r12,8)
movq $0x0, (%r14,%r12,8)
jmp 0x26fc
movq %rsi, %r15
movq %rsi, %rdi
movl $0x14, %esi
movq -0x48(%rbp), %rdx
callq 0x1130
testq %rax, %rax
je 0x2795
movl $0x3, %edx
movq %r15, %rdi
leaq 0xbab0(%rip), %rsi      # 0xe0f8
callq 0x1040
movsd 0xb9d3(%rip), %xmm0     # 0xe028
testl %eax, %eax
je 0x2661
movq %r15, %rdi
callq 0x1090
movsd %xmm0, (%rbx,%r12,8)
movq %r15, %rdi
movl $0x14, %esi
movq -0x40(%rbp), %rdx
callq 0x1130
testq %rax, %rax
je 0x2795
movl $0x3, %edx
movq %r15, %rdi
leaq 0xba68(%rip), %rsi      # 0xe0f8
callq 0x1040
movsd 0xb98b(%rip), %xmm0     # 0xe028
testl %eax, %eax
je 0x26a9
movq %r15, %rdi
callq 0x1090
movsd %xmm0, (%r14,%r12,8)
movsd (%rbx,%r12,8), %xmm0
andpd 0xb9f3(%rip), %xmm0     # 0xe0b0
ucomisd 0xb96b(%rip), %xmm0     # 0xe030
movq %r15, %rsi
movabsq $-0x4010000000000000, %rdi # imm = 0xBFF0000000000000
movq -0x78(%rbp), %r8
movb -0x29(%rbp), %r11b
ja 0x26f4
movsd (%r14,%r12,8), %xmm0
andpd 0xb9c6(%rip), %xmm0     # 0xe0b0
ucomisd 0xb93e(%rip), %xmm0     # 0xe030
jbe 0x26fc
movq %rdi, (%rbx,%r12,8)
movq %r13, (%r14,%r12,8)
incq %r12
cmpq $0x5, %r12
jne 0x25dd
movq -0x70(%rbp), %rcx
incq %rcx
addq $0x28, %r14
addq $0x28, %rbx
cmpq $0x5, %rcx
jne 0x25bf
incq %r8
movl $0xc8, %eax
movq -0x60(%rbp), %r14
addq %rax, %r14
movq -0x68(%rbp), %rbx
addq %rax, %rbx
cmpq $0x5, %r8
jne 0x25b1
movq -0x38(%rbp), %rcx
incq %rcx
movq -0x58(%rbp), %r14
movl $0x3e8, %eax            # imm = 0x3E8
addq %rax, %r14
movq -0x50(%rbp), %r15
addq %rax, %r15
movq %rcx, -0x38(%rbp)
cmpq $0x5, %rcx
jne 0x25a3
movq %rsi, %rbx
movq -0x48(%rbp), %rdi
callq 0x10a0
movq -0x40(%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 0xbeaa(%rip), %rdi      # 0xe646
callq 0x1070
movl $0x1, %edi
callq 0x11f0
leaq 0xb957(%rip), %rdi      # 0xe109
jmp 0x27bb
leaq 0xb96a(%rip), %rdi      # 0xe125
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10c0
jmp 0x27a1