	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function da9052_bat_probe
_da9052_bat_probe:                      ## @da9052_bat_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$32, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, -56(%rbp)
	movl	(%r14), %edi
	callq	_dev_get_drvdata
	movq	%rax, (%r15)
	movq	_DA9052_NOCHARGER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%r15)
	movq	_POWER_SUPPLY_STATUS_UNKNOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 20(%r15)
	movq	_POWER_SUPPLY_HEALTH_UNKNOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%r15)
	movq	_da9052_USB_current_notifier@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%r15)
	movq	(%rax), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%rax), %eax
	testl	%eax, %eax
	jne	LBB0_5
LBB0_4:
	movl	$1, %eax
LBB0_5:
	movq	_psy_desc@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_da9052_bat_irqs@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_6
## %bb.7:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	_da9052_bat_irq@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	movq	_da9052_bat_irq_bits@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %esi
	movq	(%r13), %rax
	movl	(%rax,%rbx,4), %edx
	movl	(%r14), %ecx
	movq	%r15, %r8
	callq	_da9052_request_irq
	testl	%eax, %eax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_8
## %bb.11:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_17
LBB0_6:
	xorl	%ebx, %ebx
LBB0_12:
	movq	_psy_desc@GOTPCREL(%rip), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r14, %rdi
	callq	_power_supply_register
	movl	%eax, 8(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_18
## %bb.13:
	movl	8(%r15), %edi
	callq	_PTR_ERR
	movl	%eax, %r12d
	testl	%ebx, %ebx
	jg	LBB0_15
	jmp	LBB0_17
LBB0_9:
	movl	%eax, %r12d
	movq	(%r15), %rax
	movq	(%rax), %rdi
	movq	(%r13), %rax
	movl	(%rax,%rbx,4), %edx
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %ecx
	callq	_dev_err
	testl	%ebx, %ebx
	jle	LBB0_17
LBB0_15:
	movl	%ebx, %ebx
	incq	%rbx
	movq	_da9052_bat_irq_bits@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	movq	(%r14), %rax
	movl	-8(%rax,%rbx,4), %esi
	movq	%r15, %rdx
	callq	_da9052_free_irq
	decq	%rbx
	cmpq	$1, %rbx
	ja	LBB0_16
	jmp	LBB0_17
LBB0_18:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	xorl	%r12d, %r12d
LBB0_17:
	movl	%r12d, %eax
	addq	$24, %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	_DA9052_NOCHARGER,4,2           ## @DA9052_NOCHARGER
	.comm	_POWER_SUPPLY_STATUS_UNKNOWN,4,2 ## @POWER_SUPPLY_STATUS_UNKNOWN
	.comm	_POWER_SUPPLY_HEALTH_UNKNOWN,4,2 ## @POWER_SUPPLY_HEALTH_UNKNOWN
	.comm	_da9052_USB_current_notifier,4,2 ## @da9052_USB_current_notifier
	.comm	_psy_desc,4,2                   ## @psy_desc
	.comm	_da9052_bat_irqs,8,3            ## @da9052_bat_irqs
	.comm	_da9052_bat_irq_bits,8,3        ## @da9052_bat_irq_bits
	.comm	_da9052_bat_irq,4,2             ## @da9052_bat_irq
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DA9052 failed to request %s IRQ: %d\n"

	.no_dead_strip	_da9052_bat_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function da9052_bat_probe
_da9052_bat_probe:                      ; @da9052_bat_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #32
	bl	_devm_kzalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	str	x0, [sp, #8]
	ldr	w0, [x20]
	bl	_dev_get_drvdata
	str	x0, [x19]
Lloh3:
	adrp	x8, _DA9052_NOCHARGER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DA9052_NOCHARGER@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #20]
Lloh9:
	adrp	x8, _POWER_SUPPLY_HEALTH_UNKNOWN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _POWER_SUPPLY_HEALTH_UNKNOWN@GOTPAGEOFF]
Lloh11:
	adrp	x9, _da9052_USB_current_notifier@GOTPAGE
Lloh12:
	ldr	x9, [x9, _da9052_USB_current_notifier@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #12]
	ldr	x8, [x0]
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	w8, [x8]
	cbnz	w8, LBB0_4
LBB0_3:
	mov	w8, #1
LBB0_4:
Lloh15:
	adrp	x9, _psy_desc@GOTPAGE
Lloh16:
	ldr	x9, [x9, _psy_desc@GOTPAGEOFF]
Lloh17:
	str	w8, [x9]
Lloh18:
	adrp	x24, _da9052_bat_irqs@GOTPAGE
Lloh19:
	ldr	x24, [x24, _da9052_bat_irqs@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
Lloh20:
	adrp	x22, _da9052_bat_irq_bits@GOTPAGE
Lloh21:
	ldr	x22, [x22, _da9052_bat_irq_bits@GOTPAGEOFF]
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.5:
	mov	x23, #0
Lloh22:
	adrp	x25, _da9052_bat_irq@GOTPAGE
Lloh23:
	ldr	x25, [x25, _da9052_bat_irq@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	ldr	x8, [x22]
	lsl	x9, x23, #2
	ldr	w1, [x8, x9]
	ldr	x8, [x24]
	ldr	w2, [x8, x9]
	ldr	w3, [x25]
	mov	x4, x19
	bl	_da9052_request_irq
	cbnz	w0, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	x23, w0, sxtw
	b.lt	LBB0_6
	b	LBB0_10
LBB0_8:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_16
LBB0_9:
	mov	w23, #0
LBB0_10:
Lloh27:
	adrp	x1, _psy_desc@GOTPAGE
Lloh28:
	ldr	x1, [x1, _psy_desc@GOTPAGEOFF]
	add	x2, sp, #8
	mov	x0, x20
	bl	_power_supply_register
	str	w0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_15
; %bb.11:
	ldr	w0, [x19, #8]
	bl	_PTR_ERR
	mov	x21, x0
	cmp	w23, #1
	b.ge	LBB0_13
	b	LBB0_16
LBB0_12:
	mov	x21, x0
	ldr	x8, [x19]
	ldr	x0, [x8]
	ldr	x8, [x24]
	ldr	w2, [x8, x23, lsl #2]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x21
	bl	_dev_err
	cmp	w23, #1
	b.lt	LBB0_16
LBB0_13:
	mov	w8, w23
	sub	x20, x8, #1
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	ldr	x8, [x22]
	ldr	w1, [x8, x20, lsl #2]
	mov	x2, x19
	bl	_da9052_free_irq
	add	x8, x20, #1
	sub	x20, x20, #1
	cmp	x8, #1
	b.hi	LBB0_14
	b	LBB0_16
LBB0_15:
	mov	x0, x20
	mov	x1, x19
	bl	_platform_set_drvdata
	mov	w21, #0
LBB0_16:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DA9052_NOCHARGER,4,2           ; @DA9052_NOCHARGER
	.comm	_POWER_SUPPLY_STATUS_UNKNOWN,4,2 ; @POWER_SUPPLY_STATUS_UNKNOWN
	.comm	_POWER_SUPPLY_HEALTH_UNKNOWN,4,2 ; @POWER_SUPPLY_HEALTH_UNKNOWN
	.comm	_da9052_USB_current_notifier,4,2 ; @da9052_USB_current_notifier
	.comm	_psy_desc,4,2                   ; @psy_desc
	.comm	_da9052_bat_irqs,8,3            ; @da9052_bat_irqs
	.comm	_da9052_bat_irq_bits,8,3        ; @da9052_bat_irq_bits
	.comm	_da9052_bat_irq,4,2             ; @da9052_bat_irq
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DA9052 failed to request %s IRQ: %d\n"

	.no_dead_strip	_da9052_bat_probe
.subsections_via_symbols
