	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NtfsOpen                       ## -- Begin function NtfsOpen
	.p2align	4, 0x90
_NtfsOpen:                              ## @NtfsOpen
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_OpenReadOnly@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	%rdx, %r14
	movq	%rdi, %r15
	movq	(%rdx), %rdi
	callq	_FsGetDeviceId
	movq	_NtfsVolumes@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %r12
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_TRACE
	movq	(%r12), %rdi
	addq	$4, %rdi
	movq	_TAG_NTFS_FILE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_FrLdrTempAlloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movq	(%r12), %rsi
	addq	$4, %rsi
	movq	%rax, %rdi
	callq	_RtlZeroMemory
	movq	%r12, 8(%rbx)
	movq	%rbx, %rdx
	addq	$16, %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rcx
	callq	_NtfsLookupFile
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	callq	_FsSetDeviceSpecific
	movq	_ESUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movq	_EACCES@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_FrLdrTempFree
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OpenReadOnly,8,3               ## @OpenReadOnly
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_NtfsVolumes,8,3                ## @NtfsVolumes
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NtfsOpen() FileName = %s\n"

	.comm	_TAG_NTFS_FILE,4,2              ## @TAG_NTFS_FILE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_ESUCCESS,4,2                   ## @ESUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NtfsOpen                       ; -- Begin function NtfsOpen
	.p2align	2
_NtfsOpen:                              ; @NtfsOpen
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, _OpenReadOnly@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OpenReadOnly@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x2
	mov	x20, x0
	ldr	x0, [x2]
	bl	_FsGetDeviceId
Lloh3:
	adrp	x8, _NtfsVolumes@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NtfsVolumes@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x22, [x8, x0, lsl #3]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_TRACE
	ldr	x8, [x22]
	add	x0, x8, #4
Lloh8:
	adrp	x23, _TAG_NTFS_FILE@GOTPAGE
Lloh9:
	ldr	x23, [x23, _TAG_NTFS_FILE@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_FrLdrTempAlloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x21, x0
	ldr	x8, [x22]
	add	x1, x8, #4
	bl	_RtlZeroMemory
	str	x22, [x21, #8]
	add	x2, x21, #16
	mov	x0, x22
	mov	x1, x20
	mov	x3, x21
	bl	_NtfsLookupFile
	cbz	w0, LBB0_6
; %bb.3:
	ldr	x0, [x19]
	mov	x1, x21
	bl	_FsSetDeviceSpecific
Lloh10:
	adrp	x8, _ESUCCESS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ESUCCESS@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
Lloh12:
	adrp	x8, _EACCES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
	ldr	w1, [x23]
	mov	x0, x21
	bl	_FrLdrTempFree
Lloh16:
	adrp	x8, _ENOENT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_OpenReadOnly,8,3               ; @OpenReadOnly
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_NtfsVolumes,8,3                ; @NtfsVolumes
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NtfsOpen() FileName = %s\n"

	.comm	_TAG_NTFS_FILE,4,2              ; @TAG_NTFS_FILE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_ESUCCESS,4,2                   ; @ESUCCESS
.subsections_via_symbols
