	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad1848_halt
_ad1848_halt:                           ## @ad1848_halt
	.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
	movl	%edi, %r14d
	movq	_audio_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %r12
	movq	8(%rax), %r15
	movq	%r15, %rdi
	movl	$9, %esi
	callq	_ad_read
	movl	%eax, %ebx
	testb	$1, %al
	je	LBB0_3
## %bb.1:
	movq	_OPEN_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.2:
	movl	%r14d, %edi
	callq	_ad1848_halt_output
LBB0_3:
	testb	$2, %bl
	je	LBB0_6
## %bb.4:
	movq	_OPEN_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_6
## %bb.5:
	movl	%r14d, %edi
	callq	_ad1848_halt_input
LBB0_6:
	movq	$0, (%r15)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_audio_devs,8,3                 ## @audio_devs
	.comm	_OPEN_WRITE,4,2                 ## @OPEN_WRITE
	.comm	_OPEN_READ,4,2                  ## @OPEN_READ
	.no_dead_strip	_ad1848_halt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad1848_halt
_ad1848_halt:                           ; @ad1848_halt
	.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	x20, x0
Lloh0:
	adrp	x8, _audio_devs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _audio_devs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8, w0, sxtw #3]
	ldp	x22, x19, [x8]
	mov	x0, x19
	mov	w1, #9
	bl	_ad_read
	mov	x21, x0
	tbz	w0, #0, LBB0_3
; %bb.1:
	ldr	w8, [x22]
Lloh3:
	adrp	x9, _OPEN_WRITE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OPEN_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_ad1848_halt_output
LBB0_3:
	tbz	w21, #1, LBB0_6
; %bb.4:
	ldr	w8, [x22]
Lloh6:
	adrp	x9, _OPEN_READ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _OPEN_READ@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_ad1848_halt_input
LBB0_6:
	str	xzr, [x19]
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_audio_devs,8,3                 ; @audio_devs
	.comm	_OPEN_WRITE,4,2                 ; @OPEN_WRITE
	.comm	_OPEN_READ,4,2                  ; @OPEN_READ
	.no_dead_strip	_ad1848_halt
.subsections_via_symbols
