	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pm80x_onkey_handler
_pm80x_onkey_handler:                   ## @pm80x_onkey_handler
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movl	8(%rsi), %edi
	movq	_PM800_STATUS_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_PM800_ONKEY_STS1@GOTPCREL(%rip), %rax
	movl	-12(%rbp), %edx
	andl	(%rax), %edx
	movl	%edx, -12(%rbp)
	movq	(%rbx), %rdi
	movq	_KEY_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_input_report_key
	movq	(%rbx), %rdi
	callq	_input_sync
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	(%rbx), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PM800_STATUS_1,4,2             ## @PM800_STATUS_1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to read status: %d\n"

	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_PM800_ONKEY_STS1,4,2           ## @PM800_ONKEY_STS1
	.comm	_KEY_POWER,4,2                  ## @KEY_POWER
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_pm80x_onkey_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pm80x_onkey_handler
_pm80x_onkey_handler:                   ; @pm80x_onkey_handler
	.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
	ldr	w0, [x1, #8]
Lloh0:
	adrp	x8, _PM800_STATUS_1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PM800_STATUS_1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _PM800_ONKEY_STS1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PM800_ONKEY_STS1@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	and	w2, w9, w8
	str	w2, [sp, #12]
	ldr	x0, [x19]
Lloh6:
	adrp	x8, _KEY_POWER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KEY_POWER@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_input_report_key
	ldr	x0, [x19]
	bl	_input_sync
Lloh9:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	mov	x2, x0
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh13:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PM800_STATUS_1,4,2             ; @PM800_STATUS_1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to read status: %d\n"

	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_PM800_ONKEY_STS1,4,2           ; @PM800_ONKEY_STS1
	.comm	_KEY_POWER,4,2                  ; @KEY_POWER
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_pm80x_onkey_handler
.subsections_via_symbols
