	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prepare_user_directory         ## -- Begin function prepare_user_directory
	.p2align	4, 0x90
_prepare_user_directory:                ## @prepare_user_directory
	.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	_sublists_num@GOTPCREL(%rip), %rax
	movq	_history_enabled@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	movl	$3, %ecx
	jne	LBB0_2
## %bb.1:
	movq	_search_enabled@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_2:
	addl	(%rax), %ecx
	leal	8(,%rcx,4), %r14d
	movq	_tot_users@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movl	%r14d, %ecx
	imull	%eax, %ecx
	leal	16(%rcx), %edi
	movq	_user_dir_size@GOTPCREL(%rip), %r12
	movl	%edi, (%r12)
	movq	_write_pos@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_Header@GOTPCREL(%rip), %rsi
	movq	%rdx, 16(%rsi)
	movl	%eax, (%rsi)
	movslq	%ecx, %rax
	addq	%rdx, %rax
	addq	$20, %rax
	movq	%rax, 8(%rsi)
	callq	_zmalloc0
	movq	_UserDirectoryData@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	(%rbx), %eax
	leal	8(,%rax,8), %edi
	callq	_zmalloc
	movq	_UserDirectory@GOTPCREL(%rip), %r13
	movq	%rax, (%r13)
	movl	(%rbx), %r8d
	testl	%r8d, %r8d
	js	LBB0_11
## %bb.3:
	movq	_UserDirectoryData@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	movq	%r15, (%rax)
	je	LBB0_11
## %bb.4:
	movslq	%r14d, %r9
	leaq	-1(%r8), %rax
	movl	%r8d, %r14d
	andl	$3, %r14d
	movl	$1, %edi
	cmpq	$3, %rax
	jb	LBB0_8
## %bb.5:
	movl	%r8d, %r10d
	andl	$-4, %r10d
	leaq	(,%r9,4), %r11
	leaq	(%r15,%r9,4), %rax
	leaq	(%r9,%r9,2), %rcx
	addq	%r15, %rcx
	leaq	(%r15,%r9,2), %rbx
	leaq	(%r15,%r9), %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdx
	movq	%rsi, 8(%rdx,%rdi,8)
	movq	(%r13), %rdx
	movq	%rbx, 16(%rdx,%rdi,8)
	movq	(%r13), %rdx
	movq	%rcx, 24(%rdx,%rdi,8)
	movq	(%r13), %rdx
	movq	%rax, 32(%rdx,%rdi,8)
	addq	$4, %rdi
	addq	%r11, %rax
	addq	%r11, %rcx
	addq	%r11, %rbx
	addq	%r11, %rsi
	cmpq	%rdi, %r10
	jne	LBB0_6
## %bb.7:
	incq	%rdi
LBB0_8:
	testq	%r14, %r14
	je	LBB0_11
## %bb.9:
	movq	%rdi, %rax
	imulq	%r9, %rax
	addq	%rax, %r15
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	%r15, (%rax,%rdi,8)
	incq	%rdi
	addq	%r9, %r15
	decq	%r14
	jne	LBB0_10
LBB0_11:
	movq	_MAX_USERS@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_12
## %bb.13:
	xorl	%ebx, %ebx
	movq	_User@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_17
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rcx
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	%ebx, %edi
	callq	_unconv_uid
	movq	(%r13), %rcx
	movslq	%r14d, %rdx
	incl	%r14d
	movq	(%rcx,%rdx,8), %rcx
	movq	%rax, (%rcx)
	movl	(%r15), %eax
	jmp	LBB0_16
LBB0_17:
	movq	_tot_users@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_user_dir_size@GOTPCREL(%rip), %r12
	jmp	LBB0_18
LBB0_12:
	xorl	%r14d, %r14d
LBB0_18:
	xorl	%edi, %edi
	cmpl	%r8d, %r14d
	sete	%dil
	callq	_assert
	movq	(%r13), %rax
	movslq	%r14d, %rcx
	movq	(%rax,%rcx,8), %rax
	movabsq	$9223372036854775807, %rcx      ## imm = 0x7FFFFFFFFFFFFFFF
	movq	%rcx, (%rax)
	movq	_UserDirectoryData@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	(%r12), %esi
	callq	_writeout
	xorl	%eax, %eax
	callq	_initcrc
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writecrc                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_sublists_num,4,2               ## @sublists_num
	.comm	_history_enabled,8,3            ## @history_enabled
	.comm	_search_enabled,4,2             ## @search_enabled
	.comm	_tot_users,4,2                  ## @tot_users
	.comm	_user_dir_size,4,2              ## @user_dir_size
	.comm	_write_pos,8,3                  ## @write_pos
	.comm	_Header,24,3                    ## @Header
	.comm	_UserDirectoryData,8,3          ## @UserDirectoryData
	.comm	_UserDirectory,8,3              ## @UserDirectory
	.comm	_MAX_USERS,4,2                  ## @MAX_USERS
	.comm	_User,8,3                       ## @User
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prepare_user_directory         ; -- Begin function prepare_user_directory
	.p2align	2
_prepare_user_directory:                ; @prepare_user_directory
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, _sublists_num@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sublists_num@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _history_enabled@GOTPAGE
Lloh4:
	ldr	x9, [x9, _history_enabled@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _search_enabled@GOTPAGE
Lloh7:
	ldr	x10, [x10, _search_enabled@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	x9, #0
	mov	w9, #3
	csel	w9, w10, w9, eq
	add	w8, w9, w8
	lsl	w8, w8, #2
	add	w19, w8, #8
Lloh9:
	adrp	x22, _tot_users@GOTPAGE
Lloh10:
	ldr	x22, [x22, _tot_users@GOTPAGEOFF]
	ldr	w8, [x22]
	orr	w9, wzr, #0x10
Lloh11:
	adrp	x20, _user_dir_size@GOTPAGE
Lloh12:
	ldr	x20, [x20, _user_dir_size@GOTPAGEOFF]
	madd	w0, w19, w8, w9
	str	w0, [x20]
Lloh13:
	adrp	x9, _write_pos@GOTPAGE
Lloh14:
	ldr	x9, [x9, _write_pos@GOTPAGEOFF]
Lloh15:
	adrp	x10, _Header@GOTPAGE
Lloh16:
	ldr	x10, [x10, _Header@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	str	w8, [x10]
	add	x8, x9, w0, sxtw
	add	x8, x8, #4
	stp	x8, x9, [x10, #8]
	bl	_zmalloc0
Lloh18:
	adrp	x21, _UserDirectoryData@GOTPAGE
Lloh19:
	ldr	x21, [x21, _UserDirectoryData@GOTPAGEOFF]
	str	x0, [x21]
	ldr	w8, [x22]
	lsl	w8, w8, #3
	add	w0, w8, #8
	bl	_zmalloc
Lloh20:
	adrp	x23, _UserDirectory@GOTPAGE
Lloh21:
	ldr	x23, [x23, _UserDirectory@GOTPAGEOFF]
	str	x0, [x23]
	ldr	w8, [x22]
	tbnz	w8, #31, LBB0_4
; %bb.1:
	ldr	x11, [x21]
	str	x11, [x0]
	cbz	w8, LBB0_4
; %bb.2:
	sxtw	x9, w19
	add	x10, x8, #1
	lsl	x10, x10, #3
	add	x11, x11, x9
	mov	w12, #8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x23]
	str	x11, [x13, x12]
	add	x12, x12, #8
	add	x11, x11, x9
	cmp	x10, x12
	b.ne	LBB0_3
LBB0_4:
Lloh22:
	adrp	x25, _MAX_USERS@GOTPAGE
Lloh23:
	ldr	x25, [x25, _MAX_USERS@GOTPAGEOFF]
	ldr	w9, [x25]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.5:
	mov	x19, #0
	mov	w24, #0
Lloh24:
	adrp	x26, _User@GOTPAGE
Lloh25:
	ldr	x26, [x26, _User@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x19, x19, #1
	cmp	x19, w9, sxtw
	b.ge	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	ldr	x8, [x8, x19, lsl #3]
	cbz	x8, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_unconv_uid
	ldr	x8, [x23]
	ldr	x8, [x8, w24, sxtw #3]
	add	w24, w24, #1
	str	x0, [x8]
	ldr	w9, [x25]
	b	LBB0_6
LBB0_9:
	ldr	w8, [x22]
	b	LBB0_11
LBB0_10:
	mov	w24, #0
LBB0_11:
	cmp	w24, w8
	cset	w0, eq
	bl	_assert
	ldr	x8, [x23]
	ldr	x8, [x8, w24, sxtw #3]
	mov	x9, #9223372036854775807
	str	x9, [x8]
	ldr	x0, [x21]
	ldr	w1, [x20]
	bl	_writeout
	bl	_initcrc
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_writecrc
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_sublists_num,4,2               ; @sublists_num
	.comm	_history_enabled,8,3            ; @history_enabled
	.comm	_search_enabled,4,2             ; @search_enabled
	.comm	_tot_users,4,2                  ; @tot_users
	.comm	_user_dir_size,4,2              ; @user_dir_size
	.comm	_write_pos,8,3                  ; @write_pos
	.comm	_Header,24,3                    ; @Header
	.comm	_UserDirectoryData,8,3          ; @UserDirectoryData
	.comm	_UserDirectory,8,3              ; @UserDirectory
	.comm	_MAX_USERS,4,2                  ; @MAX_USERS
	.comm	_User,8,3                       ; @User
.subsections_via_symbols
