// File: /workspace/github_cpp_makefile_star2_O3/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 $0x38, %rsp
movslq 0x20(%rdi), %rax
movq %rax, -0x60(%rbp)
testq %rax, %rax
jle 0x146b8
movq %rsi, %r12
movslq 0x4c(%rdi), %rcx
movl 0xb8(%rdi), %esi
movl %esi, %eax
imull %ecx, %eax
movl %ecx, %r8d
movq 0x98(%rdi), %rdx
cltq
movq 0x70(%rdi), %r9
movq 0x78(%rdi), %r15
movslq 0xa8(%rdi), %r10
movl %esi, -0x34(%rbp)
negl %esi
movl %esi, -0x38(%rbp)
movq %r10, -0x48(%rbp)
leaq (,%r10,4), %rsi
movq %rsi, -0x58(%rbp)
leaq 0xc(%rdx,%rax,4), %rsi
movq %rsi, -0x30(%rbp)
leaq (%rdx,%rax,4), %rax
movq %rax, -0x40(%rbp)
leaq (,%rcx,4), %r13
xorl %r14d, %r14d
xorps %xmm0, %xmm0
movq %r12, %rsi
movq %r15, -0x50(%rbp)
movslq (%r9,%r14,8), %rax
movl 0x4(%r9,%r14,8), %r10d
cmpl %eax, %r10d
jl 0x14762
cmpl -0x38(%rbp), %eax
jl 0x14781
movl 0x8(%rdi), %edx
addl -0x34(%rbp), %edx
cmpl %edx, %eax
jge 0x147bf
cmpl %edx, %r10d
jge 0x147a0
leal -0x1(%r8), %edx
cmpl $0x3, %edx
ja 0x1464b
movq %r14, %r11
imulq %rcx, %r11
leaq 0x1eb4(%rip), %rbx      # 0x1635c
movslq (%rbx,%rdx,4), %rdx
addq %rbx, %rdx
jmpq *%rdx
subl %eax, %r10d
incl %r10d
movq -0x40(%rbp), %rdx
leaq (%rdx,%rax,4), %rax
xorl %edx, %edx
movss (%r15,%rdx,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x144d2
jnp 0x14705
mulss (%rax,%rdx,4), %xmm1
incq %rdx
addss (%r12,%r11,4), %xmm1
movss %xmm1, (%r12,%r11,4)
cmpq %rdx, %r10
jne 0x144c1
jmp 0x146a4
subl %eax, %r10d
incl %r10d
leaq (%rax,%rax,2), %rax
movq -0x30(%rbp), %rdx
leaq (%rdx,%rax,4), %rax
addq $-0x4, %rax
xorl %edx, %edx
movss (%r15,%rdx,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x14519
jnp 0x14743
movss -0x8(%rax), %xmm2
mulss %xmm1, %xmm2
addss (%r12,%r11,4), %xmm2
movss %xmm2, (%r12,%r11,4)
movss -0x4(%rax), %xmm2
mulss %xmm1, %xmm2
addss 0x4(%r12,%r11,4), %xmm2
movss %xmm2, 0x4(%r12,%r11,4)
mulss (%rax), %xmm1
addss 0x8(%r12,%r11,4), %xmm1
incq %rdx
movss %xmm1, 0x8(%r12,%r11,4)
addq $0xc, %rax
cmpq %rdx, %r10
jne 0x14508
jmp 0x146a4
subl %eax, %r10d
incl %r10d
shlq $0x4, %rax
addq -0x30(%rbp), %rax
xorl %edx, %edx
movss (%r15,%rdx,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x14589
jnp 0x146c7
movss -0xc(%rax), %xmm2
mulss %xmm1, %xmm2
addss (%r12,%r11,4), %xmm2
movss %xmm2, (%r12,%r11,4)
movss -0x8(%rax), %xmm2
mulss %xmm1, %xmm2
addss 0x4(%r12,%r11,4), %xmm2
movss %xmm2, 0x4(%r12,%r11,4)
movss -0x4(%rax), %xmm2
mulss %xmm1, %xmm2
addss 0x8(%r12,%r11,4), %xmm2
movss %xmm2, 0x8(%r12,%r11,4)
mulss (%rax), %xmm1
addss 0xc(%r12,%r11,4), %xmm1
incq %rdx
movss %xmm1, 0xc(%r12,%r11,4)
addq $0x10, %rax
cmpq %rdx, %r10
jne 0x14578
jmp 0x146a4
subl %eax, %r10d
incl %r10d
movq -0x30(%rbp), %rdx
leaq (%rdx,%rax,8), %rax
addq $-0x8, %rax
xorl %edx, %edx
movss (%r15,%rdx,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x14614
jnp 0x14724
movss -0x4(%rax,%rdx,8), %xmm2
mulss %xmm1, %xmm2
addss (%r12,%r11,4), %xmm2
movss %xmm2, (%r12,%r11,4)
mulss (%rax,%rdx,8), %xmm1
addss 0x4(%r12,%r11,4), %xmm1
leaq 0x1(%rdx), %rbx
movss %xmm1, 0x4(%r12,%r11,4)
movq %rbx, %rdx
cmpq %rbx, %r10
jne 0x14603
jmp 0x146a4
movq %r14, %rdx
imulq -0x48(%rbp), %rdx
subl %eax, %r10d
incl %r10d
movq -0x50(%rbp), %r11
leaq (%r11,%rdx,4), %r11
imulq %r13, %rax
addq -0x40(%rbp), %rax
xorl %edx, %edx
movss (%r11,%rdx,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x14678
jnp 0x146e6
testl %ecx, %ecx
jle 0x14699
xorl %ebx, %ebx
movss (%rax,%rbx,4), %xmm2
mulss %xmm1, %xmm2
addss (%rsi,%rbx,4), %xmm2
movss %xmm2, (%rsi,%rbx,4)
incq %rbx
cmpq %rbx, %r8
jne 0x1467e
incq %rdx
addq %r13, %rax
cmpq %r10, %rdx
jne 0x1466b
incq %r14
addq -0x58(%rbp), %r15
addq %r13, %rsi
cmpq -0x60(%rbp), %r14
jne 0x1445b
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3b6e(%rip), %rdi      # 0x1823c
leaq 0x319f(%rip), %rsi      # 0x17874
leaq 0x3a5c(%rip), %rcx      # 0x18138
movl $0x5d6, %edx            # imm = 0x5D6
callq 0x1080
leaq 0x3b4f(%rip), %rdi      # 0x1823c
leaq 0x3180(%rip), %rsi      # 0x17874
leaq 0x3a3d(%rip), %rcx      # 0x18138
movl $0x5e3, %edx            # imm = 0x5E3
callq 0x1080
leaq 0x3b30(%rip), %rdi      # 0x1823c
leaq 0x3161(%rip), %rsi      # 0x17874
leaq 0x3a1e(%rip), %rcx      # 0x18138
movl $0x5b8, %edx            # imm = 0x5B8
callq 0x1080
leaq 0x3b11(%rip), %rdi      # 0x1823c
leaq 0x3142(%rip), %rsi      # 0x17874
leaq 0x39ff(%rip), %rcx      # 0x18138
movl $0x5c1, %edx            # imm = 0x5C1
callq 0x1080
leaq 0x3af2(%rip), %rdi      # 0x1823c
leaq 0x3123(%rip), %rsi      # 0x17874
leaq 0x39e0(%rip), %rcx      # 0x18138
movl $0x5cb, %edx            # imm = 0x5CB
callq 0x1080
leaq 0x39c6(%rip), %rdi      # 0x1812f
leaq 0x3104(%rip), %rsi      # 0x17874
leaq 0x39c1(%rip), %rcx      # 0x18138
movl $0x5ac, %edx            # imm = 0x5AC
callq 0x1080
leaq 0x39f6(%rip), %rdi      # 0x1817e
leaq 0x30e5(%rip), %rsi      # 0x17874
leaq 0x39a2(%rip), %rcx      # 0x18138
movl $0x5ad, %edx            # imm = 0x5AD
callq 0x1080
leaq 0x3a4f(%rip), %rdi      # 0x181f6
leaq 0x30c6(%rip), %rsi      # 0x17874
leaq 0x3983(%rip), %rcx      # 0x18138
movl $0x5b0, %edx            # imm = 0x5B0
callq 0x1080
leaq 0x39ea(%rip), %rdi      # 0x181b0
leaq 0x30a7(%rip), %rsi      # 0x17874
leaq 0x3964(%rip), %rcx      # 0x18138
movl $0x5af, %edx            # imm = 0x5AF
callq 0x1080