// File: /workspace/github_cpp_makefile_star2_O3/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 0x3340(%rip), %rcx      # 0x8263
leaq 0x30(%rsp), %rdi
movl $0x6, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3210
leaq 0x28(%rsp), %rsi
movl $0x30201f0, (%rsi)      # imm = 0x30201F0
movw $0x504, 0x4(%rsi)       # imm = 0x504
movb $-0x9, 0x6(%rsi)
leaq 0x68(%rsp), %rbx
leaq 0x12(%rsp), %rcx
movl $0x7, %edx
movq %rbx, %rdi
callq 0x5d50
leaq 0x80(%rsp), %r14
leaq 0x23(%rsp), %rsi
movw $0x2f1, (%rsi)          # imm = 0x2F1
leaq 0x11(%rsp), %rcx
movl $0x2, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0x98(%rsp), %r14
leaq 0x21(%rsp), %rsi
movw $0x10f1, (%rsi)         # imm = 0x10F1
leaq 0x10(%rsp), %rcx
movl $0x2, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0xb0(%rsp), %r14
leaq 0x1f(%rsp), %rsi
movw $0x23f1, (%rsi)         # imm = 0x23F1
leaq 0xf(%rsp), %rcx
movl $0x2, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0xc8(%rsp), %r14
leaq 0x1d(%rsp), %rsi
movw $0x30f1, (%rsi)         # imm = 0x30F1
leaq 0xe(%rsp), %rcx
movl $0x2, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0xe0(%rsp), %r14
leaq 0x1b(%rsp), %rsi
movw $0x42f1, (%rsi)         # imm = 0x42F1
leaq 0xd(%rsp), %rcx
movl $0x2, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0xf8(%rsp), %r14
leaq 0x19(%rsp), %rsi
movw $0x50f1, (%rsi)         # imm = 0x50F1
leaq 0xc(%rsp), %rcx
movl $0x2, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0x110(%rsp), %r14
leaq 0x17(%rsp), %rsi
movw $0x61f1, (%rsi)         # imm = 0x61F1
leaq 0xb(%rsp), %rcx
movl $0x2, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0x128(%rsp), %r14
leaq 0x15(%rsp), %rsi
movw $0x72f1, (%rsi)         # imm = 0x72F1
leaq 0xa(%rsp), %rcx
movl $0x2, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0x140(%rsp), %r14
leaq 0x25(%rsp), %rsi
movw $0x14f2, (%rsi)         # imm = 0x14F2
movb $0x1e, 0x2(%rsi)
leaq 0x9(%rsp), %rcx
movl $0x3, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0x158(%rsp), %r14
leaq 0x13(%rsp), %rsi
movw $0x40f3, (%rsi)         # imm = 0x40F3
leaq 0x8(%rsp), %rcx
movl $0x2, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0x170(%rsp), %r14
leaq 0x7(%rsp), %rsi
movb $-0xa, (%rsi)
leaq 0x6(%rsp), %rcx
movl $0x1, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0x50(%rsp), %r12
leaq 0x188(%rsp), %r13
leaq 0x68(%rsp), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0x5fbc
movl $0x120, %ebx            # imm = 0x120
movq 0x50(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x512a
movq 0x60(%rsp,%rbx), %rsi
subq %rdi, %rsi
callq 0x31a0
addq $-0x18, %rbx
jne 0x5113
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x5d94
movq %r12, %rdi
callq 0x5df0
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x515c
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 0x519b
jmp 0x5196
jmp 0x5196
jmp 0x5196
jmp 0x5196
jmp 0x5196
jmp 0x5196
jmp 0x5196
jmp 0x5196
jmp 0x5196
jmp 0x5196
movq %rax, %r15
xorl %eax, %eax
cmpq %r14, %rbx
sete %cl
testb %al, %al
jne 0x51ce
testb %cl, %cl
jne 0x51ce
movq -0x18(%r14), %rdi
testq %rdi, %rdi
je 0x51be
movq -0x8(%r14), %rsi
subq %rdi, %rsi
callq 0x31a0
addq $-0x18, %r14
cmpq %rbx, %r14
jne 0x51a9
jmp 0x51ce
jmp 0x51cb
movq %rax, %r15
leaq 0x30(%rsp), %rdi
callq 0x5dbe
movq %r15, %rdi
callq 0x3280