// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rdx, %r14
movq %rdi, %rbx
andq $0x0, 0x8(%rdi)
leaq 0x5af3(%rip), %rax      # 0xba78
movq %rax, (%rdi)
testl %esi, %esi
je 0x5fda
movl %esi, %ebp
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x31e0
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5ed6
leaq 0x30(%rsp), %rdi
callq 0x30b0
cmpq $0x0, 0x8(%rbx)
jne 0x6056
movq 0x602a(%rip), %rdi      # 0xbff0
leaq 0x17c3(%rip), %rsi      # 0x7790
callq 0x3170
movq %rax, %rdi
callq 0x30c0
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
callq 0x5c60
xorl %r12d, %r12d
leaq 0x70(%rsp), %r15
movl %r12d, %r12d
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
jbe 0x6045
movl (%rax,%r12,4), %ebp
movq %r15, %rdi
movq %r14, %rsi
callq 0x31e0
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x5ed6
movq %r15, %rdi
callq 0x30b0
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
incl %r12d
testl %eax, %eax
je 0x5ff7
cmpq $0x0, 0x8(%rbx)
je 0x6066
leaq 0x10(%rsp), %rdi
callq 0x6c44
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1761(%rip), %rsi      # 0x77ce
leaq 0x50(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x510a
pushq $0x30
popq %rdi
callq 0x30d0
movq %rax, %r14
leaq 0x50(%rsp), %rsi
pushq $0x2
popq %rdx
movq %rax, %rdi
callq 0x6660
leaq 0x5bba(%rip), %rsi      # 0xbc58
leaq 0x5eb(%rip), %rdx       # 0x6690
movq %r14, %rdi
callq 0x3240
movq %rax, %r14
leaq 0x50(%rsp), %rdi
jmp 0x60d5
jmp 0x60dc
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x30b0
jmp 0x60e9
movq %rax, %r14
jmp 0x60e9
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x30b0
jmp 0x60df
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6c44
movq %rbx, %rdi
callq 0x5c10
movq %r14, %rdi
callq 0x3260
nop