// File: /workspace/github_cpp_makefile_star2_O1/nikolausmayer[P]SimplePlot/main.cpp
// Function: main
int main(int argc, char** argv) {

  float maxv = std::numeric_limits<float>::min();
  float minv = std::numeric_limits<float>::max();
  int height = 10;
  int width  = 0;
  std::string title = "SimplePlot";
  bool box   = true;
  bool color = true;

  #define INCREMENT_i_AND_CHECK ++i; if (i>=argc) break;
  for (int i = 1; i < argc; ++i) {
    if        (std::strcmp(argv[i], "-h"        ) == 0 or
               std::strcmp(argv[i], "--help"    ) == 0) {
      std::cout << "Usage: " << argv[0] << " [options]" << std::endl
                << std::endl
                << "Plot stuff like this:" << std::endl << std::endl
                << Sparkline::ShowExampleGaussian() << std::endl
                << "Values to be plotted are read from STDIN." << std::endl
                << std::endl
                << "Options:" << std::endl
                << "  --max      " << "Upper plot y-limit" << std::endl
                << "  --min      " << "Lower plot y-limit" << std::endl
                << "  --height   " << "Plot height in lines" << std::endl
                << "  --width    " << "Plot width in characters" << std::endl
                << "  --title    " << "Plot title" << std::endl
                << "  --no-box   " << "Disable enclosing box" << std::endl
                << "  --no-color " << "Disable color output" << std::endl
                << std::endl;
      return EXIT_FAILURE;
    } else if (std::strcmp(argv[i], "--max"     ) == 0) {
      INCREMENT_i_AND_CHECK;
      maxv = std::atof(argv[i]);
    } else if (std::strcmp(argv[i], "--min"     ) == 0) {
      INCREMENT_i_AND_CHECK;
      minv = std::atof(argv[i]);
    } else if (std::strcmp(argv[i], "--height"  ) == 0) {
      INCREMENT_i_AND_CHECK;
      height = std::atoi(argv[i]);
    } else if (std::strcmp(argv[i], "--width"   ) == 0) {
      INCREMENT_i_AND_CHECK;
      width = std::atoi(argv[i]);
    } else if (std::strcmp(argv[i], "--title"   ) == 0) {
      INCREMENT_i_AND_CHECK;
      title = argv[i];
    } else if (std::strcmp(argv[i], "--no-box"  ) == 0) {
      box = false;
    } else if (std::strcmp(argv[i], "--no-color") == 0) {
      color = false;
    } else {
      std::cerr << "Unrecognized option: \"" << argv[i] << "\"" << std::endl;
    }
  }
  #undef INCREMENT_i_AND_CHECK

  std::vector<float> data;
  {
    float dummy;
    while (!std::cin.eof())
    {
      std::cin >> dummy;
      if (std::cin.fail())
        break;
      data.push_back(dummy);
    }
  }

  std::cout << Sparkline::Sparkline<float>(data.data(),
                                           data.size(),
                                           height,
                                           width,
                                           box,
                                           color,
                                           title,
                                           minv,
                                           maxv) 
            << std::endl;

  /// Bye!
  return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r15
movl %edi, %ebp
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1f55(%rip), %rsi      # 0x527a
leaq 0x1f58(%rip), %rdx      # 0x5284
leaq 0x20(%rsp), %rdi
callq 0x4c1e
cmpl $0x2, %ebp
jl 0x35fd
movss 0x1d15(%rip), %xmm0     # 0x505c
movss %xmm0, 0x1c(%rsp)
movss 0x1d03(%rip), %xmm0     # 0x5058
movss %xmm0, 0x18(%rsp)
movl $0xa, 0xc(%rsp)
movq $0x0, 0x60(%rsp)
movb $0x1, %al
movl %eax, 0x10(%rsp)
movl $0x1, %r13d
leaq 0x1f06(%rip), %r12      # 0x5285
movb $0x1, %al
movl %eax, 0x14(%rsp)
movslq %r13d, %r14
movq (%r15,%r14,8), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21e0
testl %eax, %eax
je 0x363c
movq %rbx, %rdi
leaq 0x1edf(%rip), %rsi      # 0x5288
callq 0x21e0
testl %eax, %eax
je 0x363c
movq %rbx, %rdi
leaq 0x2017(%rip), %rsi      # 0x53d7
callq 0x21e0
testl %eax, %eax
je 0x349b
movq %rbx, %rdi
leaq 0x2006(%rip), %rsi      # 0x53dd
callq 0x21e0
testl %eax, %eax
je 0x34c2
movq %rbx, %rdi
leaq 0x1ff5(%rip), %rsi      # 0x53e3
callq 0x21e0
testl %eax, %eax
je 0x34e9
movq %rbx, %rdi
leaq 0x1fe7(%rip), %rsi      # 0x53ec
callq 0x21e0
testl %eax, %eax
je 0x350a
movq %rbx, %rdi
leaq 0x1fd8(%rip), %rsi      # 0x53f4
callq 0x21e0
testl %eax, %eax
je 0x352c
movq %rbx, %rdi
leaq 0x1fc9(%rip), %rsi      # 0x53fc
callq 0x21e0
testl %eax, %eax
je 0x3563
movq %rbx, %rdi
leaq 0x1fbb(%rip), %rsi      # 0x5405
callq 0x21e0
testl %eax, %eax
je 0x356d
movl $0x16, %edx
movq 0x4b85(%rip), %rdi      # 0x7fe8
leaq 0x1fa6(%rip), %rsi      # 0x5410
callq 0x21b0
movq (%r15,%r14,8), %rbx
testq %rbx, %rbx
je 0x3577
movq %rbx, %rdi
callq 0x20b0
movq 0x4b5d(%rip), %rdi      # 0x7fe8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x21b0
jmp 0x3595
incl %r13d
cmpl %ebp, %r13d
jge 0x35eb
movslq %r13d, %rax
movq (%r15,%rax,8), %rdi
callq 0x21c0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1c(%rsp)
jmp 0x35df
incl %r13d
cmpl %ebp, %r13d
jge 0x35eb
movslq %r13d, %rax
movq (%r15,%rax,8), %rdi
callq 0x21c0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x18(%rsp)
jmp 0x35df
incl %r13d
cmpl %ebp, %r13d
jge 0x35eb
movslq %r13d, %rax
movq (%r15,%rax,8), %rdi
callq 0x2220
movl %eax, 0xc(%rsp)
jmp 0x35df
incl %r13d
cmpl %ebp, %r13d
jge 0x35eb
movslq %r13d, %rax
movq (%r15,%rax,8), %rdi
callq 0x2220
movq %rax, 0x60(%rsp)
jmp 0x35df
incl %r13d
cmpl %ebp, %r13d
jge 0x35eb
movslq %r13d, %rax
movq (%r15,%rax,8), %rbx
movq 0x28(%rsp), %r14
movq %rbx, %rdi
callq 0x20b0
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x2210
jmp 0x35df
movl $0x0, 0x14(%rsp)
jmp 0x35df
movl $0x0, 0x10(%rsp)
jmp 0x35df
movq 0x4a6a(%rip), %rcx      # 0x7fe8
movq (%rcx), %rax
movq -0x18(%rax), %rax
leaq (%rcx,%rax), %rdi
movl 0x20(%rcx,%rax), %esi
orl $0x1, %esi
callq 0x2260
movl $0x1, %edx
movq 0x4a47(%rip), %rdi      # 0x7fe8
leaq 0x1e7d(%rip), %rsi      # 0x5425
callq 0x21b0
movq 0x4a34(%rip), %rcx      # 0x7fe8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq 0x4a16(%rip), %rdi      # 0x7fe8
callq 0x2030
movq %rax, %rdi
callq 0x2120
incl %r13d
cmpl %ebp, %r13d
jl 0x3385
movb $0x1, %al
xorl %ebx, %ebx
leaq 0x30(%rsp), %r13
movl 0xc(%rsp), %ebp
jmp 0x3aec
movb $0x1, %al
movl %eax, 0x14(%rsp)
movq $0x0, 0x60(%rsp)
movl $0xa, %ebp
movss 0x1a3f(%rip), %xmm0     # 0x5058
movss %xmm0, 0x18(%rsp)
movss 0x1a35(%rip), %xmm0     # 0x505c
movss %xmm0, 0x1c(%rsp)
movb $0x1, %al
movl %eax, 0x10(%rsp)
xorl %ebx, %ebx
movb $0x1, %al
jmp 0x3aec
movq 0x497d(%rip), %rbx      # 0x7fc0
leaq 0x1c45(%rip), %rsi      # 0x528f
movl $0x7, %edx
movq %rbx, %rdi
leaq 0x30(%rsp), %r13
callq 0x21b0
movl 0xc(%rsp), %ebp
movq (%r15), %r14
testq %r14, %r14
je 0x3684
movq %r14, %rdi
callq 0x20b0
movq 0x4949(%rip), %rdi      # 0x7fc0
movq %r14, %rsi
movq %rax, %rdx
callq 0x21b0
jmp 0x369b
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x2260
movq 0x491e(%rip), %rbx      # 0x7fc0
leaq 0x1bee(%rip), %rsi      # 0x5297
movl $0xa, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq 0x48ec(%rip), %rdi      # 0x7fc0
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
leaq 0x1b8d(%rip), %rsi      # 0x52a2
movl $0x15, %edx
movq %rax, %rdi
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x290b
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq %rbx, %rdi
callq 0x21b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
leaq 0x1af2(%rip), %rsi      # 0x52b8
movl $0x29, %edx
movq %rax, %rdi
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
leaq 0x1ab4(%rip), %rsi      # 0x52e2
movl $0x8, %edx
movq %rax, %rdi
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
leaq 0x1a7f(%rip), %rsi      # 0x52eb
movl $0xd, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x1a79(%rip), %rsi      # 0x52f9
movl $0x12, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
leaq 0x1a4e(%rip), %rsi      # 0x530c
movl $0xd, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x1a48(%rip), %rsi      # 0x531a
movl $0x12, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
leaq 0x1a1d(%rip), %rsi      # 0x532d
movl $0xd, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x1a17(%rip), %rsi      # 0x533b
movl $0x14, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
leaq 0x19ee(%rip), %rsi      # 0x5350
movl $0xd, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x19e8(%rip), %rsi      # 0x535e
movl $0x18, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
leaq 0x19c3(%rip), %rsi      # 0x5377
movl $0xd, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x19bd(%rip), %rsi      # 0x5385
movl $0xa, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
leaq 0x198a(%rip), %rsi      # 0x5390
movl $0xd, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x1984(%rip), %rsi      # 0x539e
movl $0x15, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
leaq 0x195c(%rip), %rsi      # 0x53b4
movl $0xd, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x1956(%rip), %rsi      # 0x53c2
movl $0x14, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ae5
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x21a0
movl $0x1, %ebx
xorl %eax, %eax
testb %al, %al
je 0x3c80
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x44c4(%rip), %rbx      # 0x7fd0
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%rbx,%rax)
jne 0x3b77
leaq 0x68(%rsp), %r14
leaq 0x40(%rsp), %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22a0
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
jne 0x3b77
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0x3b5e
movss 0x68(%rsp), %xmm0
movss %xmm0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%rsp)
jmp 0x3b69
movq %r15, %rdi
movq %r14, %rdx
callq 0x4e78
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%rbx,%rax)
je 0x3b24
movq 0x40(%rsp), %rbx
movq 0x48(%rsp), %r14
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %r15
movq %r15, %rdi
callq 0x4b8e
subq %rbx, %r14
sarq $0x2, %r14
movslq 0x60(%rsp), %r8
movslq %ebp, %rcx
movzbl 0x10(%rsp), %eax
andl $0x1, %eax
movzbl 0x14(%rsp), %r9d
andl $0x1, %r9d
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
movss 0x18(%rsp), %xmm0
movss 0x1c(%rsp), %xmm1
pushq %r15
pushq %rax
callq 0x3d51
addq $0x10, %rsp
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x43c0(%rip), %rdi      # 0x7fc0
callq 0x21b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c4a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x21a0
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x3c67
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x21a0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x3c7e
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
xorl %ebx, %ebx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x3c97
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21a0
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3cf3
movq %rax, %rbx
jmp 0x3cd4
jmp 0x3cf8
jmp 0x3cf3
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3cd4
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x21a0
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x3cfb
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0x3cfb
movq %rax, %rbx
jmp 0x3d2d
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x3d2d
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
jmp 0x3d28
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d2d
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x21a0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3d49
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x2280