// File: /workspace/github_cpp_makefile_star2_O1/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 %rdi, -0x48(%rbp)
movslq 0x20(%rdi), %rax
movq %rax, -0x68(%rbp)
testq %rax, %rax
jle 0x153f0
movq %rsi, %r12
movq -0x48(%rbp), %rsi
movslq 0x4c(%rsi), %rcx
movl 0xb8(%rsi), %ebx
movl %ebx, %eax
imull %ecx, %eax
movl %ecx, %r8d
movq 0x98(%rsi), %rdx
cltq
movq 0x70(%rsi), %rdi
movq 0x78(%rsi), %r15
movslq 0xa8(%rsi), %rsi
movl %ebx, -0x34(%rbp)
negl %ebx
movq %rsi, -0x50(%rbp)
leaq (,%rsi,4), %rsi
movq %rsi, -0x60(%rbp)
leaq (%rdx,%rax,4), %rsi
addq $0xc, %rsi
movq %rsi, -0x30(%rbp)
leaq (%rdx,%rax,4), %rax
movq %rax, -0x40(%rbp)
leaq (,%rcx,4), %r13
xorl %eax, %eax
xorps %xmm0, %xmm0
movq %r12, %rsi
movq %r15, -0x58(%rbp)
movslq (%rdi,%rax,8), %r14
movl 0x4(%rdi,%rax,8), %r10d
cmpl %r14d, %r10d
jl 0x154b9
cmpl %ebx, %r14d
jl 0x154d8
cmpl %ebx, %r10d
jl 0x1549a
movq -0x48(%rbp), %rdx
movl 0x8(%rdx), %edx
addl -0x34(%rbp), %edx
cmpl %edx, %r14d
jge 0x15516
cmpl %edx, %r10d
jge 0x154f7
leal -0x1(%r8), %edx
cmpl $0x3, %edx
ja 0x1537a
movq %rax, %r11
imulq %rcx, %r11
leaq 0x21b3(%rip), %r9       # 0x1735c
movslq (%r9,%rdx,4), %rdx
addq %r9, %rdx
jmpq *%rdx
cmpl %r10d, %r14d
jg 0x153dc
subl %r14d, %r10d
incl %r10d
movq -0x40(%rbp), %rdx
leaq (%rdx,%r14,4), %rdx
xorl %r14d, %r14d
movss (%r15,%r14,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x151dd
jnp 0x1545c
mulss (%rdx,%r14,4), %xmm1
incq %r14
addss (%r12,%r11,4), %xmm1
movss %xmm1, (%r12,%r11,4)
cmpq %r14, %r10
jne 0x151cc
jmp 0x153dc
cmpl %r10d, %r14d
jg 0x153dc
subl %r14d, %r10d
incl %r10d
leaq (%r14,%r14,2), %rdx
movq -0x30(%rbp), %r9
leaq (%r9,%rdx,4), %rdx
addq $-0x4, %rdx
xorl %r14d, %r14d
movss (%r15,%r14,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x1522f
jnp 0x1547b
movss -0x8(%rdx), %xmm2
mulss %xmm1, %xmm2
addss (%r12,%r11,4), %xmm2
movss %xmm2, (%r12,%r11,4)
movss -0x4(%rdx), %xmm2
mulss %xmm1, %xmm2
addss 0x4(%r12,%r11,4), %xmm2
movss %xmm2, 0x4(%r12,%r11,4)
mulss (%rdx), %xmm1
addss 0x8(%r12,%r11,4), %xmm1
incq %r14
movss %xmm1, 0x8(%r12,%r11,4)
addq $0xc, %rdx
cmpq %r14, %r10
jne 0x1521e
jmp 0x153dc
cmpl %r10d, %r14d
jg 0x153dc
subl %r14d, %r10d
incl %r10d
shlq $0x4, %r14
addq -0x30(%rbp), %r14
xorl %edx, %edx
movss (%r15,%rdx,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x152a8
jnp 0x1543d
movss -0xc(%r14), %xmm2
mulss %xmm1, %xmm2
addss (%r12,%r11,4), %xmm2
movss %xmm2, (%r12,%r11,4)
movss -0x8(%r14), %xmm2
mulss %xmm1, %xmm2
addss 0x4(%r12,%r11,4), %xmm2
movss %xmm2, 0x4(%r12,%r11,4)
movss -0x4(%r14), %xmm2
mulss %xmm1, %xmm2
addss 0x8(%r12,%r11,4), %xmm2
movss %xmm2, 0x8(%r12,%r11,4)
mulss (%r14), %xmm1
addss 0xc(%r12,%r11,4), %xmm1
incq %rdx
movss %xmm1, 0xc(%r12,%r11,4)
addq $0x10, %r14
cmpq %rdx, %r10
jne 0x15297
jmp 0x153dc
cmpl %r10d, %r14d
jg 0x153dc
subl %r14d, %r10d
incl %r10d
movq -0x30(%rbp), %rdx
leaq (%rdx,%r14,8), %rdx
addq $-0x8, %rdx
xorl %r14d, %r14d
movss (%r15,%r14,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x15341
jnp 0x1541e
movss -0x4(%rdx,%r14,8), %xmm2
mulss %xmm1, %xmm2
addss (%r12,%r11,4), %xmm2
movss %xmm2, (%r12,%r11,4)
mulss (%rdx,%r14,8), %xmm1
addss 0x4(%r12,%r11,4), %xmm1
leaq 0x1(%r14), %r9
movss %xmm1, 0x4(%r12,%r11,4)
movq %r9, %r14
cmpq %r9, %r10
jne 0x15330
jmp 0x153dc
cmpl %r10d, %r14d
jg 0x153dc
movq %rax, %rdx
imulq -0x50(%rbp), %rdx
subl %r14d, %r10d
incl %r10d
movq -0x58(%rbp), %r9
leaq (%r9,%rdx,4), %r11
imulq %r13, %r14
addq -0x40(%rbp), %r14
xorl %edx, %edx
movss (%r11,%rdx,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x153ac
jnp 0x153ff
testl %ecx, %ecx
jle 0x153d1
xorl %r9d, %r9d
movss (%r14,%r9,4), %xmm2
mulss %xmm1, %xmm2
addss (%rsi,%r9,4), %xmm2
movss %xmm2, (%rsi,%r9,4)
incq %r9
cmpq %r9, %r8
jne 0x153b3
incq %rdx
addq %r13, %r14
cmpq %r10, %rdx
jne 0x1539f
incq %rax
addq -0x60(%rbp), %r15
addq %r13, %rsi
cmpq -0x68(%rbp), %rax
jne 0x1514e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3e6c(%rip), %rdi      # 0x19272
leaq 0x346b(%rip), %rsi      # 0x18878
leaq 0x3d28(%rip), %rcx      # 0x1913c
movl $0x5e3, %edx            # imm = 0x5E3
callq 0x1090
leaq 0x3e4d(%rip), %rdi      # 0x19272
leaq 0x344c(%rip), %rsi      # 0x18878
leaq 0x3d09(%rip), %rcx      # 0x1913c
movl $0x5c1, %edx            # imm = 0x5C1
callq 0x1090
leaq 0x3e2e(%rip), %rdi      # 0x19272
leaq 0x342d(%rip), %rsi      # 0x18878
leaq 0x3cea(%rip), %rcx      # 0x1913c
movl $0x5d6, %edx            # imm = 0x5D6
callq 0x1090
leaq 0x3e0f(%rip), %rdi      # 0x19272
leaq 0x340e(%rip), %rsi      # 0x18878
leaq 0x3ccb(%rip), %rcx      # 0x1913c
movl $0x5b8, %edx            # imm = 0x5B8
callq 0x1090
leaq 0x3df0(%rip), %rdi      # 0x19272
leaq 0x33ef(%rip), %rsi      # 0x18878
leaq 0x3cac(%rip), %rcx      # 0x1913c
movl $0x5cb, %edx            # imm = 0x5CB
callq 0x1090
leaq 0x3d13(%rip), %rdi      # 0x191b4
leaq 0x33d0(%rip), %rsi      # 0x18878
leaq 0x3c8d(%rip), %rcx      # 0x1913c
movl $0x5ae, %edx            # imm = 0x5AE
callq 0x1090
leaq 0x3c73(%rip), %rdi      # 0x19133
leaq 0x33b1(%rip), %rsi      # 0x18878
leaq 0x3c6e(%rip), %rcx      # 0x1913c
movl $0x5ac, %edx            # imm = 0x5AC
callq 0x1090
leaq 0x3ca3(%rip), %rdi      # 0x19182
leaq 0x3392(%rip), %rsi      # 0x18878
leaq 0x3c4f(%rip), %rcx      # 0x1913c
movl $0x5ad, %edx            # imm = 0x5AD
callq 0x1090
leaq 0x3d2e(%rip), %rdi      # 0x1922c
leaq 0x3373(%rip), %rsi      # 0x18878
leaq 0x3c30(%rip), %rcx      # 0x1913c
movl $0x5b0, %edx            # imm = 0x5B0
callq 0x1090
leaq 0x3cc9(%rip), %rdi      # 0x191e6
leaq 0x3354(%rip), %rsi      # 0x18878
leaq 0x3c11(%rip), %rcx      # 0x1913c
movl $0x5af, %edx            # imm = 0x5AF
callq 0x1090