// File: 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:
subq $0x2f8, %rsp            # imm = 0x2F8
movq %rdi, 0x88(%rsp)
movq %rdi, 0x90(%rsp)
leaq 0xf0(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0x2230
leaq 0xd0(%rsp), %rdi
callq 0x2280
leaq 0xb0(%rsp), %rdi
callq 0x2280
movq 0x98(%rsp), %rdi
leaq 0x1408(%rip), %rsi      # 0xd22d
movl $0x8, %edx
callq 0x2130
jmp 0xbe31
leaq 0xf0(%rsp), %rdi
callq 0x2300
movb %al, 0x87(%rsp)
jmp 0xbe47
movb 0x87(%rsp), %al
testb $0x1, %al
jne 0xbe54
jmp 0xbec3
movq 0x7175(%rip), %rdi      # 0x12fd0
leaq 0x13d5(%rip), %rsi      # 0xd237
callq 0x21e0
movq %rax, 0x78(%rsp)
jmp 0xbe6e
movq 0x78(%rsp), %rdi
movq 0x713e(%rip), %rsi      # 0x12fb8
callq 0x2210
jmp 0xbe81
jmp 0xbefa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x2120
leaq 0xd0(%rsp), %rdi
callq 0x2120
leaq 0xf0(%rsp), %rdi
callq 0x2070
jmp 0xc17f
movq 0x7106(%rip), %rdi      # 0x12fd0
leaq 0x137b(%rip), %rsi      # 0xd24c
callq 0x21e0
movq %rax, 0x70(%rsp)
jmp 0xbedd
movq 0x70(%rsp), %rdi
movq 0x70cf(%rip), %rsi      # 0x12fb8
callq 0x2210
jmp 0xbef0
movl $0x1, %edi
callq 0x2240
jmp 0xbefc
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x2260
movq %rax, 0x68(%rsp)
jmp 0xbf18
movq 0x68(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x2260
movq %rax, 0x60(%rsp)
jmp 0xbf31
movq 0x60(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2250
movb %al, 0x5f(%rsp)
jmp 0xbf4b
movb 0x5f(%rsp), %al
testb $0x1, %al
jne 0xbf58
jmp 0xc148
movq 0x7071(%rip), %rdi      # 0x12fd0
leaq 0xd0(%rsp), %rsi
callq 0x21b0
movq %rax, 0x50(%rsp)
jmp 0xbf73
movq 0x50(%rsp), %rdi
leaq 0x12e6(%rip), %rsi      # 0xd265
callq 0x21e0
movq %rax, 0x48(%rsp)
jmp 0xbf8b
movq 0x48(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x21b0
movq %rax, 0x40(%rsp)
jmp 0xbfa4
movq 0x40(%rsp), %rdi
movq 0x7008(%rip), %rsi      # 0x12fb8
callq 0x2210
jmp 0xbfb7
leaq 0x10a0(%rip), %rsi      # 0xd05e
leaq 0xd0(%rsp), %rdi
callq 0xc190
movb %al, 0x3f(%rsp)
jmp 0xbfd1
movb 0x3f(%rsp), %al
testb $0x1, %al
jne 0xbfdb
jmp 0xc005
xorl %eax, %eax
movl %eax, %esi
leaq 0xb0(%rsp), %rdi
movl $0xa, %edx
callq 0xc1c0
movl %eax, 0x38(%rsp)
jmp 0xbff7
movq 0x88(%rsp), %rax
movl 0x38(%rsp), %ecx
movl %ecx, (%rax)
leaq 0x1055(%rip), %rsi      # 0xd061
leaq 0xd0(%rsp), %rdi
callq 0xc190
movb %al, 0x37(%rsp)
jmp 0xc01f
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0xc029
jmp 0xc054
xorl %eax, %eax
movl %eax, %esi
leaq 0xb0(%rsp), %rdi
movl $0xa, %edx
callq 0xc1c0
movl %eax, 0x30(%rsp)
jmp 0xc045
movq 0x88(%rsp), %rax
movl 0x30(%rsp), %ecx
movl %ecx, 0x4(%rax)
leaq 0x120c(%rip), %rsi      # 0xd267
leaq 0xd0(%rsp), %rdi
callq 0xc190
movb %al, 0x2f(%rsp)
jmp 0xc06e
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0xc078
jmp 0xc0a3
xorl %eax, %eax
movl %eax, %esi
leaq 0xb0(%rsp), %rdi
movl $0xa, %edx
callq 0xc1c0
movl %eax, 0x28(%rsp)
jmp 0xc094
movq 0x88(%rsp), %rax
movl 0x28(%rsp), %ecx
movl %ecx, 0x8(%rax)
leaq 0x11c0(%rip), %rsi      # 0xd26a
leaq 0xd0(%rsp), %rdi
callq 0xc190
movb %al, 0x27(%rsp)
jmp 0xc0bd
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0xc0c7
jmp 0xc0f3
xorl %eax, %eax
movl %eax, %esi
leaq 0xb0(%rsp), %rdi
callq 0xc210
vmovsd %xmm0, 0x18(%rsp)
jmp 0xc0e0
movq 0x88(%rsp), %rax
vmovsd 0x18(%rsp), %xmm0
vmovsd %xmm0, 0x10(%rax)
leaq 0x1175(%rip), %rsi      # 0xd26f
leaq 0xd0(%rsp), %rdi
callq 0xc190
movb %al, 0x17(%rsp)
jmp 0xc10d
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0xc117
jmp 0xc143
xorl %eax, %eax
movl %eax, %esi
leaq 0xb0(%rsp), %rdi
callq 0xc210
vmovsd %xmm0, 0x8(%rsp)
jmp 0xc130
movq 0x88(%rsp), %rax
vmovsd 0x8(%rsp), %xmm0
vmovsd %xmm0, 0x18(%rax)
jmp 0xbefc
leaq 0xb0(%rsp), %rdi
callq 0x2120
leaq 0xd0(%rsp), %rdi
callq 0x2120
leaq 0xf0(%rsp), %rdi
callq 0x2070
movq 0x90(%rsp), %rax
addq $0x2f8, %rsp            # imm = 0x2F8
retq
movq 0xa8(%rsp), %rdi
callq 0x2350
nopl (%rax)