	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kmem_suballoc                  ## -- Begin function kmem_suballoc
	.p2align	4, 0x90
_kmem_suballoc:                         ## @kmem_suballoc
	.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	%r8, %rbx
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	%rcx, %rdi
	callq	_round_page
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_vm_map_min
	movq	%rax, (%r13)
	testq	%rbx, %rbx
	jne	LBB0_1
## %bb.2:
	movq	_VMFS_ANY_SPACE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_VMFS_SUPER_SPACE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r10d
	movq	_VM_PROT_ALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	_MAP_ACC_NO_CHARGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%r13, %rcx
	movq	%r12, %r8
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	%rbx
	pushq	%rbx
	pushq	%r10
	callq	_vm_map_find
	addq	$32, %rsp
	movq	_KERN_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_panic
LBB0_5:
	movq	(%r13), %rax
	addq	%r12, %rax
	movq	%rax, (%r14)
	movq	%r15, %rdi
	callq	_vm_map_pmap
	movq	(%r13), %rsi
	movq	(%r14), %rdx
	movl	%eax, %edi
	callq	_vm_map_create
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_panic
LBB0_7:
	movq	(%r13), %rsi
	movq	(%r14), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rcx
	callq	_vm_map_submap
	movq	_KERN_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_panic
LBB0_9:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VMFS_SUPER_SPACE,4,2           ## @VMFS_SUPER_SPACE
	.comm	_VMFS_ANY_SPACE,4,2             ## @VMFS_ANY_SPACE
	.comm	_VM_PROT_ALL,4,2                ## @VM_PROT_ALL
	.comm	_MAP_ACC_NO_CHARGE,4,2          ## @MAP_ACC_NO_CHARGE
	.comm	_KERN_SUCCESS,4,2               ## @KERN_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kmem_suballoc: bad status return of %d"

L_.str.1:                               ## @.str.1
	.asciz	"kmem_suballoc: cannot create submap"

L_.str.2:                               ## @.str.2
	.asciz	"kmem_suballoc: unable to change range to submap"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kmem_suballoc                  ; -- Begin function kmem_suballoc
	.p2align	2
_kmem_suballoc:                         ; @kmem_suballoc
	.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	x23, x4
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, x3
	bl	_round_page
	mov	x22, x0
	mov	x0, x19
	bl	_vm_map_min
Lloh0:
	adrp	x8, _VMFS_SUPER_SPACE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VMFS_SUPER_SPACE@GOTPAGEOFF]
	str	x0, [x21]
Lloh2:
	adrp	x9, _VMFS_ANY_SPACE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _VMFS_ANY_SPACE@GOTPAGEOFF]
	cmp	x23, #0
	csel	x8, x9, x8, eq
	ldr	w6, [x8]
Lloh4:
	adrp	x8, _VM_PROT_ALL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VM_PROT_ALL@GOTPAGEOFF]
Lloh6:
	ldr	w7, [x8]
Lloh7:
	adrp	x8, _MAP_ACC_NO_CHARGE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MAP_ACC_NO_CHARGE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	stp	w7, w8, [sp]
	mov	x0, x19
	mov	x1, #0
	mov	w2, #0
	mov	x3, x21
	mov	x4, x22
	mov	w5, #0
	bl	_vm_map_find
                                        ; kill: def $w0 killed $w0 def $x0
Lloh10:
	adrp	x23, _KERN_SUCCESS@GOTPAGE
Lloh11:
	ldr	x23, [x23, _KERN_SUCCESS@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_2
; %bb.1:
	str	x0, [sp]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_2:
	ldr	x8, [x21]
	add	x8, x8, x22
	str	x8, [x20]
	mov	x0, x19
	bl	_vm_map_pmap
	ldr	x1, [x21]
	ldr	x2, [x20]
	bl	_vm_map_create
	mov	x22, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_panic
LBB0_4:
	ldr	x1, [x21]
	ldr	x2, [x20]
	mov	x0, x19
	mov	x3, x22
	bl	_vm_map_submap
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_6
; %bb.5:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_panic
LBB0_6:
	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
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_VMFS_SUPER_SPACE,4,2           ; @VMFS_SUPER_SPACE
	.comm	_VMFS_ANY_SPACE,4,2             ; @VMFS_ANY_SPACE
	.comm	_VM_PROT_ALL,4,2                ; @VM_PROT_ALL
	.comm	_MAP_ACC_NO_CHARGE,4,2          ; @MAP_ACC_NO_CHARGE
	.comm	_KERN_SUCCESS,4,2               ; @KERN_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kmem_suballoc: bad status return of %d"

l_.str.1:                               ; @.str.1
	.asciz	"kmem_suballoc: cannot create submap"

l_.str.2:                               ; @.str.2
	.asciz	"kmem_suballoc: unable to change range to submap"

.subsections_via_symbols
