	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function GetKeyName
_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %r12d
	movq	$0, -48(%rbp)
	movq	_KeyNameInformation@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-48(%rbp), %r8
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_NtQueryKey
	movq	%rax, %rbx
	movq	_STATUS_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_5
## %bb.1:
	xorl	%eax, %eax
	callq	_RtlGetProcessHeap
	movq	-48(%rbp), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_RtlAllocateHeap
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %r15
	movl	(%r13), %esi
	movq	-48(%rbp), %rcx
	leaq	-48(%rbp), %r8
	movl	%r12d, %edi
	movq	%rax, %rdx
	callq	_NtQueryKey
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_NT_SUCCESS
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	movl	4(%r15), %eax
	movl	%eax, -56(%rbp)
	movl	%eax, -60(%rbp)
	movl	(%r15), %eax
	movl	%eax, -64(%rbp)
	movq	_RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-64(%rbp), %rsi
	movl	%r14d, %edx
	callq	_RtlDuplicateUnicodeString
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_NT_SUCCESS
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_RtlGetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_RtlFreeHeap
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.4:
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str(%rip), %rdi
LBB0_6:
	movq	%rbx, %rsi
	callq	_ERR
	movq	%rbx, %rdi
LBB0_11:
	callq	_RtlNtStatusToDosError
	jmp	LBB0_12
LBB0_7:
	movq	-48(%rbp), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	movq	_ERROR_NOT_ENOUGH_MEMORY@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%eax, %eax
	callq	_RtlGetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_RtlFreeHeap
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_6
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
	movq	%r14, %rsi
	callq	_ERR
	movq	%r14, %rdi
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_KeyNameInformation,4,2         ## @KeyNameInformation
	.comm	_STATUS_BUFFER_TOO_SMALL,8,3    ## @STATUS_BUFFER_TOO_SMALL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NtQueryKey returned unexpected Status: 0x%08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate %lu bytes"

	.comm	_ERROR_NOT_ENOUGH_MEMORY,4,2    ## @ERROR_NOT_ENOUGH_MEMORY
L_.str.2:                               ## @.str.2
	.asciz	"NtQueryKey failed: 0x%08x\n"

	.comm	_RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,4,2 ## @RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE
L_.str.3:                               ## @.str.3
	.asciz	"RtlDuplicateUnicodeString failed: 0x%08x\n"

	.comm	_ERROR_SUCCESS,4,2              ## @ERROR_SUCCESS
	.no_dead_strip	_GetKeyName
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function GetKeyName
_GetKeyName:                            ; @GetKeyName
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x21, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x22, _KeyNameInformation@GOTPAGE
Lloh1:
	ldr	x22, [x22, _KeyNameInformation@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x4, sp, #8
	mov	x2, #0
	mov	x3, #0
	bl	_NtQueryKey
Lloh2:
	adrp	x8, _STATUS_BUFFER_TOO_SMALL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STATUS_BUFFER_TOO_SMALL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.1:
	bl	_RtlGetProcessHeap
	ldr	x2, [sp, #8]
	mov	w1, #0
	bl	_RtlAllocateHeap
	cbz	x0, LBB0_7
; %bb.2:
	mov	x20, x0
	ldr	w1, [x22]
	ldr	x3, [sp, #8]
	add	x4, sp, #8
	mov	x0, x21
	mov	x2, x20
	bl	_NtQueryKey
	mov	x21, x0
	bl	_NT_SUCCESS
	cbz	w0, LBB0_10
; %bb.3:
	ldr	w8, [x20, #4]
	stp	w8, w8, [sp, #20]
	ldr	w8, [x20]
	str	w8, [sp, #16]
Lloh5:
	adrp	x8, _RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x1, sp, #16
	mov	x2, x19
	bl	_RtlDuplicateUnicodeString
	mov	x19, x0
	bl	_NT_SUCCESS
	mov	x21, x0
	bl	_RtlGetProcessHeap
	mov	w1, #0
	mov	x2, x20
	bl	_RtlFreeHeap
	cbz	w21, LBB0_11
; %bb.4:
Lloh8:
	adrp	x8, _ERROR_SUCCESS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERROR_SUCCESS@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	mov	x20, x0
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_ERR
	mov	x0, x20
LBB0_6:
	bl	_RtlNtStatusToDosError
	b	LBB0_9
LBB0_7:
	ldr	x1, [sp, #8]
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
Lloh14:
	adrp	x8, _ERROR_NOT_ENOUGH_MEMORY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERROR_NOT_ENOUGH_MEMORY@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
	bl	_RtlGetProcessHeap
	mov	w1, #0
	mov	x2, x20
	bl	_RtlFreeHeap
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_ERR
	mov	x0, x21
	b	LBB0_6
LBB0_11:
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_ERR
	mov	x0, x19
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_KeyNameInformation,4,2         ; @KeyNameInformation
	.comm	_STATUS_BUFFER_TOO_SMALL,8,3    ; @STATUS_BUFFER_TOO_SMALL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NtQueryKey returned unexpected Status: 0x%08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate %lu bytes"

	.comm	_ERROR_NOT_ENOUGH_MEMORY,4,2    ; @ERROR_NOT_ENOUGH_MEMORY
l_.str.2:                               ; @.str.2
	.asciz	"NtQueryKey failed: 0x%08x\n"

	.comm	_RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,4,2 ; @RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE
l_.str.3:                               ; @.str.3
	.asciz	"RtlDuplicateUnicodeString failed: 0x%08x\n"

	.comm	_ERROR_SUCCESS,4,2              ; @ERROR_SUCCESS
	.no_dead_strip	_GetKeyName
.subsections_via_symbols
