	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function macio_add_intr
_macio_add_intr:                        ## @macio_add_intr
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$6, (%rsi)
	jl	LBB0_1
## %bb.12:
	leaq	L_str(%rip), %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_puts                           ## TAILCALL
LBB0_1:
	movq	%rsi, %r12
	movl	%edi, %r15d
	leaq	L_.str.1(%rip), %rsi
	leaq	-56(%rbp), %rcx
	movl	$4, %edx
	callq	_OF_getprop_alloc_multi
	movl	%eax, %r14d
	cmpl	$-1, %eax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str.2(%rip), %rsi
	leaq	-56(%rbp), %rcx
	movl	%r15d, %edi
	movl	$4, %edx
	callq	_OF_getprop_alloc_multi
	movl	%eax, %r14d
	cmpl	$-1, %eax
	je	LBB0_11
LBB0_3:
	movq	-56(%rbp), %rax
	cmpl	$-1, (%rax)
	je	LBB0_11
## %bb.4:
	leaq	L_.str.3(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movl	%r15d, %edi
	movl	$4, %ecx
	callq	_OF_getprop
	testq	%rax, %rax
	jg	LBB0_6
## %bb.5:
	leaq	L_.str.4(%rip), %rdi
	callq	_panic
LBB0_6:
	movl	-48(%rbp), %edi
	callq	_OF_node_from_xref
	leaq	L_.str.5(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movl	%eax, %edi
	movl	$4, %ecx
	callq	_OF_getprop
	testq	%rax, %rax
	jg	LBB0_8
## %bb.7:
	movl	$1, -44(%rbp)
LBB0_8:
	testl	%r14d, %r14d
	jle	LBB0_11
## %bb.9:
	leaq	16(%r12), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	-48(%rbp), %edi
	movq	-56(%rbp), %rax
	movslq	%ebx, %rbx
	movl	(%rax,%rbx,4), %esi
	callq	_MAP_IRQ
	movl	%eax, %r13d
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%r15, %rdi
	movl	%r13d, %ecx
	movl	%r13d, %r8d
	movl	$1, %r9d
	callq	_resource_list_add
	movq	8(%r12), %rax
	movslq	(%r12), %rcx
	movl	%r13d, (%rax,%rcx,4)
	incl	(%r12)
	addl	-44(%rbp), %ebx
	cmpl	%r14d, %ebx
	jl	LBB0_10
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"interrupts"

L_.str.2:                               ## @.str.2
	.asciz	"AAPL,interrupts"

L_.str.3:                               ## @.str.3
	.asciz	"interrupt-parent"

L_.str.4:                               ## @.str.4
	.asciz	"Interrupt but no interrupt parent!\n"

L_.str.5:                               ## @.str.5
	.asciz	"#interrupt-cells"

	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
L_str:                                  ## @str
	.asciz	"macio: device has more than 6 interrupts"

	.no_dead_strip	_macio_add_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function macio_add_intr
_macio_add_intr:                        ; @macio_add_intr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	ldr	w8, [x1]
	cmp	w8, #6
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_str@PAGE
Lloh1:
	add	x0, x0, l_str@PAGEOFF
	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
	add	sp, sp, #96
	b	_puts
LBB0_2:
	mov	x19, x1
	mov	x21, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x3, sp, #16
	mov	w2, #4
	bl	_OF_getprop_alloc_multi
	mov	x20, x0
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x3, sp, #16
	mov	x0, x21
	mov	w2, #4
	bl	_OF_getprop_alloc_multi
	mov	x20, x0
	cmn	w0, #1
	b.eq	LBB0_12
LBB0_4:
	ldr	x8, [sp, #16]
	ldr	w8, [x8]
	cmn	w8, #1
	b.eq	LBB0_12
; %bb.5:
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x2, sp, #28
	mov	x0, x21
	mov	w3, #4
	bl	_OF_getprop
	cmp	x0, #0
	b.gt	LBB0_7
; %bb.6:
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_panic
LBB0_7:
	ldr	w0, [sp, #28]
	bl	_OF_node_from_xref
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	add	x2, sp, #12
	mov	w3, #4
	bl	_OF_getprop
	cmp	x0, #0
	b.gt	LBB0_9
; %bb.8:
	mov	w8, #1
	str	w8, [sp, #12]
LBB0_9:
	cmp	w20, #1
	b.lt	LBB0_12
; %bb.10:
	mov	w23, #0
	add	x21, x19, #16
Lloh12:
	adrp	x24, _SYS_RES_IRQ@GOTPAGE
Lloh13:
	ldr	x24, [x24, _SYS_RES_IRQ@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [sp, #28]
	ldr	x8, [sp, #16]
	ldr	w1, [x8, w23, sxtw #2]
	bl	_MAP_IRQ
	mov	x22, x0
	ldr	w1, [x24]
	ldr	w2, [x19]
	mov	x0, x21
	mov	x3, x22
	mov	x4, x22
	mov	w5, #1
	bl	_resource_list_add
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	str	w22, [x8, x9, lsl #2]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	w8, [sp, #12]
	add	w23, w8, w23
	cmp	w23, w20
	b.lt	LBB0_11
LBB0_12:
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"interrupts"

l_.str.2:                               ; @.str.2
	.asciz	"AAPL,interrupts"

l_.str.3:                               ; @.str.3
	.asciz	"interrupt-parent"

l_.str.4:                               ; @.str.4
	.asciz	"Interrupt but no interrupt parent!\n"

l_.str.5:                               ; @.str.5
	.asciz	"#interrupt-cells"

	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
l_str:                                  ; @str
	.asciz	"macio: device has more than 6 interrupts"

	.no_dead_strip	_macio_add_intr
.subsections_via_symbols
