	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_wavefront_midi_output_open
_snd_wavefront_midi_output_open:        ## @snd_wavefront_midi_output_open
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	sete	%dil
	jmp	LBB0_3
LBB0_1:
	movl	$1, %edi
LBB0_3:
	callq	_snd_BUG_ON
	testq	%rax, %rax
	jne	LBB0_4
## %bb.6:
	movq	(%rbx), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_7
LBB0_4:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	movq	%rbx, %rdi
	callq	_get_wavefront_midi
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_spin_lock_irqsave
	movq	_MPU401_MODE_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%r14), %rcx
	orl	%eax, (%rcx,%r15,4)
	movq	8(%r14), %rax
	movq	%rbx, (%rax,%r15,8)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_8:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_EIO,4,2                        ## @EIO
	.comm	_MPU401_MODE_OUTPUT,4,2         ## @MPU401_MODE_OUTPUT
	.no_dead_strip	_snd_wavefront_midi_output_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_wavefront_midi_output_open
_snd_wavefront_midi_output_open:        ; @snd_wavefront_midi_output_open
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_4
	b	LBB0_3
LBB0_2:
	mov	w0, #1
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_4
LBB0_3:
	ldr	x8, [x19]
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbz	x0, LBB0_7
LBB0_4:
Lloh0:
	adrp	x8, _ENXIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x21, [x8]
	mov	x0, x19
	bl	_get_wavefront_midi
	cbz	x0, LBB0_9
; %bb.8:
	mov	x20, x0
	bl	_spin_lock_irqsave
Lloh2:
	adrp	x8, _MPU401_MODE_OUTPUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MPU401_MODE_OUTPUT@GOTPAGEOFF]
	lsl	x9, x21, #2
	ldp	x11, x10, [x20, #8]
	ldr	w12, [x10, x9]
Lloh4:
	ldr	w8, [x8]
	orr	w8, w12, w8
	str	w8, [x10, x9]
	str	x19, [x11, x21, lsl #3]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_6
LBB0_9:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_EIO,4,2                        ; @EIO
	.comm	_MPU401_MODE_OUTPUT,4,2         ; @MPU401_MODE_OUTPUT
	.no_dead_strip	_snd_wavefront_midi_output_open
.subsections_via_symbols
