	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chainalloc
_chainalloc:                            ## @chainalloc
	.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
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_MSDOSFSMNT_RONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%r15), %eax
	sete	%dil
	callq	_assert
	testq	%r14, %r14
	jle	LBB0_3
## %bb.1:
	leaq	1(%r14), %r12
	movl	%ebx, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_usemap_alloc
	decq	%r12
	incl	%r13d
	cmpq	$1, %r12
	ja	LBB0_2
LBB0_3:
	leaq	(%r14,%rbx), %rax
	movq	%rax, 8(%r15)
	cmpq	16(%r15), %rax
	jle	LBB0_5
## %bb.4:
	movq	_CLUST_FIRST@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
LBB0_5:
	movq	_MSDOSFS_FSIMOD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	callq	_fatchain
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:
	testq	%r14, %r14
	jle	LBB0_13
## %bb.7:
	incq	%r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_usemap_free
	decq	%r14
	incl	%ebx
	cmpq	$1, %r14
	ja	LBB0_8
	jmp	LBB0_13
LBB0_9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%rbx, (%rax)
LBB0_11:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%r14, (%rax)
LBB0_13:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSDOSFSMNT_RONLY,4,2           ## @MSDOSFSMNT_RONLY
	.comm	_CLUST_FIRST,8,3                ## @CLUST_FIRST
	.comm	_MSDOSFS_FSIMOD,4,2             ## @MSDOSFS_FSIMOD
	.no_dead_strip	_chainalloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chainalloc
_chainalloc:                            ; @chainalloc
	.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
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _MSDOSFSMNT_RONLY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MSDOSFSMNT_RONLY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	bl	_assert
	cmp	x21, #1
	b.lt	LBB0_3
; %bb.1:
	add	x26, x21, #1
	mov	x25, x19
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x25
	bl	_usemap_alloc
	sub	x26, x26, #1
	add	w25, w25, #1
	cmp	x26, #1
	b.hi	LBB0_2
LBB0_3:
	ldr	x8, [x20, #16]
	add	x9, x21, x19
	cmp	x9, x8
	str	x9, [x20, #8]
	b.le	LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _CLUST_FIRST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CLUST_FIRST@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x20, #8]
LBB0_5:
Lloh6:
	adrp	x8, _MSDOSFS_FSIMOD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSDOSFS_FSIMOD@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	mov	x3, x24
	bl	_fatchain
	mov	x24, x0
	cbz	w0, LBB0_9
; %bb.6:
	cmp	x21, #1
	b.lt	LBB0_13
; %bb.7:
	add	x21, x21, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_usemap_free
	sub	x21, x21, #1
	add	w19, w19, #1
	cmp	x21, #1
	b.hi	LBB0_8
	b	LBB0_13
LBB0_9:
	cbz	x23, LBB0_11
; %bb.10:
	str	x19, [x23]
LBB0_11:
	cbz	x22, LBB0_13
; %bb.12:
	str	x21, [x22]
LBB0_13:
	mov	x0, x24
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MSDOSFSMNT_RONLY,4,2           ; @MSDOSFSMNT_RONLY
	.comm	_CLUST_FIRST,8,3                ; @CLUST_FIRST
	.comm	_MSDOSFS_FSIMOD,4,2             ; @MSDOSFS_FSIMOD
	.no_dead_strip	_chainalloc
.subsections_via_symbols
