	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vm_map_alignspace
_vm_map_alignspace:                     ## @vm_map_alignspace
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r15d
	movl	%r8d, %r14d
	movq	%rcx, %rbx
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	movl	%edi, %r12d
	callq	_VM_MAP_ASSERT_LOCKED
	movl	(%rbx), %r13d
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%r12d, %edi
	movl	%r13d, %esi
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, %edx
	callq	_vm_map_findspace
	xorl	%edi, %edi
	cmpl	%eax, %r13d
	sete	%dil
	movslq	%r13d, %rsi
	callq	_KASSERT
	movl	16(%rbp), %ecx
	leal	-1(%rcx), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	%ecx, %eax
	negl	%eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_1:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r14d, %r13d
	je	LBB0_12
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %r14d
	testl	%r14d, -72(%rbp)                ## 4-byte Folded Reload
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	andl	-68(%rbp), %r14d                ## 4-byte Folded Reload
	movl	16(%rbp), %eax
	addl	%eax, %r14d
	movl	%r14d, (%rbx)
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r13d, %r14d
	jne	LBB0_7
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	movq	%rbx, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_pmap_align_superpage
	movl	(%rbx), %r14d
	cmpl	%r13d, %r14d
	je	LBB0_12
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	jl	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %r12
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r14d, %esi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_vm_map_findspace
	movl	%eax, %ebx
	movl	%eax, (%r12)
	addl	%r13d, %ebx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_vm_map_max
	cmpl	%eax, %ebx
	jg	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %r13d
	testl	%r15d, %r15d
	movq	%r12, %rbx
	je	LBB0_1
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addl	%r13d, %eax
	cmpl	%r15d, %eax
	jle	LBB0_1
LBB0_14:
	movq	_KERN_NO_SPACE@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_12:
	movq	_KERN_SUCCESS@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KERN_SUCCESS,4,2               ## @KERN_SUCCESS
	.comm	_KERN_NO_SPACE,4,2              ## @KERN_NO_SPACE
	.no_dead_strip	_vm_map_alignspace
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vm_map_alignspace
_vm_map_alignspace:                     ; @vm_map_alignspace
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x6
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	str	w2, [sp, #12]                   ; 4-byte Folded Spill
	mov	x24, x1
	mov	x25, x0
	bl	_VM_MAP_ASSERT_LOCKED
	ldr	w26, [x22]
	mov	x0, x25
	mov	x1, x26
	mov	x2, x21
	bl	_vm_map_findspace
	cmp	w26, w0
	cset	w0, eq
	sxtw	x1, w26
	bl	_KASSERT
	sub	w28, w19, #1
	neg	w23, w19
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w26, w27
	b.eq	LBB0_12
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w19, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w27, [x22]
	tst	w27, w28
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	and	w8, w27, w23
	add	w27, w8, w19
	str	w27, [x22]
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w27, w26
	b.ne	LBB0_7
	b	LBB0_12
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x24
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	mov	x2, x22
	mov	x3, x21
	bl	_pmap_align_superpage
	ldr	w27, [x22]
	cmp	w27, w26
	b.eq	LBB0_12
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	b.lt	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x25
	mov	x1, x27
	mov	x2, x21
	bl	_vm_map_findspace
	str	w0, [x22]
	add	w26, w0, w21
	mov	x0, x25
	bl	_vm_map_max
	cmp	w26, w0
	b.gt	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w26, [x22]
	cbz	w20, LBB0_1
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	add	w8, w26, w21
	cmp	w8, w20
	b.le	LBB0_1
LBB0_11:
Lloh0:
	adrp	x8, _KERN_NO_SPACE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KERN_NO_SPACE@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh2:
	adrp	x8, _KERN_SUCCESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KERN_SUCCESS@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_KERN_SUCCESS,4,2               ; @KERN_SUCCESS
	.comm	_KERN_NO_SPACE,4,2              ; @KERN_NO_SPACE
	.no_dead_strip	_vm_map_alignspace
.subsections_via_symbols
