// File: /workspace/github_cpp_makefile_star2_O2/tobias93[P]piano/rtmidi_build/RtMidi.cpp
// Function: MidiOutAlsa::getPortName[abi:cxx11](unsigned int)
std::string MidiOutAlsa :: getPortName( unsigned int portNumber )
{
  snd_seq_client_info_t *cinfo;
  snd_seq_port_info_t *pinfo;
  snd_seq_client_info_alloca( &cinfo );
  snd_seq_port_info_alloca( &pinfo );

  std::string stringName;
  AlsaMidiData *data = static_cast<AlsaMidiData *> (apiData_);
  if ( portInfo( data->seq, pinfo, SND_SEQ_PORT_CAP_WRITE|SND_SEQ_PORT_CAP_SUBS_WRITE, (int) portNumber ) ) {
    int cnum = snd_seq_port_info_get_client(pinfo);
    snd_seq_get_any_client_info( data->seq, cnum, cinfo );
    std::ostringstream os;
    os << snd_seq_client_info_get_name(cinfo);
    os << " ";                                    // These lines added to make sure devices are listed
    os << snd_seq_port_info_get_client( pinfo );  // with full portnames added to ensure individual device names
    os << ":";
    os << snd_seq_port_info_get_port(pinfo);
    stringName = os.str();
    return stringName;
  }

  // If we get here, we didn't find a match.
  errorString_ = "MidiOutAlsa::getPortName: error looking for port name!";
  error( RtMidiError::WARNING, errorString_ );
  return stringName;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movl %edx, %r13d
movq %rsi, %r15
movq %rdi, %rbx
callq 0x7970
movq %rsp, %r12
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
callq 0x7970
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x71f0
callq 0x7890
movq %rsp, %r14
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
callq 0x7890
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x71f0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movq %rbx, -0x30(%rbp)
movb $0x0, 0x10(%rbx)
movq 0x8(%r15), %rbx
movq (%rbx), %rdi
pushq $0x42
popq %rdx
movq %r14, %rsi
movl %r13d, %ecx
callq 0x71d0
testl %eax, %eax
je 0x9be5
movq %r14, %rdi
callq 0x7130
movq (%rbx), %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x7690
leaq -0x1e8(%rbp), %rdi
movq -0x30(%rbp), %rbx
callq 0x76d0
movq %r12, %rdi
callq 0x7530
leaq -0x1e8(%rbp), %rdi
movq %rax, %rsi
callq 0x7470
leaq 0x2757(%rip), %rsi      # 0xc2bc
leaq -0x1e8(%rbp), %rdi
callq 0x7470
movq %r14, %rdi
callq 0x7130
leaq -0x1e8(%rbp), %rdi
movl %eax, %esi
callq 0x79c0
leaq 0x2730(%rip), %rsi      # 0xc2be
leaq -0x1e8(%rbp), %rdi
callq 0x7470
movq %r14, %rdi
callq 0x7900
leaq -0x1e8(%rbp), %rdi
movl %eax, %esi
callq 0x79c0
leaq -0x1e0(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x7860
leaq -0x70(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7600
movq %r14, %rdi
callq 0x7180
leaq -0x1e8(%rbp), %rdi
callq 0x7090
jmp 0x9c1f
leaq 0x18(%r15), %r14
leaq 0x2999(%rip), %rsi      # 0xc589
movq %r14, %rdi
callq 0x7af0
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x7720
leaq -0x50(%rbp), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x7240
leaq -0x50(%rbp), %rdi
callq 0x7180
movq -0x30(%rbp), %rbx
movq %rbx, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x7180
jmp 0x9c59
jmp 0x9c4a
jmp 0x9c45
jmp 0x9c45
movq %rax, %r14
jmp 0x9c59
movq %rax, %r14
leaq -0x1e8(%rbp), %rdi
callq 0x7090
movq -0x30(%rbp), %rdi
callq 0x7180
movq %r14, %rdi
callq 0x7a10