// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: DATCompression::decompression(std::vector<int, std::allocator<int>>)
vector <int> DATCompression::decompression(vector<int> compressed)
{
  vector <int> decompressed = compressed;
  int i,n=30;
  
  // // Simple decompression stack
  // decompressed = huffman_decompress(decompressed);
  // decompressed = diff_decompress(decompressed);

  // bzip-inspired decompression stack (but simpler)
  decompressed = huffman_decompress(decompressed);
  decompressed = golomb_decompress(decompressed);
  decompressed = run_length_decode(decompressed);
  decompressed = burrows_wheeler_decode(decompressed);
  decompressed = run_length_decode(decompressed);
  decompressed = diff_decompress(decompressed);

  return decompressed;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x6024
leaq 0x98(%rsp), %rdi
movq %rbx, %rsi
callq 0x6024
leaq 0x8(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x3a98
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x64be
movq (%r15), %rdi
testq %rdi, %rdi
je 0x37e7
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x3804
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
leaq 0x80(%rsp), %rdi
movq %rbx, %rsi
callq 0x6024
leaq 0x8(%rsp), %rdi
leaq 0x80(%rsp), %rdx
movq %r14, %rsi
callq 0x3df2
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x64be
movq (%r14), %rdi
testq %rdi, %rdi
je 0x384e
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x386b
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
callq 0x6024
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x3f7e
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x64be
movq (%r14), %rdi
testq %rdi, %rdi
je 0x38ac
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x38c3
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
leaq 0x50(%rsp), %rdi
movq %rbx, %rsi
callq 0x6024
leaq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x4060
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x64be
movq (%r14), %rdi
testq %rdi, %rdi
je 0x3904
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x391b
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
leaq 0x38(%rsp), %rdi
movq %rbx, %rsi
callq 0x6024
leaq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x3f7e
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x64be
movq (%r14), %rdi
testq %rdi, %rdi
je 0x395c
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3973
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x6024
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x4262
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x64be
movq (%r14), %rdi
testq %rdi, %rdi
je 0x39b4
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x39cb
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %rbx, %rax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3a7b
movq 0x30(%rsp), %rsi
jmp 0x3a6e
jmp 0x3a78
movq %rax, %r14
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3a7b
movq 0x48(%rsp), %rsi
jmp 0x3a6e
jmp 0x3a78
movq %rax, %r14
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x3a7b
movq 0x60(%rsp), %rsi
jmp 0x3a6e
jmp 0x3a78
movq %rax, %r14
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x3a7b
movq 0x78(%rsp), %rsi
jmp 0x3a6e
jmp 0x3a78
movq %rax, %r14
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x3a7b
movq 0x90(%rsp), %rsi
jmp 0x3a6e
jmp 0x3a78
movq %rax, %r14
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x3a7b
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
jmp 0x3a7b
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3a8f
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22c0
nop