	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intr_controller_register       ## -- Begin function intr_controller_register
	.p2align	4, 0x90
_intr_controller_register:              ## @intr_controller_register
	.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
	testl	%edi, %edi
	js	LBB0_4
## %bb.1:
	movl	%edi, %ebx
	movq	_IV_MAX@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jle	LBB0_4
## %bb.2:
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	_intr_table_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_sx_xlock
	movq	_intr_vectors@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	%ebx, %r14d
	shlq	$5, %r14
	movq	8(%r13,%r14), %r12
	movq	%r12, -48(%rbp)
	movq	%r15, %rdi
	callq	_sx_xunlock
	testq	%r12, %r12
	je	LBB0_7
LBB0_3:
	movq	_EEXIST@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	(%r14,%r13), %r15
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	(%r12), %r9d
	movq	_intr_assign_cpu@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	L_.str(%rip), %r10
	leaq	-48(%rbp), %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	pushq	%rbx
	pushq	%r10
	pushq	%rax
	pushq	%r9
	callq	_intr_event_create
	addq	$32, %rsp
	testl	%eax, %eax
	jne	LBB0_6
## %bb.8:
	leaq	(%r14,%r13), %rbx
	addq	$8, %rbx
	movq	_intr_table_lock@GOTPCREL(%rip), %rdi
	callq	_sx_xlock
	cmpq	$0, (%rbx)
	je	LBB0_10
## %bb.9:
	movq	_intr_table_lock@GOTPCREL(%rip), %rdi
	callq	_sx_xunlock
	movq	-48(%rbp), %rdi
	callq	_intr_event_destroy
	jmp	LBB0_3
LBB0_10:
	movq	%r12, 24(%r13,%r14)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r13,%r14)
	movq	-48(%rbp), %rax
	movq	%rax, (%rbx)
	movq	_mid@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PCPU_GET
	movl	%eax, (%r15)
	movq	_intr_table_lock@GOTPCREL(%rip), %rdi
	callq	_sx_xunlock
	xorl	%eax, %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_IV_MAX,4,2                     ## @IV_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_intr_table_lock,4,2            ## @intr_table_lock
	.comm	_intr_vectors,8,3               ## @intr_vectors
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_intr_assign_cpu,4,2            ## @intr_assign_cpu
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vec%d:"

	.comm	_mid,4,2                        ## @mid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intr_controller_register       ; -- Begin function intr_controller_register
	.p2align	2
_intr_controller_register:              ; @intr_controller_register
	.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
	tbnz	w0, #31, LBB0_4
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x8, _IV_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IV_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.le	LBB0_4
; %bb.2:
	mov	x19, x2
	mov	x20, x1
Lloh3:
	adrp	x23, _intr_table_lock@GOTPAGE
Lloh4:
	ldr	x23, [x23, _intr_table_lock@GOTPAGEOFF]
	mov	x0, x23
	bl	_sx_xlock
Lloh5:
	adrp	x8, _intr_vectors@GOTPAGE
Lloh6:
	ldr	x8, [x8, _intr_vectors@GOTPAGEOFF]
Lloh7:
	ldr	x24, [x8]
	mov	w26, w22
	add	x21, x24, x26, lsl #5
	mov	x25, x21
	ldr	x27, [x25, #8]!
	str	x27, [sp, #24]
	mov	x0, x23
	bl	_sx_xunlock
	cbz	x27, LBB0_7
LBB0_3:
Lloh8:
	adrp	x8, _EEXIST@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
LBB0_6:
	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
LBB0_7:
	ldr	w5, [x20]
Lloh12:
	adrp	x8, _intr_assign_cpu@GOTPAGE
Lloh13:
	ldr	x8, [x8, _intr_assign_cpu@GOTPAGEOFF]
Lloh14:
	ldr	w7, [x8]
	str	w22, [sp, #8]
Lloh15:
	adrp	x8, l_.str@PAGE
Lloh16:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [sp]
	add	x0, sp, #24
	mov	x1, x21
	mov	w2, #0
	mov	x3, x22
	mov	x4, #0
	mov	x6, x5
	bl	_intr_event_create
	cbnz	w0, LBB0_6
; %bb.8:
Lloh17:
	adrp	x0, _intr_table_lock@GOTPAGE
Lloh18:
	ldr	x0, [x0, _intr_table_lock@GOTPAGEOFF]
	bl	_sx_xlock
	ldr	x8, [x25]
	cbz	x8, LBB0_10
; %bb.9:
Lloh19:
	adrp	x0, _intr_table_lock@GOTPAGE
Lloh20:
	ldr	x0, [x0, _intr_table_lock@GOTPAGEOFF]
	bl	_sx_xunlock
	ldr	x0, [sp, #24]
	bl	_intr_event_destroy
	b	LBB0_3
LBB0_10:
	add	x8, x24, x26, lsl #5
	stp	x19, x20, [x8, #16]
	ldr	x8, [sp, #24]
	str	x8, [x25]
Lloh21:
	adrp	x8, _mid@GOTPAGE
Lloh22:
	ldr	x8, [x8, _mid@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_PCPU_GET
	str	w0, [x21]
Lloh24:
	adrp	x0, _intr_table_lock@GOTPAGE
Lloh25:
	ldr	x0, [x0, _intr_table_lock@GOTPAGEOFF]
	bl	_sx_xunlock
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_IV_MAX,4,2                     ; @IV_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_intr_table_lock,4,2            ; @intr_table_lock
	.comm	_intr_vectors,8,3               ; @intr_vectors
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_intr_assign_cpu,4,2            ; @intr_assign_cpu
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vec%d:"

	.comm	_mid,4,2                        ; @mid
.subsections_via_symbols
