	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rpr0521_poweroff
_rpr0521_poweroff:                      ## @rpr0521_poweroff
	.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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	16(%rdi), %edi
	movq	_RPR0521_REG_MODE_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RPR0521_MODE_ALS_MASK@GOTPCREL(%rip), %rax
	movq	_RPR0521_MODE_PXS_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_RPR0521_MODE_ALS_DISABLE@GOTPCREL(%rip), %rax
	movq	_RPR0521_MODE_PXS_DISABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	$0, (%r14)
	movl	16(%r14), %edi
	movq	_RPR0521_REG_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_5
LBB0_3:
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RPR0521_REG_MODE_CTRL,4,2      ## @RPR0521_REG_MODE_CTRL
	.comm	_RPR0521_MODE_ALS_MASK,4,2      ## @RPR0521_MODE_ALS_MASK
	.comm	_RPR0521_MODE_PXS_MASK,4,2      ## @RPR0521_MODE_PXS_MASK
	.comm	_RPR0521_MODE_ALS_DISABLE,4,2   ## @RPR0521_MODE_ALS_DISABLE
	.comm	_RPR0521_MODE_PXS_DISABLE,4,2   ## @RPR0521_MODE_PXS_DISABLE
	.comm	_RPR0521_REG_INTERRUPT,4,2      ## @RPR0521_REG_INTERRUPT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to reset int pin.\n"

	.no_dead_strip	_rpr0521_poweroff
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rpr0521_poweroff
_rpr0521_poweroff:                      ; @rpr0521_poweroff
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w0, [x0, #16]
Lloh0:
	adrp	x8, _RPR0521_REG_MODE_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RPR0521_REG_MODE_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _RPR0521_MODE_ALS_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RPR0521_MODE_ALS_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _RPR0521_MODE_PXS_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _RPR0521_MODE_PXS_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _RPR0521_MODE_ALS_DISABLE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _RPR0521_MODE_ALS_DISABLE@GOTPAGEOFF]
	orr	w2, w9, w8
Lloh11:
	ldr	w8, [x10]
Lloh12:
	adrp	x9, _RPR0521_MODE_PXS_DISABLE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _RPR0521_MODE_PXS_DISABLE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w3, w9, w8
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_3
; %bb.1:
	str	xzr, [x19]
	ldr	w0, [x19, #16]
Lloh15:
	adrp	x8, _RPR0521_REG_INTERRUPT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RPR0521_REG_INTERRUPT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	x0, [x19, #8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_4
LBB0_3:
	mov	x20, x0
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_RPR0521_REG_MODE_CTRL,4,2      ; @RPR0521_REG_MODE_CTRL
	.comm	_RPR0521_MODE_ALS_MASK,4,2      ; @RPR0521_MODE_ALS_MASK
	.comm	_RPR0521_MODE_PXS_MASK,4,2      ; @RPR0521_MODE_PXS_MASK
	.comm	_RPR0521_MODE_ALS_DISABLE,4,2   ; @RPR0521_MODE_ALS_DISABLE
	.comm	_RPR0521_MODE_PXS_DISABLE,4,2   ; @RPR0521_MODE_PXS_DISABLE
	.comm	_RPR0521_REG_INTERRUPT,4,2      ; @RPR0521_REG_INTERRUPT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to reset int pin.\n"

	.no_dead_strip	_rpr0521_poweroff
.subsections_via_symbols
