	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function EnableLockPagesPrivilege
_EnableLockPagesPrivilege:              ## @EnableLockPagesPrivilege
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edi, %ebx
	xorl	%eax, %eax
	callq	_GetCurrentProcess
	movq	_TOKEN_ADJUST_PRIVILEGES@GOTPCREL(%rip), %rcx
	movq	_TOKEN_QUERY@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	leaq	-12(%rbp), %rdx
	movl	%eax, %edi
	callq	_OpenProcessToken
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_SE_LOCK_MEMORY_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-16(%rbp), %rdx
	xorl	%edi, %edi
	callq	_LookupPrivilegeValue
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_errmsg
	leaq	L_.str.1(%rip), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_errdetail
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	movl	-12(%rbp), %edi
	callq	_CloseHandle
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_errmsg
	leaq	L_.str.1(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_errdetail
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_3:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TOKEN_ADJUST_PRIVILEGES,4,2    ## @TOKEN_ADJUST_PRIVILEGES
	.comm	_TOKEN_QUERY,4,2                ## @TOKEN_QUERY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not enable Lock Pages in Memory user right: error code %lu"

L_.str.1:                               ## @.str.1
	.asciz	"Failed system call was %s."

L_.str.2:                               ## @.str.2
	.asciz	"OpenProcessToken"

	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_SE_LOCK_MEMORY_NAME,4,2        ## @SE_LOCK_MEMORY_NAME
L_.str.3:                               ## @.str.3
	.asciz	"LookupPrivilegeValue"

	.comm	_SE_PRIVILEGE_ENABLED,4,2       ## @SE_PRIVILEGE_ENABLED
	.comm	_ERROR_SUCCESS,8,3              ## @ERROR_SUCCESS
	.comm	_ERROR_NOT_ALL_ASSIGNED,8,3     ## @ERROR_NOT_ALL_ASSIGNED
	.comm	_ERRCODE_INSUFFICIENT_PRIVILEGE,4,2 ## @ERRCODE_INSUFFICIENT_PRIVILEGE
	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_EnableLockPagesPrivilege
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function EnableLockPagesPrivilege
_EnableLockPagesPrivilege:              ; @EnableLockPagesPrivilege
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_GetCurrentProcess
Lloh0:
	adrp	x8, _TOKEN_ADJUST_PRIVILEGES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TOKEN_ADJUST_PRIVILEGES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _TOKEN_QUERY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TOKEN_QUERY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	add	x2, sp, #12
	bl	_OpenProcessToken
	cbz	w0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _SE_LOCK_MEMORY_NAME@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SE_LOCK_MEMORY_NAME@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, #0
	bl	_LookupPrivilegeValue
	bl	_GetLastError
	str	x0, [sp]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_errdetail
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
	ldr	w0, [sp, #12]
	bl	_CloseHandle
	b	LBB0_3
LBB0_2:
	bl	_GetLastError
	str	x0, [sp]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_errdetail
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
LBB0_3:
Lloh21:
	adrp	x8, _FALSE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_TOKEN_ADJUST_PRIVILEGES,4,2    ; @TOKEN_ADJUST_PRIVILEGES
	.comm	_TOKEN_QUERY,4,2                ; @TOKEN_QUERY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not enable Lock Pages in Memory user right: error code %lu"

l_.str.1:                               ; @.str.1
	.asciz	"Failed system call was %s."

l_.str.2:                               ; @.str.2
	.asciz	"OpenProcessToken"

	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_SE_LOCK_MEMORY_NAME,4,2        ; @SE_LOCK_MEMORY_NAME
l_.str.3:                               ; @.str.3
	.asciz	"LookupPrivilegeValue"

	.comm	_SE_PRIVILEGE_ENABLED,4,2       ; @SE_PRIVILEGE_ENABLED
	.comm	_ERROR_SUCCESS,8,3              ; @ERROR_SUCCESS
	.comm	_ERROR_NOT_ALL_ASSIGNED,8,3     ; @ERROR_NOT_ALL_ASSIGNED
	.comm	_ERRCODE_INSUFFICIENT_PRIVILEGE,4,2 ; @ERRCODE_INSUFFICIENT_PRIVILEGE
	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_EnableLockPagesPrivilege
.subsections_via_symbols
