// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng_unittest.cpp
// Function: doTestHuffmanCodeLengths(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
void doTestHuffmanCodeLengths(const std::string& expectedstr, const std::string& counts, size_t bitlength) {
  std::vector<unsigned> expected = strtovector(expectedstr);
  std::vector<unsigned> count = strtovector(counts);
  std::cout << "doTestHuffmanCodeLengths: " << counts << std::endl;
  std::vector<unsigned> result(count.size());
  unsigned error = lodepng_huffman_code_lengths(&result[0], &count[0], count.size(), bitlength);
  ASSERT_NO_PNG_ERROR_MSG(error, "errorcode");
  std::stringstream ss1, ss2;
  for(size_t i = 0; i < count.size(); i++) {
    ss1 << expected[i] << " ";
    ss2 << result[i] << " ";
  }
  assertEquals(ss1.str(), ss2.str(), "value");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
leaq 0xa0(%rsp), %rdi
callq 0x1b31c
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x1b31c
movq 0x87be9(%rip), %rdi     # 0xa2fd8
leaq 0x458e7(%rip), %rsi     # 0x60cdd
callq 0x21f0
movq %rax, %rdi
movq %r14, %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x2100
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x2, %rsi
leaq 0x260(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x88(%rsp), %rdi
leaq 0xd8(%rsp), %rcx
callq 0x5abb6
movq 0x88(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
subq %rsi, %rdx
sarq $0x2, %rdx
movl %ebx, %ecx
callq 0x2614
movl %eax, %ebx
leaq 0x44d78(%rip), %rsi     # 0x601dd
leaq 0x68(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x20c0
leaq 0x4587d(%rip), %rdx     # 0x60cf8
leaq 0xd8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5a5df
leaq 0x45869(%rip), %rsi     # 0x60cfd
leaq 0x48(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
movq 0x50(%rsp), %r14
testq %r14, %r14
je 0x1b4e1
leaq 0x45849(%rip), %rsi     # 0x60cfd
leaq 0xb8(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x20c0
leaq 0x482d8(%rip), %rsi     # 0x637a5
leaq 0x28(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0x5a8d9
jmp 0x1b4fa
leaq 0x460de(%rip), %rsi     # 0x615c6
leaq 0x28(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0x20c0
leaq 0x260(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x5a61f
leaq 0x260(%rsp), %rsi
movl %ebx, %edi
callq 0x13352
leaq 0x260(%rsp), %rdi
callq 0x2270
leaq 0x28(%rsp), %rdi
callq 0x2270
testq %r14, %r14
je 0x1b54c
leaq 0xb8(%rsp), %rdi
callq 0x2270
leaq 0x48(%rsp), %rdi
callq 0x2270
leaq 0xd8(%rsp), %rdi
callq 0x2270
leaq 0x68(%rsp), %rdi
callq 0x2270
leaq 0x260(%rsp), %rdi
callq 0x2160
leaq 0xd8(%rsp), %rdi
callq 0x2160
leaq 0x270(%rsp), %rbx
leaq 0xe8(%rsp), %r14
xorl %r12d, %r12d
leaq 0x46024(%rip), %r15     # 0x615c5
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x2, %rax
cmpq %rax, %r12
jae 0x1b5f7
movq 0xa0(%rsp), %rax
movl (%rax,%r12,4), %esi
movq %rbx, %rdi
callq 0x2140
movq %rax, %rdi
movq %r15, %rsi
callq 0x21f0
movq 0x88(%rsp), %rax
movl (%rax,%r12,4), %esi
movq %r14, %rdi
callq 0x2140
movq %rax, %rdi
movq %r15, %rsi
callq 0x21f0
incq %r12
jmp 0x1b5a1
leaq 0x278(%rsp), %rsi
leaq 0x68(%rsp), %rdi
callq 0x22f0
leaq 0xf0(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x22f0
leaq 0x456e5(%rip), %rsi     # 0x60d07
leaq 0x48(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x20c0
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x5ac14
leaq 0x48(%rsp), %rdi
callq 0x2270
leaq 0x28(%rsp), %rdi
callq 0x2270
leaq 0x68(%rsp), %rdi
callq 0x2270
leaq 0xd8(%rsp), %rdi
callq 0x2170
leaq 0x260(%rsp), %rdi
callq 0x2170
leaq 0x88(%rsp), %rdi
callq 0x5b198
leaq 0x10(%rsp), %rdi
callq 0x5b198
leaq 0xa0(%rsp), %rdi
callq 0x5b198
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x1b6ec
movq %rax, %rbx
jmp 0x1b744
jmp 0x1b774
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2270
jmp 0x1b6fe
movq %rax, %rbx
jmp 0x1b73f
movq %rax, %rbx
leaq 0x260(%rsp), %rdi
callq 0x2270
jmp 0x1b735
jmp 0x1b723
jmp 0x1b774
movq %rax, %rbx
jmp 0x1b751
jmp 0x1b779
movq %rax, %rbx
jmp 0x1b708
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x2270
leaq 0x68(%rsp), %rdi
callq 0x2270
jmp 0x1b77c
jmp 0x1b723
movq %rax, %rbx
jmp 0x1b789
movq %rax, %rbx
jmp 0x1b7ad
movq %rax, %rbx
jmp 0x1b796
movq %rax, %rbx
jmp 0x1b768
movq %rax, %rbx
jmp 0x1b75b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x2270
testq %r14, %r14
je 0x1b751
leaq 0xb8(%rsp), %rdi
callq 0x2270
leaq 0x48(%rsp), %rdi
callq 0x2270
leaq 0xd8(%rsp), %rdi
callq 0x2270
leaq 0x68(%rsp), %rdi
callq 0x2270
jmp 0x1b796
movq %rax, %rbx
jmp 0x1b7a3
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x2170
leaq 0x260(%rsp), %rdi
callq 0x2170
leaq 0x88(%rsp), %rdi
callq 0x5b198
leaq 0x10(%rsp), %rdi
callq 0x5b198
leaq 0xa0(%rsp), %rdi
callq 0x5b198
movq %rbx, %rdi
callq 0x2380
movq %rax, %rdi
callq 0xe6cc