	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fis_open
_fis_open:                              ## @fis_open
	.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
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_fis_fd@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	js	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_fis_close
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_mtd_check_open
	movq	%rax, (%rbx)
	testq	%rax, %rax
	js	LBB0_6
## %bb.3:
	movq	%rax, %rdi
	callq	_close
	leaq	L_.str(%rip), %rdi
	movl	$1, %esi
	callq	_mtd_open
	movq	%rax, (%rbx)
	testq	%rax, %rax
	js	LBB0_6
## %bb.4:
	movq	_erasesize@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_fis_erasesize@GOTPCREL(%rip), %rcx
	movl	%esi, (%rcx)
	movq	_PROT_READ@GOTPCREL(%rip), %rcx
	movq	_PROT_WRITE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_MAP_SHARED@GOTPCREL(%rip), %rdi
	movq	_MAP_LOCKED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdi), %ecx
	xorl	%edi, %edi
	movq	%rax, %r8
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %rbx
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_6
## %bb.5:
	movq	_fis_desc@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	jmp	LBB0_7
LBB0_6:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_fis_close
LBB0_7:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fis_fd,8,3                     ## @fis_fd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FIS directory"

	.comm	_erasesize,4,2                  ## @erasesize
	.comm	_fis_erasesize,4,2              ## @fis_erasesize
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_LOCKED,4,2                 ## @MAP_LOCKED
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_fis_desc,8,3                   ## @fis_desc
	.no_dead_strip	_fis_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fis_open
_fis_open:                              ; @fis_open
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _fis_fd@GOTPAGE
Lloh1:
	ldr	x19, [x19, _fis_fd@GOTPAGEOFF]
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_2
; %bb.1:
	bl	_fis_close
LBB0_2:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mtd_check_open
	str	x0, [x19]
	tbnz	x0, #63, LBB0_6
; %bb.3:
	bl	_close
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #1
	bl	_mtd_open
	str	x0, [x19]
	tbnz	x0, #63, LBB0_6
; %bb.4:
	mov	x4, x0
Lloh6:
	adrp	x8, _erasesize@GOTPAGE
Lloh7:
	ldr	x8, [x8, _erasesize@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _fis_erasesize@GOTPAGE
Lloh10:
	ldr	x8, [x8, _fis_erasesize@GOTPAGEOFF]
Lloh11:
	str	w1, [x8]
Lloh12:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _MAP_SHARED@GOTPAGE
Lloh19:
	ldr	x10, [x10, _MAP_SHARED@GOTPAGEOFF]
	orr	w2, w9, w8
Lloh20:
	ldr	w8, [x10]
Lloh21:
	adrp	x9, _MAP_LOCKED@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MAP_LOCKED@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, #0
	mov	w5, #0
	bl	_mmap
Lloh24:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
Lloh27:
	adrp	x8, _fis_desc@GOTPAGE
Lloh28:
	ldr	x8, [x8, _fis_desc@GOTPAGEOFF]
Lloh29:
	str	x0, [x8]
	b	LBB0_7
LBB0_6:
	bl	_fis_close
	mov	x0, #0
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_fis_fd,8,3                     ; @fis_fd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FIS directory"

	.comm	_erasesize,4,2                  ; @erasesize
	.comm	_fis_erasesize,4,2              ; @fis_erasesize
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_LOCKED,4,2                 ; @MAP_LOCKED
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_fis_desc,8,3                   ; @fis_desc
	.no_dead_strip	_fis_open
.subsections_via_symbols
