	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgwin32_is_admin               ## -- Begin function pgwin32_is_admin
	.p2align	4, 0x90
_pgwin32_is_admin:                      ## @pgwin32_is_admin
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	_SECURITY_NT_AUTHORITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -16(%rbp)
	movq	_SECURITY_BUILTIN_DOMAIN_RID@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	_DOMAIN_ALIAS_RID_ADMINS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	subq	$8, %rsp
	leaq	-24(%rbp), %rax
	leaq	-16(%rbp), %rdi
	movl	$2, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	callq	_AllocateAndInitializeSid
	addq	$48, %rsp
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movl	(%rbx), %edx
	movq	_DOMAIN_ALIAS_RID_POWER_USERS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	subq	$8, %rsp
	leaq	-20(%rbp), %rax
	leaq	-16(%rbp), %rdi
	movl	$2, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	$0
	callq	_AllocateAndInitializeSid
	addq	$48, %rsp
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	-24(%rbp), %esi
	leaq	-40(%rbp), %rdx
	xorl	%edi, %edi
	callq	_CheckTokenMembership
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	-20(%rbp), %esi
	leaq	-32(%rbp), %rdx
	xorl	%edi, %edi
	callq	_CheckTokenMembership
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	-24(%rbp), %edi
	callq	_FreeSid
	movl	-20(%rbp), %edi
	callq	_FreeSid
	movq	-40(%rbp), %rcx
	xorl	%eax, %eax
	orq	-32(%rbp), %rcx
	setne	%al
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	__
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_log_error
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_SECURITY_NT_AUTHORITY,4,2      ## @SECURITY_NT_AUTHORITY
	.comm	_SECURITY_BUILTIN_DOMAIN_RID,4,2 ## @SECURITY_BUILTIN_DOMAIN_RID
	.comm	_DOMAIN_ALIAS_RID_ADMINS,4,2    ## @DOMAIN_ALIAS_RID_ADMINS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not get SID for Administrators group: error code %lu\n"

	.comm	_DOMAIN_ALIAS_RID_POWER_USERS,4,2 ## @DOMAIN_ALIAS_RID_POWER_USERS
L_.str.1:                               ## @.str.1
	.asciz	"could not get SID for PowerUsers group: error code %lu\n"

L_.str.2:                               ## @.str.2
	.asciz	"could not check access token membership: error code %lu\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgwin32_is_admin               ; -- Begin function pgwin32_is_admin
	.p2align	2
_pgwin32_is_admin:                      ; @pgwin32_is_admin
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
Lloh0:
	adrp	x8, _SECURITY_NT_AUTHORITY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SECURITY_NT_AUTHORITY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #32]
Lloh3:
	adrp	x19, _SECURITY_BUILTIN_DOMAIN_RID@GOTPAGE
Lloh4:
	ldr	x19, [x19, _SECURITY_BUILTIN_DOMAIN_RID@GOTPAGEOFF]
	ldr	w2, [x19]
Lloh5:
	adrp	x8, _DOMAIN_ALIAS_RID_ADMINS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DOMAIN_ALIAS_RID_ADMINS@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	sub	x8, x29, #20
	stp	xzr, x8, [sp]
	add	x0, sp, #32
	mov	w1, #2
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_AllocateAndInitializeSid
	cbz	w0, LBB0_6
; %bb.1:
	ldr	w2, [x19]
Lloh8:
	adrp	x8, _DOMAIN_ALIAS_RID_POWER_USERS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DOMAIN_ALIAS_RID_POWER_USERS@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	sub	x8, x29, #24
	stp	xzr, x8, [sp]
	add	x0, sp, #32
	mov	w1, #2
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_AllocateAndInitializeSid
	cbz	w0, LBB0_7
; %bb.2:
	ldur	w1, [x29, #-20]
	add	x2, sp, #24
	mov	x0, #0
	bl	_CheckTokenMembership
	cbz	w0, LBB0_5
; %bb.3:
	ldur	w1, [x29, #-24]
	add	x2, sp, #16
	mov	x0, #0
	bl	_CheckTokenMembership
	cbz	w0, LBB0_5
; %bb.4:
	ldur	w0, [x29, #-20]
	bl	_FreeSid
	ldur	w0, [x29, #-24]
	bl	_FreeSid
	ldp	x9, x8, [sp, #16]
	orr	x8, x8, x9
	cmp	x8, #0
	cset	w0, ne
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_6:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	__
	mov	x19, x0
	bl	_GetLastError
	mov	x1, x0
	mov	x0, x19
	bl	_log_error
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SECURITY_NT_AUTHORITY,4,2      ; @SECURITY_NT_AUTHORITY
	.comm	_SECURITY_BUILTIN_DOMAIN_RID,4,2 ; @SECURITY_BUILTIN_DOMAIN_RID
	.comm	_DOMAIN_ALIAS_RID_ADMINS,4,2    ; @DOMAIN_ALIAS_RID_ADMINS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not get SID for Administrators group: error code %lu\n"

	.comm	_DOMAIN_ALIAS_RID_POWER_USERS,4,2 ; @DOMAIN_ALIAS_RID_POWER_USERS
l_.str.1:                               ; @.str.1
	.asciz	"could not get SID for PowerUsers group: error code %lu\n"

l_.str.2:                               ; @.str.2
	.asciz	"could not check access token membership: error code %lu\n"

.subsections_via_symbols
