	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function addgroup
_addgroup:                              ## @addgroup
	.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, %rbx
	xorl	%eax, %eax
	callq	_getegid
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_getgrnam
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_1
LBB0_4:
	movq	_pwd@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	(%rax), %r14
	movq	(%r15), %r12
	movq	8(%r15), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.5:
	movq	8(%rax), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_15
## %bb.6:
	addq	$8, %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r13), %rax
	movq	8(%rax), %rsi
	callq	_strcmp
	addq	$8, %rbx
	testq	%rax, %rax
	jne	LBB0_7
	jmp	LBB0_15
LBB0_9:
	cmpq	%r12, %r14
	je	LBB0_15
## %bb.10:
	movq	16(%r15), %rax
	cmpb	$0, (%rax)
	je	LBB0_15
## %bb.11:
	xorl	%eax, %eax
	callq	_getuid
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:
	leaq	L_.str.1(%rip), %rdi
	callq	_getpass
	testq	%rax, %rax
	je	LBB0_38
## %bb.13:
	movq	16(%r15), %rsi
	movq	%rax, %rdi
	callq	_crypt
	testq	%rax, %rax
	je	LBB0_40
## %bb.14:
	movq	16(%r15), %rdi
	movq	%rax, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_15
LBB0_40:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fprintf                        ## TAILCALL
LBB0_15:
	movq	__SC_NGROUPS_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sysconf
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %r14d
	movslq	%r14d, %rbx
	leal	8(,%rax,8), %edi
	callq	_malloc
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_17
## %bb.16:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_17:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_getgroups
	testl	%eax, %eax
	js	LBB0_18
## %bb.19:
	movl	%eax, %r12d
	movq	(%r15), %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpq	%rbx, %rdi
	je	LBB0_28
## %bb.20:
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_inarray
	testq	%rax, %rax
	je	LBB0_28
## %bb.21:
	testl	%r12d, %r12d
	je	LBB0_22
## %bb.23:
	movl	%r12d, %ecx
	movq	(%r15), %rdx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, (%r13,%rax,8)
	je	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	incq	%rax
	cmpq	%rax, %rcx
	jne	LBB0_24
## %bb.26:
	movl	%ecx, %eax
	jmp	LBB0_27
LBB0_1:
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$10, %edx
	callq	_strtol
	testq	%rax, %rax
	jle	LBB0_39
## %bb.2:
	movq	-56(%rbp), %rcx
	cmpb	$0, (%rcx)
	je	LBB0_3
LBB0_39:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_warnx                          ## TAILCALL
LBB0_18:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_36
LBB0_3:
	movq	%rax, %rdi
	callq	_getgrgid
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_4
	jmp	LBB0_39
LBB0_22:
	xorl	%eax, %eax
LBB0_27:
	decl	%r12d
	movl	%eax, %ecx
	leaq	(,%rcx,8), %rdi
	addq	%r13, %rdi
	leaq	8(,%rcx,8), %rsi
	addq	%r13, %rsi
	movl	%r12d, %edx
	subl	%eax, %edx
	shll	$3, %edx
	callq	_memmove
	movl	%r12d, %edi
	movq	%r13, %rsi
	callq	_setgroups
	testq	%rax, %rax
	js	LBB0_35
LBB0_28:
	movq	(%r15), %rdi
	callq	_setgid
	testq	%rax, %rax
	je	LBB0_30
## %bb.29:
	leaq	L_.str.6(%rip), %rdi
LBB0_36:
	callq	_warn
LBB0_37:
	movq	%r13, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
LBB0_30:
	movq	(%r15), %rax
	movq	%rax, (%r13)
	cmpq	(%r15), %rbx
	je	LBB0_37
## %bb.31:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_inarray
	testq	%rax, %rax
	jne	LBB0_37
## %bb.32:
	cmpl	%r14d, %r12d
	jne	LBB0_34
## %bb.33:
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_37
LBB0_38:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_34:
	movslq	%r12d, %rax
	incl	%r12d
	movq	%rbx, (%r13,%rax,8)
	movl	%r12d, %edi
	movq	%r13, %rsi
	callq	_setgroups
	testq	%rax, %rax
	je	LBB0_37
LBB0_35:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_36
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: bad group name"

	.comm	_pwd,8,3                        ## @pwd
L_.str.1:                               ## @.str.1
	.asciz	"Password:"

	.comm	_stderr,4,2                     ## @stderr
L_.str.2:                               ## @.str.2
	.asciz	"Sorry\n"

	.comm	__SC_NGROUPS_MAX,4,2            ## @_SC_NGROUPS_MAX
L_.str.3:                               ## @.str.3
	.asciz	"malloc"

L_.str.4:                               ## @.str.4
	.asciz	"getgroups"

	.comm	_PRIV_START,4,2                 ## @PRIV_START
	.comm	_PRIV_END,4,2                   ## @PRIV_END
L_.str.5:                               ## @.str.5
	.asciz	"setgroups"

L_.str.6:                               ## @.str.6
	.asciz	"setgid"

L_.str.7:                               ## @.str.7
	.asciz	"too many groups"

	.no_dead_strip	_addgroup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function addgroup
_addgroup:                              ; @addgroup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x0
	bl	_getegid
	mov	x19, x0
	mov	x0, x21
	bl	_getgrnam
	mov	x20, x0
	cbz	x0, LBB0_23
LBB0_1:
Lloh0:
	adrp	x21, _pwd@GOTPAGE
Lloh1:
	ldr	x21, [x21, _pwd@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x22, [x8]
	ldp	x23, x24, [x20]
	ldr	x0, [x24]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x1, [x8, #8]
	bl	_strcmp
	cbz	x0, LBB0_13
; %bb.3:
	add	x24, x24, #8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	cbz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21]
	ldr	x1, [x8, #8]
	bl	_strcmp
	add	x24, x24, #8
	cbnz	x0, LBB0_4
	b	LBB0_13
LBB0_6:
	cmp	x22, x23
	b.eq	LBB0_13
; %bb.7:
	ldr	x8, [x20, #16]
	ldrb	w8, [x8]
	cbz	w8, LBB0_13
; %bb.8:
	bl	_getuid
	cbz	x0, LBB0_13
; %bb.9:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getpass
	cbz	x0, LBB0_26
; %bb.10:
	ldr	x1, [x20, #16]
	bl	_crypt
	cbz	x0, LBB0_12
; %bb.11:
	mov	x1, x0
	ldr	x0, [x20, #16]
	bl	_strcmp
	cbz	x0, LBB0_13
LBB0_12:
Lloh4:
	adrp	x8, _stderr@GOTPAGE
Lloh5:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_fprintf
LBB0_13:
Lloh9:
	adrp	x8, __SC_NGROUPS_MAX@GOTPAGE
Lloh10:
	ldr	x8, [x8, __SC_NGROUPS_MAX@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_sysconf
	add	w8, w0, #1
	sxtw	x22, w8
	lsl	w0, w8, #3
	bl	_malloc
	mov	x21, x0
	cbnz	x0, LBB0_15
; %bb.14:
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_15:
	mov	x0, x22
	mov	x1, x21
	bl	_getgroups
	tbnz	w0, #31, LBB0_27
; %bb.16:
	mov	x23, x0
	ldr	x0, [x20]
	cmp	x0, x19
	b.eq	LBB0_31
; %bb.17:
	mov	x1, x21
	mov	x2, x23
	bl	_inarray
	cbz	x0, LBB0_31
; %bb.18:
	cbz	w23, LBB0_29
; %bb.19:
	mov	x8, #0
	mov	w9, w23
	ldr	x10, [x20]
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x21, x8, lsl #3]
	cmp	x11, x10
	b.eq	LBB0_30
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x8, x8, #1
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.22:
	mov	x8, x9
	b	LBB0_30
LBB0_23:
	add	x1, sp, #8
	mov	x0, x21
	mov	w2, #10
	bl	_strtol
	cmp	x0, #1
	b.lt	LBB0_25
; %bb.24:
	ldr	x8, [sp, #8]
	ldrb	w8, [x8]
	cbz	w8, LBB0_28
LBB0_25:
	str	x21, [sp]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
LBB0_26:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_27:
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_33
LBB0_28:
	bl	_getgrgid
	mov	x20, x0
	cbnz	x0, LBB0_1
	b	LBB0_25
LBB0_29:
	mov	w8, #0
LBB0_30:
	sub	w23, w23, #1
	add	x0, x21, w8, uxtw #3
	add	w9, w8, #1
	add	x1, x21, w9, uxtw #3
	sub	w8, w23, w8
	lsl	w2, w8, #3
	bl	_memmove
	mov	x0, x23
	mov	x1, x21
	bl	_setgroups
	tbnz	x0, #63, LBB0_40
LBB0_31:
	ldr	x0, [x20]
	bl	_setgid
	cbz	x0, LBB0_35
; %bb.32:
Lloh18:
	adrp	x0, l_.str.6@PAGE
Lloh19:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_33:
	bl	_warn
LBB0_34:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_free
LBB0_35:
	ldr	x8, [x20]
	str	x8, [x21]
	ldr	x8, [x20]
	cmp	x19, x8
	b.eq	LBB0_34
; %bb.36:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	bl	_inarray
	cbnz	x0, LBB0_34
; %bb.37:
	cmp	w23, w22
	b.ne	LBB0_39
; %bb.38:
Lloh20:
	adrp	x0, l_.str.7@PAGE
Lloh21:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_warnx
	b	LBB0_34
LBB0_39:
	add	w0, w23, #1
	str	x19, [x21, w23, sxtw #3]
	mov	x1, x21
	bl	_setgroups
	cbz	x0, LBB0_34
LBB0_40:
Lloh22:
	adrp	x0, l_.str.5@PAGE
Lloh23:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_33
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: bad group name"

	.comm	_pwd,8,3                        ; @pwd
l_.str.1:                               ; @.str.1
	.asciz	"Password:"

	.comm	_stderr,4,2                     ; @stderr
l_.str.2:                               ; @.str.2
	.asciz	"Sorry\n"

	.comm	__SC_NGROUPS_MAX,4,2            ; @_SC_NGROUPS_MAX
l_.str.3:                               ; @.str.3
	.asciz	"malloc"

l_.str.4:                               ; @.str.4
	.asciz	"getgroups"

	.comm	_PRIV_START,4,2                 ; @PRIV_START
	.comm	_PRIV_END,4,2                   ; @PRIV_END
l_.str.5:                               ; @.str.5
	.asciz	"setgroups"

l_.str.6:                               ; @.str.6
	.asciz	"setgid"

l_.str.7:                               ; @.str.7
	.asciz	"too many groups"

	.no_dead_strip	_addgroup
.subsections_via_symbols
