// File: /workspace/github_cpp_makefile_star2_O2/chfeder[P]turbulence_generator/./TurbGen.h
// Function: TurbGen::read_from_parameter_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::vector<double> read_from_parameter_file(std::string search, std::string type) {
        // ******************************************************
        // parse each line in turbulence generator 'parameter_file' and search for 'search'
        // at the beginning of each line; if 'search' is found return double of value after '='
        // type: 'i' for int, 'd' for double return type void *ret
        // ******************************************************
        if (verbose > 1) TurbGen_printf(FuncSig(__func__)+"entering.\n");
        std::vector<double> ret; // return vector object
        FILE * fp;
        char * line = NULL;
        size_t len = 0;
        ssize_t read;
        fp = fopen(parameter_file.c_str(), "r");
        std::string msg = ClassSignature+"ERROR: could not open parameter file '%s'\n";
        if (fp == NULL) { printf(msg.c_str(), parameter_file.c_str()); exit(-1); }
        bool found = false;
        while ((read = getline(&line, &len, fp)) != -1) {
            if (strncmp(line, search.c_str(), strlen(search.c_str())) == 0) {
                if (verbose > 1) TurbGen_printf("line = '%s'\n", line);
                char * substr1 = strstr(line, "="); // extract everything after (and including) '='
                if (verbose > 1) TurbGen_printf("substr1 = '%s'\n", substr1);
                char * substr2 = strstr(substr1, "!"); // deal with comment '! ...'
                char * substr3 = strstr(substr1, "#"); // deal with comment '# ...'
                int end_index = strlen(substr1);
                if ((substr2 != NULL) && (substr3 != NULL)) { // if comment is present, reduce end_index
                    end_index -= std::max(strlen(substr2),strlen(substr3));
                } else { // if comment is present, reduce end_index
                    if (substr2 != NULL) end_index -= strlen(substr2);
                    if (substr3 != NULL) end_index -= strlen(substr3);
                }
                char dest[100]; memset(dest, '\0', sizeof(dest));
                strncpy(dest, substr1+1, end_index-1);
                if (verbose > 1) TurbGen_printf("dest = '%s'\n", dest);
                if ((type == "i") || (type == "1i")) {
                    ret.resize(1); ret[0] = double(atoi(dest));
                }
                if ((type == "d") || (type == "1d")) {
                    ret.resize(1); ret[0] = double(atof(dest));
                }
                if ((type == "2d") || (type == "3d")) {
                    int ncmp;
                    std::stringstream dummystream;
                    dummystream << type[0]; dummystream >> ncmp; dummystream.clear();
                    ret.resize(ncmp);
                    if (verbose > 1) TurbGen_printf("n = %i\n", ncmp);
                    std::string cmpstr = dest;
                    int cnt = 0; // count the number of ','
                    for (size_t offset = cmpstr.find(","); offset != std::string::npos; offset = cmpstr.find(",", offset+1)) ++cnt;
                    if (verbose > 1) TurbGen_printf("cnt = %i\n", cnt);
                    if ((cnt != 0) && (cnt != ncmp-1)) { // error check
                        std::string msg = ClassSignature+"ERROR: parameter '%s' specifies %i components, which does not match actual number of components: %i\n";
                        printf(msg.c_str(), search.c_str(), cnt+1, ncmp);
                        exit(-1);
                    }
                    for (int d=0; d<ncmp; d++) {
                        std::string substr = cmpstr; // copy into substr in case no commas provided
                        if (cnt == ncmp-1) { // if user has specified ncmp components; else copy the same value into each component
                            substr = cmpstr.substr(0, cmpstr.find(",")); // extract substring before first ','
                            cmpstr = cmpstr.substr(cmpstr.find(",")+1, cmpstr.size()-cmpstr.find(",")); // reduce cmpstr to remainder for next loop iter
                        }
                        if (verbose > 1)TurbGen_printf("substr = '%s'\n", substr.c_str());
                        dummystream << substr; dummystream >> ret[d]; dummystream.clear(); // copy into ret
                    }
                }
                found = true;
            }
            if (found) break;
        }
        fclose(fp);
        if (line) free(line);
        if (!found) {
            std::string msg = ClassSignature+"ERROR: requested parameter '%s' not found in file '%s'\n";
            printf(msg.c_str(), search.c_str(), parameter_file.c_str());
            exit(-1);
        }
        if (verbose > 1) TurbGen_printf(FuncSig(__func__)+"exiting.\n");
        return ret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rcx, %rbp
movq %rdx, %r12
movq %rdi, 0x18(%rsp)
movq %rsi, 0x8(%rsp)
cmpl $0x2, (%rsi)
jl 0x6785
leaq 0x5fb6(%rip), %rsi      # 0xc6b3
leaq 0x190(%rsp), %rdi
leaq 0x1d0(%rsp), %rdx
callq 0x3e22
leaq 0x5da6(%rip), %rdx      # 0xc4bf
leaq 0x260(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x6693
leaq 0x5da6(%rip), %rdx      # 0xc4db
leaq 0x1b0(%rsp), %rdi
leaq 0x260(%rsp), %rsi
callq 0x6674
leaq 0x1b0(%rsp), %rsi
movq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x65ac
leaq 0x1b0(%rsp), %rdi
callq 0x3120
leaq 0x260(%rsp), %rdi
callq 0x3120
leaq 0x190(%rsp), %rdi
callq 0x3120
xorpd %xmm0, %xmm0
movq 0x18(%rsp), %rax
andq $0x0, 0x10(%rax)
movupd %xmm0, (%rax)
andq $0x0, 0x20(%rsp)
andq $0x0, 0x68(%rsp)
movq 0x8(%rsp), %rbx
movq 0x28(%rbx), %rdi
leaq 0x59c5(%rip), %rsi      # 0xc178
callq 0x32e0
movq %rax, %r14
addq $0x8, %rbx
leaq 0x5f06(%rip), %rdx      # 0xc6cc
leaq 0x170(%rsp), %rdi
movq %rbx, %rsi
callq 0x6693
movq %rbx, 0x28(%rsp)
movq %r14, 0x30(%rsp)
testq %r14, %r14
je 0x6e91
leaq 0x20(%rsp), %rbx
leaq 0x68(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movq 0x30(%rsp), %rdx
callq 0x3330
cmpq $-0x1, %rax
je 0x6e40
movq 0x20(%rsp), %r15
movq (%r12), %r13
movq %r13, %rdi
callq 0x3110
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x3140
testl %eax, %eax
jne 0x67f3
movq 0x8(%rsp), %rax
cmpl $0x2, (%rax)
jl 0x688d
leaq 0x5eb6(%rip), %rsi      # 0xc6f7
leaq 0x150(%rsp), %rdi
leaq 0x260(%rsp), %rdx
callq 0x3e22
movq 0x20(%rsp), %rdx
leaq 0x150(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x65ac
leaq 0x150(%rsp), %rdi
callq 0x3120
cmpl $0x2, (%rbx)
setge %r14b
movq 0x20(%rsp), %r15
jmp 0x6890
xorl %r14d, %r14d
pushq $0x3d
popq %rsi
movq %r15, %rdi
callq 0x30e0
movq %rax, %rbx
testb %r14b, %r14b
je 0x68e3
leaq 0x5e5a(%rip), %rsi      # 0xc704
leaq 0x130(%rsp), %rdi
leaq 0x260(%rsp), %rdx
callq 0x3e22
leaq 0x130(%rsp), %rsi
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x65ac
leaq 0x130(%rsp), %rdi
callq 0x3120
pushq $0x21
popq %rsi
movq %rbx, %rdi
callq 0x30e0
movq %rax, %r13
pushq $0x23
popq %rsi
movq %rbx, %rdi
callq 0x30e0
movq %rax, %r15
movq %rbx, %rdi
callq 0x3110
movq %rax, %r14
testq %r13, %r13
setne %al
testq %r15, %r15
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x6939
movq %r13, %rdi
callq 0x3110
movq %rax, %r13
movq %r15, %rdi
callq 0x3110
cmpq %rax, %r13
cmovaq %r13, %rax
jmp 0x6956
testq %r13, %r13
je 0x6949
movq %r13, %rdi
callq 0x3110
subq %rax, %r14
testq %r15, %r15
je 0x6959
movq %r15, %rdi
callq 0x3110
subq %rax, %r14
xorpd %xmm0, %xmm0
leaq 0x1d0(%rsp), %rdi
movapd %xmm0, 0x50(%rdi)
movapd %xmm0, 0x40(%rdi)
movapd %xmm0, 0x30(%rdi)
movapd %xmm0, 0x20(%rdi)
movapd %xmm0, 0x10(%rdi)
andl $0x0, 0x60(%rdi)
movapd %xmm0, (%rdi)
incq %rbx
decl %r14d
movslq %r14d, %rdx
movq %rbx, %rsi
callq 0x3160
movq 0x8(%rsp), %rax
cmpl $0x2, (%rax)
jl 0x69e6
leaq 0x5d6c(%rip), %rsi      # 0xc714
leaq 0x110(%rsp), %rdi
leaq 0x260(%rsp), %rdx
callq 0x3e22
leaq 0x110(%rsp), %rsi
leaq 0x1d0(%rsp), %rdx
movq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x65ac
leaq 0x110(%rsp), %rdi
callq 0x3120
leaq 0x5ff6(%rip), %rsi      # 0xc9e3
movq %rbp, %rdi
callq 0x93f9
testb %al, %al
jne 0x6a0c
leaq 0x5d21(%rip), %rsi      # 0xc721
movq %rbp, %rdi
callq 0x93f9
testb %al, %al
je 0x6a34
pushq $0x1
popq %rsi
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x9406
leaq 0x1d0(%rsp), %rdi
callq 0x33e0
cvtsi2sd %eax, %xmm0
movq (%rbx), %rax
movsd %xmm0, (%rax)
leaq 0x5cea(%rip), %rsi      # 0xc725
movq %rbp, %rdi
callq 0x93f9
testb %al, %al
jne 0x6a5a
leaq 0x5cd6(%rip), %rsi      # 0xc724
movq %rbp, %rdi
callq 0x93f9
testb %al, %al
je 0x6a7e
pushq $0x1
popq %rsi
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x9406
leaq 0x1d0(%rsp), %rdi
callq 0x3320
movq (%rbx), %rax
movsd %xmm0, (%rax)
leaq 0x5ca2(%rip), %rsi      # 0xc727
movq %rbp, %rdi
callq 0x93f9
testb %al, %al
jne 0x6aa8
leaq 0x5c92(%rip), %rsi      # 0xc72a
movq %rbp, %rdi
callq 0x93f9
testb %al, %al
je 0x6d6b
leaq 0x260(%rsp), %rdi
callq 0x31c0
leaq 0x270(%rsp), %rdi
movq (%rbp), %rax
movsbl (%rax), %esi
callq 0x32d0
leaq 0x260(%rsp), %rbp
leaq 0x14(%rsp), %rsi
movq %rbp, %rdi
callq 0x31a0
movq 0x260(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
xorl %esi, %esi
callq 0x3440
movslq 0x14(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x9406
movq 0x8(%rsp), %rax
cmpl $0x2, (%rax)
jl 0x6b4b
leaq 0x5c19(%rip), %rsi      # 0xc72d
leaq 0xf0(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x3e22
movl 0x14(%rsp), %edx
leaq 0xf0(%rsp), %rsi
movq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x65ac
leaq 0xf0(%rsp), %rdi
callq 0x3120
leaq 0x48(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x3e22
pushq $0x1
popq %rbx
xorl %eax, %eax
leaq 0x5bc7(%rip), %r14      # 0xc735
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x34f0
cmpq $-0x1, %rax
je 0x6b8e
incq %rax
incl %ebx
jmp 0x6b73
movq 0x8(%rsp), %rax
cmpl $0x1, (%rax)
jle 0x6bd5
leaq 0x5b98(%rip), %rsi      # 0xc737
leaq 0xd0(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x3e22
leal -0x1(%rbx), %edx
leaq 0xd0(%rsp), %rsi
movq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x65ac
leaq 0xd0(%rsp), %rdi
callq 0x3120
cmpl $0x1, %ebx
movq %rbx, 0x38(%rsp)
je 0x6be9
cmpl %ebx, 0x14(%rsp)
jne 0x6eab
leaq 0x70(%rsp), %r13
leaq 0x5b40(%rip), %r12      # 0xc735
leaq 0x3e8(%rsp), %r14
movq $0x0, 0x28(%rsp)
xorl %ecx, %ecx
movslq 0x14(%rsp), %rax
movq %rcx, 0x40(%rsp)
cmpq %rax, %rcx
jge 0x6d54
movq %r13, %rdi
leaq 0x48(%rsp), %rsi
callq 0x3380
cmpl %ebx, 0x14(%rsp)
jne 0x6cbe
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x34f0
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x32a0
movq %r13, %rdi
movq %r14, %rsi
callq 0x3310
movq %r14, %rdi
callq 0x3120
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x34f0
movq %r12, %rsi
leaq 0x1(%rax), %rbx
movq 0x50(%rsp), %rbp
movq %r15, %rdi
xorl %edx, %edx
callq 0x34f0
subq %rax, %rbp
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x32a0
movq %r15, %rdi
movq %r14, %rsi
callq 0x3310
movq %r14, %rdi
callq 0x3120
leaq 0x260(%rsp), %rbp
movq 0x38(%rsp), %rbx
movq 0x8(%rsp), %rax
cmpl $0x2, (%rax)
jl 0x6cfe
leaq 0x240(%rsp), %r15
movq %r15, %rdi
leaq 0x5acc(%rip), %rsi      # 0xc7a6
movq %r14, %rdx
callq 0x3e22
movq 0x70(%rsp), %rdx
movq 0x8(%rsp), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x65ac
movq %r15, %rdi
callq 0x3120
leaq 0x270(%rsp), %rdi
movq %r13, %rsi
callq 0x3240
movq 0x18(%rsp), %rax
movq (%rax), %rsi
addq 0x28(%rsp), %rsi
movq %rbp, %rdi
callq 0x31b0
movq 0x260(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
xorl %esi, %esi
callq 0x3440
movq %r13, %rdi
callq 0x3120
movq 0x40(%rsp), %rcx
incq %rcx
addq $0x8, 0x28(%rsp)
jmp 0x6c08
leaq 0x48(%rsp), %rdi
callq 0x3120
leaq 0x260(%rsp), %rdi
callq 0x31e0
movq 0x30(%rsp), %rdi
callq 0x3270
movq 0x20(%rsp), %rdi
callq 0x32f0
movq 0x8(%rsp), %rax
cmpl $0x1, (%rax)
jle 0x6e1c
leaq 0x591f(%rip), %rsi      # 0xc6b3
leaq 0x90(%rsp), %rdi
leaq 0x1d0(%rsp), %rdx
callq 0x3e22
leaq 0x570f(%rip), %rdx      # 0xc4bf
leaq 0x260(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6693
leaq 0x58dd(%rip), %rdx      # 0xc6a9
leaq 0xb0(%rsp), %rdi
leaq 0x260(%rsp), %rsi
callq 0x6674
leaq 0xb0(%rsp), %rsi
movq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x65ac
leaq 0xb0(%rsp), %rdi
callq 0x3120
leaq 0x260(%rsp), %rdi
callq 0x3120
leaq 0x90(%rsp), %rdi
callq 0x3120
leaq 0x170(%rsp), %rdi
callq 0x3120
movq 0x18(%rsp), %rax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%rsp), %rdi
callq 0x3270
movq 0x20(%rsp), %rdi
callq 0x32f0
leaq 0x595a(%rip), %rdx      # 0xc7b5
leaq 0x260(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x6693
movq 0x260(%rsp), %rdi
movq (%r12), %rsi
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rdx
xorl %eax, %eax
callq 0x3040
pushq $-0x1
popq %rdi
callq 0x3300
movq 0x170(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rsi
xorl %eax, %eax
callq 0x3040
jmp 0x6e89
leaq 0x588f(%rip), %rdx      # 0xc741
leaq 0x70(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x6693
movq 0x70(%rsp), %rdi
movq (%r12), %rsi
movl 0x14(%rsp), %ecx
movq 0x38(%rsp), %rdx
xorl %eax, %eax
callq 0x3040
jmp 0x6e89
jmp 0x6fe1
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
jmp 0x6ff3
jmp 0x6fe1
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
jmp 0x6ffd
jmp 0x6fc2
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x3120
jmp 0x6f20
movq %rax, %rbx
leaq 0x260(%rsp), %rdi
callq 0x3120
jmp 0x6f32
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
jmp 0x6f70
jmp 0x6fe6
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
jmp 0x6f70
jmp 0x6fe6
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
jmp 0x6f70
jmp 0x6fe6
movq %rax, %rbx
leaq 0x150(%rsp), %rdi
callq 0x3120
jmp 0x700f
jmp 0x6fe6
movq %rax, %rbx
leaq 0x1b0(%rsp), %rdi
callq 0x3120
jmp 0x6f91
movq %rax, %rbx
leaq 0x260(%rsp), %rdi
callq 0x3120
jmp 0x6fa3
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x3120
jmp 0x7026
movq %rax, %rbx
jmp 0x7026
jmp 0x6fc2
jmp 0x6fe6
movq %rax, %rbx
jmp 0x701c
jmp 0x6fe6
movq %rax, %rbx
jmp 0x7002
jmp 0x6feb
movq %rax, %rbx
leaq 0x240(%rsp), %rdi
callq 0x3120
jmp 0x6fee
jmp 0x6feb
jmp 0x6feb
jmp 0x6fe6
movq %rax, %rbx
jmp 0x6ff8
movq %rax, %rbx
jmp 0x700f
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x3120
leaq 0x48(%rsp), %rdi
callq 0x3120
leaq 0x260(%rsp), %rdi
callq 0x31e0
leaq 0x170(%rsp), %rdi
callq 0x3120
movq 0x18(%rsp), %rdi
callq 0x539a
movq %rbx, %rdi
callq 0x3470