	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpu_encoder_phys_vid_wait_for_vblank
_dpu_encoder_phys_vid_wait_for_vblank:  ## @dpu_encoder_phys_vid_wait_for_vblank
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	leaq	4(%rdi), %rax
	movq	%rax, -32(%rbp)
	movq	%rdi, -40(%rbp)
	movq	_KICKOFF_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	callq	_dpu_encoder_phys_vid_is_master
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_INTR_IDX_VSYNC@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_dpu_encoder_helper_wait_for_irq
	movl	%eax, %r14d
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	%r14d, %ecx
	addl	(%rax), %ecx
	jne	LBB0_6
## %bb.5:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_dpu_encoder_helper_report_irq_timeout
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_6
LBB0_3:
	xorl	%r14d, %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid encoder\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_KICKOFF_TIMEOUT_MS,4,2         ## @KICKOFF_TIMEOUT_MS
	.comm	_INTR_IDX_VSYNC,4,2             ## @INTR_IDX_VSYNC
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_dpu_encoder_phys_vid_wait_for_vblank
.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_vid_wait_for_vblank
_dpu_encoder_phys_vid_wait_for_vblank:  ; @dpu_encoder_phys_vid_wait_for_vblank
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	add	x8, x0, #4
	stp	x0, x8, [sp, #16]
Lloh0:
	adrp	x8, _KICKOFF_TIMEOUT_MS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KICKOFF_TIMEOUT_MS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	bl	_dpu_encoder_phys_vid_is_master
	cbz	w0, LBB0_5
; %bb.2:
Lloh3:
	adrp	x21, _INTR_IDX_VSYNC@GOTPAGE
Lloh4:
	ldr	x21, [x21, _INTR_IDX_VSYNC@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_dpu_encoder_helper_wait_for_irq
	mov	x20, x0
Lloh5:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_6
; %bb.3:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_dpu_encoder_helper_report_irq_timeout
	b	LBB0_6
LBB0_4:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid encoder\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_KICKOFF_TIMEOUT_MS,4,2         ; @KICKOFF_TIMEOUT_MS
	.comm	_INTR_IDX_VSYNC,4,2             ; @INTR_IDX_VSYNC
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_dpu_encoder_phys_vid_wait_for_vblank
.subsections_via_symbols
