// File: 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
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0xb0(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x4c(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1e170
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movl 0xa8(%rax), %eax
movl %eax, -0x4c(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x1d7a4
movq -0x40(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,8), %eax
movl %eax, -0x50(%rbp)
movq -0x40(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x54(%rbp)
movl -0x1c(%rbp), %eax
imull -0x2c(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x4c(%rbp), %eax
imull -0x1c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl $0x0, -0x60(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x50(%rbp), %eax
jl 0x1d15e
jmp 0x1d17d
leaq 0x48c8(%rip), %rdi      # 0x21a2d
leaq 0x3ffe(%rip), %rsi      # 0x2116a
movl $0x5ac, %edx            # imm = 0x5AC
leaq 0x48be(%rip), %rcx      # 0x21a36
callq 0x1090
movl -0x50(%rbp), %eax
movq -0x8(%rbp), %rdx
xorl %ecx, %ecx
subl 0xb8(%rdx), %ecx
cmpl %ecx, %eax
jl 0x1d192
jmp 0x1d1b1
leaq 0x48e3(%rip), %rdi      # 0x21a7c
leaq 0x3fca(%rip), %rsi      # 0x2116a
movl $0x5ad, %edx            # imm = 0x5AD
leaq 0x488a(%rip), %rcx      # 0x21a36
callq 0x1090
movl -0x54(%rbp), %eax
movq -0x8(%rbp), %rdx
xorl %ecx, %ecx
subl 0xb8(%rdx), %ecx
cmpl %ecx, %eax
jl 0x1d1c6
jmp 0x1d1e5
leaq 0x48e1(%rip), %rdi      # 0x21aae
leaq 0x3f96(%rip), %rsi      # 0x2116a
movl $0x5ae, %edx            # imm = 0x5AE
leaq 0x4856(%rip), %rcx      # 0x21a36
callq 0x1090
movl -0x50(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0x8(%rbp), %rdx
addl 0xb8(%rdx), %ecx
cmpl %ecx, %eax
jge 0x1d1ff
jmp 0x1d21e
leaq 0x48da(%rip), %rdi      # 0x21ae0
leaq 0x3f5d(%rip), %rsi      # 0x2116a
movl $0x5af, %edx            # imm = 0x5AF
leaq 0x481d(%rip), %rcx      # 0x21a36
callq 0x1090
movl -0x54(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0x8(%rbp), %rdx
addl 0xb8(%rdx), %ecx
cmpl %ecx, %eax
jge 0x1d238
jmp 0x1d257
leaq 0x48e7(%rip), %rdi      # 0x21b26
leaq 0x3f24(%rip), %rsi      # 0x2116a
movl $0x5b0, %edx            # imm = 0x5B0
leaq 0x47e4(%rip), %rcx      # 0x21a36
callq 0x1090
movl -0x2c(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x98(%rbp)
subl $0x3, %eax
ja 0x1d6a2
movq -0x98(%rbp), %rax
leaq 0x302c(%rip), %rcx      # 0x202a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x50(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x54(%rbp), %eax
jg 0x1d337
movl -0x20(%rbp), %eax
shll $0x0, %eax
movl %eax, -0x64(%rbp)
movq -0x48(%rbp), %rax
movl -0x5c(%rbp), %ecx
movl -0x60(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x60(%rbp)
addl %edx, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x68(%rbp)
movss -0x68(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x1d2d2
jp 0x1d2d2
jmp 0x1d2d4
jmp 0x1d2f3
leaq 0x4891(%rip), %rdi      # 0x21b6c
leaq 0x3e88(%rip), %rsi      # 0x2116a
movl $0x5b8, %edx            # imm = 0x5B8
leaq 0x4748(%rip), %rcx      # 0x21a36
callq 0x1090
movq -0x38(%rbp), %rax
movl -0x64(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0x68(%rbp), %xmm2
movq -0x18(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1d28b
jmp 0x1d794
movl -0x50(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x54(%rbp), %eax
jg 0x1d423
movl -0x20(%rbp), %eax
shll %eax
movl %eax, -0x6c(%rbp)
movq -0x48(%rbp), %rax
movl -0x5c(%rbp), %ecx
movl -0x60(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x60(%rbp)
addl %edx, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x70(%rbp)
movss -0x70(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x1d388
jp 0x1d388
jmp 0x1d38a
jmp 0x1d3a9
leaq 0x47db(%rip), %rdi      # 0x21b6c
leaq 0x3dd2(%rip), %rsi      # 0x2116a
movl $0x5c1, %edx            # imm = 0x5C1
leaq 0x4692(%rip), %rcx      # 0x21a36
callq 0x1090
movq -0x38(%rbp), %rax
movl -0x6c(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0x70(%rbp), %xmm2
movq -0x18(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0x38(%rbp), %rax
movl -0x6c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0x70(%rbp), %xmm2
movq -0x18(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1d342
jmp 0x1d794
movl -0x50(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x54(%rbp), %eax
jg 0x1d544
imull $0x3, -0x20(%rbp), %eax
movl %eax, -0x74(%rbp)
movq -0x48(%rbp), %rax
movl -0x5c(%rbp), %ecx
movl -0x60(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x60(%rbp)
addl %edx, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x78(%rbp)
movss -0x78(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x1d473
jp 0x1d473
jmp 0x1d475
jmp 0x1d494
leaq 0x46f0(%rip), %rdi      # 0x21b6c
leaq 0x3ce7(%rip), %rsi      # 0x2116a
movl $0x5cb, %edx            # imm = 0x5CB
leaq 0x45a7(%rip), %rcx      # 0x21a36
callq 0x1090
movq -0x38(%rbp), %rax
movl -0x74(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0x78(%rbp), %xmm2
movq -0x18(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0x38(%rbp), %rax
movl -0x74(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0x78(%rbp), %xmm2
movq -0x18(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0x38(%rbp), %rax
movl -0x74(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0x78(%rbp), %xmm2
movq -0x18(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1d42e
jmp 0x1d794
movl -0x50(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x54(%rbp), %eax
jg 0x1d69d
movl -0x20(%rbp), %eax
shll $0x2, %eax
movl %eax, -0x7c(%rbp)
movq -0x48(%rbp), %rax
movl -0x5c(%rbp), %ecx
movl -0x60(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x60(%rbp)
addl %edx, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x80(%rbp)
movss -0x80(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x1d596
jp 0x1d596
jmp 0x1d598
jmp 0x1d5b7
leaq 0x45cd(%rip), %rdi      # 0x21b6c
leaq 0x3bc4(%rip), %rsi      # 0x2116a
movl $0x5d6, %edx            # imm = 0x5D6
leaq 0x4484(%rip), %rcx      # 0x21a36
callq 0x1090
movq -0x38(%rbp), %rax
movl -0x7c(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0x80(%rbp), %xmm2
movq -0x18(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0x38(%rbp), %rax
movl -0x7c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0x80(%rbp), %xmm2
movq -0x18(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0x38(%rbp), %rax
movl -0x7c(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0x80(%rbp), %xmm2
movq -0x18(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0x38(%rbp), %rax
movl -0x7c(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0x80(%rbp), %xmm2
movq -0x18(%rbp), %rax
movl -0x58(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1d54f
jmp 0x1d794
movl -0x50(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x54(%rbp), %eax
jg 0x1d792
movl -0x20(%rbp), %eax
imull -0x2c(%rbp), %eax
movl %eax, -0x84(%rbp)
movq -0x48(%rbp), %rax
movl -0x5c(%rbp), %ecx
movl -0x60(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x60(%rbp)
addl %edx, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x88(%rbp)
movss -0x88(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x1d6f9
jp 0x1d6f9
jmp 0x1d6fb
jmp 0x1d71a
leaq 0x446a(%rip), %rdi      # 0x21b6c
leaq 0x3a61(%rip), %rsi      # 0x2116a
movl $0x5e3, %edx            # imm = 0x5E3
leaq 0x4321(%rip), %rcx      # 0x21a36
callq 0x1090
movl $0x0, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x1d782
movq -0x38(%rbp), %rax
movl -0x84(%rbp), %ecx
addl -0x8c(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss -0x88(%rbp), %xmm2
movq -0x18(%rbp), %rax
movl -0x58(%rbp), %ecx
addl -0x8c(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
jmp 0x1d724
jmp 0x1d784
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1d6a8
jmp 0x1d794
jmp 0x1d796
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1d110
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)