// File: danomatika[P]miditester/src/main.cpp
// Function: systemMessages(std::vector<TestSet, std::allocator<TestSet>>&, int)
void systemMessages(TestQueue &queue, int channel) {
    TestSet set;
    set.name = "system";
    set.messages = {

        // sysex start, data bytes, and end
        {MIDI_SYSEX, 1, 2, 3, 4, 5, MIDI_SYSEXEND},

        // MTC Quarter Frame: 01:02:03:04 @ 25 fps (see timecode() function)
        {MIDI_TIMECODE, 0x02}, // note: receiver adds 2 frames
        {MIDI_TIMECODE, 0x10},
        {MIDI_TIMECODE, 0x23},
        {MIDI_TIMECODE, 0x30},
        {MIDI_TIMECODE, 0x42},
        {MIDI_TIMECODE, 0x50},
        {MIDI_TIMECODE, 0x61},
        {MIDI_TIMECODE, 0x72},

        // 14 bit song pos: 0x2030 = 8240
        {
            MIDI_SONGPOS,
            20, // value 1
            30  // value 2
        },

        // 7 bit song number
        {
            MIDI_SONGSELECT,
            64  // song
        },

        {MIDI_TUNEREQUEST}
    };
    queue.push_back(set);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3c0, %rsp            # imm = 0x3C0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0x2b8(%rbp)
callq 0x86b0
movq -0x2b8(%rbp), %rdi
leaq 0xabd7(%rip), %rsi      # 0x103d7
callq 0x3290
jmp 0x5807
movb $0x1, -0x2ab(%rbp)
leaq -0x188(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq %rax, -0x190(%rbp)
movb $-0x10, -0x1a7(%rbp)
movb $0x1, -0x1a6(%rbp)
movb $0x2, -0x1a5(%rbp)
movb $0x3, -0x1a4(%rbp)
movb $0x4, -0x1a3(%rbp)
movb $0x5, -0x1a2(%rbp)
movb $-0x9, -0x1a1(%rbp)
leaq -0x1a7(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq $0x7, -0x198(%rbp)
leaq -0x1a8(%rbp), %rdi
movq %rdi, -0x2c0(%rbp)
callq 0x86e0
movq -0x2c8(%rbp), %rdi
movq -0x2c0(%rbp), %rcx
movq -0x1a0(%rbp), %rsi
movq -0x198(%rbp), %rdx
callq 0x8700
jmp 0x58a3
leaq -0x170(%rbp), %rax
movq %rax, -0x2d8(%rbp)
movq %rax, -0x190(%rbp)
movb $-0xf, -0x1ba(%rbp)
movb $0x2, -0x1b9(%rbp)
leaq -0x1ba(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq $0x2, -0x1b0(%rbp)
leaq -0x1bb(%rbp), %rdi
movq %rdi, -0x2d0(%rbp)
callq 0x86e0
movq -0x2d8(%rbp), %rdi
movq -0x2d0(%rbp), %rcx
movq -0x1b8(%rbp), %rsi
movq -0x1b0(%rbp), %rdx
callq 0x8700
jmp 0x5915
leaq -0x158(%rbp), %rax
movq %rax, -0x2e8(%rbp)
movq %rax, -0x190(%rbp)
movb $-0xf, -0x1d2(%rbp)
movb $0x10, -0x1d1(%rbp)
leaq -0x1d2(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq $0x2, -0x1c8(%rbp)
leaq -0x1d3(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x86e0
movq -0x2e8(%rbp), %rdi
movq -0x2e0(%rbp), %rcx
movq -0x1d0(%rbp), %rsi
movq -0x1c8(%rbp), %rdx
callq 0x8700
jmp 0x5987
leaq -0x140(%rbp), %rax
movq %rax, -0x2f8(%rbp)
movq %rax, -0x190(%rbp)
movb $-0xf, -0x1ea(%rbp)
movb $0x23, -0x1e9(%rbp)
leaq -0x1ea(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq $0x2, -0x1e0(%rbp)
leaq -0x1eb(%rbp), %rdi
movq %rdi, -0x2f0(%rbp)
callq 0x86e0
movq -0x2f8(%rbp), %rdi
movq -0x2f0(%rbp), %rcx
movq -0x1e8(%rbp), %rsi
movq -0x1e0(%rbp), %rdx
callq 0x8700
jmp 0x59f9
leaq -0x128(%rbp), %rax
movq %rax, -0x308(%rbp)
movq %rax, -0x190(%rbp)
movb $-0xf, -0x202(%rbp)
movb $0x30, -0x201(%rbp)
leaq -0x202(%rbp), %rax
movq %rax, -0x200(%rbp)
movq $0x2, -0x1f8(%rbp)
leaq -0x203(%rbp), %rdi
movq %rdi, -0x300(%rbp)
callq 0x86e0
movq -0x308(%rbp), %rdi
movq -0x300(%rbp), %rcx
movq -0x200(%rbp), %rsi
movq -0x1f8(%rbp), %rdx
callq 0x8700
jmp 0x5a6b
leaq -0x110(%rbp), %rax
movq %rax, -0x318(%rbp)
movq %rax, -0x190(%rbp)
movb $-0xf, -0x21a(%rbp)
movb $0x42, -0x219(%rbp)
leaq -0x21a(%rbp), %rax
movq %rax, -0x218(%rbp)
movq $0x2, -0x210(%rbp)
leaq -0x21b(%rbp), %rdi
movq %rdi, -0x310(%rbp)
callq 0x86e0
movq -0x318(%rbp), %rdi
movq -0x310(%rbp), %rcx
movq -0x218(%rbp), %rsi
movq -0x210(%rbp), %rdx
callq 0x8700
jmp 0x5add
leaq -0xf8(%rbp), %rax
movq %rax, -0x328(%rbp)
movq %rax, -0x190(%rbp)
movb $-0xf, -0x232(%rbp)
movb $0x50, -0x231(%rbp)
leaq -0x232(%rbp), %rax
movq %rax, -0x230(%rbp)
movq $0x2, -0x228(%rbp)
leaq -0x233(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x86e0
movq -0x328(%rbp), %rdi
movq -0x320(%rbp), %rcx
movq -0x230(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x8700
jmp 0x5b4f
leaq -0xe0(%rbp), %rax
movq %rax, -0x338(%rbp)
movq %rax, -0x190(%rbp)
movb $-0xf, -0x24a(%rbp)
movb $0x61, -0x249(%rbp)
leaq -0x24a(%rbp), %rax
movq %rax, -0x248(%rbp)
movq $0x2, -0x240(%rbp)
leaq -0x24b(%rbp), %rdi
movq %rdi, -0x330(%rbp)
callq 0x86e0
movq -0x338(%rbp), %rdi
movq -0x330(%rbp), %rcx
movq -0x248(%rbp), %rsi
movq -0x240(%rbp), %rdx
callq 0x8700
jmp 0x5bc1
leaq -0xc8(%rbp), %rax
movq %rax, -0x348(%rbp)
movq %rax, -0x190(%rbp)
movb $-0xf, -0x262(%rbp)
movb $0x72, -0x261(%rbp)
leaq -0x262(%rbp), %rax
movq %rax, -0x260(%rbp)
movq $0x2, -0x258(%rbp)
leaq -0x263(%rbp), %rdi
movq %rdi, -0x340(%rbp)
callq 0x86e0
movq -0x348(%rbp), %rdi
movq -0x340(%rbp), %rcx
movq -0x260(%rbp), %rsi
movq -0x258(%rbp), %rdx
callq 0x8700
jmp 0x5c33
leaq -0xb0(%rbp), %rax
movq %rax, -0x358(%rbp)
movq %rax, -0x190(%rbp)
movb $-0xe, -0x27b(%rbp)
movb $0x14, -0x27a(%rbp)
movb $0x1e, -0x279(%rbp)
leaq -0x27b(%rbp), %rax
movq %rax, -0x278(%rbp)
movq $0x3, -0x270(%rbp)
leaq -0x27c(%rbp), %rdi
movq %rdi, -0x350(%rbp)
callq 0x86e0
movq -0x358(%rbp), %rdi
movq -0x350(%rbp), %rcx
movq -0x278(%rbp), %rsi
movq -0x270(%rbp), %rdx
callq 0x8700
jmp 0x5cac
leaq -0x98(%rbp), %rax
movq %rax, -0x368(%rbp)
movq %rax, -0x190(%rbp)
movb $-0xd, -0x292(%rbp)
movb $0x40, -0x291(%rbp)
leaq -0x292(%rbp), %rax
movq %rax, -0x290(%rbp)
movq $0x2, -0x288(%rbp)
leaq -0x293(%rbp), %rdi
movq %rdi, -0x360(%rbp)
callq 0x86e0
movq -0x368(%rbp), %rdi
movq -0x360(%rbp), %rcx
movq -0x290(%rbp), %rsi
movq -0x288(%rbp), %rdx
callq 0x8700
jmp 0x5d1e
leaq -0x80(%rbp), %rax
movq %rax, -0x378(%rbp)
movq %rax, -0x190(%rbp)
movb $-0xa, -0x2a9(%rbp)
leaq -0x2a9(%rbp), %rax
movq %rax, -0x2a8(%rbp)
movq $0x1, -0x2a0(%rbp)
leaq -0x2aa(%rbp), %rdi
movq %rdi, -0x370(%rbp)
callq 0x86e0
movq -0x378(%rbp), %rdi
movq -0x370(%rbp), %rcx
movq -0x2a8(%rbp), %rsi
movq -0x2a0(%rbp), %rdx
callq 0x8700
jmp 0x5d86
movb $0x0, -0x2ab(%rbp)
leaq -0x188(%rbp), %rax
movq %rax, -0x68(%rbp)
movq $0xc, -0x60(%rbp)
leaq -0x28(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x8780
jmp 0x5db3
leaq -0x188(%rbp), %rax
movq %rax, -0x388(%rbp)
addq $0x120, %rax            # imm = 0x120
movq %rax, -0x380(%rbp)
movq -0x380(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x390(%rbp)
callq 0x83c0
movq -0x388(%rbp), %rcx
movq -0x390(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x380(%rbp)
jne 0x5dce
leaq -0x2aa(%rbp), %rdi
callq 0x87d0
leaq -0x293(%rbp), %rdi
callq 0x87d0
leaq -0x27c(%rbp), %rdi
callq 0x87d0
leaq -0x263(%rbp), %rdi
callq 0x87d0
leaq -0x24b(%rbp), %rdi
callq 0x87d0
leaq -0x233(%rbp), %rdi
callq 0x87d0
leaq -0x21b(%rbp), %rdi
callq 0x87d0
leaq -0x203(%rbp), %rdi
callq 0x87d0
leaq -0x1eb(%rbp), %rdi
callq 0x87d0
leaq -0x1d3(%rbp), %rdi
callq 0x87d0
leaq -0x1bb(%rbp), %rdi
callq 0x87d0
leaq -0x1a8(%rbp), %rdi
callq 0x87d0
movq -0x8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x87f0
jmp 0x5e9e
leaq -0x48(%rbp), %rdi
callq 0x8860
addq $0x3c0, %rsp            # imm = 0x3C0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x60cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6065
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6059
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x604d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6041
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6035
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6029
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x601d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6011
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6005
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x5ff9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x5fed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x5fe1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x188(%rbp), %rax
movq %rax, -0x3a0(%rbp)
addq $0x120, %rax            # imm = 0x120
movq %rax, -0x398(%rbp)
movq -0x398(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x3a8(%rbp)
callq 0x83c0
movq -0x3a0(%rbp), %rcx
movq -0x3a8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x398(%rbp)
jne 0x5fae
jmp 0x5fe1
leaq -0x2aa(%rbp), %rdi
callq 0x87d0
leaq -0x293(%rbp), %rdi
callq 0x87d0
leaq -0x27c(%rbp), %rdi
callq 0x87d0
leaq -0x263(%rbp), %rdi
callq 0x87d0
leaq -0x24b(%rbp), %rdi
callq 0x87d0
leaq -0x233(%rbp), %rdi
callq 0x87d0
leaq -0x21b(%rbp), %rdi
callq 0x87d0
leaq -0x203(%rbp), %rdi
callq 0x87d0
leaq -0x1eb(%rbp), %rdi
callq 0x87d0
leaq -0x1d3(%rbp), %rdi
callq 0x87d0
leaq -0x1bb(%rbp), %rdi
callq 0x87d0
leaq -0x1a8(%rbp), %rdi
callq 0x87d0
testb $0x1, -0x2ab(%rbp)
jne 0x607c
jmp 0x60c9
movq -0x190(%rbp), %rax
leaq -0x188(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x3b0(%rbp)
je 0x60c7
movq -0x3b0(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x3b8(%rbp)
callq 0x83c0
movq -0x3b8(%rbp), %rax
leaq -0x188(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x3b0(%rbp)
jne 0x6096
jmp 0x60c9
jmp 0x60cb
leaq -0x48(%rbp), %rdi
callq 0x8860
movq -0x50(%rbp), %rdi
callq 0x3320
nopl (%rax)