	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_change_user_group              ## -- Begin function change_user_group
	.p2align	4, 0x90
_change_user_group:                     ## @change_user_group
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_getuid
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_geteuid
	testq	%rax, %rax
	jne	LBB0_20
LBB0_2:
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.3:
	cmpb	$0, (%rbx)
	jne	LBB0_5
LBB0_4:
	movq	_DEFAULT_ENGINE_USER@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_5:
	movq	%rbx, %rdi
	callq	_getpwnam
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	%rax, %r12
	movq	8(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	-40(%rbp), %rsi
	movl	$1, %edi
	callq	_setgroups
	testq	%rax, %rax
	js	LBB0_13
## %bb.7:
	testq	%r15, %r15
	je	LBB0_14
## %bb.8:
	movq	%r15, %rdi
	callq	_getgrnam
	testq	%rax, %rax
	je	LBB0_21
## %bb.9:
	movq	(%rax), %rdi
	movq	%rdi, -40(%rbp)
	jmp	LBB0_15
LBB0_10:
	leaq	L_.str(%rip), %rdi
LBB0_11:
	movq	%rbx, %rsi
LBB0_12:
	xorl	%eax, %eax
	callq	_kprintf
	jmp	LBB0_19
LBB0_13:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_kprintf
	jmp	LBB0_19
LBB0_14:
	movq	-40(%rbp), %rdi
LBB0_15:
	callq	_setgid
	testq	%rax, %rax
	js	LBB0_18
## %bb.16:
	movl	(%r12), %edi
	callq	_setuid
	testq	%rax, %rax
	jns	LBB0_20
## %bb.17:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_11
LBB0_18:
	movl	-40(%rbp), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_kprintf
LBB0_19:
	movl	$-1, %r14d
LBB0_20:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_DEFAULT_ENGINE_USER,8,3        ## @DEFAULT_ENGINE_USER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"change_user_group: can't find the user %s to switch to\n"

L_.str.1:                               ## @.str.1
	.asciz	"change_user_group: failed to clear supplementary groups list: %m\n"

L_.str.2:                               ## @.str.2
	.asciz	"change_user_group: can't find the group %s to switch to\n"

L_.str.3:                               ## @.str.3
	.asciz	"change_user_group: setgid (%d) failed. %m\n"

L_.str.4:                               ## @.str.4
	.asciz	"change_user_group: failed to assume identity of user %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_change_user_group              ; -- Begin function change_user_group
	.p2align	2
_change_user_group:                     ; @change_user_group
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	bl	_getuid
	cbz	x0, LBB0_3
; %bb.1:
	bl	_geteuid
	cbz	x0, LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_19
LBB0_3:
	cbz	x19, LBB0_5
; %bb.4:
	ldrb	w8, [x19]
	cbnz	w8, LBB0_6
LBB0_5:
Lloh0:
	adrp	x8, _DEFAULT_ENGINE_USER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEFAULT_ENGINE_USER@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
LBB0_6:
	mov	x0, x19
	bl	_getpwnam
	cbz	x0, LBB0_13
; %bb.7:
	mov	x21, x0
	ldr	x8, [x0, #8]
	str	x8, [sp, #8]
	add	x1, sp, #8
	mov	w0, #1
	bl	_setgroups
	tbnz	x0, #63, LBB0_14
; %bb.8:
	cbz	x20, LBB0_15
; %bb.9:
	mov	x0, x20
	bl	_getgrnam
	cbz	x0, LBB0_17
; %bb.10:
	ldr	x0, [x0]
	str	x0, [sp, #8]
	bl	_setgid
	tbnz	x0, #63, LBB0_16
LBB0_11:
	ldr	w0, [x21]
	bl	_setuid
	tbz	x0, #63, LBB0_2
; %bb.12:
	str	x19, [sp]
Lloh3:
	adrp	x0, l_.str.4@PAGE
Lloh4:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_18
LBB0_13:
	str	x19, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_18
LBB0_14:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_15:
	ldr	x0, [sp, #8]
	bl	_setgid
	tbz	x0, #63, LBB0_11
LBB0_16:
	ldr	x8, [sp, #8]
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_18
LBB0_17:
	str	x20, [sp]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_18:
	bl	_kprintf
	mov	w0, #-1
LBB0_19:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DEFAULT_ENGINE_USER,8,3        ; @DEFAULT_ENGINE_USER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"change_user_group: can't find the user %s to switch to\n"

l_.str.1:                               ; @.str.1
	.asciz	"change_user_group: failed to clear supplementary groups list: %m\n"

l_.str.2:                               ; @.str.2
	.asciz	"change_user_group: can't find the group %s to switch to\n"

l_.str.3:                               ; @.str.3
	.asciz	"change_user_group: setgid (%d) failed. %m\n"

l_.str.4:                               ; @.str.4
	.asciz	"change_user_group: failed to assume identity of user %s\n"

.subsections_via_symbols
