	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpu401_close
_mpu401_close:                          ## @mpu401_close
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_dev_conf@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movslq	%edi, %r15
	movq	%r15, %rbx
	shlq	$5, %rbx
	leaq	(%r12,%rbx), %r14
	cmpq	$0, 24(%r12,%rbx)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_reset_mpu401
LBB0_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r12,%rbx)
	movq	_midi_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r15,8), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.3:
	movl	4(%rbx), %edi
	movq	_COPR_MIDI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	*8(%rbx)
	movl	(%rbx), %edi
	callq	_module_put
LBB0_4:
	movq	$0, (%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dev_conf,8,3                   ## @dev_conf
	.comm	_midi_devs,8,3                  ## @midi_devs
	.comm	_COPR_MIDI,4,2                  ## @COPR_MIDI
	.no_dead_strip	_mpu401_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpu401_close
_mpu401_close:                          ; @mpu401_close
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _dev_conf@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dev_conf@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sxtw	x20, w0
	add	x19, x8, x20, lsl #5
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_reset_mpu401
LBB0_2:
	stp	xzr, xzr, [x19, #8]
Lloh3:
	adrp	x8, _midi_devs@GOTPAGE
Lloh4:
	ldr	x8, [x8, _midi_devs@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x8, [x8, x20, lsl #3]
	ldr	x20, [x8]
	cbz	x20, LBB0_4
; %bb.3:
	ldr	x8, [x20, #8]
	ldr	w0, [x20, #4]
Lloh6:
	adrp	x9, _COPR_MIDI@GOTPAGE
Lloh7:
	ldr	x9, [x9, _COPR_MIDI@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	blr	x8
	ldr	w0, [x20]
	bl	_module_put
LBB0_4:
	str	xzr, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_dev_conf,8,3                   ; @dev_conf
	.comm	_midi_devs,8,3                  ; @midi_devs
	.comm	_COPR_MIDI,4,2                  ; @COPR_MIDI
	.no_dead_strip	_mpu401_close
.subsections_via_symbols
