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

        // start with note on
        {(unsigned char)(MIDI_NOTEON + channel), 64, 64},
        
        // note on without status byte
        {65, 64},

        // realtime messages should pass through 
        {MIDI_START},
        {66, 64},
        {MIDI_STOP},
        {67, 64},
        {MIDI_CONTINUE},
        {68, 64},
        {MIDI_CLOCK},

        // note off
        {(unsigned char)(MIDI_NOTEOFF + channel), 64, 0},

        // note offs without status byte
        {65, 0},
        {66, 0},
        {67, 0},
        {68, 0}
    };
    queue.push_back(set);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0x318(%rbp)
callq 0x86b0
movq -0x318(%rbp), %rdi
leaq 0x9db7(%rip), %rsi      # 0x103e7
callq 0x3290
jmp 0x6637
movb $0x1, -0x30c(%rbp)
leaq -0x1b8(%rbp), %rax
movq %rax, -0x328(%rbp)
movq %rax, -0x1c0(%rbp)
movb -0xc(%rbp), %al
addb $-0x70, %al
movb %al, -0x1d3(%rbp)
movb $0x40, -0x1d2(%rbp)
movb $0x40, -0x1d1(%rbp)
leaq -0x1d3(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq $0x3, -0x1c8(%rbp)
leaq -0x1d4(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x86e0
movq -0x328(%rbp), %rdi
movq -0x320(%rbp), %rcx
movq -0x1d0(%rbp), %rsi
movq -0x1c8(%rbp), %rdx
callq 0x8700
jmp 0x66bb
leaq -0x1a0(%rbp), %rax
movq %rax, -0x338(%rbp)
movq %rax, -0x1c0(%rbp)
movb $0x41, -0x1ea(%rbp)
movb $0x40, -0x1e9(%rbp)
leaq -0x1ea(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq $0x2, -0x1e0(%rbp)
leaq -0x1eb(%rbp), %rdi
movq %rdi, -0x330(%rbp)
callq 0x86e0
movq -0x338(%rbp), %rdi
movq -0x330(%rbp), %rcx
movq -0x1e8(%rbp), %rsi
movq -0x1e0(%rbp), %rdx
callq 0x8700
jmp 0x672d
leaq -0x188(%rbp), %rax
movq %rax, -0x348(%rbp)
movq %rax, -0x1c0(%rbp)
movb $-0x6, -0x201(%rbp)
leaq -0x201(%rbp), %rax
movq %rax, -0x200(%rbp)
movq $0x1, -0x1f8(%rbp)
leaq -0x202(%rbp), %rdi
movq %rdi, -0x340(%rbp)
callq 0x86e0
movq -0x348(%rbp), %rdi
movq -0x340(%rbp), %rcx
movq -0x200(%rbp), %rsi
movq -0x1f8(%rbp), %rdx
callq 0x8700
jmp 0x6798
leaq -0x170(%rbp), %rax
movq %rax, -0x358(%rbp)
movq %rax, -0x1c0(%rbp)
movb $0x42, -0x21a(%rbp)
movb $0x40, -0x219(%rbp)
leaq -0x21a(%rbp), %rax
movq %rax, -0x218(%rbp)
movq $0x2, -0x210(%rbp)
leaq -0x21b(%rbp), %rdi
movq %rdi, -0x350(%rbp)
callq 0x86e0
movq -0x358(%rbp), %rdi
movq -0x350(%rbp), %rcx
movq -0x218(%rbp), %rsi
movq -0x210(%rbp), %rdx
callq 0x8700
jmp 0x680a
leaq -0x158(%rbp), %rax
movq %rax, -0x368(%rbp)
movq %rax, -0x1c0(%rbp)
movb $-0x4, -0x231(%rbp)
leaq -0x231(%rbp), %rax
movq %rax, -0x230(%rbp)
movq $0x1, -0x228(%rbp)
leaq -0x232(%rbp), %rdi
movq %rdi, -0x360(%rbp)
callq 0x86e0
movq -0x368(%rbp), %rdi
movq -0x360(%rbp), %rcx
movq -0x230(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x8700
jmp 0x6875
leaq -0x140(%rbp), %rax
movq %rax, -0x378(%rbp)
movq %rax, -0x1c0(%rbp)
movb $0x43, -0x24a(%rbp)
movb $0x40, -0x249(%rbp)
leaq -0x24a(%rbp), %rax
movq %rax, -0x248(%rbp)
movq $0x2, -0x240(%rbp)
leaq -0x24b(%rbp), %rdi
movq %rdi, -0x370(%rbp)
callq 0x86e0
movq -0x378(%rbp), %rdi
movq -0x370(%rbp), %rcx
movq -0x248(%rbp), %rsi
movq -0x240(%rbp), %rdx
callq 0x8700
jmp 0x68e7
leaq -0x128(%rbp), %rax
movq %rax, -0x388(%rbp)
movq %rax, -0x1c0(%rbp)
movb $-0x5, -0x261(%rbp)
leaq -0x261(%rbp), %rax
movq %rax, -0x260(%rbp)
movq $0x1, -0x258(%rbp)
leaq -0x262(%rbp), %rdi
movq %rdi, -0x380(%rbp)
callq 0x86e0
movq -0x388(%rbp), %rdi
movq -0x380(%rbp), %rcx
movq -0x260(%rbp), %rsi
movq -0x258(%rbp), %rdx
callq 0x8700
jmp 0x6952
leaq -0x110(%rbp), %rax
movq %rax, -0x398(%rbp)
movq %rax, -0x1c0(%rbp)
movb $0x44, -0x27a(%rbp)
movb $0x40, -0x279(%rbp)
leaq -0x27a(%rbp), %rax
movq %rax, -0x278(%rbp)
movq $0x2, -0x270(%rbp)
leaq -0x27b(%rbp), %rdi
movq %rdi, -0x390(%rbp)
callq 0x86e0
movq -0x398(%rbp), %rdi
movq -0x390(%rbp), %rcx
movq -0x278(%rbp), %rsi
movq -0x270(%rbp), %rdx
callq 0x8700
jmp 0x69c4
leaq -0xf8(%rbp), %rax
movq %rax, -0x3a8(%rbp)
movq %rax, -0x1c0(%rbp)
movb $-0x8, -0x291(%rbp)
leaq -0x291(%rbp), %rax
movq %rax, -0x290(%rbp)
movq $0x1, -0x288(%rbp)
leaq -0x292(%rbp), %rdi
movq %rdi, -0x3a0(%rbp)
callq 0x86e0
movq -0x3a8(%rbp), %rdi
movq -0x3a0(%rbp), %rcx
movq -0x290(%rbp), %rsi
movq -0x288(%rbp), %rdx
callq 0x8700
jmp 0x6a2f
leaq -0xe0(%rbp), %rax
movq %rax, -0x3b8(%rbp)
movq %rax, -0x1c0(%rbp)
movb -0xc(%rbp), %al
addb $-0x80, %al
movb %al, -0x2ab(%rbp)
movb $0x40, -0x2aa(%rbp)
movb $0x0, -0x2a9(%rbp)
leaq -0x2ab(%rbp), %rax
movq %rax, -0x2a8(%rbp)
movq $0x3, -0x2a0(%rbp)
leaq -0x2ac(%rbp), %rdi
movq %rdi, -0x3b0(%rbp)
callq 0x86e0
movq -0x3b8(%rbp), %rdi
movq -0x3b0(%rbp), %rcx
movq -0x2a8(%rbp), %rsi
movq -0x2a0(%rbp), %rdx
callq 0x8700
jmp 0x6aac
leaq -0xc8(%rbp), %rax
movq %rax, -0x3c8(%rbp)
movq %rax, -0x1c0(%rbp)
movb $0x41, -0x2c2(%rbp)
movb $0x0, -0x2c1(%rbp)
leaq -0x2c2(%rbp), %rax
movq %rax, -0x2c0(%rbp)
movq $0x2, -0x2b8(%rbp)
leaq -0x2c3(%rbp), %rdi
movq %rdi, -0x3c0(%rbp)
callq 0x86e0
movq -0x3c8(%rbp), %rdi
movq -0x3c0(%rbp), %rcx
movq -0x2c0(%rbp), %rsi
movq -0x2b8(%rbp), %rdx
callq 0x8700
jmp 0x6b1e
leaq -0xb0(%rbp), %rax
movq %rax, -0x3d8(%rbp)
movq %rax, -0x1c0(%rbp)
movb $0x42, -0x2da(%rbp)
movb $0x0, -0x2d9(%rbp)
leaq -0x2da(%rbp), %rax
movq %rax, -0x2d8(%rbp)
movq $0x2, -0x2d0(%rbp)
leaq -0x2db(%rbp), %rdi
movq %rdi, -0x3d0(%rbp)
callq 0x86e0
movq -0x3d8(%rbp), %rdi
movq -0x3d0(%rbp), %rcx
movq -0x2d8(%rbp), %rsi
movq -0x2d0(%rbp), %rdx
callq 0x8700
jmp 0x6b90
leaq -0x98(%rbp), %rax
movq %rax, -0x3e8(%rbp)
movq %rax, -0x1c0(%rbp)
movb $0x43, -0x2f2(%rbp)
movb $0x0, -0x2f1(%rbp)
leaq -0x2f2(%rbp), %rax
movq %rax, -0x2f0(%rbp)
movq $0x2, -0x2e8(%rbp)
leaq -0x2f3(%rbp), %rdi
movq %rdi, -0x3e0(%rbp)
callq 0x86e0
movq -0x3e8(%rbp), %rdi
movq -0x3e0(%rbp), %rcx
movq -0x2f0(%rbp), %rsi
movq -0x2e8(%rbp), %rdx
callq 0x8700
jmp 0x6c02
leaq -0x80(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movq %rax, -0x1c0(%rbp)
movb $0x44, -0x30a(%rbp)
movb $0x0, -0x309(%rbp)
leaq -0x30a(%rbp), %rax
movq %rax, -0x308(%rbp)
movq $0x2, -0x300(%rbp)
leaq -0x30b(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x86e0
movq -0x3f8(%rbp), %rdi
movq -0x3f0(%rbp), %rcx
movq -0x308(%rbp), %rsi
movq -0x300(%rbp), %rdx
callq 0x8700
jmp 0x6c71
movb $0x0, -0x30c(%rbp)
leaq -0x1b8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq $0xe, -0x60(%rbp)
leaq -0x28(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x8780
jmp 0x6c9e
leaq -0x1b8(%rbp), %rax
movq %rax, -0x408(%rbp)
addq $0x150, %rax            # imm = 0x150
movq %rax, -0x400(%rbp)
movq -0x400(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x410(%rbp)
callq 0x83c0
movq -0x408(%rbp), %rcx
movq -0x410(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x400(%rbp)
jne 0x6cb9
leaq -0x30b(%rbp), %rdi
callq 0x87d0
leaq -0x2f3(%rbp), %rdi
callq 0x87d0
leaq -0x2db(%rbp), %rdi
callq 0x87d0
leaq -0x2c3(%rbp), %rdi
callq 0x87d0
leaq -0x2ac(%rbp), %rdi
callq 0x87d0
leaq -0x292(%rbp), %rdi
callq 0x87d0
leaq -0x27b(%rbp), %rdi
callq 0x87d0
leaq -0x262(%rbp), %rdi
callq 0x87d0
leaq -0x24b(%rbp), %rdi
callq 0x87d0
leaq -0x232(%rbp), %rdi
callq 0x87d0
leaq -0x21b(%rbp), %rdi
callq 0x87d0
leaq -0x202(%rbp), %rdi
callq 0x87d0
leaq -0x1eb(%rbp), %rdi
callq 0x87d0
leaq -0x1d4(%rbp), %rdi
callq 0x87d0
movq -0x8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x87f0
jmp 0x6da1
leaq -0x48(%rbp), %rdi
callq 0x8860
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x7008
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6fa2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6f96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6f8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6f7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6f72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6f66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6f5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6f4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6f42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6f36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6f2a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6f1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6f12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6f06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x1b8(%rbp), %rax
movq %rax, -0x420(%rbp)
addq $0x150, %rax            # imm = 0x150
movq %rax, -0x418(%rbp)
movq -0x418(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x428(%rbp)
callq 0x83c0
movq -0x420(%rbp), %rcx
movq -0x428(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x418(%rbp)
jne 0x6ed3
jmp 0x6f06
leaq -0x30b(%rbp), %rdi
callq 0x87d0
leaq -0x2f3(%rbp), %rdi
callq 0x87d0
leaq -0x2db(%rbp), %rdi
callq 0x87d0
leaq -0x2c3(%rbp), %rdi
callq 0x87d0
leaq -0x2ac(%rbp), %rdi
callq 0x87d0
leaq -0x292(%rbp), %rdi
callq 0x87d0
leaq -0x27b(%rbp), %rdi
callq 0x87d0
leaq -0x262(%rbp), %rdi
callq 0x87d0
leaq -0x24b(%rbp), %rdi
callq 0x87d0
leaq -0x232(%rbp), %rdi
callq 0x87d0
leaq -0x21b(%rbp), %rdi
callq 0x87d0
leaq -0x202(%rbp), %rdi
callq 0x87d0
leaq -0x1eb(%rbp), %rdi
callq 0x87d0
leaq -0x1d4(%rbp), %rdi
callq 0x87d0
testb $0x1, -0x30c(%rbp)
jne 0x6fb9
jmp 0x7006
movq -0x1c0(%rbp), %rax
leaq -0x1b8(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x430(%rbp)
je 0x7004
movq -0x430(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x438(%rbp)
callq 0x83c0
movq -0x438(%rbp), %rax
leaq -0x1b8(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x430(%rbp)
jne 0x6fd3
jmp 0x7006
jmp 0x7008
leaq -0x48(%rbp), %rdi
callq 0x8860
movq -0x50(%rbp), %rdi
callq 0x3320
nopw (%rax,%rax)