// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/chorus/chorus.c
// Function: processData
static void
processData(FILE *in,FILE *out,RRA *h)
    {
    int count;
    double t0,t1,t2,t3,t4;

    t0 = t1 = t2 = t3 = t4 = 0.0;

    double p0 = 1;
    double p1 = p0 + Range;
    double p2 = p1 + Range;
    double p3 = (1 / p1) * 0.99;
    double p4 = (1 / p2) * 1.01;

    int d0 = 0;
    int d1 = 127 * DelayFactor;
    int d2 = 480 * DelayFactor;
    int d3 = 623 * DelayFactor;
    int d4 = 852 * DelayFactor;

    int sblock = h->sampleRate * Block;

    count = 0;
    while (((int) (t0 + 0.5)) < h->samples)
        {
        int total = getDatum(in,out,h,t0 - d0)
              + getDatum(in,out,h,t1 - d1)
              + getDatum(in,out,h,t2 - d2)
              + getDatum(in,out,h,t3 - d3)
              + getDatum(in,out,h,t4 - d4)
              ;

        fprintf(out,"%d\n",(int)(total / 5.0 * AmpFactor));
        //fprintf(out,"%d\n",(int)a2);

        //see if it is time to switch the pitches of the voices
        if (count > 0 && count % (sblock + d0) == 0)
            p0 = 1 / p0;
        if (count > 0 && count % (sblock + d1) == 0)
            p1 = 1 / p1;
        if (count > 0 && count % (sblock + d2) == 0)
            p2 = 1 / p2;
        if (count > 0 && count % (sblock + d3) == 0)
            p3 = 1 / p3;
        if (count > 0 && count % (sblock + d4) == 0)
            p4 = 1 / p4;

        t0 += p0;
        t1 += p1;
        t2 += p2;
        t3 += p3;
        t4 += p4;

        ++count;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x48(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd 0x38d9(%rip), %xmm0     # 0x50c0
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
addsd 0x6937(%rip), %xmm0     # 0x8130
movsd %xmm0, -0x58(%rbp)
movsd -0x58(%rbp), %xmm0
addsd 0x6925(%rip), %xmm0     # 0x8130
movsd %xmm0, -0x60(%rbp)
movsd 0x38a8(%rip), %xmm0     # 0x50c0
divsd -0x58(%rbp), %xmm0
movsd 0x38a3(%rip), %xmm1     # 0x50c8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movsd 0x388a(%rip), %xmm0     # 0x50c0
divsd -0x60(%rbp), %xmm0
movsd 0x3875(%rip), %xmm1     # 0x50b8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x70(%rbp)
movl $0x0, -0x74(%rbp)
movsd 0x3855(%rip), %xmm0     # 0x50b0
mulsd 0x68d5(%rip), %xmm0     # 0x8138
cvttsd2si %xmm0, %eax
movl %eax, -0x78(%rbp)
movsd 0x3836(%rip), %xmm0     # 0x50a8
mulsd 0x68be(%rip), %xmm0     # 0x8138
cvttsd2si %xmm0, %eax
movl %eax, -0x7c(%rbp)
movsd 0x3817(%rip), %xmm0     # 0x50a0
mulsd 0x68a7(%rip), %xmm0     # 0x8138
cvttsd2si %xmm0, %eax
movl %eax, -0x80(%rbp)
movsd 0x37f8(%rip), %xmm0     # 0x5098
mulsd 0x6890(%rip), %xmm0     # 0x8138
cvttsd2si %xmm0, %eax
movl %eax, -0x84(%rbp)
movq -0x18(%rbp), %rax
cvtsi2sdl 0x4(%rax), %xmm0
mulsd 0x687d(%rip), %xmm0     # 0x8140
cvttsd2si %xmm0, %eax
movl %eax, -0x88(%rbp)
movl $0x0, -0x1c(%rbp)
movsd 0x37f4(%rip), %xmm0     # 0x50d0
addsd -0x28(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movq -0x18(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x1b60
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movsd -0x28(%rbp), %xmm0
cvtsi2sdl -0x74(%rbp), %xmm1
subsd %xmm1, %xmm0
callq 0x1b70
movsd %xmm0, -0xb0(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movsd -0x30(%rbp), %xmm0
cvtsi2sdl -0x78(%rbp), %xmm1
subsd %xmm1, %xmm0
callq 0x1b70
movaps %xmm0, %xmm1
movsd -0xb0(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movsd -0x38(%rbp), %xmm0
cvtsi2sdl -0x7c(%rbp), %xmm1
subsd %xmm1, %xmm0
callq 0x1b70
movaps %xmm0, %xmm1
movsd -0xa8(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movsd -0x40(%rbp), %xmm0
cvtsi2sdl -0x80(%rbp), %xmm1
subsd %xmm1, %xmm0
callq 0x1b70
movaps %xmm0, %xmm1
movsd -0xa0(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x98(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movsd -0x48(%rbp), %xmm0
cvtsi2sdl -0x84(%rbp), %xmm1
subsd %xmm1, %xmm0
callq 0x1b70
movaps %xmm0, %xmm1
movsd -0x98(%rbp), %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x8c(%rbp)
movq -0x10(%rbp), %rdi
cvtsi2sdl -0x8c(%rbp), %xmm0
movsd 0x36ce(%rip), %xmm1     # 0x50d8
divsd %xmm1, %xmm0
mulsd 0x6732(%rip), %xmm0     # 0x8148
cvttsd2si %xmm0, %edx
leaq 0x3af4(%rip), %rsi      # 0x5515
movb $0x0, %al
callq 0x1120
cmpl $0x0, -0x1c(%rbp)
jle 0x1a54
movl -0x1c(%rbp), %eax
movl -0x88(%rbp), %ecx
addl -0x74(%rbp), %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1a54
movsd 0x3676(%rip), %xmm0     # 0x50c0
divsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
cmpl $0x0, -0x1c(%rbp)
jle 0x1a80
movl -0x1c(%rbp), %eax
movl -0x88(%rbp), %ecx
addl -0x78(%rbp), %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1a80
movsd 0x364a(%rip), %xmm0     # 0x50c0
divsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
cmpl $0x0, -0x1c(%rbp)
jle 0x1aac
movl -0x1c(%rbp), %eax
movl -0x88(%rbp), %ecx
addl -0x7c(%rbp), %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1aac
movsd 0x361e(%rip), %xmm0     # 0x50c0
divsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
cmpl $0x0, -0x1c(%rbp)
jle 0x1ad8
movl -0x1c(%rbp), %eax
movl -0x88(%rbp), %ecx
addl -0x80(%rbp), %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1ad8
movsd 0x35f2(%rip), %xmm0     # 0x50c0
divsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
cmpl $0x0, -0x1c(%rbp)
jle 0x1b07
movl -0x1c(%rbp), %eax
movl -0x88(%rbp), %ecx
addl -0x84(%rbp), %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1b07
movsd 0x35c3(%rip), %xmm0     # 0x50c0
divsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x50(%rbp), %xmm0
addsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x58(%rbp), %xmm0
addsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x60(%rbp), %xmm0
addsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x68(%rbp), %xmm0
addsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x70(%rbp), %xmm0
addsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x18d4
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)