	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvmd_init
_kvmd_init:                             ## @kvmd_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	__POSIX2_LINE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_kvmd@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	cmpq	$0, (%r15)
	jne	LBB0_5
## %bb.1:
	movq	_nlistf@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_memf@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	movq	%r14, %r8
	callq	_kvm_openfiles
	movq	%rax, (%r15)
	xorl	%eax, %eax
	callq	_getgid
	movl	%eax, %edi
	callq	_setgid
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	callq	_xo_err
LBB0_3:
	cmpq	$0, (%r15)
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	callq	_xo_warnx
	movl	$-1, %ebx
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%ebx, %eax
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	__POSIX2_LINE_MAX,4,2           ## @_POSIX2_LINE_MAX
	.comm	_kvmd,8,3                       ## @kvmd
	.comm	_nlistf,4,2                     ## @nlistf
	.comm	_memf,4,2                       ## @memf
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setgid"

L_.str.1:                               ## @.str.1
	.asciz	"kvm not available: %s"

	.no_dead_strip	_kvmd_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvmd_init
_kvmd_init:                             ; @kvmd_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, __POSIX2_LINE_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, __POSIX2_LINE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
Lloh8:
	adrp	x20, _kvmd@GOTPAGE
Lloh9:
	ldr	x20, [x20, _kvmd@GOTPAGEOFF]
	ldr	x8, [x20]
	cbnz	x8, LBB0_4
; %bb.1:
Lloh10:
	adrp	x8, _nlistf@GOTPAGE
Lloh11:
	ldr	x8, [x8, _nlistf@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _memf@GOTPAGE
Lloh14:
	ldr	x8, [x8, _memf@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	mov	x2, #0
	mov	x4, x19
	bl	_kvm_openfiles
	str	x0, [x20]
	bl	_getgid
	bl	_setgid
	cbz	x0, LBB0_3
; %bb.2:
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_xo_err
LBB0_3:
	ldr	x8, [x20]
	cbz	x8, LBB0_7
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldur	x8, [x29, #-24]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.6:
	sub	sp, x29, #16
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_xo_warnx
	mov	w0, #-1
	b	LBB0_5
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	__POSIX2_LINE_MAX,4,2           ; @_POSIX2_LINE_MAX
	.comm	_kvmd,8,3                       ; @kvmd
	.comm	_nlistf,4,2                     ; @nlistf
	.comm	_memf,4,2                       ; @memf
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setgid"

l_.str.1:                               ; @.str.1
	.asciz	"kvm not available: %s"

	.no_dead_strip	_kvmd_init
.subsections_via_symbols
