	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goldfish_battery_interrupt
_goldfish_battery_interrupt:            ## @goldfish_battery_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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rsi, %rdi
	callq	_spin_lock_irqsave
	movq	_BATTERY_INT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_GOLDFISH_BATTERY_READ
	movl	%eax, %ebx
	movq	_BATTERY_INT_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_BATTERY_STATUS_CHANGED@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_2
## %bb.1:
	movl	8(%r14), %edi
	callq	_power_supply_changed
LBB0_2:
	movq	_AC_STATUS_CHANGED@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.3:
	movl	4(%r14), %edi
	callq	_power_supply_changed
LBB0_4:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	testl	%ebx, %ebx
	jne	LBB0_5
## %bb.6:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BATTERY_INT_STATUS,4,2         ## @BATTERY_INT_STATUS
	.comm	_BATTERY_INT_MASK,4,2           ## @BATTERY_INT_MASK
	.comm	_BATTERY_STATUS_CHANGED,4,2     ## @BATTERY_STATUS_CHANGED
	.comm	_AC_STATUS_CHANGED,4,2          ## @AC_STATUS_CHANGED
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.no_dead_strip	_goldfish_battery_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function goldfish_battery_interrupt
_goldfish_battery_interrupt:            ; @goldfish_battery_interrupt
	.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
	mov	x0, x1
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _BATTERY_INT_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BATTERY_INT_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_GOLDFISH_BATTERY_READ
Lloh3:
	adrp	x8, _BATTERY_INT_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BATTERY_INT_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w20, w8, w0
Lloh6:
	adrp	x8, _BATTERY_STATUS_CHANGED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BATTERY_STATUS_CHANGED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w20, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
	bl	_power_supply_changed
LBB0_2:
Lloh9:
	adrp	x8, _AC_STATUS_CHANGED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AC_STATUS_CHANGED@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19, #4]
	bl	_power_supply_changed
LBB0_4:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh12:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh14:
	adrp	x9, _IRQ_NONE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IRQ_NONE@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_BATTERY_INT_STATUS,4,2         ; @BATTERY_INT_STATUS
	.comm	_BATTERY_INT_MASK,4,2           ; @BATTERY_INT_MASK
	.comm	_BATTERY_STATUS_CHANGED,4,2     ; @BATTERY_STATUS_CHANGED
	.comm	_AC_STATUS_CHANGED,4,2          ; @AC_STATUS_CHANGED
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.no_dead_strip	_goldfish_battery_interrupt
.subsections_via_symbols
