	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axp20x_power_probe
_axp20x_power_probe:                    ## @axp20x_power_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	$0, -48(%rbp)
	movl	(%rdi), %edi
	callq	_of_device_is_available
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$64, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movq	%rbx, 56(%rax)
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devm_iio_channel_get
	movq	%rax, 48(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	48(%r14), %rdi
	callq	_PTR_ERR
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	je	LBB0_7
## %bb.8:
	movq	48(%r14), %rdi
	jmp	LBB0_9
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_10:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devm_iio_channel_get
	movq	%rax, 40(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	40(%r14), %rdi
	callq	_PTR_ERR
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	je	LBB0_7
## %bb.12:
	movq	40(%r14), %rdi
	jmp	LBB0_9
LBB0_13:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devm_iio_channel_get
	movq	%rax, 32(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movq	32(%r14), %rdi
	callq	_PTR_ERR
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_15
LBB0_7:
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_26:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	4(%rbx), %edi
	xorl	%esi, %esi
	callq	_dev_get_regmap
	movl	%eax, 24(%r14)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	movq	%r14, -40(%rbp)
	movl	(%rbx), %eax
	movl	%eax, -48(%rbp)
	movq	%rbx, %rdi
	callq	_of_device_get_match_data
	movq	%rax, 16(%r14)
	movq	_axp20x_batt_ps_desc@GOTPCREL(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_devm_power_supply_register
	movq	%rax, 8(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	8(%r14), %rdi
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	callq	_PTR_ERR
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	8(%r14), %rdi
	callq	_PTR_ERR
	jmp	LBB0_26
LBB0_15:
	movq	32(%r14), %rdi
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_18:
	leaq	-32(%rbp), %rsi
	callq	_power_supply_get_battery_info
	testl	%eax, %eax
	jne	LBB0_25
## %bb.19:
	movl	-32(%rbp), %esi
	movl	-28(%rbp), %r15d
	testl	%esi, %esi
	jle	LBB0_22
## %bb.20:
	movq	%r14, %rdi
	callq	_axp20x_set_voltage_min_design
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_22:
	movl	%r15d, (%r14)
	testl	%r15d, %r15d
	jle	LBB0_24
## %bb.23:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_axp20x_set_constant_charge_current
	testq	%rax, %rax
	je	LBB0_25
LBB0_24:
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	$300000, (%r14)                 ## imm = 0x493E0
	movq	%r14, %rdi
	movl	$300000, %esi                   ## imm = 0x493E0
	callq	_axp20x_set_constant_charge_current
LBB0_25:
	movq	%r14, %rdi
	movq	%r14, %rsi
	callq	_axp20x_get_constant_charge_current
	xorl	%eax, %eax
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"batt_v"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.1:                               ## @.str.1
	.asciz	"batt_chrg_i"

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

	.comm	_axp20x_batt_ps_desc,4,2        ## @axp20x_batt_ps_desc
L_.str.3:                               ## @.str.3
	.asciz	"failed to register power supply: %ld\n"

L_.str.4:                               ## @.str.4
	.asciz	"couldn't set voltage_min_design\n"

L_.str.5:                               ## @.str.5
	.asciz	"couldn't set constant charge current from DT: fallback to minimum value\n"

	.no_dead_strip	_axp20x_power_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function axp20x_power_probe
_axp20x_power_probe:                    ; @axp20x_power_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	str	xzr, [sp, #16]
	ldr	w0, [x0]
	bl	_of_device_is_available
	cbz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #64
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x19, x0
	str	x20, [x0, #56]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_devm_iio_channel_get
	str	x0, [x19, #48]
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.3:
	ldr	x0, [x19, #48]
	bl	_PTR_ERR
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_12
; %bb.4:
	ldr	x0, [x19, #48]
	b	LBB0_18
LBB0_5:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_13
LBB0_6:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_13
LBB0_7:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_devm_iio_channel_get
	str	x0, [x19, #40]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.8:
	ldr	x0, [x19, #40]
	bl	_PTR_ERR
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_12
; %bb.9:
	ldr	x0, [x19, #40]
	b	LBB0_18
LBB0_10:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_devm_iio_channel_get
	str	x0, [x19, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_15
; %bb.11:
	ldr	x0, [x19, #32]
	bl	_PTR_ERR
Lloh19:
	adrp	x8, _ENODEV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_17
LBB0_12:
Lloh22:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_15:
	ldr	w0, [x20, #4]
	mov	x1, #0
	bl	_dev_get_regmap
	str	w0, [x19, #24]
	mov	x0, x20
	mov	x1, x19
	bl	_platform_set_drvdata
	str	x19, [sp, #24]
	ldr	w8, [x20]
	str	w8, [sp, #16]
	mov	x0, x20
	bl	_of_device_get_match_data
	str	x0, [x19, #16]
Lloh24:
	adrp	x1, _axp20x_batt_ps_desc@GOTPAGE
Lloh25:
	ldr	x1, [x1, _axp20x_batt_ps_desc@GOTPAGEOFF]
	add	x2, sp, #16
	mov	x0, x20
	bl	_devm_power_supply_register
	str	x0, [x19, #8]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x19, #8]
	cbz	x8, LBB0_19
; %bb.16:
	bl	_PTR_ERR
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x19, #8]
	bl	_PTR_ERR
	b	LBB0_14
LBB0_17:
	ldr	x0, [x19, #32]
LBB0_18:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_19:
	add	x1, sp, #8
	bl	_power_supply_get_battery_info
	cbnz	w0, LBB0_26
; %bb.20:
	ldp	w1, w21, [sp, #8]
	cmp	w1, #1
	b.lt	LBB0_23
; %bb.21:
	mov	x0, x19
	bl	_axp20x_set_voltage_min_design
	cbz	x0, LBB0_23
; %bb.22:
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_23:
	str	w21, [x19]
	cmp	w21, #1
	b.lt	LBB0_25
; %bb.24:
	mov	x0, x19
	mov	x1, x21
	bl	_axp20x_set_constant_charge_current
	cbz	x0, LBB0_26
LBB0_25:
Lloh30:
	adrp	x1, l_.str.5@PAGE
Lloh31:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	w8, #37856
	movk	w8, #4, lsl #16
	str	w8, [x19]
	mov	x0, x19
	mov	w1, #37856
	movk	w1, #4, lsl #16
	bl	_axp20x_set_constant_charge_current
LBB0_26:
	mov	x0, x19
	mov	x1, x19
	bl	_axp20x_get_constant_charge_current
	mov	w0, #0
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"batt_v"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.1:                               ; @.str.1
	.asciz	"batt_chrg_i"

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

	.comm	_axp20x_batt_ps_desc,4,2        ; @axp20x_batt_ps_desc
l_.str.3:                               ; @.str.3
	.asciz	"failed to register power supply: %ld\n"

l_.str.4:                               ; @.str.4
	.asciz	"couldn't set voltage_min_design\n"

l_.str.5:                               ; @.str.5
	.asciz	"couldn't set constant charge current from DT: fallback to minimum value\n"

	.no_dead_strip	_axp20x_power_probe
.subsections_via_symbols
