// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/lib/songlib.c
// Function: rchord
void
rchord(double beats,...)
    {
    int noteCount;
    RRA *note;
    va_list ap;

    if (style == SWING && swingBeat == beats)
        {
        if (swingDown) beats = beats * 4 / 3;
        else beats = beats * 2 / 3;
        swingDown = !swingDown;
        }

    /* extract the arguments */

    va_start(ap, beats);

    noteCount = 0;
    note = va_arg(ap,RRA *);
    while (note != 0)
        {
        if (noteCount > 0) backwards(beats-stride);

        dplay(beats,note->data[0],note->samples,note->bitsPerSample);

        note = va_arg(ap,RRA *);

        ++noteCount;
        }

    va_end(ap);

    backwards((noteCount - 1) * stride);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
testb %al, %al
je 0x43c1
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rsi, -0xd8(%rbp)
movq %rdi, -0xe0(%rbp)
movsd %xmm0, -0x8(%rbp)
cmpl $0x1, 0xe11d(%rip)      # 0x12514
jne 0x4468
movsd 0xdfdf(%rip), %xmm0     # 0x123e0
ucomisd -0x8(%rbp), %xmm0
jne 0x4468
jp 0x4468
cmpl $0x0, 0xdfd7(%rip)      # 0x123e8
je 0x4433
movsd 0x8bed(%rip), %xmm0     # 0xd008
mulsd -0x8(%rbp), %xmm0
movsd 0x8f20(%rip), %xmm1     # 0xd348
divsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x4451
movsd 0x8ef5(%rip), %xmm0     # 0xd330
mulsd -0x8(%rbp), %xmm0
movsd 0x8f00(%rip), %xmm1     # 0xd348
divsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
cmpl $0x0, 0xdf90(%rip)      # 0x123e8
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0xdf80(%rip)      # 0x123e8
leaq -0x30(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x40, 0x4(%rax)
movl $0x0, (%rax)
movl $0x0, -0xc(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xe4(%rbp)
cmpl $0x28, %eax
ja 0x44ce
movq -0xf0(%rbp), %rcx
movl -0xe4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xf8(%rbp)
jmp 0x44eb
movq -0xf0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x45b3
cmpl $0x0, -0xc(%rbp)
jle 0x451c
movsd -0x8(%rbp), %xmm0
subsd 0xe011(%rip), %xmm0     # 0x12528
callq 0x3870
movsd -0x8(%rbp), %xmm0
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movl 0xc(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x31c0
leaq -0x30(%rbp), %rax
movq %rax, -0x108(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xfc(%rbp)
cmpl $0x28, %eax
ja 0x457a
movq -0x108(%rbp), %rcx
movl -0xfc(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x110(%rbp)
jmp 0x4597
movq -0x108(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x44f9
movl -0xc(%rbp), %eax
decl %eax
cvtsi2sd %eax, %xmm0
movsd 0xdf64(%rip), %xmm1     # 0x12528
mulsd %xmm1, %xmm0
callq 0x3870
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)