	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sc27xx_fgu_interrupt
_sc27xx_fgu_interrupt:                  ## @sc27xx_fgu_interrupt
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	leaq	4(%rsi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	16(%rbx), %edi
	movq	_SC27XX_FGU_INT_STS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	leaq	-20(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movl	16(%rbx), %edi
	movq	_SC27XX_FGU_INT_CLR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	-20(%rbp), %ecx
	movl	%ecx, %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_2
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	(%rbx), %edi
	callq	_power_supply_changed
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	_SC27XX_FGU_LOW_OVERLOAD_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -20(%rbp)
	je	LBB0_5
## %bb.3:
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_sc27xx_fgu_get_capacity
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movl	-24(%rbp), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_sc27xx_fgu_capacity_calibration
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_SC27XX_FGU_INT_STS,8,3         ## @SC27XX_FGU_INT_STS
	.comm	_SC27XX_FGU_INT_CLR,8,3         ## @SC27XX_FGU_INT_CLR
	.comm	_SC27XX_FGU_LOW_OVERLOAD_INT,4,2 ## @SC27XX_FGU_LOW_OVERLOAD_INT
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_sc27xx_fgu_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sc27xx_fgu_interrupt
_sc27xx_fgu_interrupt:                  ; @sc27xx_fgu_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, #16]
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _SC27XX_FGU_INT_STS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SC27XX_FGU_INT_STS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	add	x2, sp, #8
	bl	_regmap_read
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #16]
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _SC27XX_FGU_INT_CLR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SC27XX_FGU_INT_CLR@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	ldr	w2, [sp, #8]
	mov	x3, x2
	bl	_regmap_update_bits
	cbz	w0, LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w0, [x19]
	bl	_power_supply_changed
Lloh6:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_3:
	ldr	w8, [sp, #8]
Lloh9:
	adrp	x9, _SC27XX_FGU_LOW_OVERLOAD_INT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SC27XX_FGU_LOW_OVERLOAD_INT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.4:
	add	x1, sp, #12
	mov	x0, x19
	bl	_sc27xx_fgu_get_capacity
	cbnz	w0, LBB0_2
; %bb.5:
	ldr	w1, [sp, #12]
	mov	x0, x19
	mov	w2, #1
	bl	_sc27xx_fgu_capacity_calibration
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SC27XX_FGU_INT_STS,8,3         ; @SC27XX_FGU_INT_STS
	.comm	_SC27XX_FGU_INT_CLR,8,3         ; @SC27XX_FGU_INT_CLR
	.comm	_SC27XX_FGU_LOW_OVERLOAD_INT,4,2 ; @SC27XX_FGU_LOW_OVERLOAD_INT
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_sc27xx_fgu_interrupt
.subsections_via_symbols
