// File: WolfgangLechner[P]StructureAnalysis/parameter.cpp
// Function: CParameter::readParameter(int)
void CParameter::readParameter(int myrank)
{
  char IntStr[80];
  sprintf( IntStr, "input/parameter.%d.txt", myrank);
  ifstream AnfangsFile;
  if (myrank == 0)
  {
    AnfangsFile.open("parameter.txt");
  } else {
    AnfangsFile.open(IntStr);
  }
  string line;
  string::size_type pos;
  int i = 0;
  while (getline(AnfangsFile,line))
  {
    if(line.substr(0, 2).compare("//")!=0)
    {
      pos  = line.find('=');
      if (pos != string::npos)
      {
        this->rawParameter[i].name = line.substr(0, pos );
        this->rawParameter[i].value = line.substr(pos+1, string::npos );
        i += 1;
      } else {if (line.compare("")>0) {cerr << "malformed line in parameterfile :" << line << "\n";}}
    }
  }
  for (int j = 0;j < i;j++)
  {
    if (rawParameter[j].name.compare(PF_NUMBEROFPARTICLES) == 0) {this->nop = atoi(rawParameter[j].value.c_str());}
    if (rawParameter[j].name.compare(PF_BOXX) == 0) {this->boxx = atof(rawParameter[j].value.c_str());}
    if (rawParameter[j].name.compare(PF_BOXY) == 0) {this->boxy = atof(rawParameter[j].value.c_str());}
    if (rawParameter[j].name.compare(PF_BOXZ) == 0) {this->boxz = atof(rawParameter[j].value.c_str());}
    if (rawParameter[j].name.compare(PF_XYZFILE) == 0) {this->xyzFile = rawParameter[j].value;}
    if (rawParameter[j].name.compare(PF_BASEUNIT) == 0) {this->baseunit = atoi(rawParameter[j].value.c_str());}
    if (rawParameter[j].name.compare(PF_NUMBEROFCELLS) == 0) {this->noc = atoi(rawParameter[j].value.c_str());}
    if (rawParameter[j].name.compare(PF_NEIGHBORDISTANCE) == 0) {this->neighbordistance = atof(rawParameter[j].value.c_str());}
  }
  checkParameter();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x360, %rsp            # imm = 0x360
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x318(%rbp)
leaq -0x60(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x12fe(%rip), %rsi      # 0xc6a9
movb $0x0, %al
callq 0x3090
leaq -0x268(%rbp), %rdi
callq 0x32a0
cmpl $0x0, -0xc(%rbp)
jne 0xb3f7
leaq 0x12f5(%rip), %rsi      # 0xc6c0
leaq -0x268(%rbp), %rdi
movl $0x8, %edx
callq 0x3150
jmp 0xb3de
jmp 0xb410
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x270(%rbp)
movl %eax, -0x274(%rbp)
jmp 0xba0a
leaq -0x268(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x8, %edx
callq 0x3150
jmp 0xb40e
jmp 0xb410
leaq -0x298(%rbp), %rdi
callq 0x3340
movl $0x0, -0x2a4(%rbp)
leaq -0x268(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x30a0
movq %rax, -0x320(%rbp)
jmp 0xb442
movq -0x320(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x32f0
movb %al, -0x321(%rbp)
jmp 0xb460
movb -0x321(%rbp), %al
testb $0x1, %al
jne 0xb46f
jmp 0xb643
xorl %eax, %eax
movl %eax, %edx
leaq -0x2c8(%rbp), %rdi
leaq -0x298(%rbp), %rsi
movl $0x2, %ecx
callq 0x3250
jmp 0xb48d
leaq -0x2c8(%rbp), %rdi
leaq 0x1233(%rip), %rsi      # 0xc6ce
callq 0x3100
movl %eax, -0x328(%rbp)
leaq -0x2c8(%rbp), %rdi
callq 0x34a8
movl -0x328(%rbp), %eax
cmpl $0x0, %eax
je 0xb63e
leaq -0x298(%rbp), %rdi
movl $0x3d, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3310
movq %rax, -0x2a0(%rbp)
cmpq $-0x1, -0x2a0(%rbp)
je 0xb5d3
movq -0x2a0(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x2e8(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x3250
jmp 0xb50b
movq -0x318(%rbp), %rax
movslq -0x2a4(%rbp), %rcx
shlq $0x6, %rcx
leaq 0x8(%rax,%rcx), %rdi
leaq -0x2e8(%rbp), %rsi
movq %rsi, -0x330(%rbp)
callq 0x32c0
movq -0x330(%rbp), %rdi
callq 0x34a8
movq -0x2a0(%rbp), %rdx
incq %rdx
leaq -0x308(%rbp), %rdi
leaq -0x298(%rbp), %rsi
movq $-0x1, %rcx
callq 0x3250
jmp 0xb567
movq -0x318(%rbp), %rdi
addq $0x8, %rdi
movslq -0x2a4(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x20, %rdi
leaq -0x308(%rbp), %rsi
callq 0x32c0
leaq -0x308(%rbp), %rdi
callq 0x34a8
movl -0x2a4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2a4(%rbp)
jmp 0xb63c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x270(%rbp)
movl %eax, -0x274(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x34a8
jmp 0xba0a
leaq -0x298(%rbp), %rdi
leaq 0xeaa(%rip), %rsi       # 0xc48b
callq 0x3100
cmpl $0x0, %eax
jle 0xb63a
movq 0x39fe(%rip), %rdi      # 0xeff0
leaq 0x10d8(%rip), %rsi      # 0xc6d1
callq 0x3200
movq %rax, -0x338(%rbp)
jmp 0xb607
movq -0x338(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x31e0
movq %rax, -0x340(%rbp)
jmp 0xb623
movq -0x340(%rbp), %rdi
leaq 0xe59(%rip), %rsi       # 0xc48a
callq 0x3200
jmp 0xb638
jmp 0xb63a
jmp 0xb63c
jmp 0xb63e
jmp 0xb426
movl $0x0, -0x30c(%rbp)
movl -0x30c(%rbp), %eax
cmpl -0x2a4(%rbp), %eax
jge 0xb9db
movq -0x318(%rbp), %rax
movslq -0x30c(%rbp), %rcx
shlq $0x6, %rcx
leaq 0x8(%rax,%rcx), %rdi
leaq 0x3cd3(%rip), %rsi      # 0xf350
callq 0x3040
movl %eax, -0x344(%rbp)
jmp 0xb68a
movl -0x344(%rbp), %eax
cmpl $0x0, %eax
jne 0xb6ce
movq -0x318(%rbp), %rdi
addq $0x8, %rdi
movslq -0x30c(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x20, %rdi
callq 0x3120
movq %rax, %rdi
callq 0x33b0
movl %eax, %ecx
movq -0x318(%rbp), %rax
movl %ecx, 0x3208(%rax)
movq -0x318(%rbp), %rax
movslq -0x30c(%rbp), %rcx
shlq $0x6, %rcx
leaq 0x8(%rax,%rcx), %rdi
leaq 0x3c84(%rip), %rsi      # 0xf370
callq 0x3040
movl %eax, -0x348(%rbp)
jmp 0xb6f9
movl -0x348(%rbp), %eax
cmpl $0x0, %eax
jne 0xb73d
movq -0x318(%rbp), %rdi
addq $0x8, %rdi
movslq -0x30c(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x20, %rdi
callq 0x3120
movq %rax, %rdi
callq 0x32e0
movq -0x318(%rbp), %rax
movsd %xmm0, 0x3218(%rax)
movq -0x318(%rbp), %rax
movslq -0x30c(%rbp), %rcx
shlq $0x6, %rcx
leaq 0x8(%rax,%rcx), %rdi
leaq 0x3c35(%rip), %rsi      # 0xf390
callq 0x3040
movl %eax, -0x34c(%rbp)
jmp 0xb768
movl -0x34c(%rbp), %eax
cmpl $0x0, %eax
jne 0xb7ac
movq -0x318(%rbp), %rdi
addq $0x8, %rdi
movslq -0x30c(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x20, %rdi
callq 0x3120
movq %rax, %rdi
callq 0x32e0
movq -0x318(%rbp), %rax
movsd %xmm0, 0x3220(%rax)
movq -0x318(%rbp), %rax
movslq -0x30c(%rbp), %rcx
shlq $0x6, %rcx
leaq 0x8(%rax,%rcx), %rdi
leaq 0x3be6(%rip), %rsi      # 0xf3b0
callq 0x3040
movl %eax, -0x350(%rbp)
jmp 0xb7d7
movl -0x350(%rbp), %eax
cmpl $0x0, %eax
jne 0xb81b
movq -0x318(%rbp), %rdi
addq $0x8, %rdi
movslq -0x30c(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x20, %rdi
callq 0x3120
movq %rax, %rdi
callq 0x32e0
movq -0x318(%rbp), %rax
movsd %xmm0, 0x3228(%rax)
movq -0x318(%rbp), %rax
movslq -0x30c(%rbp), %rcx
shlq $0x6, %rcx
leaq 0x8(%rax,%rcx), %rdi
leaq 0x3b97(%rip), %rsi      # 0xf3d0
callq 0x3040
movl %eax, -0x354(%rbp)
jmp 0xb846
movl -0x354(%rbp), %eax
cmpl $0x0, %eax
jne 0xb878
movq -0x318(%rbp), %rdi
movslq -0x30c(%rbp), %rax
shlq $0x6, %rax
leaq 0x28(%rdi,%rax), %rsi
addq $0x3230, %rdi           # imm = 0x3230
callq 0x3050
jmp 0xb876
jmp 0xb878
movq -0x318(%rbp), %rax
movslq -0x30c(%rbp), %rcx
shlq $0x6, %rcx
leaq 0x8(%rax,%rcx), %rdi
leaq 0x3b5a(%rip), %rsi      # 0xf3f0
callq 0x3040
movl %eax, -0x358(%rbp)
jmp 0xb8a3
movl -0x358(%rbp), %eax
cmpl $0x0, %eax
jne 0xb8e7
movq -0x318(%rbp), %rdi
addq $0x8, %rdi
movslq -0x30c(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x20, %rdi
callq 0x3120
movq %rax, %rdi
callq 0x33b0
movl %eax, %ecx
movq -0x318(%rbp), %rax
movl %ecx, 0x320c(%rax)
movq -0x318(%rbp), %rax
movslq -0x30c(%rbp), %rcx
shlq $0x6, %rcx
leaq 0x8(%rax,%rcx), %rdi
leaq 0x3b0b(%rip), %rsi      # 0xf410
callq 0x3040
movl %eax, -0x35c(%rbp)
jmp 0xb912
movl -0x35c(%rbp), %eax
cmpl $0x0, %eax
jne 0xb956
movq -0x318(%rbp), %rdi
addq $0x8, %rdi
movslq -0x30c(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x20, %rdi
callq 0x3120
movq %rax, %rdi
callq 0x33b0
movl %eax, %ecx
movq -0x318(%rbp), %rax
movl %ecx, 0x3214(%rax)
movq -0x318(%rbp), %rax
movslq -0x30c(%rbp), %rcx
shlq $0x6, %rcx
leaq 0x8(%rax,%rcx), %rdi
leaq 0x3abc(%rip), %rsi      # 0xf430
callq 0x3040
movl %eax, -0x360(%rbp)
jmp 0xb981
movl -0x360(%rbp), %eax
cmpl $0x0, %eax
jne 0xb9c5
movq -0x318(%rbp), %rdi
addq $0x8, %rdi
movslq -0x30c(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
addq $0x20, %rdi
callq 0x3120
movq %rax, %rdi
callq 0x32e0
movq -0x318(%rbp), %rax
movsd %xmm0, 0x3250(%rax)
jmp 0xb9c7
movl -0x30c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30c(%rbp)
jmp 0xb64d
movq -0x318(%rbp), %rdi
callq 0xba30
jmp 0xb9e9
leaq -0x298(%rbp), %rdi
callq 0x34a8
leaq -0x268(%rbp), %rdi
callq 0x30d0
addq $0x360, %rsp            # imm = 0x360
popq %rbp
retq
leaq -0x268(%rbp), %rdi
callq 0x30d0
movq -0x270(%rbp), %rdi
callq 0x3430
nopw %cs:(%rax,%rax)