	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_alloc_new_preloaded_user       ## -- Begin function alloc_new_preloaded_user
	.p2align	4, 0x90
_alloc_new_preloaded_user:              ## @alloc_new_preloaded_user
	.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
	movl	%esi, %ebx
	movl	%edi, %r14d
	xorl	%edi, %edi
	testl	%esi, %esi
	setg	%dil
	callq	_assert
	addl	$15, %ebx
	andl	$-16, %ebx
	movq	_MAX_USER_DATA@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_24
## %bb.1:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_loaded_users_max@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_udata@GOTPCREL(%rip), %rdi
	movq	_MAX_LOADED_USERS@GOTPCREL(%rip), %rbx
	movq	_loaded_users_cnt@GOTPCREL(%rip), %rsi
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	(%rdi), %rax
	movl	%eax, %r14d
	negl	%r14d
	andl	$15, %r14d
	addq	%rax, %r14
	testl	%ecx, %ecx
	jle	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_LoadedUsers@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	addq	$20, %r15
	xorl	%r12d, %r12d
	movl	$-1, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=2
	testl	%r13d, %r13d
	cmovsl	%r12d, %r13d
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=2
	incl	%r12d
	addq	$32, %r15
	cmpl	%ecx, %r12d
	jge	LBB0_14
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$0, -20(%r15)
	jle	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	-12(%r15), %rbx
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-4(%r15), %r8d
	movl	(%r15), %r9d
	movq	%r14, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	xorl	%edi, %edi
	cmpq	%r14, %rbx
	setae	%dil
	callq	_assert
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	%r14, %rax
	cmpq	%rax, %rbx
	jae	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=2
	movslq	-4(%r15), %rax
	addq	%rax, %rbx
	movq	_loaded_users_max@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$-1, %r13d
	movq	%rbx, %r14
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	testl	%r13d, %r13d
	movq	_loaded_users_cnt@GOTPCREL(%rip), %rsi
	movq	_udata@GOTPCREL(%rip), %rdi
	movq	_MAX_LOADED_USERS@GOTPCREL(%rip), %rbx
	js	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	(%rbx), %r13d
	jl	LBB0_17
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %r13d
	cmpl	(%rbx), %r13d
	jge	LBB0_23
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	%r14, %rax
	movq	_USER_DATA_BUFF@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	addq	(%rdi), %rdx
	cmpq	%rdx, %rax
	jbe	LBB0_18
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, (%rsi)
	je	LBB0_24
## %bb.26:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_loaded_users_size@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movl	$0, (%rsi)
	movq	_loaded_users_max@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	xorl	%ecx, %ecx
	jmp	LBB0_2
LBB0_24:
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_8:
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jle	LBB0_10
## %bb.9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edx
	movq	%r14, %rcx
	movl	%r12d, %r8d
	movl	%ebx, %r9d
	xorl	%eax, %eax
	callq	_fprintf
LBB0_10:
	movl	%r13d, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_assert
LBB0_22:
	movq	_LoadedUsers@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movslq	%r13d, %rbx
	shlq	$5, %rbx
	leaq	(%r15,%rbx), %r13
	movq	_loaded_users_cnt@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	$1, (%r15,%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 20(%r15,%rbx)
	movq	%r14, 8(%r15,%rbx)
	movl	%r12d, 16(%r15,%rbx)
	movq	_loaded_users_size@GOTPCREL(%rip), %rax
	addl	%r12d, (%rax)
	movq	_loaded_users_lru@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	incq	%rcx
	movq	%rcx, (%rax)
	movq	%r13, %rax
	movq	%rcx, 24(%r15,%rbx)
LBB0_25:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	cmpl	%ecx, %r13d
	jne	LBB0_20
## %bb.19:
	incl	%ecx
	movq	_loaded_users_max@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
LBB0_20:
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jle	LBB0_22
## %bb.21:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, (%rsp)
	leaq	L_.str.2(%rip), %rsi
	movl	%r13d, %edx
	movq	%r14, %r8
	movl	%r12d, %r9d
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_USER_DATA,4,2              ## @MAX_USER_DATA
	.comm	_udata,8,3                      ## @udata
	.comm	_LoadedUsers,8,3                ## @LoadedUsers
	.comm	_loaded_users_max,4,2           ## @loaded_users_max
	.comm	_verbosity,8,3                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"skipping occupied slot #%d at %p, size %d for user %d [prev=%p]\n"

L_.str.1:                               ## @.str.1
	.asciz	"allocating slot #%d at %p, size %d for user %d\n"

	.comm	_loaded_users_cnt,4,2           ## @loaded_users_cnt
	.comm	_loaded_users_size,4,2          ## @loaded_users_size
	.comm	_loaded_users_lru,8,3           ## @loaded_users_lru
	.comm	_MAX_LOADED_USERS,4,2           ## @MAX_LOADED_USERS
	.comm	_USER_DATA_BUFF,4,2             ## @USER_DATA_BUFF
L_.str.2:                               ## @.str.2
	.asciz	"allocating new slot #%d (out of %d) at %p, size %d for user %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_alloc_new_preloaded_user       ; -- Begin function alloc_new_preloaded_user
	.p2align	2
_alloc_new_preloaded_user:              ; @alloc_new_preloaded_user
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x20, x1
	mov	x19, x0
	cmp	w1, #0
	cset	w0, gt
	bl	_assert
	add	w8, w20, #15
	and	w9, w8, #0xfffffff0
Lloh0:
	adrp	x8, _MAX_USER_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_USER_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w9, w8
	b.ge	LBB0_17
; %bb.1:
	stp	x9, x19, [sp, #32]              ; 16-byte Folded Spill
	sxtw	x19, w9
Lloh3:
	adrp	x24, _loaded_users_max@GOTPAGE
Lloh4:
	ldr	x24, [x24, _loaded_users_max@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh5:
	adrp	x12, _udata@GOTPAGE
Lloh6:
	ldr	x12, [x12, _udata@GOTPAGEOFF]
Lloh7:
	adrp	x27, _verbosity@GOTPAGE
Lloh8:
	ldr	x27, [x27, _verbosity@GOTPAGEOFF]
Lloh9:
	adrp	x28, _stderr@GOTPAGE
Lloh10:
	ldr	x28, [x28, _stderr@GOTPAGEOFF]
Lloh11:
	adrp	x21, l_.str@PAGE
Lloh12:
	add	x21, x21, l_.str@PAGEOFF
Lloh13:
	adrp	x13, _MAX_LOADED_USERS@GOTPAGE
Lloh14:
	ldr	x13, [x13, _MAX_LOADED_USERS@GOTPAGEOFF]
Lloh15:
	adrp	x23, _loaded_users_cnt@GOTPAGE
Lloh16:
	ldr	x23, [x23, _loaded_users_cnt@GOTPAGEOFF]
Lloh17:
	adrp	x22, _loaded_users_size@GOTPAGE
Lloh18:
	ldr	x22, [x22, _loaded_users_size@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x9, [x12]
	neg	w10, w9
	and	x10, x10, #0xf
	add	x26, x9, x10
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w22, #0
Lloh19:
	adrp	x9, _LoadedUsers@GOTPAGE
Lloh20:
	ldr	x9, [x9, _LoadedUsers@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	add	x25, x9, #16
	mov	w20, #-1
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=2
	cmp	w20, #0
	csel	w20, w22, w20, lt
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	w22, w22, #1
	add	x25, x25, #32
	cmp	w22, w8
	b.ge	LBB0_11
LBB0_6:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	w9, [x25, #-16]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldur	x23, [x25, #-8]
	ldr	x8, [x27]
	cmp	x8, #1
	b.lt	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w0, [x28]
	ldp	w8, w9, [x25]
	stp	x9, x26, [sp, #16]
	stp	x23, x8, [sp]
	mov	x1, x21
	mov	x2, x22
	bl	_fprintf
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=2
	cmp	x23, x26
	cset	w0, hs
	bl	_assert
	add	x8, x26, x19
	cmp	x23, x8
	b.hs	LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=2
	ldrsw	x8, [x25]
	add	x26, x23, x8
	ldr	w8, [x24]
	mov	w20, #-1
	b	LBB0_5
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh22:
	adrp	x22, _loaded_users_size@GOTPAGE
Lloh23:
	ldr	x22, [x22, _loaded_users_size@GOTPAGEOFF]
Lloh24:
	adrp	x23, _loaded_users_cnt@GOTPAGE
Lloh25:
	ldr	x23, [x23, _loaded_users_cnt@GOTPAGEOFF]
Lloh26:
	adrp	x12, _udata@GOTPAGE
Lloh27:
	ldr	x12, [x12, _udata@GOTPAGEOFF]
Lloh28:
	adrp	x13, _MAX_LOADED_USERS@GOTPAGE
Lloh29:
	ldr	x13, [x13, _MAX_LOADED_USERS@GOTPAGEOFF]
	tbz	w20, #31, LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x20, x8
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w9, [x13]
	cmp	w20, w9
	b.ge	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x26, x19
	ldr	x10, [x12]
Lloh30:
	adrp	x11, _USER_DATA_BUFF@GOTPAGE
Lloh31:
	ldr	x11, [x11, _USER_DATA_BUFF@GOTPAGEOFF]
Lloh32:
	ldrsw	x11, [x11]
	add	x10, x10, x11
	cmp	x9, x10
	b.ls	LBB0_23
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x23]
	cbz	w8, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, #0
	str	wzr, [x22]
	str	wzr, [x23]
	str	wzr, [x24]
	b	LBB0_2
LBB0_17:
	mov	x20, #0
	b	LBB0_22
LBB0_18:
	ldr	x8, [x27]
	cmp	x8, #1
	ldp	x21, x19, [sp, #32]             ; 16-byte Folded Reload
	b.lt	LBB0_20
; %bb.19:
	ldr	w0, [x28]
	mov	x8, x21
	stp	x8, x19, [sp, #8]
	str	x26, [sp]
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_fprintf
LBB0_20:
	mvn	w8, w20
	lsr	w0, w8, #31
	bl	_assert
Lloh35:
	adrp	x8, _LoadedUsers@GOTPAGE
Lloh36:
	ldr	x8, [x8, _LoadedUsers@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	sxtw	x9, w20
	add	x20, x8, x9, lsl #5
Lloh38:
	adrp	x9, _loaded_users_cnt@GOTPAGE
Lloh39:
	ldr	x9, [x9, _loaded_users_cnt@GOTPAGEOFF]
	ldr	w8, [x9]
	add	w8, w8, #1
	str	w8, [x9]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	mov	w8, #1
	str	w8, [x20]
	str	x26, [x20, #8]
	stp	w21, w19, [x20, #16]
Lloh40:
	adrp	x9, _loaded_users_size@GOTPAGE
Lloh41:
	ldr	x9, [x9, _loaded_users_size@GOTPAGEOFF]
	ldr	w8, [x9]
	add	w8, w8, w21
	str	w8, [x9]
LBB0_21:
Lloh42:
	adrp	x8, _loaded_users_lru@GOTPAGE
Lloh43:
	ldr	x8, [x8, _loaded_users_lru@GOTPAGEOFF]
	ldr	x9, [x8]
	add	x9, x9, #1
	str	x9, [x8]
	str	x9, [x20, #24]
LBB0_22:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_23:
	cmp	w20, w8
	b.ne	LBB0_25
; %bb.24:
	add	w8, w8, #1
	str	w8, [x24]
LBB0_25:
	ldp	x21, x19, [sp, #32]             ; 16-byte Folded Reload
	ldr	x9, [x27]
	cmp	x9, #1
	b.lt	LBB0_27
; %bb.26:
	ldr	w0, [x28]
	mov	x9, x19
	mov	x10, x21
	stp	x10, x9, [sp, #16]
	stp	x8, x26, [sp]
Lloh44:
	adrp	x1, l_.str.2@PAGE
Lloh45:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_fprintf
LBB0_27:
Lloh46:
	adrp	x8, _LoadedUsers@GOTPAGE
Lloh47:
	ldr	x8, [x8, _LoadedUsers@GOTPAGEOFF]
Lloh48:
	ldr	x8, [x8]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	sxtw	x9, w20
	add	x20, x8, x9, lsl #5
	ldr	w8, [x23]
	add	w8, w8, #1
	str	w8, [x23]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	mov	w8, #1
	str	w8, [x20]
	str	x26, [x20, #8]
	stp	w21, w19, [x20, #16]
	ldr	w8, [x22]
	add	w8, w8, w21
	str	w8, [x22]
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_USER_DATA,4,2              ; @MAX_USER_DATA
	.comm	_udata,8,3                      ; @udata
	.comm	_LoadedUsers,8,3                ; @LoadedUsers
	.comm	_loaded_users_max,4,2           ; @loaded_users_max
	.comm	_verbosity,8,3                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"skipping occupied slot #%d at %p, size %d for user %d [prev=%p]\n"

l_.str.1:                               ; @.str.1
	.asciz	"allocating slot #%d at %p, size %d for user %d\n"

	.comm	_loaded_users_cnt,4,2           ; @loaded_users_cnt
	.comm	_loaded_users_size,4,2          ; @loaded_users_size
	.comm	_loaded_users_lru,8,3           ; @loaded_users_lru
	.comm	_MAX_LOADED_USERS,4,2           ; @MAX_LOADED_USERS
	.comm	_USER_DATA_BUFF,4,2             ; @USER_DATA_BUFF
l_.str.2:                               ; @.str.2
	.asciz	"allocating new slot #%d (out of %d) at %p, size %d for user %d\n"

.subsections_via_symbols
