// File: /workspace/github_cpp_makefile_star2_O2/SneachChea[P]Wolf-Monte-Carlo-Cpp/config.cpp
// Function: get_params()
parameters get_params(){
    ifstream param_file;
    parameters current_param;
    string line;
    string value;
    param_file.open("param.dat", ios::in);

    if(param_file.is_open()){
      cout<<"param.dat file found"<<endl;
    }else{
      cout<<"param.dat file not found"<<endl;
      exit(EXIT_FAILURE);
      return current_param;
    }
    while(param_file >>line>>value){
      cout<<line<<" "<<value<<endl;
      if(line =="L"){ current_param.L = stoi(value);}
      if(line =="Ntrials"){current_param.Ntrials= stoi(value);}
        if(line =="nT"){current_param.nT= stoi(value);}
        if(line =="Tmin"){current_param.Tmin= stod(value);}
        if(line =="Tmax"){current_param.Tmax= stod(value);}

        }
        
    return current_param;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
leaq 0x70(%rsp), %rbx
movq %rdi, 0x18(%rsp)
movq %rbx, %rdi
callq 0x21f0
leaq 0x60(%rsp), %rax
leaq 0x40(%rsp), %rdx
xorl %ecx, %ecx
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb %cl, (%rax)
movb %cl, (%rdx)
leaq 0xad1(%rip), %rsi       # 0x520d
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x2130
leaq 0xe8(%rsp), %rdi
callq 0x2050
testb %al, %al
je 0x492f
movq 0x386d(%rip), %rdi      # 0x7fd0
leaq 0xaad(%rip), %rsi       # 0x5217
callq 0x21c0
movq %rax, %rdi
callq 0x20f0
movq 0x18(%rsp), %rax
leaq 0x50(%rsp), %r15
leaq 0x30(%rsp), %r12
vmovsd 0x10(%rax), %xmm0
movl (%rax), %ecx
movl 0x4(%rax), %esi
movl 0x8(%rax), %edx
movl %ecx, 0x14(%rsp)
movl %esi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
vmovsd %xmm0, 0x20(%rsp)
vmovsd 0x18(%rax), %xmm0
pushq $0xa
popq %r13
leaq 0xa92(%rip), %rbx       # 0x5247
leaq 0xa8e(%rip), %r14       # 0x524a
leaq 0xa8c(%rip), %rbp       # 0x524f
vmovsd %xmm0, 0x28(%rsp)
leaq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0x2220
movq %rax, %rdi
movq %r12, %rsi
callq 0x2220
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x48cd
movq 0x37d6(%rip), %rdi      # 0x7fd0
movq %r15, %rsi
callq 0x2190
leaq 0xa3c(%rip), %rsi       # 0x5245
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x2190
movq %rax, %rdi
callq 0x20f0
leaq 0x80f(%rip), %rsi       # 0x503a
movq %r15, %rdi
callq 0x49b1
testb %al, %al
je 0x4848
movq %r12, %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x49be
movl %eax, 0x14(%rsp)
leaq 0x7ee(%rip), %rsi       # 0x503d
movq %r15, %rdi
callq 0x49b1
testb %al, %al
je 0x486c
movq %r12, %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x49be
movl %eax, 0x10(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x49b1
testb %al, %al
je 0x488c
movq %r12, %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x49be
movl %eax, 0xc(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x49b1
testb %al, %al
je 0x48ab
movq %r12, %rdi
xorl %esi, %esi
callq 0x49da
vmovsd %xmm0, 0x20(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x49b1
testb %al, %al
je 0x47c9
movq %r12, %rdi
xorl %esi, %esi
callq 0x49da
jmp 0x47c3
movq 0x18(%rsp), %rbx
movl 0x10(%rsp), %eax
vmovsd 0x20(%rsp), %xmm0
vmovsd 0x28(%rsp), %xmm1
leaq 0x30(%rsp), %rdi
movl %eax, 0x4(%rbx)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rbx)
movl 0x14(%rsp), %eax
vmovsd %xmm0, 0x10(%rbx)
vmovsd %xmm1, 0x18(%rbx)
movl %eax, (%rbx)
callq 0x20d0
leaq 0x50(%rsp), %rdi
callq 0x20d0
leaq 0x70(%rsp), %rdi
callq 0x2070
movq %rbx, %rax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x369a(%rip), %rdi      # 0x7fd0
leaq 0x8ef(%rip), %rsi       # 0x522c
callq 0x21c0
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rdi
callq 0x2210
jmp 0x4959
movq %rax, %rbx
jmp 0x498b
movq %rax, %rbx
movq 0x18(%rsp), %rax
movl 0x10(%rsp), %ecx
vmovsd 0x20(%rsp), %xmm0
vmovsd 0x28(%rsp), %xmm1
movl %ecx, 0x4(%rax)
movl 0xc(%rsp), %ecx
movl %ecx, 0x8(%rax)
movl 0x14(%rsp), %ecx
vmovsd %xmm0, 0x10(%rax)
vmovsd %xmm1, 0x18(%rax)
movl %ecx, (%rax)
leaq 0x30(%rsp), %rdi
callq 0x20d0
leaq 0x50(%rsp), %rdi
callq 0x20d0
leaq 0x70(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2300