	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function procstat_getgroups_kvm
_procstat_getgroups_kvm:                ## @procstat_getgroups_kvm
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_assert
	movq	(%r15), %rsi
	leaq	-88(%rbp), %rdx
	movl	$24, %ecx
	movq	%rbx, %rdi
	callq	_kvm_read_all
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	-88(%rbp), %rsi
	movq	_NOCRED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_10
## %bb.4:
	leaq	-64(%rbp), %rdx
	movl	$24, %ecx
	movq	%rbx, %rdi
	callq	_kvm_read_all
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movslq	-56(%rbp), %rax
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %r13
	movq	%r13, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:
	movq	%rax, %r12
	movq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movq	%r13, %rcx
	callq	_kvm_read_all
	testl	%eax, %eax
	je	LBB0_13
## %bb.7:
	movl	-56(%rbp), %eax
	movl	%eax, (%r14)
	jmp	LBB0_11
LBB0_3:
	movq	(%r15), %rsi
	movl	8(%r15), %edx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_9
LBB0_8:
	movq	-88(%rbp), %rsi
	movl	8(%r15), %edx
	leaq	L_.str.1(%rip), %rdi
LBB0_9:
	callq	_warnx
LBB0_10:
	xorl	%r12d, %r12d
LBB0_11:
	movq	%r12, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	L_.str.2(%rip), %rdi
	movq	%r13, %rsi
	callq	_warn
	jmp	LBB0_10
LBB0_13:
	movq	-48(%rbp), %rsi
	movl	8(%r15), %edx
	leaq	L_.str.3(%rip), %rdi
	callq	_warnx
	movq	%r12, %rdi
	callq	_free
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't read proc struct at %p for pid %d"

	.comm	_NOCRED,8,3                     ## @NOCRED
L_.str.1:                               ## @.str.1
	.asciz	"can't read ucred struct at %p for pid %d"

L_.str.2:                               ## @.str.2
	.asciz	"malloc(%zu)"

L_.str.3:                               ## @.str.3
	.asciz	"can't read groups at %p for pid %d"

	.no_dead_strip	_procstat_getgroups_kvm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function procstat_getgroups_kvm
_procstat_getgroups_kvm:                ; @procstat_getgroups_kvm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	cmp	x19, #0
	cset	w0, ne
	bl	_assert
	ldr	x1, [x19]
	add	x2, sp, #24
	mov	x0, x21
	mov	w3, #24
	bl	_kvm_read_all
	cbz	w0, LBB0_6
; %bb.1:
	ldr	x1, [sp, #24]
Lloh0:
	adrp	x8, _NOCRED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NOCRED@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x1, x8
	b.eq	LBB0_9
; %bb.2:
	mov	x2, sp
	mov	x0, x21
	mov	w3, #24
	bl	_kvm_read_all
	cbz	w0, LBB0_7
; %bb.3:
	ldrsw	x8, [sp, #8]
	add	x8, x8, x8, lsl #1
	lsl	x23, x8, #3
	mov	x0, x23
	bl	_malloc
	mov	x22, x0
	cbz	x0, LBB0_11
; %bb.4:
	ldr	x1, [sp, #16]
	mov	x0, x21
	mov	x2, x22
	mov	x3, x23
	bl	_kvm_read_all
	cbz	w0, LBB0_12
; %bb.5:
	ldr	w8, [sp, #8]
	str	w8, [x20]
	b	LBB0_10
LBB0_6:
	ldr	x1, [x19]
	ldr	w2, [x19, #8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
	ldr	x1, [sp, #24]
	ldr	w2, [x19, #8]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_warnx
LBB0_9:
	mov	x22, #0
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_11:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
	bl	_warn
	b	LBB0_10
LBB0_12:
	ldr	x1, [sp, #16]
	ldr	w2, [x19, #8]
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_warnx
	mov	x0, x22
	bl	_free
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't read proc struct at %p for pid %d"

	.comm	_NOCRED,8,3                     ; @NOCRED
l_.str.1:                               ; @.str.1
	.asciz	"can't read ucred struct at %p for pid %d"

l_.str.2:                               ; @.str.2
	.asciz	"malloc(%zu)"

l_.str.3:                               ; @.str.3
	.asciz	"can't read groups at %p for pid %d"

	.no_dead_strip	_procstat_getgroups_kvm
.subsections_via_symbols
