	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GetKeyName                     ## -- Begin function GetKeyName
	.p2align	4, 0x90
_GetKeyName:                            ## @GetKeyName
	.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
	movl	%edi, %ebx
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movl	$0, -36(%rbp)
	movq	_SC_MANAGER_CONNECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_OpenSCManager
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	%rax, %r14
	leaq	-36(%rbp), %rcx
	movq	%rax, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_GetServiceKeyName
	orl	-36(%rbp), %eax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_5
LBB0_13:
	leaq	L_.str(%rip), %rdi
	callq	__T
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	__tprintf
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	xorl	%eax, %eax
	callq	_ReportLastError
	jmp	LBB0_12
LBB0_3:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	-36(%rbp), %ecx
	leal	4(,%rcx,4), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %r15
	incl	-36(%rbp)
	leaq	-36(%rbp), %rcx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%rax, %rdx
	callq	_GetServiceKeyName
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	callq	__T
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	__tprintf
	movq	_FALSE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	je	LBB0_9
	jmp	LBB0_10
LBB0_4:
	movq	_ERROR_OUTOFMEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SetLastError
	leaq	L_.str.2(%rip), %rdi
LBB0_5:
	callq	__T
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	__tprintf
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	xorl	%eax, %eax
	callq	_ReportLastError
	jmp	LBB0_11
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	callq	__T
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	__tprintf
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
LBB0_9:
	xorl	%eax, %eax
	callq	_ReportLastError
LBB0_10:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_HeapFree
LBB0_11:
	movq	%r14, %rdi
	callq	_CloseServiceHandle
LBB0_12:
	movq	%r12, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_SC_MANAGER_CONNECT,4,2         ## @SC_MANAGER_CONNECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[SC] OpenSCManager FAILED %lu:\n\n"

	.comm	_FALSE,8,3                      ## @FALSE
L_.str.1:                               ## @.str.1
	.asciz	"[SC] GetServiceKeyName FAILED %lu:\n\n"

	.comm	_ERROR_OUTOFMEMORY,4,2          ## @ERROR_OUTOFMEMORY
L_.str.2:                               ## @.str.2
	.asciz	"[SC] HeapAlloc FAILED %lu:\n\n"

L_.str.3:                               ## @.str.3
	.asciz	"[SC] GetServiceKeyName SUCCESS  Name = %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GetKeyName                     ; -- Begin function GetKeyName
	.p2align	2
_GetKeyName:                            ; @GetKeyName
	.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
	mov	x22, x0
Lloh0:
	adrp	x8, _TRUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
	str	wzr, [sp, #12]
Lloh3:
	adrp	x8, _SC_MANAGER_CONNECT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SC_MANAGER_CONNECT@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, #0
	mov	x1, #0
	bl	_OpenSCManager
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	add	x3, sp, #12
	mov	x1, x22
	mov	x2, #0
	bl	_GetServiceKeyName
	ldr	w8, [sp, #12]
	orr	w8, w0, w8
	cbnz	w8, LBB0_4
; %bb.2:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_3:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	__T
	mov	x19, x0
	bl	_GetLastError
	mov	x1, x0
	mov	x0, x19
	bl	__tprintf
Lloh10:
	adrp	x8, _FALSE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh12:
	ldr	x20, [x8]
	bl	_ReportLastError
	b	LBB0_13
LBB0_4:
	bl	_GetProcessHeap
	ldr	w8, [sp, #12]
	lsl	w8, w8, #2
	add	w2, w8, #4
	mov	w1, #0
	bl	_HeapAlloc
	cbz	x0, LBB0_7
; %bb.5:
	mov	x21, x0
	ldr	w8, [sp, #12]
	add	w8, w8, #1
	str	w8, [sp, #12]
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_GetServiceKeyName
	cbz	w0, LBB0_9
; %bb.6:
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	__T
	mov	x1, x21
	bl	__tprintf
Lloh15:
	adrp	x8, _FALSE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x20, x8
	b.eq	LBB0_10
	b	LBB0_11
LBB0_7:
Lloh18:
	adrp	x8, _ERROR_OUTOFMEMORY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERROR_OUTOFMEMORY@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_SetLastError
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_8:
	bl	__T
	mov	x20, x0
	bl	_GetLastError
	mov	x1, x0
	mov	x0, x20
	bl	__tprintf
Lloh23:
	adrp	x8, _FALSE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh25:
	ldr	x20, [x8]
	bl	_ReportLastError
	b	LBB0_12
LBB0_9:
Lloh26:
	adrp	x0, l_.str.1@PAGE
Lloh27:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__T
	mov	x20, x0
	bl	_GetLastError
	mov	x1, x0
	mov	x0, x20
	bl	__tprintf
Lloh28:
	adrp	x8, _FALSE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh30:
	ldr	x20, [x8]
LBB0_10:
	bl	_ReportLastError
LBB0_11:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x21
	bl	_HeapFree
LBB0_12:
	mov	x0, x19
	bl	_CloseServiceHandle
LBB0_13:
	mov	x0, x20
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_SC_MANAGER_CONNECT,4,2         ; @SC_MANAGER_CONNECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[SC] OpenSCManager FAILED %lu:\n\n"

	.comm	_FALSE,8,3                      ; @FALSE
l_.str.1:                               ; @.str.1
	.asciz	"[SC] GetServiceKeyName FAILED %lu:\n\n"

	.comm	_ERROR_OUTOFMEMORY,4,2          ; @ERROR_OUTOFMEMORY
l_.str.2:                               ; @.str.2
	.asciz	"[SC] HeapAlloc FAILED %lu:\n\n"

l_.str.3:                               ; @.str.3
	.asciz	"[SC] GetServiceKeyName SUCCESS  Name = %s\n"

.subsections_via_symbols
