// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir__resample_horizontal_upsample(stbir__info*, int, float*)
static void stbir__resample_horizontal_upsample(stbir__info* stbir_info, int n, float* output_buffer)
{
    int x, k;
    int output_w = stbir_info->output_w;
    int kernel_pixel_width = stbir_info->horizontal_filter_pixel_width;
    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
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movl 0x20(%rdi), %edx
movslq 0x4c(%rdi), %r13
movq 0x98(%rdi), %rax
movl 0xb8(%rdi), %esi
movl %esi, %ecx
imull %r13d, %ecx
movl %esi, -0x2c(%rbp)
negl %esi
movl %esi, -0x30(%rbp)
xorl %r14d, %r14d
testl %r13d, %r13d
movl $0x0, %r10d
cmovgl %r13d, %r10d
movslq %ecx, %rcx
testl %edx, %edx
cmovlel %r14d, %edx
movq 0x70(%rdi), %r11
leaq 0xc(%rax,%rcx,4), %rsi
movq %rsi, -0x40(%rbp)
leaq 0x8(%rax,%rcx,4), %rsi
movq %rsi, -0x58(%rbp)
leaq (%rax,%rcx,4), %rax
movq %rax, -0x38(%rbp)
movq 0x78(%rdi), %r15
xorps %xmm0, %xmm0
movq %rdi, -0x70(%rbp)
movslq 0xa8(%rdi), %rax
movq %rdx, %rdi
movq %rax, -0x48(%rbp)
leaq (,%rax,4), %rax
movq %rax, -0x60(%rbp)
leaq (,%r13,4), %r12
movq %rbx, %rsi
movq %r15, -0x50(%rbp)
movq %r13, -0x68(%rbp)
cmpq %rdi, %r14
je 0xe4f1
movslq (%r11,%r14,8), %r8
movslq 0x4(%r11,%r14,8), %rdx
cmpl %r8d, %edx
jl 0xe59b
cmpl -0x30(%rbp), %r8d
jl 0xe5ba
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
addl -0x2c(%rbp), %eax
cmpl %eax, %r8d
jge 0xe5f8
cmpl %eax, %edx
jge 0xe5d9
leal -0x1(%r13), %eax
cmpl $0x3, %eax
ja 0xe483
movq %r14, %r9
imulq %r13, %r9
leaq 0x1f88(%rip), %rcx      # 0x10264
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rax
leaq (%rax,%r8,4), %rax
xorl %r13d, %r13d
leaq (%r8,%r13), %rcx
cmpq %rdx, %rcx
jg 0xe4de
movss (%r15,%r13,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0xe30e
jnp 0xe500
mulss (%rax,%r13,4), %xmm1
incq %r13
addss (%rbx,%r9,4), %xmm1
movss %xmm1, (%rbx,%r9,4)
jmp 0xe2f0
imulq $0xc, %r8, %rax
addq -0x58(%rbp), %rax
xorl %r13d, %r13d
leaq (%r8,%r13), %rcx
cmpq %rdx, %rcx
jg 0xe4de
movss (%r15,%r13,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0xe34e
jnp 0xe55d
movss -0x8(%rax), %xmm2
mulss %xmm1, %xmm2
addss (%rbx,%r9,4), %xmm2
movss %xmm2, (%rbx,%r9,4)
movss -0x4(%rax), %xmm2
mulss %xmm1, %xmm2
addss 0x4(%rbx,%r9,4), %xmm2
incq %r13
movss %xmm2, 0x4(%rbx,%r9,4)
mulss (%rax), %xmm1
addss 0x8(%rbx,%r9,4), %xmm1
movss %xmm1, 0x8(%rbx,%r9,4)
addq $0xc, %rax
jmp 0xe330
movq %r8, %r13
shlq $0x4, %r13
addq -0x40(%rbp), %r13
xorl %eax, %eax
cmpq %rdx, %r8
jg 0xe4de
movss (%r15,%rax), %xmm1
ucomiss %xmm0, %xmm1
jne 0xe3bc
jnp 0xe53e
movss -0xc(%r13,%rax,4), %xmm2
mulss %xmm1, %xmm2
addss (%rbx,%r9,4), %xmm2
movss %xmm2, (%rbx,%r9,4)
movss -0x8(%r13,%rax,4), %xmm2
mulss %xmm1, %xmm2
addss 0x4(%rbx,%r9,4), %xmm2
movss %xmm2, 0x4(%rbx,%r9,4)
movss -0x4(%r13,%rax,4), %xmm2
mulss %xmm1, %xmm2
addss 0x8(%rbx,%r9,4), %xmm2
movss %xmm2, 0x8(%rbx,%r9,4)
mulss (%r13,%rax,4), %xmm1
addss 0xc(%rbx,%r9,4), %xmm1
movss %xmm1, 0xc(%rbx,%r9,4)
incq %r8
addq $0x4, %rax
jmp 0xe3a2
movq -0x40(%rbp), %rax
leaq (%rax,%r8,8), %rax
addq $-0x8, %rax
xorl %r13d, %r13d
leaq (%r8,%r13), %rcx
cmpq %rdx, %rcx
jg 0xe4de
movss (%r15,%r13,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0xe453
jnp 0xe57c
movss -0x4(%rax,%r13,8), %xmm2
mulss %xmm1, %xmm2
addss (%rbx,%r9,4), %xmm2
movss %xmm2, (%rbx,%r9,4)
mulss (%rax,%r13,8), %xmm1
incq %r13
addss 0x4(%rbx,%r9,4), %xmm1
movss %xmm1, 0x4(%rbx,%r9,4)
jmp 0xe435
movq %r14, %rax
imulq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
leaq (%rcx,%rax,4), %r9
movq %r8, %r13
imulq %r12, %r13
addq -0x38(%rbp), %r13
xorl %eax, %eax
cmpq %rdx, %r8
jg 0xe4de
movss (%r9,%rax,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0xe4b2
jnp 0xe51f
incq %rax
xorl %ecx, %ecx
cmpq %rcx, %r10
je 0xe4d6
movss (%r13,%rcx,4), %xmm2
mulss %xmm1, %xmm2
addss (%rsi,%rcx,4), %xmm2
movss %xmm2, (%rsi,%rcx,4)
incq %rcx
jmp 0xe4b7
incq %r8
addq %r12, %r13
jmp 0xe4a0
incq %r14
addq -0x60(%rbp), %r15
addq %r12, %rsi
movq -0x68(%rbp), %r13
jmp 0xe281
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3c55(%rip), %rdi      # 0x1215c
leaq 0x3286(%rip), %rsi      # 0x11794
leaq 0x3b43(%rip), %rcx      # 0x12058
movl $0x5b8, %edx            # imm = 0x5B8
callq 0x1080
leaq 0x3c36(%rip), %rdi      # 0x1215c
leaq 0x3267(%rip), %rsi      # 0x11794
leaq 0x3b24(%rip), %rcx      # 0x12058
movl $0x5e3, %edx            # imm = 0x5E3
callq 0x1080
leaq 0x3c17(%rip), %rdi      # 0x1215c
leaq 0x3248(%rip), %rsi      # 0x11794
leaq 0x3b05(%rip), %rcx      # 0x12058
movl $0x5d6, %edx            # imm = 0x5D6
callq 0x1080
leaq 0x3bf8(%rip), %rdi      # 0x1215c
leaq 0x3229(%rip), %rsi      # 0x11794
leaq 0x3ae6(%rip), %rcx      # 0x12058
movl $0x5cb, %edx            # imm = 0x5CB
callq 0x1080
leaq 0x3bd9(%rip), %rdi      # 0x1215c
leaq 0x320a(%rip), %rsi      # 0x11794
leaq 0x3ac7(%rip), %rcx      # 0x12058
movl $0x5c1, %edx            # imm = 0x5C1
callq 0x1080
leaq 0x3aad(%rip), %rdi      # 0x1204f
leaq 0x31eb(%rip), %rsi      # 0x11794
leaq 0x3aa8(%rip), %rcx      # 0x12058
movl $0x5ac, %edx            # imm = 0x5AC
callq 0x1080
leaq 0x3add(%rip), %rdi      # 0x1209e
leaq 0x31cc(%rip), %rsi      # 0x11794
leaq 0x3a89(%rip), %rcx      # 0x12058
movl $0x5ad, %edx            # imm = 0x5AD
callq 0x1080
leaq 0x3b36(%rip), %rdi      # 0x12116
leaq 0x31ad(%rip), %rsi      # 0x11794
leaq 0x3a6a(%rip), %rcx      # 0x12058
movl $0x5b0, %edx            # imm = 0x5B0
callq 0x1080
leaq 0x3ad1(%rip), %rdi      # 0x120d0
leaq 0x318e(%rip), %rsi      # 0x11794
leaq 0x3a4b(%rip), %rcx      # 0x12058
movl $0x5af, %edx            # imm = 0x5AF
callq 0x1080