// File: danomatika[P]miditester/src/RtMidi.cpp
// Function: RtMidiOut::RtMidiOut(RtMidi::Api, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
RtMidiOut :: RtMidiOut( RtMidi::Api api, const std::string clientName )
{
  if ( api != UNSPECIFIED ) {
    // Attempt to open the specified API.
    openMidiApi( api, clientName );
    if ( rtapi_ ) return;

    // No compiled support for specified API value.  Issue a warning
    // and continue as if no API was specified.
    std::cerr << "\nRtMidiOut: no compiled support for specified API argument!\n\n" << std::endl;
  }

  // Iterate through the compiled APIs and return as soon as we find
  // one with at least one port or we reach the end of the list.
  std::vector< RtMidi::Api > apis;
  getCompiledApi( apis );
  for ( unsigned int i=0; i<apis.size(); i++ ) {
    openMidiApi( apis[i], clientName );
    if ( rtapi_->getPortCount() ) break;
  }

  if ( rtapi_ ) return;

  // It should not be possible to get here because the preprocessor
  // definition __RTMIDI_DUMMY__ is automatically defined if no
  // API-specific definitions are passed to the compiler. But just in
  // case something weird happens, we'll thrown an error.
  std::string errorText = "RtMidiOut: no compiled API support found ... critical error!!";
  throw( RtMidiError( errorText, RtMidiError::UNSPECIFIED ) );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdx, -0xc0(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0xc610
movq -0xb8(%rbp), %rax
leaq 0xad9d(%rip), %rcx      # 0x17a58
addq $0x10, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0xc(%rbp)
je 0xcd79
movq -0xc0(%rbp), %rsi
movl -0xc(%rbp), %eax
movl %eax, -0xc4(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x30e0
jmp 0xcce7
movl -0xc4(%rbp), %esi
movq -0xb8(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0xcb90
jmp 0xccff
leaq -0x38(%rbp), %rdi
callq 0x3150
movq -0xb8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xcd46
jmp 0xcf52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xcf44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3150
jmp 0xcf44
movq 0xb2a3(%rip), %rdi      # 0x17ff0
leaq 0x3ba4(%rip), %rsi      # 0x108f8
callq 0x31d0
movq %rax, -0xd0(%rbp)
jmp 0xcd62
movq -0xd0(%rbp), %rdi
movq 0xb248(%rip), %rsi      # 0x17fb8
callq 0x3200
jmp 0xcd77
jmp 0xcd79
leaq -0x60(%rbp), %rdi
callq 0xd960
leaq -0x60(%rbp), %rdi
callq 0xc710
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
movq %rax, -0xd8(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xd980
movq %rax, %rcx
movq -0xd8(%rbp), %rax
cmpq %rcx, %rax
jae 0xce71
movl -0x64(%rbp), %eax
movl %eax, %esi
leaq -0x60(%rbp), %rdi
callq 0xd9a0
movq -0xc0(%rbp), %rsi
movl (%rax), %eax
movl %eax, -0xdc(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x30e0
jmp 0xcde3
movl -0xdc(%rbp), %esi
movq -0xb8(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xcb90
jmp 0xcdfe
leaq -0x88(%rbp), %rdi
callq 0x3150
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
movl %eax, -0xe0(%rbp)
jmp 0xce26
movl -0xe0(%rbp), %eax
cmpl $0x0, %eax
je 0xce61
jmp 0xce71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xcf3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x3150
jmp 0xcf3b
jmp 0xce63
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xcd92
movq -0xb8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xce8d
leaq -0x60(%rbp), %rdi
callq 0xda60
jmp 0xcf52
leaq -0xa9(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x3330
movq -0xe8(%rbp), %rdx
leaq 0x3a88(%rip), %rsi      # 0x10936
leaq -0xa8(%rbp), %rdi
callq 0x8130
jmp 0xcebc
leaq -0xa9(%rbp), %rdi
callq 0x3220
movl $0x30, %edi
callq 0x3100
movq %rax, %rdi
movq %rdi, -0xf0(%rbp)
leaq -0xa8(%rbp), %rsi
movl $0x2, %edx
callq 0xd9c0
movq -0xf0(%rbp), %rdi
leaq 0xad4d(%rip), %rsi      # 0x17c48
leaq 0xb1e(%rip), %rdx       # 0xda20
callq 0x3300
jmp 0xcf64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xa9(%rbp), %rdi
callq 0x3220
jmp 0xcf3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x3150
leaq -0x60(%rbp), %rdi
callq 0xda60
movq -0xb8(%rbp), %rdi
callq 0xc640
jmp 0xcf5b
addq $0xf0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x3320
nopw %cs:(%rax,%rax)