// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %r12d
cmpl $0x2, %edi
jl 0x1ad8
movl $0x1, %r12d
movslq %r12d, %rax
movq (%rbx,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x1ad8
movb 0x2(%rsi), %r15b
testb %r15b, %r15b
je 0x1a1a
leaq 0x2(%rsi), %rdi
jmp 0x1a1f
movq 0x8(%rbx,%rax,8), %rdi
movzbl 0x1(%rsi), %eax
leal -0x62(%rax), %ecx
cmpl $0x14, %ecx
ja 0x1a44
leaq 0x160e(%rip), %rdx      # 0x3040
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq %rdi, 0x46b6(%rip)      # 0x60f8
jmp 0x1aba
cmpl $0x54, %eax
jne 0x1a58
callq 0x1080
movsd %xmm0, 0x46b2(%rip)     # 0x6108
jmp 0x1aba
xorl %r13d, %r13d
leaq 0x179d(%rip), %rdi      # 0x31ff
xorl %eax, %eax
callq 0x209c
jmp 0x1abd
callq 0x1080
movsd %xmm0, 0x4698(%rip)     # 0x6110
jmp 0x1aba
movb $0x1, 0x46a7(%rip)      # 0x6128
xorl %r13d, %r13d
jmp 0x1abd
callq 0x1180
movl %eax, 0x4687(%rip)      # 0x6118
jmp 0x1aba
callq 0x1080
movsd %xmm0, 0x4660(%rip)     # 0x6100
jmp 0x1aba
callq 0x1180
movl %eax, 0x468b(%rip)      # 0x6138
jmp 0x1aba
callq 0x1180
movl %eax, 0x4672(%rip)      # 0x612c
movb $0x1, %r13b
testb %r15b, %r15b
sete %al
andb %r13b, %al
movzbl %al, %eax
addl %eax, %r12d
incl %r12d
cmpl %r14d, %r12d
jl 0x19fb
subl %r12d, %r14d
cmpl $0x1, %r14d
jne 0x1f02
movslq %r12d, %rax
movq (%rbx,%rax,8), %rbx
cmpb $0x0, 0x4635(%rip)      # 0x6128
jne 0x1b47
movq 0x45fc(%rip), %rcx      # 0x60f8
movl 0x4629(%rip), %r8d      # 0x612c
leaq 0x15bd(%rip), %rdx      # 0x30c7
leaq -0x250(%rbp), %r14
movl $0x1ff, %esi            # imm = 0x1FF
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
leaq 0x15ad(%rip), %rsi      # 0x30d4
movq %r14, %rdi
callq 0x2136
movq %rax, 0x45fa(%rip)      # 0x6130
leaq 0x1599(%rip), %rdi      # 0x30d6
movq %r14, %rsi
xorl %eax, %eax
callq 0x10c0
movl 0x45eb(%rip), %eax      # 0x6138
movl %eax, 0x45e9(%rip)      # 0x613c
movq %rbx, %rdi
callq 0x1294
movq %rax, %rbx
movq 0x50(%rax), %r14
movl 0x78(%rax), %eax
movl %eax, -0x2c(%rbp)
leaq 0x1911(%rip), %rdi      # 0x3480
callq 0x1060
xorps %xmm0, %xmm0
cvtsi2sdl 0x38(%rbx), %xmm0
mulsd 0x457c(%rip), %xmm0     # 0x6100
movsd %xmm0, 0x4574(%rip)     # 0x6100
movsd 0x4574(%rip), %xmm1     # 0x6108
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x1bf0
jp 0x1bf0
movl 0x78(%rbx), %eax
cmpl $0x65, %eax
jl 0x1be6
addl $-0x65, %eax
movl $0x3e7, %ecx            # imm = 0x3E7
cmpl %ecx, %eax
cmovael %ecx, %eax
movq 0x50(%rbx), %rcx
incl %eax
xorl %edx, %edx
movl 0x190(%rcx,%rdx,4), %esi
movl %esi, %edi
negl %edi
cmovsl %esi, %edi
xorps %xmm1, %xmm1
cvtsi2sd %edi, %xmm1
addsd %xmm1, %xmm0
incq %rdx
cmpq %rdx, %rax
jne 0x1bbd
mulsd 0x1442(%rip), %xmm0     # 0x3028
divsd 0x1442(%rip), %xmm0     # 0x3030
jmp 0x1c31
movl 0x44(%rbx), %edi
decl %edi
movsd 0x140b(%rip), %xmm0     # 0x3008
callq 0x1040
addsd 0x1406(%rip), %xmm0     # 0x3010
movsd %xmm0, -0x38(%rbp)
movsd 0x44f1(%rip), %xmm1     # 0x6108
divsd 0x13f9(%rip), %xmm1     # 0x3018
movsd 0x13f9(%rip), %xmm0     # 0x3020
callq 0x1090
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x44cf(%rip)     # 0x6108
cmpl $0x0, -0x2c(%rbp)
jle 0x1ec5
xorl %ecx, %ecx
movq %rbx, -0x48(%rbp)
movq %r14, -0x50(%rbp)
movslq %ecx, %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%r14,%rax,4), %xmm0
ucomisd 0x44a7(%rip), %xmm0     # 0x6108
jbe 0x1eb9
xorps %xmm1, %xmm1
cvtsi2sdl 0x38(%rbx), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd 0x4492(%rip), %xmm2     # 0x6110
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm0
cvttsd2si %xmm0, %ebx
xorl %r12d, %r12d
testl %ebx, %ebx
cmovlel %r12d, %ebx
movq 0x4496(%rip), %rdi      # 0x6130
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
divsd %xmm1, %xmm0
leaq 0x1463(%rip), %rsi      # 0x310f
movb $0x1, %al
callq 0x1100
movl $0xfa0, %edi            # imm = 0xFA0
callq 0x21c9
movq %rax, %r15
movl -0x2c(%rbp), %eax
cmpl %eax, %ebx
cmovgl %ebx, %eax
movl %eax, -0x3c(%rbp)
movl %eax, %r13d
subl %ebx, %r13d
movq %rbx, -0x38(%rbp)
leaq (%r14,%rbx,4), %rdx
movl $0x3e8, %esi            # imm = 0x3E8
xorl %ebx, %ebx
cmpq %r12, %r13
je 0x1d5a
movl %esi, %eax
cmpq %rax, %r12
jne 0x1d0d
movq %r13, %r14
leal (%rsi,%rsi), %r13d
shll $0x3, %esi
movq %r15, %rdi
movq %rdx, %r15
callq 0x224c
movq %r15, %rdx
movq %rax, %r15
movl %r13d, %esi
movq %r14, %r13
movl (%rdx,%r12,4), %eax
movl %eax, (%r15,%r12,4)
incq %r12
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd 0x43da(%rip), %xmm1     # 0x6108
incl %ebx
ucomisd %xmm0, %xmm1
movl $0x0, %eax
cmovbel %eax, %ebx
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
ucomisd 0x43b5(%rip), %xmm0     # 0x6100
jbe 0x1ce0
movq -0x38(%rbp), %rax
addl %r12d, %eax
movl %eax, -0x3c(%rbp)
movl %r12d, %r13d
movl 0x43b8(%rip), %esi      # 0x6118
movq 0x4391(%rip), %rcx      # 0x60f8
movl 0x43be(%rip), %r8d      # 0x612c
movl 0x43c8(%rip), %eax      # 0x613c
cmpl $0x1, %esi
movq -0x48(%rbp), %rbx
leaq -0x250(%rbp), %r14
je 0x1d8a
cltd
idivl %esi
addl %edx, %r8d
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
leaq 0x137c(%rip), %rdx      # 0x3115
movl %eax, %r9d
xorl %eax, %eax
callq 0x10d0
movq %r14, %rdi
leaq 0x1327(%rip), %rsi      # 0x30d4
callq 0x2136
movq %rax, %r12
movl $0x8, %esi
movl $0x1, %edx
leaq 0x135b(%rip), %rdi      # 0x3121
movq %rax, %rcx
callq 0x11a0
movl $0xc, %esi
movl $0x1, %edx
leaq 0x134b(%rip), %rdi      # 0x312a
movq %r12, %rcx
callq 0x11a0
movl 0x38(%rbx), %edx
movq %r12, %rdi
leaq 0x1343(%rip), %rsi      # 0x3137
xorl %eax, %eax
callq 0x1100
movl 0x44(%rbx), %edx
movq %r12, %rdi
leaq 0x133f(%rip), %rsi      # 0x3147
xorl %eax, %eax
callq 0x1100
movq %r12, %rdi
leaq 0x1341(%rip), %rsi      # 0x315a
movl %r13d, %edx
xorl %eax, %eax
callq 0x1100
movq %r12, %rdi
leaq 0x133a(%rip), %rsi      # 0x3167
xorl %eax, %eax
callq 0x1100
testl %r13d, %r13d
movq %r13, %rax
leaq 0x17a7(%rip), %r13      # 0x35e8
jle 0x1e98
movl %eax, %ebx
xorl %r14d, %r14d
movsd 0x11b8(%rip), %xmm2     # 0x3008
movsd %xmm2, -0x38(%rbp)
movsd 0x11ab(%rip), %xmm0     # 0x3008
xorps %xmm1, %xmm1
cvtsi2sdl (%r15,%r14,4), %xmm1
subsd %xmm2, %xmm0
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %edx
movq %r12, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x1100
movsd -0x38(%rbp), %xmm2
movsd 0x11ac(%rip), %xmm0     # 0x3038
mulsd %xmm0, %xmm2
incq %r14
cmpq %r14, %rbx
jne 0x1e50
movq %r12, %rdi
callq 0x10a0
incl 0x4296(%rip)            # 0x613c
movq %r15, %rdi
callq 0x1030
movq -0x48(%rbp), %rbx
movq -0x50(%rbp), %r14
movl -0x3c(%rbp), %ecx
addl $0x2, %ecx
cmpl -0x2c(%rbp), %ecx
jl 0x1c4d
movl 0x4271(%rip), %esi      # 0x613c
leaq 0x1223(%rip), %rdi      # 0x30f5
xorl %eax, %eax
callq 0x10c0
cmpb $0x0, 0x4248(%rip)      # 0x6128
jne 0x1eee
movq 0x4247(%rip), %rdi      # 0x6130
callq 0x10a0
xorl %eax, %eax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rsi
leaq 0x1195(%rip), %rdi      # 0x30a1
xorl %eax, %eax
callq 0x10c0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1190
movq 0x41c4(%rip), %rsi      # 0x60e8
movq 0x41c5(%rip), %rdx      # 0x60f0
leaq 0x123b(%rip), %rdi      # 0x316d
xorl %eax, %eax
callq 0x10c0
jmp 0x2094
leaq 0x12d4(%rip), %rdi      # 0x3219
callq 0x1060
movq 0x4197(%rip), %rsi      # 0x60e8
leaq 0x1224(%rip), %rdi      # 0x317c
xorl %eax, %eax
callq 0x10c0
leaq 0x12ba(%rip), %rdi      # 0x3220
callq 0x1060
leaq 0x12b7(%rip), %rdi      # 0x3229
callq 0x1060
movq 0x417a(%rip), %rsi      # 0x60f8
leaq 0x1210(%rip), %rdi      # 0x3195
xorl %eax, %eax
callq 0x10c0
leaq 0x12cc(%rip), %rdi      # 0x325f
callq 0x1060
leaq 0x12e2(%rip), %rdi      # 0x3281
callq 0x1060
leaq 0x12ff(%rip), %rdi      # 0x32aa
callq 0x1060
movsd 0x4148(%rip), %xmm0     # 0x6100
leaq 0x11ee(%rip), %rbx      # 0x31ad
movq %rbx, %rdi
movb $0x1, %al
callq 0x10c0
leaq 0x1312(%rip), %rdi      # 0x32e2
callq 0x1060
movsd 0x4133(%rip), %xmm0     # 0x6110
movq %rbx, %rdi
movb $0x1, %al
callq 0x10c0
leaq 0x1323(%rip), %rdi      # 0x3311
callq 0x1060
movl 0x411f(%rip), %esi      # 0x6118
leaq 0x11cd(%rip), %rbx      # 0x31cd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10c0
leaq 0x1337(%rip), %rdi      # 0x3348
callq 0x1060
movl 0x411c(%rip), %esi      # 0x6138
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10c0
leaq 0x134f(%rip), %rdi      # 0x337c
callq 0x1060
movl 0x40f4(%rip), %esi      # 0x612c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10c0
leaq 0x1355(%rip), %rdi      # 0x339e
callq 0x1060
leaq 0x1380(%rip), %rdi      # 0x33d5
callq 0x1060
leaq 0x13aa(%rip), %rdi      # 0x340b
callq 0x1060
movsd 0x409a(%rip), %xmm0     # 0x6108
leaq 0x1170(%rip), %rdi      # 0x31e5
movb $0x1, %al
callq 0x10c0
leaq 0x13cb(%rip), %rdi      # 0x344e
callq 0x1060
leaq 0x13e3(%rip), %rdi      # 0x3472
callq 0x1060
xorl %edi, %edi
callq 0x1190
nop