// File: /workspace/github_cpp_makefile_star2_O3/lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir__calculate_filters(stbir__info*, stbir__contributors*, float*, stbir_filter, float, float, int, int)
static void stbir__calculate_filters(stbir__info* stbir_info, stbir__contributors* contributors, float* coefficients, stbir_filter filter, float scale_ratio, float shift, int input_size, int output_size)
{
    int n;
    int total_contributors = stbir__get_contributors(scale_ratio, filter, input_size, output_size);

    if (stbir__use_upsampling(scale_ratio))
    {
        float out_pixels_radius = stbir__filter_info_table[filter].support(1 / scale_ratio) * scale_ratio;

        // Looping through out pixels
        for (n = 0; n < total_contributors; n++)
        {
            float in_center_of_out; // Center of the current out pixel in the in pixel space
            int in_first_pixel, in_last_pixel;

            stbir__calculate_sample_range_upsample(n, out_pixels_radius, scale_ratio, shift, &in_first_pixel, &in_last_pixel, &in_center_of_out);

            stbir__calculate_coefficients_upsample(stbir_info, filter, scale_ratio, in_first_pixel, in_last_pixel, in_center_of_out, stbir__get_contributor(contributors, n), stbir__get_coefficient(coefficients, filter, scale_ratio, n, 0));
        }
    }
    else
    {
        float in_pixels_radius = stbir__filter_info_table[filter].support(scale_ratio) / scale_ratio;

        // Looping through in pixels
        for (n = 0; n < total_contributors; n++)
        {
            float out_center_of_in; // Center of the current out pixel in the in pixel space
            int out_first_pixel, out_last_pixel;
            int n_adjusted = n - stbir__get_filter_pixel_margin(filter, scale_ratio);

            stbir__calculate_sample_range_downsample(n_adjusted, in_pixels_radius, scale_ratio, shift, &out_first_pixel, &out_last_pixel, &out_center_of_in);

            stbir__calculate_coefficients_downsample(stbir_info, filter, scale_ratio, out_first_pixel, out_last_pixel, out_center_of_in, stbir__get_contributor(contributors, n), stbir__get_coefficient(coefficients, filter, scale_ratio, n, 0));
        }

        stbir__normalize_downsample_coefficients(stbir_info, contributors, coefficients, filter, scale_ratio, shift, input_size, output_size);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r8d, %r15d
movaps %xmm1, -0xa0(%rbp)
movl %edx, %r12d
ucomiss 0x35c4(%rip), %xmm0     # 0x16008
movq %rdi, -0x70(%rbp)
movss %xmm0, -0x2c(%rbp)
movq %rsi, -0x58(%rbp)
ja 0x13006
movq %rdi, %r13
movl %r15d, -0x78(%rbp)
movl %r12d, %edi
movl %ecx, %r15d
callq 0x126e5
movl %eax, %ebx
shrl $0x1f, %ebx
addl %eax, %ebx
andl $-0x2, %ebx
movl %r12d, -0x84(%rbp)
movl %r12d, %r14d
shlq $0x4, %r14
leaq 0x92c8(%rip), %rax      # 0x1bd50
movq %rax, -0xb0(%rbp)
movq 0x8(%r14,%rax), %r12
movss -0x2c(%rbp), %xmm0
callq *%r12
movss -0x2c(%rbp), %xmm1
movss %xmm0, -0x64(%rbp)
movl %r15d, -0xa4(%rbp)
addl %r15d, %ebx
movq %r12, %r15
movq %r12, -0x40(%rbp)
jle 0x12d0f
movaps -0xa0(%rbp), %xmm0
xorps 0x3665(%rip), %xmm0     # 0x16130
movaps %xmm0, -0xa0(%rbp)
movss -0x64(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x64(%rbp)
addq %r14, -0xb0(%rbp)
movl %ebx, %eax
movq %rax, -0xb8(%rbp)
xorl %ebx, %ebx
movl -0x84(%rbp), %edi
movaps %xmm1, %xmm0
callq 0x126e5
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movl %ebx, %eax
subl %ecx, %eax
xorps %xmm2, %xmm2
cvtsi2ss %eax, %xmm2
addss 0x34f0(%rip), %xmm2     # 0x1600c
movaps %xmm2, %xmm0
movss -0x64(%rbp), %xmm1
subss %xmm1, %xmm0
movaps %xmm1, %xmm3
movss %xmm2, -0x30(%rbp)
addss %xmm2, %xmm3
movss -0x2c(%rbp), %xmm2
mulss %xmm2, %xmm0
movaps -0xa0(%rbp), %xmm1
addss %xmm1, %xmm0
mulss %xmm2, %xmm3
addss %xmm1, %xmm3
movss %xmm3, -0x38(%rbp)
cvtss2sd %xmm0, %xmm0
addsd 0x41cf(%rip), %xmm0     # 0x16d30
callq 0x11b0
cvttsd2si %xmm0, %r12d
xorps %xmm0, %xmm0
cvtss2sd -0x38(%rbp), %xmm0
addsd 0x41bd(%rip), %xmm0     # 0x16d38
callq 0x11b0
cvttsd2si %xmm0, %r14d
movss -0x2c(%rbp), %xmm0
callq *%r15
addss %xmm0, %xmm0
callq 0x1070
movss %xmm0, -0x38(%rbp)
movq %r15, %rax
movl %r14d, %r15d
subl %r12d, %r15d
movss -0x2c(%rbp), %xmm0
callq *%rax
addss %xmm0, %xmm0
callq 0x1070
cvttss2si %xmm0, %eax
cmpl %eax, %r15d
jg 0x132e6
movl %r12d, (%r13,%rbx,8)
movq %rbx, -0x48(%rbp)
movl %r14d, 0x4(%r13,%rbx,8)
movl %r14d, %eax
subl %r12d, %r14d
jl 0x13305
movss -0x2c(%rbp), %xmm1
movss -0x30(%rbp), %xmm3
mulss %xmm1, %xmm3
cvttss2si -0x38(%rbp), %ecx
movl %ecx, -0x60(%rbp)
addss -0xa0(%rbp), %xmm3
incl %eax
movl %eax, -0x50(%rbp)
movq -0xb0(%rbp), %rax
movq (%rax), %rdx
movl %r15d, -0x80(%rbp)
testl %r15d, %r15d
movss 0x33f5(%rip), %xmm2     # 0x1600c
js 0x12c7f
movl -0x50(%rbp), %eax
subl %r12d, %eax
movq %rax, -0x38(%rbp)
movl -0x60(%rbp), %eax
imull -0x48(%rbp), %eax
cltq
movq -0x58(%rbp), %rcx
leaq (%rcx,%rax,4), %rbx
movl %r12d, %r13d
xorl %r12d, %r12d
movss %xmm3, -0x30(%rbp)
leal (%r12,%r13), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
addss %xmm2, %xmm0
subss %xmm3, %xmm0
movq %rdx, %r15
callq *%rdx
movq %r15, %rdx
movss -0x30(%rbp), %xmm3
movss 0x33a5(%rip), %xmm2     # 0x1600c
movss -0x2c(%rbp), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, (%rbx,%r12,4)
incq %r12
cmpq %r12, -0x38(%rbp)
jne 0x12c3f
xorps %xmm0, %xmm0
cvtsi2ssl -0x50(%rbp), %xmm0
addss %xmm2, %xmm0
subss %xmm3, %xmm0
callq *%rdx
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x13324
jp 0x13324
movl -0x80(%rbp), %eax
testl %eax, %eax
movq -0x70(%rbp), %r13
movq -0x58(%rbp), %rdx
movq -0x40(%rbp), %r15
movq -0x48(%rbp), %rbx
js 0x12cfa
movl %eax, %eax
incl %r14d
movl -0x60(%rbp), %ecx
imull %ebx, %ecx
movslq %ecx, %rcx
shlq $0x2, %rax
leaq (%rax,%rcx,4), %rax
addq %rdx, %rax
movss (%rax), %xmm0
ucomiss %xmm1, %xmm0
jne 0x12cfa
jp 0x12cfa
movl (%r13,%rbx,8), %ecx
addl %r14d, %ecx
addl $-0x2, %ecx
movl %ecx, 0x4(%r13,%rbx,8)
decl %r14d
addq $-0x4, %rax
testl %r14d, %r14d
jg 0x12cd3
incq %rbx
cmpq -0xb8(%rbp), %rbx
movss -0x2c(%rbp), %xmm1
jne 0x12af2
movl -0x84(%rbp), %edi
movaps %xmm1, %xmm0
callq 0x126e5
movq %r15, %rcx
movl %eax, %r15d
shrl $0x1f, %r15d
addl %eax, %r15d
andl $-0x2, %r15d
addl -0xa4(%rbp), %r15d
movss -0x2c(%rbp), %xmm0
callq *%rcx
addss %xmm0, %xmm0
callq 0x1070
movss -0x2c(%rbp), %xmm1
movss %xmm0, -0x48(%rbp)
movl %r15d, %edx
cmpl $0x0, -0x78(%rbp)
movq %rdx, -0x38(%rbp)
jle 0x12e55
testl %r15d, %r15d
jle 0x132c7
xorl %r14d, %r14d
xorps %xmm2, %xmm2
xorl %ebx, %ebx
movl %r14d, %r12d
subl (%r13,%rbx,8), %r12d
jl 0x12dc4
cmpl 0x4(%r13,%rbx,8), %r14d
jg 0x12dbc
movaps %xmm1, %xmm0
movss %xmm2, -0x30(%rbp)
callq *-0x40(%rbp)
addss %xmm0, %xmm0
callq 0x1070
movss -0x30(%rbp), %xmm2
movq -0x38(%rbp), %rdx
movss -0x2c(%rbp), %xmm1
cvttss2si %xmm0, %eax
movl %ebx, %ecx
imull %eax, %ecx
addl %ecx, %r12d
movslq %r12d, %rax
movq -0x58(%rbp), %rcx
addss (%rcx,%rax,4), %xmm2
incq %rbx
cmpq %rbx, %rdx
jne 0x12d71
ucomiss 0x32a5(%rip), %xmm2     # 0x16070
jbe 0x132c7
movss 0x3293(%rip), %xmm0     # 0x1606c
ucomiss %xmm2, %xmm0
jbe 0x13343
movss 0x321e(%rip), %xmm0     # 0x16008
divss %xmm2, %xmm0
movss %xmm0, -0x30(%rbp)
xorl %ebx, %ebx
movl %r14d, %r12d
subl (%r13,%rbx,8), %r12d
jl 0x12e48
cmpl 0x4(%r13,%rbx,8), %r14d
jg 0x12e40
movaps %xmm1, %xmm0
callq *-0x40(%rbp)
addss %xmm0, %xmm0
callq 0x1070
movq -0x38(%rbp), %rdx
movss -0x2c(%rbp), %xmm1
cvttss2si %xmm0, %eax
movl %ebx, %ecx
imull %eax, %ecx
addl %ecx, %r12d
movslq %r12d, %rax
movq -0x58(%rbp), %rcx
movss (%rcx,%rax,4), %xmm0
mulss -0x30(%rbp), %xmm0
movss %xmm0, (%rcx,%rax,4)
incq %rbx
cmpq %rbx, %rdx
jne 0x12df5
incl %r14d
cmpl -0x78(%rbp), %r14d
jne 0x12d6c
testl %r15d, %r15d
movq -0x58(%rbp), %r12
jle 0x132b5
cvttss2si -0x48(%rbp), %eax
movl %eax, -0x60(%rbp)
cltq
movq %rax, -0x80(%rbp)
xorl %r15d, %r15d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %eax, %eax
movq -0x40(%rbp), %r13
movq %rax, %r14
movaps %xmm1, %xmm0
callq *%r13
addss %xmm0, %xmm0
callq 0x1070
movss -0x2c(%rbp), %xmm1
cvttss2si %xmm0, %eax
imull %r15d, %eax
cltq
addq %r14, %rax
movss (%r12,%rax,4), %xmm0
incl %ebx
leaq 0x1(%r14), %rax
ucomiss 0x3167(%rip), %xmm0     # 0x1601c
jne 0x12eb9
jnp 0x12e7e
movq -0x70(%rbp), %rax
movl (%rax,%r15,8), %ecx
movl %ecx, -0xa0(%rbp)
addl %ecx, %ebx
testl %ebx, %ebx
movl $0x0, %ecx
cmovlel %ecx, %ebx
movl 0x4(%rax,%r15,8), %r12d
movl %ebx, (%rax,%r15,8)
movl %r12d, -0x30(%rbp)
subl %ebx, %r12d
incl %r12d
movl -0x60(%rbp), %eax
cmpl %r12d, %eax
cmovll %eax, %r12d
movaps %xmm1, %xmm0
callq *%r13
addss %xmm0, %xmm0
callq 0x1070
testl %r12d, %r12d
jle 0x12fc6
movl -0xa0(%rbp), %edx
movl %edx, %eax
negl %eax
cvttss2si %xmm0, %ecx
movl %ecx, -0x48(%rbp)
addl %edx, %r14d
testl %r14d, %r14d
movl $0x0, %ecx
cmovlel %ecx, %r14d
movl -0x30(%rbp), %ecx
subl %r14d, %ecx
incl %ecx
movslq %ecx, %rdx
movq -0x80(%rbp), %rcx
cmpq %rdx, %rcx
cmovlq %rcx, %rdx
movq %rdx, -0xa0(%rbp)
addl %eax, %r14d
movslq %r14d, %rax
movq %rax, -0x50(%rbp)
xorl %r12d, %r12d
leal (%r14,%r12), %eax
cmpl -0x48(%rbp), %eax
jge 0x12fc6
movss -0x2c(%rbp), %xmm0
movq -0x40(%rbp), %r13
callq *%r13
addss %xmm0, %xmm0
callq 0x1070
cvttss2si %xmm0, %eax
imull %r15d, %eax
cltq
movq -0x50(%rbp), %rcx
addq %r12, %rcx
addq %rcx, %rax
movq -0x58(%rbp), %rbx
movss (%rbx,%rax,4), %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x2c(%rbp), %xmm0
callq *%r13
addss %xmm0, %xmm0
callq 0x1070
cvttss2si %xmm0, %eax
imull %r15d, %eax
cltq
addq %r12, %rax
movss -0x30(%rbp), %xmm0
movss %xmm0, (%rbx,%rax,4)
incq %r12
cmpl %r12d, -0xa0(%rbp)
jne 0x12f52
incq %r15
movq -0x38(%rbp), %rsi
cmpq %rsi, %r15
movq -0x70(%rbp), %r13
movss -0x2c(%rbp), %xmm1
movq -0x58(%rbp), %r12
jne 0x12e73
movl -0x78(%rbp), %edx
decl %edx
xorl %eax, %eax
movl 0x4(%r13,%rax,8), %ecx
cmpl %edx, %ecx
cmovgel %edx, %ecx
movl %ecx, 0x4(%r13,%rax,8)
incq %rax
cmpq %rax, %rsi
jne 0x12fea
jmp 0x132b5
movl %r12d, %ebx
shlq $0x4, %rbx
leaq 0x8d3c(%rip), %rax      # 0x1bd50
movq %rax, -0x60(%rbp)
movq 0x8(%rbx,%rax), %rax
movss 0x2fe3(%rip), %xmm1     # 0x16008
divss %xmm0, %xmm1
movss %xmm1, -0x30(%rbp)
movaps %xmm1, %xmm0
movq %rax, -0x80(%rbp)
callq *%rax
movss -0x2c(%rbp), %xmm2
movss %xmm0, -0x50(%rbp)
testl %r15d, %r15d
jle 0x132b5
movss -0x50(%rbp), %xmm0
mulss %xmm2, %xmm0
movss %xmm0, -0x50(%rbp)
addq %rbx, -0x60(%rbp)
movl %r15d, %eax
movq %rax, -0x78(%rbp)
xorl %r15d, %r15d
cvtsi2ss %r15d, %xmm3
addss 0x2f99(%rip), %xmm3     # 0x1600c
movaps %xmm3, %xmm0
movss -0x50(%rbp), %xmm1
subss %xmm1, %xmm0
movaps %xmm1, %xmm4
movss %xmm3, -0x40(%rbp)
addss %xmm3, %xmm4
movaps -0xa0(%rbp), %xmm1
addss %xmm1, %xmm0
divss %xmm2, %xmm0
addss %xmm1, %xmm4
divss %xmm2, %xmm4
movss %xmm4, -0x38(%rbp)
cvtss2sd %xmm0, %xmm0
addsd 0x3c7d(%rip), %xmm0     # 0x16d30
callq 0x11b0
cvttsd2si %xmm0, %r13d
xorps %xmm0, %xmm0
cvtss2sd -0x38(%rbp), %xmm0
addsd 0x3c6b(%rip), %xmm0     # 0x16d38
callq 0x11b0
cvttsd2si %xmm0, %r14d
movss -0x30(%rbp), %xmm0
movq %r15, %r12
movq -0x80(%rbp), %r15
callq *%r15
addss %xmm0, %xmm0
callq 0x1070
movss %xmm0, -0x38(%rbp)
movl %r14d, %ebx
subl %r13d, %ebx
movss -0x30(%rbp), %xmm0
callq *%r15
addss %xmm0, %xmm0
callq 0x1070
cvttss2si %xmm0, %eax
cmpl %eax, %ebx
jg 0x13362
movq -0x70(%rbp), %rax
movl %r13d, (%rax,%r12,8)
movl %r14d, 0x4(%rax,%r12,8)
cmpl %r13d, %r14d
jl 0x13381
movl %r14d, %edx
movss -0x40(%rbp), %xmm0
addss -0xa0(%rbp), %xmm0
divss -0x2c(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
cvttss2si -0x38(%rbp), %eax
movq %r12, -0x48(%rbp)
imull %r12d, %eax
cltq
movq -0x58(%rbp), %rcx
leaq (%rcx,%rax,4), %r12
movq -0x60(%rbp), %rax
movq (%rax), %r15
xorps %xmm0, %xmm0
testl %ebx, %ebx
js 0x131e3
movss %xmm0, -0x38(%rbp)
xorl %r14d, %r14d
movl %edx, %ebx
leal (%r14,%r13), %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
addss 0x2e83(%rip), %xmm1     # 0x1600c
movss -0x40(%rbp), %xmm0
subss %xmm1, %xmm0
movss -0x30(%rbp), %xmm1
callq *%r15
movslq %r14d, %rax
movss %xmm0, (%r12,%rax,4)
testl %eax, %eax
jne 0x131c6
ucomiss 0x2e6e(%rip), %xmm0     # 0x1601c
jne 0x131c6
jp 0x131c6
incl %r13d
movq -0x70(%rbp), %rax
movq -0x48(%rbp), %rcx
movl %r13d, (%rax,%rcx,8)
xorl %r14d, %r14d
jmp 0x131d7
movss -0x38(%rbp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, -0x38(%rbp)
incl %r14d
movl %ebx, %edx
subl %r13d, %ebx
cmpl %ebx, %r14d
jle 0x13174
jmp 0x131e8
movss %xmm0, -0x38(%rbp)
incl %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
addss 0x2e13(%rip), %xmm0     # 0x1600c
subss -0x40(%rbp), %xmm0
movss -0x30(%rbp), %xmm1
callq *%r15
ucomiss 0x2e0f(%rip), %xmm0     # 0x1601c
jne 0x133de
jp 0x133de
movss -0x38(%rbp), %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
ucomisd 0x3b2b(%rip), %xmm0     # 0x16d58
movq -0x70(%rbp), %rsi
movq -0x48(%rbp), %r15
jbe 0x133bf
movss 0x2e29(%rip), %xmm0     # 0x1606c
ucomiss %xmm1, %xmm0
movss -0x2c(%rbp), %xmm2
jbe 0x133a0
testl %ebx, %ebx
js 0x132a8
movss 0x2dab(%rip), %xmm0     # 0x16008
divss %xmm1, %xmm0
leal 0x1(%rbx), %eax
xorl %ecx, %ecx
movss (%r12,%rcx,4), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%r12,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x13266
movl %ebx, %eax
movss (%r12,%rax,4), %xmm0
ucomiss 0x2d8f(%rip), %xmm0     # 0x1601c
jne 0x132a8
jp 0x132a8
leaq -0x1(%rax), %rcx
movl (%rsi,%r15,8), %edx
addl %ecx, %edx
movl %edx, 0x4(%rsi,%r15,8)
testq %rax, %rax
movq %rcx, %rax
jg 0x13280
incq %r15
cmpq -0x78(%rbp), %r15
jne 0x13066
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4c98(%rip), %rdi      # 0x17f66
leaq 0x459f(%rip), %rsi      # 0x17874
leaq 0x4c97(%rip), %rcx      # 0x17f73
movl $0x46b, %edx            # imm = 0x46B
callq 0x1080
leaq 0x4b1c(%rip), %rdi      # 0x17e09
leaq 0x4580(%rip), %rsi      # 0x17874
leaq 0x4b77(%rip), %rcx      # 0x17e72
movl $0x43a, %edx            # imm = 0x43A
callq 0x1080
leaq 0x4a47(%rip), %rdi      # 0x17d53
leaq 0x4561(%rip), %rsi      # 0x17874
leaq 0x4b58(%rip), %rcx      # 0x17e72
movl $0x43f, %edx            # imm = 0x43F
callq 0x1080
leaq 0x4bca(%rip), %rdi      # 0x17ef5
leaq 0x4542(%rip), %rsi      # 0x17874
leaq 0x4b39(%rip), %rcx      # 0x17e72
movl $0x448, %edx            # imm = 0x448
callq 0x1080
leaq 0x4cac(%rip), %rdi      # 0x17ff6
leaq 0x4523(%rip), %rsi      # 0x17874
leaq 0x4c1b(%rip), %rcx      # 0x17f73
movl $0x46c, %edx            # imm = 0x46C
callq 0x1080
leaq 0x4906(%rip), %rdi      # 0x17c6f
leaq 0x4504(%rip), %rsi      # 0x17874
leaq 0x495b(%rip), %rcx      # 0x17cd2
movl $0x40a, %edx            # imm = 0x40A
callq 0x1080
leaq 0x49cb(%rip), %rdi      # 0x17d53
leaq 0x44e5(%rip), %rsi      # 0x17874
leaq 0x493c(%rip), %rcx      # 0x17cd2
movl $0x40f, %edx            # imm = 0x40F
callq 0x1080
leaq 0x4a4e(%rip), %rdi      # 0x17df5
leaq 0x44c6(%rip), %rsi      # 0x17874
leaq 0x491d(%rip), %rcx      # 0x17cd2
movl $0x424, %edx            # imm = 0x424
callq 0x1080
leaq 0x4a1c(%rip), %rdi      # 0x17de2
leaq 0x44a7(%rip), %rsi      # 0x17874
leaq 0x48fe(%rip), %rcx      # 0x17cd2
movl $0x423, %edx            # imm = 0x423
callq 0x1080
leaq 0x4991(%rip), %rdi      # 0x17d76
leaq 0x4488(%rip), %rsi      # 0x17874
leaq 0x48df(%rip), %rcx      # 0x17cd2
movl $0x421, %edx            # imm = 0x421
callq 0x1080