// File: /workspace/github_cpp_makefile_star2_O3/dgboy2000[P]compress/compress.cpp
// Function: DATCompression::compression(std::vector<int, std::allocator<int>>)
vector <int> DATCompression::compression(vector<int> data)
{
    vector <int> compressed = data;
    int i, n=30;
  
    // // Simple compression stack
    // compressed = diff_compress(data);
    // compressed = huffman_compress(compressed);

    // bzip-inspired compression stack (but simpler)
    compressed = diff_compress(compressed);
    compressed = run_length_encode(compressed);
    compressed = burrows_wheeler_encode(compressed);
    compressed = run_length_encode(compressed);
    compressed = golomb_compress(compressed);
    compressed = huffman_compress(compressed);

    return compressed;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x6284
leaq 0x90(%rsp), %rdi
movq %rbx, %rsi
callq 0x6284
movq %rsp, %rdi
leaq 0x90(%rsp), %rdx
callq 0x2a3a
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x26ec
subq %rdi, %rsi
callq 0x21b0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x26ec
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x2709
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
leaq 0x78(%rsp), %rdi
movq %rbx, %rsi
callq 0x6284
movq %rsp, %rdi
leaq 0x78(%rsp), %rdx
callq 0x2d36
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x276d
subq %rdi, %rsi
callq 0x21b0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x276d
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x2787
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
leaq 0x60(%rsp), %rdi
movq %rbx, %rsi
callq 0x6284
movq %rsp, %rdi
leaq 0x60(%rsp), %rdx
callq 0x2e92
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x27eb
subq %rdi, %rsi
callq 0x21b0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x27eb
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x2802
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
leaq 0x48(%rsp), %rdi
movq %rbx, %rsi
callq 0x6284
movq %rsp, %rdi
leaq 0x48(%rsp), %rdx
callq 0x2d36
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x2866
subq %rdi, %rsi
callq 0x21b0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2866
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x287d
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x6284
movq %rsp, %rdi
leaq 0x30(%rsp), %rdx
movq %r14, %rsi
callq 0x2fd4
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x28e4
subq %rdi, %rsi
callq 0x21b0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x28e4
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x28fb
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x6284
movq %rsp, %rdi
leaq 0x18(%rsp), %rdx
callq 0x324c
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x295f
subq %rdi, %rsi
callq 0x21b0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x295f
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2976
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2a1e
movq 0x28(%rsp), %rsi
jmp 0x2a11
jmp 0x2a1b
movq %rax, %r14
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x2a1e
movq 0x40(%rsp), %rsi
jmp 0x2a11
jmp 0x2a1b
movq %rax, %r14
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x2a1e
movq 0x58(%rsp), %rsi
jmp 0x2a11
jmp 0x2a1b
movq %rax, %r14
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x2a1e
movq 0x70(%rsp), %rsi
jmp 0x2a11
jmp 0x2a1b
movq %rax, %r14
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x2a1e
movq 0x88(%rsp), %rsi
jmp 0x2a11
jmp 0x2a1b
movq %rax, %r14
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x2a1e
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
jmp 0x2a1e
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2a32
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22c0