	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SdbpOpenKey                    ## -- Begin function SdbpOpenKey
	.p2align	4, 0x90
_SdbpOpenKey:                           ## @SdbpOpenKey
	.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	%ecx, %ebx
	movl	%edx, %r15d
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	_APPCOMPAT_LAYER_KEY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_OBJ_CASE_INSENSITIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_RTL_INIT_OBJECT_ATTRIBUTES
	movl	%eax, -56(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r12)
	movq	$0, 16(%r12)
	testq	%r13, %r13
	je	LBB0_6
## %bb.1:
	movq	_REGISTRY_MACHINE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdi
	callq	_RtlInitUnicodeString
	jmp	LBB0_2
LBB0_6:
	leaq	-48(%rbp), %rdi
	callq	_RtlFormatCurrentUserKeyPath
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_NT_SUCCESS
	testl	%eax, %eax
	je	LBB0_7
LBB0_2:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	-48(%rbp), %rbx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_SdbpStrsize
	addq	%rax, %rbx
	movq	%rbx, 16(%r12)
	movq	%rbx, %rdi
	callq	_SdbAlloc
	movq	%rax, (%r12)
	movq	$0, 8(%r12)
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_RtlAppendUnicodeStringToString
	testq	%r13, %r13
	jne	LBB0_4
## %bb.3:
	leaq	-48(%rbp), %rdi
	callq	_RtlFreeUnicodeString
LBB0_4:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_RtlAppendUnicodeToString
	xorl	%eax, %eax
	callq	_Wow64QueryFlag
	orl	%eax, %r15d
	leaq	-56(%rbp), %rdx
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %esi
	callq	_NtOpenKey
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_NT_SUCCESS
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_SHIM_ERR
	movq	(%r12), %rdi
	callq	_SdbFree
	movq	$0, (%r12)
	jmp	LBB0_8
LBB0_7:
	movslq	%r14d, %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_SHIM_ERR
LBB0_8:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APPCOMPAT_LAYER_KEY,8,3        ## @APPCOMPAT_LAYER_KEY
	.comm	_OBJ_CASE_INSENSITIVE,4,2       ## @OBJ_CASE_INSENSITIVE
	.comm	_REGISTRY_MACHINE,4,2           ## @REGISTRY_MACHINE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to acquire user registry key, Error: 0x%lx\n"

L_.str.1:                               ## @.str.1
	.asciz	"Unable to open Key  \"%wZ\" Status 0x%lx\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SdbpOpenKey                    ; -- Begin function SdbpOpenKey
	.p2align	2
_SdbpOpenKey:                           ; @SdbpOpenKey
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _APPCOMPAT_LAYER_KEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APPCOMPAT_LAYER_KEY@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
Lloh3:
	adrp	x8, _OBJ_CASE_INSENSITIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OBJ_CASE_INSENSITIVE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_RTL_INIT_OBJECT_ATTRIBUTES
	str	w0, [sp, #20]
	stp	xzr, xzr, [x19, #8]
	str	xzr, [x19]
	cbz	x23, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _REGISTRY_MACHINE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REGISTRY_MACHINE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #24
	bl	_RtlInitUnicodeString
	b	LBB0_3
LBB0_2:
	add	x0, sp, #24
	bl	_RtlFormatCurrentUserKeyPath
	mov	x24, x0
	bl	_NT_SUCCESS
	cbz	w0, LBB0_7
LBB0_3:
	ldr	x24, [sp, #24]
	mov	x0, x22
	bl	_SdbpStrsize
	add	x0, x0, x24
	str	x0, [x19, #16]
	bl	_SdbAlloc
	stp	x0, xzr, [x19]
	add	x1, sp, #24
	mov	x0, x19
	bl	_RtlAppendUnicodeStringToString
	cbnz	x23, LBB0_5
; %bb.4:
	add	x0, sp, #24
	bl	_RtlFreeUnicodeString
LBB0_5:
	mov	x0, x19
	mov	x1, x22
	bl	_RtlAppendUnicodeToString
	bl	_Wow64QueryFlag
	orr	w1, w0, w21
	add	x2, sp, #20
	mov	x0, x20
	bl	_NtOpenKey
	mov	x24, x0
	bl	_NT_SUCCESS
	cbnz	w0, LBB0_8
; %bb.6:
	mov	x8, x24
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_SHIM_ERR
	ldr	x0, [x19]
	bl	_SdbFree
	str	xzr, [x19]
	b	LBB0_8
LBB0_7:
	sxtw	x1, w24
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_SHIM_ERR
LBB0_8:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_APPCOMPAT_LAYER_KEY,8,3        ; @APPCOMPAT_LAYER_KEY
	.comm	_OBJ_CASE_INSENSITIVE,4,2       ; @OBJ_CASE_INSENSITIVE
	.comm	_REGISTRY_MACHINE,4,2           ; @REGISTRY_MACHINE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to acquire user registry key, Error: 0x%lx\n"

l_.str.1:                               ; @.str.1
	.asciz	"Unable to open Key  \"%wZ\" Status 0x%lx\n"

.subsections_via_symbols
