// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3d8, %rsp            # imm = 0x3D8
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
leaq 0xb0(%rsp), %rdi
callq 0x200a3
movq %rsp, %rdi
movq %r14, %rsi
callq 0x200a3
movq 0x93e3d(%rip), %rdi     # 0xb3fd8
leaq 0x56cdb(%rip), %rsi     # 0x76e7d
movl $0x1a, %edx
callq 0x2280
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x93e1e(%rip), %rdi     # 0xb3fd8
callq 0x2280
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq 0x8(%rsp), %rsi
subq (%rsp), %rsi
sarq $0x2, %rsi
leaq 0x250(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x78(%rsp), %rdi
leaq 0xc8(%rsp), %rcx
callq 0x707ce
movq 0x78(%rsp), %rdi
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
subq %rsi, %rdx
sarq $0x2, %rdx
movl %ebx, %ecx
callq 0x2711
movl %eax, %ebx
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x56139(%rip), %rsi     # 0x7637d
leaq 0x56137(%rip), %rdx     # 0x76382
leaq 0x18(%rsp), %rdi
callq 0x14f6e
leaq 0xd8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc8(%rsp), %rdi
callq 0x1518a
leaq 0x56c16(%rip), %rsi     # 0x76e98
leaq 0xc8(%rsp), %rdi
callq 0x23e0
leaq 0x68(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x56bfe(%rip), %rsi     # 0x76e9d
leaq 0x56c00(%rip), %rdx     # 0x76ea6
leaq 0x58(%rsp), %rdi
callq 0x14f6e
movq 0x60(%rsp), %r15
testq %r15, %r15
je 0x202fd
leaq 0xa0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x56bcf(%rip), %rsi     # 0x76e9d
leaq 0x56bd1(%rip), %rdx     # 0x76ea6
leaq 0x90(%rsp), %rdi
callq 0x14f6e
leaq 0x5965c(%rip), %rsi     # 0x79945
leaq 0x38(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x70423
jmp 0x2031a
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x57459(%rip), %rdx     # 0x77766
leaq 0x38(%rsp), %rdi
movq %rdx, %rsi
callq 0x14f6e
leaq 0x250(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x70057
leaq 0x250(%rsp), %rsi
movl %ebx, %edi
callq 0x16314
leaq 0x260(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20359
callq 0x2210
leaq 0x48(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x2036c
callq 0x2210
testq %r15, %r15
je 0x20387
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20387
callq 0x2210
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x20396
callq 0x2210
movq 0xc8(%rsp), %rdi
cmpq %r14, %rdi
je 0x203a8
callq 0x2210
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x203bc
callq 0x2210
leaq 0x250(%rsp), %rdi
callq 0x2190
leaq 0xc8(%rsp), %rdi
callq 0x2190
movq 0x8(%rsp), %rax
cmpq (%rsp), %rax
je 0x20455
leaq 0x260(%rsp), %rbx
leaq 0xd8(%rsp), %r14
xorl %r12d, %r12d
leaq 0x5736a(%rip), %r15     # 0x77765
movq 0xb0(%rsp), %rax
movl (%rax,%r12,4), %esi
movq %rbx, %rdi
callq 0x2160
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2280
movq 0x78(%rsp), %rax
movl (%rax,%r12,4), %esi
movq %r14, %rdi
callq 0x2160
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2280
incq %r12
movq 0x8(%rsp), %rax
subq (%rsp), %rax
sarq $0x2, %rax
cmpq %rax, %r12
jb 0x203fb
leaq 0x268(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x2320
leaq 0xe0(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x2320
leaq 0x58(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x56a1f(%rip), %rsi     # 0x76ea7
leaq 0x56a1d(%rip), %rdx     # 0x76eac
callq 0x14f6e
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x7094a
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x204b7
callq 0x2210
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x204c6
callq 0x2210
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x204da
callq 0x2210
leaq 0xc8(%rsp), %rdi
callq 0x21b0
leaq 0x250(%rsp), %rdi
callq 0x21b0
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x20503
callq 0x2210
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x20511
callq 0x2210
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x20523
callq 0x2210
addq $0x3d8, %rsp            # imm = 0x3D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x20550
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r12, %rdi
jne 0x205ec
jmp 0x205f1
movq %rax, %rbx
jmp 0x205f1
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x2056f
callq 0x2210
jmp 0x2056f
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20583
callq 0x2210
jmp 0x20583
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x20651
callq 0x2210
jmp 0x20651
jmp 0x2064e
movq %rax, %rbx
leaq 0x260(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x205c3
callq 0x2210
jmp 0x205c3
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x205d6
callq 0x2210
testq %r15, %r15
je 0x205f1
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x205f1
callq 0x2210
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x20607
callq 0x2210
jmp 0x20607
jmp 0x20604
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2061e
callq 0x2210
jmp 0x2061e
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2066b
callq 0x2210
jmp 0x2066b
jmp 0x2063f
jmp 0x2063f
jmp 0x20649
movq %rax, %rbx
jmp 0x20688
movq %rax, %rbx
jmp 0x2066b
movq %rax, %rbx
jmp 0x2065e
movq %rax, %rbx
jmp 0x2067a
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x21b0
leaq 0x250(%rsp), %rdi
callq 0x21b0
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x2067a
callq 0x2210
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x20688
callq 0x2210
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x2069a
callq 0x2210
movq %rbx, %rdi
callq 0x23c0
movq %rax, %rdi
callq 0x14d36