	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgwin32_is_service             ## -- Begin function pgwin32_is_service
	.p2align	4, 0x90
_pgwin32_is_service:                    ## @pgwin32_is_service
	.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	$24, %rsp
	.cfi_offset %rbx, -24
	movq	_SECURITY_NT_AUTHORITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movl	_pgwin32_is_service._is_service(%rip), %eax
	cmpl	$-1, %eax
	je	LBB0_1
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movq	_SECURITY_LOCAL_SYSTEM_RID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	subq	$8, %rsp
	leaq	-12(%rbp), %rax
	leaq	-24(%rbp), %rdi
	movl	$1, %esi
	xorl	%ecx, %ecx
	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_2
## %bb.3:
	movl	-12(%rbp), %esi
	leaq	-32(%rbp), %rdx
	xorl	%edi, %edi
	callq	_CheckTokenMembership
	testl	%eax, %eax
	je	LBB0_4
## %bb.6:
	movl	-12(%rbp), %edi
	callq	_FreeSid
	cmpq	$0, -32(%rbp)
	je	LBB0_8
## %bb.7:
	movl	$1, _pgwin32_is_service._is_service(%rip)
	movl	$1, %eax
	jmp	LBB0_13
LBB0_2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$-1, %eax
	jmp	LBB0_13
LBB0_4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movl	-12(%rbp), %edi
LBB0_5:
	callq	_FreeSid
	movl	$-1, %eax
	jmp	LBB0_13
LBB0_8:
	movq	_SECURITY_SERVICE_RID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	subq	$8, %rsp
	leaq	-16(%rbp), %rax
	leaq	-24(%rbp), %rdi
	movl	$1, %esi
	xorl	%ecx, %ecx
	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_9
## %bb.10:
	movl	-16(%rbp), %esi
	leaq	-32(%rbp), %rdx
	xorl	%edi, %edi
	callq	_CheckTokenMembership
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movl	-16(%rbp), %edi
	callq	_FreeSid
	xorl	%eax, %eax
	cmpq	$0, -32(%rbp)
	setne	%al
	movl	%eax, _pgwin32_is_service._is_service(%rip)
	jmp	LBB0_13
LBB0_9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$-1, %eax
	jmp	LBB0_13
LBB0_11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movl	-16(%rbp), %edi
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	2                               ## @pgwin32_is_service._is_service
_pgwin32_is_service._is_service:
	.long	4294967295                      ## 0xffffffff

	.comm	_SECURITY_NT_AUTHORITY,4,2      ## @SECURITY_NT_AUTHORITY
	.comm	_SECURITY_LOCAL_SYSTEM_RID,4,2  ## @SECURITY_LOCAL_SYSTEM_RID
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not get SID for local system account\n"

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

	.comm	_SECURITY_SERVICE_RID,4,2       ## @SECURITY_SERVICE_RID
L_.str.2:                               ## @.str.2
	.asciz	"could not get SID for service group: 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_service             ; -- Begin function pgwin32_is_service
	.p2align	2
_pgwin32_is_service:                    ; @pgwin32_is_service
	.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, #24]
	adrp	x19, _pgwin32_is_service._is_service@PAGE
	ldr	w0, [x19, _pgwin32_is_service._is_service@PAGEOFF]
	cmn	w0, #1
	b.ne	LBB0_11
; %bb.1:
Lloh3:
	adrp	x8, _SECURITY_LOCAL_SYSTEM_RID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SECURITY_LOCAL_SYSTEM_RID@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x8, sp, #32
	stp	xzr, x8, [sp]
	add	x0, sp, #24
	mov	w1, #1
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_AllocateAndInitializeSid
	cbz	w0, LBB0_6
; %bb.2:
	ldr	w1, [sp, #32]
	sub	x2, x29, #24
	mov	x0, #0
	bl	_CheckTokenMembership
	cbz	w0, LBB0_8
; %bb.3:
	ldr	w0, [sp, #32]
	bl	_FreeSid
	ldur	x8, [x29, #-24]
	cbz	x8, LBB0_12
; %bb.4:
	mov	w0, #1
LBB0_5:
	str	w0, [x19, _pgwin32_is_service._is_service@PAGEOFF]
	b	LBB0_11
LBB0_6:
Lloh6:
	adrp	x8, _stderr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
LBB0_7:
	bl	_fprintf
	b	LBB0_10
LBB0_8:
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w19, [x8]
	bl	_GetLastError
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	ldr	w0, [sp, #32]
LBB0_9:
	bl	_FreeSid
LBB0_10:
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_12:
Lloh16:
	adrp	x8, _SECURITY_SERVICE_RID@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SECURITY_SERVICE_RID@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	sub	x8, x29, #28
	stp	xzr, x8, [sp]
	add	x0, sp, #24
	mov	w1, #1
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_AllocateAndInitializeSid
	cbz	w0, LBB0_15
; %bb.13:
	ldur	w1, [x29, #-28]
	sub	x2, x29, #24
	mov	x0, #0
	bl	_CheckTokenMembership
	cbz	w0, LBB0_16
; %bb.14:
	ldur	w0, [x29, #-28]
	bl	_FreeSid
	ldur	x8, [x29, #-24]
	cmp	x8, #0
	cset	w0, ne
	b	LBB0_5
LBB0_15:
Lloh19:
	adrp	x8, _stderr@GOTPAGE
Lloh20:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh21:
	ldr	w19, [x8]
	bl	_GetLastError
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	b	LBB0_7
LBB0_16:
Lloh24:
	adrp	x8, _stderr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh26:
	ldr	w19, [x8]
	bl	_GetLastError
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	ldur	w0, [x29, #-28]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @pgwin32_is_service._is_service
_pgwin32_is_service._is_service:
	.long	4294967295                      ; 0xffffffff

	.comm	_SECURITY_NT_AUTHORITY,4,2      ; @SECURITY_NT_AUTHORITY
	.comm	_SECURITY_LOCAL_SYSTEM_RID,4,2  ; @SECURITY_LOCAL_SYSTEM_RID
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not get SID for local system account\n"

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

	.comm	_SECURITY_SERVICE_RID,4,2       ; @SECURITY_SERVICE_RID
l_.str.2:                               ; @.str.2
	.asciz	"could not get SID for service group: error code %lu\n"

.subsections_via_symbols
