// File: /workspace/github_cpp_makefile_star2_O1/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 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 $0x42, %edx
movl %r13d, %ecx
callq 0x71a0
testl %eax, %eax
je 0xa3e9
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 0xa452
movq %r15, %rdi
callq 0x7160
leaq -0x1f0(%rbp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x74a0
jmp 0xa473
leaq 0x18(%r15), %rdi
movq 0x20(%r15), %rdx
leaq 0x3181(%rip), %rcx      # 0xd579
movl $0x36, %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 0xa525
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x7420
jmp 0xa525
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 0x2e32(%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 0x2e06(%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 0xa506
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x7420
movq 0x6aab(%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 0xa57e
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x7420
jmp 0xa57e
jmp 0xa55c
jmp 0xa557
jmp 0xa557
movq %rax, %r14
jmp 0xa57e
movq %rax, %r14
movq 0x6a52(%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 0xa59a
movq -0x38(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x7420
movq %r14, %rdi
callq 0x78b0