	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_map_findspace               ## -- Begin function vm_map_findspace
	.p2align	4, 0x90
_vm_map_findspace:                      ## @vm_map_findspace
	.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	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_vm_map_min
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_MAX
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_vm_map_max
	cmpq	%r12, %rax
	jle	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_vm_map_max
	subq	%r12, %rax
	cmpq	%r14, %rax
	jge	LBB0_4
LBB0_2:
	movq	%r15, %rdi
	callq	_vm_map_max
	movq	%rax, %r12
	subq	%r14, %r12
	incq	%r12
LBB0_3:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpq	$0, 40(%r15)
	je	LBB0_3
## %bb.5:
	leaq	-48(%rbp), %rcx
	leaq	-56(%rbp), %r8
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_vm_map_splay_split
	movq	-56(%rbp), %r13
	movq	(%r13), %rbx
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	8(%rax), %r12
	cmpq	$0, 24(%rax)
	cmovneq	%r12, %rbx
	movq	%r13, %rcx
	movq	%rax, %r13
	jmp	LBB0_10
LBB0_7:
	cmpq	%r15, %r13
	je	LBB0_9
## %bb.8:
	movq	32(%r13), %rcx
	movq	%rcx, -56(%rbp)
	movq	$0, 32(%r13)
	jmp	LBB0_10
LBB0_9:
	movq	%r13, %rcx
	movq	-48(%rbp), %r13
	movq	24(%r13), %rax
	movq	%rax, -48(%rbp)
	movq	$0, 24(%r13)
LBB0_10:
	movq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_vm_map_splay_merge
	movq	%r15, %rdi
	callq	_VM_MAP_ASSERT_CONSISTENT
	subq	%r12, %rbx
	cmpq	%r14, %rbx
	jge	LBB0_3
## %bb.11:
	movq	24(%r13), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.12:
	cmpq	%r14, 16(%rax)
	jl	LBB0_2
## %bb.13:
	movq	%r15, -56(%rbp)
	movq	%r15, -48(%rbp)
	xorl	%eax, %eax
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	-48(%rbp), %rbx
	movq	%r13, %rsi
	callq	_vm_map_entry_max_free_left
	xorl	%ecx, %ecx
	cmpq	%r14, %rax
	setl	%cl
	movq	%r13, %rdi
	movq	%rbx, %rdx
	callq	_SPLAY_RIGHT_STEP
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_vm_map_entry_max_free_left
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%r14, %rax
	jl	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-56(%rbp), %rbx
	movq	-48(%rbp), %rsi
	callq	_vm_map_entry_max_free_left
	xorl	%ecx, %ecx
	cmpq	%r14, %rax
	setge	%cl
	movq	%r13, %rdi
	movq	%rbx, %rdx
	callq	_SPLAY_LEFT_STEP
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_map_findspace               ; -- Begin function vm_map_findspace
	.p2align	2
_vm_map_findspace:                      ; @vm_map_findspace
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_vm_map_min
	mov	x1, x0
	mov	x0, x21
	bl	_MAX
	mov	x22, x0
	mov	x0, x20
	bl	_vm_map_max
	cmp	x0, x22
	b.le	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_vm_map_max
	sub	x8, x0, x22
	cmp	x8, x19
	b.ge	LBB0_4
LBB0_2:
	mov	x0, x20
	bl	_vm_map_max
	sub	x8, x0, x19
	add	x22, x8, #1
LBB0_3:
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
LBB0_4:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_3
; %bb.5:
	add	x3, sp, #8
	mov	x4, sp
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	bl	_vm_map_splay_split
	ldr	x21, [sp]
	ldr	x23, [x21]
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x22, [x0, #8]
	ldr	x8, [x0, #24]
	cmp	x8, #0
	csel	x23, x23, x22, eq
	mov	x3, x21
	mov	x21, x0
	b	LBB0_10
LBB0_7:
	cmp	x21, x20
	b.eq	LBB0_9
; %bb.8:
	ldr	x3, [x21, #32]
	str	x3, [sp]
	str	xzr, [x21, #32]
	b	LBB0_10
LBB0_9:
	mov	x3, x21
	ldr	x21, [sp, #8]
	ldr	x8, [x21, #24]
	str	x8, [sp, #8]
	str	xzr, [x21, #24]
LBB0_10:
	ldr	x2, [sp, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_vm_map_splay_merge
	mov	x0, x20
	bl	_VM_MAP_ASSERT_CONSISTENT
	sub	x8, x23, x22
	cmp	x8, x19
	b.ge	LBB0_3
; %bb.11:
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_2
; %bb.12:
	ldr	x8, [x8, #16]
	cmp	x8, x19
	b.lt	LBB0_2
; %bb.13:
	mov	x0, #0
	stp	x20, x20, [sp]
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	x20, [sp, #8]
	mov	x1, x21
	bl	_vm_map_entry_max_free_left
	cmp	x0, x19
	cset	w3, lt
	mov	x0, x21
	mov	x2, x20
	bl	_SPLAY_RIGHT_STEP
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	x1, [sp, #8]
	mov	x0, x21
	bl	_vm_map_entry_max_free_left
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	cmp	x0, x19
	b.lt	LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	ldp	x20, x1, [sp]
	bl	_vm_map_entry_max_free_left
	cmp	x0, x19
	cset	w3, ge
	mov	x0, x21
	mov	x2, x20
	bl	_SPLAY_LEFT_STEP
	b	LBB0_15
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
