	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vm_alloc_memseg
_vm_alloc_memseg:                       ## @vm_alloc_memseg
	.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	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r12
	leaq	-56(%rbp), %rdx
	movl	$4, %r8d
	callq	_vm_get_memseg
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	-56(%rbp), %r13
	leaq	-56(%rbp), %rdi
	testq	%r13, %r13
	je	LBB0_6
## %bb.2:
	callq	_VM_MEMSEG_NAME
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	movl	%eax, %ecx
	callq	_cmpseg
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	movl	$16, %esi
	callq	_bzero
	movl	%ebx, -48(%rbp)
	movq	%r15, -56(%rbp)
	testq	%r14, %r14
	je	LBB0_9
## %bb.7:
	movl	-44(%rbp), %edi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_strlcpy
	cmpq	$4, %rax
	jb	LBB0_9
## %bb.8:
	movq	_ENAMETOOLONG@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %eax
	jmp	LBB0_10
LBB0_9:
	movl	(%r12), %edi
	movq	_VM_ALLOC_MEMSEG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	callq	_ioctl
	jmp	LBB0_10
LBB0_3:
	xorl	%eax, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_ENAMETOOLONG,4,2               ## @ENAMETOOLONG
	.comm	_VM_ALLOC_MEMSEG,4,2            ## @VM_ALLOC_MEMSEG
	.no_dead_strip	_vm_alloc_memseg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vm_alloc_memseg
_vm_alloc_memseg:                       ; @vm_alloc_memseg
	.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, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	mov	x2, sp
	mov	w4, #4
	bl	_vm_get_memseg
	cbnz	w0, LBB0_9
; %bb.1:
	ldr	x23, [sp]
	cbz	x23, LBB0_4
; %bb.2:
	mov	x0, sp
	bl	_VM_MEMSEG_NAME
	mov	x3, x0
	mov	x0, x21
	mov	x1, x19
	mov	x2, x23
	bl	_cmpseg
	cbz	x0, LBB0_9
; %bb.3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	mov	x0, sp
	mov	w1, #16
	bl	_bzero
	str	w22, [sp, #8]
	str	x21, [sp]
	cbz	x19, LBB0_8
; %bb.5:
	ldr	w0, [sp, #12]
	mov	x1, x19
	mov	w2, #4
	bl	_strlcpy
	cmp	x0, #4
	b.lo	LBB0_8
; %bb.6:
Lloh2:
	adrp	x8, _ENAMETOOLONG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENAMETOOLONG@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
Lloh4:
	adrp	x9, _errno@GOTPAGE
Lloh5:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh6:
	str	w8, [x9]
	mov	w0, #-1
	b	LBB0_9
LBB0_8:
	ldr	w0, [x20]
Lloh7:
	adrp	x8, _VM_ALLOC_MEMSEG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VM_ALLOC_MEMSEG@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_ioctl
LBB0_9:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_ENAMETOOLONG,4,2               ; @ENAMETOOLONG
	.comm	_VM_ALLOC_MEMSEG,4,2            ; @VM_ALLOC_MEMSEG
	.no_dead_strip	_vm_alloc_memseg
.subsections_via_symbols
