// File: /workspace/github_c_makefile_star2_O0/algorithm-archivists[P]GathVL/src/objects/../../include/stb_image_resize.h
// Function: stbir__resample_vertical_upsample(stbir__info*, int)
static void stbir__resample_vertical_upsample(stbir__info* stbir_info, int n)
{
    int x, k;
    int output_w = stbir_info->output_w;
    stbir__contributors* vertical_contributors = stbir_info->vertical_contributors;
    float* vertical_coefficients = stbir_info->vertical_coefficients;
    int channels = stbir_info->channels;
    int alpha_channel = stbir_info->alpha_channel;
    int type = stbir_info->type;
    int colorspace = stbir_info->colorspace;
    int ring_buffer_entries = stbir_info->ring_buffer_num_entries;
    void* output_data = stbir_info->output_data;
    float* encode_buffer = stbir_info->encode_buffer;
    int decode = STBIR__DECODE(type, colorspace);
    int coefficient_width = stbir_info->vertical_coefficient_width;
    int coefficient_counter;
    int contributor = n;

    float* ring_buffer = stbir_info->ring_buffer;
    int ring_buffer_begin_index = stbir_info->ring_buffer_begin_index;
    int ring_buffer_first_scanline = stbir_info->ring_buffer_first_scanline;
    int ring_buffer_length = stbir_info->ring_buffer_length_bytes/sizeof(float);

    int n0,n1, output_row_start;
    int coefficient_group = coefficient_width * contributor;

    n0 = vertical_contributors[contributor].n0;
    n1 = vertical_contributors[contributor].n1;

    output_row_start = n * stbir_info->output_stride_bytes;

    STBIR_ASSERT(stbir__use_height_upsampling(stbir_info));

    memset(encode_buffer, 0, output_w * sizeof(float) * channels);

    // I tried reblocking this for better cache usage of encode_buffer
    // (using x_outer, k, x_inner), but it lost speed. -- stb

    coefficient_counter = 0;
    switch (channels) {
        case 1:
            for (k = n0; k <= n1; k++)
            {
                int coefficient_index = coefficient_counter++;
                float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length);
                float coefficient = vertical_coefficients[coefficient_group + coefficient_index];
                for (x = 0; x < output_w; ++x)
                {
                    int in_pixel_index = x * 1;
                    encode_buffer[in_pixel_index + 0] += ring_buffer_entry[in_pixel_index + 0] * coefficient;
                }
            }
            break;
        case 2:
            for (k = n0; k <= n1; k++)
            {
                int coefficient_index = coefficient_counter++;
                float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length);
                float coefficient = vertical_coefficients[coefficient_group + coefficient_index];
                for (x = 0; x < output_w; ++x)
                {
                    int in_pixel_index = x * 2;
                    encode_buffer[in_pixel_index + 0] += ring_buffer_entry[in_pixel_index + 0] * coefficient;
                    encode_buffer[in_pixel_index + 1] += ring_buffer_entry[in_pixel_index + 1] * coefficient;
                }
            }
            break;
        case 3:
            for (k = n0; k <= n1; k++)
            {
                int coefficient_index = coefficient_counter++;
                float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length);
                float coefficient = vertical_coefficients[coefficient_group + coefficient_index];
                for (x = 0; x < output_w; ++x)
                {
                    int in_pixel_index = x * 3;
                    encode_buffer[in_pixel_index + 0] += ring_buffer_entry[in_pixel_index + 0] * coefficient;
                    encode_buffer[in_pixel_index + 1] += ring_buffer_entry[in_pixel_index + 1] * coefficient;
                    encode_buffer[in_pixel_index + 2] += ring_buffer_entry[in_pixel_index + 2] * coefficient;
                }
            }
            break;
        case 4:
            for (k = n0; k <= n1; k++)
            {
                int coefficient_index = coefficient_counter++;
                float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length);
                float coefficient = vertical_coefficients[coefficient_group + coefficient_index];
                for (x = 0; x < output_w; ++x)
                {
                    int in_pixel_index = x * 4;
                    encode_buffer[in_pixel_index + 0] += ring_buffer_entry[in_pixel_index + 0] * coefficient;
                    encode_buffer[in_pixel_index + 1] += ring_buffer_entry[in_pixel_index + 1] * coefficient;
                    encode_buffer[in_pixel_index + 2] += ring_buffer_entry[in_pixel_index + 2] * coefficient;
                    encode_buffer[in_pixel_index + 3] += ring_buffer_entry[in_pixel_index + 3] * coefficient;
                }
            }
            break;
        default:
            for (k = n0; k <= n1; k++)
            {
                int coefficient_index = coefficient_counter++;
                float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length);
                float coefficient = vertical_coefficients[coefficient_group + coefficient_index];
                for (x = 0; x < output_w; ++x)
                {
                    int in_pixel_index = x * channels;
                    int c;
                    for (c = 0; c < channels; c++)
                        encode_buffer[in_pixel_index + c] += ring_buffer_entry[in_pixel_index + c] * coefficient;
                }
            }
            break;
    }
    stbir__encode_scanline(stbir_info, output_w, (char *) output_data + output_row_start, encode_buffer, channels, alpha_channel, decode);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x4c(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x58(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movl 0x6c(%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl 0xcc(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0xe8(%rax), %rax
movq %rax, -0x50(%rbp)
movl -0x34(%rbp), %eax
shll %eax
addl -0x38(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x8(%rbp), %rax
movl 0xac(%rax), %eax
movl %eax, -0x58(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0xe0(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movl 0xd8(%rax), %eax
movl %eax, -0x6c(%rbp)
movq -0x8(%rbp), %rax
movl 0xd0(%rax), %eax
movl %eax, -0x70(%rbp)
movq -0x8(%rbp), %rax
movslq 0xc8(%rax), %rax
shrq $0x2, %rax
movl %eax, -0x74(%rbp)
movl -0x58(%rbp), %eax
imull -0x60(%rbp), %eax
movl %eax, -0x84(%rbp)
movq -0x20(%rbp), %rax
movslq -0x60(%rbp), %rcx
movl (%rax,%rcx,8), %eax
movl %eax, -0x78(%rbp)
movq -0x20(%rbp), %rax
movslq -0x60(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x7c(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x28(%rcx), %eax
movl %eax, -0x80(%rbp)
movq -0x8(%rbp), %rdi
callq 0x30f00
cmpl $0x0, %eax
je 0x327db
jmp 0x327fa
leaq 0xac94(%rip), %rdi      # 0x3d476
leaq 0xa130(%rip), %rsi      # 0x3c919
movl $0x767, %edx            # imm = 0x767
leaq 0xabf5(%rip), %rcx      # 0x3d3ea
callq 0x50f0
movq -0x50(%rbp), %rdi
movslq -0x18(%rbp), %rdx
movslq -0x2c(%rbp), %rax
imulq %rax, %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x51a0
movl $0x0, -0x5c(%rbp)
movl -0x2c(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x108(%rbp)
subl $0x3, %eax
ja 0x32d6c
movq -0x108(%rbp), %rax
leaq 0x8da7(%rip), %rcx      # 0x3b5e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x78(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jg 0x32926
movl -0x5c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x5c(%rbp)
movl %eax, -0x88(%rbp)
movl -0x14(%rbp), %edi
movq -0x68(%rbp), %rsi
movl -0x6c(%rbp), %edx
movl -0x70(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x74(%rbp), %r9d
callq 0x34a80
movq %rax, -0x90(%rbp)
movq -0x28(%rbp), %rax
movl -0x84(%rbp), %ecx
addl -0x88(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x94(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x32916
movl -0x10(%rbp), %eax
shll $0x0, %eax
movl %eax, -0x98(%rbp)
movq -0x90(%rbp), %rax
movl -0x98(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0x94(%rbp), %xmm2
movq -0x50(%rbp), %rax
movl -0x98(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x328b5
jmp 0x32918
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x32850
jmp 0x32e80
movl -0x78(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jg 0x32a4f
movl -0x5c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x5c(%rbp)
movl %eax, -0x9c(%rbp)
movl -0x14(%rbp), %edi
movq -0x68(%rbp), %rsi
movl -0x6c(%rbp), %edx
movl -0x70(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x74(%rbp), %r9d
callq 0x34a80
movq %rax, -0xa8(%rbp)
movq -0x28(%rbp), %rax
movl -0x84(%rbp), %ecx
addl -0x9c(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0xac(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x32a3f
movl -0x10(%rbp), %eax
shll %eax
movl %eax, -0xb0(%rbp)
movq -0xa8(%rbp), %rax
movl -0xb0(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0xac(%rbp), %xmm2
movq -0x50(%rbp), %rax
movl -0xb0(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0xa8(%rbp), %rax
movl -0xb0(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0xac(%rbp), %xmm2
movq -0x50(%rbp), %rax
movl -0xb0(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x32996
jmp 0x32a41
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x32931
jmp 0x32e80
movl -0x78(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jg 0x32bb9
movl -0x5c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x5c(%rbp)
movl %eax, -0xb4(%rbp)
movl -0x14(%rbp), %edi
movq -0x68(%rbp), %rsi
movl -0x6c(%rbp), %edx
movl -0x70(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x74(%rbp), %r9d
callq 0x34a80
movq %rax, -0xc0(%rbp)
movq -0x28(%rbp), %rax
movl -0x84(%rbp), %ecx
addl -0xb4(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0xc4(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x32ba9
imull $0x3, -0x10(%rbp), %eax
movl %eax, -0xc8(%rbp)
movq -0xc0(%rbp), %rax
movl -0xc8(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0xc4(%rbp), %xmm2
movq -0x50(%rbp), %rax
movl -0xc8(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0xc0(%rbp), %rax
movl -0xc8(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0xc4(%rbp), %xmm2
movq -0x50(%rbp), %rax
movl -0xc8(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0xc0(%rbp), %rax
movl -0xc8(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0xc4(%rbp), %xmm2
movq -0x50(%rbp), %rax
movl -0xc8(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x32abf
jmp 0x32bab
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x32a5a
jmp 0x32e80
movl -0x78(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jg 0x32d67
movl -0x5c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x5c(%rbp)
movl %eax, -0xcc(%rbp)
movl -0x14(%rbp), %edi
movq -0x68(%rbp), %rsi
movl -0x6c(%rbp), %edx
movl -0x70(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x74(%rbp), %r9d
callq 0x34a80
movq %rax, -0xd8(%rbp)
movq -0x28(%rbp), %rax
movl -0x84(%rbp), %ecx
addl -0xcc(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0xdc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x32d57
movl -0x10(%rbp), %eax
shll $0x2, %eax
movl %eax, -0xe0(%rbp)
movq -0xd8(%rbp), %rax
movl -0xe0(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0xdc(%rbp), %xmm2
movq -0x50(%rbp), %rax
movl -0xe0(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0xd8(%rbp), %rax
movl -0xe0(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0xdc(%rbp), %xmm2
movq -0x50(%rbp), %rax
movl -0xe0(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0xd8(%rbp), %rax
movl -0xe0(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0xdc(%rbp), %xmm2
movq -0x50(%rbp), %rax
movl -0xe0(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0xd8(%rbp), %rax
movl -0xe0(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0xdc(%rbp), %xmm2
movq -0x50(%rbp), %rax
movl -0xe0(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x32c29
jmp 0x32d59
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x32bc4
jmp 0x32e80
movl -0x78(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jg 0x32e7e
movl -0x5c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x5c(%rbp)
movl %eax, -0xe4(%rbp)
movl -0x14(%rbp), %edi
movq -0x68(%rbp), %rsi
movl -0x6c(%rbp), %edx
movl -0x70(%rbp), %ecx
movl -0x3c(%rbp), %r8d
movl -0x74(%rbp), %r9d
callq 0x34a80
movq %rax, -0xf0(%rbp)
movq -0x28(%rbp), %rax
movl -0x84(%rbp), %ecx
addl -0xe4(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0xf4(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x32e6e
movl -0x10(%rbp), %eax
imull -0x2c(%rbp), %eax
movl %eax, -0xf8(%rbp)
movl $0x0, -0xfc(%rbp)
movl -0xfc(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x32e5e
movq -0xf0(%rbp), %rax
movl -0xf8(%rbp), %ecx
addl -0xfc(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0xf4(%rbp), %xmm2
movq -0x50(%rbp), %rax
movl -0xf8(%rbp), %ecx
addl -0xfc(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0xfc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xfc(%rbp)
jmp 0x32dfa
jmp 0x32e60
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x32dd7
jmp 0x32e70
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x32d72
jmp 0x32e80
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movq -0x48(%rbp), %rdx
movslq -0x80(%rbp), %rax
addq %rax, %rdx
movq -0x50(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movl -0x30(%rbp), %r9d
movl -0x54(%rbp), %eax
movl %eax, (%rsp)
callq 0x34ad0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)