	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpu_encoder_phys_cmd_wait_for_vblank
_dpu_encoder_phys_cmd_wait_for_vblank:  ## @dpu_encoder_phys_cmd_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	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	callq	_to_dpu_encoder_phys_cmd
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_dpu_encoder_phys_cmd_is_master
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	%r14, %rax
	addq	$4, %rax
	movq	%rax, -24(%rbp)
	movq	%r14, -32(%rbp)
	movq	_KICKOFF_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	%r14, %rdi
	callq	_atomic_inc
	movq	_INTR_IDX_RDPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_dpu_encoder_helper_wait_for_irq
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_3:
	xorl	%eax, %eax
LBB0_5:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_KICKOFF_TIMEOUT_MS,4,2         ## @KICKOFF_TIMEOUT_MS
	.comm	_INTR_IDX_RDPTR,4,2             ## @INTR_IDX_RDPTR
	.no_dead_strip	_dpu_encoder_phys_cmd_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_cmd_wait_for_vblank
_dpu_encoder_phys_cmd_wait_for_vblank:  ; @dpu_encoder_phys_cmd_wait_for_vblank
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	bl	_to_dpu_encoder_phys_cmd
	mov	x20, x0
	mov	x0, x19
	bl	_dpu_encoder_phys_cmd_is_master
	cbz	w0, LBB0_4
; %bb.2:
	add	x8, x20, #4
	stp	x20, 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]
	mov	x0, x20
	bl	_atomic_inc
Lloh3:
	adrp	x8, _INTR_IDX_RDPTR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INTR_IDX_RDPTR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_dpu_encoder_helper_wait_for_irq
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_KICKOFF_TIMEOUT_MS,4,2         ; @KICKOFF_TIMEOUT_MS
	.comm	_INTR_IDX_RDPTR,4,2             ; @INTR_IDX_RDPTR
	.no_dead_strip	_dpu_encoder_phys_cmd_wait_for_vblank
.subsections_via_symbols
