	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpu_encoder_virt_disable
_dpu_encoder_virt_disable:              ## @dpu_encoder_virt_disable
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.3:
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.7:
	movq	%r15, %rdi
	callq	_to_dpu_encoder_virt
	movq	%rax, %r13
	leaq	L_.str.3(%rip), %rsi
	movq	%rax, %rdi
	callq	_DPU_DEBUG_ENC
	leaq	8(%r13), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	$0, (%r13)
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_to_dpu_kms
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_DRMID
	movl	%eax, %edi
	callq	_trace_dpu_enc_disable
	movq	_MSM_ENC_TX_COMPLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_dpu_encoder_wait_for_event
	movq	_DPU_ENC_RC_EVENT_PRE_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_dpu_encoder_resource_control
	movl	4(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.8:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	8(%rdi), %rcx
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	callq	*%rcx
	movl	4(%r13), %eax
	jmp	LBB0_12
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_13:
	leaq	28(%r13), %rdi
	xorl	%esi, %esi
	callq	_atomic_xchg
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movl	(%r15), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_DPU_ERROR
	movq	%r13, %rdi
	addq	$24, %rdi
	callq	_del_timer_sync
LBB0_15:
	movq	_DPU_ENC_RC_EVENT_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_dpu_encoder_resource_control
	movl	4(%r13), %edx
	testl	%edx, %edx
	jle	LBB0_33
## %bb.16:
	movq	16(%r13), %rcx
	leaq	-1(%rdx), %rsi
	movl	%edx, %eax
	andl	$3, %eax
	cmpq	$3, %rsi
	jae	LBB0_18
## %bb.17:
	xorl	%esi, %esi
LBB0_28:
	testq	%rax, %rax
	je	LBB0_33
## %bb.29:
	leaq	(%rcx,%rsi,8), %rcx
	xorl	%edx, %edx
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_30 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	je	LBB0_33
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	$0, (%rsi)
	jmp	LBB0_32
LBB0_33:
	leaq	L_.str.5(%rip), %rsi
	movq	%r13, %rdi
	callq	_DPU_DEBUG_ENC
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_dpu_rm_release
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
LBB0_2:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DPU_ERROR                      ## TAILCALL
LBB0_18:
	andl	$-4, %edx
	xorl	%esi, %esi
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_19 Depth=1
	addq	$4, %rsi
	cmpq	%rsi, %rdx
	je	LBB0_28
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	$0, (%rdi)
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	8(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	$0, (%rdi)
LBB0_23:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	16(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	$0, (%rdi)
LBB0_25:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	24(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	$0, (%rdi)
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid encoder\n"

L_.str.1:                               ## @.str.1
	.asciz	"invalid dev\n"

L_.str.2:                               ## @.str.2
	.asciz	"invalid dev_private\n"

L_.str.3:                               ## @.str.3
	.asciz	"\n"

	.comm	_MSM_ENC_TX_COMPLETE,4,2        ## @MSM_ENC_TX_COMPLETE
	.comm	_DPU_ENC_RC_EVENT_PRE_STOP,4,2  ## @DPU_ENC_RC_EVENT_PRE_STOP
L_.str.4:                               ## @.str.4
	.asciz	"enc%d timeout pending\n"

	.comm	_DPU_ENC_RC_EVENT_STOP,4,2      ## @DPU_ENC_RC_EVENT_STOP
L_.str.5:                               ## @.str.5
	.asciz	"encoder disabled\n"

	.no_dead_strip	_dpu_encoder_virt_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpu_encoder_virt_disable
_dpu_encoder_virt_disable:              ; @dpu_encoder_virt_disable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_18
; %bb.2:
	ldr	x8, [x8]
	cbz	x8, LBB0_19
; %bb.3:
	mov	x0, x19
	bl	_to_dpu_encoder_virt
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str.3@PAGE
Lloh1:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_DPU_DEBUG_ENC
	add	x20, x21, #8
	mov	x0, x20
	bl	_mutex_lock
	str	wzr, [x21]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_to_dpu_kms
	mov	x22, x0
	mov	x0, x19
	bl	_DRMID
	bl	_trace_dpu_enc_disable
Lloh2:
	adrp	x8, _MSM_ENC_TX_COMPLETE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MSM_ENC_TX_COMPLETE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dpu_encoder_wait_for_event
Lloh5:
	adrp	x8, _DPU_ENC_RC_EVENT_PRE_STOP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DPU_ENC_RC_EVENT_PRE_STOP@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dpu_encoder_resource_control
	ldr	w8, [x21, #4]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.4:
	mov	x23, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	cmp	x23, w8, sxtw
	b.ge	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21, #16]
	ldr	x0, [x9, x23, lsl #3]
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x0, #8]
	cbz	x9, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	blr	x9
	ldr	w8, [x21, #4]
	b	LBB0_5
LBB0_9:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_20
LBB0_10:
	add	x0, x21, #28
	mov	w1, #0
	bl	_atomic_xchg
	cbz	x0, LBB0_12
; %bb.11:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh10:
	adrp	x0, l_.str.4@PAGE
Lloh11:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DPU_ERROR
	add	x0, x21, #24
	bl	_del_timer_sync
LBB0_12:
Lloh12:
	adrp	x8, _DPU_ENC_RC_EVENT_STOP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DPU_ENC_RC_EVENT_STOP@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dpu_encoder_resource_control
	ldr	w8, [x21, #4]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.13:
	ldr	x9, [x21, #16]
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.eq	LBB0_17
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cbz	x10, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	str	xzr, [x10]
	b	LBB0_14
LBB0_17:
Lloh15:
	adrp	x1, l_.str.5@PAGE
Lloh16:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_DPU_DEBUG_ENC
	mov	x0, x22
	mov	x1, x19
	bl	_dpu_rm_release
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_mutex_unlock
LBB0_18:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_20
LBB0_19:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_20:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_DPU_ERROR
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid encoder\n"

l_.str.1:                               ; @.str.1
	.asciz	"invalid dev\n"

l_.str.2:                               ; @.str.2
	.asciz	"invalid dev_private\n"

l_.str.3:                               ; @.str.3
	.asciz	"\n"

	.comm	_MSM_ENC_TX_COMPLETE,4,2        ; @MSM_ENC_TX_COMPLETE
	.comm	_DPU_ENC_RC_EVENT_PRE_STOP,4,2  ; @DPU_ENC_RC_EVENT_PRE_STOP
l_.str.4:                               ; @.str.4
	.asciz	"enc%d timeout pending\n"

	.comm	_DPU_ENC_RC_EVENT_STOP,4,2      ; @DPU_ENC_RC_EVENT_STOP
l_.str.5:                               ; @.str.5
	.asciz	"encoder disabled\n"

	.no_dead_strip	_dpu_encoder_virt_disable
.subsections_via_symbols
