	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function procstat_getgroups_sysctl
_procstat_getgroups_sysctl:             ## @procstat_getgroups_sysctl
	.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
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_CTL_KERN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_KERN_PROC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movq	_KERN_PROC_GROUPS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movl	%r15d, -52(%rbp)
	movq	__SC_NGROUPS_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sysconf
	cltq
	leaq	4(,%rax,4), %rbx
	movq	%rbx, -72(%rbp)
	movq	%rbx, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r12
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_nitems
	leaq	-72(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r12, %rdx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_sysctl
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.2:
	movq	-72(%rbp), %rax
	shrq	$2, %rax
	movl	%eax, (%r14)
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_warn
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	callq	_warn
	movq	%r12, %rdi
	callq	_free
LBB0_5:
	xorl	%r12d, %r12d
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movq	%r12, %rax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CTL_KERN,4,2                   ## @CTL_KERN
	.comm	_KERN_PROC,4,2                  ## @KERN_PROC
	.comm	_KERN_PROC_GROUPS,4,2           ## @KERN_PROC_GROUPS
	.comm	__SC_NGROUPS_MAX,4,2            ## @_SC_NGROUPS_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc(%zu)"

L_.str.1:                               ## @.str.1
	.asciz	"sysctl: kern.proc.groups: %d"

	.no_dead_strip	_procstat_getgroups_sysctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function procstat_getgroups_sysctl
_procstat_getgroups_sysctl:             ; @procstat_getgroups_sysctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _CTL_KERN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CTL_KERN@GOTPAGEOFF]
Lloh5:
	adrp	x9, _KERN_PROC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _KERN_PROC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #8]
Lloh9:
	adrp	x8, _KERN_PROC_GROUPS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KERN_PROC_GROUPS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	stp	w8, w20, [sp, #16]
Lloh12:
	adrp	x8, __SC_NGROUPS_MAX@GOTPAGE
Lloh13:
	ldr	x8, [x8, __SC_NGROUPS_MAX@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_sysconf
	add	w8, w0, #1
	sbfiz	x22, x8, #2, #32
	str	x22, [sp]
	mov	x0, x22
	bl	_malloc
	mov	x21, x0
	cbz	x0, LBB0_3
; %bb.1:
	add	x0, sp, #8
	bl	_nitems
	mov	x1, x0
	add	x0, sp, #8
	mov	x3, sp
	mov	x2, x21
	mov	x4, #0
	mov	w5, #0
	bl	_sysctl
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.2:
	ldr	x8, [sp]
	lsr	x8, x8, #2
	str	w8, [x19]
	b	LBB0_5
LBB0_3:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_warn
	b	LBB0_5
LBB0_4:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_warn
	mov	x0, x21
	bl	_free
	mov	x21, #0
LBB0_5:
	ldr	x8, [sp, #24]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_CTL_KERN,4,2                   ; @CTL_KERN
	.comm	_KERN_PROC,4,2                  ; @KERN_PROC
	.comm	_KERN_PROC_GROUPS,4,2           ; @KERN_PROC_GROUPS
	.comm	__SC_NGROUPS_MAX,4,2            ; @_SC_NGROUPS_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc(%zu)"

l_.str.1:                               ; @.str.1
	.asciz	"sysctl: kern.proc.groups: %d"

	.no_dead_strip	_procstat_getgroups_sysctl
.subsections_via_symbols
