// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %rbx
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
jne 0x632a
movq %rsi, %r14
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x62ba
movq (%r14), %rax
movl 0x6c(%rbx), %r12d
movl (%rax), %r14d
movl 0x4(%rax), %r15d
movl %r15d, %ebp
subl %r14d, %ebp
incl %ebp
leaq 0x80(%rsp), %rsi
andq $0x0, 0x10(%rsi)
pxor %xmm0, %xmm0
movdqa %xmm0, (%rsi)
leaq 0x60(%rsp), %rdx
movdqa %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
leaq 0x40(%rsp), %rcx
movdqa %xmm0, (%rcx)
andq $0x0, 0x10(%rcx)
movl %ebp, %edi
callq 0x612f
addl %r12d, %r14d
addl %r12d, %r15d
movq (%rbx), %rdx
movslq %r14d, %rax
movslq %r15d, %rcx
movq %rax, %rsi
shlq $0x6, %rsi
addq %rsi, %rdx
addq $0x2c, %rdx
movdqa 0x172e6(%rip), %xmm0    # 0x1d680
movdqa 0x172ee(%rip), %xmm1    # 0x1d690
cmpq %rcx, %rax
jg 0x63e1
movq -0x14(%rdx), %xmm2
paddd %xmm0, %xmm2
movdqa %xmm2, %xmm3
psrad $0x1f, %xmm3
psrld $0x1d, %xmm3
paddd %xmm2, %xmm3
psrad $0x3, %xmm3
movq %xmm3, -0x14(%rdx)
movdqu (%rdx), %xmm2
paddd %xmm1, %xmm2
movdqu %xmm2, (%rdx)
incq %rax
addq $0x40, %rdx
jmp 0x63a2
movslq %ebp, %r12
shll $0x6, %ebp
movslq %ebp, %r13
movslq %r14d, %rbp
leaq 0x1717c(%rip), %r15     # 0x1d570
movq %rsp, %r14
cmpq %r13, %r12
jge 0x64a2
pxor %xmm0, %xmm0
movdqa %xmm0, 0x10(%rsp)
movdqa %xmm0, (%rsp)
andq $0x0, 0x1e(%rsp)
movl $0x1, 0x28(%rsp)
leaq 0x2c(%rsp), %rax
movdqu %xmm0, (%rax)
orl $-0x1, 0x3c(%rsp)
movq 0x60(%rsp), %rax
movslq (%rax,%r12,4), %rax
addq %rbp, %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,%r12,4), %rsi
movl (%r15,%rsi,4), %esi
movl 0x34(%rcx,%rax), %edi
leal -0x3(%rsi,%rdi), %esi
movl %esi, 0x34(%rsp)
movslq (%rdx,%r12,4), %rdx
movl (%r15,%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 0xa628
movq %r14, %rdi
callq 0xabc2
incq %r12
jmp 0x63f7
leaq 0x40(%rsp), %rdi
callq 0x5374
leaq 0x60(%rsp), %rdi
callq 0x5374
leaq 0x80(%rsp), %rdi
callq 0xa654
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x64e5
movq %rax, %rbx
movq %rsp, %rdi
callq 0xabc2
leaq 0x40(%rsp), %rdi
callq 0x5374
leaq 0x60(%rsp), %rdi
callq 0x5374
leaq 0x80(%rsp), %rdi
callq 0xa654
movq %rbx, %rdi
callq 0x35d0