// File: /workspace/github_c_makefile_star2_O3/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 0x1f3d1
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 %r11d, %r11d
xorps %xmm0, %xmm0
movq %r10, %rsi
movq %r12, 0x20(%rsp)
movslq (%r9,%r11,8), %r14
movl 0x4(%r9,%r11,8), %r15d
cmpl %r14d, %r15d
jl 0x1f47b
cmpl %ebx, %r14d
jl 0x1f49a
movl 0x8(%rdi), %eax
addl 0xc(%rsp), %eax
cmpl %eax, %r14d
jge 0x1f4d8
cmpl %eax, %r15d
jge 0x1f4b9
leal -0x1(%r8), %eax
cmpl $0x3, %eax
ja 0x1f35e
movq %r11, %rbp
imulq %rcx, %rbp
leaq 0x470c(%rip), %rdx      # 0x238bc
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
subl %r14d, %r15d
incl %r15d
movq 0x10(%rsp), %rax
leaq (%rax,%r14,4), %rax
xorl %r14d, %r14d
movss (%r12,%r14,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x1f1dc
jnp 0x1f41e
mulss (%rax,%r14,4), %xmm1
incq %r14
addss (%r10,%rbp,4), %xmm1
movss %xmm1, (%r10,%rbp,4)
cmpq %r14, %r15
jne 0x1f1cb
jmp 0x1f3bb
subl %r14d, %r15d
incl %r15d
leaq (%r14,%r14,2), %rax
movq (%rsp), %rdx
leaq (%rdx,%rax,4), %rax
addq $-0x4, %rax
xorl %r14d, %r14d
movss (%r12,%r14,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x1f225
jnp 0x1f45c
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 %r14
movss %xmm1, 0x8(%r10,%rbp,4)
addq $0xc, %rax
cmpq %r14, %r15
jne 0x1f214
jmp 0x1f3bb
subl %r14d, %r15d
incl %r15d
shlq $0x4, %r14
addq (%rsp), %r14
xorl %eax, %eax
movss (%r12,%rax,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x1f295
jnp 0x1f3e0
movss -0xc(%r14), %xmm2
mulss %xmm1, %xmm2
addss (%r10,%rbp,4), %xmm2
movss %xmm2, (%r10,%rbp,4)
movss -0x8(%r14), %xmm2
mulss %xmm1, %xmm2
addss 0x4(%r10,%rbp,4), %xmm2
movss %xmm2, 0x4(%r10,%rbp,4)
movss -0x4(%r14), %xmm2
mulss %xmm1, %xmm2
addss 0x8(%r10,%rbp,4), %xmm2
movss %xmm2, 0x8(%r10,%rbp,4)
mulss (%r14), %xmm1
addss 0xc(%r10,%rbp,4), %xmm1
incq %rax
movss %xmm1, 0xc(%r10,%rbp,4)
addq $0x10, %r14
cmpq %rax, %r15
jne 0x1f284
jmp 0x1f3bb
subl %r14d, %r15d
incl %r15d
movq (%rsp), %rax
leaq (%rax,%r14,8), %rax
addq $-0x8, %rax
xorl %r14d, %r14d
movss (%r12,%r14,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x1f325
jnp 0x1f43d
movss -0x4(%rax,%r14,8), %xmm2
mulss %xmm1, %xmm2
addss (%r10,%rbp,4), %xmm2
movss %xmm2, (%r10,%rbp,4)
mulss (%rax,%r14,8), %xmm1
addss 0x4(%r10,%rbp,4), %xmm1
leaq 0x1(%r14), %rdx
movss %xmm1, 0x4(%r10,%rbp,4)
movq %rdx, %r14
cmpq %rdx, %r15
jne 0x1f314
jmp 0x1f3bb
movq %r11, %rax
imulq 0x18(%rsp), %rax
subl %r14d, %r15d
incl %r15d
movq 0x20(%rsp), %rdx
leaq (%rdx,%rax,4), %rbp
imulq %r13, %r14
addq 0x10(%rsp), %r14
xorl %eax, %eax
movss (%rbp,%rax,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x1f38e
jnp 0x1f3ff
testl %ecx, %ecx
jle 0x1f3b0
xorl %edx, %edx
movss (%r14,%rdx,4), %xmm2
mulss %xmm1, %xmm2
addss (%rsi,%rdx,4), %xmm2
movss %xmm2, (%rsi,%rdx,4)
incq %rdx
cmpq %rdx, %r8
jne 0x1f394
incq %rax
addq %r13, %r14
cmpq %r15, %rax
jne 0x1f381
incq %r11
addq 0x28(%rsp), %r12
addq %r13, %rsi
cmpq 0x30(%rsp), %r11
jne 0x1f161
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x653a(%rip), %rdi      # 0x25921
leaq 0x5b90(%rip), %rsi      # 0x24f7e
leaq 0x642d(%rip), %rcx      # 0x25822
movl $0x5dc, %edx            # imm = 0x5DC
callq 0x5130
leaq 0x651b(%rip), %rdi      # 0x25921
leaq 0x5b71(%rip), %rsi      # 0x24f7e
leaq 0x640e(%rip), %rcx      # 0x25822
movl $0x5e9, %edx            # imm = 0x5E9
callq 0x5130
leaq 0x64fc(%rip), %rdi      # 0x25921
leaq 0x5b52(%rip), %rsi      # 0x24f7e
leaq 0x63ef(%rip), %rcx      # 0x25822
movl $0x5be, %edx            # imm = 0x5BE
callq 0x5130
leaq 0x64dd(%rip), %rdi      # 0x25921
leaq 0x5b33(%rip), %rsi      # 0x24f7e
leaq 0x63d0(%rip), %rcx      # 0x25822
movl $0x5c7, %edx            # imm = 0x5C7
callq 0x5130
leaq 0x64be(%rip), %rdi      # 0x25921
leaq 0x5b14(%rip), %rsi      # 0x24f7e
leaq 0x63b1(%rip), %rcx      # 0x25822
movl $0x5d1, %edx            # imm = 0x5D1
callq 0x5130
leaq 0x6397(%rip), %rdi      # 0x25819
leaq 0x5af5(%rip), %rsi      # 0x24f7e
leaq 0x6392(%rip), %rcx      # 0x25822
movl $0x5b2, %edx            # imm = 0x5B2
callq 0x5130
leaq 0x63c2(%rip), %rdi      # 0x25863
leaq 0x5ad6(%rip), %rsi      # 0x24f7e
leaq 0x6373(%rip), %rcx      # 0x25822
movl $0x5b3, %edx            # imm = 0x5B3
callq 0x5130
leaq 0x641b(%rip), %rdi      # 0x258db
leaq 0x5ab7(%rip), %rsi      # 0x24f7e
leaq 0x6354(%rip), %rcx      # 0x25822
movl $0x5b6, %edx            # imm = 0x5B6
callq 0x5130
leaq 0x63b6(%rip), %rdi      # 0x25895
leaq 0x5a98(%rip), %rsi      # 0x24f7e
leaq 0x6335(%rip), %rcx      # 0x25822
movl $0x5b5, %edx            # imm = 0x5B5
callq 0x5130