	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad1848_halt_output
_ad1848_halt_output:                    ## @ad1848_halt_output
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_audio_devs@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movslq	%edi, %r15
	movq	(%rax,%r15,8), %rax
	movq	8(%rax), %r13
	movq	%r13, %rdi
	movl	$9, %esi
	callq	_ad_read
	testb	$1, %al
	jne	LBB0_1
## %bb.9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	%r13, %rdi
	callq	_ad_mute
	movq	_isa_dma_bridge_buggy@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jne	LBB0_3
## %bb.2:
	movq	(%r14), %rax
	movq	(%rax,%r15,8), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_disable_dma
LBB0_3:
	movl	$99999, %ebx                    ## imm = 0x1869F
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	$11, %esi
	callq	_ad_read
	subl	$1, %ebx
	setb	%cl
	testb	$16, %al
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	testb	%cl, %cl
	je	LBB0_4
LBB0_6:
	movq	%r13, %rdi
	movl	$9, %esi
	callq	_ad_read
	andl	$-2, %eax
	movq	%r13, %rdi
	movl	$9, %esi
	movl	%eax, %edx
	callq	_ad_write
	cmpl	$0, (%r12)
	jne	LBB0_8
## %bb.7:
	movq	(%r14), %rax
	movq	(%rax,%r15,8), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_enable_dma
LBB0_8:
	movq	_PCM_ENABLE_OUTPUT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	notl	%eax
	andl	%eax, 4(%r13)
	movq	%r13, %rdi
	callq	_io_Status
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_outb
	movq	%r13, %rdi
	callq	_io_Status
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_outb
	movl	(%rbx), %eax
	notl	%eax
	andl	%eax, 4(%r13)
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_audio_devs,8,3                 ## @audio_devs
	.comm	_isa_dma_bridge_buggy,4,2       ## @isa_dma_bridge_buggy
	.comm	_PCM_ENABLE_OUTPUT,4,2          ## @PCM_ENABLE_OUTPUT
	.no_dead_strip	_ad1848_halt_output
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad1848_halt_output
_ad1848_halt_output:                    ; @ad1848_halt_output
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
Lloh0:
	adrp	x21, _audio_devs@GOTPAGE
Lloh1:
	ldr	x21, [x21, _audio_devs@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x8, [x8, w0, sxtw #3]
	ldr	x19, [x8, #8]
	mov	x0, x19
	mov	w1, #9
	bl	_ad_read
	tbnz	w0, #0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	sxtw	x20, w20
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_ad_mute
Lloh2:
	adrp	x22, _isa_dma_bridge_buggy@GOTPAGE
Lloh3:
	ldr	x22, [x22, _isa_dma_bridge_buggy@GOTPAGEOFF]
	ldr	w8, [x22]
	cbnz	w8, LBB0_4
; %bb.3:
	ldr	x8, [x21]
	ldr	x8, [x8, x20, lsl #3]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_disable_dma
LBB0_4:
	mov	w8, #34463
	movk	w8, #1, lsl #16
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x23, x8
	mov	x0, x19
	mov	w1, #11
	bl	_ad_read
	tbnz	w0, #4, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w8, w23, #1
	cbnz	w23, LBB0_5
LBB0_7:
	mov	x0, x19
	mov	w1, #9
	bl	_ad_read
	and	w2, w0, #0xfffffffe
	mov	x0, x19
	mov	w1, #9
	bl	_ad_write
	ldr	w8, [x22]
	cbnz	w8, LBB0_9
; %bb.8:
	ldr	x8, [x21]
	ldr	x8, [x8, x20, lsl #3]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_enable_dma
LBB0_9:
Lloh4:
	adrp	x20, _PCM_ENABLE_OUTPUT@GOTPAGE
Lloh5:
	ldr	x20, [x20, _PCM_ENABLE_OUTPUT@GOTPAGEOFF]
	ldr	w8, [x20]
	ldr	w9, [x19, #4]
	bic	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_io_Status
	mov	x1, x0
	mov	w0, #0
	bl	_outb
	mov	x0, x19
	bl	_io_Status
	mov	x1, x0
	mov	w0, #0
	bl	_outb
	ldr	w8, [x20]
	ldr	w9, [x19, #4]
	bic	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_audio_devs,8,3                 ; @audio_devs
	.comm	_isa_dma_bridge_buggy,4,2       ; @isa_dma_bridge_buggy
	.comm	_PCM_ENABLE_OUTPUT,4,2          ; @PCM_ENABLE_OUTPUT
	.no_dead_strip	_ad1848_halt_output
.subsections_via_symbols
