	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nexus_setup_intr
_nexus_setup_intr:                      ## @nexus_setup_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
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	24(%rbp), %rbx
	testq	%rdx, %rdx
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_2:
	movq	$0, (%rbx)
	movq	%r15, %rdi
	callq	_rman_get_flags
	movq	_RF_SHAREABLE@GOTPCREL(%rip), %rcx
	xorl	%r13d, %r13d
	andl	(%rcx), %eax
	jne	LBB0_4
## %bb.3:
	movq	_INTR_EXCL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_4:
	movq	%r15, %rdi
	callq	_rman_activate_resource
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	movq	16(%rbp), %rbx
	orl	%r14d, %r13d
	leaq	-44(%rbp), %rsi
	movl	%r12d, %edi
	callq	_bus_get_domain
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	$0, -44(%rbp)
LBB0_7:
	movl	%r12d, %edi
	callq	_device_get_nameunit
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_rman_get_start
	movl	-44(%rbp), %r10d
	movl	%r14d, %edi
	movl	%eax, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rbx, %r8
	movl	%r13d, %r9d
	pushq	%r10
	pushq	24(%rbp)
	callq	_intr_add_handler
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	24(%rbp), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_rman_set_irq_cookie
	xorl	%eax, %eax
LBB0_9:
	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:                                 ## @.str
	.asciz	"nexus_setup_intr: NULL irq resource!"

	.comm	_RF_SHAREABLE,4,2               ## @RF_SHAREABLE
	.comm	_INTR_EXCL,4,2                  ## @INTR_EXCL
	.no_dead_strip	_nexus_setup_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nexus_setup_intr
_nexus_setup_intr:                      ; @nexus_setup_intr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x7
	mov	x21, x6
	mov	x22, x5
	mov	x23, x4
	mov	x25, x3
	mov	x20, x2
	mov	x24, x1
	cbnz	x2, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_2:
	str	xzr, [x19]
	mov	x0, x20
	bl	_rman_get_flags
Lloh2:
	adrp	x8, _RF_SHAREABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RF_SHAREABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _INTR_EXCL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _INTR_EXCL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w8, w0
	csel	w26, w9, wzr, eq
	mov	x0, x20
	bl	_rman_activate_resource
	cbnz	w0, LBB0_7
; %bb.3:
	orr	w25, w26, w25
	add	x1, sp, #12
	mov	x0, x24
	bl	_bus_get_domain
	cbz	x0, LBB0_5
; %bb.4:
	str	wzr, [sp, #12]
LBB0_5:
	mov	x0, x24
	bl	_device_get_nameunit
	mov	x24, x0
	mov	x0, x20
	bl	_rman_get_start
	mov	x1, x0
	ldr	w7, [sp, #12]
	mov	x0, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	mov	x5, x25
	mov	x6, x19
	bl	_intr_add_handler
	cbnz	w0, LBB0_7
; %bb.6:
	ldr	x1, [x19]
	mov	x0, x20
	bl	_rman_set_irq_cookie
	mov	w0, #0
LBB0_7:
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nexus_setup_intr: NULL irq resource!"

	.comm	_RF_SHAREABLE,4,2               ; @RF_SHAREABLE
	.comm	_INTR_EXCL,4,2                  ; @INTR_EXCL
	.no_dead_strip	_nexus_setup_intr
.subsections_via_symbols
