	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pm2xxx_charger_watchdog_kick
_pm2xxx_charger_watchdog_kick:          ## @pm2xxx_charger_watchdog_kick
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_POWER_SUPPLY_TYPE_MAINS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	callq	_to_pm2xxx_charger_ac_device_info
	movq	%rax, %r14
	movq	_PM2XXX_BATT_WD_KICK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WD_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_pm2xxx_reg_write
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_5
LBB0_3:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_2:
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POWER_SUPPLY_TYPE_MAINS,8,3    ## @POWER_SUPPLY_TYPE_MAINS
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_PM2XXX_BATT_WD_KICK,4,2        ## @PM2XXX_BATT_WD_KICK
	.comm	_WD_TIMER,4,2                   ## @WD_TIMER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to kick WD!\n"

	.no_dead_strip	_pm2xxx_charger_watchdog_kick
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pm2xxx_charger_watchdog_kick
_pm2xxx_charger_watchdog_kick:          ; @pm2xxx_charger_watchdog_kick
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _POWER_SUPPLY_TYPE_MAINS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _POWER_SUPPLY_TYPE_MAINS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	bl	_to_pm2xxx_charger_ac_device_info
	mov	x20, x0
Lloh3:
	adrp	x8, _PM2XXX_BATT_WD_KICK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PM2XXX_BATT_WD_KICK@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _WD_TIMER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WD_TIMER@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_pm2xxx_reg_write
	mov	x19, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x20]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _ENXIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_POWER_SUPPLY_TYPE_MAINS,8,3    ; @POWER_SUPPLY_TYPE_MAINS
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_PM2XXX_BATT_WD_KICK,4,2        ; @PM2XXX_BATT_WD_KICK
	.comm	_WD_TIMER,4,2                   ; @WD_TIMER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to kick WD!\n"

	.no_dead_strip	_pm2xxx_charger_watchdog_kick
.subsections_via_symbols
