	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hda_stream_start
_hda_stream_start:                      ## @hda_stream_start
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	8(%rdi), %r13
	movq	%rsi, %rdi
	callq	_hda_get_offset_stream
	movl	%eax, %r14d
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%rbx,2), %r12
	shlq	$4, %r12
	xorl	%edi, %edi
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%r13,%r12)
	sete	%dil
	callq	_assert
	movq	_HDAC_SDLVI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%r14d, %esi
	movq	%r15, %rdi
	callq	_hda_get_reg_by_offset
	movl	%eax, %r13d
	movq	_HDAC_SDBDPL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%r14d, %esi
	movq	%r15, %rdi
	callq	_hda_get_reg_by_offset
	movq	_HDAC_SDBDPU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	addl	%r14d, %esi
	movq	%r15, %rdi
	callq	_hda_get_reg_by_offset
	leal	1(%r13), %r14d
	movq	_HDA_BDL_MAX_LEN@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	(%rax), %r13d
	setl	%dil
	callq	_assert
	movq	_HDA_BDL_ENTRY_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	imull	%r14d, %edx
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_hda_dma_get_vaddr
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	L_.str.1(%rip), %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_DPRINTF
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, 4(%rax,%r12)
	testl	%r13d, %r13d
	js	LBB0_6
## %bb.3:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	addq	%rcx, %rax
	addq	$40, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, %r12d
	shlq	$4, %r12
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r13), %r15d
	movl	%r15d, %eax
	cltd
	movq	_HDA_DMA_ACCESS_LEN@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	xorl	%edi, %edi
	testl	%edx, %edx
	sete	%dil
	callq	_assert
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_hda_dma_get_vaddr
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	%rax, 8(%rcx,%r13)
	movl	%r15d, (%rcx,%r13)
	movl	12(%rbx,%r13), %eax
	movl	%eax, 4(%rcx,%r13)
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_DPRINTF
	incl	%r14d
	addq	$16, %r13
	cmpq	%r13, %r12
	jne	LBB0_4
LBB0_6:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	leaq	(%r14,%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_HDAC_SDCTL0@GOTPCREL(%rip), %rax
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	addl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_hda_get_reg_by_offset
	movl	%eax, %ebx
	shrl	$20, %ebx
	andl	$15, %ebx
	movq	_HDA_ISS_NO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	cmpq	%r12, (%rax)
	setbe	%r15b
	leaq	L_.str.3(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_DPRINTF
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	movq	(%rax,%r15,8), %rax
	movq	%r12, (%rax,%rbx,8)
	movq	%rbx, 8(%r14,%r13)
	movq	%r15, 16(%r14,%r13)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r14,%r13)
	movq	%rdi, %r14
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_hda_set_pib
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	_hda_notify_codecs
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DPRINTF
	movl	$-1, %eax
LBB0_7:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDAC_SDLVI,4,2                 ## @HDAC_SDLVI
	.comm	_HDAC_SDBDPL,4,2                ## @HDAC_SDBDPL
	.comm	_HDAC_SDBDPU,4,2                ## @HDAC_SDBDPU
	.comm	_HDA_BDL_MAX_LEN,4,2            ## @HDA_BDL_MAX_LEN
	.comm	_HDA_BDL_ENTRY_LEN,4,2          ## @HDA_BDL_ENTRY_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fail to get the guest virtual address\n"

L_.str.1:                               ## @.str.1
	.asciz	"stream: 0x%x bdl_cnt: 0x%x bdl_paddr: 0x%lx\n"

	.comm	_HDA_DMA_ACCESS_LEN,4,2         ## @HDA_DMA_ACCESS_LEN
L_.str.2:                               ## @.str.2
	.asciz	"bdle: 0x%x bdle_sz: 0x%x\n"

	.comm	_HDAC_SDCTL0,4,2                ## @HDAC_SDCTL0
	.comm	_HDA_ISS_NO,8,3                 ## @HDA_ISS_NO
L_.str.3:                               ## @.str.3
	.asciz	"strm: 0x%x, dir: 0x%x\n"

	.no_dead_strip	_hda_stream_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hda_stream_start
_hda_stream_start:                      ; @hda_stream_start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	ldr	x25, [x0, #8]
	mov	x0, x1
	bl	_hda_get_offset_stream
	mov	x26, x0
	mov	w8, #48
	madd	x24, x20, x8, x25
	ldr	w8, [x24]
	cmp	w8, #0
	cset	w0, eq
	bl	_assert
Lloh0:
	adrp	x8, _HDAC_SDLVI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDAC_SDLVI@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w1, w8, w26
	mov	x0, x19
	bl	_hda_get_reg_by_offset
	mov	x23, x0
Lloh3:
	adrp	x8, _HDAC_SDBDPL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HDAC_SDBDPL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w1, w8, w26
	mov	x0, x19
	bl	_hda_get_reg_by_offset
Lloh6:
	adrp	x8, _HDAC_SDBDPU@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HDAC_SDBDPU@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	add	w1, w8, w26
	mov	x0, x19
	bl	_hda_get_reg_by_offset
	add	w21, w23, #1
Lloh9:
	adrp	x8, _HDA_BDL_MAX_LEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HDA_BDL_MAX_LEN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w23, w8
	cset	w0, lt
	bl	_assert
Lloh12:
	adrp	x8, _HDA_BDL_ENTRY_LEN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HDA_BDL_ENTRY_LEN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mul	w2, w8, w21
	mov	x0, x19
	bl	_hda_dma_get_vaddr
	cbz	x0, LBB0_6
; %bb.1:
	mov	x22, x0
	str	w26, [sp, #36]                  ; 4-byte Folded Spill
	str	x24, [sp, #40]                  ; 8-byte Folded Spill
	mov	x8, x21
	stp	x20, x8, [sp]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DPRINTF
	mov	w8, #48
	stp	x25, x20, [sp, #48]             ; 16-byte Folded Spill
	madd	x8, x20, x8, x25
	str	w21, [x8, #4]
	tbnz	w23, #31, LBB0_5
; %bb.2:
	mov	x27, #0
	mov	w28, #0
	mov	w8, #48
	ldp	x10, x9, [sp, #48]              ; 16-byte Folded Reload
	madd	x8, x9, x8, x10
	add	x25, x8, #40
	lsl	x26, x21, #4
Lloh17:
	adrp	x21, _HDA_DMA_ACCESS_LEN@GOTPAGE
Lloh18:
	ldr	x21, [x21, _HDA_DMA_ACCESS_LEN@GOTPAGEOFF]
Lloh19:
	adrp	x23, l_.str.2@PAGE
Lloh20:
	add	x23, x23, l_.str.2@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x20, x22, x27
	ldr	w24, [x20]
	ldr	w8, [x21]
	sdiv	w9, w24, w8
	msub	w8, w9, w8, w24
	cmp	w8, #0
	cset	w0, eq
	bl	_assert
	mov	x0, x19
	mov	x2, x24
	bl	_hda_dma_get_vaddr
	cbz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x25]
	add	x8, x8, x27
	str	x0, [x8, #8]
	ldr	w9, [x20, #12]
	stp	w24, w9, [x8]
	stp	x28, x24, [sp]
	mov	x0, x23
	bl	_DPRINTF
	add	w28, w28, #1
	add	x27, x27, #16
	cmp	x26, x27
	b.ne	LBB0_3
LBB0_5:
Lloh21:
	adrp	x8, _HDAC_SDCTL0@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HDAC_SDCTL0@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	w9, [sp, #36]                   ; 4-byte Folded Reload
	add	w1, w8, w9
	mov	x0, x19
	bl	_hda_get_reg_by_offset
	ubfx	w21, w0, #20, #4
Lloh24:
	adrp	x8, _HDA_ISS_NO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HDA_ISS_NO@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	ldr	x20, [sp, #56]                  ; 8-byte Folded Reload
	cmp	x8, x20
	cset	w22, ls
	stp	x21, x22, [sp]
Lloh27:
	adrp	x0, l_.str.3@PAGE
Lloh28:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DPRINTF
	ldr	x8, [x19]
	ldr	x8, [x8, w22, uxtw #3]
	str	x20, [x8, w21, uxtw #3]
	mov	w8, #48
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
	madd	x8, x20, x8, x9
	stp	x21, x22, [x8, #8]
	stp	xzr, xzr, [x8, #24]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_hda_set_pib
	mov	w8, #1
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	str	w8, [x9]
	mov	x0, x19
	mov	w1, #1
	mov	x2, x21
	mov	x3, x22
	bl	_hda_notify_codecs
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh29:
	adrp	x0, l_.str@PAGE
Lloh30:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTF
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_HDAC_SDLVI,4,2                 ; @HDAC_SDLVI
	.comm	_HDAC_SDBDPL,4,2                ; @HDAC_SDBDPL
	.comm	_HDAC_SDBDPU,4,2                ; @HDAC_SDBDPU
	.comm	_HDA_BDL_MAX_LEN,4,2            ; @HDA_BDL_MAX_LEN
	.comm	_HDA_BDL_ENTRY_LEN,4,2          ; @HDA_BDL_ENTRY_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fail to get the guest virtual address\n"

l_.str.1:                               ; @.str.1
	.asciz	"stream: 0x%x bdl_cnt: 0x%x bdl_paddr: 0x%lx\n"

	.comm	_HDA_DMA_ACCESS_LEN,4,2         ; @HDA_DMA_ACCESS_LEN
l_.str.2:                               ; @.str.2
	.asciz	"bdle: 0x%x bdle_sz: 0x%x\n"

	.comm	_HDAC_SDCTL0,4,2                ; @HDAC_SDCTL0
	.comm	_HDA_ISS_NO,8,3                 ; @HDA_ISS_NO
l_.str.3:                               ; @.str.3
	.asciz	"strm: 0x%x, dir: 0x%x\n"

	.no_dead_strip	_hda_stream_start
.subsections_via_symbols
