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

    // No compiled support for specified API value.  Issue a warning
    // and continue as if no API was specified.
    std::cerr << "\nRtMidiIn: 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, queueSizeLimit );
    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 throw an error.
  std::string errorText = "RtMidiIn: no compiled API support found ... critical error!!";
  throw( RtMidiError( errorText, RtMidiError::UNSPECIFIED ) );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %rbx
andq $0x0, 0x8(%rdi)
leaq 0x5cdd(%rip), %rax      # 0xba20
movq %rax, (%rdi)
testl %esi, %esi
je 0x5d9c
movl %esi, %r15d
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x31e0
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %ecx
callq 0x5c88
leaq 0x28(%rsp), %rdi
callq 0x30b0
cmpq $0x0, 0x8(%rbx)
jne 0x5e1b
movq 0x6268(%rip), %rdi      # 0xbff0
leaq 0x1987(%rip), %rsi      # 0x7716
callq 0x3170
movq %rax, %rdi
callq 0x30c0
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
callq 0x5c60
xorl %r13d, %r13d
leaq 0x68(%rsp), %r15
movl %r13d, %r13d
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r13, %rcx
jbe 0x5e0a
movl (%rax,%r13,4), %r12d
movq %r15, %rdi
movq %r14, %rsi
callq 0x31e0
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x5c88
movq %r15, %rdi
callq 0x30b0
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
incl %r13d
testl %eax, %eax
je 0x5db9
cmpq $0x0, 0x8(%rbx)
je 0x5e2d
leaq 0x10(%rsp), %rdi
callq 0x6c44
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x191f(%rip), %rsi      # 0x7753
leaq 0x48(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x510a
pushq $0x30
popq %rdi
callq 0x30d0
movq %rax, %r14
leaq 0x48(%rsp), %rsi
pushq $0x2
popq %rdx
movq %rax, %rdi
callq 0x6660
leaq 0x5df3(%rip), %rsi      # 0xbc58
leaq 0x824(%rip), %rdx       # 0x6690
movq %r14, %rdi
callq 0x3240
movq %rax, %r14
leaq 0x48(%rsp), %rdi
jmp 0x5e9c
jmp 0x5ea3
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x30b0
jmp 0x5eb0
movq %rax, %r14
jmp 0x5eb0
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x30b0
jmp 0x5ea6
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6c44
movq %rbx, %rdi
callq 0x5c10
movq %r14, %rdi
callq 0x3260