	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pm860x_battery_probe
_pm860x_battery_probe:                  ## @pm860x_battery_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	8(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$64, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r15
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	%rax, (%r15)
	testq	%rax, %rax
	jg	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_6
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_4:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_platform_get_irq
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	jg	LBB0_9
## %bb.5:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
LBB0_6:
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r14, 56(%r15)
	movq	(%r14), %rax
	movq	_CHIP_PM8607@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%dl
	movl	12(%r14,%rdx,4), %eax
	movl	%eax, 48(%r15)
	movq	%r12, 40(%r15)
	movq	_POWER_SUPPLY_STATUS_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r15)
	movq	(%r12), %rbx
	movq	%r15, %rdi
	addq	$32, %rdi
	callq	_mutex_init
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	movq	%r15, %rdi
	callq	_pm860x_init_battery
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.10:
	movl	(%rbx), %eax
	testl	%eax, %eax
	movl	$1500, %ecx                     ## imm = 0x5DC
	cmovnel	%eax, %ecx
	movl	%ecx, 16(%r15)
	movl	4(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_13
	jmp	LBB0_12
LBB0_11:
	movl	$1500, 16(%r15)                 ## imm = 0x5DC
LBB0_12:
	movl	$300, %eax                      ## imm = 0x12C
LBB0_13:
	movl	%eax, 20(%r15)
	movq	_pm860x_battery_desc@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_devm_power_supply_register
	movq	%rax, 24(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	24(%r15), %rdi
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_15:
	movq	%r12, (%rdi)
	movl	8(%r14), %edi
	movq	(%r15), %rsi
	movq	_pm860x_coulomb_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %r13
	movl	(%r13), %r8d
	movq	%r15, (%rsp)
	leaq	L_.str.1(%rip), %r9
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_devm_request_threaded_irq
	movslq	8(%r14), %rdi
	testl	%eax, %eax
	js	LBB0_18
## %bb.16:
	movq	8(%r15), %rsi
	movq	_pm860x_batt_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r13), %r8d
	movq	%r15, (%rsp)
	leaq	L_.str.3(%rip), %r9
                                        ## kill: def $edi killed $edi killed $rdi
	xorl	%edx, %edx
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	jns	LBB0_8
## %bb.17:
	movl	%eax, %r12d
	movslq	8(%r14), %rdi
	movq	8(%r15), %rdx
	jmp	LBB0_19
LBB0_18:
	movl	%eax, %r12d
	movq	(%r15), %rdx
LBB0_19:
	leaq	L_.str.2(%rip), %rsi
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r12d, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No IRQ resource!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CHIP_PM8607,8,3                ## @CHIP_PM8607
	.comm	_POWER_SUPPLY_STATUS_UNKNOWN,4,2 ## @POWER_SUPPLY_STATUS_UNKNOWN
	.comm	_pm860x_battery_desc,4,2        ## @pm860x_battery_desc
	.comm	_pm860x_coulomb_handler,4,2     ## @pm860x_coulomb_handler
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.1:                               ## @.str.1
	.asciz	"coulomb"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to request IRQ: #%d: %d\n"

	.comm	_pm860x_batt_handler,4,2        ## @pm860x_batt_handler
L_.str.3:                               ## @.str.3
	.asciz	"battery"

	.no_dead_strip	_pm860x_battery_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pm860x_battery_probe
_pm860x_battery_probe:                  ; @pm860x_battery_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
	ldr	w0, [x0, #8]
	bl	_dev_get_drvdata
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #64
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	mov	x0, x21
	mov	w1, #0
	bl	_platform_get_irq
	str	x0, [x20]
	cmp	x0, #0
	b.le	LBB0_3
; %bb.2:
	mov	x0, x21
	mov	w1, #1
	bl	_platform_get_irq
	str	x0, [x20, #8]
	cmp	x0, #0
	b.gt	LBB0_7
LBB0_3:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
	str	x19, [x20, #56]
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _CHIP_PM8607@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CHIP_PM8607@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	mov	w10, #12
	mov	w11, #16
	cmp	x8, x9
	csel	x8, x11, x10, eq
	ldr	w8, [x19, x8]
	str	w8, [x20, #48]
	str	x21, [x20, #40]
Lloh12:
	adrp	x8, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x20, #36]
	ldr	x22, [x21]
	add	x0, x20, #32
	bl	_mutex_init
	mov	x0, x21
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x20
	bl	_pm860x_init_battery
	cbz	x22, LBB0_9
; %bb.8:
	ldr	w8, [x22]
	mov	w9, #1500
	cmp	w8, #0
	csel	w8, w9, w8, eq
	str	w8, [x20, #16]
	ldr	w8, [x22, #4]
	cbnz	w8, LBB0_11
	b	LBB0_10
LBB0_9:
	mov	w8, #1500
	str	w8, [x20, #16]
LBB0_10:
	mov	w8, #300
LBB0_11:
	str	w8, [x20, #20]
Lloh15:
	adrp	x1, _pm860x_battery_desc@GOTPAGE
Lloh16:
	ldr	x1, [x1, _pm860x_battery_desc@GOTPAGEOFF]
	mov	x0, x21
	mov	x2, #0
	bl	_devm_power_supply_register
	str	x0, [x20, #24]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x20, #24]
	cbz	x8, LBB0_13
; %bb.12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_PTR_ERR
LBB0_13:
	str	x21, [x0]
	ldr	w0, [x19, #8]
	ldr	x1, [x20]
Lloh17:
	adrp	x8, _pm860x_coulomb_handler@GOTPAGE
Lloh18:
	ldr	x8, [x8, _pm860x_coulomb_handler@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
Lloh20:
	adrp	x22, _IRQF_ONESHOT@GOTPAGE
Lloh21:
	ldr	x22, [x22, _IRQF_ONESHOT@GOTPAGEOFF]
	ldr	w4, [x22]
Lloh22:
	adrp	x5, l_.str.1@PAGE
Lloh23:
	add	x5, x5, l_.str.1@PAGEOFF
	mov	x2, #0
	mov	x6, x20
	bl	_devm_request_threaded_irq
	mov	x21, x0
	ldrsw	x0, [x19, #8]
	tbnz	w21, #31, LBB0_16
; %bb.14:
	ldr	x1, [x20, #8]
Lloh24:
	adrp	x8, _pm860x_batt_handler@GOTPAGE
Lloh25:
	ldr	x8, [x8, _pm860x_batt_handler@GOTPAGEOFF]
Lloh26:
	ldr	w3, [x8]
	ldr	w4, [x22]
Lloh27:
	adrp	x5, l_.str.3@PAGE
Lloh28:
	add	x5, x5, l_.str.3@PAGEOFF
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	x2, #0
	mov	x6, x20
	bl	_devm_request_threaded_irq
	tbnz	w0, #31, LBB0_17
; %bb.15:
	mov	w21, #0
	b	LBB0_6
LBB0_16:
	ldr	x8, [x20]
	stp	x8, x21, [sp]
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_6
LBB0_17:
	mov	x21, x0
	ldrsw	x0, [x19, #8]
	ldr	x8, [x20, #8]
	stp	x8, x21, [sp]
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No IRQ resource!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CHIP_PM8607,8,3                ; @CHIP_PM8607
	.comm	_POWER_SUPPLY_STATUS_UNKNOWN,4,2 ; @POWER_SUPPLY_STATUS_UNKNOWN
	.comm	_pm860x_battery_desc,4,2        ; @pm860x_battery_desc
	.comm	_pm860x_coulomb_handler,4,2     ; @pm860x_coulomb_handler
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.1:                               ; @.str.1
	.asciz	"coulomb"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to request IRQ: #%d: %d\n"

	.comm	_pm860x_batt_handler,4,2        ; @pm860x_batt_handler
l_.str.3:                               ; @.str.3
	.asciz	"battery"

	.no_dead_strip	_pm860x_battery_probe
.subsections_via_symbols
