// File: /workspace/github_c_makefile_star2_O0/algorithm-archivists[P]GathVL/src/objects/../../include/stb_image_resize.h
// Function: stbir__calculate_filters(stbir__contributors*, float*, stbir_filter, float, float, int, int)
static void stbir__calculate_filters(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(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(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(contributors, coefficients, filter, scale_ratio, input_size, output_size);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movss %xmm0, -0x18(%rbp)
movss %xmm1, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movss -0x18(%rbp), %xmm0
movl -0x14(%rbp), %edi
movl -0x20(%rbp), %esi
movl -0x24(%rbp), %edx
callq 0x30e20
movl %eax, -0x2c(%rbp)
movss -0x18(%rbp), %xmm0
callq 0x30cc0
cmpl $0x0, %eax
je 0x315d4
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x1e0a4(%rip), %rax     # 0x4f5a0
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movss 0x9e99(%rip), %xmm0     # 0x3b3a8
divss -0x18(%rbp), %xmm0
callq *%rax
mulss -0x18(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x315cf
movl -0x28(%rbp), %edi
movss -0x30(%rbp), %xmm0
movss -0x18(%rbp), %xmm1
movss -0x1c(%rbp), %xmm2
leaq -0x38(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
leaq -0x34(%rbp), %rcx
callq 0x31ad0
movl -0x14(%rbp), %eax
movl %eax, -0x6c(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x68(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x60(%rbp)
movss -0x34(%rbp), %xmm0
movss %xmm0, -0x5c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0x31ed0
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movss -0x18(%rbp), %xmm0
movl -0x28(%rbp), %edx
xorl %ecx, %ecx
callq 0x31ef0
movl -0x6c(%rbp), %edi
movss -0x68(%rbp), %xmm0
movl -0x64(%rbp), %esi
movl -0x60(%rbp), %edx
movss -0x5c(%rbp), %xmm1
movq -0x58(%rbp), %rcx
movq %rax, %r8
callq 0x31bc0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x31527
jmp 0x316fc
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x1dfc0(%rip), %rax     # 0x4f5a0
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movss -0x18(%rbp), %xmm0
callq *%rax
divss -0x18(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x316e0
movl -0x28(%rbp), %eax
movl %eax, -0x90(%rbp)
movl -0x14(%rbp), %edi
movss -0x18(%rbp), %xmm0
callq 0x30cf0
movl %eax, %ecx
movl -0x90(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %edi
movss -0x40(%rbp), %xmm0
movss -0x18(%rbp), %xmm1
movss -0x1c(%rbp), %xmm2
leaq -0x48(%rbp), %rsi
leaq -0x4c(%rbp), %rdx
leaq -0x44(%rbp), %rcx
callq 0x31f40
movl -0x14(%rbp), %eax
movl %eax, -0x8c(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x88(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x80(%rbp)
movss -0x44(%rbp), %xmm0
movss %xmm0, -0x7c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0x31ed0
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movss -0x18(%rbp), %xmm0
movl -0x28(%rbp), %edx
xorl %ecx, %ecx
callq 0x31ef0
movl -0x8c(%rbp), %edi
movss -0x88(%rbp), %xmm0
movl -0x84(%rbp), %esi
movl -0x80(%rbp), %edx
movss -0x7c(%rbp), %xmm1
movq -0x78(%rbp), %rcx
movq %rax, %r8
callq 0x32070
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x31603
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movss -0x18(%rbp), %xmm0
movl -0x20(%rbp), %ecx
movl -0x24(%rbp), %r8d
callq 0x32270
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)