// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/transform/dct.h
// Function: meta_DCT(Image&, std::vector<int, std::allocator<int>>&)
void meta_DCT(Image &image, std::vector<int> &parameters) {
    if (!parameters.size()) default_DCT_parameters(parameters,image);
    int beginc = image.nb_meta_channels + parameters[0];
    int endc = image.nb_meta_channels + parameters[1];
    int nb_channels = endc-beginc+1;
    std::vector<std::vector<int>> ordering;
    std::vector<int> comp;
    std::vector<int> coeff;
    default_DCT_scanscript(nb_channels,ordering,comp,coeff);
    for (int c=beginc; c<=endc; c++) {
        int bw = (image.channel[c].w+7)/8;
        int bh = (image.channel[c].h+7)/8;
        image.channel[c].w = bw;
        image.channel[c].h = bh;
        image.channel[c].hshift += 3;
        image.channel[c].vshift += 3;
        image.channel[c].hcshift += 3;
        image.channel[c].vcshift += 3;
    }
    for (int i=nb_channels; i<64*nb_channels; i++) {
          Channel dummy;
          int c = beginc+comp[i];
          dummy.w=image.channel[c].w; dummy.h=image.channel[c].h;
          dummy.hshift = image.channel[c].hshift;
          dummy.vshift = image.channel[c].vshift;
          dummy.hcshift = dct_cshifts[coeff[i]]+image.channel[c].hcshift-3;
          dummy.vcshift = dct_cshifts[coeff[i]]+image.channel[c].vcshift-3;
          dummy.component = image.channel[c].component;
          assert(dummy.component == comp[i]);
          image.channel.push_back(dummy);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rax
cmpq (%rsi), %rax
jne 0x7ba9
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7b06
movl 0x6c(%rbx), %r13d
movq (%r14), %rax
movl (%rax), %r14d
movl 0x4(%rax), %r12d
movl %r12d, %ebp
subl %r14d, %ebp
incl %ebp
xorl %eax, %eax
leaq 0x80(%rsp), %rsi
movq %rax, 0x10(%rsi)
pxor %xmm0, %xmm0
movdqa %xmm0, (%rsi)
leaq 0x60(%rsp), %rdx
movq %rax, 0x10(%rdx)
movdqa %xmm0, (%rdx)
leaq 0x40(%rsp), %rcx
movq %rax, 0x10(%rcx)
movdqa %xmm0, (%rcx)
movl %ebp, %edi
callq 0x78bc
leal (%r14,%r13), %eax
movslq %eax, %r15
cmpl %r14d, %r12d
jl 0x7c6d
addl %r12d, %r13d
cmpl %r13d, %r15d
cmovgl %r15d, %r13d
movq (%rbx), %rax
movq %r15, %rcx
shlq $0x6, %rcx
addq %rcx, %rax
addq $0x2c, %rax
subl %r15d, %r13d
incl %r13d
movdqa 0x1d645(%rip), %xmm0    # 0x25270
movdqa 0x1d64d(%rip), %xmm1    # 0x25280
movq -0x14(%rax), %xmm2
paddd %xmm0, %xmm2
movdqa %xmm2, %xmm3
psrad $0x1f, %xmm3
psrld $0x1d, %xmm3
paddd %xmm2, %xmm3
psrad $0x3, %xmm3
movq %xmm3, -0x14(%rax)
movdqu (%rax), %xmm2
paddd %xmm1, %xmm2
movdqu %xmm2, (%rax)
addq $0x40, %rax
decl %r13d
jne 0x7c33
movl %ebp, %eax
shll $0x6, %eax
cmpl %eax, %ebp
jge 0x7d5d
movslq %ebp, %rbp
movl %r12d, %eax
shll $0x6, %eax
subl %r12d, %eax
movl %r14d, %ecx
shll $0x6, %ecx
subl %ecx, %r14d
leal (%rax,%r14), %r12d
addl $0x3f, %r12d
leaq 0x1d992(%rip), %r13     # 0x25630
movq %rsp, %r14
pxor %xmm0, %xmm0
movdqa %xmm0, 0x10(%rsp)
movdqa %xmm0, (%rsp)
movq $0x0, 0x1e(%rsp)
movl $0x1, 0x28(%rsp)
leaq 0x2c(%rsp), %rax
movdqu %xmm0, (%rax)
movl $0xffffffff, 0x3c(%rsp) # imm = 0xFFFFFFFF
movq 0x60(%rsp), %rax
movslq (%rax,%rbp,4), %rax
addq %r15, %rax
movq (%rbx), %rcx
shlq $0x6, %rax
movq 0x18(%rcx,%rax), %rdx
movq %rdx, 0x18(%rsp)
movq 0x2c(%rcx,%rax), %rdx
movq %rdx, 0x2c(%rsp)
movq 0x40(%rsp), %rdx
movslq (%rdx,%rbp,4), %rsi
movl (%r13,%rsi,4), %esi
movl 0x34(%rcx,%rax), %edi
leal -0x3(%rsi,%rdi), %esi
movl %esi, 0x34(%rsp)
movslq (%rdx,%rbp,4), %rdx
movl (%r13,%rdx,4), %edx
movl 0x38(%rcx,%rax), %esi
leal -0x3(%rdx,%rsi), %edx
movl %edx, 0x38(%rsp)
movl 0x3c(%rcx,%rax), %eax
movl %eax, 0x3c(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xde30
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7d51
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
incq %rbp
decl %r12d
jne 0x7ca1
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x7d74
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x7d8b
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
leaq 0x80(%rsp), %rdi
callq 0xde8a
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x7dc8
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7dc8
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x7ddf
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x7df6
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
leaq 0x80(%rsp), %rdi
callq 0xde8a
movq %rbx, %rdi
callq 0x35a0