// File: /workspace/github_cpp_makefile_star2_O1/tobias93[P]piano/rtmidi_build/RtMidi.cpp
// Function: MidiInAlsa::getPortName[abi:cxx11](unsigned int)
std::string MidiInAlsa :: 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_READ|SND_SEQ_PORT_CAP_SUBS_READ, (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_ = "MidiInAlsa::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 0x7810
movq %rsp, %r12
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
callq 0x7810
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x71d0
callq 0x7760
movq %rsp, %r14
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
callq 0x7760
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x71d0
leaq 0x10(%rbx), %rax
movq %rax, -0x38(%rbp)
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movq %rbx, -0x30(%rbp)
movb $0x0, 0x10(%rbx)
movq 0x8(%r15), %rbx
movq (%rbx), %rdi
movq %r14, %rsi
movl $0x21, %edx
movl %r13d, %ecx
callq 0x71a0
testl %eax, %eax
je 0x8f21
movq %r14, %rdi
callq 0x7110
movq (%rbx), %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x75d0
leaq -0x1f0(%rbp), %rdi
movq -0x30(%rbp), %rbx
callq 0x7610
movq %r12, %rdi
callq 0x74b0
movq %rax, %r15
testq %rax, %rax
je 0x8f8a
movq %r15, %rdi
callq 0x7160
leaq -0x1f0(%rbp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x74a0
jmp 0x8fab
leaq 0x18(%r15), %rdi
movq 0x20(%r15), %rdx
leaq 0x4380(%rip), %rcx      # 0xd2b0
movl $0x35, %r8d
xorl %esi, %esi
callq 0x7710
leaq -0x48(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x18(%r15), %rsi
movq 0x20(%r15), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %rdi
callq 0x7130
leaq -0x58(%rbp), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x7200
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
movq -0x30(%rbp), %rbx
je 0x905d
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x7420
jmp 0x905d
movq -0x1f0(%rbp), %rax
movq -0x18(%rax), %rax
leaq (%rax,%rbp), %rdi
addq $-0x1f0, %rdi           # imm = 0xFE10
movl 0x20(%rdi), %esi
orl $0x1, %esi
callq 0x7820
leaq 0x42fa(%rip), %rsi      # 0xd2ac
leaq -0x1f0(%rbp), %rdi
movl $0x1, %edx
callq 0x74a0
movq %r14, %rdi
callq 0x7110
leaq -0x1f0(%rbp), %rdi
movl %eax, %esi
callq 0x7860
leaq 0x42ce(%rip), %rsi      # 0xd2ae
leaq -0x1f0(%rbp), %rdi
movl $0x1, %edx
callq 0x74a0
movq %r14, %rdi
callq 0x77c0
leaq -0x1f0(%rbp), %rdi
movl %eax, %esi
callq 0x7860
leaq -0x1e8(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x7740
leaq -0x78(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7560
movq (%r14), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x903e
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x7420
movq 0x7f73(%rip), %rsi      # 0x10fb8
leaq -0x1f0(%rbp), %rdi
callq 0x71c0
leaq -0x180(%rbp), %rdi
callq 0x70c0
movq %rbx, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x90b6
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x7420
jmp 0x90b6
jmp 0x9094
jmp 0x908f
jmp 0x908f
movq %rax, %r14
jmp 0x90b6
movq %rax, %r14
movq 0x7f1a(%rip), %rsi      # 0x10fb8
leaq -0x1f0(%rbp), %rdi
callq 0x71c0
leaq -0x180(%rbp), %rdi
callq 0x70c0
movq -0x30(%rbp), %rax
movq (%rax), %rdi
cmpq -0x38(%rbp), %rdi
je 0x90d2
movq -0x38(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x7420
movq %r14, %rdi
callq 0x78b0