	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _vm_phys_create_seg
__vm_phys_create_seg:                   ## @_vm_phys_create_seg
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_vm_phys_nsegs@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	_VM_PHYSSEG_MAX@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setl	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	testl	%r14d, %r14d
	setns	%al
	movq	_vm_ndomains@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	setg	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	_vm_phys_segs@GOTPCREL(%rip), %rax
	movq	(%r12), %rdx
	leaq	1(%rdx), %rcx
	movq	%rcx, (%r12)
	leaq	(%rdx,%rdx,2), %rcx
	shlq	$3, %rcx
	addq	(%rax), %rcx
	testq	%rdx, %rdx
	jle	LBB0_4
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, -24(%rcx)
	jl	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	-24(%rcx), %rdx
	movq	-8(%rcx), %rsi
	movq	%rsi, 16(%rcx)
	movups	-24(%rcx), %xmm0
	movups	%xmm0, (%rcx)
	movq	%rdx, %rcx
	cmpq	(%rax), %rdx
	ja	LBB0_1
	jmp	LBB0_5
LBB0_4:
	movq	%rcx, %rdx
LBB0_5:
	movq	%r15, (%rdx)
	movq	%rbx, 16(%rdx)
	movl	%r14d, 8(%rdx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vm_phys_nsegs,8,3              ## @vm_phys_nsegs
	.comm	_VM_PHYSSEG_MAX,8,3             ## @VM_PHYSSEG_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vm_phys_create_seg: increase VM_PHYSSEG_MAX"

	.comm	_vm_ndomains,4,2                ## @vm_ndomains
L_.str.1:                               ## @.str.1
	.asciz	"vm_phys_create_seg: invalid domain provided"

	.comm	_vm_phys_segs,8,3               ## @vm_phys_segs
	.no_dead_strip	__vm_phys_create_seg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _vm_phys_create_seg
__vm_phys_create_seg:                   ; @_vm_phys_create_seg
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _vm_phys_nsegs@GOTPAGE
Lloh1:
	ldr	x22, [x22, _vm_phys_nsegs@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _VM_PHYSSEG_MAX@GOTPAGE
Lloh3:
	ldr	x9, [x9, _VM_PHYSSEG_MAX@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, lt
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	cmp	w19, #0
Lloh7:
	adrp	x8, _vm_ndomains@GOTPAGE
Lloh8:
	ldr	x8, [x8, _vm_ndomains@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ccmp	w8, w19, #4, ge
	cset	w0, gt
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
Lloh12:
	adrp	x8, _vm_phys_segs@GOTPAGE
Lloh13:
	ldr	x8, [x8, _vm_phys_segs@GOTPAGEOFF]
	ldr	x9, [x8]
	ldr	x11, [x22]
	add	x10, x11, #1
	str	x10, [x22]
	mov	w10, #24
	madd	x10, x11, x10, x9
	cmp	x11, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x9, x10
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9, #-24]!
	cmp	x11, x20
	b.lt	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldur	q0, [x10, #-24]
	str	q0, [x10]
	ldur	x11, [x10, #-8]
	str	x11, [x10, #16]
	ldr	x11, [x8]
	mov	x10, x9
	cmp	x9, x11
	b.hi	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	x9, x10
LBB0_5:
	str	x21, [x9]
	str	x20, [x9, #16]
	str	w19, [x9, #8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_vm_phys_nsegs,8,3              ; @vm_phys_nsegs
	.comm	_VM_PHYSSEG_MAX,8,3             ; @VM_PHYSSEG_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vm_phys_create_seg: increase VM_PHYSSEG_MAX"

	.comm	_vm_ndomains,4,2                ; @vm_ndomains
l_.str.1:                               ; @.str.1
	.asciz	"vm_phys_create_seg: invalid domain provided"

	.comm	_vm_phys_segs,8,3               ; @vm_phys_segs
	.no_dead_strip	__vm_phys_create_seg
.subsections_via_symbols
