	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lp8788_set_irqs
_lp8788_set_irqs:                       ## @lp8788_set_irqs
	.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	%rdx, %r14
	movq	%rsi, %r12
	movq	16(%rsi), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_IORESOURCE_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_platform_get_resource_byname
	xorl	%r13d, %r13d
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movl	(%rax), %ebx
	movl	4(%rax), %r15d
	cmpl	%r15d, %ebx
	jg	LBB0_9
## %bb.2:
	incl	%r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r12), %r13
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_irq_create_mapping
	movq	8(%r12), %rcx
	movl	%eax, (%rcx,%r13,8)
	movl	%ebx, 4(%rcx,%r13,8)
	incl	(%r12)
	movq	_lp8788_charger_irq_thread@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	movq	%r14, %r8
	movq	%r12, %r9
	callq	_request_threaded_irq
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	cmpl	%ebx, %r15d
	jne	LBB0_3
## %bb.5:
	xorl	%r13d, %r13d
	jmp	LBB0_9
LBB0_6:
	movl	%eax, %r13d
	cmpl	$0, (%r12)
	jle	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movl	(%rax,%rbx,8), %edi
	movq	%r12, %rsi
	callq	_free_irq
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_8
LBB0_9:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_IRQ,4,2             ## @IORESOURCE_IRQ
	.comm	_lp8788_charger_irq_thread,4,2  ## @lp8788_charger_irq_thread
	.no_dead_strip	_lp8788_set_irqs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lp8788_set_irqs
_lp8788_set_irqs:                       ; @lp8788_set_irqs
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x2
	mov	x19, x1
	ldr	x8, [x1, #16]
	ldr	x21, [x8]
Lloh0:
	adrp	x8, _IORESOURCE_IRQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_IRQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_platform_get_resource_byname
	cbz	x0, LBB0_5
; %bb.1:
	ldp	w22, w8, [x0]
	cmp	w22, w8
	b.gt	LBB0_5
; %bb.2:
	add	w24, w8, #1
Lloh3:
	adrp	x25, _lp8788_charger_irq_thread@GOTPAGE
Lloh4:
	ldr	x25, [x25, _lp8788_charger_irq_thread@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x23, [x19]
	mov	x0, x21
	mov	x1, x22
	bl	_irq_create_mapping
	ldr	x8, [x19, #8]
	add	x8, x8, x23, lsl #3
	stp	w0, w22, [x8]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	w2, [x25]
	mov	x1, #0
	mov	w3, #0
	mov	x4, x20
	mov	x5, x19
	bl	_request_threaded_irq
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w22, w22, #1
	cmp	w24, w22
	b.ne	LBB0_3
LBB0_5:
	mov	w23, #0
LBB0_6:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x23, x0
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.8:
	mov	x20, #0
	mov	x21, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x20]
	mov	x1, x19
	bl	_free_irq
	add	x21, x21, #1
	ldrsw	x8, [x19]
	add	x20, x20, #8
	cmp	x21, x8
	b.lt	LBB0_9
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_IRQ,4,2             ; @IORESOURCE_IRQ
	.comm	_lp8788_charger_irq_thread,4,2  ; @lp8788_charger_irq_thread
	.no_dead_strip	_lp8788_set_irqs
.subsections_via_symbols
