	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_pmic_key_setup
_mtk_pmic_key_setup:                    ## @mtk_pmic_key_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rdi, 16(%rsi)
	movl	8(%rdi), %edi
	movq	8(%rsi), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %esi
	movl	%ecx, %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	4(%r14), %edi
	movl	4(%r15), %esi
	movq	_mtk_pmic_keys_irq_handler_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	movq	_IRQF_TRIGGER_HIGH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	orl	(%rax), %r8d
	movq	%r15, (%rsp)
	leaq	L_.str(%rip), %r9
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	movl	4(%r14), %edi
	movl	4(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %ecx
	callq	_dev_err
	movl	%r12d, %ebx
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_5
LBB0_4:
	movl	(%r14), %edi
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	callq	_input_set_capability
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mtk_pmic_keys_irq_handler_thread,4,2 ## @mtk_pmic_keys_irq_handler_thread
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
	.comm	_IRQF_TRIGGER_HIGH,4,2          ## @IRQF_TRIGGER_HIGH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mtk-pmic-keys"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to request IRQ: %d: %d\n"

	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.no_dead_strip	_mtk_pmic_key_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_key_setup
_mtk_pmic_key_setup:                    ; @mtk_pmic_key_setup
	.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, x1
	mov	x20, x0
	str	x0, [x1, #16]
	ldr	w0, [x0, #8]
	ldr	x8, [x1, #8]
	ldp	w2, w1, [x8]
	mov	x3, x2
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	w0, [x20, #4]
	ldr	w1, [x19, #4]
Lloh0:
	adrp	x8, _mtk_pmic_keys_irq_handler_thread@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mtk_pmic_keys_irq_handler_thread@GOTPAGEOFF]
Lloh2:
	adrp	x9, _IRQF_ONESHOT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _IRQF_TRIGGER_HIGH@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IRQF_TRIGGER_HIGH@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w4, w9, w8
Lloh9:
	adrp	x5, l_.str@PAGE
Lloh10:
	add	x5, x5, l_.str@PAGEOFF
	mov	x2, #0
	mov	x6, x19
	bl	_devm_request_threaded_irq
	mov	x21, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x20, #4]
	ldr	w2, [x19, #4]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x21
	bl	_dev_err
	b	LBB0_5
LBB0_3:
	mov	x21, x0
	b	LBB0_5
LBB0_4:
	ldr	w0, [x20]
Lloh13:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	w2, [x19]
	bl	_input_set_capability
LBB0_5:
	mov	x0, x21
	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 AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_mtk_pmic_keys_irq_handler_thread,4,2 ; @mtk_pmic_keys_irq_handler_thread
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
	.comm	_IRQF_TRIGGER_HIGH,4,2          ; @IRQF_TRIGGER_HIGH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mtk-pmic-keys"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to request IRQ: %d: %d\n"

	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.no_dead_strip	_mtk_pmic_key_setup
.subsections_via_symbols
