	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_pmic_keys_lp_reset_setup
_mtk_pmic_keys_lp_reset_setup:          ## @mtk_pmic_keys_lp_reset_setup
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-20(%rbp), %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	$0, -20(%rbp)
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movl	-20(%rbp), %eax
LBB0_3:
	movq	_MTK_PMIC_RST_DU_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_MTK_PMIC_RST_DU_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movl	(%rbx), %edi
	shll	%cl, %eax
	movl	%r14d, %esi
	movl	%eax, %ecx
	callq	_regmap_update_bits
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	leaq	-24(%rbp), %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movl	$130, -24(%rbp)
LBB0_5:
	movl	(%rbx), %edi
	movq	_MTK_PMIC_PWRKEY_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %esi
	xorl	%ecx, %ecx
LBB0_6:
	callq	_regmap_update_bits
	movl	(%rbx), %edi
	movq	_MTK_PMIC_HOMEKEY_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %esi
	xorl	%ecx, %ecx
LBB0_12:
	callq	_regmap_update_bits
LBB0_13:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	movl	-24(%rbp), %eax
	cmpl	$128, %eax
	je	LBB0_11
## %bb.8:
	cmpl	$130, %eax
	je	LBB0_5
## %bb.9:
	cmpl	$129, %eax
	jne	LBB0_13
## %bb.10:
	movl	(%rbx), %edi
	movq	_MTK_PMIC_PWRKEY_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %esi
	movl	%ecx, %edx
	jmp	LBB0_6
LBB0_11:
	movl	(%rbx), %edi
	movq	_MTK_PMIC_PWRKEY_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %esi
	movl	%ecx, %edx
	callq	_regmap_update_bits
	movl	(%rbx), %edi
	movq	_MTK_PMIC_HOMEKEY_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %esi
	movl	%ecx, %edx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"power-off-time-sec"

	.comm	_MTK_PMIC_RST_DU_MASK,4,2       ## @MTK_PMIC_RST_DU_MASK
	.comm	_MTK_PMIC_RST_DU_SHIFT,4,2      ## @MTK_PMIC_RST_DU_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"mediatek,long-press-mode"

	.comm	_MTK_PMIC_PWRKEY_RST,4,2        ## @MTK_PMIC_PWRKEY_RST
	.comm	_MTK_PMIC_HOMEKEY_RST,4,2       ## @MTK_PMIC_HOMEKEY_RST
	.no_dead_strip	_mtk_pmic_keys_lp_reset_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_pmic_keys_lp_reset_setup
_mtk_pmic_keys_lp_reset_setup:          ; @mtk_pmic_keys_lp_reset_setup
	.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, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	bl	_of_property_read_u32
	cbz	w0, LBB0_2
; %bb.1:
	mov	w8, #0
	str	wzr, [sp, #8]
	b	LBB0_3
LBB0_2:
	ldr	w8, [sp, #8]
LBB0_3:
	ldr	w0, [x20]
Lloh2:
	adrp	x9, _MTK_PMIC_RST_DU_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MTK_PMIC_RST_DU_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _MTK_PMIC_RST_DU_SHIFT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MTK_PMIC_RST_DU_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	lsl	w2, w9, w10
	lsl	w3, w8, w10
	mov	x1, x19
	bl	_regmap_update_bits
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #12
	bl	_of_property_read_u32
	cbz	w0, LBB0_9
; %bb.4:
	mov	w8, #130
	str	w8, [sp, #12]
LBB0_5:
	ldr	w0, [x20]
Lloh10:
	adrp	x8, _MTK_PMIC_PWRKEY_RST@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MTK_PMIC_PWRKEY_RST@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x1, x19
	mov	w3, #0
LBB0_6:
	bl	_regmap_update_bits
	ldr	w0, [x20]
Lloh13:
	adrp	x8, _MTK_PMIC_HOMEKEY_RST@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MTK_PMIC_HOMEKEY_RST@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x1, x19
	mov	w3, #0
LBB0_7:
	bl	_regmap_update_bits
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_9:
	ldr	w8, [sp, #12]
	cmp	w8, #128
	b.eq	LBB0_13
; %bb.10:
	cmp	w8, #130
	b.eq	LBB0_5
; %bb.11:
	cmp	w8, #129
	b.ne	LBB0_8
; %bb.12:
	ldr	w0, [x20]
Lloh16:
	adrp	x8, _MTK_PMIC_PWRKEY_RST@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MTK_PMIC_PWRKEY_RST@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x1, x19
	mov	x3, x2
	b	LBB0_6
LBB0_13:
	ldr	w0, [x20]
Lloh19:
	adrp	x8, _MTK_PMIC_PWRKEY_RST@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MTK_PMIC_PWRKEY_RST@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x1, x19
	mov	x3, x2
	bl	_regmap_update_bits
	ldr	w0, [x20]
Lloh22:
	adrp	x8, _MTK_PMIC_HOMEKEY_RST@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MTK_PMIC_HOMEKEY_RST@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x1, x19
	mov	x3, x2
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"power-off-time-sec"

	.comm	_MTK_PMIC_RST_DU_MASK,4,2       ; @MTK_PMIC_RST_DU_MASK
	.comm	_MTK_PMIC_RST_DU_SHIFT,4,2      ; @MTK_PMIC_RST_DU_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"mediatek,long-press-mode"

	.comm	_MTK_PMIC_PWRKEY_RST,4,2        ; @MTK_PMIC_PWRKEY_RST
	.comm	_MTK_PMIC_HOMEKEY_RST,4,2       ; @MTK_PMIC_HOMEKEY_RST
	.no_dead_strip	_mtk_pmic_keys_lp_reset_setup
.subsections_via_symbols
