// File: /workspace/github_c_makefile_star2_O2/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 $0x48, %rsp
movq %rsi, %r9
movl 0x20(%rdi), %esi
movslq 0x4c(%rdi), %rcx
movq 0x98(%rdi), %rax
movl 0xb8(%rdi), %r10d
movl %r10d, %edx
imull %ecx, %edx
movslq %edx, %rdx
movq 0x70(%rdi), %r8
movq 0x78(%rdi), %r15
movslq 0xa8(%rdi), %r11
movl %r10d, 0x8(%rsp)
negl %r10d
movl %r10d, 0xc(%rsp)
xorl %ebp, %ebp
testl %ecx, %ecx
movl $0x0, %r14d
cmovgl %ecx, %r14d
testl %esi, %esi
cmovlel %ebp, %esi
movq %rsi, 0x40(%rsp)
leaq 0xc(%rax,%rdx,4), %rsi
movq %rsi, 0x18(%rsp)
leaq 0x8(%rax,%rdx,4), %rsi
movq %rsi, 0x20(%rsp)
leaq (%rax,%rdx,4), %rax
movq %rax, 0x10(%rsp)
movq %r11, 0x28(%rsp)
leaq (,%r11,4), %rax
movq %rax, 0x38(%rsp)
xorps %xmm0, %xmm0
leaq (,%rcx,4), %r12
movq %r9, %rsi
movq %r15, 0x30(%rsp)
cmpq 0x40(%rsp), %rbp
je 0x1741e
movslq (%r8,%rbp,8), %rdx
movslq 0x4(%r8,%rbp,8), %r10
cmpl %edx, %r10d
jl 0x174c8
cmpl 0xc(%rsp), %edx
jl 0x174e7
movl 0x8(%rdi), %eax
addl 0x8(%rsp), %eax
cmpl %eax, %edx
jge 0x17525
cmpl %eax, %r10d
jge 0x17506
leal -0x1(%rcx), %eax
cmpl $0x3, %eax
ja 0x173af
movq %rbp, %rbx
imulq %rcx, %rbx
leaq 0x4544(%rip), %r11      # 0x1b744
movslq (%r11,%rax,4), %rax
addq %r11, %rax
jmpq *%rax
movq 0x10(%rsp), %rax
leaq (%rax,%rdx,4), %r11
xorl %r13d, %r13d
leaq (%rdx,%r13), %rax
cmpq %r10, %rax
jg 0x1740e
movss (%r15,%r13,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x17233
jnp 0x1742d
mulss (%r11,%r13,4), %xmm1
incq %r13
addss (%r9,%rbx,4), %xmm1
movss %xmm1, (%r9,%rbx,4)
jmp 0x17215
imulq $0xc, %rdx, %r11
addq 0x20(%rsp), %r11
xorl %r13d, %r13d
leaq (%rdx,%r13), %rax
cmpq %r10, %rax
jg 0x1740e
movss (%r15,%r13,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x17274
jnp 0x1748a
movss -0x8(%r11), %xmm2
mulss %xmm1, %xmm2
addss (%r9,%rbx,4), %xmm2
movss %xmm2, (%r9,%rbx,4)
movss -0x4(%r11), %xmm2
mulss %xmm1, %xmm2
addss 0x4(%r9,%rbx,4), %xmm2
incq %r13
movss %xmm2, 0x4(%r9,%rbx,4)
mulss (%r11), %xmm1
addss 0x8(%r9,%rbx,4), %xmm1
movss %xmm1, 0x8(%r9,%rbx,4)
addq $0xc, %r11
jmp 0x17256
movq %rdx, %r13
shlq $0x4, %r13
addq 0x18(%rsp), %r13
xorl %r11d, %r11d
cmpq %r10, %rdx
jg 0x1740e
movss (%r15,%r11), %xmm1
ucomiss %xmm0, %xmm1
jne 0x172e7
jnp 0x1746b
movss -0xc(%r13,%r11,4), %xmm2
mulss %xmm1, %xmm2
addss (%r9,%rbx,4), %xmm2
movss %xmm2, (%r9,%rbx,4)
movss -0x8(%r13,%r11,4), %xmm2
mulss %xmm1, %xmm2
addss 0x4(%r9,%rbx,4), %xmm2
movss %xmm2, 0x4(%r9,%rbx,4)
movss -0x4(%r13,%r11,4), %xmm2
mulss %xmm1, %xmm2
addss 0x8(%r9,%rbx,4), %xmm2
movss %xmm2, 0x8(%r9,%rbx,4)
mulss (%r13,%r11,4), %xmm1
addss 0xc(%r9,%rbx,4), %xmm1
movss %xmm1, 0xc(%r9,%rbx,4)
incq %rdx
addq $0x4, %r11
jmp 0x172cd
movq 0x18(%rsp), %rax
leaq (%rax,%rdx,8), %r11
addq $-0x8, %r11
xorl %r13d, %r13d
leaq (%rdx,%r13), %rax
cmpq %r10, %rax
jg 0x1740e
movss (%r15,%r13,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x1737f
jnp 0x174a9
movss -0x4(%r11,%r13,8), %xmm2
mulss %xmm1, %xmm2
addss (%r9,%rbx,4), %xmm2
movss %xmm2, (%r9,%rbx,4)
mulss (%r11,%r13,8), %xmm1
incq %r13
addss 0x4(%r9,%rbx,4), %xmm1
movss %xmm1, 0x4(%r9,%rbx,4)
jmp 0x17361
movq %rbp, %rax
imulq 0x28(%rsp), %rax
movq 0x30(%rsp), %r11
leaq (%r11,%rax,4), %rbx
movq %rdx, %r13
imulq %r12, %r13
addq 0x10(%rsp), %r13
xorl %r11d, %r11d
cmpq %r10, %rdx
jg 0x1740e
movss (%rbx,%r11,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x173e2
jnp 0x1744c
incq %r11
xorl %eax, %eax
cmpq %rax, %r14
je 0x17406
movss (%r13,%rax,4), %xmm2
mulss %xmm1, %xmm2
addss (%rsi,%rax,4), %xmm2
movss %xmm2, (%rsi,%rax,4)
incq %rax
jmp 0x173e7
incq %rdx
addq %r12, %r13
jmp 0x173d0
incq %rbp
addq 0x38(%rsp), %r15
addq %r12, %rsi
jmp 0x171a7
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6385(%rip), %rdi      # 0x1d7b9
leaq 0x59db(%rip), %rsi      # 0x1ce16
leaq 0x6278(%rip), %rcx      # 0x1d6ba
movl $0x5be, %edx            # imm = 0x5BE
callq 0x5130
leaq 0x6366(%rip), %rdi      # 0x1d7b9
leaq 0x59bc(%rip), %rsi      # 0x1ce16
leaq 0x6259(%rip), %rcx      # 0x1d6ba
movl $0x5e9, %edx            # imm = 0x5E9
callq 0x5130
leaq 0x6347(%rip), %rdi      # 0x1d7b9
leaq 0x599d(%rip), %rsi      # 0x1ce16
leaq 0x623a(%rip), %rcx      # 0x1d6ba
movl $0x5dc, %edx            # imm = 0x5DC
callq 0x5130
leaq 0x6328(%rip), %rdi      # 0x1d7b9
leaq 0x597e(%rip), %rsi      # 0x1ce16
leaq 0x621b(%rip), %rcx      # 0x1d6ba
movl $0x5d1, %edx            # imm = 0x5D1
callq 0x5130
leaq 0x6309(%rip), %rdi      # 0x1d7b9
leaq 0x595f(%rip), %rsi      # 0x1ce16
leaq 0x61fc(%rip), %rcx      # 0x1d6ba
movl $0x5c7, %edx            # imm = 0x5C7
callq 0x5130
leaq 0x61e2(%rip), %rdi      # 0x1d6b1
leaq 0x5940(%rip), %rsi      # 0x1ce16
leaq 0x61dd(%rip), %rcx      # 0x1d6ba
movl $0x5b2, %edx            # imm = 0x5B2
callq 0x5130
leaq 0x620d(%rip), %rdi      # 0x1d6fb
leaq 0x5921(%rip), %rsi      # 0x1ce16
leaq 0x61be(%rip), %rcx      # 0x1d6ba
movl $0x5b3, %edx            # imm = 0x5B3
callq 0x5130
leaq 0x6266(%rip), %rdi      # 0x1d773
leaq 0x5902(%rip), %rsi      # 0x1ce16
leaq 0x619f(%rip), %rcx      # 0x1d6ba
movl $0x5b6, %edx            # imm = 0x5B6
callq 0x5130
leaq 0x6201(%rip), %rdi      # 0x1d72d
leaq 0x58e3(%rip), %rsi      # 0x1ce16
leaq 0x6180(%rip), %rcx      # 0x1d6ba
movl $0x5b5, %edx            # imm = 0x5B5
callq 0x5130