	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpu_hw_ctl_wait_reset_status
_dpu_hw_ctl_wait_reset_status:          ## @dpu_hw_ctl_wait_reset_status
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	addq	$4, %rdi
	movq	_CTL_SW_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DPU_REG_READ
	xorl	%r14d, %r14d
	testb	$1, %al
	je	LBB0_3
## %bb.1:
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	movq	_DPU_REG_RESET_TIMEOUT_US@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dpu_hw_ctl_poll_reset_status
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CTL_SW_RESET,4,2               ## @CTL_SW_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hw ctl reset is set for ctl:%d\n"

	.comm	_DPU_REG_RESET_TIMEOUT_US,4,2   ## @DPU_REG_RESET_TIMEOUT_US
L_.str.1:                               ## @.str.1
	.asciz	"hw recovery is not complete for ctl:%d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_dpu_hw_ctl_wait_reset_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpu_hw_ctl_wait_reset_status
_dpu_hw_ctl_wait_reset_status:          ; @dpu_hw_ctl_wait_reset_status
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x0, x0, #4
Lloh0:
	adrp	x8, _CTL_SW_RESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CTL_SW_RESET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_DPU_REG_READ
	tbnz	w0, #0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_4
LBB0_2:
	ldr	w1, [x19]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
Lloh5:
	adrp	x8, _DPU_REG_RESET_TIMEOUT_US@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DPU_REG_RESET_TIMEOUT_US@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dpu_hw_ctl_poll_reset_status
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w1, [x19]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_CTL_SW_RESET,4,2               ; @CTL_SW_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hw ctl reset is set for ctl:%d\n"

	.comm	_DPU_REG_RESET_TIMEOUT_US,4,2   ; @DPU_REG_RESET_TIMEOUT_US
l_.str.1:                               ; @.str.1
	.asciz	"hw recovery is not complete for ctl:%d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_dpu_hw_ctl_wait_reset_status
.subsections_via_symbols
