// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, %r15
leaq 0x40(%rsp), %rbp
movq %rbp, -0x10(%rbp)
xorl %eax, %eax
movq %rax, -0x8(%rbp)
movb $0x0, (%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbp)
movq %rax, 0x20(%rbp)
leaq 0x326d(%rip), %rcx      # 0x8263
leaq 0x30(%rsp), %rdi
movl $0x6, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3210
leaq 0x29(%rsp), %rsi
movl $0x30201f0, (%rsi)      # imm = 0x30201F0
movw $0x504, 0x4(%rsi)       # imm = 0x504
movb $-0x9, 0x6(%rsi)
leaq 0x68(%rsp), %r14
leaq 0x13(%rsp), %rcx
movl $0x7, %edx
movq %r14, %rdi
callq 0x5e6e
leaq 0x80(%rsp), %rbx
leaq 0x24(%rsp), %rsi
movw $0x2f1, (%rsi)          # imm = 0x2F1
leaq 0x12(%rsp), %rcx
movl $0x2, %edx
movq %rbx, %rdi
callq 0x5e6e
leaq 0x98(%rsp), %rbx
leaq 0x22(%rsp), %rsi
movw $0x10f1, (%rsi)         # imm = 0x10F1
leaq 0x11(%rsp), %rcx
movl $0x2, %edx
movq %rbx, %rdi
callq 0x5e6e
leaq 0xb0(%rsp), %rbx
leaq 0x20(%rsp), %rsi
movw $0x23f1, (%rsi)         # imm = 0x23F1
leaq 0x10(%rsp), %rcx
movl $0x2, %edx
movq %rbx, %rdi
callq 0x5e6e
leaq 0xc8(%rsp), %rbx
leaq 0x1e(%rsp), %rsi
movw $0x30f1, (%rsi)         # imm = 0x30F1
leaq 0xf(%rsp), %rcx
movl $0x2, %edx
movq %rbx, %rdi
callq 0x5e6e
leaq 0xe0(%rsp), %rbx
leaq 0x1c(%rsp), %rsi
movw $0x42f1, (%rsi)         # imm = 0x42F1
leaq 0xe(%rsp), %rcx
movl $0x2, %edx
movq %rbx, %rdi
callq 0x5e6e
leaq 0xf8(%rsp), %rbx
leaq 0x1a(%rsp), %rsi
movw $0x50f1, (%rsi)         # imm = 0x50F1
leaq 0xd(%rsp), %rcx
movl $0x2, %edx
movq %rbx, %rdi
callq 0x5e6e
leaq 0x110(%rsp), %rbx
leaq 0x18(%rsp), %rsi
movw $0x61f1, (%rsi)         # imm = 0x61F1
leaq 0xc(%rsp), %rcx
movl $0x2, %edx
movq %rbx, %rdi
callq 0x5e6e
leaq 0x128(%rsp), %rbx
leaq 0x16(%rsp), %rsi
movw $0x72f1, (%rsi)         # imm = 0x72F1
leaq 0xb(%rsp), %rcx
movl $0x2, %edx
movq %rbx, %rdi
callq 0x5e6e
leaq 0x140(%rsp), %rbx
leaq 0x26(%rsp), %rsi
movw $0x14f2, (%rsi)         # imm = 0x14F2
movb $0x1e, 0x2(%rsi)
leaq 0xa(%rsp), %rcx
movl $0x3, %edx
movq %rbx, %rdi
callq 0x5e6e
leaq 0x158(%rsp), %rbx
leaq 0x14(%rsp), %rsi
movw $0x40f3, (%rsi)         # imm = 0x40F3
leaq 0x9(%rsp), %rcx
movl $0x2, %edx
movq %rbx, %rdi
callq 0x5e6e
leaq 0x170(%rsp), %rbx
leaq 0x8(%rsp), %rsi
movb $-0xa, (%rsi)
leaq 0x7(%rsp), %rcx
movl $0x1, %edx
movq %rbx, %rdi
callq 0x5e6e
leaq 0x50(%rsp), %r12
leaq 0x188(%rsp), %r13
leaq 0x68(%rsp), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0x60c8
movl $0x120, %ebx            # imm = 0x120
movq 0x50(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x51fd
movq 0x60(%rsp,%rbx), %rsi
subq %rdi, %rsi
callq 0x31a0
addq $-0x18, %rbx
jne 0x51e6
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x5eb2
movq %r12, %rdi
callq 0x5f0e
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x522f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x31a0
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x68(%rsp), %rsi
movq %r13, %rdi
callq 0x3300
movb $0x1, %al
jmp 0x526e
jmp 0x5269
jmp 0x5269
jmp 0x5269
jmp 0x5269
jmp 0x5269
jmp 0x5269
jmp 0x5269
jmp 0x5269
jmp 0x5269
jmp 0x5269
movq %rax, %r15
xorl %eax, %eax
cmpq %rbx, %r14
sete %cl
testb %al, %al
jne 0x52ae
testb %cl, %cl
jne 0x52ae
leaq 0x68(%rsp), %r14
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x5296
movq -0x8(%rbx), %rsi
subq %rdi, %rsi
callq 0x31a0
addq $-0x18, %rbx
cmpq %r14, %rbx
jne 0x5281
jmp 0x52ae
movq %rax, %r15
xorl %eax, %eax
movq %r14, %rbx
jmp 0x526e
movq %rax, %r15
leaq 0x30(%rsp), %rdi
callq 0x5edc
movq %r15, %rdi
callq 0x3280