// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/zopfli/src/zopfli/squeeze.c
// Function: FollowPath
static void FollowPath(ZopfliBlockState* s,
                       const unsigned char* in, size_t instart, size_t inend,
                       unsigned short* path, size_t pathsize,
                       ZopfliLZ77Store* store, ZopfliHash *h) {
  size_t i, j, pos = 0;
  size_t windowstart = instart > ZOPFLI_WINDOW_SIZE
      ? instart - ZOPFLI_WINDOW_SIZE : 0;

  size_t total_length_test = 0;

  if (instart == inend) return;

  ZopfliResetHash(ZOPFLI_WINDOW_SIZE, h);
  ZopfliWarmupHash(in, windowstart, inend, h);
  for (i = windowstart; i < instart; i++) {
    ZopfliUpdateHash(in, i, inend, h);
  }

  pos = instart;
  for (i = 0; i < pathsize; i++) {
    unsigned short length = path[i];
    unsigned short dummy_length;
    unsigned short dist;
    assert(pos < inend);

    ZopfliUpdateHash(in, pos, inend, h);

    /* Add to output. */
    if (length >= ZOPFLI_MIN_MATCH) {
      /* Get the distance by recalculating longest match. The found length
      should match the length from the path. */
      ZopfliFindLongestMatch(s, h, in, pos, inend, length, 0,
                             &dist, &dummy_length);
      assert(!(dummy_length != length && length > 2 && dummy_length > 2));
      ZopfliVerifyLenDist(in, inend, pos, dist, length);
      ZopfliStoreLitLenDist(length, dist, pos, store);
      total_length_test += length;
    } else {
      length = 1;
      ZopfliStoreLitLenDist(in[pos], 0, pos, store);
      total_length_test++;
    }


    assert(pos + length <= inend);
    for (j = 1; j < length; j++) {
      ZopfliUpdateHash(in, pos + j, inend, h);
    }

    pos += length;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x48(%rbp)
cmpq $0x8000, -0x18(%rbp)    # imm = 0x8000
jbe 0x1ad4d
movq -0x18(%rbp), %rax
subq $0x8000, %rax           # imm = 0x8000
movq %rax, -0x68(%rbp)
jmp 0x1ad55
xorl %eax, %eax
movq %rax, -0x68(%rbp)
jmp 0x1ad55
movq -0x68(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x1ad74
jmp 0x1afc3
movq 0x18(%rbp), %rsi
movl $0x8000, %edi           # imm = 0x8000
callq 0x19350
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq 0x18(%rbp), %rcx
callq 0x197f0
movq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x1adcc
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq 0x18(%rbp), %rcx
callq 0x19510
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1ad9f
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x1afc3
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x5a(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x1ae06
jmp 0x1ae25
leaq 0x3ea7(%rip), %rdi      # 0x1ecb4
leaq 0x3c48(%rip), %rsi      # 0x1ea5c
movl $0x169, %edx            # imm = 0x169
leaq 0x3ea0(%rip), %rcx      # 0x1ecc0
callq 0x3220
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq 0x18(%rbp), %rcx
callq 0x19510
movzwl -0x5a(%rbp), %eax
cmpl $0x3, %eax
jl 0x1af08
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x48(%rbp), %rcx
movq -0x20(%rbp), %r8
movzwl -0x5a(%rbp), %eax
movl %eax, %r9d
xorl %eax, %eax
leaq -0x5e(%rbp), %r10
leaq -0x5c(%rbp), %rax
movq $0x0, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x17cf0
movzwl -0x5c(%rbp), %eax
movzwl -0x5a(%rbp), %ecx
cmpl %ecx, %eax
je 0x1aea1
movzwl -0x5a(%rbp), %eax
cmpl $0x2, %eax
jle 0x1aea1
movzwl -0x5c(%rbp), %eax
cmpl $0x2, %eax
jg 0x1aea3
jmp 0x1aec2
leaq 0x3e9c(%rip), %rdi      # 0x1ed46
leaq 0x3bab(%rip), %rsi      # 0x1ea5c
movl $0x173, %edx            # imm = 0x173
leaq 0x3e03(%rip), %rcx      # 0x1ecc0
callq 0x3220
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x48(%rbp), %rdx
movw -0x5e(%rbp), %ax
movzwl %ax, %ecx
movzwl -0x5a(%rbp), %r8d
callq 0x17bf0
movw -0x5a(%rbp), %si
movw -0x5e(%rbp), %ax
movq -0x48(%rbp), %rdx
movq 0x10(%rbp), %rcx
movzwl %si, %edi
movzwl %ax, %esi
callq 0x16f50
movzwl -0x5a(%rbp), %eax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x1af38
movw $0x1, -0x5a(%rbp)
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x48(%rbp), %rdx
movq 0x10(%rbp), %rcx
xorl %esi, %esi
movzwl %ax, %edi
callq 0x16f50
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x48(%rbp), %rax
movzwl -0x5a(%rbp), %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
ja 0x1af4b
jmp 0x1af6a
leaq 0x3e30(%rip), %rdi      # 0x1ed82
leaq 0x3b03(%rip), %rsi      # 0x1ea5c
movl $0x17e, %edx            # imm = 0x17E
leaq 0x3d5b(%rip), %rcx      # 0x1ecc0
callq 0x3220
movq $0x1, -0x40(%rbp)
movq -0x40(%rbp), %rax
movzwl -0x5a(%rbp), %ecx
cmpq %rcx, %rax
jae 0x1afa6
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
addq -0x40(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq 0x18(%rbp), %rcx
callq 0x19510
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1af72
movzwl -0x5a(%rbp), %eax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1addc
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)