// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/extract/extract.c
// Function: main
int
main(int argc,char **argv)
    {
    int argIndex = 1;
    char *source = 0;

    argIndex = processOptions(argc,argv);

    if (argc-argIndex == 1)
        {
        source = argv[argIndex];
        }
    else
        {
        printf("usage: %s [OPTIONS] <input wav file>\n",argv[0]);
        exit(-1);
        }

    if (TimingData)
        {
        char buffer[512];
        snprintf(buffer,sizeof(buffer)-1,"%s%d_timings",Base,TakeNumber);
        Timings = OpenFile(buffer,"w");
        printf("note timings are stored in %s\n",buffer);
        }

    Note = StartingNote;
    processData(readWave(source));
    printf("%d notes extracted.\n",Note);

    if (TimingData) fclose(Timings);

    return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %rbx
movl %edi, %r14d
pushq $0x1
popq %r12
movl %r14d, %ecx
movslq %r12d, %rax
subl %r12d, %ecx
jle 0x139f
movq (%rbx,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x139f
movb 0x2(%rsi), %r15b
testb %r15b, %r15b
je 0x12e5
leaq 0x2(%rsi), %rdi
jmp 0x12ea
movq 0x8(%rbx,%rax,8), %rdi
movzbl 0x1(%rsi), %eax
leal -0x62(%rax), %ecx
cmpl $0x14, %ecx
ja 0x130f
leaq 0x1d43(%rip), %rdx      # 0x3040
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq %rdi, 0x4de3(%rip)      # 0x60f0
jmp 0x1385
cmpl $0x54, %eax
jne 0x1323
callq 0x1080
movsd %xmm0, 0x4ddf(%rip)     # 0x6100
jmp 0x1385
xorl %r13d, %r13d
leaq 0x1ed2(%rip), %rdi      # 0x31ff
xorl %eax, %eax
callq 0x1918
jmp 0x1388
callq 0x1080
movsd %xmm0, 0x4dc5(%rip)     # 0x6108
jmp 0x1385
movb $0x1, 0x4dd4(%rip)      # 0x6120
xorl %r13d, %r13d
jmp 0x1388
callq 0x1170
movl %eax, 0x4db4(%rip)      # 0x6110
jmp 0x1385
callq 0x1080
movsd %xmm0, 0x4d8d(%rip)     # 0x60f8
jmp 0x1385
callq 0x1170
movl %eax, 0x4db8(%rip)      # 0x6130
jmp 0x1385
callq 0x1170
movl %eax, 0x4d9f(%rip)      # 0x6124
movb $0x1, %r13b
testb %r15b, %r15b
sete %al
andb %r13b, %al
movzbl %al, %eax
addl %eax, %r12d
incl %r12d
jmp 0x12ba
cmpl $0x1, %ecx
jne 0x18ff
movq (%rbx,%rax,8), %rbx
cmpb $0x0, 0x4d6d(%rip)      # 0x6120
jne 0x1407
movq 0x4d34(%rip), %rcx      # 0x60f0
movl 0x4d61(%rip), %r8d      # 0x6124
leaq 0x1cfd(%rip), %rdx      # 0x30c7
leaq -0x250(%rbp), %r14
movl $0x1ff, %esi            # imm = 0x1FF
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
leaq 0x1ced(%rip), %rsi      # 0x30d4
movq %r14, %rdi
callq 0x1a48
movq %rax, 0x4d32(%rip)      # 0x6128
leaq 0x1cd9(%rip), %rdi      # 0x30d6
movq %r14, %rsi
xorl %eax, %eax
callq 0x10c0
movl 0x4d23(%rip), %eax      # 0x6130
movl %eax, 0x4d21(%rip)      # 0x6134
movq %rbx, %rdi
callq 0x2103
movq %rax, %r14
movq 0x50(%rax), %rbx
movslq 0x78(%rax), %rax
movq %rax, -0x38(%rbp)
leaq 0x204f(%rip), %rdi      # 0x3480
callq 0x1060
cvtsi2sdl 0x38(%r14), %xmm0
mulsd 0x4cb4(%rip), %xmm0     # 0x60f8
movsd %xmm0, 0x4cac(%rip)     # 0x60f8
movsd 0x4cac(%rip), %xmm1     # 0x6100
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x14a6
jp 0x14a6
movslq 0x78(%r14), %rax
pushq $0x64
popq %rcx
leaq -0x64(%rcx), %rdx
cmpq $0x3e7, %rdx            # imm = 0x3E7
ja 0x1494
cmpq %rax, %rcx
jge 0x1494
movq 0x50(%r14), %rdx
movl (%rdx,%rcx,4), %edx
movl %edx, %esi
negl %esi
cmovsl %edx, %esi
cvtsi2sd %esi, %xmm1
addsd %xmm1, %xmm0
incq %rcx
jmp 0x1467
mulsd 0x1b8c(%rip), %xmm0     # 0x3028
divsd 0x1b8c(%rip), %xmm0     # 0x3030
jmp 0x14e8
movl 0x44(%r14), %edi
decl %edi
movsd 0x1b54(%rip), %xmm0     # 0x3008
callq 0x1040
addsd 0x1b4f(%rip), %xmm0     # 0x3010
movsd %xmm0, -0x40(%rbp)
movsd 0x4c32(%rip), %xmm1     # 0x6100
divsd 0x1b42(%rip), %xmm1     # 0x3018
movsd 0x1b42(%rip), %xmm0     # 0x3020
callq 0x1090
mulsd -0x40(%rbp), %xmm0
movsd %xmm0, 0x4c10(%rip)     # 0x6100
xorl %ecx, %ecx
movq %r14, -0x50(%rbp)
movq %rbx, -0x48(%rbp)
cmpl -0x38(%rbp), %ecx
jge 0x1744
movslq %ecx, %rax
cvtsi2sdl (%rbx,%rax,4), %xmm0
ucomisd 0x4bed(%rip), %xmm0     # 0x6100
jbe 0x173c
cvtsi2sdl 0x38(%r14), %xmm1
cvtsi2sd %ecx, %xmm0
movsd 0x4bdd(%rip), %xmm2     # 0x6108
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm0
cvttsd2si %xmm0, %r13d
xorl %r15d, %r15d
testl %r13d, %r13d
cmovlel %r15d, %r13d
movq 0x4bdf(%rip), %rdi      # 0x6128
cvtsi2sd %r13d, %xmm0
divsd %xmm1, %xmm0
leaq 0x1bb6(%rip), %rsi      # 0x310f
movb $0x1, %al
callq 0x10f0
movl $0xfa0, %edi            # imm = 0xFA0
callq 0x1acd
movq -0x38(%rbp), %rcx
cmpl %ecx, %r13d
movl %r13d, %edx
cmovlel %ecx, %edx
movl %edx, -0x2c(%rbp)
movq %rax, %r12
leaq (%rbx,%r13,4), %rdx
movl $0x3e8, %esi            # imm = 0x3E8
xorl %r14d, %r14d
leaq (%r15,%r13), %rax
cmpq -0x38(%rbp), %rax
jge 0x15f7
movl %esi, %eax
cmpq %rax, %r15
jne 0x15b3
leal (%rsi,%rsi), %ebx
shll $0x3, %esi
movq %r12, %rdi
movq %rdx, %r12
callq 0x1b4e
movq %r12, %rdx
movq %rax, %r12
movl %ebx, %esi
movl (%rdx,%r15,4), %eax
movl %eax, (%r12,%r15,4)
incq %r15
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cvtsi2sd %ecx, %xmm0
movsd 0x4b2f(%rip), %xmm1     # 0x6100
incl %r14d
ucomisd %xmm0, %xmm1
movl $0x0, %eax
cmovbel %eax, %r14d
cvtsi2sd %r14d, %xmm0
ucomisd 0x4b0a(%rip), %xmm0     # 0x60f8
jbe 0x1589
leal (%r15,%r13), %eax
movl %eax, -0x2c(%rbp)
movl 0x4b13(%rip), %esi      # 0x6110
movq 0x4aec(%rip), %rcx      # 0x60f0
movl 0x4b19(%rip), %r8d      # 0x6124
movl 0x4b23(%rip), %eax      # 0x6134
cmpl $0x1, %esi
movq -0x50(%rbp), %r14
leaq -0x250(%rbp), %rbx
je 0x1627
cltd
idivl %esi
addl %edx, %r8d
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
leaq 0x1adf(%rip), %rdx      # 0x3115
movl %eax, %r9d
xorl %eax, %eax
callq 0x10d0
movq %rbx, %rdi
leaq 0x1a8a(%rip), %rsi      # 0x30d4
callq 0x1a48
movq %rax, %r13
leaq 0x1ac8(%rip), %rdi      # 0x3121
pushq $0x8
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
movq %rax, %rcx
callq 0x1190
leaq 0x1ab9(%rip), %rdi      # 0x312a
pushq $0xc
popq %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x1190
movl 0x38(%r14), %edx
movq %r13, %rdi
leaq 0x1aaa(%rip), %rsi      # 0x3137
xorl %eax, %eax
callq 0x10f0
movl 0x44(%r14), %edx
movq %r13, %rdi
leaq 0x1aa5(%rip), %rsi      # 0x3147
xorl %eax, %eax
callq 0x10f0
movq %r13, %rdi
leaq 0x1aa7(%rip), %rsi      # 0x315a
movl %r15d, %edx
xorl %eax, %eax
callq 0x10f0
movq %r13, %rdi
leaq 0x1aa0(%rip), %rsi      # 0x3167
xorl %eax, %eax
callq 0x10f0
xorl %ebx, %ebx
movsd 0x1930(%rip), %xmm2     # 0x3008
cmpq %rbx, %r15
je 0x171f
movsd 0x1923(%rip), %xmm0     # 0x3008
cvtsi2sdl (%r12,%rbx,4), %xmm1
subsd %xmm2, %xmm0
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %edx
movq %r13, %rdi
leaq 0x1ef7(%rip), %rsi      # 0x35f8
xorl %eax, %eax
movsd %xmm2, -0x40(%rbp)
callq 0x10f0
movsd -0x40(%rbp), %xmm2
mulsd 0x191e(%rip), %xmm2     # 0x3038
incq %rbx
jmp 0x16d8
movq %r13, %rdi
callq 0x10a0
incl 0x4a07(%rip)            # 0x6134
movq %r12, %rdi
callq 0x1030
movq -0x48(%rbp), %rbx
movl -0x2c(%rbp), %ecx
addl $0x2, %ecx
jmp 0x14fa
movl 0x49ea(%rip), %esi      # 0x6134
leaq 0x19a4(%rip), %rdi      # 0x30f5
xorl %eax, %eax
callq 0x10c0
cmpb $0x0, 0x49c1(%rip)      # 0x6120
jne 0x176d
movq 0x49c0(%rip), %rdi      # 0x6128
callq 0x10a0
xorl %eax, %eax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4958(%rip), %rsi      # 0x60e0
movq 0x4959(%rip), %rdx      # 0x60e8
leaq 0x19d7(%rip), %rdi      # 0x316d
xorl %eax, %eax
callq 0x10c0
jmp 0x18f8
leaq 0x1a70(%rip), %rdi      # 0x3219
callq 0x1060
movq 0x492b(%rip), %rsi      # 0x60e0
leaq 0x19c0(%rip), %rdi      # 0x317c
xorl %eax, %eax
callq 0x10c0
leaq 0x1a56(%rip), %rdi      # 0x3220
callq 0x1060
leaq 0x1a53(%rip), %rdi      # 0x3229
callq 0x1060
movq 0x490e(%rip), %rsi      # 0x60f0
leaq 0x19ac(%rip), %rdi      # 0x3195
xorl %eax, %eax
callq 0x10c0
leaq 0x1a68(%rip), %rdi      # 0x325f
callq 0x1060
leaq 0x1a7e(%rip), %rdi      # 0x3281
callq 0x1060
leaq 0x1a9b(%rip), %rdi      # 0x32aa
callq 0x1060
movsd 0x48dc(%rip), %xmm0     # 0x60f8
leaq 0x198a(%rip), %rbx      # 0x31ad
movq %rbx, %rdi
movb $0x1, %al
callq 0x10c0
leaq 0x1aae(%rip), %rdi      # 0x32e2
callq 0x1060
movsd 0x48c7(%rip), %xmm0     # 0x6108
movq %rbx, %rdi
movb $0x1, %al
callq 0x10c0
leaq 0x1abf(%rip), %rdi      # 0x3311
callq 0x1060
movl 0x48b3(%rip), %esi      # 0x6110
leaq 0x1969(%rip), %rbx      # 0x31cd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10c0
leaq 0x1ad3(%rip), %rdi      # 0x3348
callq 0x1060
movl 0x48b0(%rip), %esi      # 0x6130
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10c0
leaq 0x1aeb(%rip), %rdi      # 0x337c
callq 0x1060
movl 0x4888(%rip), %esi      # 0x6124
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10c0
leaq 0x1af1(%rip), %rdi      # 0x339e
callq 0x1060
leaq 0x1b1c(%rip), %rdi      # 0x33d5
callq 0x1060
leaq 0x1b46(%rip), %rdi      # 0x340b
callq 0x1060
movsd 0x482e(%rip), %xmm0     # 0x6100
leaq 0x190c(%rip), %rdi      # 0x31e5
movb $0x1, %al
callq 0x10c0
leaq 0x1b67(%rip), %rdi      # 0x344e
callq 0x1060
leaq 0x1b7f(%rip), %rdi      # 0x3472
callq 0x1060
xorl %edi, %edi
callq 0x1180
movq (%rbx), %rsi
leaq 0x1798(%rip), %rdi      # 0x30a1
xorl %eax, %eax
callq 0x10c0
pushq $-0x1
popq %rdi
callq 0x1180