// File: /workspace/github_cpp_makefile_star2_O2/Wombozo[P]harmony/src/Triad.cpp
// Function: Triad::Triad(Note*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Note*, int)
Triad::Triad(Note *n, const std::string &str, Note *b, int inv) : root(n), bass(b), inversion(inv)
{
    if (!str.compare(triads[0]))
    {
        // "" (major)
        intervals = {std::string("major third"), std::string("perfect fifth")};
        _setNotes(this, &intervals);
    }
    else if (!str.compare(triads[1]))
    {
        // "m"
        intervals = {std::string("minor third"), std::string("perfect fifth")};
        _setNotes(this, &intervals);
    }
    else if (!str.compare(triads[2]))
    {
        // "aug"
        intervals = {std::string("major third"), std::string("augmented fifth")};
        _setNotes(this, &intervals);
    }
    else if (!str.compare(triads[3]))
    {
        // "dim"
        intervals = {std::string("minor third"), std::string("diminished fifth")};
        _setNotes(this, &intervals);
    }
    else if (!str.compare(triads[4]))
    {
        // "sus4"
        intervals = {std::string("perfect fourth"), std::string("perfect fifth")};
        _setNotes(this, &intervals);
    }
    else if (!str.compare(triads[5]))
    {
        // "sus2"
        intervals = {std::string("major second"), std::string("perfect fifth")};
        _setNotes(this, &intervals);
    }
    else if (!str.compare(triads[6]))
    {
        // "b5"
        intervals = {std::string("major third"), std::string("diminished fifth")};
        _setNotes(this, &intervals);
    }
    else if (!str.compare(triads[7]))
    {
        // "m#5"
        intervals = {std::string("minor third"), std::string("augmented fifth")};
        _setNotes(this, &intervals);
    }
    else
        throw E_CHORD_UNKNOWN;

    if (inversion > 2 | inversion < 0)
        throw E_INVERSION;
    std::rotate(notes.begin(), notes.begin() + inversion, notes.end());

    name = n->display() + str;
    typeName = str;
    if (root != bass)
    {
        name += "/" + bass->display();
    }
    if (inversion)
    {
        name += "/" + notes.at(0)->display();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
movq %rsi, (%rdi)
movq %rcx, 0x8(%rdi)
leaq 0x10(%rdi), %rax
movq %rax, -0xd0(%rbp)
leaq 0x20(%rdi), %rax
movq %rax, 0x10(%rdi)
andq $0x0, 0x18(%rdi)
xorl %eax, %eax
movb %al, 0x20(%rdi)
leaq 0x30(%rdi), %rcx
movq %rcx, -0xe0(%rbp)
leaq 0x40(%rdi), %rcx
movq %rcx, 0x30(%rdi)
andq $0x0, 0x38(%rdi)
movb %al, 0x40(%rdi)
movl %r8d, 0x50(%rdi)
leaq 0x58(%rdi), %rax
movq %rax, -0x38(%rbp)
leaq 0x70(%rdi), %rax
movq %rax, -0xd8(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
leaq 0x9b1b(%rip), %rsi      # 0x12450
movq %rdx, %rdi
callq 0x3030
testl %eax, %eax
je 0x8a67
leaq 0x9b24(%rip), %rsi      # 0x12470
movq %r12, %rdi
callq 0x3030
testl %eax, %eax
je 0x8aeb
leaq 0x9b2d(%rip), %rsi      # 0x12490
movq %r12, %rdi
callq 0x3030
testl %eax, %eax
je 0x8b6f
leaq 0x9b36(%rip), %rsi      # 0x124b0
movq %r12, %rdi
callq 0x3030
testl %eax, %eax
je 0x8bf0
leaq 0x9b3f(%rip), %rsi      # 0x124d0
movq %r12, %rdi
callq 0x3030
testl %eax, %eax
je 0x8c71
leaq 0x9b48(%rip), %rsi      # 0x124f0
movq %r12, %rdi
callq 0x3030
testl %eax, %eax
je 0x8cf2
leaq 0x9b51(%rip), %rsi      # 0x12510
movq %r12, %rdi
callq 0x3030
testl %eax, %eax
je 0x8d70
leaq 0x9b5a(%rip), %rsi      # 0x12530
movq %r12, %rdi
callq 0x3030
testl %eax, %eax
jne 0x8f60
leaq 0x3804(%rip), %rsi      # 0xc1f1
leaq -0x58(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
callq 0x4d30
leaq -0xc8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x6840
leaq -0xa0(%rbp), %r15
leaq 0x3852(%rip), %rsi      # 0xc26a
leaq -0x78(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x4d30
leaq -0x78(%rbp), %rsi
movq %r15, %rdi
callq 0x6840
pushq $0x28
popq %rbx
leaq -0x78(%rbp), %rdx
leaq -0xc8(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x9e80
leaq (%rbx,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x8a48
jmp 0x8dec
leaq 0x378f(%rip), %rsi      # 0xc1fd
leaq -0x58(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
callq 0x4d30
leaq -0xc8(%rbp), %rbx
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x6840
leaq -0xa0(%rbp), %r15
leaq 0x37c0(%rip), %rsi      # 0xc25c
leaq -0x78(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x4d30
leaq -0x78(%rbp), %rsi
movq %r15, %rdi
callq 0x6840
leaq -0x78(%rbp), %rdx
leaq -0xc8(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x9e80
pushq $0x28
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x8acc
jmp 0x8dec
leaq 0x36ff(%rip), %rsi      # 0xc1f1
leaq -0x58(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
callq 0x4d30
leaq -0xc8(%rbp), %rbx
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x6840
leaq -0xa0(%rbp), %r15
leaq 0x373c(%rip), %rsi      # 0xc25c
leaq -0x78(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x4d30
leaq -0x78(%rbp), %rsi
movq %r15, %rdi
callq 0x6840
leaq -0x78(%rbp), %rdx
leaq -0xc8(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x9e80
pushq $0x28
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x8b50
jmp 0x8dec
leaq 0x3687(%rip), %rsi      # 0xc1fd
leaq -0x58(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
callq 0x4d30
leaq -0xc8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x6840
leaq -0xa0(%rbp), %r15
leaq 0x36c9(%rip), %rsi      # 0xc26a
leaq -0x78(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x4d30
leaq -0x78(%rbp), %rsi
movq %r15, %rdi
callq 0x6840
leaq -0x78(%rbp), %rdx
leaq -0xc8(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x9e80
pushq $0x28
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x8bd1
jmp 0x8dec
leaq 0x35fa(%rip), %rsi      # 0xc1f1
leaq -0x58(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
callq 0x4d30
leaq -0xc8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x6840
leaq -0xa0(%rbp), %r15
leaq 0x3629(%rip), %rsi      # 0xc24b
leaq -0x78(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x4d30
leaq -0x78(%rbp), %rsi
movq %r15, %rdi
callq 0x6840
leaq -0x78(%rbp), %rdx
leaq -0xc8(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x9e80
pushq $0x28
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x8c52
jmp 0x8dec
leaq 0x35b3(%rip), %rsi      # 0xc22b
leaq -0x58(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
callq 0x4d30
leaq -0xc8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x6840
leaq -0xa0(%rbp), %r15
leaq 0x35b9(%rip), %rsi      # 0xc25c
leaq -0x78(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x4d30
leaq -0x78(%rbp), %rsi
movq %r15, %rdi
callq 0x6840
leaq -0x78(%rbp), %rdx
leaq -0xc8(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x9e80
pushq $0x28
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x8cd3
jmp 0x8dec
leaq 0x34c9(%rip), %rsi      # 0xc1c2
leaq -0x58(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
callq 0x4d30
leaq -0xc8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x6840
leaq -0xa0(%rbp), %r15
leaq 0x3538(%rip), %rsi      # 0xc25c
leaq -0x78(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x4d30
leaq -0x78(%rbp), %rsi
movq %r15, %rdi
callq 0x6840
leaq -0x78(%rbp), %rdx
leaq -0xc8(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x9e80
pushq $0x28
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x8d54
jmp 0x8dec
leaq 0x3486(%rip), %rsi      # 0xc1fd
leaq -0x58(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
callq 0x4d30
leaq -0xc8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x6840
leaq -0xa0(%rbp), %r15
leaq 0x34a9(%rip), %rsi      # 0xc24b
leaq -0x78(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x4d30
leaq -0x78(%rbp), %rsi
movq %r15, %rdi
callq 0x6840
leaq -0x78(%rbp), %rdx
leaq -0xc8(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x9e80
pushq $0x28
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x8dd2
leaq -0x78(%rbp), %rdi
callq 0x30d0
leaq -0x58(%rbp), %rdi
callq 0x30d0
movq %r13, %rdi
movq -0x38(%rbp), %rsi
callq 0x9bb0
movl 0x50(%r13), %eax
cmpq $0x3, %rax
jae 0x8f41
movq 0x70(%r13), %rdi
movq 0x78(%r13), %rdx
leaq (%rdi,%rax,8), %rsi
callq 0x8709
movq (%r14), %rax
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq *(%rax)
leaq -0xc8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movq %r12, %rdx
callq 0x7f1e
leaq -0xc8(%rbp), %rbx
movq -0xd0(%rbp), %rdi
movq %rbx, %rsi
callq 0x31c0
movq %rbx, %rdi
callq 0x30d0
leaq -0x58(%rbp), %rdi
callq 0x30d0
movq -0xe0(%rbp), %rdi
movq %r12, %rsi
callq 0x3110
movq 0x8(%r13), %rsi
cmpq %rsi, (%r13)
movq -0xd0(%rbp), %rbx
je 0x8ed3
movq (%rsi), %rax
leaq -0x58(%rbp), %rdi
callq *(%rax)
leaq 0x35a9(%rip), %rsi      # 0xc448
leaq -0xc8(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0x7f47
leaq -0xc8(%rbp), %rsi
movq %rbx, %rdi
callq 0x32f0
leaq -0xc8(%rbp), %rdi
callq 0x30d0
leaq -0x58(%rbp), %rdi
callq 0x30d0
cmpl $0x0, 0x50(%r13)
je 0x8f2f
movq -0xd8(%rbp), %rdi
xorl %esi, %esi
callq 0x5be6
movq (%rax), %rsi
movq (%rsi), %rax
leaq -0x58(%rbp), %rdi
callq *(%rax)
leaq 0x354d(%rip), %rsi      # 0xc448
leaq -0xc8(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0x7f47
leaq -0xc8(%rbp), %rsi
movq %rbx, %rdi
callq 0x32f0
leaq -0xc8(%rbp), %rdi
callq 0x30d0
leaq -0x58(%rbp), %rdi
callq 0x30d0
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x4
popq %rdi
callq 0x30f0
movl $0x2, (%rax)
leaq 0x8922(%rip), %rsi      # 0x11878
movq %rax, %rdi
xorl %edx, %edx
callq 0x3290
pushq $0x4
popq %rdi
callq 0x30f0
movl $0x1, (%rax)
jmp 0x8f4f
movq %rax, %r14
pushq $0x28
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x8f76
movb $0x1, %bl
jmp 0x8f99
movq %rax, %r14
xorl %ebx, %ebx
leaq -0x78(%rbp), %rdi
callq 0x30d0
jmp 0x8fb7
movq %rax, %r14
xorl %ebx, %ebx
jmp 0x8fb7
movq %rax, %r14
xorl %ebx, %ebx
leaq -0xc8(%rbp), %r15
leaq -0x58(%rbp), %rdi
callq 0x30d0
leaq -0xc8(%rbp), %rax
cmpq %r15, %rax
sete %al
orb %bl, %al
jne 0x93c1
leaq -0xc8(%rbp), %rbx
addq $-0x28, %r15
movq %r15, %rdi
callq 0x6ab4
cmpq %rbx, %r15
jne 0x8fdc
jmp 0x93c1
jmp 0x93be
movq %rax, %r14
pushq $0x28
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x8ffd
movb $0x1, %bl
jmp 0x9020
movq %rax, %r14
xorl %ebx, %ebx
leaq -0x78(%rbp), %rdi
callq 0x30d0
jmp 0x903e
movq %rax, %r14
xorl %ebx, %ebx
jmp 0x903e
movq %rax, %r14
xorl %ebx, %ebx
leaq -0xc8(%rbp), %r15
leaq -0x58(%rbp), %rdi
callq 0x30d0
leaq -0xc8(%rbp), %rax
cmpq %r15, %rax
sete %al
orb %bl, %al
jne 0x93c1
leaq -0xc8(%rbp), %rbx
addq $-0x28, %r15
movq %r15, %rdi
callq 0x6ab4
cmpq %rbx, %r15
jne 0x9063
jmp 0x93c1
jmp 0x93be
movq %rax, %r14
leaq (%rbx,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x9081
movb $0x1, %bl
jmp 0x90a4
movq %rax, %r14
xorl %ebx, %ebx
leaq -0x78(%rbp), %rdi
callq 0x30d0
jmp 0x90c2
movq %rax, %r14
xorl %ebx, %ebx
jmp 0x90c2
movq %rax, %r14
xorl %ebx, %ebx
leaq -0xc8(%rbp), %r15
leaq -0x58(%rbp), %rdi
callq 0x30d0
leaq -0xc8(%rbp), %rax
cmpq %r15, %rax
sete %al
orb %bl, %al
jne 0x93c1
leaq -0xc8(%rbp), %rbx
addq $-0x28, %r15
movq %r15, %rdi
callq 0x6ab4
cmpq %rbx, %r15
jne 0x90e7
jmp 0x93c1
jmp 0x93be
movq %rax, %r14
pushq $0x28
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x9108
movb $0x1, %bl
jmp 0x912b
movq %rax, %r14
xorl %ebx, %ebx
leaq -0x78(%rbp), %rdi
callq 0x30d0
jmp 0x9149
movq %rax, %r14
xorl %ebx, %ebx
jmp 0x9149
movq %rax, %r14
xorl %ebx, %ebx
leaq -0xc8(%rbp), %r15
leaq -0x58(%rbp), %rdi
callq 0x30d0
leaq -0xc8(%rbp), %rax
cmpq %r15, %rax
sete %al
orb %bl, %al
jne 0x93c1
leaq -0xc8(%rbp), %rbx
addq $-0x28, %r15
movq %r15, %rdi
callq 0x6ab4
cmpq %rbx, %r15
jne 0x916e
jmp 0x93c1
jmp 0x93be
movq %rax, %r14
pushq $0x28
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x918f
movb $0x1, %bl
jmp 0x91b2
movq %rax, %r14
xorl %ebx, %ebx
leaq -0x78(%rbp), %rdi
callq 0x30d0
jmp 0x91d0
movq %rax, %r14
xorl %ebx, %ebx
jmp 0x91d0
movq %rax, %r14
xorl %ebx, %ebx
leaq -0xc8(%rbp), %r15
leaq -0x58(%rbp), %rdi
callq 0x30d0
leaq -0xc8(%rbp), %rax
cmpq %r15, %rax
sete %al
orb %bl, %al
jne 0x93c1
leaq -0xc8(%rbp), %rbx
addq $-0x28, %r15
movq %r15, %rdi
callq 0x6ab4
cmpq %rbx, %r15
jne 0x91f5
jmp 0x93c1
jmp 0x93be
movq %rax, %r14
pushq $0x28
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x9216
movb $0x1, %bl
jmp 0x9239
movq %rax, %r14
xorl %ebx, %ebx
leaq -0x78(%rbp), %rdi
callq 0x30d0
jmp 0x9257
movq %rax, %r14
xorl %ebx, %ebx
jmp 0x9257
movq %rax, %r14
xorl %ebx, %ebx
leaq -0xc8(%rbp), %r15
leaq -0x58(%rbp), %rdi
callq 0x30d0
leaq -0xc8(%rbp), %rax
cmpq %r15, %rax
sete %al
orb %bl, %al
jne 0x93c1
leaq -0xc8(%rbp), %rbx
addq $-0x28, %r15
movq %r15, %rdi
callq 0x6ab4
cmpq %rbx, %r15
jne 0x927c
jmp 0x93c1
jmp 0x93be
movq %rax, %r14
pushq $0x28
popq %r12
leaq (%r12,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %r12
cmpq $-0x28, %r12
jne 0x929e
movb $0x1, %r12b
jmp 0x92c3
movq %rax, %r14
xorl %r12d, %r12d
leaq -0x78(%rbp), %rdi
callq 0x30d0
jmp 0x92df
movq %rax, %r14
xorl %r12d, %r12d
jmp 0x92df
movq %rax, %r14
xorl %r12d, %r12d
movq %rbx, %r15
leaq -0x58(%rbp), %rdi
callq 0x30d0
cmpq %r15, %rbx
sete %al
orb %r12b, %al
jne 0x93c1
leaq -0xc8(%rbp), %rbx
addq $-0x28, %r15
movq %r15, %rdi
callq 0x6ab4
cmpq %rbx, %r15
jne 0x92fe
jmp 0x93c1
jmp 0x93be
movq %rax, %r14
pushq $0x28
popq %r12
leaq (%r12,%rbp), %rdi
addq $-0xc8, %rdi
callq 0x6ab4
addq $-0x28, %r12
cmpq $-0x28, %r12
jne 0x9320
movb $0x1, %r12b
jmp 0x9345
movq %rax, %r14
xorl %r12d, %r12d
leaq -0x78(%rbp), %rdi
callq 0x30d0
jmp 0x9361
movq %rax, %r14
xorl %r12d, %r12d
jmp 0x9361
movq %rax, %r14
xorl %r12d, %r12d
movq %rbx, %r15
leaq -0x58(%rbp), %rdi
callq 0x30d0
cmpq %r15, %rbx
sete %al
orb %r12b, %al
jne 0x93c1
leaq -0xc8(%rbp), %rbx
addq $-0x28, %r15
movq %r15, %rdi
callq 0x6ab4
cmpq %rbx, %r15
jne 0x937c
jmp 0x93c1
jmp 0x93be
jmp 0x9395
jmp 0x93aa
movq %rax, %r14
leaq -0xc8(%rbp), %rdi
callq 0x30d0
jmp 0x93ad
jmp 0x93aa
jmp 0x93be
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0x30d0
jmp 0x93c1
jmp 0x93be
jmp 0x93be
jmp 0x93be
movq %rax, %r14
movq -0xd8(%rbp), %rdi
callq 0x4d7a
movq -0x38(%rbp), %rdi
callq 0x7d02
movq -0xe0(%rbp), %rdi
callq 0x30d0
movq -0xd0(%rbp), %rdi
callq 0x30d0
movq %r14, %rdi
callq 0x32b0