// File: /workspace/github_cpp_makefile_star2_O2/WolfgangLechner[P]StructureAnalysis/molecular_system.cpp
// Function: CMolecularSystem::outputBondOrderHistogramms(int)
void CMolecularSystem::outputBondOrderHistogramms(int number)
{
  char IntStr[80];

  double a,b;
  int n;
  a = OrderParameterHistoStart;
  b = OrderParameterHistoStop;
  n = OrderParameterHistoSize;

  ofstream of;
  sprintf( IntStr, "./output/orderparameter/q4Histo.%d.txt", number) ;
  of.open (IntStr, ofstream::out | ofstream::trunc);

  if (of.is_open())
  {
    for (int i = 0;i<n;i++)
    {
      of << get_xFromBox(i,a,b,n) << " "  << this->q4Histo[i]/(double(this->normq4)*(b-a)) << "\n";
    }
  } else {cerr << "unable to open file for output, please mkdir output/orderparameter\n";}
  of.close();

  sprintf( IntStr, "./output/orderparameter/q6Histo.%d.txt", number) ;
  of.open (IntStr, ofstream::out | ofstream::trunc);

  if (of.is_open())
  {
    for (int i = 0;i<n;i++)
    {
      of << get_xFromBox(i,a,b,n) << " "  << this->q6Histo[i]/(double(this->normq6)*(b-a)) << "\n";
    }
  } else {cerr << "unable to open file for output, please mkdir output/orderparameter\n";}
  of.close();


  sprintf( IntStr, "./output/orderparameter/aq4Histo.%d.txt", number) ;
  of.open (IntStr, ofstream::out | ofstream::trunc);

  if (of.is_open())
  {
    for (int i = 0;i<n;i++)
    {
      of << get_xFromBox(i,a,b,n) << " "  << this->aq4Histo[i]/(double(this->normaq4)*(b-a)) << "\n";
    }
  } else {cerr << "unable to open file for output, please mkdir output/orderparameter\n";}
  of.close();

  sprintf( IntStr, "./output/orderparameter/aq6Histo.%d.txt", number) ;
  of.open (IntStr, ofstream::out | ofstream::trunc);

  if (of.is_open())
  {
    for (int i = 0;i<n;i++)
    {
      of << get_xFromBox(i,a,b,n) << " "  << this->aq6Histo[i]/(double(this->normaq6)*(b-a)) << "\n";
    }
  } else {cerr << "unable to open file for output, please mkdir output/orderparameter\n";}
  of.close();

  sprintf( IntStr, "./output/orderparameter/q46Histo3d.%d.txt", number) ;
  of.open (IntStr, ofstream::out | ofstream::trunc);

  if (of.is_open())
  {
    for (int i = 0;i<n;i++)
    {
      for (int j = 0;j<n;j++)
      {
        of << get_xFromBox(i,a,b,n) << " "  << get_xFromBox(j,a,b,n) << " "  <<  this->q46Histo3d[i][j]/(double(this->normaq6)*pow((b-a),2.0)) << "\n";
      }
      of << "\n";
    }

  } else {cerr << "unable to open file for output, please mkdir output/orderparameter\n";}
  of.close();


  sprintf( IntStr, "./output/orderparameter/aq46Histo3d.%d.txt", number) ;
  of.open (IntStr, ofstream::out | ofstream::trunc);

  if (of.is_open())
  {
    for (int i = 0;i<n;i++)
    {
      for (int j = 0;j<n;j++)
      {
        of << get_xFromBox(i,a,b,n) << " "  << get_xFromBox(j,a,b,n) << " "  <<  this->aq46Histo3d[i][j]/(double(this->normaq6)*pow((b-a),2.0)) << "\n";
      }
      of << "\n";
    }

  } else {cerr << "unable to open file for output, please mkdir output/orderparameter\n";}
  of.close();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movl %esi, %ebx
movq %rdi, -0x38(%rbp)
leaq -0x2a0(%rbp), %r15
movq %r15, %rdi
callq 0x2310
leaq 0x120a(%rip), %rsi      # 0x7396
leaq -0xa0(%rbp), %r12
movq %r12, %rdi
movl %ebx, -0x2c(%rbp)
movl %ebx, %edx
xorl %eax, %eax
callq 0x2070
pushq $0x30
popq %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2050
leaq -0x230(%rbp), %rdi
callq 0x20a0
testb %al, %al
je 0x6233
xorl %ebx, %ebx
leaq 0xf9e(%rip), %r12       # 0x7167
leaq 0x11aa(%rip), %r13      # 0x737a
cmpq $0x7d0, %rbx            # imm = 0x7D0
je 0x6246
cvtsi2sd %ebx, %xmm0
divsd 0xeab(%rip), %xmm0      # 0x7090
addsd 0xe6b(%rip), %xmm0      # 0x7058
movq %r15, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21b0
movq -0x38(%rbp), %rcx
cvtsi2sdl 0x24(%rcx,%rbx,2), %xmm0
cvtsi2sdl 0x7a50a4(%rcx), %xmm1
addsd %xmm1, %xmm1
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x21b0
addq $0x2, %rbx
jmp 0x61d0
movq 0x3db6(%rip), %rdi      # 0x9ff0
leaq 0x117c(%rip), %rsi      # 0x73bd
callq 0x21b0
leaq -0x2a0(%rbp), %rdi
callq 0x2280
leaq 0x11a8(%rip), %rsi      # 0x7401
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
movl -0x2c(%rbp), %edx
xorl %eax, %eax
callq 0x2070
leaq -0x2a0(%rbp), %rdi
pushq $0x30
popq %rdx
movq %r15, %rsi
callq 0x2050
leaq -0x230(%rbp), %rdi
callq 0x20a0
testb %al, %al
je 0x630c
xorl %ebx, %ebx
leaq -0x2a0(%rbp), %r15
leaq 0xec8(%rip), %r12       # 0x7167
leaq 0x10d4(%rip), %r13      # 0x737a
cmpq $0x7d0, %rbx            # imm = 0x7D0
je 0x631f
cvtsi2sd %ebx, %xmm0
divsd 0xdd5(%rip), %xmm0      # 0x7090
addsd 0xd95(%rip), %xmm0      # 0x7058
movq %r15, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21b0
movq -0x38(%rbp), %rcx
cvtsi2sdl 0xfc4(%rcx,%rbx,2), %xmm0
cvtsi2sdl 0x7a50a8(%rcx), %xmm1
addsd %xmm1, %xmm1
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x21b0
addq $0x2, %rbx
jmp 0x62a6
movq 0x3cdd(%rip), %rdi      # 0x9ff0
leaq 0x10a3(%rip), %rsi      # 0x73bd
callq 0x21b0
leaq -0x2a0(%rbp), %rdi
callq 0x2280
leaq 0x10f6(%rip), %rsi      # 0x7428
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
movl -0x2c(%rbp), %edx
xorl %eax, %eax
callq 0x2070
leaq -0x2a0(%rbp), %rdi
pushq $0x30
popq %rdx
movq %r15, %rsi
callq 0x2050
leaq -0x230(%rbp), %rdi
callq 0x20a0
testb %al, %al
je 0x63e5
xorl %ebx, %ebx
leaq -0x2a0(%rbp), %r15
leaq 0xdef(%rip), %r12       # 0x7167
leaq 0xffb(%rip), %r13       # 0x737a
cmpq $0x7d0, %rbx            # imm = 0x7D0
je 0x63f8
cvtsi2sd %ebx, %xmm0
divsd 0xcfc(%rip), %xmm0      # 0x7090
addsd 0xcbc(%rip), %xmm0      # 0x7058
movq %r15, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21b0
movq -0x38(%rbp), %rcx
cvtsi2sdl 0x1f64(%rcx,%rbx,2), %xmm0
cvtsi2sdl 0x7a50ac(%rcx), %xmm1
addsd %xmm1, %xmm1
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x21b0
addq $0x2, %rbx
jmp 0x637f
movq 0x3c04(%rip), %rdi      # 0x9ff0
leaq 0xfca(%rip), %rsi       # 0x73bd
callq 0x21b0
leaq -0x2a0(%rbp), %rdi
callq 0x2280
leaq 0x1045(%rip), %rsi      # 0x7450
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
movl -0x2c(%rbp), %edx
xorl %eax, %eax
callq 0x2070
leaq -0x2a0(%rbp), %rdi
pushq $0x30
popq %rdx
movq %r15, %rsi
callq 0x2050
leaq -0x230(%rbp), %rdi
callq 0x20a0
testb %al, %al
je 0x64be
xorl %ebx, %ebx
leaq -0x2a0(%rbp), %r15
leaq 0xd16(%rip), %r12       # 0x7167
leaq 0xf22(%rip), %r13       # 0x737a
cmpq $0x7d0, %rbx            # imm = 0x7D0
je 0x64d1
cvtsi2sd %ebx, %xmm0
divsd 0xc23(%rip), %xmm0      # 0x7090
addsd 0xbe3(%rip), %xmm0      # 0x7058
movq %r15, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21b0
movq -0x38(%rbp), %rcx
cvtsi2sdl 0x2f04(%rcx,%rbx,2), %xmm0
cvtsi2sdl 0x7a50b0(%rcx), %xmm1
addsd %xmm1, %xmm1
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x21b0
addq $0x2, %rbx
jmp 0x6458
movq 0x3b2b(%rip), %rdi      # 0x9ff0
leaq 0xef1(%rip), %rsi       # 0x73bd
callq 0x21b0
leaq -0x2a0(%rbp), %rdi
callq 0x2280
leaq 0xf94(%rip), %rsi       # 0x7478
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
movl -0x2c(%rbp), %edx
xorl %eax, %eax
callq 0x2070
leaq -0x2a0(%rbp), %rdi
pushq $0x30
popq %rdx
movq %r15, %rsi
callq 0x2050
leaq -0x230(%rbp), %rdi
callq 0x20a0
testb %al, %al
je 0x660a
movq -0x38(%rbp), %rax
leaq 0x3ea4(%rax), %r14
xorl %eax, %eax
leaq 0xe48(%rip), %r12       # 0x737a
leaq -0x2a0(%rbp), %r13
leaq 0xc27(%rip), %r15       # 0x7167
cmpq $0x3e8, %rax            # imm = 0x3E8
je 0x661d
movq %rax, -0x40(%rbp)
addl %eax, %eax
cvtsi2sd %eax, %xmm0
divsd 0xb32(%rip), %xmm0      # 0x7090
addsd 0xaf2(%rip), %xmm0      # 0x7058
movsd %xmm0, -0x48(%rbp)
xorl %ebx, %ebx
cmpq $0x7d0, %rbx            # imm = 0x7D0
je 0x65ec
movq %r13, %rdi
movsd -0x48(%rbp), %xmm0
callq 0x22e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x21b0
cvtsi2sd %ebx, %xmm0
divsd 0xaf6(%rip), %xmm0      # 0x7090
addsd 0xab6(%rip), %xmm0      # 0x7058
movq %rax, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x21b0
cvtsi2sdl (%r14,%rbx,2), %xmm0
movq -0x38(%rbp), %rcx
cvtsi2sdl 0x7a50b0(%rcx), %xmm1
mulsd 0xaa1(%rip), %xmm1      # 0x7070
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21b0
addq $0x2, %rbx
jmp 0x656d
movq %r13, %rdi
movq %r12, %rsi
callq 0x21b0
movq -0x40(%rbp), %rax
incq %rax
addq $0xfa0, %r14            # imm = 0xFA0
jmp 0x6540
movq 0x39df(%rip), %rdi      # 0x9ff0
leaq 0xda5(%rip), %rsi       # 0x73bd
callq 0x21b0
leaq -0x2a0(%rbp), %rdi
callq 0x2280
leaq 0xe72(%rip), %rsi       # 0x74a2
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
movl -0x2c(%rbp), %edx
xorl %eax, %eax
callq 0x2070
leaq -0x2a0(%rbp), %rdi
pushq $0x30
popq %rdx
movq %r15, %rsi
callq 0x2050
leaq -0x230(%rbp), %rdi
callq 0x20a0
testb %al, %al
je 0x6757
movq -0x38(%rbp), %rax
leaq 0x3d47a4(%rax), %r13
xorl %eax, %eax
leaq 0xcfc(%rip), %r14       # 0x737a
leaq -0x2a0(%rbp), %r15
leaq 0xadb(%rip), %r12       # 0x7167
cmpq $0x3e8, %rax            # imm = 0x3E8
je 0x676a
movq %rax, -0x40(%rbp)
addl %eax, %eax
cvtsi2sd %eax, %xmm0
divsd 0x9e6(%rip), %xmm0      # 0x7090
addsd 0x9a6(%rip), %xmm0      # 0x7058
movsd %xmm0, -0x48(%rbp)
xorl %ebx, %ebx
cmpq $0x7d0, %rbx            # imm = 0x7D0
je 0x6739
movq %r15, %rdi
movsd -0x48(%rbp), %xmm0
callq 0x22e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21b0
cvtsi2sd %ebx, %xmm0
divsd 0x9aa(%rip), %xmm0      # 0x7090
addsd 0x96a(%rip), %xmm0      # 0x7058
movq %rax, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21b0
cvtsi2sdl (%r13,%rbx,2), %xmm0
movq -0x38(%rbp), %rcx
cvtsi2sdl 0x7a50b0(%rcx), %xmm1
mulsd 0x954(%rip), %xmm1      # 0x7070
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x21b0
addq $0x2, %rbx
jmp 0x66b9
movq %r15, %rdi
movq %r14, %rsi
callq 0x21b0
movq -0x40(%rbp), %rax
incq %rax
addq $0xfa0, %r13            # imm = 0xFA0
jmp 0x668c
movq 0x3892(%rip), %rdi      # 0x9ff0
leaq 0xc58(%rip), %rsi       # 0x73bd
callq 0x21b0
leaq -0x2a0(%rbp), %rdi
callq 0x2280
leaq -0x2a0(%rbp), %rdi
callq 0x22a0
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x67a4
jmp 0x67a4
jmp 0x67a4
jmp 0x67a4
jmp 0x67a4
jmp 0x67a4
jmp 0x67a4
jmp 0x67a4
movq %rax, %rbx
leaq -0x2a0(%rbp), %rdi
callq 0x22a0
movq %rbx, %rdi
callq 0x2350
nop