	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltc2952_poweroff_init
_ltc2952_poweroff_init:                 ## @ltc2952_poweroff_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_platform_get_drvdata
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_ltc2952_poweroff_default
	movq	_GPIOD_OUT_LOW@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 16(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	16(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movl	(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	8(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
	callq	_dev_err
	movl	%ebx, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_GPIOD_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get_optional
	movq	%rax, (%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	$0, (%rbx)
	xorl	%edi, %edi
	jmp	LBB0_8
LBB0_6:
	movq	(%rbx), %rdi
LBB0_8:
	callq	_gpiod_to_irq
	movq	_ltc2952_poweroff_handler@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_IRQF_TRIGGER_FALLING@GOTPCREL(%rip), %rsi
	movq	_IRQF_TRIGGER_RISING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
	leaq	L_.str.6(%rip), %r8
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%rbx, %r9
	callq	_devm_request_irq
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	cmpq	$0, (%rbx)
	je	LBB0_11
## %bb.10:
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_put
	movq	$0, (%rbx)
LBB0_11:
	leaq	L_.str.8(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	movq	%rbx, %rdi
	callq	_ltc2952_poweroff_start_wde
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"watchdog"

	.comm	_GPIOD_OUT_LOW,4,2              ## @GPIOD_OUT_LOW
L_.str.1:                               ## @.str.1
	.asciz	"unable to claim gpio \"watchdog\"\n"

L_.str.2:                               ## @.str.2
	.asciz	"kill"

L_.str.3:                               ## @.str.3
	.asciz	"unable to claim gpio \"kill\"\n"

L_.str.4:                               ## @.str.4
	.asciz	"trigger"

	.comm	_GPIOD_IN,4,2                   ## @GPIOD_IN
L_.str.5:                               ## @.str.5
	.asciz	"unable to claim gpio \"trigger\"\n"

	.comm	_ltc2952_poweroff_handler,4,2   ## @ltc2952_poweroff_handler
	.comm	_IRQF_TRIGGER_FALLING,4,2       ## @IRQF_TRIGGER_FALLING
	.comm	_IRQF_TRIGGER_RISING,4,2        ## @IRQF_TRIGGER_RISING
L_.str.6:                               ## @.str.6
	.asciz	"ltc2952-poweroff"

L_.str.7:                               ## @.str.7
	.asciz	"unable to configure the trigger interrupt\n"

L_.str.8:                               ## @.str.8
	.asciz	"power down trigger input will not be used\n"

	.no_dead_strip	_ltc2952_poweroff_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltc2952_poweroff_init
_ltc2952_poweroff_init:                 ; @ltc2952_poweroff_init
	.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, x0
	bl	_platform_get_drvdata
	mov	x20, x0
	bl	_ltc2952_poweroff_default
Lloh0:
	adrp	x21, _GPIOD_OUT_LOW@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GPIOD_OUT_LOW@GOTPAGEOFF]
	ldr	w2, [x21]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get
	str	x0, [x20, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x0, [x20, #16]
	bl	_PTR_ERR
	mov	x20, x0
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	w2, [x21]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get
	str	x0, [x20, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.3:
	ldr	x0, [x20, #8]
	bl	_PTR_ERR
	mov	x20, x0
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_dev_err
	mov	x0, x20
LBB0_5:
	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
LBB0_6:
Lloh10:
	adrp	x8, _GPIOD_IN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GPIOD_IN@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get_optional
	str	x0, [x20]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.7:
Lloh15:
	adrp	x1, l_.str.5@PAGE
Lloh16:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, #0
	str	xzr, [x20]
	b	LBB0_9
LBB0_8:
	ldr	x0, [x20]
LBB0_9:
	bl	_gpiod_to_irq
	mov	x1, x0
Lloh17:
	adrp	x8, _ltc2952_poweroff_handler@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ltc2952_poweroff_handler@GOTPAGEOFF]
Lloh19:
	adrp	x9, _IRQF_TRIGGER_FALLING@GOTPAGE
Lloh20:
	ldr	x9, [x9, _IRQF_TRIGGER_FALLING@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
Lloh22:
	ldr	w8, [x9]
Lloh23:
	adrp	x9, _IRQF_TRIGGER_RISING@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IRQF_TRIGGER_RISING@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w3, w9, w8
Lloh26:
	adrp	x4, l_.str.6@PAGE
Lloh27:
	add	x4, x4, l_.str.6@PAGEOFF
	mov	x0, x19
	mov	x5, x20
	bl	_devm_request_irq
	cbz	x0, LBB0_13
; %bb.10:
	ldr	x8, [x20]
	cbz	x8, LBB0_12
; %bb.11:
Lloh28:
	adrp	x1, l_.str.7@PAGE
Lloh29:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	ldr	x1, [x20]
	mov	x0, x19
	bl	_devm_gpiod_put
	str	xzr, [x20]
LBB0_12:
Lloh30:
	adrp	x1, l_.str.8@PAGE
Lloh31:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	mov	x0, x20
	bl	_ltc2952_poweroff_start_wde
LBB0_13:
	mov	w0, #0
	b	LBB0_5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"watchdog"

	.comm	_GPIOD_OUT_LOW,4,2              ; @GPIOD_OUT_LOW
l_.str.1:                               ; @.str.1
	.asciz	"unable to claim gpio \"watchdog\"\n"

l_.str.2:                               ; @.str.2
	.asciz	"kill"

l_.str.3:                               ; @.str.3
	.asciz	"unable to claim gpio \"kill\"\n"

l_.str.4:                               ; @.str.4
	.asciz	"trigger"

	.comm	_GPIOD_IN,4,2                   ; @GPIOD_IN
l_.str.5:                               ; @.str.5
	.asciz	"unable to claim gpio \"trigger\"\n"

	.comm	_ltc2952_poweroff_handler,4,2   ; @ltc2952_poweroff_handler
	.comm	_IRQF_TRIGGER_FALLING,4,2       ; @IRQF_TRIGGER_FALLING
	.comm	_IRQF_TRIGGER_RISING,4,2        ; @IRQF_TRIGGER_RISING
l_.str.6:                               ; @.str.6
	.asciz	"ltc2952-poweroff"

l_.str.7:                               ; @.str.7
	.asciz	"unable to configure the trigger interrupt\n"

l_.str.8:                               ; @.str.8
	.asciz	"power down trigger input will not be used\n"

	.no_dead_strip	_ltc2952_poweroff_init
.subsections_via_symbols
