	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function KsecOpenDevice
_KsecOpenDevice:                        ## @KsecOpenDevice
	.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
	leaq	l_.str(%rip), %rdi
	callq	_RTL_CONSTANT_STRING
	movl	%eax, -16(%rbp)
	movq	_OBJ_CASE_INSENSITIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-24(%rbp), %rbx
	leaq	-16(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_InitializeObjectAttributes
	movq	_FILE_READ_DATA@GOTPCREL(%rip), %rax
	movq	_SYNCHRONIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_FILE_SHARE_READ@GOTPCREL(%rip), %rax
	movq	_FILE_SHARE_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	orl	(%rax), %r8d
	movq	_FILE_SHARE_DELETE@GOTPCREL(%rip), %rax
	orl	(%rax), %r8d
	movq	_FILE_SYNCHRONOUS_IO_NONALERT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-12(%rbp), %rdi
	leaq	-20(%rbp), %rcx
	movq	%rbx, %rdx
	callq	_NtOpenFile
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_NT_SUCCESS
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movl	-12(%rbp), %esi
	movq	_KsecDeviceHandle@GOTPCREL(%rip), %rdi
	xorl	%edx, %edx
	callq	_InterlockedCompareExchangePointer
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	-12(%rbp), %edi
	callq	_NtClose
LBB0_3:
	movq	_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @.str
l_.str:
	.long	92                              ## 0x5c
	.long	68                              ## 0x44
	.long	101                             ## 0x65
	.long	118                             ## 0x76
	.long	105                             ## 0x69
	.long	99                              ## 0x63
	.long	101                             ## 0x65
	.long	92                              ## 0x5c
	.long	75                              ## 0x4b
	.long	115                             ## 0x73
	.long	101                             ## 0x65
	.long	99                              ## 0x63
	.long	68                              ## 0x44
	.long	68                              ## 0x44
	.long	0                               ## 0x0

	.comm	_OBJ_CASE_INSENSITIVE,4,2       ## @OBJ_CASE_INSENSITIVE
	.comm	_FILE_READ_DATA,4,2             ## @FILE_READ_DATA
	.comm	_SYNCHRONIZE,4,2                ## @SYNCHRONIZE
	.comm	_FILE_SHARE_READ,4,2            ## @FILE_SHARE_READ
	.comm	_FILE_SHARE_WRITE,4,2           ## @FILE_SHARE_WRITE
	.comm	_FILE_SHARE_DELETE,4,2          ## @FILE_SHARE_DELETE
	.comm	_FILE_SYNCHRONOUS_IO_NONALERT,4,2 ## @FILE_SYNCHRONOUS_IO_NONALERT
	.comm	_KsecDeviceHandle,4,2           ## @KsecDeviceHandle
	.comm	_STATUS_SUCCESS,4,2             ## @STATUS_SUCCESS
	.no_dead_strip	_KsecOpenDevice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function KsecOpenDevice
_KsecOpenDevice:                        ; @KsecOpenDevice
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RTL_CONSTANT_STRING
	str	w0, [sp, #12]
Lloh2:
	adrp	x8, _OBJ_CASE_INSENSITIVE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OBJ_CASE_INSENSITIVE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x0, sp, #8
	add	x1, sp, #12
	mov	x3, #0
	mov	x4, #0
	bl	_InitializeObjectAttributes
Lloh5:
	adrp	x8, _FILE_READ_DATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FILE_READ_DATA@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _SYNCHRONIZE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SYNCHRONIZE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh11:
	adrp	x8, _FILE_SHARE_READ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FILE_SHARE_READ@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _FILE_SHARE_WRITE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _FILE_SHARE_WRITE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _FILE_SHARE_DELETE@GOTPAGE
Lloh18:
	ldr	x10, [x10, _FILE_SHARE_DELETE@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh19:
	ldr	w9, [x10]
	orr	w4, w8, w9
Lloh20:
	adrp	x8, _FILE_SYNCHRONOUS_IO_NONALERT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FILE_SYNCHRONOUS_IO_NONALERT@GOTPAGEOFF]
Lloh22:
	ldr	w5, [x8]
	mov	x0, sp
	add	x2, sp, #8
	add	x3, sp, #4
	bl	_NtOpenFile
	mov	x19, x0
	bl	_NT_SUCCESS
	cbz	w0, LBB0_4
; %bb.1:
	ldr	w1, [sp]
Lloh23:
	adrp	x0, _KsecDeviceHandle@GOTPAGE
Lloh24:
	ldr	x0, [x0, _KsecDeviceHandle@GOTPAGEOFF]
	mov	x2, #0
	bl	_InterlockedCompareExchangePointer
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [sp]
	bl	_NtClose
LBB0_3:
Lloh25:
	adrp	x8, _STATUS_SUCCESS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _STATUS_SUCCESS@GOTPAGEOFF]
Lloh27:
	ldr	w19, [x8]
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @.str
l_.str:
	.long	92                              ; 0x5c
	.long	68                              ; 0x44
	.long	101                             ; 0x65
	.long	118                             ; 0x76
	.long	105                             ; 0x69
	.long	99                              ; 0x63
	.long	101                             ; 0x65
	.long	92                              ; 0x5c
	.long	75                              ; 0x4b
	.long	115                             ; 0x73
	.long	101                             ; 0x65
	.long	99                              ; 0x63
	.long	68                              ; 0x44
	.long	68                              ; 0x44
	.long	0                               ; 0x0

	.comm	_OBJ_CASE_INSENSITIVE,4,2       ; @OBJ_CASE_INSENSITIVE
	.comm	_FILE_READ_DATA,4,2             ; @FILE_READ_DATA
	.comm	_SYNCHRONIZE,4,2                ; @SYNCHRONIZE
	.comm	_FILE_SHARE_READ,4,2            ; @FILE_SHARE_READ
	.comm	_FILE_SHARE_WRITE,4,2           ; @FILE_SHARE_WRITE
	.comm	_FILE_SHARE_DELETE,4,2          ; @FILE_SHARE_DELETE
	.comm	_FILE_SYNCHRONOUS_IO_NONALERT,4,2 ; @FILE_SYNCHRONOUS_IO_NONALERT
	.comm	_KsecDeviceHandle,4,2           ; @KsecDeviceHandle
	.comm	_STATUS_SUCCESS,4,2             ; @STATUS_SUCCESS
	.no_dead_strip	_KsecOpenDevice
.subsections_via_symbols
