	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_charger
_update_charger:                        ## @update_charger
	.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	_pdata@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_8
## %bb.1:
	movq	_new_ac_status@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_3
## %bb.2:
	movq	_dev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	(%rbx), %rax
	movq	_PDA_POWER_CHARGE_AC@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_8:
	movq	_ac_draw@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.9:
	movq	_new_ac_status@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	jle	LBB0_12
## %bb.10:
	movl	(%rax), %edx
	movl	%edx, %esi
	callq	_regulator_set_current_limit
	cmpb	$0, _update_charger.regulator_enabled(%rip)
	jne	LBB0_14
## %bb.11:
	movq	_dev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	(%rbx), %rdi
	callq	_regulator_enable
	movl	%eax, %edi
	callq	_WARN_ON
	movb	$1, _update_charger.regulator_enabled(%rip)
	jmp	LBB0_14
LBB0_3:
	movq	_new_usb_status@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_dev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	jle	LBB0_7
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	movq	(%rbx), %rax
	movq	_PDA_POWER_CHARGE_USB@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %edi
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmpq	*8(%rax)                        ## TAILCALL
LBB0_12:
	cmpb	$1, _update_charger.regulator_enabled(%rip)
	jne	LBB0_14
## %bb.13:
	movq	_dev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_dbg
	movq	(%rbx), %rdi
	callq	_regulator_disable
	movl	%eax, %edi
	callq	_WARN_ON
	movb	$0, _update_charger.regulator_enabled(%rip)
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_dbg
	movq	(%rbx), %rax
	xorl	%edi, %edi
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_update_charger.regulator_enabled,1,2 ## @update_charger.regulator_enabled
	.comm	_pdata,8,3                      ## @pdata
	.comm	_new_ac_status,8,3              ## @new_ac_status
	.comm	_dev,4,2                        ## @dev
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"charger on (AC)\n"

	.comm	_PDA_POWER_CHARGE_AC,4,2        ## @PDA_POWER_CHARGE_AC
	.comm	_new_usb_status,8,3             ## @new_usb_status
L_.str.1:                               ## @.str.1
	.asciz	"charger on (USB)\n"

	.comm	_PDA_POWER_CHARGE_USB,4,2       ## @PDA_POWER_CHARGE_USB
L_.str.2:                               ## @.str.2
	.asciz	"charger off\n"

	.comm	_ac_draw,8,3                    ## @ac_draw
	.no_dead_strip	_update_charger
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_charger
_update_charger:                        ; @update_charger
	.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
Lloh0:
	adrp	x19, _pdata@GOTPAGE
Lloh1:
	ldr	x19, [x19, _pdata@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _new_ac_status@GOTPAGE
Lloh3:
	ldr	x8, [x8, _new_ac_status@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_7
; %bb.2:
Lloh5:
	adrp	x8, _dev@GOTPAGE
Lloh6:
	ldr	x8, [x8, _dev@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x19]
	ldr	x1, [x8, #8]
Lloh10:
	adrp	x8, _PDA_POWER_CHARGE_AC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PDA_POWER_CHARGE_AC@GOTPAGEOFF]
	b	LBB0_9
LBB0_3:
Lloh12:
	adrp	x19, _ac_draw@GOTPAGE
Lloh13:
	ldr	x19, [x19, _ac_draw@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_13
; %bb.4:
Lloh14:
	adrp	x9, _new_ac_status@GOTPAGE
Lloh15:
	ldr	x9, [x9, _new_ac_status@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, #1
	b.lt	LBB0_11
; %bb.5:
	ldr	w1, [x8]
	mov	x2, x1
	bl	_regulator_set_current_limit
	adrp	x20, _update_charger.regulator_enabled@PAGE
	ldrb	w8, [x20, _update_charger.regulator_enabled@PAGEOFF]
	tbnz	w8, #0, LBB0_13
; %bb.6:
Lloh17:
	adrp	x8, _dev@GOTPAGE
Lloh18:
	ldr	x8, [x8, _dev@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	x0, [x19]
	bl	_regulator_enable
	bl	_WARN_ON
	mov	w8, #1
	strb	w8, [x20, _update_charger.regulator_enabled@PAGEOFF]
	b	LBB0_13
LBB0_7:
Lloh22:
	adrp	x8, _new_usb_status@GOTPAGE
Lloh23:
	ldr	x8, [x8, _new_usb_status@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
Lloh25:
	adrp	x9, _dev@GOTPAGE
Lloh26:
	ldr	x9, [x9, _dev@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x9]
	cmp	x8, #1
	b.lt	LBB0_14
; %bb.8:
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x19]
	ldr	x1, [x8, #8]
Lloh30:
	adrp	x8, _PDA_POWER_CHARGE_USB@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PDA_POWER_CHARGE_USB@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	br	x1
LBB0_11:
	adrp	x20, _update_charger.regulator_enabled@PAGE
	ldrb	w8, [x20, _update_charger.regulator_enabled@PAGEOFF]
	cmp	w8, #1
	b.ne	LBB0_13
; %bb.12:
Lloh32:
	adrp	x8, _dev@GOTPAGE
Lloh33:
	ldr	x8, [x8, _dev@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
Lloh35:
	adrp	x1, l_.str.2@PAGE
Lloh36:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	ldr	x0, [x19]
	bl	_regulator_disable
	bl	_WARN_ON
	strb	wzr, [x20, _update_charger.regulator_enabled@PAGEOFF]
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh37:
	adrp	x1, l_.str.2@PAGE
Lloh38:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x19]
	ldr	x1, [x8, #8]
	mov	w0, #0
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_update_charger.regulator_enabled,1,2 ; @update_charger.regulator_enabled
	.comm	_pdata,8,3                      ; @pdata
	.comm	_new_ac_status,8,3              ; @new_ac_status
	.comm	_dev,4,2                        ; @dev
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"charger on (AC)\n"

	.comm	_PDA_POWER_CHARGE_AC,4,2        ; @PDA_POWER_CHARGE_AC
	.comm	_new_usb_status,8,3             ; @new_usb_status
l_.str.1:                               ; @.str.1
	.asciz	"charger on (USB)\n"

	.comm	_PDA_POWER_CHARGE_USB,4,2       ; @PDA_POWER_CHARGE_USB
l_.str.2:                               ; @.str.2
	.asciz	"charger off\n"

	.comm	_ac_draw,8,3                    ; @ac_draw
	.no_dead_strip	_update_charger
.subsections_via_symbols
