	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sirfsoc_pwrc_probe
_sirfsoc_pwrc_probe:                    ## @sirfsoc_pwrc_probe
	.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, %r14
	movq	(%rdi), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	leaq	12(%rax), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r14, %rdi
	callq	_devm_input_allocate_device
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	leaq	L_.str.3(%rip), %rcx
	movq	%rcx, (%rax)
	leaq	L_.str.4(%rip), %rcx
	movq	%rcx, 8(%rax)
	movq	_EV_KEY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_BIT_MASK
	movq	(%r15), %rdi
	movq	24(%rdi), %rcx
	movl	%eax, (%rcx)
	movl	(%rbx), %esi
	movq	_KEY_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_input_set_capability
	movq	%r15, %rdi
	addq	$8, %rdi
	movq	_sirfsoc_pwrc_report_event@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_DELAYED_WORK
	movq	_sirfsoc_pwrc_open@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rdi
	movl	%eax, 20(%rdi)
	movq	_sirfsoc_pwrc_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rdi)
	movq	%r15, %rsi
	callq	_input_set_drvdata
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_sirfsoc_pwrc_toggle_interrupts
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, %r12d
	movq	_sirfsoc_pwrc_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.5(%rip), %r8
	movq	%r14, %rdi
	movl	%r12d, %esi
	xorl	%ecx, %ecx
	movq	%r15, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_8:
	movq	(%r15), %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_10:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_dev_set_drvdata
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_device_init_wakeup
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not enough memory for the device data\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"reg"

L_.str.2:                               ## @.str.2
	.asciz	"unable to find base address of pwrc node in dtb\n"

L_.str.3:                               ## @.str.3
	.asciz	"sirfsoc pwrckey"

L_.str.4:                               ## @.str.4
	.asciz	"pwrc/input0"

	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_KEY_POWER,4,2                  ## @KEY_POWER
	.comm	_sirfsoc_pwrc_report_event,4,2  ## @sirfsoc_pwrc_report_event
	.comm	_sirfsoc_pwrc_open,4,2          ## @sirfsoc_pwrc_open
	.comm	_sirfsoc_pwrc_close,4,2         ## @sirfsoc_pwrc_close
	.comm	_sirfsoc_pwrc_isr,4,2           ## @sirfsoc_pwrc_isr
L_.str.5:                               ## @.str.5
	.asciz	"sirfsoc_pwrc_int"

L_.str.6:                               ## @.str.6
	.asciz	"unable to claim irq %d, error: %d\n"

L_.str.7:                               ## @.str.7
	.asciz	"unable to register input device, error: %d\n"

	.no_dead_strip	_sirfsoc_pwrc_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sirfsoc_pwrc_probe
_sirfsoc_pwrc_probe:                    ; @sirfsoc_pwrc_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	add	x2, x0, #12
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_of_property_read_u32
	cbz	w0, LBB0_7
; %bb.2:
	mov	x21, x0
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_3:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_6
LBB0_4:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_info
LBB0_5:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
	mov	x0, x19
	bl	_devm_input_allocate_device
	str	x0, [x20]
	cbz	x0, LBB0_5
; %bb.8:
Lloh12:
	adrp	x8, l_.str.3@PAGE
Lloh13:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh14:
	adrp	x9, l_.str.4@PAGE
Lloh15:
	add	x9, x9, l_.str.4@PAGEOFF
	stp	x8, x9, [x0]
Lloh16:
	adrp	x21, _EV_KEY@GOTPAGE
Lloh17:
	ldr	x21, [x21, _EV_KEY@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_BIT_MASK
	ldr	x8, [x20]
	ldr	x9, [x8, #24]
	str	w0, [x9]
	ldr	w1, [x21]
Lloh18:
	adrp	x9, _KEY_POWER@GOTPAGE
Lloh19:
	ldr	x9, [x9, _KEY_POWER@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x9]
	mov	x0, x8
	bl	_input_set_capability
	add	x0, x20, #8
Lloh21:
	adrp	x8, _sirfsoc_pwrc_report_event@GOTPAGE
Lloh22:
	ldr	x8, [x8, _sirfsoc_pwrc_report_event@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_INIT_DELAYED_WORK
Lloh24:
	adrp	x8, _sirfsoc_pwrc_open@GOTPAGE
Lloh25:
	ldr	x8, [x8, _sirfsoc_pwrc_open@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	ldr	x0, [x20]
Lloh27:
	adrp	x9, _sirfsoc_pwrc_close@GOTPAGE
Lloh28:
	ldr	x9, [x9, _sirfsoc_pwrc_close@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #16]
	mov	x1, x20
	bl	_input_set_drvdata
	mov	x0, x20
	mov	w1, #0
	bl	_sirfsoc_pwrc_toggle_interrupts
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	mov	x22, x0
Lloh30:
	adrp	x8, _sirfsoc_pwrc_isr@GOTPAGE
Lloh31:
	ldr	x8, [x8, _sirfsoc_pwrc_isr@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
Lloh33:
	adrp	x4, l_.str.5@PAGE
Lloh34:
	add	x4, x4, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x1, x22
	mov	w3, #0
	mov	x5, x20
	bl	_devm_request_irq
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
	stp	x22, x21, [sp]
Lloh35:
	adrp	x1, l_.str.6@PAGE
Lloh36:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_3
LBB0_10:
	ldr	x0, [x20]
	bl	_input_register_device
	mov	x21, x0
	cbz	w0, LBB0_12
; %bb.11:
	str	x21, [sp]
Lloh37:
	adrp	x1, l_.str.7@PAGE
Lloh38:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_6
LBB0_12:
	mov	x0, x19
	mov	x1, x20
	bl	_dev_set_drvdata
	mov	x0, x19
	mov	w1, #1
	bl	_device_init_wakeup
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not enough memory for the device data\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"reg"

l_.str.2:                               ; @.str.2
	.asciz	"unable to find base address of pwrc node in dtb\n"

l_.str.3:                               ; @.str.3
	.asciz	"sirfsoc pwrckey"

l_.str.4:                               ; @.str.4
	.asciz	"pwrc/input0"

	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_KEY_POWER,4,2                  ; @KEY_POWER
	.comm	_sirfsoc_pwrc_report_event,4,2  ; @sirfsoc_pwrc_report_event
	.comm	_sirfsoc_pwrc_open,4,2          ; @sirfsoc_pwrc_open
	.comm	_sirfsoc_pwrc_close,4,2         ; @sirfsoc_pwrc_close
	.comm	_sirfsoc_pwrc_isr,4,2           ; @sirfsoc_pwrc_isr
l_.str.5:                               ; @.str.5
	.asciz	"sirfsoc_pwrc_int"

l_.str.6:                               ; @.str.6
	.asciz	"unable to claim irq %d, error: %d\n"

l_.str.7:                               ; @.str.7
	.asciz	"unable to register input device, error: %d\n"

	.no_dead_strip	_sirfsoc_pwrc_probe
.subsections_via_symbols
