// File: /workspace/github_cpp_makefile_star2_O3/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 $0x98, %rsp
movq %rsi, %r14
movl %edi, %r15d
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2fc9(%rip), %rsi      # 0x62ea
leaq 0x2fcc(%rip), %rdx      # 0x62f4
leaq 0x58(%rsp), %rdi
callq 0x4cf4
movq $0x0, 0x18(%rsp)
cmpl $0x2, %r15d
jl 0x35fa
movss 0x2d7f(%rip), %xmm0     # 0x60cc
movss %xmm0, 0x10(%rsp)
movss 0x2d6d(%rip), %xmm0     # 0x60c8
movss %xmm0, 0xc(%rsp)
movl $0xa, 0x14(%rsp)
movb $0x1, %al
movl %eax, 0x4(%rsp)
movl $0x1, %r13d
leaq 0x2f79(%rip), %r12      # 0x62f5
movb $0x1, %al
movl %eax, 0x8(%rsp)
movslq %r13d, %rbx
movq (%r14,%rbx,8), %rbp
cmpb $0x2d, (%rbp)
jne 0x339f
cmpb $0x68, 0x1(%rbp)
jne 0x339f
cmpb $0x0, 0x2(%rbp)
je 0x37c5
movq %rbp, %rdi
movq %r12, %rsi
callq 0x21e0
testl %eax, %eax
je 0x37c5
movq %rbp, %rdi
leaq 0x3088(%rip), %rsi      # 0x6444
callq 0x21e0
testl %eax, %eax
je 0x3497
movq %rbp, %rdi
leaq 0x3077(%rip), %rsi      # 0x644a
callq 0x21e0
testl %eax, %eax
je 0x34be
movq %rbp, %rdi
leaq 0x3066(%rip), %rsi      # 0x6450
callq 0x21e0
testl %eax, %eax
je 0x34e5
movq %rbp, %rdi
leaq 0x3058(%rip), %rsi      # 0x6459
callq 0x21e0
testl %eax, %eax
je 0x3506
movq %rbp, %rdi
leaq 0x3049(%rip), %rsi      # 0x6461
callq 0x21e0
testl %eax, %eax
je 0x3528
movq %rbp, %rdi
leaq 0x303a(%rip), %rsi      # 0x6469
callq 0x21e0
testl %eax, %eax
je 0x355f
movq %rbp, %rdi
leaq 0x302c(%rip), %rsi      # 0x6472
callq 0x21e0
testl %eax, %eax
je 0x3569
movl $0x16, %edx
movq 0x5b89(%rip), %rdi      # 0x8fe8
leaq 0x3017(%rip), %rsi      # 0x647d
callq 0x21b0
movq (%r14,%rbx,8), %rbp
testq %rbp, %rbp
je 0x3573
movq %rbp, %rdi
callq 0x20b0
movq 0x5b61(%rip), %rdi      # 0x8fe8
movq %rbp, %rsi
movq %rax, %rdx
callq 0x21b0
jmp 0x3591
incl %r13d
cmpl %r15d, %r13d
jge 0x35e7
movslq %r13d, %rax
movq (%r14,%rax,8), %rdi
callq 0x21c0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10(%rsp)
jmp 0x35db
incl %r13d
cmpl %r15d, %r13d
jge 0x35e7
movslq %r13d, %rax
movq (%r14,%rax,8), %rdi
callq 0x21c0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
jmp 0x35db
incl %r13d
cmpl %r15d, %r13d
jge 0x35e7
movslq %r13d, %rax
movq (%r14,%rax,8), %rdi
callq 0x2220
movl %eax, 0x14(%rsp)
jmp 0x35db
incl %r13d
cmpl %r15d, %r13d
jge 0x35e7
movslq %r13d, %rax
movq (%r14,%rax,8), %rdi
callq 0x2220
movq %rax, 0x18(%rsp)
jmp 0x35db
incl %r13d
cmpl %r15d, %r13d
jge 0x35e7
movslq %r13d, %rax
movq (%r14,%rax,8), %rbp
movq 0x60(%rsp), %rbx
movq %rbp, %rdi
callq 0x20b0
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x2210
jmp 0x35db
movl $0x0, 0x8(%rsp)
jmp 0x35db
movl $0x0, 0x4(%rsp)
jmp 0x35db
movq 0x5a6e(%rip), %rcx      # 0x8fe8
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 0x5a4b(%rip), %rdi      # 0x8fe8
leaq 0x2eee(%rip), %rsi      # 0x6492
callq 0x21b0
movq 0x5a38(%rip), %rcx      # 0x8fe8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq 0x5a1a(%rip), %rdi      # 0x8fe8
callq 0x2030
movq %rax, %rdi
callq 0x2120
incl %r13d
cmpl %r15d, %r13d
jl 0x3382
movq 0x18(%rsp), %rax
cltq
movq %rax, 0x18(%rsp)
movslq 0x14(%rsp), %r14
jmp 0x3628
movb $0x1, %al
movl %eax, 0x8(%rsp)
movl $0xa, %r14d
movss 0x2aba(%rip), %xmm0     # 0x60c8
movss %xmm0, 0xc(%rsp)
movss 0x2ab0(%rip), %xmm0     # 0x60cc
movss %xmm0, 0x10(%rsp)
movb $0x1, %al
movl %eax, 0x4(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x5990(%rip), %r12      # 0x8fd0
movq (%r12), %rax
movq -0x18(%rax), %rax
xorl %r15d, %r15d
testb $0x2, 0x20(%r12,%rax)
movl $0x0, %r13d
jne 0x36c8
leaq 0x38(%rsp), %r13
leaq 0x20(%rsp), %rbp
movq %r12, %rdi
movq %r13, %rsi
callq 0x22a0
movq (%r12), %rax
movq -0x18(%rax), %rcx
testb $0x5, 0x20(%r12,%rcx)
movq 0x28(%rsp), %r15
jne 0x36c3
cmpq 0x30(%rsp), %r15
je 0x36a0
movss 0x38(%rsp), %xmm0
movss %xmm0, (%r15)
addq $0x4, %r15
movq %r15, 0x28(%rsp)
jmp 0x36b2
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x4f48
movq (%r12), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%r12,%rax)
je 0x3663
movq 0x28(%rsp), %r15
movq 0x20(%rsp), %r13
leaq 0x88(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %r12
movq %r12, %rdi
callq 0x4c5e
subq %r13, %r15
sarq $0x2, %r15
movzbl 0x4(%rsp), %eax
andl $0x1, %eax
movzbl 0x8(%rsp), %r9d
andl $0x1, %r9d
leaq 0x38(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq 0x18(%rsp), %r8
movss 0xc(%rsp), %xmm0
movss 0x10(%rsp), %xmm1
pushq %r12
pushq %rax
callq 0x3d3d
addq $0x10, %rsp
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x587d(%rip), %rdi      # 0x8fc0
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 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x378d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21a0
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x37a7
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x21a0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x37be
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
xorl %ebx, %ebx
jmp 0x3c6a
movq 0x57f4(%rip), %rbx      # 0x8fc0
leaq 0x2b29(%rip), %rsi      # 0x62fc
movl $0x7, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%r14), %r14
testq %r14, %r14
je 0x3804
movq %r14, %rdi
callq 0x20b0
movq 0x57c9(%rip), %rdi      # 0x8fc0
movq %r14, %rsi
movq %rax, %rdx
callq 0x21b0
jmp 0x381b
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x2260
movq 0x579e(%rip), %rbx      # 0x8fc0
leaq 0x2adb(%rip), %rsi      # 0x6304
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 0x576c(%rip), %rdi      # 0x8fc0
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 0x2a7a(%rip), %rsi      # 0x630f
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 0x38(%rsp), %rdi
callq 0x290b
movq 0x38(%rsp), %rsi
movq 0x40(%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 0x29df(%rip), %rsi      # 0x6325
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 0x29a1(%rip), %rsi      # 0x634f
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 0x296c(%rip), %rsi      # 0x6358
movl $0xd, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x2966(%rip), %rsi      # 0x6366
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 0x293b(%rip), %rsi      # 0x6379
movl $0xd, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x2935(%rip), %rsi      # 0x6387
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 0x290a(%rip), %rsi      # 0x639a
movl $0xd, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x2904(%rip), %rsi      # 0x63a8
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 0x28db(%rip), %rsi      # 0x63bd
movl $0xd, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x28d5(%rip), %rsi      # 0x63cb
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 0x28b0(%rip), %rsi      # 0x63e4
movl $0xd, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x28aa(%rip), %rsi      # 0x63f2
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 0x2877(%rip), %rsi      # 0x63fd
movl $0xd, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x2871(%rip), %rsi      # 0x640b
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 0x2849(%rip), %rsi      # 0x6421
movl $0xd, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x2843(%rip), %rsi      # 0x642f
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 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c65
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21a0
movl $0x1, %ebx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x3c86
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x21a0
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3cdf
movq %rax, %rbx
jmp 0x3cc3
jmp 0x3ce4
jmp 0x3cdf
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3cc3
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21a0
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3ce7
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0x3ce7
movq %rax, %rbx
jmp 0x3d19
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3d19
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
jmp 0x3d14
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d19
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21a0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x3d35
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x2280