	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pm860x_batt_handler
_pm860x_batt_handler:                   ## @pm860x_batt_handler
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	leaq	4(%rsi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	12(%rbx), %edi
	movq	_PM8607_STATUS_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pm860x_reg_read
	movq	_STATUS2_BAT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	movl	%edx, (%rbx)
	jne	LBB0_1
## %bb.2:
	movq	_PM860X_TEMP_TINT@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_PM860X_TEMP_TBAT@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_ccnt_data@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_clear_ccnt
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PM8607_STATUS_2,4,2            ## @PM8607_STATUS_2
	.comm	_STATUS2_BAT,4,2                ## @STATUS2_BAT
	.comm	_PM860X_TEMP_TBAT,4,2           ## @PM860X_TEMP_TBAT
	.comm	_PM860X_TEMP_TINT,4,2           ## @PM860X_TEMP_TINT
	.comm	_ccnt_data,4,2                  ## @ccnt_data
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_pm860x_batt_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pm860x_batt_handler
_pm860x_batt_handler:                   ; @pm860x_batt_handler
	.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, x1
	add	x20, x1, #4
	mov	x0, x20
	bl	_mutex_lock
	ldr	w0, [x19, #12]
Lloh0:
	adrp	x8, _PM8607_STATUS_2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PM8607_STATUS_2@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_pm860x_reg_read
Lloh3:
	adrp	x8, _STATUS2_BAT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STATUS2_BAT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, ne
Lloh6:
	adrp	x9, _PM860X_TEMP_TINT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PM860X_TEMP_TINT@GOTPAGEOFF]
	str	w8, [x19]
Lloh8:
	adrp	x8, _PM860X_TEMP_TBAT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PM860X_TEMP_TBAT@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [x19, #8]
	mov	x0, x20
	bl	_mutex_unlock
Lloh10:
	adrp	x1, _ccnt_data@GOTPAGE
Lloh11:
	ldr	x1, [x1, _ccnt_data@GOTPAGEOFF]
	mov	x0, x19
	bl	_clear_ccnt
Lloh12:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PM8607_STATUS_2,4,2            ; @PM8607_STATUS_2
	.comm	_STATUS2_BAT,4,2                ; @STATUS2_BAT
	.comm	_PM860X_TEMP_TBAT,4,2           ; @PM860X_TEMP_TBAT
	.comm	_PM860X_TEMP_TINT,4,2           ; @PM860X_TEMP_TINT
	.comm	_ccnt_data,4,2                  ; @ccnt_data
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_pm860x_batt_handler
.subsections_via_symbols
