// File: /workspace/github_cpp_makefile_star2_O2/nikolausmayer[P]SimplePlot/./Sparkline.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> Sparkline::Sparkline<float>(float const*, unsigned long, unsigned long, unsigned long, bool, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, float, float)
std::string Sparkline( const T* const data,
                         size_t number_of_data_points,
                         size_t this_many_lines_high=1,
                         size_t this_many_characters_wide=0,
                         bool enclose_in_box=false,
                         bool print_colored=true,
                         std::string title="",
                         T minv=std::numeric_limits<T>::max(),
                         T maxv=std::numeric_limits<T>::min()
                       ) 
  {
    /// Use provided min/max values or adapt to data range
    minv = std::min(minv, std::numeric_limits<T>::max());
    maxv = std::max(maxv, std::numeric_limits<T>::min());
    if ( minv == std::numeric_limits<T>::max() and
         maxv == std::numeric_limits<T>::min() ) {
      for ( size_t i = 0; i < number_of_data_points; ++i ) {
        minv = std::min(minv, data[i]);
        maxv = std::max(maxv, data[i]);
      }
    }

    /// If the plot could spill over the terminal boundaries,
    /// then limit its width
    float w_scale = 1.f;
    {
      size_t max_width = (size_t)SparklineHelpers::TerminalWidth();
      if ( enclose_in_box ) 
        max_width -= ENCLOSURE_WIDTH;

      if ( this_many_characters_wide == 0 )
        this_many_characters_wide = number_of_data_points;

      if ( max_width < this_many_characters_wide )
        this_many_characters_wide = max_width;

      w_scale = (float)this_many_characters_wide/number_of_data_points;
    }

    /// TODO 
    if ( this_many_characters_wide > number_of_data_points ) {
      throw std::runtime_error("Woops! Not implemented..");
    }

    /// Interpolate data points
    T bins[this_many_characters_wide];
    {
      float bin_slices_indices[this_many_characters_wide+1];
      for ( size_t i = 0; i <= this_many_characters_wide; ++i ) {
        bin_slices_indices[i] = i/w_scale;
      }

      const float mass_per_bin = 1/w_scale;

      for ( size_t i = 0; i < this_many_characters_wide; ++i ) {
        bins[i] = 0;

        const float lower = bin_slices_indices[i];
        const float upper = bin_slices_indices[i+1];
        bins[i] += (1.f-(lower-(size_t)lower)) * data[(size_t)lower];
        for (size_t j = (size_t)lower+1; j < (size_t)upper; ++j) {
          bins[i] += data[j];
        }
        if ((size_t)upper < number_of_data_points) {
          bins[i] += (upper-(size_t)upper) * data[(size_t)upper];
        }

        bins[i] /= mass_per_bin;
      }
    }
         

    #ifdef WITH_TEXTDECORATOR
      TextDecorator::TextDecorator TD(print_colored);
    #endif

    /// Assemble the output in a stringstream
    std::ostringstream oss;

    /// Begin box (upper border)
    if ( enclose_in_box ) {
      if ( title.compare("") == 0 ) {
        oss << GREEN(BOX_NW_CORNER);
        for ( size_t i = 0; i < this_many_characters_wide; ++i )
          oss << GREEN(BOX_H_BORDER);
        oss << GREEN(BOX_NE_CORNER) << '\n';
      } else if ( title.size() > this_many_characters_wide ) {
        oss << GREEN(title) << '\n';
      } else {
        size_t filler = this_many_characters_wide-title.size();
        oss << GREEN(BOX_NW_CORNER);
        size_t i = 0;
        /// Ticks left of the title
        while ( i < filler/2 ) {
          oss << GREEN(BOX_H_BORDER);
          ++i;
        }
        oss << GREEN(title);
        /// Skip ticks covered by title
        i += title.length();
        /// Ticks right of the title
        while ( i < this_many_characters_wide ) {
          oss << GREEN(BOX_H_BORDER);
          ++i;
        }
        oss << GREEN(BOX_NE_CORNER) << '\n';
      }
    }


    /// A higher line count means we can display the data more
    /// finely grained!
    size_t levels = this_many_lines_high*TICKS-1;
    /// Stretch plot over multiple lines if requested
    for ( int line = (int)this_many_lines_high-1; line >= 0; --line ) {
      int this_line_min_index = line*TICKS;
      int this_line_max_index = this_line_min_index+(TICKS-1);

      /// Left box border
      if ( enclose_in_box )
        oss << GREEN(BOX_V_BORDER);

      /// Go through all data points
      for ( size_t i = 0; i < this_many_characters_wide; ++i ) {
        const T _data = std::min(maxv, std::max(minv, bins[i]));
        float fraction = (float)(_data-minv)/(float)(maxv-minv);
        int index = std::floor(fraction*levels);
        if ( index < this_line_min_index ) {
          /// Current cell is above the data line -> empty
          oss << ' '; 
        } else if ( index > this_line_max_index ) {
          /// Current cell is below the data line -> solid
          oss << BLUE(ticks[TICKS-1]);
        } else {
          oss << BLUE(ticks[index-this_line_min_index]);
        }
      }

      /// Right box border and min/max value marks
      if ( enclose_in_box ) {
        if ( this_many_lines_high == 1 )
          oss << GREEN(BOX_V_BORDER_TICK) 
              << GREEN(" min: ")
              << std::left << std::setw(PREC) << GREEN(minv) 
              << GREEN(", max: ") 
              << std::left << std::setw(PREC) << GREEN(maxv);
        else if ( line == (int)this_many_lines_high-1 )
          oss << GREEN(BOX_V_BORDER_TICK) << GREEN(" max: ") << GREEN(maxv);
        else if ( line == 0 )
          oss << GREEN(BOX_V_BORDER_TICK) << GREEN(" min: ") << GREEN(minv);
        else
          /// Show "middle" level of this line
          oss << GREEN(BOX_V_BORDER_TICK) << GREEN("      ") 
              << GREEN((line*TICKS+4) * 
                  (maxv-minv)/(this_many_lines_high*TICKS) + minv);
          //oss << GREEN(BOX_V_BORDER);
      }

      if ( line > 0 )
        oss << '\n';
    }

    /// Finish box (lower border and sample index marks)
    if ( enclose_in_box ) {
      /// Compute tick marks positions
      const size_t sep = 2;
      const size_t x_ticks_separation = 2*sep + std::ceil(log10(number_of_data_points+1));
      const size_t x_ticks_number = this_many_characters_wide / x_ticks_separation + 1;
      size_t x_ticks[x_ticks_number];
      size_t x_ticks_values[x_ticks_number];
      for ( size_t i = 0; i < x_ticks_number-1; ++i ) {
        x_ticks[i]        = i*x_ticks_separation;
        x_ticks_values[i] = i*number_of_data_points/x_ticks_number;
      }
      x_ticks[x_ticks_number-1]        = this_many_characters_wide-1;
      x_ticks_values[x_ticks_number-1] = number_of_data_points;

      size_t next_tick = 0;
      oss << '\n';

      oss << GREEN(BOX_SW_CORNER);
      for ( size_t i = 0; i < this_many_characters_wide; ++i )
        if ( i == x_ticks[next_tick] ) {
          oss << GREEN(BOX_H_BORDER_TICK);
          ++next_tick;
        } else {
          oss << GREEN(BOX_H_BORDER);
        }
      oss << GREEN(BOX_SE_CORNER);


      /// X-ticks values
      {
        oss << "\n " << GREEN(x_ticks_values[0]);

        /// Keep track of the line length
        size_t current_col = 1;
        for ( size_t i = 1; i < x_ticks_number-1; ++i ) {
          /// We somehow have to distribute the string representations
          /// of the tick numbers over the length of one line.
          /// 
          ///           x_ticks_separation
          ///      vvvvvvv       >      vvvvvvv   
          ///                    > 
          ///       tofill       >       tofill
          ///        vvvv        >        vvv
          /// ...──┬──────┬──... > ...──┬──────┬──...
          ///     998    999     >     999   1000
          ///       ^    ^^      >       ^   ^^
          ///      lw    rw      >      lw   rw

          /// Width of the current tick's number
          size_t tmp = SparklineHelpers::CharLength(x_ticks_values[i]);
          current_col += tmp;
          /// This iteration takes tmp-tmp/2 characters of the total
          /// width of the next entry. The remaining tmp-2 characters
          /// will by covered by "lw" in the next iteration.
          const size_t rw = tmp-tmp/2;
          /// Width of the previous tick's number
          tmp = SparklineHelpers::CharLength(x_ticks_values[i-1]);
          const size_t lw = tmp/2;

          /// The remaining sepration space is filled with blanks
          size_t tofill = x_ticks_separation - rw - lw;
          oss << std::setw(tofill) << std::setfill(' ') << ' ';
          oss << GREEN(x_ticks_values[i]);

          current_col += tofill;
        }

        oss << std::setw(x_ticks[x_ticks_number-1]
               - current_col
               - SparklineHelpers::CharLength(number_of_data_points)+2)
            << ' ';
        oss << GREEN(x_ticks_values[x_ticks_number-1]) 
            << std::endl;
      }
    }

    return oss.str();
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movl %r9d, -0x48(%rbp)
movq %r8, %r15
movq %rcx, -0x70(%rbp)
movq %rdx, -0x38(%rbp)
movq %rsi, %rbx
movq %rdi, %r14
movss 0x1b8a(%rip), %xmm2     # 0x5098
movaps %xmm2, %xmm3
minss %xmm0, %xmm3
movss 0x1b7f(%rip), %xmm0     # 0x509c
movaps %xmm0, %xmm4
maxss %xmm1, %xmm4
movss %xmm3, -0x40(%rbp)
ucomiss %xmm2, %xmm3
movss %xmm4, -0x50(%rbp)
jne 0x356d
jp 0x356d
ucomiss 0x1b60(%rip), %xmm4     # 0x509c
jne 0x356d
jp 0x356d
xorl %eax, %eax
cmpq %rax, -0x38(%rbp)
je 0x3563
movss (%rbx,%rax,4), %xmm1
movaps %xmm1, %xmm3
minss %xmm2, %xmm3
maxss %xmm0, %xmm1
incq %rax
movaps %xmm1, %xmm0
movaps %xmm3, %xmm2
jmp 0x3542
movss %xmm0, -0x50(%rbp)
movss %xmm2, -0x40(%rbp)
callq 0x269c
movzwl %ax, %eax
leaq -0x14(%rax), %rcx
cmpb $0x0, -0x48(%rbp)
cmoveq %rax, %rcx
testq %r15, %r15
cmoveq -0x38(%rbp), %r15
cmpq %r15, %rcx
cmovbq %rcx, %r15
testq %r15, %r15
movq %r15, -0x30(%rbp)
js 0x35a0
cvtsi2ss %r15, %xmm2
jmp 0x35b8
movq %r15, %rax
shrq %rax
movl %r15d, %ecx
andl $0x1, %ecx
orq %rax, %rcx
cvtsi2ss %rcx, %xmm2
addss %xmm2, %xmm2
movq -0x38(%rbp), %rdx
testq %rdx, %rdx
js 0x35c8
cvtsi2ss %rdx, %xmm0
jmp 0x35df
movq %rdx, %rax
shrq %rax
movl %edx, %ecx
andl $0x1, %ecx
orq %rax, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
movq %r14, -0x88(%rbp)
movq -0x30(%rbp), %rsi
cmpq %rdx, %rsi
ja 0x3d99
divss %xmm0, %xmm2
movq %rsp, %r14
leaq 0xf(,%rsi,4), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movq %rsp, %rax
leaq 0x1(%rsi), %rdx
movq %rsp, %rcx
leaq 0x13(,%rsi,4), %rsi
andq $-0x10, %rsi
subq %rsi, %rcx
movq %rcx, %rsp
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x3662
testq %rsi, %rsi
js 0x363b
cvtsi2ss %rsi, %xmm0
jmp 0x3654
movq %rsi, %rdi
shrq %rdi
movl %esi, %r8d
andl $0x1, %r8d
orq %rdi, %r8
cvtsi2ss %r8, %xmm0
addss %xmm0, %xmm0
divss %xmm2, %xmm0
movss %xmm0, (%rcx,%rsi,4)
incq %rsi
jmp 0x362a
movss 0x1a36(%rip), %xmm0     # 0x50a0
movaps %xmm0, %xmm1
divss %xmm2, %xmm1
xorl %edx, %edx
movss 0x1a29(%rip), %xmm2     # 0x50a4
xorps %xmm3, %xmm3
cmpq -0x30(%rbp), %rdx
je 0x3760
movss (%rcx,%rdx,4), %xmm6
cvttss2si %xmm6, %rsi
movq %rsi, %r8
sarq $0x3f, %r8
movaps %xmm6, %xmm4
subss %xmm2, %xmm4
cvttss2si %xmm4, %rdi
andq %r8, %rdi
orq %rsi, %rdi
js 0x36b4
cvtsi2ss %rdi, %xmm4
jmp 0x36cd
movq %rdi, %rsi
shrq %rsi
movl %edi, %r8d
andl $0x1, %r8d
orq %rsi, %r8
cvtsi2ss %r8, %xmm4
addss %xmm4, %xmm4
leaq 0x1(%rdx), %rsi
movss 0x4(%rcx,%rdx,4), %xmm5
subss %xmm6, %xmm4
addss %xmm0, %xmm4
mulss (%rbx,%rdi,4), %xmm4
addss %xmm3, %xmm4
cvttss2si %xmm5, %r9
movq %r9, %r10
movaps %xmm5, %xmm6
subss %xmm2, %xmm6
cvttss2si %xmm6, %r8
sarq $0x3f, %r10
andq %r10, %r8
orq %r9, %r8
incq %rdi
cmpq %r8, %rdi
jae 0x3715
addss (%rbx,%rdi,4), %xmm4
jmp 0x3706
cmpq -0x38(%rbp), %r8
jae 0x374e
testq %r8, %r8
js 0x3727
cvtsi2ss %r8, %xmm6
jmp 0x3740
movq %r8, %rdi
shrq %rdi
movl %r8d, %r9d
andl $0x1, %r9d
orq %rdi, %r9
cvtsi2ss %r9, %xmm6
addss %xmm6, %xmm6
subss %xmm6, %xmm5
mulss (%rbx,%r8,4), %xmm5
addss %xmm5, %xmm4
divss %xmm1, %xmm4
movss %xmm4, (%r14,%rdx,4)
movq %rsi, %rdx
jmp 0x367e
movq %rax, %rsp
leaq -0x200(%rbp), %rdi
callq 0x21f0
cmpb $0x0, -0x48(%rbp)
je 0x3890
leaq 0x19ef(%rip), %rsi      # 0x516f
movq 0x18(%rbp), %rbx
movq %rbx, %rdi
callq 0x2070
testl %eax, %eax
je 0x37bd
movq -0x30(%rbp), %r12
subq 0x8(%rbx), %r12
jae 0x37fc
movq 0x18(%rbp), %r12
leaq -0x200(%rbp), %rdi
movq %r12, %rsi
callq 0x2190
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x21d0
jmp 0x3890
leaq 0x4adc(%rip), %rsi      # 0x82a0
leaq -0x200(%rbp), %rdi
callq 0x2190
leaq 0x4ae9(%rip), %r12      # 0x82c0
leaq 0x4b42(%rip), %rbx      # 0x8320
leaq -0x200(%rbp), %r13
movq -0x30(%rbp), %r15
subq $0x1, %r15
jb 0x379e
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2190
jmp 0x37e9
leaq 0x4a9d(%rip), %rsi      # 0x82a0
leaq -0x200(%rbp), %rdi
callq 0x2190
shrq %r12
leaq 0x4b07(%rip), %rbx      # 0x8320
leaq -0x200(%rbp), %r13
movq %r12, %r15
subq $0x1, %r15
jb 0x3836
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2190
jmp 0x3823
leaq -0x200(%rbp), %rdi
movq 0x18(%rbp), %rsi
callq 0x2190
movq 0x18(%rbp), %rax
addq 0x8(%rax), %r12
leaq 0x4acb(%rip), %rbx      # 0x8320
leaq -0x200(%rbp), %r13
cmpq -0x30(%rbp), %r12
jae 0x3872
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2190
incq %r12
jmp 0x385c
leaq 0x4a47(%rip), %rsi      # 0x82c0
leaq -0x200(%rbp), %rdi
callq 0x2190
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x21d0
movq -0x70(%rbp), %rcx
leaq (,%rcx,8), %rax
leaq -0x1(,%rcx,8), %rcx
testq %rcx, %rcx
js 0x38b0
cvtsi2ss %rcx, %xmm0
jmp 0x38bc
shrq %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
movss %xmm0, -0x68(%rbp)
testq %rax, %rax
js 0x38cd
cvtsi2ss %rax, %xmm0
jmp 0x38d9
shrq %rax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
movss %xmm0, -0x5c(%rbp)
movq -0x70(%rbp), %rax
decl %eax
movss -0x50(%rbp), %xmm0
subss -0x40(%rbp), %xmm0
movss %xmm0, -0x58(%rbp)
leaq -0x200(%rbp), %r13
movl %eax, -0x7c(%rbp)
movl %eax, %ebx
testl %ebx, %ebx
js 0x3af6
cmpb $0x0, -0x48(%rbp)
je 0x391c
movq %r13, %rdi
leaq 0x4a49(%rip), %rsi      # 0x8360
callq 0x2190
leal (,%rbx,8), %r12d
movq %rbx, -0x78(%rbp)
leal 0x7(,%rbx,8), %ebx
xorl %r15d, %r15d
cmpq %r15, -0x30(%rbp)
je 0x399e
movss (%r14,%r15,4), %xmm0
movss -0x40(%rbp), %xmm1
maxss %xmm1, %xmm0
minss -0x50(%rbp), %xmm0
subss %xmm1, %xmm0
divss -0x58(%rbp), %xmm0
mulss -0x68(%rbp), %xmm0
callq 0x2090
cvttss2si %xmm0, %ecx
movl %ecx, %eax
subl %r12d, %eax
jge 0x3977
movq %r13, %rdi
pushq $0x20
popq %rsi
callq 0x21d0
jmp 0x3999
movl $0xe0, %esi
cmpl %ecx, %ebx
jl 0x3987
movslq %eax, %rsi
shlq $0x5, %rsi
leaq 0x4812(%rip), %rax      # 0x81a0
addq %rax, %rsi
movq %r13, %rdi
callq 0x2190
incq %r15
jmp 0x3932
cmpb $0x0, -0x48(%rbp)
movq -0x78(%rbp), %rbx
je 0x3a6f
cmpq $0x1, -0x70(%rbp)
jne 0x3a3f
movq %r13, %rdi
leaq 0x49bf(%rip), %rsi      # 0x8380
callq 0x2190
movq %rax, %rdi
leaq 0x1ad7(%rip), %rsi      # 0x54a7
callq 0x21a0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
movl $0xffffff4f, %edi       # imm = 0xFFFFFF4F
andl %edi, %esi
orl $0x20, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0xc, 0x10(%rax,%rcx)
movq %rax, %rdi
movss -0x40(%rbp), %xmm0
callq 0x2150
movq %rax, %rdi
leaq 0x1a9c(%rip), %rsi      # 0x54ae
callq 0x21a0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
movl $0xffffff4f, %edi       # imm = 0xFFFFFF4F
andl %edi, %esi
orl $0x20, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0xc, 0x10(%rax,%rcx)
jmp 0x3a62
cmpl -0x7c(%rbp), %ebx
jne 0x3a85
movq %r13, %rdi
leaq 0x4932(%rip), %rsi      # 0x8380
callq 0x2190
movq %rax, %rdi
leaq 0x1a52(%rip), %rsi      # 0x54af
callq 0x21a0
movq %rax, %rdi
movss -0x50(%rbp), %xmm0
callq 0x2150
testl %ebx, %ebx
je 0x3a7e
movq %r13, %rdi
pushq $0xa
popq %rsi
callq 0x21d0
decl %ebx
jmp 0x38ff
testl %ebx, %ebx
je 0x3ac9
movq %r13, %rdi
leaq 0x48ed(%rip), %rsi      # 0x8380
callq 0x2190
movq %rax, %rdi
leaq 0x18ae(%rip), %rsi      # 0x5350
callq 0x21a0
orl $0x4, %r12d
cvtsi2ss %r12, %xmm0
mulss -0x58(%rbp), %xmm0
divss -0x5c(%rbp), %xmm0
addss -0x40(%rbp), %xmm0
movq %rax, %rdi
callq 0x2150
jmp 0x3a73
movq %r13, %rdi
leaq 0x48ad(%rip), %rsi      # 0x8380
callq 0x2190
movq %rax, %rdi
leaq 0x19c5(%rip), %rsi      # 0x54a7
callq 0x21a0
movq %rax, %rdi
movss -0x40(%rbp), %xmm0
callq 0x2150
jmp 0x3a7e
cmpb $0x0, -0x48(%rbp)
je 0x3d65
movq -0x38(%rbp), %rax
incq %rax
movq %rax, %xmm1
punpckldq 0x14fc(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1504(%rip), %xmm1     # 0x5020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
callq 0x20f0
callq 0x2030
movq %rsp, -0x78(%rbp)
addsd 0x153a(%rip), %xmm0     # 0x5078
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x151e(%rip), %xmm0     # 0x5070
cvttsd2si %xmm0, %r9
andq %rcx, %r9
orq %rax, %r9
xorl %ecx, %ecx
movq -0x30(%rbp), %rax
xorl %edx, %edx
divq %r9
movq %rax, %r10
leaq 0x1(%rax), %rsi
leaq 0x17(,%rax,8), %rax
andq $-0x10, %rax
movq %rsp, %r14
subq %rax, %r14
movq %r14, %rsp
movq %rsp, %r11
subq %rax, %r11
movq %r11, %rsp
xorl %edi, %edi
xorl %r8d, %r8d
cmpq %r10, %r8
jae 0x3bb3
movq %rdi, (%r14,%r8,8)
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rax, (%r11,%r8,8)
incq %r8
addq %r9, %rdi
addq -0x38(%rbp), %rcx
jmp 0x3b92
movq %r9, -0x68(%rbp)
movq -0x30(%rbp), %rax
decq %rax
movq %rax, -0x48(%rbp)
movq %rax, (%r14,%r10,8)
movq -0x38(%rbp), %rax
movq %r10, -0x58(%rbp)
movq %r11, -0x50(%rbp)
movq %rax, (%r11,%r10,8)
leaq -0x200(%rbp), %rdi
pushq $0xa
popq %rsi
callq 0x21d0
leaq 0x46f4(%rip), %rsi      # 0x82e0
leaq -0x200(%rbp), %rdi
callq 0x2190
xorl %ebx, %ebx
leaq -0x200(%rbp), %r12
leaq 0x4718(%rip), %r13      # 0x8320
xorl %r15d, %r15d
cmpq %r15, -0x30(%rbp)
je 0x3c3b
cmpq (%r14,%rbx,8), %r15
jne 0x3c2b
movq %r12, %rdi
leaq 0x471f(%rip), %rsi      # 0x8340
callq 0x2190
incq %rbx
jmp 0x3c36
movq %r12, %rdi
movq %r13, %rsi
callq 0x2190
incq %r15
jmp 0x3c0b
leaq 0x46be(%rip), %rsi      # 0x8300
leaq -0x200(%rbp), %rdi
callq 0x2190
leaq 0x1861(%rip), %rsi      # 0x54b6
leaq -0x200(%rbp), %rdi
callq 0x21a0
movq -0x50(%rbp), %rcx
movq (%rcx), %rsi
movq %rax, %rdi
callq 0x2120
pushq $0x1
popq %r12
movq %r12, %r15
movq -0x58(%rbp), %rax
cmpq %rax, %r15
jae 0x3d11
movq %r12, -0x30(%rbp)
movq -0x50(%rbp), %rbx
movq (%rbx,%r15,8), %r14
movq %r14, %rdi
callq 0x26c2
movq %rax, %r12
movq %rax, %r13
shrq %r13
movq %r15, -0x40(%rbp)
movq -0x8(%rbx,%r15,8), %rdi
leaq -0x200(%rbp), %rbx
pushq $0x20
popq %r15
callq 0x26c2
shrq %rax
addq -0x68(%rbp), %r13
addq %r12, %rax
subq %rax, %r13
movq -0x200(%rbp), %rax
movq -0x18(%rax), %rax
movslq %r13d, %rcx
movq %rcx, -0x1f0(%rbp,%rax)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x2250
movq %rax, %rdi
movl %r15d, %esi
callq 0x21d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2120
addq -0x30(%rbp), %r12
addq %r13, %r12
movq -0x40(%rbp), %r15
incq %r15
jmp 0x3c77
movq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x26c2
addl %r12d, %eax
movq -0x48(%rbp), %rcx
subl %eax, %ecx
leaq -0x200(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addl $0x2, %ecx
movslq %ecx, %rcx
movq %rcx, -0x1f0(%rbp,%rax)
pushq $0x20
popq %rsi
callq 0x21d0
leaq -0x200(%rbp), %rdi
movq %r14, %rsi
callq 0x2120
movq %rax, %rdi
callq 0x20d0
movq -0x78(%rbp), %rsp
leaq -0x1f8(%rbp), %rsi
movq -0x88(%rbp), %rbx
movq %rbx, %rdi
callq 0x2260
leaq -0x200(%rbp), %rdi
callq 0x2050
movq %rbx, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %r14
leaq 0x16e3(%rip), %rsi      # 0x548e
movq %rax, %rdi
callq 0x20a0
movq 0x4236(%rip), %rsi      # 0x7ff0
movq 0x41f7(%rip), %rdx      # 0x7fb8
movq %r14, %rdi
callq 0x2280
jmp 0x3dee
jmp 0x3dee
movq %rax, %rbx
movq %r14, %rdi
callq 0x2140
jmp 0x3dfd
jmp 0x3dee
jmp 0x3dee
jmp 0x3dee
jmp 0x3dee
jmp 0x3dee
jmp 0x3dee
jmp 0x3dee
jmp 0x3dee
jmp 0x3dee
jmp 0x3dee
movq %rax, %rbx
leaq -0x200(%rbp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2290