// File: /workspace/github_c_makefile_star2_O1/algorithm-archivists[P]GathVL/src/objects/../../include/stb_image_resize.h
// Function: stbir__resample_horizontal_upsample(stbir__info*, float*)
static void stbir__resample_horizontal_upsample(stbir__info* stbir_info, float* output_buffer)
{
    int x, k;
    int output_w = stbir_info->output_w;
    int channels = stbir_info->channels;
    float* decode_buffer = stbir__get_decode_buffer(stbir_info);
    stbir__contributors* horizontal_contributors = stbir_info->horizontal_contributors;
    float* horizontal_coefficients = stbir_info->horizontal_coefficients;
    int coefficient_width = stbir_info->horizontal_coefficient_width;

    for (x = 0; x < output_w; x++)
    {
        int n0 = horizontal_contributors[x].n0;
        int n1 = horizontal_contributors[x].n1;

        int out_pixel_index = x * channels;
        int coefficient_group = coefficient_width * x;
        int coefficient_counter = 0;

        STBIR_ASSERT(n1 >= n0);
        STBIR_ASSERT(n0 >= -stbir_info->horizontal_filter_pixel_margin);
        STBIR_ASSERT(n1 >= -stbir_info->horizontal_filter_pixel_margin);
        STBIR_ASSERT(n0 < stbir_info->input_w + stbir_info->horizontal_filter_pixel_margin);
        STBIR_ASSERT(n1 < stbir_info->input_w + stbir_info->horizontal_filter_pixel_margin);

        switch (channels) {
            case 1:
                for (k = n0; k <= n1; k++)
                {
                    int in_pixel_index = k * 1;
                    float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++];
                    STBIR_ASSERT(coefficient != 0);
                    output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient;
                }
                break;
            case 2:
                for (k = n0; k <= n1; k++)
                {
                    int in_pixel_index = k * 2;
                    float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++];
                    STBIR_ASSERT(coefficient != 0);
                    output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient;
                    output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient;
                }
                break;
            case 3:
                for (k = n0; k <= n1; k++)
                {
                    int in_pixel_index = k * 3;
                    float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++];
                    STBIR_ASSERT(coefficient != 0);
                    output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient;
                    output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient;
                    output_buffer[out_pixel_index + 2] += decode_buffer[in_pixel_index + 2] * coefficient;
                }
                break;
            case 4:
                for (k = n0; k <= n1; k++)
                {
                    int in_pixel_index = k * 4;
                    float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++];
                    STBIR_ASSERT(coefficient != 0);
                    output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient;
                    output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient;
                    output_buffer[out_pixel_index + 2] += decode_buffer[in_pixel_index + 2] * coefficient;
                    output_buffer[out_pixel_index + 3] += decode_buffer[in_pixel_index + 3] * coefficient;
                }
                break;
            default:
                for (k = n0; k <= n1; k++)
                {
                    int in_pixel_index = k * channels;
                    float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++];
                    int c;
                    STBIR_ASSERT(coefficient != 0);
                    for (c = 0; c < channels; c++)
                        output_buffer[out_pixel_index + c] += decode_buffer[in_pixel_index + c] * coefficient;
                }
                break;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movslq 0x20(%rdi), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
jle 0x1ee61
movq %rsi, %r10
movslq 0x4c(%rdi), %rcx
movl 0xb8(%rdi), %ebx
movl %ebx, %eax
imull %ecx, %eax
movl %ecx, %r8d
movq 0x98(%rdi), %rdx
cltq
movq 0x70(%rdi), %r9
movq 0x78(%rdi), %r12
movslq 0xa8(%rdi), %rsi
movl %ebx, 0xc(%rsp)
negl %ebx
movq %rsi, 0x18(%rsp)
leaq (,%rsi,4), %rsi
movq %rsi, 0x28(%rsp)
leaq (%rdx,%rax,4), %rsi
addq $0xc, %rsi
movq %rsi, (%rsp)
leaq (%rdx,%rax,4), %rax
movq %rax, 0x10(%rsp)
leaq (,%rcx,4), %r13
xorl %r14d, %r14d
xorps %xmm0, %xmm0
movq %r10, %rsi
movq %r12, 0x20(%rsp)
movslq (%r9,%r14,8), %r11
movl 0x4(%r9,%r14,8), %r15d
cmpl %r11d, %r15d
jl 0x1ef2a
cmpl %ebx, %r11d
jl 0x1ef49
cmpl %ebx, %r15d
jl 0x1ef0b
movl 0x8(%rdi), %eax
addl 0xc(%rsp), %eax
cmpl %eax, %r11d
jge 0x1ef87
cmpl %eax, %r15d
jge 0x1ef68
leal -0x1(%r8), %eax
cmpl $0x3, %eax
ja 0x1ede9
movq %r14, %rbp
imulq %rcx, %rbp
leaq 0x4b65(%rip), %rdx      # 0x2377c
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
cmpl %r15d, %r11d
jg 0x1ee4b
subl %r11d, %r15d
incl %r15d
movq 0x10(%rsp), %rax
leaq (%rax,%r11,4), %rax
xorl %r11d, %r11d
movss (%r12,%r11,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x1ec4c
jnp 0x1eecd
mulss (%rax,%r11,4), %xmm1
incq %r11
addss (%r10,%rbp,4), %xmm1
movss %xmm1, (%r10,%rbp,4)
cmpq %r11, %r15
jne 0x1ec3b
jmp 0x1ee4b
cmpl %r15d, %r11d
jg 0x1ee4b
subl %r11d, %r15d
incl %r15d
leaq (%r11,%r11,2), %rax
movq (%rsp), %rdx
leaq (%rdx,%rax,4), %rax
addq $-0x4, %rax
xorl %r11d, %r11d
movss (%r12,%r11,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x1ec9e
jnp 0x1eeec
movss -0x8(%rax), %xmm2
mulss %xmm1, %xmm2
addss (%r10,%rbp,4), %xmm2
movss %xmm2, (%r10,%rbp,4)
movss -0x4(%rax), %xmm2
mulss %xmm1, %xmm2
addss 0x4(%r10,%rbp,4), %xmm2
movss %xmm2, 0x4(%r10,%rbp,4)
mulss (%rax), %xmm1
addss 0x8(%r10,%rbp,4), %xmm1
incq %r11
movss %xmm1, 0x8(%r10,%rbp,4)
addq $0xc, %rax
cmpq %r11, %r15
jne 0x1ec8d
jmp 0x1ee4b
cmpl %r15d, %r11d
jg 0x1ee4b
subl %r11d, %r15d
incl %r15d
shlq $0x4, %r11
addq (%rsp), %r11
xorl %eax, %eax
movss (%r12,%rax,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x1ed17
jnp 0x1eeae
movss -0xc(%r11), %xmm2
mulss %xmm1, %xmm2
addss (%r10,%rbp,4), %xmm2
movss %xmm2, (%r10,%rbp,4)
movss -0x8(%r11), %xmm2
mulss %xmm1, %xmm2
addss 0x4(%r10,%rbp,4), %xmm2
movss %xmm2, 0x4(%r10,%rbp,4)
movss -0x4(%r11), %xmm2
mulss %xmm1, %xmm2
addss 0x8(%r10,%rbp,4), %xmm2
movss %xmm2, 0x8(%r10,%rbp,4)
mulss (%r11), %xmm1
addss 0xc(%r10,%rbp,4), %xmm1
incq %rax
movss %xmm1, 0xc(%r10,%rbp,4)
addq $0x10, %r11
cmpq %rax, %r15
jne 0x1ed06
jmp 0x1ee4b
cmpl %r15d, %r11d
jg 0x1ee4b
subl %r11d, %r15d
incl %r15d
movq (%rsp), %rax
leaq (%rax,%r11,8), %rax
addq $-0x8, %rax
xorl %r11d, %r11d
movss (%r12,%r11,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x1edb0
jnp 0x1ee8f
movss -0x4(%rax,%r11,8), %xmm2
mulss %xmm1, %xmm2
addss (%r10,%rbp,4), %xmm2
movss %xmm2, (%r10,%rbp,4)
mulss (%rax,%r11,8), %xmm1
addss 0x4(%r10,%rbp,4), %xmm1
leaq 0x1(%r11), %rdx
movss %xmm1, 0x4(%r10,%rbp,4)
movq %rdx, %r11
cmpq %rdx, %r15
jne 0x1ed9f
jmp 0x1ee4b
cmpl %r15d, %r11d
jg 0x1ee4b
movq %r14, %rax
imulq 0x18(%rsp), %rax
subl %r11d, %r15d
incl %r15d
movq 0x20(%rsp), %rdx
leaq (%rdx,%rax,4), %rbp
imulq %r13, %r11
addq 0x10(%rsp), %r11
xorl %eax, %eax
movss (%rbp,%rax,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x1ee1e
jnp 0x1ee70
testl %ecx, %ecx
jle 0x1ee40
xorl %edx, %edx
movss (%r11,%rdx,4), %xmm2
mulss %xmm1, %xmm2
addss (%rsi,%rdx,4), %xmm2
movss %xmm2, (%rsi,%rdx,4)
incq %rdx
cmpq %rdx, %r8
jne 0x1ee24
incq %rax
addq %r13, %r11
cmpq %r15, %rax
jne 0x1ee11
incq %r14
addq 0x28(%rsp), %r12
addq %r13, %rsi
cmpq 0x30(%rsp), %r14
jne 0x1ebbf
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x69a8(%rip), %rdi      # 0x2581f
leaq 0x5fcc(%rip), %rsi      # 0x24e4a
leaq 0x6869(%rip), %rcx      # 0x256ee
movl $0x5e9, %edx            # imm = 0x5E9
callq 0x5130
leaq 0x6989(%rip), %rdi      # 0x2581f
leaq 0x5fad(%rip), %rsi      # 0x24e4a
leaq 0x684a(%rip), %rcx      # 0x256ee
movl $0x5c7, %edx            # imm = 0x5C7
callq 0x5130
leaq 0x696a(%rip), %rdi      # 0x2581f
leaq 0x5f8e(%rip), %rsi      # 0x24e4a
leaq 0x682b(%rip), %rcx      # 0x256ee
movl $0x5dc, %edx            # imm = 0x5DC
callq 0x5130
leaq 0x694b(%rip), %rdi      # 0x2581f
leaq 0x5f6f(%rip), %rsi      # 0x24e4a
leaq 0x680c(%rip), %rcx      # 0x256ee
movl $0x5be, %edx            # imm = 0x5BE
callq 0x5130
leaq 0x692c(%rip), %rdi      # 0x2581f
leaq 0x5f50(%rip), %rsi      # 0x24e4a
leaq 0x67ed(%rip), %rcx      # 0x256ee
movl $0x5d1, %edx            # imm = 0x5D1
callq 0x5130
leaq 0x684f(%rip), %rdi      # 0x25761
leaq 0x5f31(%rip), %rsi      # 0x24e4a
leaq 0x67ce(%rip), %rcx      # 0x256ee
movl $0x5b4, %edx            # imm = 0x5B4
callq 0x5130
leaq 0x67b4(%rip), %rdi      # 0x256e5
leaq 0x5f12(%rip), %rsi      # 0x24e4a
leaq 0x67af(%rip), %rcx      # 0x256ee
movl $0x5b2, %edx            # imm = 0x5B2
callq 0x5130
leaq 0x67df(%rip), %rdi      # 0x2572f
leaq 0x5ef3(%rip), %rsi      # 0x24e4a
leaq 0x6790(%rip), %rcx      # 0x256ee
movl $0x5b3, %edx            # imm = 0x5B3
callq 0x5130
leaq 0x686a(%rip), %rdi      # 0x257d9
leaq 0x5ed4(%rip), %rsi      # 0x24e4a
leaq 0x6771(%rip), %rcx      # 0x256ee
movl $0x5b6, %edx            # imm = 0x5B6
callq 0x5130
leaq 0x6805(%rip), %rdi      # 0x25793
leaq 0x5eb5(%rip), %rsi      # 0x24e4a
leaq 0x6752(%rip), %rcx      # 0x256ee
movl $0x5b5, %edx            # imm = 0x5B5
callq 0x5130