	.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_ctl_start
__dpu_encoder_phys_cmd_wait_for_ctl_start: ## @_dpu_encoder_phys_cmd_wait_for_ctl_start
	.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
	movq	%rdi, %rbx
	callq	_to_dpu_encoder_phys_cmd
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	cmpl	$0, 8(%rbx)
	je	LBB0_2
## %bb.3:
	movq	%rax, %r14
	leaq	4(%rbx), %rax
	movq	%rax, -24(%rbp)
	movq	%rbx, -32(%rbp)
	movq	_KICKOFF_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	_INTR_IDX_CTL_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_dpu_encoder_helper_wait_for_irq
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	movl	%eax, %edx
	addl	(%rcx), %edx
	jne	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_DPU_ERROR_CMDENC
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_DPU_ERROR
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid argument(s)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_KICKOFF_TIMEOUT_MS,4,2         ## @KICKOFF_TIMEOUT_MS
	.comm	_INTR_IDX_CTL_START,4,2         ## @INTR_IDX_CTL_START
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.1:                               ## @.str.1
	.asciz	"ctl start interrupt wait failed\n"

	.no_dead_strip	__dpu_encoder_phys_cmd_wait_for_ctl_start
.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_ctl_start
__dpu_encoder_phys_cmd_wait_for_ctl_start: ; @_dpu_encoder_phys_cmd_wait_for_ctl_start
	.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
	mov	x20, x0
	bl	_to_dpu_encoder_phys_cmd
	cbz	x20, LBB0_4
; %bb.1:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_4
; %bb.2:
	mov	x19, x0
	add	x8, x20, #4
Lloh0:
	adrp	x9, _KICKOFF_TIMEOUT_MS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KICKOFF_TIMEOUT_MS@GOTPAGEOFF]
	stp	x20, x8, [sp, #16]
Lloh2:
	ldr	w8, [x9]
	str	w8, [sp, #8]
Lloh3:
	adrp	x8, _INTR_IDX_CTL_START@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INTR_IDX_CTL_START@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_dpu_encoder_helper_wait_for_irq
Lloh6:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_6
; %bb.3:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_DPU_ERROR_CMDENC
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPU_ERROR
LBB0_5:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid argument(s)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_KICKOFF_TIMEOUT_MS,4,2         ; @KICKOFF_TIMEOUT_MS
	.comm	_INTR_IDX_CTL_START,4,2         ; @INTR_IDX_CTL_START
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.1:                               ; @.str.1
	.asciz	"ctl start interrupt wait failed\n"

	.no_dead_strip	__dpu_encoder_phys_cmd_wait_for_ctl_start
.subsections_via_symbols
