	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fuel_gauge_init_irq
_fuel_gauge_init_irq:                   ## @fuel_gauge_init_irq
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_AXP288_FG_INTR_NUM@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_8
## %bb.1:
	movq	%rdi, %r14
	movl	$1, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rdi
	movl	%r13d, %esi
	callq	_platform_get_irq
	movl	%eax, %r12d
	movl	16(%r14), %edi
	movl	%eax, %esi
	callq	_regmap_irq_get_virq
	movq	(%r14), %rcx
	movl	%eax, (%rcx,%r13,4)
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_fuel_gauge_thread_handler@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_DEV_NAME@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r14, %r9
	callq	_request_threaded_irq
	testl	%eax, %eax
	jne	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rax
	movq	8(%r14), %rdi
	movl	(%rax,%r13,4), %ecx
	leaq	L_.str.2(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_info
	incq	%r13
	movslq	(%r15), %rax
	incq	%rbx
	cmpq	%rax, %r13
	jl	LBB0_2
	jmp	LBB0_8
LBB0_3:
	movl	%r13d, %r15d
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_dev_warn
	movq	(%r14), %rax
	leaq	(%rax,%r15,4), %r15
	jmp	LBB0_6
LBB0_5:
	movq	(%r14), %rax
	movq	8(%r14), %rdi
	movl	%r13d, %r15d
	shlq	$2, %r15
	movl	(%rax,%r15), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_warn
	movq	(%r14), %rax
	addq	%rax, %r15
LBB0_6:
	movl	$-1, (%r15)
	testl	%r13d, %r13d
	je	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	-8(%rax,%rbx,4), %edi
	movq	%r14, %rsi
	callq	_free_irq
	movq	(%r14), %rax
	movl	$-1, -8(%rax,%rbx,4)
	decq	%rbx
	cmpq	$1, %rbx
	ja	LBB0_7
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AXP288_FG_INTR_NUM,4,2         ## @AXP288_FG_INTR_NUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"regmap_irq get virq failed for IRQ %d: %d\n"

	.comm	_fuel_gauge_thread_handler,4,2  ## @fuel_gauge_thread_handler
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
	.comm	_DEV_NAME,4,2                   ## @DEV_NAME
L_.str.1:                               ## @.str.1
	.asciz	"request irq failed for IRQ %d: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"HW IRQ %d -> VIRQ %d\n"

	.no_dead_strip	_fuel_gauge_init_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fuel_gauge_init_irq
_fuel_gauge_init_irq:                   ; @fuel_gauge_init_irq
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x24, _AXP288_FG_INTR_NUM@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AXP288_FG_INTR_NUM@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x19, x0
	mov	x23, #0
	mov	x22, #-1
Lloh2:
	adrp	x25, _fuel_gauge_thread_handler@GOTPAGE
Lloh3:
	ldr	x25, [x25, _fuel_gauge_thread_handler@GOTPAGEOFF]
Lloh4:
	adrp	x26, _IRQF_ONESHOT@GOTPAGE
Lloh5:
	ldr	x26, [x26, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh6:
	adrp	x27, _DEV_NAME@GOTPAGE
Lloh7:
	ldr	x27, [x27, _DEV_NAME@GOTPAGEOFF]
Lloh8:
	adrp	x20, l_.str.2@PAGE
Lloh9:
	add	x20, x20, l_.str.2@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #8]
	add	w1, w22, #1
	bl	_platform_get_irq
	mov	x21, x0
	ldr	w0, [x19, #16]
	mov	x1, x21
	bl	_regmap_irq_get_virq
	mov	x8, x0
	ldr	x9, [x19]
	str	w0, [x9, x23]
	tbnz	w0, #31, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w2, [x25]
	ldr	w3, [x26]
	ldr	w4, [x27]
	mov	x0, x8
	mov	x1, #0
	mov	x5, x19
	bl	_request_threaded_irq
	cbnz	w0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldp	x8, x0, [x19]
	ldr	w3, [x8, x23]
	mov	x1, x20
	mov	x2, x21
	bl	_dev_info
	ldrsw	x8, [x24]
	add	x9, x22, #2
	add	x22, x22, #1
	add	x23, x23, #4
	cmp	x9, x8
	b.lt	LBB0_2
	b	LBB0_9
LBB0_5:
	add	w20, w22, #1
	ldr	x0, [x19, #8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x8
	b	LBB0_7
LBB0_6:
	add	w20, w22, #1
	ldp	x8, x0, [x19]
	ldr	w3, [x8, x23]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
LBB0_7:
	bl	_dev_warn
	ldr	x8, [x19]
	mov	w21, #-1
	str	w21, [x8, x23]
	cbz	w20, LBB0_9
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x20, x22, #2
	ldr	w0, [x8, x20]
	mov	x1, x19
	bl	_free_irq
	ldr	x8, [x19]
	str	w21, [x8, x20]
	add	x9, x22, #1
	sub	x22, x22, #1
	cmp	x9, #1
	b.hi	LBB0_8
LBB0_9:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AXP288_FG_INTR_NUM,4,2         ; @AXP288_FG_INTR_NUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"regmap_irq get virq failed for IRQ %d: %d\n"

	.comm	_fuel_gauge_thread_handler,4,2  ; @fuel_gauge_thread_handler
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
	.comm	_DEV_NAME,4,2                   ; @DEV_NAME
l_.str.1:                               ; @.str.1
	.asciz	"request irq failed for IRQ %d: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"HW IRQ %d -> VIRQ %d\n"

	.no_dead_strip	_fuel_gauge_init_irq
.subsections_via_symbols
