	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ca0132_setup_stream
_ca0132_setup_stream:                   ## @ca0132_setup_stream
	.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
	testl	%esi, %esi
	je	LBB0_4
## %bb.1:
	movl	%r8d, %r13d
	movl	%ecx, %r12d
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	callq	_snd_printdd
	movq	_AC_VERB_GET_STREAM_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_snd_hda_codec_read
	cmpl	%r13d, %eax
	je	LBB0_3
## %bb.2:
	movl	$20, %edi
	callq	_msleep
	movq	_AC_VERB_SET_STREAM_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movl	%r13d, %r8d
	callq	_snd_hda_codec_write
LBB0_3:
	movq	_AC_VERB_GET_CONV@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_snd_hda_codec_read
	shll	$4, %ebx
	orl	%r12d, %ebx
	cmpl	%ebx, %eax
	jne	LBB0_5
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_AC_VERB_SET_CHANNEL_STREAMID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movl	%ebx, %r8d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_snd_hda_codec_write            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ca0132_setup_stream: NID=0x%x, stream=0x%x, channel=%d, format=0x%x\n"

	.comm	_AC_VERB_GET_STREAM_FORMAT,4,2  ## @AC_VERB_GET_STREAM_FORMAT
	.comm	_AC_VERB_SET_STREAM_FORMAT,4,2  ## @AC_VERB_SET_STREAM_FORMAT
	.comm	_AC_VERB_GET_CONV,4,2           ## @AC_VERB_GET_CONV
	.comm	_AC_VERB_SET_CHANNEL_STREAMID,4,2 ## @AC_VERB_SET_CHANNEL_STREAMID
	.no_dead_strip	_ca0132_setup_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ca0132_setup_stream
_ca0132_setup_stream:                   ; @ca0132_setup_stream
	.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
	cbz	w1, LBB0_4
; %bb.1:
	mov	x23, x4
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printdd
Lloh2:
	adrp	x8, _AC_VERB_GET_STREAM_FORMAT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AC_VERB_GET_STREAM_FORMAT@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	mov	w4, #0
	bl	_snd_hda_codec_read
	cmp	w0, w23
	b.eq	LBB0_3
; %bb.2:
	mov	w0, #20
	bl	_msleep
Lloh5:
	adrp	x8, _AC_VERB_SET_STREAM_FORMAT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AC_VERB_SET_STREAM_FORMAT@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	mov	x4, x23
	bl	_snd_hda_codec_write
LBB0_3:
Lloh8:
	adrp	x8, _AC_VERB_GET_CONV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AC_VERB_GET_CONV@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	mov	w4, #0
	bl	_snd_hda_codec_read
	orr	w4, w21, w22, lsl #4
	cmp	w0, w4
	b.ne	LBB0_5
LBB0_4:
	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_5:
Lloh11:
	adrp	x8, _AC_VERB_SET_CHANNEL_STREAMID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AC_VERB_SET_CHANNEL_STREAMID@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	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	_snd_hda_codec_write
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ca0132_setup_stream: NID=0x%x, stream=0x%x, channel=%d, format=0x%x\n"

	.comm	_AC_VERB_GET_STREAM_FORMAT,4,2  ; @AC_VERB_GET_STREAM_FORMAT
	.comm	_AC_VERB_SET_STREAM_FORMAT,4,2  ; @AC_VERB_SET_STREAM_FORMAT
	.comm	_AC_VERB_GET_CONV,4,2           ; @AC_VERB_GET_CONV
	.comm	_AC_VERB_SET_CHANNEL_STREAMID,4,2 ; @AC_VERB_SET_CHANNEL_STREAMID
	.no_dead_strip	_ca0132_setup_stream
.subsections_via_symbols
