// File: /workspace/github_cpp_makefile_star2_O3/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, 0xc(%rsp)
movq %rdx, %r14
movq %rdi, %rbx
movq $0x0, 0x8(%rdi)
leaq 0x5008(%rip), %rax      # 0xba20
movq %rax, (%rdi)
testl %esi, %esi
je 0x6ac0
movl %esi, %r15d
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x662e
leaq 0x48(%rsp), %rdx
movq %rbx, %rdi
movl %r15d, %esi
movl 0xc(%rsp), %ecx
callq 0x692c
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x6a6f
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x31a0
cmpq $0x0, 0x8(%rbx)
jne 0x6b80
movq 0x556f(%rip), %r15      # 0xbff0
leaq 0x1c76(%rip), %rsi      # 0x86fe
movl $0x3c, %edx
movq %r15, %rdi
callq 0x31b0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x3170
movsbl %al, %esi
movq 0x553d(%rip), %rdi      # 0xbff0
callq 0x3040
movq %rax, %rdi
callq 0x3110
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movq %r15, %rdi
callq 0x68e6
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x6b62
movl $0x1, %ebp
leaq 0x38(%rsp), %r13
xorl %ecx, %ecx
leaq 0x28(%rsp), %r15
movl (%rax,%rcx,4), %r12d
movq %r13, 0x28(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x662e
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
movl 0xc(%rsp), %ecx
callq 0x692c
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x6b3a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x31a0
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
testl %eax, %eax
jne 0x6b62
movl %ebp, %ecx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x6af6
cmpq $0x0, 0x8(%rbx)
je 0x6b92
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6b80
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x31a0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1b99(%rip), %rsi      # 0x873b
leaq 0x1bce(%rip), %rdx      # 0x8777
leaq 0x68(%rsp), %rdi
callq 0x5e78
movl $0x30, %edi
callq 0x30d0
movq %rax, %r14
leaq 0x68(%rsp), %rsi
movq %rax, %rdi
movl $0x2, %edx
callq 0x76ee
leaq 0x507f(%rip), %rsi      # 0xbc58
leaq 0xb54(%rip), %rdx       # 0x7734
movq %r14, %rdi
callq 0x3260
movq %rax, %r14
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x6c39
movq 0x78(%rsp), %rsi
jmp 0x6c2c
jmp 0x6c36
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x6c50
movq 0x58(%rsp), %rsi
incq %rsi
jmp 0x6c4b
movq %rax, %r14
jmp 0x6c50
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x6c39
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x31a0
jmp 0x6c39
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6c50
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x31a0
leaq 0x4d71(%rip), %rax      # 0xb9c8
movq %rax, (%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x6c69
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rbx)
movq %r14, %rdi
callq 0x3280
nop