	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getgrouplist                   ## -- Begin function getgrouplist
	.p2align	4, 0x90
_getgrouplist:                          ## @getgrouplist
	.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	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	(%rcx), %r12d
	testl	%r12d, %r12d
	jle	LBB0_20
## %bb.1:
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, (%rdx)
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_setgrent
	xorl	%eax, %eax
	callq	_getgrent
	testq	%rax, %rax
	je	LBB0_22
## %bb.2:
	movq	%rax, %r13
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movl	$1, %r12d
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##       Child Loop BB0_9 Depth 3
                                        ##     Child Loop BB0_13 Depth 2
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movslq	%r12d, %r12
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_6 Depth=2
	cmpq	%rax, %rdx
	jne	LBB0_11
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=2
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_getgrent
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_21
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_9 Depth 3
	movq	(%r13), %rax
	cmpq	%r15, %rax
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_6 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	-8(%rbx,%rcx,8), %rdx
	cmpq	%rax, %rdx
	je	LBB0_4
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=3
	leaq	1(%rcx), %rsi
	cmpq	%r12, %rcx
	movq	%rsi, %rcx
	jl	LBB0_9
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r13), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$8, %r14d
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	8(%r13), %rax
	movq	(%rax,%r14), %rdi
	addq	$8, %r14
	testq	%rdi, %rdi
	jne	LBB0_13
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_19
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	-48(%rbp), %ecx                 ## 4-byte Folded Reload
	jge	LBB0_25
## %bb.18:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r13), %rax
	incl	%ecx
	movq	%rax, (%rbx,%r12,8)
	movl	%ecx, %r12d
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_getgrent
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_3
	jmp	LBB0_23
LBB0_20:
	movl	$-1, %r14d
	xorl	%r12d, %r12d
	jmp	LBB0_24
LBB0_21:
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_23
LBB0_22:
	movl	$1, %r12d
LBB0_23:
	xorl	%eax, %eax
	callq	_endgrent
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
LBB0_24:
	movl	%r12d, (%rcx)
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movl	$-1, %r14d
	movl	%ecx, %r12d
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getgrouplist                   ; -- Begin function getgrouplist
	.p2align	2
_getgrouplist:                          ; @getgrouplist
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	ldr	w25, [x3]
	cmp	w25, #1
	b.lt	LBB0_18
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	str	x1, [x2]
	bl	_setgrent
	bl	_getgrent
	cbz	x0, LBB0_19
; %bb.2:
	mov	x23, x0
	mov	w24, #1
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;       Child Loop BB0_8 Depth 3
                                        ;     Child Loop BB0_12 Depth 2
	sxtw	x26, w24
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	bl	_getgrent
	mov	x23, x0
	cbz	x0, LBB0_17
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_8 Depth 3
	ldr	x8, [x23]
	cmp	x8, x21
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	cmp	w24, #1
	b.lt	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x9, #0
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x10, [x20, x9, lsl #3]
	add	x9, x9, #1
	cmp	x10, x8
	ccmp	x9, x26, #0, ne
	b.lt	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=2
	cmp	x10, x8
	b.eq	LBB0_4
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x23, #8]
	ldr	x0, [x8]
	cbz	x0, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w27, #8
LBB0_12:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x1, x22
	bl	_strcmp
	cbz	w0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	x8, [x23, #8]
	ldr	x0, [x8, x27]
	add	x27, x27, #8
	cbnz	x0, LBB0_12
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w24, w25
	b.ge	LBB0_22
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x23]
	add	w24, w24, #1
	str	x8, [x20, x26, lsl #3]
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_getgrent
	mov	x23, x0
	cbnz	x0, LBB0_3
LBB0_17:
	mov	w20, #0
	b	LBB0_20
LBB0_18:
	mov	w24, #0
	mov	w20, #-1
	b	LBB0_21
LBB0_19:
	mov	w20, #0
	mov	w24, #1
LBB0_20:
	bl	_endgrent
LBB0_21:
	str	w24, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_22:
	mov	w20, #-1
	b	LBB0_20
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
