	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_privilege
_set_privilege:                         ## @set_privilege
	.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	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	callq	_GetCurrentProcess
	movq	_TOKEN_ADJUST_PRIVILEGES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-40(%rbp), %rdx
	movl	%eax, %edi
	callq	_OpenProcessToken
	xorl	%eax, %eax
	callq	_GetLastError
	movq	%rax, %r14
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_ERROR_ACCESS_DENIED@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	-40(%rbp), %rdi
	cmpq	(%r15), %rdi
	je	LBB0_2
## %bb.1:
	callq	_CloseHandle
LBB0_2:
	cmpq	%r12, %r14
	cmovneq	%r14, %rbx
	movq	%rbx, %rdi
	callq	_output_error
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_HANDLE_VALUE,8,3       ## @INVALID_HANDLE_VALUE
	.comm	_ERROR_SUCCESS,8,3              ## @ERROR_SUCCESS
	.comm	_TOKEN_ADJUST_PRIVILEGES,4,2    ## @TOKEN_ADJUST_PRIVILEGES
	.comm	_SE_PRIVILEGE_ENABLED,4,2       ## @SE_PRIVILEGE_ENABLED
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_ERROR_NOT_ALL_ASSIGNED,8,3     ## @ERROR_NOT_ALL_ASSIGNED
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_ERROR_ACCESS_DENIED,8,3        ## @ERROR_ACCESS_DENIED
	.no_dead_strip	_set_privilege
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_privilege
_set_privilege:                         ; @set_privilege
	.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
Lloh0:
	adrp	x22, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
	ldr	x8, [x22]
	str	x8, [sp, #8]
	bl	_GetCurrentProcess
Lloh2:
	adrp	x8, _TOKEN_ADJUST_PRIVILEGES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TOKEN_ADJUST_PRIVILEGES@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_OpenProcessToken
	bl	_GetLastError
	mov	x19, x0
Lloh5:
	adrp	x8, _ERROR_SUCCESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERROR_SUCCESS@GOTPAGEOFF]
Lloh7:
	ldr	x20, [x8]
Lloh8:
	adrp	x8, _ERROR_ACCESS_DENIED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERROR_ACCESS_DENIED@GOTPAGEOFF]
Lloh10:
	ldr	x21, [x8]
	ldr	x0, [sp, #8]
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
	bl	_CloseHandle
LBB0_2:
	cmp	x19, x20
	csel	x0, x21, x19, eq
	bl	_output_error
Lloh11:
	adrp	x8, _FALSE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh13:
	ldr	x0, [x8]
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_HANDLE_VALUE,8,3       ; @INVALID_HANDLE_VALUE
	.comm	_ERROR_SUCCESS,8,3              ; @ERROR_SUCCESS
	.comm	_TOKEN_ADJUST_PRIVILEGES,4,2    ; @TOKEN_ADJUST_PRIVILEGES
	.comm	_SE_PRIVILEGE_ENABLED,4,2       ; @SE_PRIVILEGE_ENABLED
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_ERROR_NOT_ALL_ASSIGNED,8,3     ; @ERROR_NOT_ALL_ASSIGNED
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_ERROR_ACCESS_DENIED,8,3        ; @ERROR_ACCESS_DENIED
	.no_dead_strip	_set_privilege
.subsections_via_symbols
