	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _dpu_encoder_phys_cmd_handle_ppdone_timeout
__dpu_encoder_phys_cmd_handle_ppdone_timeout: ## @_dpu_encoder_phys_cmd_handle_ppdone_timeout
	.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	%rdi, %rbx
	callq	_to_dpu_encoder_phys_cmd
	movq	_EINVAL@GOTPCREL(%rip), %r14
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.1:
	cmpq	$0, 32(%rbx)
	je	LBB0_10
## %bb.2:
	cmpq	$0, 24(%rbx)
	je	LBB0_10
## %bb.3:
	movq	%rax, %r15
	movq	_DPU_ENCODER_FRAME_EVENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%r15), %ecx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leal	1(%rcx), %r13d
	movl	%r13d, (%r15)
	movq	_PP_TIMEOUT_MAX_TRIALS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r14d, %r14d
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	cmpl	%ecx, %r13d
	jne	LBB0_5
## %bb.4:
	movq	_DPU_ENCODER_FRAME_EVENT_PANEL_DEAD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
LBB0_5:
	orl	%eax, %r14d
	movl	(%rbx), %edi
	callq	_DRMID
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	32(%rbx), %rax
	movq	(%rax), %r12
	movq	_PINGPONG_0@GOTPCREL(%rip), %rax
	subq	(%rax), %r12
	movl	(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	leaq	20(%rbx), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_atomic_read
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r12, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %ecx
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, %r8d
	callq	_trace_dpu_enc_phys_cmd_pdone_timeout
	cmpl	-52(%rbp), %r13d                ## 4-byte Folded Reload
	je	LBB0_7
## %bb.6:
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_8
LBB0_7:
	movl	(%rbx), %edi
	callq	_DRMID
	movl	%eax, %r14d
	movq	24(%rbx), %rax
	movq	32(%rbx), %rcx
	movq	(%rcx), %r12
	movq	_PINGPONG_0@GOTPCREL(%rip), %rcx
	subq	(%rcx), %r12
	movq	(%rax), %r13
	movq	_CTL_0@GOTPCREL(%rip), %rax
	subq	(%rax), %r13
	movl	(%r15), %r15d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_read
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	movq	%r13, %rcx
	movl	%r15d, %r8d
	movl	%eax, %r9d
	callq	_DRM_ERROR
	movq	_INTR_IDX_RDPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dpu_encoder_helper_unregister_irq
LBB0_8:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	$-1, %esi
	xorl	%edx, %edx
	callq	_atomic_add_unless
	movq	_DPU_ENC_ERR_NEEDS_HW_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	8(%rbx), %rax
	movq	(%rax), %rcx
	movq	_ETIMEDOUT@GOTPCREL(%rip), %r14
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:
	movl	(%rbx), %edi
	movq	%rbx, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	*%rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%r14), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DPU_ENCODER_FRAME_EVENT_ERROR,4,2 ## @DPU_ENCODER_FRAME_EVENT_ERROR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PP_TIMEOUT_MAX_TRIALS,4,2      ## @PP_TIMEOUT_MAX_TRIALS
	.comm	_DPU_ENCODER_FRAME_EVENT_PANEL_DEAD,4,2 ## @DPU_ENCODER_FRAME_EVENT_PANEL_DEAD
	.comm	_PINGPONG_0,8,3                 ## @PINGPONG_0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"id:%d pp:%d kickoff timeout %d cnt %d koff_cnt %d\n"

	.comm	_CTL_0,8,3                      ## @CTL_0
	.comm	_INTR_IDX_RDPTR,4,2             ## @INTR_IDX_RDPTR
	.comm	_DPU_ENC_ERR_NEEDS_HW_RESET,4,2 ## @DPU_ENC_ERR_NEEDS_HW_RESET
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	__dpu_encoder_phys_cmd_handle_ppdone_timeout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _dpu_encoder_phys_cmd_handle_ppdone_timeout
__dpu_encoder_phys_cmd_handle_ppdone_timeout: ; @_dpu_encoder_phys_cmd_handle_ppdone_timeout
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_to_dpu_encoder_phys_cmd
	cbz	x19, LBB0_8
; %bb.1:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_8
; %bb.2:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_8
; %bb.3:
	mov	x21, x0
Lloh0:
	adrp	x8, _DPU_ENCODER_FRAME_EVENT_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DPU_ENCODER_FRAME_EVENT_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w27, [x0]
	add	w28, w27, #1
	str	w28, [x0]
Lloh3:
	adrp	x9, _PP_TIMEOUT_MAX_TRIALS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PP_TIMEOUT_MAX_TRIALS@GOTPAGEOFF]
Lloh5:
	adrp	x10, _DPU_ENCODER_FRAME_EVENT_PANEL_DEAD@GOTPAGE
Lloh6:
	ldr	x10, [x10, _DPU_ENCODER_FRAME_EVENT_PANEL_DEAD@GOTPAGEOFF]
Lloh7:
	ldr	w26, [x9]
Lloh8:
	ldr	w9, [x10]
	cmp	w28, w26
	csel	w9, w9, wzr, eq
	orr	w20, w9, w8
	ldr	w0, [x19]
	bl	_DRMID
	mov	x23, x0
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _PINGPONG_0@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PINGPONG_0@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	sub	x24, x8, x9
	ldr	w25, [x21]
	add	x22, x19, #20
	mov	x0, x22
	bl	_atomic_read
	mov	x3, x0
	mov	x0, x23
	mov	x1, x24
	mov	x2, x25
	mov	x4, x20
	bl	_trace_dpu_enc_phys_cmd_pdone_timeout
	cmp	w28, w26
	ccmp	w27, #0, #4, ne
	b.ne	LBB0_5
; %bb.4:
	ldr	w0, [x19]
	bl	_DRMID
	mov	x23, x0
	ldp	x9, x8, [x19, #24]
	ldr	x8, [x8]
Lloh12:
	adrp	x10, _PINGPONG_0@GOTPAGE
Lloh13:
	ldr	x10, [x10, _PINGPONG_0@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	sub	x24, x8, x10
	ldr	x8, [x9]
Lloh15:
	adrp	x9, _CTL_0@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CTL_0@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	sub	x25, x8, x9
	ldr	w21, [x21]
	mov	x0, x22
	bl	_atomic_read
	mov	x5, x0
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	mov	x2, x24
	mov	x3, x25
	mov	x4, x21
	bl	_DRM_ERROR
Lloh20:
	adrp	x8, _INTR_IDX_RDPTR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _INTR_IDX_RDPTR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dpu_encoder_helper_unregister_irq
LBB0_5:
	mov	x0, x22
	mov	w1, #-1
	mov	w2, #0
	bl	_atomic_add_unless
Lloh23:
	adrp	x8, _DPU_ENC_ERR_NEEDS_HW_RESET@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DPU_ENC_ERR_NEEDS_HW_RESET@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w0, [x19]
	mov	x1, x19
	mov	x2, x20
	blr	x8
LBB0_7:
Lloh26:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh28:
	adrp	x8, _EINVAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_DPU_ENCODER_FRAME_EVENT_ERROR,4,2 ; @DPU_ENCODER_FRAME_EVENT_ERROR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PP_TIMEOUT_MAX_TRIALS,4,2      ; @PP_TIMEOUT_MAX_TRIALS
	.comm	_DPU_ENCODER_FRAME_EVENT_PANEL_DEAD,4,2 ; @DPU_ENCODER_FRAME_EVENT_PANEL_DEAD
	.comm	_PINGPONG_0,8,3                 ; @PINGPONG_0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"id:%d pp:%d kickoff timeout %d cnt %d koff_cnt %d\n"

	.comm	_CTL_0,8,3                      ; @CTL_0
	.comm	_INTR_IDX_RDPTR,4,2             ; @INTR_IDX_RDPTR
	.comm	_DPU_ENC_ERR_NEEDS_HW_RESET,4,2 ; @DPU_ENC_ERR_NEEDS_HW_RESET
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	__dpu_encoder_phys_cmd_handle_ppdone_timeout
.subsections_via_symbols
