	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function unin_chip_add_intr
_unin_chip_add_intr:                    ## @unin_chip_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.16:
	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	-64(%rbp), %rcx
	movl	$4, %edx
	callq	_OF_getprop_alloc_multi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	$-1, %eax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str.2(%rip), %rsi
	leaq	-64(%rbp), %rcx
	movl	%r15d, %edi
	movl	$4, %edx
	callq	_OF_getprop_alloc_multi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	$-1, %eax
	je	LBB0_15
LBB0_3:
	movq	-64(%rbp), %rax
	cmpl	$-1, (%rax)
	je	LBB0_15
## %bb.4:
	leaq	L_.str.3(%rip), %rsi
	leaq	-52(%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	-52(%rbp), %edi
	leaq	L_.str.5(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movl	$4, %ecx
	callq	_OF_searchprop
	testq	%rax, %rax
	jg	LBB0_8
## %bb.7:
	movl	$1, -48(%rbp)
LBB0_8:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_15
## %bb.9:
	leaq	16(%r12), %r15
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	(%rax), %esi
	movq	_INTR_POLARITY_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %edi
	callq	_powerpc_config_intr
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%r12), %rax
	movslq	(%r12), %rcx
	movl	%r13d, (%rax,%rcx,4)
	incl	(%r12)
	addl	-48(%rbp), %ebx
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	jge	LBB0_15
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	-52(%rbp), %edi
	movq	-64(%rbp), %rax
	movslq	%ebx, %r14
	movl	(%rax,%r14,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
	cmpl	$2, -48(%rbp)
	jl	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-64(%rbp), %rax
	testb	$1, 4(%rax,%r14,4)
	movq	_INTR_TRIGGER_LEVEL@GOTPCREL(%rip), %rax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_INTR_TRIGGER_EDGE@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_15:
	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
	.comm	_INTR_TRIGGER_LEVEL,4,2         ## @INTR_TRIGGER_LEVEL
	.comm	_INTR_TRIGGER_EDGE,4,2          ## @INTR_TRIGGER_EDGE
	.comm	_INTR_POLARITY_LOW,4,2          ## @INTR_POLARITY_LOW
L_str:                                  ## @str
	.asciz	"unin: device has more than 6 interrupts"

	.no_dead_strip	_unin_chip_add_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function unin_chip_add_intr
_unin_chip_add_intr:                    ; @unin_chip_add_intr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	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, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	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_14
LBB0_4:
	ldr	x8, [sp, #16]
	ldr	w8, [x8]
	cmn	w8, #1
	b.eq	LBB0_14
; %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]
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	add	x2, sp, #12
	mov	w3, #4
	bl	_OF_searchprop
	cmp	x0, #0
	b.gt	LBB0_9
; %bb.8:
	mov	w8, #1
	str	w8, [sp, #12]
LBB0_9:
	cmp	w20, #1
	b.lt	LBB0_14
; %bb.10:
	mov	w8, #0
	add	x21, x19, #16
Lloh12:
	adrp	x23, _SYS_RES_IRQ@GOTPAGE
Lloh13:
	ldr	x23, [x23, _SYS_RES_IRQ@GOTPAGEOFF]
Lloh14:
	adrp	x24, _INTR_TRIGGER_LEVEL@GOTPAGE
Lloh15:
	ldr	x24, [x24, _INTR_TRIGGER_LEVEL@GOTPAGEOFF]
Lloh16:
	adrp	x25, _INTR_TRIGGER_EDGE@GOTPAGE
Lloh17:
	ldr	x25, [x25, _INTR_TRIGGER_EDGE@GOTPAGEOFF]
Lloh18:
	adrp	x26, _INTR_POLARITY_LOW@GOTPAGE
Lloh19:
	ldr	x26, [x26, _INTR_POLARITY_LOW@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	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	w8, w8, w27
	cmp	w8, w20
	b.ge	LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [sp, #28]
	ldr	x9, [sp, #16]
	sxtw	x27, w8
	ldr	w1, [x9, w8, sxtw #2]
	bl	_MAP_IRQ
	mov	x22, x0
	ldr	w1, [x23]
	ldr	w2, [x19]
	mov	x0, x21
	mov	x3, x22
	mov	x4, x22
	mov	w5, #1
	bl	_resource_list_add
	ldr	w8, [sp, #12]
	cmp	w8, #2
	b.lt	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [sp, #16]
	add	x8, x8, x27, lsl #2
	ldr	w8, [x8, #4]
	tst	w8, #0x1
	csel	x8, x25, x24, eq
	ldr	w1, [x8]
	ldr	w2, [x26]
	mov	x0, x22
	bl	_powerpc_config_intr
	b	LBB0_11
LBB0_14:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	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	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.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
	.comm	_INTR_TRIGGER_LEVEL,4,2         ; @INTR_TRIGGER_LEVEL
	.comm	_INTR_TRIGGER_EDGE,4,2          ; @INTR_TRIGGER_EDGE
	.comm	_INTR_POLARITY_LOW,4,2          ; @INTR_POLARITY_LOW
l_str:                                  ; @str
	.asciz	"unin: device has more than 6 interrupts"

	.no_dead_strip	_unin_chip_add_intr
.subsections_via_symbols
