// File: /workspace/github_c_makefile_star2_O2/yui0[P]img2vec/./stb_image_resize.h
// Function: stbir__resample_horizontal_downsample
static void stbir__resample_horizontal_downsample(stbir__info* stbir_info, float* output_buffer)
{
    int x, k;
    int input_w = stbir_info->input_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;
    int filter_pixel_margin = stbir_info->horizontal_filter_pixel_margin;
    int max_x = input_w + filter_pixel_margin * 2;

    STBIR_ASSERT(!stbir__use_width_upsampling(stbir_info));

    switch (channels) {
        case 1:
            for (x = 0; x < max_x; x++)
            {
                int n0 = horizontal_contributors[x].n0;
                int n1 = horizontal_contributors[x].n1;

                int in_x = x - filter_pixel_margin;
                int in_pixel_index = in_x * 1;
                int max_n = n1;
                int coefficient_group = coefficient_width * x;

                for (k = n0; k <= max_n; k++)
                {
                    int out_pixel_index = k * 1;
                    float coefficient = horizontal_coefficients[coefficient_group + k - n0];
                    STBIR_ASSERT(coefficient != 0);
                    output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient;
                }
            }
            break;

        case 2:
            for (x = 0; x < max_x; x++)
            {
                int n0 = horizontal_contributors[x].n0;
                int n1 = horizontal_contributors[x].n1;

                int in_x = x - filter_pixel_margin;
                int in_pixel_index = in_x * 2;
                int max_n = n1;
                int coefficient_group = coefficient_width * x;

                for (k = n0; k <= max_n; k++)
                {
                    int out_pixel_index = k * 2;
                    float coefficient = horizontal_coefficients[coefficient_group + k - n0];
                    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 (x = 0; x < max_x; x++)
            {
                int n0 = horizontal_contributors[x].n0;
                int n1 = horizontal_contributors[x].n1;

                int in_x = x - filter_pixel_margin;
                int in_pixel_index = in_x * 3;
                int max_n = n1;
                int coefficient_group = coefficient_width * x;

                for (k = n0; k <= max_n; k++)
                {
                    int out_pixel_index = k * 3;
                    float coefficient = horizontal_coefficients[coefficient_group + k - n0];
                    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 (x = 0; x < max_x; x++)
            {
                int n0 = horizontal_contributors[x].n0;
                int n1 = horizontal_contributors[x].n1;

                int in_x = x - filter_pixel_margin;
                int in_pixel_index = in_x * 4;
                int max_n = n1;
                int coefficient_group = coefficient_width * x;

                for (k = n0; k <= max_n; k++)
                {
                    int out_pixel_index = k * 4;
                    float coefficient = horizontal_coefficients[coefficient_group + k - n0];
                    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 (x = 0; x < max_x; x++)
            {
                int n0 = horizontal_contributors[x].n0;
                int n1 = horizontal_contributors[x].n1;

                int in_x = x - filter_pixel_margin;
                int in_pixel_index = in_x * channels;
                int max_n = n1;
                int coefficient_group = coefficient_width * x;

                for (k = n0; k <= max_n; k++)
                {
                    int c;
                    int out_pixel_index = k * channels;
                    float coefficient = horizontal_coefficients[coefficient_group + k - n0];
                    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 $0x18, %rsp
movss 0x44(%rdi), %xmm0
ucomiss 0x14ed(%rip), %xmm0     # 0x19008
ja 0x17f3d
movslq 0x4c(%rdi), %r10
movq 0x98(%rdi), %r11
movslq 0xb8(%rdi), %r12
movl %r12d, %eax
imull %r10d, %eax
movslq %eax, %rdx
movq 0x70(%rdi), %rax
movq 0x78(%rdi), %rcx
movl 0xa8(%rdi), %r13d
leal (%r12,%r12), %r8d
addl 0x8(%rdi), %r8d
leal -0x1(%r10), %r9d
cmpl $0x3, %r9d
ja 0x17df1
leaq (%r11,%rdx,4), %rdi
leaq 0x18f7(%rip), %rdx      # 0x19464
movslq (%rdx,%r9,4), %r9
addq %rdx, %r9
jmpq *%r9
xorl %r10d, %r10d
testl %r8d, %r8d
cmovlel %r10d, %r8d
xorps %xmm0, %xmm0
xorl %edx, %edx
cmpq %r8, %rdx
je 0x17e93
movslq (%rax,%rdx,8), %r9
movslq 0x4(%rax,%rdx,8), %r11
movq %rdx, %rbx
subq %r12, %rbx
movl %r10d, %ebp
cmpq %r11, %r9
jg 0x17bd2
movslq %ebp, %r14
movss (%rcx,%r14,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x17bba
jnp 0x17ec1
mulss (%rdi,%rbx,4), %xmm1
addss (%rsi,%r9,4), %xmm1
movss %xmm1, (%rsi,%r9,4)
incq %r9
incl %ebp
jmp 0x17ba1
incq %rdx
addl %r13d, %r10d
jmp 0x17b86
xorl %r10d, %r10d
testl %r8d, %r8d
cmovlel %r10d, %r8d
addq $0x8, %rsi
xorps %xmm0, %xmm0
xorl %r11d, %r11d
cmpq %r8, %r11
je 0x17e93
movslq (%rax,%r11,8), %rdx
movslq 0x4(%rax,%r11,8), %rbx
movq %r11, %r9
subq %r12, %r9
imulq $0xc, %r9, %r9
imulq $0xc, %rdx, %r14
addq %rsi, %r14
movl %r10d, %ebp
cmpq %rbx, %rdx
jg 0x17c76
movslq %ebp, %r15
movss (%rcx,%r15,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x17c2d
jnp 0x17ea2
movss (%rdi,%r9), %xmm2
mulss %xmm1, %xmm2
addss -0x8(%r14), %xmm2
movss %xmm2, -0x8(%r14)
movss 0x4(%rdi,%r9), %xmm2
mulss %xmm1, %xmm2
addss -0x4(%r14), %xmm2
movss %xmm2, -0x4(%r14)
mulss 0x8(%rdi,%r9), %xmm1
addss (%r14), %xmm1
movss %xmm1, (%r14)
incq %rdx
addq $0xc, %r14
incl %ebp
jmp 0x17c14
incq %r11
addl %r13d, %r10d
jmp 0x17bee
xorl %r10d, %r10d
testl %r8d, %r8d
cmovlel %r10d, %r8d
movq %r8, 0x10(%rsp)
addq $0xc, %rsi
xorps %xmm0, %xmm0
xorl %r11d, %r11d
movl %r13d, 0x4(%rsp)
movq %r12, 0x8(%rsp)
cmpq 0x10(%rsp), %r11
je 0x17e93
movslq (%rax,%r11,8), %rdx
movslq 0x4(%rax,%r11,8), %r14
movq %r11, %r9
subq %r12, %r9
leaq (,%r9,4), %r15
leaq 0x1(,%r9,4), %r12
leaq 0x2(,%r9,4), %r13
leaq 0x3(,%r9,4), %rbp
movq %rdx, %rbx
shlq $0x4, %rbx
addq %rsi, %rbx
movl %r10d, %r9d
cmpq %r14, %rdx
jg 0x17d59
movslq %r9d, %r8
movss (%rcx,%r8,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x17d04
jnp 0x17ee0
movss (%rdi,%r15,4), %xmm2
mulss %xmm1, %xmm2
addss -0xc(%rbx), %xmm2
movss %xmm2, -0xc(%rbx)
movss (%rdi,%r12,4), %xmm2
mulss %xmm1, %xmm2
addss -0x8(%rbx), %xmm2
movss %xmm2, -0x8(%rbx)
movss (%rdi,%r13,4), %xmm2
mulss %xmm1, %xmm2
addss -0x4(%rbx), %xmm2
movss %xmm2, -0x4(%rbx)
mulss (%rdi,%rbp,4), %xmm1
addss (%rbx), %xmm1
movss %xmm1, (%rbx)
incq %rdx
incl %r9d
addq $0x10, %rbx
jmp 0x17ceb
incq %r11
movl 0x4(%rsp), %r13d
addl %r13d, %r10d
movq 0x8(%rsp), %r12
jmp 0x17ca4
xorl %r10d, %r10d
testl %r8d, %r8d
cmovlel %r10d, %r8d
xorps %xmm0, %xmm0
xorl %r11d, %r11d
cmpq %r8, %r11
je 0x17e93
movslq (%rax,%r11,8), %rdx
movslq 0x4(%rax,%r11,8), %r9
movq %r11, %rbx
subq %r12, %rbx
leaq 0x1(,%rbx,2), %r14
addq %rbx, %rbx
movl %r10d, %ebp
cmpq %r9, %rdx
jg 0x17de9
movslq %ebp, %r15
movss (%rcx,%r15,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x17dbd
jnp 0x17eff
movss (%rdi,%rbx,4), %xmm2
mulss %xmm1, %xmm2
addss (%rsi,%rdx,8), %xmm2
movss %xmm2, (%rsi,%rdx,8)
mulss (%rdi,%r14,4), %xmm1
addss 0x4(%rsi,%rdx,8), %xmm1
movss %xmm1, 0x4(%rsi,%rdx,8)
incq %rdx
incl %ebp
jmp 0x17da4
incq %r11
addl %r13d, %r10d
jmp 0x17d7e
xorl %edi, %edi
testl %r10d, %r10d
movl $0x0, %ebx
cmovgl %r10d, %ebx
testl %r8d, %r8d
cmovlel %edi, %r8d
movq %r8, %rbp
shlq $0x2, %rdx
imulq %r10, %r12
shlq $0x2, %r10
shlq $0x2, %r12
subq %r12, %rdx
addq %rdx, %r11
xorps %xmm0, %xmm0
cmpq %rbp, %rdi
je 0x17e93
movslq (%rax,%rdi,8), %r9
movslq 0x4(%rax,%rdi,8), %r14
movl %r13d, %edx
imull %edi, %edx
subl %r9d, %edx
movq %r10, %r15
imulq %r9, %r15
addq %rsi, %r15
cmpq %r14, %r9
jg 0x17e8b
leal (%rdx,%r9), %r8d
movslq %r8d, %r8
movss (%rcx,%r8,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x17e60
jnp 0x17f1e
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x17e83
movss (%r11,%r12,4), %xmm2
mulss %xmm1, %xmm2
addss (%r15,%r12,4), %xmm2
movss %xmm2, (%r15,%r12,4)
incq %r12
jmp 0x17e63
incq %r9
addq %r10, %r15
jmp 0x17e43
incq %rdi
addq %r10, %r11
jmp 0x17e22
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x575e(%rip), %rdi      # 0x1d607
leaq 0x4dcc(%rip), %rsi      # 0x1cc7c
leaq 0x5801(%rip), %rcx      # 0x1d6b8
movl $0x63e, %edx            # imm = 0x63E
callq 0x10d0
leaq 0x573f(%rip), %rdi      # 0x1d607
leaq 0x4dad(%rip), %rsi      # 0x1cc7c
leaq 0x57e2(%rip), %rcx      # 0x1d6b8
movl $0x613, %edx            # imm = 0x613
callq 0x10d0
leaq 0x5720(%rip), %rdi      # 0x1d607
leaq 0x4d8e(%rip), %rsi      # 0x1cc7c
leaq 0x57c3(%rip), %rcx      # 0x1d6b8
movl $0x655, %edx            # imm = 0x655
callq 0x10d0
leaq 0x5701(%rip), %rdi      # 0x1d607
leaq 0x4d6f(%rip), %rsi      # 0x1cc7c
leaq 0x57a4(%rip), %rcx      # 0x1d6b8
movl $0x628, %edx            # imm = 0x628
callq 0x10d0
leaq 0x56e2(%rip), %rdi      # 0x1d607
leaq 0x4d50(%rip), %rsi      # 0x1cc7c
leaq 0x5785(%rip), %rcx      # 0x1d6b8
movl $0x66e, %edx            # imm = 0x66E
callq 0x10d0
leaq 0x574b(%rip), %rdi      # 0x1d68f
leaq 0x4d31(%rip), %rsi      # 0x1cc7c
leaq 0x5766(%rip), %rcx      # 0x1d6b8
movl $0x601, %edx            # imm = 0x601
callq 0x10d0