	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pm860x_charger_probe
_pm860x_charger_probe:                  ## @pm860x_charger_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	leaq	4(%rdi), %rbx
	movl	4(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	$0, -72(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$48, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	(%r13), %r14d
	testl	%r14d, %r14d
	jle	LBB0_3
## %bb.4:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_platform_get_irq
	movq	(%r12), %rcx
	movl	%r15d, %edx
	movq	%rax, (%rcx,%rdx,8)
	shrq	$63, %rax
	xorl	$1, %eax
	addl	%r15d, %eax
	incl	%ebx
	movl	%eax, %r15d
	cmpl	%ebx, %r14d
	jne	LBB0_5
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_18
LBB0_3:
	xorl	%eax, %eax
LBB0_6:
	movl	%eax, 8(%r12)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, 40(%r12)
	movq	(%r14), %rax
	movq	_CHIP_PM8607@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	sete	%dl
	setne	%sil
	movl	12(%r14,%rsi,4), %eax
	movl	%eax, 36(%r12)
	movl	12(%r14,%rdx,4), %eax
	movl	%eax, 32(%r12)
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, 24(%r12)
	movq	_VCHG_NORMAL_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VCHG_OVP_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_set_vchg_threshold
	movq	%r12, %rdi
	addq	$16, %rdi
	callq	_mutex_init
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_platform_set_drvdata
	movq	%r12, -64(%rbp)
	movq	_pm860x_supplied_to@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rdi, -80(%rbp)
	callq	_ARRAY_SIZE
	movl	%eax, -72(%rbp)
	movq	_pm860x_charger_desc@GOTPCREL(%rip), %rsi
	leaq	-80(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_power_supply_register
	movl	%eax, 12(%r12)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	12(%r12), %edi
	callq	_PTR_ERR
	movl	%eax, %r13d
	jmp	LBB0_18
LBB0_7:
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_18
LBB0_10:
	movq	%r12, %rdi
	callq	_pm860x_init_charger
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_17
## %bb.11:
	xorl	%ebx, %ebx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	_pm860x_irq_descs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,8), %r8d
	movl	4(%rax,%rbx,8), %edx
	movl	(%r15), %ecx
	xorl	%esi, %esi
	movq	%r12, %r9
	callq	_request_threaded_irq
	testl	%eax, %eax
	js	LBB0_13
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_12
LBB0_17:
	xorl	%r13d, %r13d
	jmp	LBB0_18
LBB0_13:
	movl	%eax, %r13d
	movslq	8(%r14), %rdi
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	movl	12(%r12), %edi
	callq	_power_supply_unregister
	testl	%ebx, %ebx
	je	LBB0_18
## %bb.14:
	incq	%rbx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	-16(%rax,%rbx,8), %rdi
	movq	%r12, %rsi
	callq	_free_irq
	decq	%rbx
	cmpq	$1, %rbx
	jg	LBB0_15
LBB0_18:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CHIP_PM8607,8,3                ## @CHIP_PM8607
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Missed I2C address of 88PM8606!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VCHG_NORMAL_LOW,4,2            ## @VCHG_NORMAL_LOW
	.comm	_VCHG_OVP_LOW,4,2               ## @VCHG_OVP_LOW
	.comm	_pm860x_supplied_to,8,3         ## @pm860x_supplied_to
	.comm	_pm860x_charger_desc,4,2        ## @pm860x_charger_desc
	.comm	_pm860x_irq_descs,8,3           ## @pm860x_irq_descs
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.1:                               ## @.str.1
	.asciz	"Failed to request IRQ: #%d: %d\n"

	.no_dead_strip	_pm860x_charger_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pm860x_charger_probe
_pm860x_charger_probe:                  ; @pm860x_charger_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x0
	mov	x21, x0
	ldr	w0, [x21, #4]!
	bl	_dev_get_drvdata
	mov	x20, x0
	str	xzr, [sp, #32]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #48
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w24, [x22]
	cmp	w24, #1
	b.lt	LBB0_5
; %bb.2:
	mov	w25, #0
	mov	w23, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x23
	bl	_platform_get_irq
	ldr	x8, [x19]
	str	x0, [x8, w25, uxtw #3]
	lsr	x8, x0, #63
	eor	w8, w8, #0x1
	add	w25, w8, w25
	add	w23, w23, #1
	cmp	w24, w23
	b.ne	LBB0_3
	b	LBB0_6
LBB0_4:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:
	mov	w25, #0
LBB0_6:
	str	w25, [x19, #8]
	str	x20, [x19, #40]
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _CHIP_PM8607@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CHIP_PM8607@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	mov	w10, #16
	mov	w11, #12
	cmp	x8, x9
	csel	x8, x11, x10, eq
	ldr	w8, [x20, x8]
	str	w8, [x19, #36]
	csel	x8, x10, x11, eq
	ldr	w8, [x20, x8]
	str	w8, [x19, #32]
	cbz	w8, LBB0_9
; %bb.7:
	str	x21, [x19, #24]
Lloh8:
	adrp	x8, _VCHG_NORMAL_LOW@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VCHG_NORMAL_LOW@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _VCHG_OVP_LOW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VCHG_OVP_LOW@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_set_vchg_threshold
	add	x0, x19, #16
	bl	_mutex_init
	mov	x0, x22
	mov	x1, x19
	bl	_platform_set_drvdata
Lloh14:
	adrp	x8, _pm860x_supplied_to@GOTPAGE
Lloh15:
	ldr	x8, [x8, _pm860x_supplied_to@GOTPAGEOFF]
Lloh16:
	ldr	x0, [x8]
	str	x19, [sp, #40]
	str	x0, [sp, #24]
	bl	_ARRAY_SIZE
	str	w0, [sp, #32]
Lloh17:
	adrp	x1, _pm860x_charger_desc@GOTPAGE
Lloh18:
	ldr	x1, [x1, _pm860x_charger_desc@GOTPAGEOFF]
	add	x2, sp, #24
	mov	x0, x21
	bl	_power_supply_register
	str	w0, [x19, #12]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.8:
	ldr	w0, [x19, #12]
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_11
LBB0_9:
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_12:
	mov	x0, x19
	bl	_pm860x_init_charger
	ldr	x0, [x19]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_16
; %bb.13:
	mov	x23, #0
	mov	x22, #-1
Lloh23:
	adrp	x24, _pm860x_irq_descs@GOTPAGE
Lloh24:
	ldr	x24, [x24, _pm860x_irq_descs@GOTPAGEOFF]
Lloh25:
	adrp	x25, _IRQF_ONESHOT@GOTPAGE
Lloh26:
	ldr	x25, [x25, _IRQF_ONESHOT@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x0, [x8, x23]
	ldr	x8, [x24]
	add	x8, x8, x23
	ldr	w3, [x25]
	ldp	w4, w2, [x8]
	mov	x1, #0
	mov	x5, x19
	bl	_request_threaded_irq
	tbnz	w0, #31, LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x0, [x19]
	bl	_ARRAY_SIZE
	add	x8, x22, #2
	add	x22, x22, #1
	add	x23, x23, #8
	cmp	x8, w0, sxtw
	b.lt	LBB0_14
LBB0_16:
	mov	w21, #0
	b	LBB0_11
LBB0_17:
	mov	x21, x0
	ldrsw	x0, [x20, #8]
	ldr	x8, [x19]
	ldr	x8, [x8, x23]
	stp	x8, x21, [sp]
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	ldr	w0, [x19, #12]
	bl	_power_supply_unregister
	cmn	w22, #1
	b.eq	LBB0_11
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x0, [x8, x22, lsl #3]
	mov	x1, x19
	bl	_free_irq
	add	x8, x22, #1
	sub	x22, x22, #1
	cmp	x8, #1
	b.gt	LBB0_18
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CHIP_PM8607,8,3                ; @CHIP_PM8607
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Missed I2C address of 88PM8606!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VCHG_NORMAL_LOW,4,2            ; @VCHG_NORMAL_LOW
	.comm	_VCHG_OVP_LOW,4,2               ; @VCHG_OVP_LOW
	.comm	_pm860x_supplied_to,8,3         ; @pm860x_supplied_to
	.comm	_pm860x_charger_desc,4,2        ; @pm860x_charger_desc
	.comm	_pm860x_irq_descs,8,3           ; @pm860x_irq_descs
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.1:                               ; @.str.1
	.asciz	"Failed to request IRQ: #%d: %d\n"

	.no_dead_strip	_pm860x_charger_probe
.subsections_via_symbols
