// File: /workspace/github_c_makefile_star2_O0/jiqingxiaoxi[P]RPA/RPA.c
// Function: getStack
void getStack(double stackEntropies[],double stackEnthalpies[], 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,"stack.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,"stack.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) //N 
                                        {
                                                stackEntropies[i*125+ii*25+j*5+jj] = -1.0;
                                                stackEnthalpies[i*125+ii*25+j*5+jj]=1.0*INFINITY;
                                        }
                                        else 
                                        {
                                                if(fgets(line,20,sFile)==NULL)
                                                {
                                                        printf("Error! When read parameters in getStack function!\n");
                                                        exit(1);
                                                }
                                                if(strncmp(line, "inf", 3)==0)
                                                        stackEntropies[i*125+ii*25+j*5+jj]=1.0*INFINITY;
                                                else
                                                        stackEntropies[i*125+ii*25+j*5+jj] = atof(line);

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

                                                if (fabs(stackEntropies[i*125+ii*25+j*5+jj])>999999999 ||fabs(stackEnthalpies[i*125+ii*25+j*5+jj])>999999999) 
                                                {
                                                        stackEntropies[i*125+ii*25+j*5+jj] = -1.0;
                                                        stackEnthalpies[i*125+ii*25+j*5+jj] =1.0*INFINITY;
                                                }
                                        }
                                }
                        }
                }
        }
        fclose(sFile);
        fclose(hFile);
        free(line);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x10a0
addq $0x14, %rax
movl %eax, -0x1c(%rbp)
movslq -0x1c(%rbp), %rdi
callq 0x1160
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movslq -0x1c(%rbp), %rdx
xorl %esi, %esi
callq 0x10e0
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1050
movq -0x40(%rbp), %rdi
leaq 0x15b78(%rip), %rsi     # 0x17210
callq 0x11b0
movq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x1180
cmpl $-0x1, %eax
jne 0x16c9
movq -0x40(%rbp), %rsi
leaq 0x15b61(%rip), %rdi     # 0x17219
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movq -0x40(%rbp), %rdi
leaq 0x16298(%rip), %rsi     # 0x1796c
callq 0x1190
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1700
movq -0x40(%rbp), %rsi
leaq 0x15b46(%rip), %rdi     # 0x17235
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movq -0x40(%rbp), %rdi
movslq -0x1c(%rbp), %rdx
xorl %esi, %esi
callq 0x10e0
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1050
movq -0x40(%rbp), %rdi
leaq 0x15c1a(%rip), %rsi     # 0x17341
callq 0x11b0
movq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x1180
cmpl $-0x1, %eax
jne 0x1758
movq -0x40(%rbp), %rsi
leaq 0x15ad2(%rip), %rdi     # 0x17219
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movq -0x40(%rbp), %rdi
leaq 0x16209(%rip), %rsi     # 0x1796c
callq 0x1190
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x178f
movq -0x40(%rbp), %rsi
leaq 0x15ab7(%rip), %rdi     # 0x17235
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movq -0x40(%rbp), %rdi
callq 0x1030
movl $0x14, %edi
callq 0x1160
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x10e0
movl $0x0, -0x1c(%rbp)
cmpl $0x5, -0x1c(%rbp)
jge 0x1a9b
movl $0x0, -0x24(%rbp)
cmpl $0x5, -0x24(%rbp)
jge 0x1a8b
movl $0x0, -0x20(%rbp)
cmpl $0x5, -0x20(%rbp)
jge 0x1a7b
movl $0x0, -0x28(%rbp)
cmpl $0x5, -0x28(%rbp)
jge 0x1a6b
cmpl $0x4, -0x1c(%rbp)
je 0x1812
cmpl $0x4, -0x20(%rbp)
je 0x1812
cmpl $0x4, -0x24(%rbp)
je 0x1812
cmpl $0x4, -0x28(%rbp)
jne 0x1865
movq -0x8(%rbp), %rax
imull $0x7d, -0x1c(%rbp), %ecx
imull $0x19, -0x24(%rbp), %edx
addl %edx, %ecx
imull $0x5, -0x20(%rbp), %edx
addl %edx, %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
movsd 0x1590c(%rip), %xmm0    # 0x17140
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
imull $0x7d, -0x1c(%rbp), %ecx
imull $0x19, -0x24(%rbp), %edx
addl %edx, %ecx
imull $0x5, -0x20(%rbp), %edx
addl %edx, %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
movsd 0x158d5(%rip), %xmm0    # 0x17130
movsd %xmm0, (%rax,%rcx,8)
jmp 0x1a5b
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rdx
movl $0x14, %esi
callq 0x1110
cmpq $0x0, %rax
jne 0x1895
leaq 0x159d1(%rip), %rdi     # 0x17255
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movq -0x40(%rbp), %rdi
leaq 0x15968(%rip), %rsi     # 0x17208
movl $0x3, %edx
callq 0x1040
cmpl $0x0, %eax
jne 0x18d8
movq -0x8(%rbp), %rax
imull $0x7d, -0x1c(%rbp), %ecx
imull $0x19, -0x24(%rbp), %edx
addl %edx, %ecx
imull $0x5, -0x20(%rbp), %edx
addl %edx, %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
movsd 0x1585f(%rip), %xmm0    # 0x17130
movsd %xmm0, (%rax,%rcx,8)
jmp 0x1900
movq -0x40(%rbp), %rdi
callq 0x1080
movq -0x8(%rbp), %rax
imull $0x7d, -0x1c(%rbp), %ecx
imull $0x19, -0x24(%rbp), %edx
addl %edx, %ecx
imull $0x5, -0x20(%rbp), %edx
addl %edx, %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rdx
movl $0x14, %esi
callq 0x1110
cmpq $0x0, %rax
jne 0x1930
leaq 0x15936(%rip), %rdi     # 0x17255
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11c0
movq -0x40(%rbp), %rdi
leaq 0x158cd(%rip), %rsi     # 0x17208
movl $0x3, %edx
callq 0x1040
cmpl $0x0, %eax
jne 0x1973
movq -0x10(%rbp), %rax
imull $0x7d, -0x1c(%rbp), %ecx
imull $0x19, -0x24(%rbp), %edx
addl %edx, %ecx
imull $0x5, -0x20(%rbp), %edx
addl %edx, %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
movsd 0x157c4(%rip), %xmm0    # 0x17130
movsd %xmm0, (%rax,%rcx,8)
jmp 0x199b
movq -0x40(%rbp), %rdi
callq 0x1080
movq -0x10(%rbp), %rax
imull $0x7d, -0x1c(%rbp), %ecx
imull $0x19, -0x24(%rbp), %edx
addl %edx, %ecx
imull $0x5, -0x20(%rbp), %edx
addl %edx, %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
imull $0x7d, -0x1c(%rbp), %ecx
imull $0x19, -0x24(%rbp), %edx
addl %edx, %ecx
imull $0x5, -0x20(%rbp), %edx
addl %edx, %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x1582f(%rip), %xmm1    # 0x171f0
pand %xmm1, %xmm0
movsd 0x1576b(%rip), %xmm1    # 0x17138
ucomisd %xmm1, %xmm0
ja 0x1a0b
movq -0x10(%rbp), %rax
imull $0x7d, -0x1c(%rbp), %ecx
imull $0x19, -0x24(%rbp), %edx
addl %edx, %ecx
imull $0x5, -0x20(%rbp), %edx
addl %edx, %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x157f7(%rip), %xmm1    # 0x171f0
pand %xmm1, %xmm0
movsd 0x15733(%rip), %xmm1    # 0x17138
ucomisd %xmm1, %xmm0
jbe 0x1a59
movq -0x8(%rbp), %rax
imull $0x7d, -0x1c(%rbp), %ecx
imull $0x19, -0x24(%rbp), %edx
addl %edx, %ecx
imull $0x5, -0x20(%rbp), %edx
addl %edx, %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
movsd 0x15713(%rip), %xmm0    # 0x17140
movsd %xmm0, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
imull $0x7d, -0x1c(%rbp), %ecx
imull $0x19, -0x24(%rbp), %edx
addl %edx, %ecx
imull $0x5, -0x20(%rbp), %edx
addl %edx, %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
movsd 0x156dc(%rip), %xmm0    # 0x17130
movsd %xmm0, (%rax,%rcx,8)
jmp 0x1a5b
jmp 0x1a5d
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x17f0
jmp 0x1a6d
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x17df
jmp 0x1a7d
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x17ce
jmp 0x1a8d
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x17bd
movq -0x30(%rbp), %rdi
callq 0x1090
movq -0x38(%rbp), %rdi
callq 0x1090
movq -0x40(%rbp), %rdi
callq 0x1030
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)