	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kopen
_kopen:                                 ## @kopen
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%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	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	movq	%r14, %r8
	callq	_kvm_openfiles
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_getgid
	movl	%eax, %edi
	callq	_setgid
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_2:
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.4:
	movq	_nl@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	callq	_kvm_nlist
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	movq	(%r14), %rax
	cmpq	$0, (%rax)
	jne	LBB0_9
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_8
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_9
LBB0_5:
	movq	%rbx, %rdi
	callq	_kvm_geterr
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_warnx
LBB0_8:
	movq	%rbx, %rdi
	callq	_kvm_close
	xorl	%ebx, %ebx
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movq	%rbx, %rax
	leaq	-16(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	__POSIX2_LINE_MAX,4,2           ## @_POSIX2_LINE_MAX
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setgid"

L_.str.1:                               ## @.str.1
	.asciz	"kvm_openfiles: %s"

	.comm	_nl,8,3                         ## @nl
L_.str.2:                               ## @.str.2
	.asciz	"kvm_nlist: %s"

L_.str.3:                               ## @.str.3
	.asciz	"kvm_nlist: no namelist"

	.no_dead_strip	_kopen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kopen
_kopen:                                 ; @kopen
	.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
	mov	x1, x0
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	x20, x9, x8
	mov	sp, x20
Lloh8:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, #0
	mov	x2, #0
	mov	x4, x20
	bl	_kvm_openfiles
	mov	x19, x0
	bl	_getgid
	bl	_setgid
	cbz	x0, LBB0_2
; %bb.1:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	cbz	x19, LBB0_6
; %bb.3:
Lloh13:
	adrp	x20, _nl@GOTPAGE
Lloh14:
	ldr	x20, [x20, _nl@GOTPAGEOFF]
	ldr	x1, [x20]
	mov	x0, x19
	bl	_kvm_nlist
	tbnz	x0, #63, LBB0_7
; %bb.4:
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbnz	x8, LBB0_9
; %bb.5:
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_warnx
	b	LBB0_8
LBB0_6:
	str	x20, [sp, #-16]!
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warnx
	add	sp, sp, #16
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	bl	_kvm_geterr
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warnx
	add	sp, sp, #16
LBB0_8:
	mov	x0, x19
	bl	_kvm_close
	mov	x19, #0
LBB0_9:
	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_11
; %bb.10:
	mov	x0, x19
	sub	sp, x29, #16
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	__POSIX2_LINE_MAX,4,2           ; @_POSIX2_LINE_MAX
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setgid"

l_.str.1:                               ; @.str.1
	.asciz	"kvm_openfiles: %s"

	.comm	_nl,8,3                         ; @nl
l_.str.2:                               ; @.str.2
	.asciz	"kvm_nlist: %s"

l_.str.3:                               ; @.str.3
	.asciz	"kvm_nlist: no namelist"

	.no_dead_strip	_kopen
.subsections_via_symbols
