// File: /workspace/github_cpp_makefile_star2_O1/FR13ndSDP[P]NHT/Parameters.cpp
// Function: Parameters::readParameters(char const*)
int Parameters::readParameters(const char *filename)
{
    stringstream buffer;
    string line;
    string paramName;
    int paramValue_int = 0;
    double paramValue= 0;
    string paramStr;

    ifstream fin(filename);
    if (!fin.good())
    {
        string msg("parameters file not found");
        msg.append(filename);
        throw runtime_error(msg);
    }
    while (fin.good())
    {
        getline(fin, line);
        if (line[0] != '#')
        {
            buffer << line; //order is important
            buffer >> paramName;
            if (paramName.compare("unSteady") == 0)
            {
                buffer >> paramValue_int;
                uS = paramValue_int;
            }
            else if (paramName.compare("Boundary_L") == 0)
            {
                buffer >> paramValue_int;
                B_L = paramValue_int;
            }
            else if (paramName.compare("Boundary_R") == 0)
            {
                buffer >> paramValue_int;
                B_R = paramValue_int;
            }
            else if (paramName.compare("Q_L") == 0)
            {
                buffer >> paramValue;
                Q_L = paramValue;
            }
            else if (paramName.compare("Q_R") == 0)
            {
                buffer >> paramValue_int;
                Q_R = paramValue_int;
            }
            else if (paramName.compare("solver") == 0)
            {
                buffer >> paramStr;
                solver = paramStr;
            }
            else if (paramName.compare("L") == 0)
            {
                buffer >> paramValue;
                L = paramValue;
            }
            else if (paramName.compare("N") == 0)
            {
                buffer >> paramValue_int;
                N = paramValue_int;
            }
            else if (paramName.compare("dt") == 0)
            {
                buffer >> paramValue;
                dt = paramValue;
            }
            else if (paramName.compare("A1") == 0)
            {
                buffer >> paramValue;
                A1 = paramValue;
            }
            else if (paramName.compare("A2") == 0)
            {
                buffer >> paramValue;
                A2 = paramValue;
            }
            else if (paramName.compare("RHOC") == 0)
            {
                buffer >> paramValue;
                RHOC = paramValue;
            }
            else if (paramName.compare("K") == 0)
            {
                buffer >> paramValue;
                K = paramValue;
            }
            else if (paramName.compare("TA") == 0)
            {
                buffer >> paramValue;
                TA = paramValue;
            }
            else if (paramName.compare("TB") == 0)
            {
                buffer >> paramValue;
                TB = paramValue;
            }
            else if (paramName.compare("P") == 0)
            {
                buffer >> paramValue;
                P = paramValue;
            }
            else
            {
                throw runtime_error(string("unknown parameter: ").append(paramName));
            }
        }
    }
    fin.close();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x450(%rbp), %rdi
callq 0x2120
leaq -0x88(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x68(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movl $0x0, -0x2c(%rbp)
movq %rax, -0x38(%rbp)
leaq -0xa8(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x2c8(%rbp), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x22a0
movq -0x2c8(%rbp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, -0x2a8(%rbp,%rax)
jne 0x3ab8
movq -0x2c8(%rbp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, -0x2a8(%rbp,%rax)
jne 0x3a10
leaq (%rax,%rbp), %rdi
addq $-0x2c8, %rdi           # imm = 0xFD38
leaq 0x68(%rbx), %rax
movq %rax, -0xc0(%rbp)
leaq -0x2c8(%rbp), %r12
leaq -0x98(%rbp), %r13
leaq -0x450(%rbp), %r15
leaq -0x78(%rbp), %r14
movl $0xa, %esi
callq 0x21a0
movsbl %al, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x22b0
movq -0x98(%rbp), %rsi
cmpb $0x23, (%rsi)
je 0x39f0
movq -0x90(%rbp), %rdx
leaq -0x440(%rbp), %rdi
callq 0x21d0
movq %r15, %rdi
movq %r14, %rsi
callq 0x21e0
movq %r14, %rdi
leaq 0x1a6f(%rip), %rsi      # 0x515f
callq 0x2070
testl %eax, %eax
je 0x3871
movq %r14, %rdi
leaq 0x1a61(%rip), %rsi      # 0x5168
callq 0x2070
testl %eax, %eax
je 0x3888
movq %r14, %rdi
leaq 0x1a55(%rip), %rsi      # 0x5173
callq 0x2070
testl %eax, %eax
je 0x389f
movq %r14, %rdi
leaq 0x1a49(%rip), %rsi      # 0x517e
callq 0x2070
testl %eax, %eax
je 0x38b6
movq %r14, %rdi
leaq 0x1a36(%rip), %rsi      # 0x5182
callq 0x2070
testl %eax, %eax
je 0x38d1
movq %r14, %rdi
leaq 0x1a23(%rip), %rsi      # 0x5186
callq 0x2070
testl %eax, %eax
je 0x38ef
movq %r14, %rdi
leaq 0x1a06(%rip), %rsi      # 0x5180
callq 0x2070
testl %eax, %eax
je 0x3916
movq %r14, %rdi
leaq 0x19fc(%rip), %rsi      # 0x518d
callq 0x2070
testl %eax, %eax
je 0x3931
movq %r14, %rdi
leaq 0x19e7(%rip), %rsi      # 0x518f
callq 0x2070
testl %eax, %eax
je 0x3947
movq %r14, %rdi
leaq 0x19d3(%rip), %rsi      # 0x5192
callq 0x2070
testl %eax, %eax
je 0x3962
movq %r14, %rdi
leaq 0x19bf(%rip), %rsi      # 0x5195
callq 0x2070
testl %eax, %eax
je 0x397a
movq %r14, %rdi
leaq 0x19ab(%rip), %rsi      # 0x5198
callq 0x2070
testl %eax, %eax
je 0x3992
movq %r14, %rdi
leaq 0x1999(%rip), %rsi      # 0x519d
callq 0x2070
testl %eax, %eax
je 0x39aa
movq %r14, %rdi
leaq 0x1984(%rip), %rsi      # 0x519f
callq 0x2070
testl %eax, %eax
je 0x39c2
movq %r14, %rdi
leaq 0x1970(%rip), %rsi      # 0x51a2
callq 0x2070
testl %eax, %eax
je 0x39da
movq %r14, %rdi
leaq 0x195c(%rip), %rsi      # 0x51a5
callq 0x2070
testl %eax, %eax
jne 0x3b14
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
callq 0x20f0
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x50(%rbx)
jmp 0x39f0
movq %r15, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x20e0
movl -0x2c(%rbp), %eax
movl %eax, 0x4(%rbx)
jmp 0x39f0
movq %r15, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x20e0
movl -0x2c(%rbp), %eax
movl %eax, 0x8(%rbx)
jmp 0x39f0
movq %r15, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x20e0
movl -0x2c(%rbp), %eax
movl %eax, 0xc(%rbx)
jmp 0x39f0
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
callq 0x20f0
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x60(%rbx)
jmp 0x39f0
movq %r15, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x20e0
xorps %xmm0, %xmm0
cvtsi2sdl -0x2c(%rbp), %xmm0
movsd %xmm0, 0x58(%rbx)
jmp 0x39f0
movq %r15, %rdi
leaq -0xb8(%rbp), %rsi
callq 0x21e0
movq -0xc0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x20d0
jmp 0x39f0
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
callq 0x20f0
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x18(%rbx)
jmp 0x39f0
movq %r15, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x20e0
movl -0x2c(%rbp), %eax
movl %eax, (%rbx)
jmp 0x39f0
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
callq 0x20f0
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x10(%rbx)
jmp 0x39f0
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
callq 0x20f0
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x20(%rbx)
jmp 0x39f0
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
callq 0x20f0
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x28(%rbx)
jmp 0x39f0
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
callq 0x20f0
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x30(%rbx)
jmp 0x39f0
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
callq 0x20f0
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x38(%rbx)
jmp 0x39f0
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
callq 0x20f0
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x40(%rbx)
jmp 0x39f0
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
callq 0x20f0
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x48(%rbx)
movq -0x2c8(%rbp), %rax
movq -0x18(%rax), %rax
leaq (%rax,%rbp), %rdi
addq $-0x2c8, %rdi           # imm = 0xFD38
cmpl $0x0, 0x20(%rdi)
je 0x36a0
leaq -0x2c8(%rbp), %rdi
callq 0x2050
leaq -0x2c8(%rbp), %rdi
callq 0x2060
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x3a4a
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x3a63
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x3a85
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x21c0
movq 0x3514(%rip), %rsi      # 0x6fa0
leaq -0x450(%rbp), %rdi
callq 0x2150
leaq -0x3d0(%rbp), %rdi
callq 0x2090
xorl %eax, %eax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x48(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x167e(%rip), %rsi      # 0x5145
leaq 0x1690(%rip), %rdx      # 0x515e
leaq -0x58(%rbp), %rdi
callq 0x4084
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0x22c0
movl $0x10, %edi
callq 0x20b0
movq %rax, %r14
leaq -0x58(%rbp), %rsi
movq %rax, %rdi
callq 0x2240
movq 0x34ed(%rip), %rsi      # 0x6ff0
movq 0x34b6(%rip), %rdx      # 0x6fc0
movq %r14, %rdi
callq 0x2270
jmp 0x3b79
movl $0x10, %edi
callq 0x20b0
movq %rax, %r14
leaq -0x48(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x1676(%rip), %rsi      # 0x51a7
leaq 0x1682(%rip), %rdx      # 0x51ba
leaq -0x58(%rbp), %rdi
callq 0x4084
movb $0x1, %r15b
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
leaq -0x58(%rbp), %rdi
callq 0x2080
movq %r14, %rdi
movq %rax, %rsi
callq 0x2240
xorl %r15d, %r15d
movq 0x3486(%rip), %rsi      # 0x6ff0
movq 0x344f(%rip), %rdx      # 0x6fc0
movq %r14, %rdi
callq 0x2270
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x3b99
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x3b99
movq %rax, %rbx
movb $0x1, %r15b
testb %r15b, %r15b
je 0x3bdb
movq %r14, %rdi
callq 0x2140
jmp 0x3bdb
movq %rax, %rbx
movq %r14, %rdi
callq 0x2140
jmp 0x3bb8
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x3bdb
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x3bdb
jmp 0x3bd8
jmp 0x3bd8
movq %rax, %rbx
jmp 0x3be7
movq %rax, %rbx
leaq -0x2c8(%rbp), %rdi
callq 0x2060
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x3c09
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x3c22
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x3c44
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x21c0
movq 0x3355(%rip), %rsi      # 0x6fa0
leaq -0x450(%rbp), %rdi
callq 0x2150
leaq -0x3d0(%rbp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x2280
nop