	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hda_set_sdctl
_hda_set_sdctl:                         ## @hda_set_sdctl
	.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	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_HDAC_SDCTL0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_hda_get_stream_by_offsets
	movl	%eax, %r15d
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_hda_get_reg_by_offset
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_DPRINTF
	movq	_HDAC_SDCTL_SRST@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_hda_stream_reset
LBB0_2:
	movq	_HDAC_SDCTL_RUN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%eax, %ebx
	andl	%eax, %r12d
	cmpl	%r12d, %ebx
	jne	LBB0_3
## %bb.7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, %rdi
	movl	%r15d, %esi
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.4:
	callq	_hda_stream_start
	jmp	LBB0_6
LBB0_5:
	callq	_hda_stream_stop
LBB0_6:
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_assert                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HDAC_SDCTL0,4,2                ## @HDAC_SDCTL0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stream_ind: 0x%x old: 0x%x value: 0x%x\n"

	.comm	_HDAC_SDCTL_SRST,4,2            ## @HDAC_SDCTL_SRST
	.comm	_HDAC_SDCTL_RUN,4,2             ## @HDAC_SDCTL_RUN
	.no_dead_strip	_hda_set_sdctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hda_set_sdctl
_hda_set_sdctl:                         ; @hda_set_sdctl
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _HDAC_SDCTL0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDAC_SDCTL0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_hda_get_stream_by_offsets
	mov	x20, x0
	mov	x0, x19
	mov	x1, x22
	bl	_hda_get_reg_by_offset
	mov	x22, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_DPRINTF
Lloh5:
	adrp	x8, _HDAC_SDCTL_SRST@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HDAC_SDCTL_SRST@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	bl	_hda_stream_reset
LBB0_2:
Lloh8:
	adrp	x8, _HDAC_SDCTL_RUN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HDAC_SDCTL_RUN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x8]
	and	w8, w9, w22
	and	w9, w9, w21
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:
	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
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	cbz	w8, LBB0_6
; %bb.5:
	bl	_hda_stream_start
	b	LBB0_7
LBB0_6:
	bl	_hda_stream_stop
LBB0_7:
	cmp	w0, #0
	cset	w0, eq
	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	_assert
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_HDAC_SDCTL0,4,2                ; @HDAC_SDCTL0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stream_ind: 0x%x old: 0x%x value: 0x%x\n"

	.comm	_HDAC_SDCTL_SRST,4,2            ; @HDAC_SDCTL_SRST
	.comm	_HDAC_SDCTL_RUN,4,2             ; @HDAC_SDCTL_RUN
	.no_dead_strip	_hda_set_sdctl
.subsections_via_symbols
