// File: /workspace/github_c_makefile_star2_O3/jiqingxiaoxi[P]RPA/RPA.c
// Function: getStackint2
void getStackint2(double stackint2Entropies[],double stackint2Enthalpies[], char *path)
{
        int i, j, ii, jj;
        FILE *sFile, *hFile;
        char *line;

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

        line=(char *)malloc(20);
        memset(line,'\0',20);
        for (i = 0; i < 5; ++i)
        {
                for (ii = 0; ii < 5; ++ii)
                {
                        for (j = 0; j < 5; ++j)
                        {
                                for (jj = 0; jj < 5; ++jj)
                                {
                                        if (i == 4 || j == 4 || ii == 4 || jj == 4)
                                        {
                                                stackint2Entropies[i*125+ii*25+j*5+jj] = -1.0;
                                                stackint2Enthalpies[i*125+ii*25+j*5+jj] =1.0*INFINITY;
                                        } 
                                        else 
                                        {
                                                if(fgets(line,20,sFile)==NULL)
                                                {
                                                        printf("Error! When read parameters in getStackint2 function!\n");
                                                        exit(1);
                                                }
                                                if(strncmp(line, "inf", 3)==0)
                                                        stackint2Entropies[i*125+ii*25+j*5+jj]=1.0*INFINITY;
                                                else
                                                        stackint2Entropies[i*125+ii*25+j*5+jj] = atof(line);

                                                if(fgets(line,20,hFile)==NULL)
                                                {
                                                        printf("Error! When read parameters in getStackint2 function!\n");
                                                        exit(1);
                                                }
                                                if(strncmp(line, "inf", 3)==0)
                                                        stackint2Enthalpies[i*125+ii*25+j*5+jj]=1.0*INFINITY;
                                                else
                                                        stackint2Enthalpies[i*125+ii*25+j*5+jj] = atof(line);

                                                if(fabs(stackint2Entropies[i*125+ii*25+j*5+jj])>999999999||fabs(stackint2Enthalpies[i*125+ii*25+j*5+jj])>999999999)
                                                {
                                                        stackint2Entropies[i*125+ii*25+j*5+jj] = -1.0;
                                                        stackint2Enthalpies[i*125+ii*25+j*5+jj] =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 $0x98, %rsp
movq %rdx, %r12
movq %rsi, -0x58(%rbp)
movq %rdi, -0x40(%rbp)
movq %rdx, %rdi
callq 0x10b0
addl $0x14, %eax
movslq %eax, %r13
movl $0x1, %edi
movq %r13, %rsi
callq 0x1140
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
callq 0x1050
movq %r14, %rdi
callq 0x10b0
movabsq $0x2e6d6d6b63617473, %rbx # imm = 0x2E6D6D6B63617473
movq %rbx, (%r14,%rax)
movl $0x73642e, 0x7(%r14,%rax) # imm = 0x73642E
movq %r14, %rdi
xorl %esi, %esi
callq 0x11c0
cmpl $-0x1, %eax
je 0x1c86
leaq 0xc8b0(%rip), %rsi      # 0xe21b
movq %r14, %rdi
callq 0x11d0
movq %rax, -0x38(%rbp)
testq %rax, %rax
je 0x1c8f
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x1100
movq %r14, %rdi
movq %r12, %rsi
callq 0x1050
movq %r14, %rdi
callq 0x10b0
movq %rbx, (%r14,%rax)
movl $0x68642e, 0x7(%r14,%rax) # imm = 0x68642E
movq %r14, %rdi
xorl %esi, %esi
callq 0x11c0
cmpl $-0x1, %eax
je 0x1c86
leaq 0xc854(%rip), %rsi      # 0xe21b
movq %r14, %rdi
callq 0x11d0
movq %rax, -0x30(%rbp)
testq %rax, %rax
je 0x1c8f
movq %r14, %rdi
callq 0x1030
movl $0x1, %edi
movl $0x14, %esi
callq 0x1140
movq %rax, %r13
xorl %eax, %eax
movq -0x58(%rbp), %rcx
movq -0x40(%rbp), %r15
xorl %edi, %edi
imulq $0x7d, %rdi, %rdx
movq %rdx, -0x78(%rbp)
movq %rcx, -0x68(%rbp)
movq %r15, -0x60(%rbp)
movq %rax, -0x70(%rbp)
movq %rax, %rdx
xorl %r8d, %r8d
movq %rdi, -0x98(%rbp)
leaq (%r8,%r8,4), %rax
leaq (%rax,%rax,4), %rax
addq -0x78(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq %rcx, -0x90(%rbp)
movq %rcx, -0x50(%rbp)
movq %r15, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq %rdx, -0x48(%rbp)
xorl %edx, %edx
movq %r8, -0xa0(%rbp)
cmpq $0x4, %r8
sete %al
cmpq $0x4, %rdi
sete %cl
cmpq $0x4, %rdx
sete %r14b
orb %cl, %r14b
orb %al, %r14b
movq %rdx, -0xb0(%rbp)
leaq (%rdx,%rdx,4), %rbx
addq -0xa8(%rbp), %rbx
notb %r14b
movq %r15, -0xb8(%rbp)
xorl %r12d, %r12d
cmpq $0x4, %r12
setne %al
testb %al, %r14b
jne 0x1ad0
leaq (%rbx,%r12), %rax
movq -0x40(%rbp), %rcx
leaq (%rcx,%rax,8), %rcx
movabsq $-0x4010000000000000, %rdx # imm = 0xBFF0000000000000
movq %rdx, (%rcx)
movq -0x58(%rbp), %rcx
movabsq $0x7ff0000000000000, %rdx # imm = 0x7FF0000000000000
movq %rdx, (%rcx,%rax,8)
jmp 0x1b9a
movq %r13, %rdi
movl $0x14, %esi
movq -0x38(%rbp), %rdx
callq 0x1130
testq %rax, %rax
je 0x1c70
movl $0x3, %edx
movq %r13, %rdi
leaq 0xc60f(%rip), %rsi      # 0xe108
callq 0x1040
movsd 0xc512(%rip), %xmm0     # 0xe018
testl %eax, %eax
je 0x1b12
movq %r13, %rdi
callq 0x1090
movsd %xmm0, (%r15)
movq %r13, %rdi
movl $0x14, %esi
movq -0x30(%rbp), %rdx
callq 0x1130
testq %rax, %rax
je 0x1c70
movl $0x3, %edx
movq %r13, %rdi
leaq 0xc5c8(%rip), %rsi      # 0xe108
callq 0x1040
movsd 0xc4cb(%rip), %xmm0     # 0xe018
testl %eax, %eax
je 0x1b59
movq %r13, %rdi
callq 0x1090
movq -0x48(%rbp), %rax
addq %r12, %rax
movq -0x50(%rbp), %rcx
movsd %xmm0, (%rcx,%r12,8)
movsd (%r15), %xmm1
movapd 0xc549(%rip), %xmm2     # 0xe0c0
andpd %xmm2, %xmm1
movsd 0xc49d(%rip), %xmm3     # 0xe020
ucomisd %xmm3, %xmm1
ja 0x1bad
andpd %xmm2, %xmm0
ucomisd %xmm3, %xmm0
movq %r15, %rcx
ja 0x1aac
incq %r12
addq $0x8, %r15
cmpq $0x5, %r12
jne 0x1a94
jmp 0x1bb5
movq %r15, %rcx
jmp 0x1aac
movq -0xb0(%rbp), %rdx
incq %rdx
addq $0x5, -0x48(%rbp)
movq -0xb8(%rbp), %r15
addq $0x28, %r15
addq $0x28, -0x50(%rbp)
cmpq $0x5, %rdx
movq -0x98(%rbp), %rdi
movq -0xa0(%rbp), %r8
jne 0x1a59
incq %r8
movq -0x80(%rbp), %rdx
addq $0x19, %rdx
movl $0xc8, %eax
movq -0x88(%rbp), %r15
addq %rax, %r15
movq -0x90(%rbp), %rcx
addq %rax, %rcx
cmpq $0x5, %r8
jne 0x1a23
incq %rdi
movq -0x70(%rbp), %rax
addq $0x7d, %rax
movl $0x3e8, %ecx            # imm = 0x3E8
movq -0x60(%rbp), %r15
addq %rcx, %r15
movq -0x68(%rbp), %rdx
addq %rcx, %rdx
movq %rdx, %rcx
cmpq $0x5, %rdi
jne 0x1a02
movq -0x38(%rbp), %rdi
callq 0x10a0
movq -0x30(%rbp), %rdi
callq 0x10a0
movq %r13, %rdi
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
leaq 0xc973(%rip), %rdi      # 0xe5ea
callq 0x1070
movl $0x1, %edi
callq 0x1200
leaq 0xc48c(%rip), %rdi      # 0xe119
jmp 0x1c96
leaq 0xc49f(%rip), %rdi      # 0xe135
movq %r14, %rsi
xorl %eax, %eax
callq 0x10c0
jmp 0x1c7c