	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function epu_dma_done
_epu_dma_done:                          ## @epu_dma_done
	.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	$40, %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	16(%rsi), %rax
	movl	(%rax), %r12d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, %esi
	callq	_cx18_handle_to_stream
	testq	%rax, %rax
	je	LBB0_22
## %bb.1:
	movq	%rax, %r14
	movq	16(%rbx), %rax
	movl	8(%rax), %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jle	LBB0_24
## %bb.2:
	movq	8(%rbx), %r13
	leaq	24(%r14), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	28(%r14), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%r15,8), %r12d
	movq	_CX18_F_EWO_MB_STALE_UPON_RECEIPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r14), %eax
	cmpl	%eax, %r12d
	jl	LBB0_23
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	addl	4(%r14), %eax
	cmpl	%eax, %r12d
	jge	LBB0_23
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	4(%r13,%r15,8), %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_cx18_queue_get_mdl
	movq	%rax, %r13
	movl	32(%r14), %esi
	leaq	L_.str.4(%rip), %rdi
	movl	%r12d, %edx
	callq	_CX18_DEBUG_HI_DMA
	movl	32(%r14), %eax
	testq	%r13, %r13
	je	LBB0_3
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r13), %edx
	leaq	L_.str.6(%rip), %rdi
	movl	%eax, %esi
	callq	_CX18_DEBUG_HI_DMA
	movq	8(%r14), %rax
	movq	_CX18_ENC_STREAM_TYPE_TS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_cx18_mdl_send_to_dvb
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_6 Depth=1
	leaq	L_.str.5(%rip), %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_CX18_WARN
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_CX18_ENC_STREAM_TYPE_PCM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	cmpq	$0, 8(%rdi)
	je	LBB0_21
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_cx18_mdl_send_to_alsa
	jmp	LBB0_17
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_CX18_ENC_STREAM_TYPE_YUV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_cx18_mdl_send_to_videobuf
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	callq	_cx18_enqueue
LBB0_4:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %r13                 ## 8-byte Reload
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r15
	cmpl	%r15d, -80(%rbp)                ## 4-byte Folded Reload
	jne	LBB0_6
	jmp	LBB0_24
LBB0_19:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_cx18_enqueue
	movq	8(%r14), %rax
	movq	_CX18_ENC_STREAM_TYPE_IDX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_5
## %bb.20:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_cx18_stream_rotate_idx_mdls
	jmp	LBB0_5
LBB0_21:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_22:
	movq	_CX18_F_EWO_MB_STALE_UPON_RECEIPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rbx), %eax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	movl	24(%rbx), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CX18_WARN                      ## TAILCALL
LBB0_23:
	movl	24(%rbx), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_CX18_WARN
LBB0_24:
	movq	%r14, %rdi
	callq	_cx18_stream_load_fw_queue
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_wake_up
	cmpl	$-1, 16(%r14)
	je	LBB0_26
## %bb.25:
	addq	$20, %r14
	movq	%r14, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wake_up                        ## TAILCALL
LBB0_26:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Got DMA done notification for unknown/inactive handle %d, %s mailbox seq no %d\n"

	.comm	_CX18_F_EWO_MB_STALE_UPON_RECEIPT,4,2 ## @CX18_F_EWO_MB_STALE_UPON_RECEIPT
L_.str.1:                               ## @.str.1
	.asciz	"stale"

L_.str.2:                               ## @.str.2
	.asciz	"good"

L_.str.3:                               ## @.str.3
	.asciz	"Fell behind! Ignoring stale mailbox with  inconsistent data. Lost MDL for mailbox seq no %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"DMA DONE for %s (MDL %d)\n"

L_.str.5:                               ## @.str.5
	.asciz	"Could not find MDL %d for stream %s\n"

L_.str.6:                               ## @.str.6
	.asciz	"%s recv bytesused = %d\n"

	.comm	_CX18_ENC_STREAM_TYPE_TS,8,3    ## @CX18_ENC_STREAM_TYPE_TS
	.comm	_CX18_ENC_STREAM_TYPE_PCM,8,3   ## @CX18_ENC_STREAM_TYPE_PCM
	.comm	_CX18_ENC_STREAM_TYPE_YUV,8,3   ## @CX18_ENC_STREAM_TYPE_YUV
	.comm	_CX18_ENC_STREAM_TYPE_IDX,8,3   ## @CX18_ENC_STREAM_TYPE_IDX
	.no_dead_strip	_epu_dma_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function epu_dma_done
_epu_dma_done:                          ; @epu_dma_done
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x1
	mov	x19, x0
	ldr	x8, [x1, #16]
	ldr	w22, [x8]
	mov	x1, x22
	bl	_cx18_handle_to_stream
	cbz	x0, LBB0_20
; %bb.1:
	mov	x20, x0
	ldr	x8, [x21, #16]
	ldr	w22, [x8, #8]
	cmp	w22, #1
	b.lt	LBB0_22
; %bb.2:
	ldr	x25, [x21, #8]
	add	x8, x20, #24
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	add	x23, x20, #28
Lloh0:
	adrp	x26, _CX18_F_EWO_MB_STALE_UPON_RECEIPT@GOTPAGE
Lloh1:
	ldr	x26, [x26, _CX18_F_EWO_MB_STALE_UPON_RECEIPT@GOTPAGEOFF]
Lloh2:
	adrp	x24, l_.str.4@PAGE
Lloh3:
	add	x24, x24, l_.str.4@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	x1, [sp]
Lloh4:
	adrp	x0, l_.str.5@PAGE
Lloh5:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x28
	bl	_CX18_WARN
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x25, #8
	subs	w22, w22, #1
	b.eq	LBB0_22
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w28, [x25]
	ldr	w8, [x21]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20]
	cmp	w28, w8
	b.lt	LBB0_21
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x20, #4]
	add	w8, w9, w8
	cmp	w28, w8
	b.ge	LBB0_21
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w2, [x25, #4]
	mov	x0, x20
	mov	x1, x28
	bl	_cx18_queue_get_mdl
	mov	x27, x0
	ldr	w1, [x20, #32]
	mov	x0, x24
	mov	x2, x28
	bl	_CX18_DEBUG_HI_DMA
	ldr	w1, [x20, #32]
	cbz	x27, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w2, [x27]
Lloh6:
	adrp	x0, l_.str.6@PAGE
Lloh7:
	add	x0, x0, l_.str.6@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_CX18_DEBUG_HI_DMA
	ldr	x8, [x20, #8]
Lloh8:
	adrp	x9, _CX18_ENC_STREAM_TYPE_TS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CX18_ENC_STREAM_TYPE_TS@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x27
	bl	_cx18_mdl_send_to_dvb
	b	LBB0_16
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh11:
	adrp	x9, _CX18_ENC_STREAM_TYPE_PCM@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CX18_ENC_STREAM_TYPE_PCM@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_19
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x27
	bl	_cx18_mdl_send_to_alsa
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh14:
	adrp	x9, _CX18_ENC_STREAM_TYPE_YUV@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CX18_ENC_STREAM_TYPE_YUV@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	mov	x0, x20
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x27
	bl	_cx18_mdl_send_to_videobuf
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x27
	mov	x2, x23
	bl	_cx18_enqueue
	b	LBB0_4
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x27
	ldr	x2, [sp, #24]                   ; 8-byte Folded Reload
	bl	_cx18_enqueue
	ldr	x8, [x20, #8]
Lloh17:
	adrp	x9, _CX18_ENC_STREAM_TYPE_IDX@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CX18_ENC_STREAM_TYPE_IDX@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_cx18_stream_rotate_idx_mdls
	b	LBB0_4
LBB0_19:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x27
	ldr	x2, [sp, #24]                   ; 8-byte Folded Reload
	bl	_cx18_enqueue
	b	LBB0_4
LBB0_20:
	ldr	w8, [x21]
Lloh20:
	adrp	x9, _CX18_F_EWO_MB_STALE_UPON_RECEIPT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CX18_F_EWO_MB_STALE_UPON_RECEIPT@GOTPAGEOFF]
Lloh22:
	adrp	x10, l_.str.1@PAGE
Lloh23:
	add	x10, x10, l_.str.1@PAGEOFF
Lloh24:
	ldr	w9, [x9]
Lloh25:
	adrp	x11, l_.str.2@PAGE
Lloh26:
	add	x11, x11, l_.str.2@PAGEOFF
	tst	w9, w8
	csel	x8, x11, x10, eq
	ldr	w9, [x21, #24]
	stp	x8, x9, [sp]
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_CX18_WARN
	b	LBB0_24
LBB0_21:
	ldr	w1, [x21, #24]
Lloh29:
	adrp	x0, l_.str.3@PAGE
Lloh30:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_CX18_WARN
LBB0_22:
	mov	x0, x20
	bl	_cx18_stream_load_fw_queue
	mov	x0, x19
	bl	_wake_up
	ldr	w8, [x20, #16]
	cmn	w8, #1
	b.eq	LBB0_24
; %bb.23:
	add	x0, x20, #20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_wake_up
LBB0_24:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Got DMA done notification for unknown/inactive handle %d, %s mailbox seq no %d\n"

	.comm	_CX18_F_EWO_MB_STALE_UPON_RECEIPT,4,2 ; @CX18_F_EWO_MB_STALE_UPON_RECEIPT
l_.str.1:                               ; @.str.1
	.asciz	"stale"

l_.str.2:                               ; @.str.2
	.asciz	"good"

l_.str.3:                               ; @.str.3
	.asciz	"Fell behind! Ignoring stale mailbox with  inconsistent data. Lost MDL for mailbox seq no %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"DMA DONE for %s (MDL %d)\n"

l_.str.5:                               ; @.str.5
	.asciz	"Could not find MDL %d for stream %s\n"

l_.str.6:                               ; @.str.6
	.asciz	"%s recv bytesused = %d\n"

	.comm	_CX18_ENC_STREAM_TYPE_TS,8,3    ; @CX18_ENC_STREAM_TYPE_TS
	.comm	_CX18_ENC_STREAM_TYPE_PCM,8,3   ; @CX18_ENC_STREAM_TYPE_PCM
	.comm	_CX18_ENC_STREAM_TYPE_YUV,8,3   ; @CX18_ENC_STREAM_TYPE_YUV
	.comm	_CX18_ENC_STREAM_TYPE_IDX,8,3   ; @CX18_ENC_STREAM_TYPE_IDX
	.no_dead_strip	_epu_dma_done
.subsections_via_symbols
