	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_unload_mpu401                  ## -- Begin function unload_mpu401
	.p2align	4, 0x90
_unload_mpu401:                         ## @unload_mpu401
	.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), %rax
	movslq	4(%rax), %r14
	cmpq	$-1, %r14
	je	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	movl	$2, %esi
	callq	_release_region
	cmpq	$0, 8(%rbx)
	jne	LBB0_4
## %bb.2:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	jle	LBB0_4
## %bb.3:
	movq	%rbx, %rsi
	callq	_free_irq
LBB0_4:
	movq	_mpu401_synth_operations@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r14,8), %r15
	movl	%r14d, %edi
	callq	_sound_unload_mididev
	movq	(%rbx), %rax
	movl	8(%rax), %edi
	callq	_sound_unload_timerdev
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mpu401_synth_operations,8,3    ## @mpu401_synth_operations
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_unload_mpu401                  ; -- Begin function unload_mpu401
	.p2align	2
_unload_mpu401:                         ; @unload_mpu401
	.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
	ldr	x8, [x0]
	ldrsw	x20, [x8, #4]
	cmn	w20, #1
	b.eq	LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #24]
	mov	w1, #2
	bl	_release_region
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_4
; %bb.2:
	ldr	x0, [x19, #16]
	cmp	x0, #1
	b.lt	LBB0_4
; %bb.3:
	mov	x1, x19
	bl	_free_irq
LBB0_4:
Lloh0:
	adrp	x8, _mpu401_synth_operations@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mpu401_synth_operations@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x21, [x8, x20, lsl #3]
	mov	x0, x20
	bl	_sound_unload_mididev
	ldr	x8, [x19]
	ldr	w0, [x8, #8]
	bl	_sound_unload_timerdev
	mov	x0, x21
	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
	b	_kfree
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_mpu401_synth_operations,8,3    ; @mpu401_synth_operations
.subsections_via_symbols
