// File: /workspace/github_c_makefile_star2_O0/aspone[P]OrderBook/./OrderBook.h
// Function: OrderBook::OrderBook<unsigned int, OrderLevelEntry>::printBook()
void printBook() {
      int max_buffer = 500;
      char *buffer = (char*)calloc(max_buffer, sizeof(char));
      int index = 0;

      for (auto it = sell_book_map_.rbegin(); it != sell_book_map_.rend(); ++it) {
         if (it->second.getQuantity() != 0) {
            // char header[50];
            // sprintf(header, "%.2f ", it->first / 100.);
            // safeCopyToBuffer(buffer, header, index, max_buffer);

            // 2 ^ 308, double max, is 93 digits.
            if (index + 100 > max_buffer) growBuffer(buffer, max_buffer);
            index += sprintf(&buffer[index], "%.2f ", it->first / 100.);

            it->second.printLevel('S', buffer, index, max_buffer);

            // safeCopyToBuffer(buffer, "\n", index, max_buffer);

            if (index + 10 > max_buffer) growBuffer(buffer, max_buffer);
            index += sprintf(&buffer[index], "\n");
         }
      }
      safeCopyToBuffer(buffer, "\n", index, max_buffer);
      for (auto it = buy_book_map_.rbegin(); it != buy_book_map_.rend(); ++it) {
         if (it->second.getQuantity() != 0) {
            // char header[50];
            // sprintf(header, "%.2f ", it->first / 100.);
            // safeCopyToBuffer(buffer, header, index, max_buffer);

            // 2 ^ 308, double max, is 93 digits.
            if (index + 100 > max_buffer) growBuffer(buffer, max_buffer);
            index += sprintf(&buffer[index], "%.2f ", it->first / 100.);

            it->second.printLevel('B', buffer, index, max_buffer);

            // safeCopyToBuffer(buffer, "\n", index, max_buffer);

            if (index + 10 > max_buffer) growBuffer(buffer, max_buffer);
            index += sprintf(&buffer[index], "\n");
         }
      }
      // safeCopyToBuffer(buffer, "\n", index, max_buffer);
      if (index + 10 > max_buffer) growBuffer(buffer, max_buffer);
      index += sprintf(&buffer[index], "\n");

      logger_.print(buffer);
      free(buffer);
   }

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x28(%rsp)
movl $0x1f4, 0x9c(%rsp) # imm = 0x1F4
movslq 0x9c(%rsp), %rdi
movl $0x1, %esi
callq 0x2120
movq 0x28(%rsp), %rsi
movq %rax, 0x90(%rsp)
movl $0x0, 0x8c(%rsp)
addq $0x108, %rsi            # imm = 0x108
leaq 0x80(%rsp), %rdi
callq 0xefd0
movq 0x28(%rsp), %rsi
addq $0x108, %rsi            # imm = 0x108
leaq 0x78(%rsp), %rdi
callq 0xf5c0
leaq 0x80(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xf590
testb $0x1, %al
jne 0xf156
jmp 0xf2b9
leaq 0x80(%rsp), %rdi
callq 0xf000
movq %rax, %rdi
addq $0x8, %rdi
callq 0xb820
cmpl $0x0, %eax
je 0xf2a5
movl 0x8c(%rsp), %eax
addl $0x64, %eax
cmpl 0x9c(%rsp), %eax
jle 0xf1a0
leaq 0x90(%rsp), %rdi
leaq 0x9c(%rsp), %rsi
callq 0x2990
movq 0x90(%rsp), %rax
movslq 0x8c(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
leaq 0x80(%rsp), %rdi
callq 0xf000
movq 0x20(%rsp), %rdi
movq (%rax), %xmm0
movaps 0xecb(%rip), %xmm1      # 0x100a0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0xecf(%rip), %xmm1      # 0x100b0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0xe78(%rip), %xmm1      # 0x10070
divsd %xmm1, %xmm0
leaq 0x1159(%rip), %rsi      # 0x1035c
movb $0x1, %al
callq 0x2040
addl 0x8c(%rsp), %eax
movl %eax, 0x8c(%rsp)
leaq 0x80(%rsp), %rdi
callq 0xf000
movq %rax, %rdi
addq $0x8, %rdi
movl $0x53, %esi
leaq 0x90(%rsp), %rdx
leaq 0x8c(%rsp), %rcx
leaq 0x9c(%rsp), %r8
callq 0xf5f0
movl 0x8c(%rsp), %eax
addl $0xa, %eax
cmpl 0x9c(%rsp), %eax
jle 0xf276
leaq 0x90(%rsp), %rdi
leaq 0x9c(%rsp), %rsi
callq 0x2990
movq 0x90(%rsp), %rdi
movslq 0x8c(%rsp), %rax
addq %rax, %rdi
leaq 0x10c5(%rip), %rsi      # 0x10355
movb $0x0, %al
callq 0x2040
addl 0x8c(%rsp), %eax
movl %eax, 0x8c(%rsp)
jmp 0xf2a7
leaq 0x80(%rsp), %rdi
callq 0xf720
jmp 0xf125
leaq 0x90(%rsp), %rdi
leaq 0x108d(%rip), %rsi      # 0x10355
leaq 0x8c(%rsp), %rdx
leaq 0x9c(%rsp), %rcx
callq 0x2a10
movq 0x28(%rsp), %rsi
addq $0xd8, %rsi
leaq 0x70(%rsp), %rdi
callq 0xefd0
movq 0x28(%rsp), %rsi
addq $0xd8, %rsi
leaq 0x68(%rsp), %rdi
callq 0xf5c0
leaq 0x70(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xf590
testb $0x1, %al
jne 0xf321
jmp 0xf478
leaq 0x70(%rsp), %rdi
callq 0xf000
movq %rax, %rdi
addq $0x8, %rdi
callq 0xb820
cmpl $0x0, %eax
je 0xf467
movl 0x8c(%rsp), %eax
addl $0x64, %eax
cmpl 0x9c(%rsp), %eax
jle 0xf368
leaq 0x90(%rsp), %rdi
leaq 0x9c(%rsp), %rsi
callq 0x2990
movq 0x90(%rsp), %rax
movslq 0x8c(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xf000
movq 0x18(%rsp), %rdi
movq (%rax), %xmm0
movaps 0xd06(%rip), %xmm1      # 0x100a0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0xd0a(%rip), %xmm1      # 0x100b0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0xcb3(%rip), %xmm1      # 0x10070
divsd %xmm1, %xmm0
leaq 0xf94(%rip), %rsi       # 0x1035c
movb $0x1, %al
callq 0x2040
addl 0x8c(%rsp), %eax
movl %eax, 0x8c(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xf000
movq %rax, %rdi
addq $0x8, %rdi
movl $0x42, %esi
leaq 0x90(%rsp), %rdx
leaq 0x8c(%rsp), %rcx
leaq 0x9c(%rsp), %r8
callq 0xf5f0
movl 0x8c(%rsp), %eax
addl $0xa, %eax
cmpl 0x9c(%rsp), %eax
jle 0xf438
leaq 0x90(%rsp), %rdi
leaq 0x9c(%rsp), %rsi
callq 0x2990
movq 0x90(%rsp), %rdi
movslq 0x8c(%rsp), %rax
addq %rax, %rdi
leaq 0xf03(%rip), %rsi       # 0x10355
movb $0x0, %al
callq 0x2040
addl 0x8c(%rsp), %eax
movl %eax, 0x8c(%rsp)
jmp 0xf469
leaq 0x70(%rsp), %rdi
callq 0xf720
jmp 0xf2f3
movl 0x8c(%rsp), %eax
addl $0xa, %eax
cmpl 0x9c(%rsp), %eax
jle 0xf4a0
leaq 0x90(%rsp), %rdi
leaq 0x9c(%rsp), %rsi
callq 0x2990
movq 0x90(%rsp), %rdi
movslq 0x8c(%rsp), %rax
addq %rax, %rdi
leaq 0xe9b(%rip), %rsi       # 0x10355
xorl %eax, %eax
callq 0x2040
movl %eax, %edx
movq 0x28(%rsp), %rax
movl 0x8c(%rsp), %ecx
addl %edx, %ecx
movl %ecx, 0x8c(%rsp)
movq %rax, (%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x47(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x2310
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x2250
jmp 0xf50e
movq (%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xb8e0
jmp 0xf51e
leaq 0x48(%rsp), %rdi
callq 0x2110
leaq 0x47(%rsp), %rdi
callq 0x2200
movq 0x90(%rsp), %rdi
callq 0x2220
addq $0xa8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0xf56f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x2110
leaq 0x47(%rsp), %rdi
callq 0x2200
movq 0x38(%rsp), %rdi
callq 0x2300
nopw %cs:(%rax,%rax)
nopl (%rax)