// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/lib/songlib.c
// Function: ndraw
void
ndraw(double beats,int inst,int note,double length,...)
    {
    int i;
    int octaves[CHORD_LENGTH],pitches[CHORD_LENGTH];
    double lengths[CHORD_LENGTH];

    dTrace("entering\n");;

    octaves[0] = note / NOTES;
    pitches[0] = note % NOTES;
    lengths[0] = length;

    /* extract the remaining arguments */

    va_list ap;

    va_start(ap, length);

    note = va_arg(ap,int);
    i = 1;
    while (note != (int) 0 && i < sizeof(octaves)/sizeof(int))
        {
        length = va_arg(ap,double);

        octaves[i] = note / NOTES;
        pitches[i] = note % NOTES;
        lengths[i] = length;

        ++i;

        note = va_arg(ap,int);
        }

    va_end(ap);

    adraw(beats,inst,i,octaves,pitches,lengths);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2140, %rsp           # imm = 0x2140
testb %al, %al
je 0x54a9
movaps %xmm2, -0x20a0(%rbp)
movaps %xmm3, -0x2090(%rbp)
movaps %xmm4, -0x2080(%rbp)
movaps %xmm5, -0x2070(%rbp)
movaps %xmm6, -0x2060(%rbp)
movaps %xmm7, -0x2050(%rbp)
movq %r9, -0x20c8(%rbp)
movq %r8, -0x20d0(%rbp)
movq %rcx, -0x20d8(%rbp)
movq %rdx, -0x20e0(%rbp)
movsd %xmm0, -0x8(%rbp)
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movl -0x10(%rbp), %eax
movl $0xc, %ecx
cltd
idivl %ecx
movl %eax, -0x820(%rbp)
movl -0x10(%rbp), %eax
movl $0xc, %ecx
cltd
idivl %ecx
movl %edx, -0x1020(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x2020(%rbp)
leaq -0x2040(%rbp), %rax
leaq -0x20f0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x50, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x2040(%rbp), %rax
movq %rax, -0x2100(%rbp)
movl -0x2040(%rbp), %eax
movl %eax, -0x20f4(%rbp)
cmpl $0x28, %eax
ja 0x556c
movq -0x2100(%rbp), %rcx
movl -0x20f4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x2108(%rbp)
jmp 0x5589
movq -0x2100(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x2108(%rbp)
movq -0x2108(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x10(%rbp)
movl $0x1, -0x1c(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x10(%rbp)
movb %al, -0x2109(%rbp)
je 0x55bd
movslq -0x1c(%rbp), %rax
cmpq $0x200, %rax            # imm = 0x200
setb %al
movb %al, -0x2109(%rbp)
movb -0x2109(%rbp), %al
testb $0x1, %al
jne 0x55cc
jmp 0x5706
leaq -0x2040(%rbp), %rax
movq %rax, -0x2120(%rbp)
addq $0x4, %rax
movq %rax, -0x2118(%rbp)
movl -0x203c(%rbp), %eax
movl %eax, -0x2110(%rbp)
cmpl $0xa0, %eax
ja 0x5621
movq -0x2118(%rbp), %rcx
movl -0x2110(%rbp), %edx
movq -0x2120(%rbp), %rsi
movslq %edx, %rax
addq 0x10(%rsi), %rax
addl $0x10, %edx
movl %edx, (%rcx)
movq %rax, -0x2128(%rbp)
jmp 0x563e
movq -0x2120(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x2128(%rbp)
movq -0x2128(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
movl -0x10(%rbp), %eax
movl $0xc, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movslq -0x1c(%rbp), %rax
movl %ecx, -0x820(%rbp,%rax,4)
movl -0x10(%rbp), %eax
movl $0xc, %ecx
cltd
idivl %ecx
movslq -0x1c(%rbp), %rax
movl %edx, -0x1020(%rbp,%rax,4)
movsd -0x18(%rbp), %xmm0
movslq -0x1c(%rbp), %rax
movsd %xmm0, -0x2020(%rbp,%rax,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
leaq -0x2040(%rbp), %rax
movq %rax, -0x2138(%rbp)
movl -0x2040(%rbp), %eax
movl %eax, -0x212c(%rbp)
cmpl $0x28, %eax
ja 0x56d8
movq -0x2138(%rbp), %rcx
movl -0x212c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x2140(%rbp)
jmp 0x56f5
movq -0x2138(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x2140(%rbp)
movq -0x2140(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x10(%rbp)
jmp 0x559c
movsd -0x8(%rbp), %xmm0
movl -0xc(%rbp), %edi
movl -0x1c(%rbp), %esi
leaq -0x820(%rbp), %rdx
leaq -0x1020(%rbp), %rcx
leaq -0x2020(%rbp), %r8
callq 0x45e0
addq $0x2140, %rsp           # imm = 0x2140
popq %rbp
retq
nopw %cs:(%rax,%rax)