	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpu_encoder_resource_control
_dpu_encoder_resource_control:          ## @dpu_encoder_resource_control
	.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	$24, %rsp
	.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_10
## %bb.1:
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.3:
	cmpl	$0, (%r13)
	je	LBB0_10
## %bb.4:
	movl	%esi, %ebx
	movq	%r13, %rdi
	callq	_to_dpu_encoder_virt
	movq	%rax, %r12
	movq	8(%r13), %rax
	movq	_MSM_DISPLAY_CAP_VID_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	32(%r12), %ecx
	movq	(%rax), %rax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leal	-128(%rbx), %r14d
	xorl	%r15d, %r15d
	cmpl	$3, %r14d
	jb	LBB0_6
## %bb.5:
	cmpl	$0, 4(%r12)
	je	LBB0_12
LBB0_6:
	movq	%rax, %rbx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_DRMID
	movl	(%r12), %ecx
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	4(%r12), %edx
	leaq	L_.str.1(%rip), %r8
	movl	%eax, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_trace_dpu_enc_rc
	cmpl	$4, %r14d
	ja	LBB0_13
## %bb.7:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r14,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_8:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movl	(%r14), %ecx
	movq	_DPU_ENC_RC_STATE_OFF@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	cmpl	%eax, %ecx
	jne	LBB0_29
## %bb.9:
	movq	%r13, %rdi
	callq	_DRMID
	leaq	L_.str.11(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%eax, %esi
	movl	$128, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%rbx, %rdi
	callq	_mutex_unlock
	jmp	LBB0_12
LBB0_10:
	leaq	L_.str(%rip), %rdi
	callq	_DPU_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
LBB0_11:
	subl	(%rax), %r15d
LBB0_12:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r13, %rdi
	callq	_DRMID
	leaq	L_.str.17(%rip), %rdi
	movl	%eax, %esi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	%r13, %rdi
	callq	_DRMID
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %ecx
	movl	4(%r14), %edx
	leaq	L_.str.18(%rip), %r8
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_trace_dpu_enc_rc
	jmp	LBB0_60
LBB0_14:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	leaq	24(%r14), %rdi
	callq	_cancel_delayed_work_sync
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	$129, %edx
	callq	_DPU_DEBUG_ENC
LBB0_16:
	movq	%r14, %r12
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	(%r14), %eax
	movq	_DPU_ENC_RC_STATE_IDLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_31
## %bb.17:
	cmpl	%ecx, %eax
	jne	LBB0_31
## %bb.18:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	__dpu_encoder_irq_control
	jmp	LBB0_33
LBB0_19:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	leaq	24(%r14), %rdi
	callq	_cancel_delayed_work_sync
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	$130, %edx
	callq	_DPU_DEBUG_ENC
LBB0_21:
	movq	%r14, %r12
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	(%r14), %eax
	movq	_DPU_ENC_RC_STATE_ON@GOTPCREL(%rip), %r14
	cmpl	(%r14), %eax
	jne	LBB0_34
## %bb.22:
	movq	%r13, %rdi
	callq	_DRMID
	leaq	L_.str.3(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%eax, %esi
	movl	$130, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_47
LBB0_23:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %eax
	movq	_DPU_ENC_RC_STATE_ON@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_38
## %bb.24:
	movl	(%r13), %edi
	callq	_dpu_crtc_frame_pending
	cmpl	$2, %eax
	jl	LBB0_42
## %bb.25:
	movq	%r13, %rdi
	callq	_DRMID
	leaq	L_.str.7(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_12
LBB0_26:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %r12
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	(%r14), %eax
	movq	_DPU_ENC_RC_STATE_ON@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_40
## %bb.27:
	movq	16(%r14), %rax
	cmpl	$0, (%rax)
	je	LBB0_51
## %bb.28:
	movq	%r13, %rdi
	callq	_DRMID
	movl	(%r14), %ecx
	leaq	L_.str.15(%rip), %rdi
	jmp	LBB0_41
LBB0_29:
	movq	_DPU_ENC_RC_STATE_ON@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_43
## %bb.30:
	movq	%r13, %rdi
	callq	_DRMID
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
	leaq	L_.str.12(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%eax, %esi
	movl	$128, %edx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	%rbx, %rdi
	jmp	LBB0_37
LBB0_31:
	movq	_DPU_ENC_RC_STATE_OFF@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	je	LBB0_46
## %bb.32:
	cmpl	%ecx, %eax
	je	LBB0_46
LBB0_33:
	movq	_DPU_ENC_RC_STATE_PRE_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	%r13, %rdi
	callq	_DRMID
	movl	(%r14), %ecx
	movl	4(%r14), %edx
	leaq	L_.str.10(%rip), %r8
	movl	%eax, %edi
	movl	$129, %esi
	jmp	LBB0_57
LBB0_34:
	movq	_DPU_ENC_RC_STATE_OFF@GOTPCREL(%rip), %rdx
	movq	_DPU_ENC_RC_STATE_IDLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	(%rdx), %eax
	je	LBB0_48
## %bb.35:
	cmpl	%ecx, %eax
	je	LBB0_48
## %bb.36:
	movq	%r13, %rdi
	callq	_DRMID
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
	leaq	L_.str.4(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%eax, %esi
	movl	$130, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%r12, %rdi
LBB0_37:
	callq	_mutex_unlock
	jmp	LBB0_39
LBB0_38:
	movq	%r13, %rdi
	callq	_DRMID
	movl	(%r14), %ecx
	leaq	L_.str.6(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%eax, %esi
	movl	$131, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_39:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_40:
	movq	%r13, %rdi
	callq	_DRMID
	movl	(%r14), %ecx
	leaq	L_.str.14(%rip), %rdi
LBB0_41:
	xorl	%r15d, %r15d
	movl	%eax, %esi
	movl	$132, %edx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_47
LBB0_42:
	movl	(%rbx), %r12d
	movq	%r14, %rbx
	addq	$24, %rbx
	movl	28(%r14), %edi
	callq	_msecs_to_jiffies
	movl	%r12d, %edi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_queue_delayed_work
	movq	%r13, %rdi
	callq	_DRMID
	movl	(%r14), %ecx
	movl	4(%r14), %edx
	leaq	L_.str.8(%rip), %r8
	movl	%eax, %edi
	movl	$131, %esi
	callq	_trace_dpu_enc_rc
	jmp	LBB0_59
LBB0_43:
	movq	_DPU_ENC_RC_STATE_PRE_OFF@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_45
## %bb.44:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	__dpu_encoder_resource_control_helper
	movl	(%r14), %eax
LBB0_45:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, (%r14)
	movq	%r13, %rdi
	callq	_DRMID
	movl	(%r14), %ecx
	movl	4(%r14), %edx
	leaq	L_.str.13(%rip), %r8
	movl	%eax, %edi
	movl	$128, %esi
	callq	_trace_dpu_enc_rc
	movq	%rbx, %rdi
	jmp	LBB0_58
LBB0_46:
	movq	%r13, %rdi
	callq	_DRMID
	movl	(%r14), %ecx
	leaq	L_.str.9(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%eax, %esi
	movl	$129, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_47:
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_12
LBB0_48:
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_53
## %bb.49:
	cmpl	%ecx, %eax
	jne	LBB0_53
## %bb.50:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	__dpu_encoder_irq_control
	jmp	LBB0_54
LBB0_51:
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_55
## %bb.52:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	__dpu_encoder_irq_control
	jmp	LBB0_56
LBB0_53:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	__dpu_encoder_resource_control_helper
LBB0_54:
	movl	(%r14), %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, (%r14)
	movq	%r13, %rdi
	callq	_DRMID
	movl	(%r14), %ecx
	movl	4(%r14), %edx
	leaq	L_.str.5(%rip), %r8
	movl	%eax, %edi
	movl	$130, %esi
	jmp	LBB0_57
LBB0_55:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	__dpu_encoder_resource_control_helper
LBB0_56:
	movq	_DPU_ENC_RC_STATE_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	%r13, %rdi
	callq	_DRMID
	movl	(%r14), %ecx
	movl	4(%r14), %edx
	leaq	L_.str.16(%rip), %r8
	movl	%eax, %edi
	movl	$132, %esi
LBB0_57:
	callq	_trace_dpu_enc_rc
	movq	%r12, %rdi
LBB0_58:
	callq	_mutex_unlock
LBB0_59:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_60:
	movq	%r13, %rdi
	callq	_DRMID
	movl	(%r14), %ecx
	movl	4(%r14), %edx
	leaq	L_.str.19(%rip), %r8
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_trace_dpu_enc_rc
	jmp	LBB0_12
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_14
	.long	L0_0_set_19
	.long	L0_0_set_23
	.long	L0_0_set_26
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid parameters\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MSM_DISPLAY_CAP_VID_MODE,4,2   ## @MSM_DISPLAY_CAP_VID_MODE
L_.str.1:                               ## @.str.1
	.asciz	"begin"

L_.str.2:                               ## @.str.2
	.asciz	"sw_event:%d, work cancelled\n"

	.comm	_DPU_ENC_RC_STATE_ON,4,2        ## @DPU_ENC_RC_STATE_ON
L_.str.3:                               ## @.str.3
	.asciz	"id;%u, sw_event:%d, rc in ON state\n"

	.comm	_DPU_ENC_RC_STATE_OFF,4,2       ## @DPU_ENC_RC_STATE_OFF
	.comm	_DPU_ENC_RC_STATE_IDLE,4,2      ## @DPU_ENC_RC_STATE_IDLE
L_.str.4:                               ## @.str.4
	.asciz	"id;%u, sw_event:%d, rc in state %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"kickoff"

L_.str.6:                               ## @.str.6
	.asciz	"id:%d, sw_event:%d,rc:%d-unexpected\n"

L_.str.7:                               ## @.str.7
	.asciz	"id:%d skip schedule work\n"

L_.str.8:                               ## @.str.8
	.asciz	"frame done"

L_.str.9:                               ## @.str.9
	.asciz	"id:%u, sw_event:%d, rc in %d state\n"

	.comm	_DPU_ENC_RC_STATE_PRE_OFF,4,2   ## @DPU_ENC_RC_STATE_PRE_OFF
L_.str.10:                              ## @.str.10
	.asciz	"pre stop"

L_.str.11:                              ## @.str.11
	.asciz	"id: %u, sw_event:%d, rc in OFF state\n"

L_.str.12:                              ## @.str.12
	.asciz	"id: %u, sw_event:%d, rc in state %d\n"

L_.str.13:                              ## @.str.13
	.asciz	"stop"

L_.str.14:                              ## @.str.14
	.asciz	"id: %u, sw_event:%d, rc:%d !ON state\n"

L_.str.15:                              ## @.str.15
	.asciz	"id:%u, sw_event:%d, rc:%d frame pending\n"

L_.str.16:                              ## @.str.16
	.asciz	"idle"

L_.str.17:                              ## @.str.17
	.asciz	"id:%u, unexpected sw_event: %d\n"

L_.str.18:                              ## @.str.18
	.asciz	"error"

L_.str.19:                              ## @.str.19
	.asciz	"end"

	.no_dead_strip	_dpu_encoder_resource_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpu_encoder_resource_control
_dpu_encoder_resource_control:          ; @dpu_encoder_resource_control
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_10
; %bb.2:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.3:
	ldr	w8, [x20]
	cbz	w8, LBB0_10
; %bb.4:
	mov	x21, x1
	mov	x0, x20
	bl	_to_dpu_encoder_virt
	mov	x19, x0
	ldr	x8, [x20, #8]
	ldr	x22, [x8]
	ldr	w23, [x0, #32]
Lloh0:
	adrp	x8, _MSM_DISPLAY_CAP_VID_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSM_DISPLAY_CAP_VID_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
	sub	w24, w21, #128
	cmp	w24, #3
	b.lo	LBB0_6
; %bb.5:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_60
LBB0_6:
	mov	x0, x20
	bl	_DRMID
	ldp	w3, w2, [x19]
Lloh3:
	adrp	x4, l_.str.1@PAGE
Lloh4:
	add	x4, x4, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_trace_dpu_enc_rc
	cmp	w24, #4
	b.hi	LBB0_13
; %bb.7:
	and	w23, w25, w23
Lloh5:
	adrp	x8, lJTI0_0@PAGE
Lloh6:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x9, LBB0_8
	ldrb	w10, [x8, x24]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_8:
	add	x22, x19, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	w9, [x19]
Lloh7:
	adrp	x23, _DPU_ENC_RC_STATE_OFF@GOTPAGE
Lloh8:
	ldr	x23, [x23, _DPU_ENC_RC_STATE_OFF@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w9, w8
	b.ne	LBB0_29
; %bb.9:
	mov	x0, x20
	bl	_DRMID
	mov	x1, x0
	mov	w8, #128
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str.11@PAGE
Lloh10:
	add	x0, x0, l_.str.11@PAGEOFF
	b	LBB0_47
LBB0_10:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPU_ERROR
LBB0_11:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
	mov	x0, x20
	bl	_DRMID
	mov	x1, x0
Lloh16:
	adrp	x0, l_.str.17@PAGE
Lloh17:
	add	x0, x0, l_.str.17@PAGEOFF
	mov	x2, x21
	bl	_DRM_ERROR
	mov	x0, x20
	bl	_DRMID
	ldp	w3, w2, [x19]
Lloh18:
	adrp	x4, l_.str.18@PAGE
Lloh19:
	add	x4, x4, l_.str.18@PAGEOFF
	mov	x1, x21
	b	LBB0_42
LBB0_14:
	add	x0, x19, #24
	bl	_cancel_delayed_work_sync
	cbz	w0, LBB0_16
; %bb.15:
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w2, #129
	bl	_DPU_DEBUG_ENC
LBB0_16:
	add	x22, x19, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	w8, [x19]
Lloh22:
	adrp	x9, _DPU_ENC_RC_STATE_IDLE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _DPU_ENC_RC_STATE_IDLE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	cbz	w23, LBB0_31
; %bb.17:
	cmp	w8, w9
	b.ne	LBB0_31
; %bb.18:
	mov	x0, x20
	mov	w1, #1
	bl	__dpu_encoder_irq_control
	b	LBB0_33
LBB0_19:
	add	x0, x19, #24
	bl	_cancel_delayed_work_sync
	cbz	w0, LBB0_21
; %bb.20:
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w2, #130
	bl	_DPU_DEBUG_ENC
LBB0_21:
	add	x22, x19, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	w8, [x19]
Lloh27:
	adrp	x24, _DPU_ENC_RC_STATE_ON@GOTPAGE
Lloh28:
	ldr	x24, [x24, _DPU_ENC_RC_STATE_ON@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_34
; %bb.22:
	mov	x0, x20
	bl	_DRMID
	mov	x1, x0
	mov	w8, #130
	str	x8, [sp]
Lloh29:
	adrp	x0, l_.str.3@PAGE
Lloh30:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_47
LBB0_23:
	ldr	w8, [x19]
Lloh31:
	adrp	x9, _DPU_ENC_RC_STATE_ON@GOTPAGE
Lloh32:
	ldr	x9, [x9, _DPU_ENC_RC_STATE_ON@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_38
; %bb.24:
	ldr	w0, [x20]
	bl	_dpu_crtc_frame_pending
	cmp	w0, #2
	b.lt	LBB0_41
; %bb.25:
	mov	x0, x20
	bl	_DRMID
	mov	x1, x0
Lloh34:
	adrp	x0, l_.str.7@PAGE
Lloh35:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_DRM_DEBUG_KMS
	b	LBB0_60
LBB0_26:
	add	x22, x19, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	w8, [x19]
Lloh36:
	adrp	x9, _DPU_ENC_RC_STATE_ON@GOTPAGE
Lloh37:
	ldr	x9, [x9, _DPU_ENC_RC_STATE_ON@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_39
; %bb.27:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	cbz	w8, LBB0_52
; %bb.28:
	mov	x0, x20
	bl	_DRMID
	mov	x1, x0
	ldr	w8, [x19]
	str	x8, [sp]
Lloh39:
	adrp	x0, l_.str.15@PAGE
Lloh40:
	add	x0, x0, l_.str.15@PAGEOFF
	b	LBB0_40
LBB0_29:
Lloh41:
	adrp	x10, _DPU_ENC_RC_STATE_ON@GOTPAGE
Lloh42:
	ldr	x10, [x10, _DPU_ENC_RC_STATE_ON@GOTPAGEOFF]
Lloh43:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_43
; %bb.30:
	mov	x0, x20
	bl	_DRMID
	mov	x1, x0
	ldr	w8, [x19]
	str	x8, [sp]
Lloh44:
	adrp	x0, l_.str.12@PAGE
Lloh45:
	add	x0, x0, l_.str.12@PAGEOFF
	mov	w2, #128
	bl	_DRM_ERROR
	b	LBB0_37
LBB0_31:
Lloh46:
	adrp	x10, _DPU_ENC_RC_STATE_OFF@GOTPAGE
Lloh47:
	ldr	x10, [x10, _DPU_ENC_RC_STATE_OFF@GOTPAGEOFF]
Lloh48:
	ldr	w10, [x10]
	cmp	w8, w10
	b.eq	LBB0_46
; %bb.32:
	cmp	w8, w9
	b.eq	LBB0_46
LBB0_33:
Lloh49:
	adrp	x8, _DPU_ENC_RC_STATE_PRE_OFF@GOTPAGE
Lloh50:
	ldr	x8, [x8, _DPU_ENC_RC_STATE_PRE_OFF@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x0, x20
	bl	_DRMID
	ldp	w3, w2, [x19]
Lloh52:
	adrp	x4, l_.str.10@PAGE
Lloh53:
	add	x4, x4, l_.str.10@PAGEOFF
	mov	w1, #129
	b	LBB0_58
LBB0_34:
Lloh54:
	adrp	x9, _DPU_ENC_RC_STATE_OFF@GOTPAGE
Lloh55:
	ldr	x9, [x9, _DPU_ENC_RC_STATE_OFF@GOTPAGEOFF]
Lloh56:
	ldr	w10, [x9]
Lloh57:
	adrp	x9, _DPU_ENC_RC_STATE_IDLE@GOTPAGE
Lloh58:
	ldr	x9, [x9, _DPU_ENC_RC_STATE_IDLE@GOTPAGEOFF]
Lloh59:
	ldr	w9, [x9]
	cmp	w8, w10
	b.eq	LBB0_49
; %bb.35:
	cmp	w8, w9
	b.eq	LBB0_49
; %bb.36:
	mov	x0, x20
	bl	_DRMID
	mov	x1, x0
	ldr	w8, [x19]
	mov	w9, #130
	stp	x9, x8, [sp]
Lloh60:
	adrp	x0, l_.str.4@PAGE
Lloh61:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_37:
	mov	x0, x22
	bl	_mutex_unlock
	b	LBB0_11
LBB0_38:
	mov	x0, x20
	bl	_DRMID
	mov	x1, x0
	ldr	w8, [x19]
	mov	w9, #131
	stp	x9, x8, [sp]
Lloh62:
	adrp	x0, l_.str.6@PAGE
Lloh63:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_DRM_DEBUG_KMS
	b	LBB0_11
LBB0_39:
	mov	x0, x20
	bl	_DRMID
	mov	x1, x0
	ldr	w8, [x19]
	str	x8, [sp]
Lloh64:
	adrp	x0, l_.str.14@PAGE
Lloh65:
	add	x0, x0, l_.str.14@PAGEOFF
LBB0_40:
	mov	w2, #132
	bl	_DRM_ERROR
	b	LBB0_48
LBB0_41:
	ldr	w22, [x22]
	add	x23, x19, #24
	ldr	w0, [x19, #28]
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_queue_delayed_work
	mov	x0, x20
	bl	_DRMID
	ldp	w3, w2, [x19]
Lloh66:
	adrp	x4, l_.str.8@PAGE
Lloh67:
	add	x4, x4, l_.str.8@PAGEOFF
	mov	w1, #131
LBB0_42:
	bl	_trace_dpu_enc_rc
	b	LBB0_59
LBB0_43:
Lloh68:
	adrp	x10, _DPU_ENC_RC_STATE_PRE_OFF@GOTPAGE
Lloh69:
	ldr	x10, [x10, _DPU_ENC_RC_STATE_PRE_OFF@GOTPAGEOFF]
Lloh70:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_45
; %bb.44:
	mov	x0, x20
	mov	w1, #0
	bl	__dpu_encoder_resource_control_helper
	ldr	w8, [x23]
LBB0_45:
	str	w8, [x19]
	mov	x0, x20
	bl	_DRMID
	ldp	w3, w2, [x19]
Lloh71:
	adrp	x4, l_.str.13@PAGE
Lloh72:
	add	x4, x4, l_.str.13@PAGEOFF
	mov	w1, #128
	b	LBB0_58
LBB0_46:
	mov	x0, x20
	bl	_DRMID
	mov	x1, x0
	ldr	w8, [x19]
	mov	w9, #129
	stp	x9, x8, [sp]
Lloh73:
	adrp	x0, l_.str.9@PAGE
Lloh74:
	add	x0, x0, l_.str.9@PAGEOFF
LBB0_47:
	bl	_DRM_DEBUG_KMS
LBB0_48:
	mov	x0, x22
	bl	_mutex_unlock
	b	LBB0_60
LBB0_49:
	cbz	w23, LBB0_54
; %bb.50:
	cmp	w8, w9
	b.ne	LBB0_54
; %bb.51:
	mov	x0, x20
	mov	w1, #1
	bl	__dpu_encoder_irq_control
	b	LBB0_55
LBB0_52:
	mov	x0, x20
	mov	w1, #0
	cbz	w23, LBB0_56
; %bb.53:
	bl	__dpu_encoder_irq_control
	b	LBB0_57
LBB0_54:
	mov	x0, x20
	mov	w1, #1
	bl	__dpu_encoder_resource_control_helper
LBB0_55:
	ldr	w8, [x24]
	str	w8, [x19]
	mov	x0, x20
	bl	_DRMID
	ldp	w3, w2, [x19]
Lloh75:
	adrp	x4, l_.str.5@PAGE
Lloh76:
	add	x4, x4, l_.str.5@PAGEOFF
	mov	w1, #130
	b	LBB0_58
LBB0_56:
	bl	__dpu_encoder_resource_control_helper
LBB0_57:
Lloh77:
	adrp	x8, _DPU_ENC_RC_STATE_IDLE@GOTPAGE
Lloh78:
	ldr	x8, [x8, _DPU_ENC_RC_STATE_IDLE@GOTPAGEOFF]
Lloh79:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x0, x20
	bl	_DRMID
	ldp	w3, w2, [x19]
Lloh80:
	adrp	x4, l_.str.16@PAGE
Lloh81:
	add	x4, x4, l_.str.16@PAGEOFF
	mov	w1, #132
LBB0_58:
	bl	_trace_dpu_enc_rc
	mov	x0, x22
	bl	_mutex_unlock
LBB0_59:
	mov	x0, x20
	bl	_DRMID
	ldp	w3, w2, [x19]
Lloh82:
	adrp	x4, l_.str.19@PAGE
Lloh83:
	add	x4, x4, l_.str.19@PAGEOFF
	mov	x1, x21
	bl	_trace_dpu_enc_rc
LBB0_60:
	mov	w0, #0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpAdd	Lloh71, Lloh72
	.loh AdrpAdd	Lloh73, Lloh74
	.loh AdrpAdd	Lloh75, Lloh76
	.loh AdrpAdd	Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpAdd	Lloh82, Lloh83
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_14-LBB0_8)>>2
	.byte	(LBB0_19-LBB0_8)>>2
	.byte	(LBB0_23-LBB0_8)>>2
	.byte	(LBB0_26-LBB0_8)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid parameters\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MSM_DISPLAY_CAP_VID_MODE,4,2   ; @MSM_DISPLAY_CAP_VID_MODE
l_.str.1:                               ; @.str.1
	.asciz	"begin"

l_.str.2:                               ; @.str.2
	.asciz	"sw_event:%d, work cancelled\n"

	.comm	_DPU_ENC_RC_STATE_ON,4,2        ; @DPU_ENC_RC_STATE_ON
l_.str.3:                               ; @.str.3
	.asciz	"id;%u, sw_event:%d, rc in ON state\n"

	.comm	_DPU_ENC_RC_STATE_OFF,4,2       ; @DPU_ENC_RC_STATE_OFF
	.comm	_DPU_ENC_RC_STATE_IDLE,4,2      ; @DPU_ENC_RC_STATE_IDLE
l_.str.4:                               ; @.str.4
	.asciz	"id;%u, sw_event:%d, rc in state %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"kickoff"

l_.str.6:                               ; @.str.6
	.asciz	"id:%d, sw_event:%d,rc:%d-unexpected\n"

l_.str.7:                               ; @.str.7
	.asciz	"id:%d skip schedule work\n"

l_.str.8:                               ; @.str.8
	.asciz	"frame done"

l_.str.9:                               ; @.str.9
	.asciz	"id:%u, sw_event:%d, rc in %d state\n"

	.comm	_DPU_ENC_RC_STATE_PRE_OFF,4,2   ; @DPU_ENC_RC_STATE_PRE_OFF
l_.str.10:                              ; @.str.10
	.asciz	"pre stop"

l_.str.11:                              ; @.str.11
	.asciz	"id: %u, sw_event:%d, rc in OFF state\n"

l_.str.12:                              ; @.str.12
	.asciz	"id: %u, sw_event:%d, rc in state %d\n"

l_.str.13:                              ; @.str.13
	.asciz	"stop"

l_.str.14:                              ; @.str.14
	.asciz	"id: %u, sw_event:%d, rc:%d !ON state\n"

l_.str.15:                              ; @.str.15
	.asciz	"id:%u, sw_event:%d, rc:%d frame pending\n"

l_.str.16:                              ; @.str.16
	.asciz	"idle"

l_.str.17:                              ; @.str.17
	.asciz	"id:%u, unexpected sw_event: %d\n"

l_.str.18:                              ; @.str.18
	.asciz	"error"

l_.str.19:                              ; @.str.19
	.asciz	"end"

	.no_dead_strip	_dpu_encoder_resource_control
.subsections_via_symbols
