// File: /workspace/github_cpp_makefile_star2_O3/joao18araujo[P]pierluigi/src/first_species_counterpoint.cpp
// Function: FirstSpeciesCounterpoint::dfs_generate_counterpoint(Song&, bool, int, int)
Song FirstSpeciesCounterpoint::dfs_generate_counterpoint(Song & c_song, bool ascendant, int paralels, int same_movements){
  song = &c_song;
  Song counterpoint(c_song.scale, c_song.time);
  if(song->size() > 200 || paralels > 4 || same_movements > 600)
    return Song();

  FirstSpeciesCounterpoint::solve(0, paralels, same_movements, counterpoint, ascendant);
  return counterpoint;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, 0x4(%rsp)
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x9c067d4(%rip), %rax   # 0x9c124a8
movq %rsi, (%rax)
addq $0x18, %rsi
xorl %eax, %eax
leaq 0xe8(%rsp), %rdi
movq %rax, (%rdi)
movq 0x20(%r12), %rcx
movq %rcx, 0x8(%rdi)
movq %rax, 0x10(%rdi)
movq 0x30(%r12), %rcx
movq %rcx, 0x18(%rdi)
movups 0x38(%r12), %xmm0
movups %xmm0, 0x20(%rdi)
movq %rax, 0x30(%rdi)
leaq 0x8(%rsp), %rdx
movq %rdi, (%rdx)
callq 0xb29e
leaq 0x120(%rsp), %r13
leaq 0x50(%r12), %rsi
movq %r13, %rdi
callq 0x1aa22
leaq 0x178(%rsp), %rdi
leaq 0x188(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0xa8(%r12), %rsi
movq 0xb0(%r12), %rdx
addq %rsi, %rdx
callq 0xb50a
movq 0xc8(%r12), %rdx
leaq 0x10(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0xfa10
movq 0x178(%rsp), %rdi
cmpq %r15, %rdi
je 0xbd91
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbdb2
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x138(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbdd3
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0xe8(%rsp), %rdi
callq 0xb4e4
leaq 0x9c066c1(%rip), %rax   # 0x9c124a8
movq (%rax), %rdi
callq 0x242b0
cmpl $0x258, %ebp            # imm = 0x258
jg 0xbea2
cmpl $0x4, %r14d
jg 0xbea2
cmpl $0xc9, %eax
jae 0xbea2
movzbl 0x4(%rsp), %r8d
leaq 0x10(%rsp), %r15
xorl %edi, %edi
movl %r14d, %esi
movl %ebp, %edx
movq %r15, %rcx
callq 0xbfce
leaq 0x28(%rsp), %rdx
movaps -0x18(%rdx), %xmm0
movups %xmm0, (%rbx)
movq -0x8(%rdx), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, -0x18(%rdx)
movq $0x0, -0x8(%rdx)
leaq 0x18(%rbx), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0xfb98
leaq 0x50(%rbx), %rdi
leaq 0x60(%rsp), %rsi
callq 0x1aa22
movl $0xb8, %edx
leaq (%rbx,%rdx), %rax
movq %rax, 0xa8(%rbx)
movq 0xb8(%rsp), %rcx
addq %rdx, %r15
cmpq %r15, %rcx
je 0xbecd
movq %rcx, 0xa8(%rbx)
movq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rbx)
jmp 0xbed4
movq %rbx, %rdi
callq 0xfae6
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbf0e
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x5360
jmp 0xbf0e
movups (%r15), %xmm0
movups %xmm0, (%rax)
movq 0xc0(%rsp), %rax
movq %rax, 0xb0(%rbx)
movq %r15, 0xb8(%rsp)
movq $0x0, 0xc0(%rsp)
movb $0x0, 0xc8(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rbx)
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbf2f
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbf4a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x28(%rsp), %rdi
callq 0xb4e4
leaq 0x10(%rsp), %rdi
callq 0xb1a2
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r12, %rdi
callq 0xb4e4
movq %rbx, %rdi
callq 0xb1a2
jmp 0xbfbc
movq %rax, %r14
leaq 0xe8(%rsp), %rdi
callq 0xb1d2
jmp 0xbfc6
movq %rax, %r14
movq %r13, %rdi
callq 0xb0e0
jmp 0xbfaa
movq %rax, %r14
leaq 0xe8(%rsp), %rdi
callq 0xb4e4
jmp 0xbfc6
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0xfb30
movq %r14, %rdi
callq 0x55e0