	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chtdc_ti_pwrbtn_probe
_chtdc_ti_pwrbtn_probe:                 ## @chtdc_ti_pwrbtn_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_devm_input_allocate_device
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r13
	movl	(%rbx), %eax
	movl	%eax, 12(%r13)
	leaq	L_.str(%rip), %rax
	movq	%rax, (%r13)
	movq	_BUS_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KEY_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_input_set_capability
	movq	%r13, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_dev_set_drvdata
	movq	_chtdc_ti_pwrbtn_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_KBUILD_MODNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r13, (%rsp)
	movq	%r14, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_device_init_wakeup
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_dev_pm_set_wake_irq
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	movl	%r12d, %eax
	jmp	LBB0_7
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"power-button/input0"

	.comm	_BUS_HOST,4,2                   ## @BUS_HOST
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_KEY_POWER,4,2                  ## @KEY_POWER
	.comm	_chtdc_ti_pwrbtn_interrupt,4,2  ## @chtdc_ti_pwrbtn_interrupt
	.comm	_KBUILD_MODNAME,4,2             ## @KBUILD_MODNAME
	.no_dead_strip	_chtdc_ti_pwrbtn_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chtdc_ti_pwrbtn_probe
_chtdc_ti_pwrbtn_probe:                 ; @chtdc_ti_pwrbtn_probe
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x0
	mov	x19, x0
	ldr	w0, [x19, #4]!
	bl	_dev_get_drvdata
	mov	x22, x0
	mov	x0, x23
	mov	w1, #0
	bl	_platform_get_irq
	mov	x20, x0
	tbnz	w0, #31, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_devm_input_allocate_device
	cbz	x0, LBB0_6
; %bb.2:
	mov	x21, x0
	ldr	w8, [x23]
Lloh0:
	adrp	x9, l_.str@PAGE
Lloh1:
	add	x9, x9, l_.str@PAGEOFF
	str	x9, [x0]
Lloh2:
	adrp	x9, _BUS_HOST@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BUS_HOST@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #8]
Lloh5:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _KEY_POWER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _KEY_POWER@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	bl	_input_set_capability
	mov	x0, x21
	bl	_input_register_device
	cbnz	w0, LBB0_7
; %bb.3:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_dev_set_drvdata
Lloh11:
	adrp	x8, _chtdc_ti_pwrbtn_interrupt@GOTPAGE
Lloh12:
	ldr	x8, [x8, _chtdc_ti_pwrbtn_interrupt@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
Lloh14:
	adrp	x8, _KBUILD_MODNAME@GOTPAGE
Lloh15:
	ldr	x8, [x8, _KBUILD_MODNAME@GOTPAGEOFF]
Lloh16:
	ldr	w5, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, #0
	mov	w4, #0
	mov	x6, x21
	bl	_devm_request_threaded_irq
	cbnz	w0, LBB0_7
; %bb.4:
	mov	x0, x19
	mov	w1, #1
	bl	_device_init_wakeup
	mov	x0, x19
	mov	x1, x20
	bl	_dev_pm_set_wake_irq
	mov	w0, #0
	b	LBB0_7
LBB0_5:
	mov	x0, x20
	b	LBB0_7
LBB0_6:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"power-button/input0"

	.comm	_BUS_HOST,4,2                   ; @BUS_HOST
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_KEY_POWER,4,2                  ; @KEY_POWER
	.comm	_chtdc_ti_pwrbtn_interrupt,4,2  ; @chtdc_ti_pwrbtn_interrupt
	.comm	_KBUILD_MODNAME,4,2             ; @KBUILD_MODNAME
	.no_dead_strip	_chtdc_ti_pwrbtn_probe
.subsections_via_symbols
