// File: /workspace/github_c_makefile_star2_O0/imaya[P]zopfli-for-emscripten/squeeze.c
// Function: TraceBackwards
static void TraceBackwards(size_t size, const unsigned short* length_array,
                           unsigned short** path, size_t* pathsize) {
  size_t index = size;
  if (size == 0) return;
  for (;;) {
    ZOPFLI_APPEND_DATA(length_array[index], path, pathsize);
    assert(length_array[index] <= index);
    assert(length_array[index] <= ZOPFLI_MAX_MATCH);
    assert(length_array[index] != 0);
    index -= length_array[index];
    if (index == 0) break;
  }

  /* Mirror result. */
  for (index = 0; index < *pathsize / 2; index++) {
    unsigned short temp = (*path)[index];
    (*path)[index] = (*path)[*pathsize - index - 1];
    (*path)[*pathsize - index - 1] = temp;
  }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0xa6af
jmp 0xa8a8
jmp 0xa6b1
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0xa714
movq 0x18(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xa6e9
movl $0x2, %edi
callq 0x1120
movq %rax, (%rsp)
jmp 0xa708
movq 0x20(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rax
movq (%rax), %rsi
shlq %rsi
shlq %rsi
callq 0x1140
movq %rax, (%rsp)
movq (%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movw (%rax,%rcx,2), %dx
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
movw %dx, (%rax,%rcx,2)
movq 0x18(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movzwl (%rax,%rcx,2), %eax
cmpq 0x10(%rsp), %rax
ja 0xa75c
jmp 0xa77b
leaq 0x3784(%rip), %rdi      # 0xdee7
leaq 0x3614(%rip), %rsi      # 0xdd7e
movl $0x13f, %edx            # imm = 0x13F
leaq 0x378e(%rip), %rcx      # 0xdf04
callq 0x10b0
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x102, %eax            # imm = 0x102
jg 0xa792
jmp 0xa7b1
leaq 0x37bc(%rip), %rdi      # 0xdf55
leaq 0x35de(%rip), %rsi      # 0xdd7e
movl $0x140, %edx            # imm = 0x140
leaq 0x3758(%rip), %rcx      # 0xdf04
callq 0x10b0
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
je 0xa7c6
jmp 0xa7e5
leaq 0x37b0(%rip), %rdi      # 0xdf7d
leaq 0x35aa(%rip), %rsi      # 0xdd7e
movl $0x141, %edx            # imm = 0x141
leaq 0x3724(%rip), %rcx      # 0xdf04
callq 0x10b0
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, %ecx
movq 0x10(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0xa80c
jmp 0xa811
jmp 0xa6b1
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jae 0xa8a8
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movw (%rax,%rcx,2), %ax
movw %ax, 0xe(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
subq 0x10(%rsp), %rcx
subq $0x1, %rcx
movw (%rax,%rcx,2), %dx
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movw %dx, (%rax,%rcx,2)
movw 0xe(%rsp), %dx
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
subq 0x10(%rsp), %rcx
subq $0x1, %rcx
movw %dx, (%rax,%rcx,2)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0xa81a
addq $0x38, %rsp
retq
nopl (%rax)