	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function da9030_battery_vbat_event
_da9030_battery_vbat_event:             ## @da9030_battery_vbat_event
	.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	%rdi, %rbx
	leaq	24(%rdi), %rsi
	callq	_da9030_read_adc
	cmpq	$0, 48(%rbx)
	je	LBB0_1
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movq	24(%rbx), %rax
	cmpq	8(%rbx), %rax
	jge	LBB0_3
## %bb.2:
	movl	40(%rbx), %edi
	movq	_DA9030_VBATMON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rdx
	callq	_da903x_write
	movq	32(%rbx), %rcx
	testq	%rcx, %rcx
	jne	LBB0_7
	jmp	LBB0_6
LBB0_3:
	cmpq	16(%rbx), %rax
	jge	LBB0_6
## %bb.4:
	movq	(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmpq	*%rcx                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DA9030_VBATMON,4,2             ## @DA9030_VBATMON
	.no_dead_strip	_da9030_battery_vbat_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function da9030_battery_vbat_event
_da9030_battery_vbat_event:             ; @da9030_battery_vbat_event
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x1, x0, #24
	bl	_da9030_read_adc
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldr	x8, [x19, #24]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.ge	LBB0_4
; %bb.3:
	ldr	w0, [x19, #40]
Lloh0:
	adrp	x8, _DA9030_VBATMON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DA9030_VBATMON@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x2, [x19, #16]
	bl	_da903x_write
	ldr	x0, [x19, #32]
	cbnz	x0, LBB0_6
	b	LBB0_1
LBB0_4:
	ldr	x9, [x19, #16]
	cmp	x8, x9
	b.ge	LBB0_1
; %bb.5:
	ldr	x0, [x19]
	cbz	x0, LBB0_1
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	br	x0
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DA9030_VBATMON,4,2             ; @DA9030_VBATMON
	.no_dead_strip	_da9030_battery_vbat_event
.subsections_via_symbols
