// File: /workspace/github_cpp_makefile_star2_O3/cloudinary[P]fuif/transform/squeeze.h
// Function: meta_squeeze(Image&, std::vector<int, std::allocator<int>>&)
void meta_squeeze(Image &image, std::vector<int> &parameters) {
    if (!parameters.size()) default_squeeze_parameters(parameters,image);

    for (int i=0; i+2<parameters.size(); i+=3) {
        bool horizontal = parameters[i] & 1; // 0=vertical, 1=horizontal
        bool in_place = !(parameters[i] & 2);
        int beginc = parameters[i+1];
        int endc = parameters[i+2];
        int offset;
        if (in_place) offset = endc+1; else offset = image.nb_meta_channels + image.nb_channels;
        int nb_chans = endc-beginc+1;
        for (int c=beginc; c<=endc; c++) {
            Channel dummy;
            dummy.hcshift = image.channel[c].hcshift;
            dummy.vcshift = image.channel[c].vcshift;
            dummy.component = image.channel[c].component;
            if (horizontal) {
                int w = image.channel[c].w;
                image.channel[c].w = (w+1)/2;
                image.channel[c].hshift++;
                image.channel[c].hcshift++;
                dummy.w = w-(w+1)/2;
                dummy.h = image.channel[c].h;
            } else {
                int h = image.channel[c].h;
                image.channel[c].h = (h+1)/2;
                image.channel[c].vshift++;
                image.channel[c].vcshift++;
                dummy.h = h-(h+1)/2;
                dummy.w = image.channel[c].w;
            }
            dummy.hshift = image.channel[c].hshift;
            dummy.vshift = image.channel[c].vshift;

            image.channel.insert(image.channel.begin()+offset+c-beginc, dummy);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r14
movq (%rsi), %rax
movq %rsi, 0x8(%rsp)
movq 0x8(%rsi), %rcx
cmpq %rax, %rcx
jne 0xadfa
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa985
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
cmpq $0x9, %rdx
jb 0xaf90
movl $0x2, %edx
xorl %r8d, %r8d
leaq 0x10(%rsp), %r15
movslq 0x4(%rax,%r8,4), %rsi
movl (%rax,%rdx,4), %ebp
cmpl %ebp, %esi
jg 0xaf72
movq %r8, 0x50(%rsp)
movl (%rax,%r8,4), %ebx
incl %ebp
movl 0x64(%r14), %eax
addl 0x6c(%r14), %eax
testb $0x2, %bl
cmovel %ebp, %eax
movslq %eax, %r13
movq %rsi, %r12
shlq $0x6, %r12
orq $0x38, %r12
shlq $0x6, %r13
subl %esi, %ebp
pxor %xmm0, %xmm0
movdqa %xmm0, 0x20(%rsp)
movdqa %xmm0, 0x10(%rsp)
movq $0x0, 0x2e(%rsp)
movl $0x1, 0x38(%rsp)
leaq 0x3c(%rsp), %rax
movdqu %xmm0, (%rax)
movl $0xffffffff, 0x4c(%rsp) # imm = 0xFFFFFFFF
movq (%r14), %rsi
movl -0x4(%rsi,%r12), %eax
movl %eax, 0x44(%rsp)
movq (%rsi,%r12), %rcx
movq %rcx, 0x48(%rsp)
testb $0x1, %bl
jne 0xaee7
movq %rcx, %xmm0
movl -0x1c(%rsi,%r12), %ecx
movl -0x8(%rsi,%r12), %eax
leal 0x1(%rcx), %edx
shrl $0x1f, %edx
addl %ecx, %edx
incl %edx
sarl %edx
movl %edx, -0x1c(%rsi,%r12)
incl %eax
movl %eax, -0x8(%rsi,%r12)
movd %xmm0, %edi
incl %edi
movl %edi, (%rsi,%r12)
subl %edx, %ecx
movl %ecx, 0x2c(%rsp)
movl -0x20(%rsi,%r12), %ecx
movl %ecx, 0x28(%rsp)
movl -0xc(%rsi,%r12), %ecx
jmp 0xaf24
movl -0x20(%rsi,%r12), %edx
movl -0xc(%rsi,%r12), %ecx
leal 0x1(%rdx), %edi
shrl $0x1f, %edi
addl %edx, %edi
incl %edi
sarl %edi
movl %edi, -0x20(%rsi,%r12)
incl %ecx
movl %ecx, -0xc(%rsi,%r12)
incl %eax
movl %eax, -0x4(%rsi,%r12)
subl %edi, %edx
movl %edx, 0x28(%rsp)
movl -0x1c(%rsi,%r12), %eax
movl %eax, 0x2c(%rsp)
movl -0x8(%rsi,%r12), %eax
movl %ecx, 0x3c(%rsp)
movl %eax, 0x40(%rsp)
addq %r13, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0xde8a
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xaf51
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
addq $0x40, %r12
addq $0x40, %r13
decl %ebp
jne 0xae54
movq 0x8(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movq 0x50(%rsp), %r8
movq %r8, %rdx
addq $0x3, %r8
addq $0x5, %rdx
movq %rcx, %rdi
subq %rax, %rdi
sarq $0x2, %rdi
cmpq %rdx, %rdi
ja 0xae17
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xafb9
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x3590