	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intr_setup
_intr_setup:                            ## @intr_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	$0, -12(%rbp)
	movl	4(%rdi), %edi
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-12(%rbp), %rdx
	callq	_bus_alloc_resource_any
	movq	16(%rbx), %rcx
	movq	_IRQRES@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rax, (%rcx,%rdx,8)
	movq	16(%rbx), %rax
	movq	(%rax,%rdx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	_INTR_TYPE_MISC@GOTPCREL(%rip), %rax
	movq	_INTR_MPSAFE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	4(%rbx), %edi
	movq	_tempmon_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	8(%rbx), %rax
	movq	%rax, (%rsp)
	xorl	%r8d, %r8d
	movq	%rbx, %r9
	callq	_bus_setup_intr
	jmp	LBB0_3
LBB0_2:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_device_printf
LBB0_3:
	movq	%rbx, %rdi
	callq	_config_intrhook_disestablish
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.comm	_IRQRES,8,3                     ## @IRQRES
	.comm	_INTR_TYPE_MISC,4,2             ## @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ## @INTR_MPSAFE
	.comm	_tempmon_intr,4,2               ## @tempmon_intr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot allocate IRQ resource\n"

	.no_dead_strip	_intr_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intr_setup
_intr_setup:                            ; @intr_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	str	wzr, [sp, #12]
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x8, _SYS_RES_IRQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYS_RES_IRQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	add	x2, sp, #12
	bl	_bus_alloc_resource_any
	ldr	x8, [x19, #16]
Lloh6:
	adrp	x9, _IRQRES@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IRQRES@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	lsl	x9, x9, #3
	str	x0, [x8, x9]
	ldr	x8, [x19, #16]
	ldr	x1, [x8, x9]
	cbz	x1, LBB0_2
; %bb.1:
	ldr	w0, [x19, #4]
Lloh9:
	adrp	x8, _INTR_TYPE_MISC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _INTR_TYPE_MISC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _INTR_MPSAFE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _INTR_MPSAFE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh15:
	adrp	x8, _tempmon_intr@GOTPAGE
Lloh16:
	ldr	x8, [x8, _tempmon_intr@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	add	x6, x19, #8
	mov	x4, #0
	mov	x5, x19
	bl	_bus_setup_intr
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19, #4]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_device_printf
LBB0_3:
	mov	x0, x19
	bl	_config_intrhook_disestablish
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.comm	_IRQRES,8,3                     ; @IRQRES
	.comm	_INTR_TYPE_MISC,4,2             ; @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ; @INTR_MPSAFE
	.comm	_tempmon_intr,4,2               ; @tempmon_intr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot allocate IRQ resource\n"

	.no_dead_strip	_intr_setup
.subsections_via_symbols
