	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SIO_Dismount                   ## -- Begin function SIO_Dismount
	.p2align	4, 0x90
_SIO_Dismount:                          ## @SIO_Dismount
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_disk@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movslq	%edi, %rbx
	movq	-8(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	decq	%rbx
	movq	_sio_tmpbuf@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_Util_fclose
	movq	(%r14), %rax
	movq	$0, (%rax,%rbx,8)
	movq	_SIO_NO_DISK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_SIO_drive_status@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movq	_SIO_filename@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	movq	_image_type@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rax
	movq	_IMAGE_TYPE_PRO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	movq	_IMAGE_TYPE_VAPI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
LBB0_3:
	movq	_additional_info@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rax
	movq	(%rax), %rdi
	callq	_free
LBB0_4:
	movq	_additional_info@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_free
	movq	(%r14), %rax
	movq	$0, (%rax,%rbx,8)
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_disk,8,3                       ## @disk
	.comm	_sio_tmpbuf,8,3                 ## @sio_tmpbuf
	.comm	_SIO_NO_DISK,4,2                ## @SIO_NO_DISK
	.comm	_SIO_drive_status,8,3           ## @SIO_drive_status
	.comm	_SIO_filename,8,3               ## @SIO_filename
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Empty"

	.comm	_image_type,8,3                 ## @image_type
	.comm	_IMAGE_TYPE_PRO,8,3             ## @IMAGE_TYPE_PRO
	.comm	_additional_info,8,3            ## @additional_info
	.comm	_IMAGE_TYPE_VAPI,8,3            ## @IMAGE_TYPE_VAPI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SIO_Dismount                   ; -- Begin function SIO_Dismount
	.p2align	2
_SIO_Dismount:                          ; @SIO_Dismount
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x19, _disk@GOTPAGE
Lloh1:
	ldr	x19, [x19, _disk@GOTPAGEOFF]
	ldr	x9, [x19]
	sub	w8, w0, #1
	ldr	x0, [x9, w8, sxtw #3]
	cbz	x0, LBB0_5
; %bb.1:
	sxtw	x20, w8
Lloh2:
	adrp	x8, _sio_tmpbuf@GOTPAGE
Lloh3:
	ldr	x8, [x8, _sio_tmpbuf@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	lsl	x21, x20, #2
	ldr	w1, [x8, x21]
	bl	_Util_fclose
	ldr	x8, [x19]
	lsl	x19, x20, #3
	str	xzr, [x8, x19]
Lloh5:
	adrp	x8, _SIO_NO_DISK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SIO_NO_DISK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _SIO_drive_status@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SIO_drive_status@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	str	w8, [x9, x21]
Lloh11:
	adrp	x8, _SIO_filename@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SIO_filename@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	w0, [x8, x21]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
Lloh16:
	adrp	x8, _image_type@GOTPAGE
Lloh17:
	ldr	x8, [x8, _image_type@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	ldr	x8, [x8, x19]
Lloh19:
	adrp	x9, _IMAGE_TYPE_PRO@GOTPAGE
Lloh20:
	ldr	x9, [x9, _IMAGE_TYPE_PRO@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
Lloh22:
	adrp	x21, _additional_info@GOTPAGE
Lloh23:
	ldr	x21, [x21, _additional_info@GOTPAGEOFF]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.2:
Lloh24:
	adrp	x9, _IMAGE_TYPE_VAPI@GOTPAGE
Lloh25:
	ldr	x9, [x9, _IMAGE_TYPE_VAPI@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
LBB0_3:
	ldr	x8, [x21]
	ldr	x8, [x8, x20, lsl #3]
	ldr	x0, [x8]
	bl	_free
LBB0_4:
	ldr	x8, [x21]
	ldr	x0, [x8, x19]
	bl	_free
	ldr	x8, [x21]
	str	xzr, [x8, x19]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_disk,8,3                       ; @disk
	.comm	_sio_tmpbuf,8,3                 ; @sio_tmpbuf
	.comm	_SIO_NO_DISK,4,2                ; @SIO_NO_DISK
	.comm	_SIO_drive_status,8,3           ; @SIO_drive_status
	.comm	_SIO_filename,8,3               ; @SIO_filename
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Empty"

	.comm	_image_type,8,3                 ; @image_type
	.comm	_IMAGE_TYPE_PRO,8,3             ; @IMAGE_TYPE_PRO
	.comm	_additional_info,8,3            ; @additional_info
	.comm	_IMAGE_TYPE_VAPI,8,3            ; @IMAGE_TYPE_VAPI
.subsections_via_symbols
