	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lima_pp_hard_reset
_lima_pp_hard_reset:                    ## @lima_pp_hard_reset
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movq	_LIMA_PP_PERF_CNT_0_LIMIT@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movl	$-1056972800, %esi              ## imm = 0xC0FFE000
	callq	_pp_write
	movq	_LIMA_PP_INT_MASK@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_pp_write
	movq	_LIMA_PP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LIMA_PP_CTRL_FORCE_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pp_write
	movq	_lima_pp_hard_reset_poll@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$10, %edx
	movl	$100, %ecx
	callq	_lima_poll_timeout
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_3
LBB0_2:
	movl	(%r12), %edi
	xorl	%esi, %esi
	callq	_pp_write
	movq	_LIMA_PP_INT_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LIMA_PP_IRQ_MASK_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pp_write
	movl	(%r14), %edi
	movq	_LIMA_PP_IRQ_MASK_USED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pp_write
LBB0_3:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LIMA_PP_PERF_CNT_0_LIMIT,4,2   ## @LIMA_PP_PERF_CNT_0_LIMIT
	.comm	_LIMA_PP_INT_MASK,4,2           ## @LIMA_PP_INT_MASK
	.comm	_LIMA_PP_CTRL,4,2               ## @LIMA_PP_CTRL
	.comm	_LIMA_PP_CTRL_FORCE_RESET,4,2   ## @LIMA_PP_CTRL_FORCE_RESET
	.comm	_lima_pp_hard_reset_poll,4,2    ## @lima_pp_hard_reset_poll
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pp hard reset timeout\n"

	.comm	_LIMA_PP_INT_CLEAR,4,2          ## @LIMA_PP_INT_CLEAR
	.comm	_LIMA_PP_IRQ_MASK_ALL,4,2       ## @LIMA_PP_IRQ_MASK_ALL
	.comm	_LIMA_PP_IRQ_MASK_USED,4,2      ## @LIMA_PP_IRQ_MASK_USED
	.no_dead_strip	_lima_pp_hard_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lima_pp_hard_reset
_lima_pp_hard_reset:                    ; @lima_pp_hard_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x22, _LIMA_PP_PERF_CNT_0_LIMIT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _LIMA_PP_PERF_CNT_0_LIMIT@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	w1, #57344
	movk	w1, #49407, lsl #16
	bl	_pp_write
Lloh2:
	adrp	x20, _LIMA_PP_INT_MASK@GOTPAGE
Lloh3:
	ldr	x20, [x20, _LIMA_PP_INT_MASK@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	w1, #0
	bl	_pp_write
Lloh4:
	adrp	x8, _LIMA_PP_CTRL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _LIMA_PP_CTRL@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x8, _LIMA_PP_CTRL_FORCE_RESET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LIMA_PP_CTRL_FORCE_RESET@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_pp_write
Lloh10:
	adrp	x8, _lima_pp_hard_reset_poll@GOTPAGE
Lloh11:
	ldr	x8, [x8, _lima_pp_hard_reset_poll@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #10
	mov	w3, #100
	bl	_lima_poll_timeout
	mov	x19, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x21]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_3
LBB0_2:
	ldr	w0, [x22]
	mov	w1, #0
	bl	_pp_write
Lloh15:
	adrp	x8, _LIMA_PP_INT_CLEAR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LIMA_PP_INT_CLEAR@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _LIMA_PP_IRQ_MASK_ALL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LIMA_PP_IRQ_MASK_ALL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_pp_write
	ldr	w0, [x20]
Lloh21:
	adrp	x8, _LIMA_PP_IRQ_MASK_USED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LIMA_PP_IRQ_MASK_USED@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_pp_write
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_LIMA_PP_PERF_CNT_0_LIMIT,4,2   ; @LIMA_PP_PERF_CNT_0_LIMIT
	.comm	_LIMA_PP_INT_MASK,4,2           ; @LIMA_PP_INT_MASK
	.comm	_LIMA_PP_CTRL,4,2               ; @LIMA_PP_CTRL
	.comm	_LIMA_PP_CTRL_FORCE_RESET,4,2   ; @LIMA_PP_CTRL_FORCE_RESET
	.comm	_lima_pp_hard_reset_poll,4,2    ; @lima_pp_hard_reset_poll
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pp hard reset timeout\n"

	.comm	_LIMA_PP_INT_CLEAR,4,2          ; @LIMA_PP_INT_CLEAR
	.comm	_LIMA_PP_IRQ_MASK_ALL,4,2       ; @LIMA_PP_IRQ_MASK_ALL
	.comm	_LIMA_PP_IRQ_MASK_USED,4,2      ; @LIMA_PP_IRQ_MASK_USED
	.no_dead_strip	_lima_pp_hard_reset
.subsections_via_symbols
