	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kmap_alloc_wait                ## -- Begin function kmap_alloc_wait
	.p2align	4, 0x90
_kmap_alloc_wait:                       ## @kmap_alloc_wait
	.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	%rdi, %r12
	movq	%rsi, %rdi
	callq	_round_page
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_swap_reserve
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movq	%r12, %rdi
	callq	_vm_map_lock
	movq	%r12, %rdi
	callq	_vm_map_min
	movq	%r12, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_vm_map_findspace
	movq	%rax, %r15
	movq	%rax, %rbx
	addq	%r14, %rbx
	movq	%r12, %rdi
	callq	_vm_map_max
	cmpq	%rax, %rbx
	jle	LBB0_5
## %bb.2:
	movq	_TRUE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_vm_map_max
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_vm_map_min
	subq	%rax, %rbx
	cmpq	%r14, %rbx
	jl	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %eax
	movl	%eax, (%r12)
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_vm_map_unlock_and_wait
	movq	%r12, %rdi
	callq	_vm_map_lock
	movq	%r12, %rdi
	callq	_vm_map_min
	movq	%r12, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_vm_map_findspace
	movq	%rax, %r15
	leaq	(%rax,%r14), %rbx
	movq	%r12, %rdi
	callq	_vm_map_max
	cmpq	%rax, %rbx
	jg	LBB0_3
LBB0_5:
	movq	_VM_PROT_RW@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MAP_ACC_CHARGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%r15, %rcx
	movq	%rbx, %r8
	pushq	%rax
	pushq	%r9
	callq	_vm_map_insert
	addq	$16, %rsp
	movq	%r12, %rdi
	callq	_vm_map_unlock
	jmp	LBB0_9
LBB0_7:
	movq	%r12, %rdi
	callq	_vm_map_unlock
	movq	%r14, %rdi
	callq	_swap_release
LBB0_8:
	xorl	%r15d, %r15d
LBB0_9:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_VM_PROT_RW,4,2                 ## @VM_PROT_RW
	.comm	_MAP_ACC_CHARGED,4,2            ## @MAP_ACC_CHARGED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kmap_alloc_wait                ; -- Begin function kmap_alloc_wait
	.p2align	2
_kmap_alloc_wait:                       ; @kmap_alloc_wait
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	mov	x0, x1
	bl	_round_page
	mov	x20, x0
	bl	_swap_reserve
	cbz	w0, LBB0_7
; %bb.1:
	mov	x0, x19
	bl	_vm_map_lock
	mov	x0, x19
	bl	_vm_map_min
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_vm_map_findspace
	mov	x21, x0
	add	x22, x0, x20
	mov	x0, x19
	bl	_vm_map_max
	cmp	x22, x0
	b.le	LBB0_5
; %bb.2:
Lloh0:
	adrp	x23, _TRUE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _TRUE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_vm_map_max
	mov	x21, x0
	mov	x0, x19
	bl	_vm_map_min
	sub	x8, x21, x0
	cmp	x8, x20
	b.lt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
	str	w8, [x19]
	mov	x0, x19
	mov	w1, #0
	bl	_vm_map_unlock_and_wait
	mov	x0, x19
	bl	_vm_map_lock
	mov	x0, x19
	bl	_vm_map_min
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_vm_map_findspace
	mov	x21, x0
	add	x22, x0, x20
	mov	x0, x19
	bl	_vm_map_max
	cmp	x22, x0
	b.gt	LBB0_3
LBB0_5:
Lloh2:
	adrp	x8, _VM_PROT_RW@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VM_PROT_RW@GOTPAGEOFF]
Lloh4:
	ldr	w5, [x8]
Lloh5:
	adrp	x8, _MAP_ACC_CHARGED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAP_ACC_CHARGED@GOTPAGEOFF]
Lloh7:
	ldr	w7, [x8]
	mov	x0, x19
	mov	x1, #0
	mov	w2, #0
	mov	x3, x21
	mov	x4, x22
	mov	x6, x5
	bl	_vm_map_insert
	mov	x0, x19
	bl	_vm_map_unlock
	b	LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_vm_map_unlock
	mov	x0, x20
	bl	_swap_release
LBB0_7:
	mov	x21, #0
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_VM_PROT_RW,4,2                 ; @VM_PROT_RW
	.comm	_MAP_ACC_CHARGED,4,2            ; @MAP_ACC_CHARGED
.subsections_via_symbols
