	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_register_msgring_handler       ## -- Begin function register_msgring_handler
	.p2align	4, 0x90
_register_msgring_handler:              ## @register_msgring_handler
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %r13d
	movl	%edi, %r12d
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	movq	%r15, %rcx
	movq	%r14, %r8
	callq	_printf
LBB0_2:
	testl	%r12d, %r12d
	setns	%al
	cmpl	%r13d, %r12d
	setle	%cl
	movq	_MSGRNG_NSTATIONS@GOTPCREL(%rip), %rdx
	cmpl	%r13d, (%rdx)
	setg	%dl
	andb	%al, %cl
	andb	%dl, %cl
	movzbl	%cl, %edi
	movslq	%r13d, %rsi
	callq	_KASSERT
	movq	_msgmap_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_lock_spin
	cmpl	%r13d, %r12d
	jg	LBB0_5
## %bb.3:
	movslq	%r12d, %rbx
	shlq	$4, %rbx
	subl	%r12d, %r13d
	incl	%r13d
	movq	_msgmap@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	8(%rax,%rbx), %rsi
	xorl	%edi, %edi
	testq	%rsi, %rsi
	sete	%dil
	callq	_KASSERT
	movq	(%r12), %rax
	movq	%r15, 8(%rax,%rbx)
	movq	(%r12), %rax
	movq	%r14, (%rax,%rbx)
	addq	$16, %rbx
	decl	%r13d
	jne	LBB0_4
LBB0_5:
	movq	_msgmap_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_unlock_spin
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Register handler %d-%d %p(%p)\n"

	.comm	_MSGRNG_NSTATIONS,4,2           ## @MSGRNG_NSTATIONS
	.comm	_msgmap_lock,4,2                ## @msgmap_lock
	.comm	_msgmap,8,3                     ## @msgmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_register_msgring_handler       ; -- Begin function register_msgring_handler
	.p2align	2
_register_msgring_handler:              ; @register_msgring_handler
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _bootverbose@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	bl	_printf
LBB0_2:
	cmp	w22, #0
	cset	w8, ge
	cmp	w22, w21
	cset	w9, le
Lloh5:
	adrp	x10, _MSGRNG_NSTATIONS@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MSGRNG_NSTATIONS@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	w10, w21
	cset	w10, gt
	and	w8, w8, w9
	and	w0, w8, w10
	sxtw	x1, w21
	bl	_KASSERT
Lloh8:
	adrp	x0, _msgmap_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _msgmap_lock@GOTPAGEOFF]
	bl	_mtx_lock_spin
	cmp	w22, w21
	b.gt	LBB0_5
; %bb.3:
	sbfiz	x23, x22, #4, #32
	sub	w8, w21, w22
	add	w21, w8, #1
Lloh10:
	adrp	x22, _msgmap@GOTPAGE
Lloh11:
	ldr	x22, [x22, _msgmap@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x8, x8, x23
	ldr	x1, [x8, #8]
	cmp	x1, #0
	cset	w0, eq
	bl	_KASSERT
	ldr	x8, [x22]
	add	x8, x8, x23
	str	x20, [x8, #8]
	ldr	x8, [x22]
	str	x19, [x8, x23]
	add	x23, x23, #16
	subs	w21, w21, #1
	b.ne	LBB0_4
LBB0_5:
Lloh12:
	adrp	x0, _msgmap_lock@GOTPAGE
Lloh13:
	ldr	x0, [x0, _msgmap_lock@GOTPAGEOFF]
	bl	_mtx_unlock_spin
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Register handler %d-%d %p(%p)\n"

	.comm	_MSGRNG_NSTATIONS,4,2           ; @MSGRNG_NSTATIONS
	.comm	_msgmap_lock,4,2                ; @msgmap_lock
	.comm	_msgmap,8,3                     ; @msgmap
.subsections_via_symbols
