	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drop_privs                     ## -- Begin function drop_privs
	.p2align	4, 0x90
_drop_privs:                            ## @drop_privs
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_NOPRIV_USER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_getpwnam
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_tzset
	movq	_CHROOT_DIR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_chroot
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_chdir
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	leaq	4(%rbx), %r15
	movl	$1, %edi
	movq	%r15, %rsi
	callq	_setgroups
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movl	(%r15), %edi
	movl	%edi, %esi
	movl	%edi, %edx
	callq	_setresgid
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movl	(%rbx), %edi
	movl	%edi, %esi
	movl	%edi, %edx
	callq	_setresuid
	xorl	%r14d, %r14d
	testq	%rax, %rax
	sete	%r14b
	jmp	LBB0_7
LBB0_1:
	xorl	%r14d, %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NOPRIV_USER,4,2                ## @NOPRIV_USER
	.comm	_CHROOT_DIR,4,2                 ## @CHROOT_DIR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drop_privs                     ; -- Begin function drop_privs
	.p2align	2
_drop_privs:                            ; @drop_privs
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _NOPRIV_USER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NOPRIV_USER@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_getpwnam
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	bl	_tzset
Lloh3:
	adrp	x8, _CHROOT_DIR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CHROOT_DIR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_chroot
	cbnz	x0, LBB0_5
; %bb.2:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_chdir
	cbnz	x0, LBB0_5
; %bb.3:
	add	x20, x19, #4
	mov	w0, #1
	mov	x1, x20
	bl	_setgroups
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x20]
	mov	x1, x0
	mov	x2, x0
	bl	_setresgid
	cbz	x0, LBB0_7
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	w0, [x19]
	mov	x1, x0
	mov	x2, x0
	bl	_setresuid
	cmp	x0, #0
	cset	w0, eq
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NOPRIV_USER,4,2                ; @NOPRIV_USER
	.comm	_CHROOT_DIR,4,2                 ; @CHROOT_DIR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

.subsections_via_symbols
