	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sb_dsp_unload                  ## -- Begin function sb_dsp_unload
	.p2align	4, 0x90
_sb_dsp_unload:                         ## @sb_dsp_unload
	.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
	movq	_audio_devs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rdi), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movq	(%rcx), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.3:
	movq	(%rbx), %rdi
	movq	8(%rax), %rax
	cmpq	%rax, %rdi
	jne	LBB0_2
## %bb.4:
	movl	%esi, %r14d
	movq	_MDL_ESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_7
## %bb.5:
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rax, %rdi
	movl	$8, %esi
	callq	_release_region
	movq	(%rbx), %rdi
LBB0_7:
	movl	$16, %esi
	callq	_release_region
	movq	_SB_NO_AUDIO@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, 24(%rbx)
	jne	LBB0_10
## %bb.8:
	movq	32(%rbx), %rdi
	callq	_sound_free_dma
	movq	40(%rbx), %rdi
	testq	%rdi, %rdi
	js	LBB0_10
## %bb.9:
	callq	_sound_free_dma
LBB0_10:
	movl	24(%rbx), %eax
	testl	%eax, (%r15)
	je	LBB0_12
## %bb.11:
	movq	_SB_NO_MIDI@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_17
LBB0_12:
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	jle	LBB0_14
## %bb.13:
	movq	%rbx, %rsi
	callq	_free_irq
LBB0_14:
	movq	%rbx, %rdi
	callq	_sb_mixer_unload
	testl	%r14d, %r14d
	jne	LBB0_16
## %bb.15:
	movl	60(%rbx), %edi
	callq	_sound_unload_mididev
LBB0_16:
	movl	56(%rbx), %edi
	callq	_sound_unload_audiodev
LBB0_17:
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_18
LBB0_1:
	movq	8(%rax), %rax
LBB0_2:
	movq	%rax, %rdi
	movl	$16, %esi
	callq	_release_region
LBB0_18:
	movq	_detected_devc@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_audio_devs,8,3                 ## @audio_devs
	.comm	_MDL_ESS,4,2                    ## @MDL_ESS
	.comm	_SB_NO_AUDIO,4,2                ## @SB_NO_AUDIO
	.comm	_SB_NO_MIDI,4,2                 ## @SB_NO_MIDI
	.comm	_detected_devc,8,3              ## @detected_devc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sb_dsp_unload                  ; -- Begin function sb_dsp_unload
	.p2align	2
_sb_dsp_unload:                         ; @sb_dsp_unload
	.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	x8, x0
Lloh0:
	adrp	x9, _audio_devs@GOTPAGE
Lloh1:
	ldr	x9, [x9, _audio_devs@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x10, [x0]
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
	ldr	x19, [x9]
	cbz	x19, LBB0_16
; %bb.1:
	ldr	x0, [x19]
	ldr	x8, [x8, #8]
	cmp	x0, x8
	b.ne	LBB0_17
; %bb.2:
	mov	x20, x1
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x9, _MDL_ESS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MDL_ESS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x8
	mov	w1, #8
	bl	_release_region
	ldr	x0, [x19]
LBB0_5:
	mov	w1, #16
	bl	_release_region
	ldr	w8, [x19, #24]
Lloh6:
	adrp	x21, _SB_NO_AUDIO@GOTPAGE
Lloh7:
	ldr	x21, [x21, _SB_NO_AUDIO@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.6:
	ldr	x0, [x19, #32]
	bl	_sound_free_dma
	ldr	x0, [x19, #40]
	tbnz	x0, #63, LBB0_8
; %bb.7:
	bl	_sound_free_dma
LBB0_8:
	ldr	w8, [x19, #24]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
Lloh8:
	adrp	x9, _SB_NO_MIDI@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SB_NO_MIDI@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_15
LBB0_10:
	ldr	x0, [x19, #48]
	cmp	x0, #1
	b.lt	LBB0_12
; %bb.11:
	mov	x1, x19
	bl	_free_irq
LBB0_12:
	mov	x0, x19
	bl	_sb_mixer_unload
	cbnz	w20, LBB0_14
; %bb.13:
	ldr	w0, [x19, #60]
	bl	_sound_unload_mididev
LBB0_14:
	ldr	w0, [x19, #56]
	bl	_sound_unload_audiodev
LBB0_15:
	mov	x0, x19
	bl	_kfree
	b	LBB0_18
LBB0_16:
	ldr	x8, [x8, #8]
LBB0_17:
	mov	x0, x8
	mov	w1, #16
	bl	_release_region
LBB0_18:
Lloh11:
	adrp	x8, _detected_devc@GOTPAGE
Lloh12:
	ldr	x8, [x8, _detected_devc@GOTPAGEOFF]
Lloh13:
	ldr	x0, [x8]
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_audio_devs,8,3                 ; @audio_devs
	.comm	_MDL_ESS,4,2                    ; @MDL_ESS
	.comm	_SB_NO_AUDIO,4,2                ; @SB_NO_AUDIO
	.comm	_SB_NO_MIDI,4,2                 ; @SB_NO_MIDI
	.comm	_detected_devc,8,3              ; @detected_devc
.subsections_via_symbols
