// File: /workspace/github_c_makefile_star2_O0/imaya[P]zopfli-for-emscripten/blocksplitter.c
// Function: PrintBlockSplitPoints
static void PrintBlockSplitPoints(const unsigned short* litlens,
                                  const unsigned short* dists,
                                  size_t llsize, const size_t* lz77splitpoints,
                                  size_t nlz77points) {
  size_t* splitpoints = 0;
  size_t npoints = 0;
  size_t i;
  /* The input is given as lz77 indices, but we want to see the uncompressed
  index values. */
  size_t pos = 0;
  if (nlz77points > 0) {
    for (i = 0; i < llsize; i++) {
      size_t length = dists[i] == 0 ? 1 : litlens[i];
      if (lz77splitpoints[npoints] == i) {
        ZOPFLI_APPEND_DATA(pos, &splitpoints, &npoints);
        if (npoints == nlz77points) break;
      }
      pos += length;
    }
  }
  assert(npoints == nlz77points);

  fprintf(stderr, "block split points: ");
  for (i = 0; i < npoints; i++) {
    fprintf(stderr, "%d ", (int)splitpoints[i]);
  }
  fprintf(stderr, "(hex:");
  for (i = 0; i < npoints; i++) {
    fprintf(stderr, " %x", (int)splitpoints[i]);
  }
  fprintf(stderr, ")\n");

  free(splitpoints);
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x20(%rsp)
cmpq $0x0, 0x40(%rsp)
jbe 0x1deb
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x50(%rsp), %rax
jae 0x1de9
movq 0x58(%rsp), %rax
movq 0x28(%rsp), %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
jne 0x1d0b
movl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x1d1d
movq 0x60(%rsp), %rax
movq 0x28(%rsp), %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
cltq
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq 0x28(%rsp), %rax
jne 0x1dc7
movq 0x30(%rsp), %rax
movq 0x30(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x1d96
cmpq $0x0, 0x30(%rsp)
jne 0x1d71
movl $0x8, %edi
callq 0x1120
movq %rax, 0x8(%rsp)
jmp 0x1d8c
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
shlq %rsi
shlq $0x3, %rsi
callq 0x1140
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x20(%rsp), %rdx
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x40(%rsp), %rax
jne 0x1dc5
jmp 0x1de9
jmp 0x1dc7
movq 0x18(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x1cdd
jmp 0x1deb
movq 0x30(%rsp), %rax
cmpq 0x40(%rsp), %rax
jne 0x1df9
jmp 0x1e18
leaq 0xb2d1(%rip), %rdi      # 0xd0d1
leaq 0xb217(%rip), %rsi      # 0xd01e
movl $0xac, %edx
leaq 0xb346(%rip), %rcx      # 0xd159
callq 0x10b0
movq 0x101d9(%rip), %rax     # 0x11ff8
movq (%rax), %rdi
leaq 0xb39b(%rip), %rsi      # 0xd1c4
movb $0x0, %al
callq 0x10f0
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x1e7d
movq 0x101ac(%rip), %rax     # 0x11ff8
movq (%rax), %rdi
movq 0x38(%rsp), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %edx
leaq 0xb373(%rip), %rsi      # 0xd1d9
movb $0x0, %al
callq 0x10f0
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x1e39
movq 0x10174(%rip), %rax     # 0x11ff8
movq (%rax), %rdi
leaq 0xb34f(%rip), %rsi      # 0xd1dd
movb $0x0, %al
callq 0x10f0
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x1ee2
movq 0x10147(%rip), %rax     # 0x11ff8
movq (%rax), %rdi
movq 0x38(%rsp), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %edx
leaq 0xb318(%rip), %rsi      # 0xd1e3
movb $0x0, %al
callq 0x10f0
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x1e9e
movq 0x1010f(%rip), %rax     # 0x11ff8
movq (%rax), %rdi
leaq 0xb6d2(%rip), %rsi      # 0xd5c5
movb $0x0, %al
callq 0x10f0
movq 0x38(%rsp), %rdi
callq 0x1030
addq $0x68, %rsp
retq
nopl (%rax)