	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axp20x_battery_get_max_voltage
_axp20x_battery_get_max_voltage:        ## @axp20x_battery_get_max_voltage
	.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	%rsi, %rbx
	movl	(%rdi), %edi
	movq	_AXP20X_CHRG_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_1
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movq	_AXP20X_CHRG_CTRL1_TGT_VOLT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-12(%rbp), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_7
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	movl	$4360000, (%rbx)                ## imm = 0x428740
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_5:
	movl	$4200000, (%rbx)                ## imm = 0x401640
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_3:
	movl	$4100000, (%rbx)                ## imm = 0x3E8FA0
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_4:
	movl	$4150000, (%rbx)                ## imm = 0x3F52F0
	xorl	%eax, %eax
	jmp	LBB0_8
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_5
	.long	L0_0_set_3
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.comm	_AXP20X_CHRG_CTRL1,4,2          ## @AXP20X_CHRG_CTRL1
	.comm	_AXP20X_CHRG_CTRL1_TGT_VOLT,4,2 ## @AXP20X_CHRG_CTRL1_TGT_VOLT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_axp20x_battery_get_max_voltage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function axp20x_battery_get_max_voltage
_axp20x_battery_get_max_voltage:        ; @axp20x_battery_get_max_voltage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _AXP20X_CHRG_CTRL1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AXP20X_CHRG_CTRL1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	cbz	w0, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_2:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _AXP20X_CHRG_CTRL1_TGT_VOLT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AXP20X_CHRG_CTRL1_TGT_VOLT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w9, w8
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_5
; %bb.3:
Lloh6:
	adrp	x9, lJTI0_0@PAGE
Lloh7:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_4
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_4:
	mov	w0, #0
	mov	w8, #34624
	movk	w8, #66, lsl #16
	str	w8, [x19]
	b	LBB0_1
LBB0_5:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_1
LBB0_6:
	mov	w0, #0
	mov	w8, #5696
	movk	w8, #64, lsl #16
	str	w8, [x19]
	b	LBB0_1
LBB0_7:
	mov	w0, #0
	mov	w8, #36768
	movk	w8, #62, lsl #16
	str	w8, [x19]
	b	LBB0_1
LBB0_8:
	mov	w0, #0
	mov	w8, #21232
	movk	w8, #63, lsl #16
	str	w8, [x19]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_6-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
                                        ; -- End function
	.comm	_AXP20X_CHRG_CTRL1,4,2          ; @AXP20X_CHRG_CTRL1
	.comm	_AXP20X_CHRG_CTRL1_TGT_VOLT,4,2 ; @AXP20X_CHRG_CTRL1_TGT_VOLT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_axp20x_battery_get_max_voltage
.subsections_via_symbols
