	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alsa_midi_get_port
_alsa_midi_get_port:                    ## @alsa_midi_get_port
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r12
	leaq	-56(%rbp), %rdi
	callq	_snd_seq_client_info_alloca
	leaq	-48(%rbp), %rdi
	callq	_snd_seq_port_info_alloca
	movq	-56(%rbp), %rdi
	movl	$-1, %esi
	callq	_snd_seq_client_info_set_client
	movq	-56(%rbp), %rsi
	movq	%r12, %rdi
	callq	_snd_seq_query_next_client
	xorl	%ecx, %ecx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.1:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	_SND_SEQ_PORT_TYPE_MIDI_GENERIC@GOTPCREL(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rsi
	movq	%r12, %rdi
	callq	_snd_seq_query_next_client
	testq	%rax, %rax
	jne	LBB0_5
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	-56(%rbp), %rdi
	callq	_snd_seq_client_info_get_client
	movq	-48(%rbp), %rdi
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%eax, %esi
	callq	_snd_seq_port_info_set_client
	movq	-48(%rbp), %rdi
	movl	$-1, %esi
	callq	_snd_seq_port_info_set_port
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_snd_seq_query_next_port
	testq	%rax, %rax
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	-48(%rbp), %rdi
	callq	_snd_seq_port_info_get_capability
	movl	%eax, %r13d
	movq	-48(%rbp), %rdi
	callq	_snd_seq_port_info_get_type
	testl	%eax, (%r14)
	je	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=2
	andl	%ebx, %r13d
	cmpl	%ebx, %r13d
	jne	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	-48(%rbp), %rdi
	callq	_snd_seq_port_info_get_name
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_string_is_equal
	testq	%rax, %rax
	je	LBB0_3
## %bb.9:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	movq	-48(%rbp), %rdi
	callq	_snd_seq_port_info_get_port
	movl	%eax, 4(%rbx)
	movl	$1, %ecx
LBB0_10:
	movl	%ecx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%ecx, %ecx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_SND_SEQ_PORT_TYPE_MIDI_GENERIC,4,2 ## @SND_SEQ_PORT_TYPE_MIDI_GENERIC
	.no_dead_strip	_alsa_midi_get_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alsa_midi_get_port
_alsa_midi_get_port:                    ; @alsa_midi_get_port
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	add	x0, sp, #8
	bl	_snd_seq_client_info_alloca
	mov	x0, sp
	bl	_snd_seq_port_info_alloca
	ldr	x0, [sp, #8]
	mov	w1, #-1
	bl	_snd_seq_client_info_set_client
	ldr	x1, [sp, #8]
	mov	x0, x22
	bl	_snd_seq_query_next_client
	cbz	x0, LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_9
LBB0_2:
Lloh0:
	adrp	x25, _SND_SEQ_PORT_TYPE_MIDI_GENERIC@GOTPAGE
Lloh1:
	ldr	x25, [x25, _SND_SEQ_PORT_TYPE_MIDI_GENERIC@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [sp, #8]
	mov	x0, x22
	bl	_snd_seq_query_next_client
	cbnz	x0, LBB0_1
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	x0, [sp, #8]
	bl	_snd_seq_client_info_get_client
	mov	x23, x0
	ldr	x0, [sp]
	mov	x1, x23
	bl	_snd_seq_port_info_set_client
	ldr	x0, [sp]
	mov	w1, #-1
	bl	_snd_seq_port_info_set_port
LBB0_5:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x1, [sp]
	mov	x0, x22
	bl	_snd_seq_query_next_port
	cbnz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	x0, [sp]
	bl	_snd_seq_port_info_get_capability
	mov	x24, x0
	ldr	x0, [sp]
	bl	_snd_seq_port_info_get_type
	ldr	w8, [x25]
	and	w8, w8, w0
	and	w9, w24, w20
	cmp	w8, #0
	ccmp	w9, w20, #0, ne
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	x0, [sp]
	bl	_snd_seq_port_info_get_name
	mov	x1, x21
	bl	_string_is_equal
	cbz	x0, LBB0_5
; %bb.8:
	str	w23, [x19]
	ldr	x0, [sp]
	bl	_snd_seq_port_info_get_port
	str	w0, [x19, #4]
	mov	w0, #1
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SND_SEQ_PORT_TYPE_MIDI_GENERIC,4,2 ; @SND_SEQ_PORT_TYPE_MIDI_GENERIC
	.no_dead_strip	_alsa_midi_get_port
.subsections_via_symbols
