	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FS_Write                       ## -- Begin function FS_Write
	.p2align	4, 0x90
_FS_Write:                              ## @FS_Write
	.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	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	_fs_searchpaths@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_12
## %bb.1:
	testq	%r15, %r15
	jne	LBB0_2
	jmp	LBB0_16
LBB0_12:
	movq	_ERR_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_Com_Error
	testq	%r15, %r15
	je	LBB0_16
LBB0_2:
	movq	%r15, %rdi
	callq	_FS_FileForHandle
	movq	%rax, %r12
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.3:
	xorl	%r14d, %r14d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_6 Depth=1
	testl	%r14d, %r14d
	movl	$1, %r14d
	jne	LBB0_14
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	movslq	%eax, %rcx
	leaq	(%r13,%rcx,4), %r13
	subl	%eax, %ebx
	je	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	$1, %esi
	movl	%ebx, %edx
	movq	%r12, %rcx
	callq	_fwrite
	testl	%eax, %eax
	je	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$-1, %eax
	jne	LBB0_5
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_15
LBB0_9:
	movq	_fsh@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax,%r15,8)
	je	LBB0_11
## %bb.10:
	movq	%r12, %rdi
	callq	_fflush
LBB0_11:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_17
LBB0_14:
	leaq	L_.str.1(%rip), %rdi
LBB0_15:
	callq	_Com_Printf
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fs_searchpaths,4,2             ## @fs_searchpaths
	.comm	_ERR_FATAL,4,2                  ## @ERR_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Filesystem call made without initialization\n"

L_.str.1:                               ## @.str.1
	.asciz	"FS_Write: 0 bytes written\n"

L_.str.2:                               ## @.str.2
	.asciz	"FS_Write: -1 bytes written\n"

	.comm	_fsh,8,3                        ## @fsh
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FS_Write                       ; -- Begin function FS_Write
	.p2align	2
_FS_Write:                              ; @FS_Write
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _fs_searchpaths@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fs_searchpaths@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_2
; %bb.1:
	cbnz	x20, LBB0_3
	b	LBB0_15
LBB0_2:
Lloh3:
	adrp	x8, _ERR_FATAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERR_FATAL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_Com_Error
	cbz	x20, LBB0_15
LBB0_3:
	mov	x0, x20
	bl	_FS_FileForHandle
	mov	x22, x0
	cbz	w19, LBB0_10
; %bb.4:
	mov	w24, #0
	mov	x23, x19
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	cmn	w0, #1
	b.eq	LBB0_12
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x21, x21, w0, sxtw #2
	subs	w23, w23, w0
	b.eq	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	w1, #1
	mov	x2, x23
	mov	x3, x22
	bl	_fwrite
	cbnz	w0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cbnz	w24, LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w24, #1
	b	LBB0_6
LBB0_10:
Lloh8:
	adrp	x8, _fsh@GOTPAGE
Lloh9:
	ldr	x8, [x8, _fsh@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	x8, [x8, x20, lsl #3]
	cbz	x8, LBB0_16
; %bb.11:
	mov	x0, x22
	bl	_fflush
	b	LBB0_16
LBB0_12:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_14:
	bl	_Com_Printf
LBB0_15:
	mov	w19, #0
LBB0_16:
	mov	x0, x19
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_fs_searchpaths,4,2             ; @fs_searchpaths
	.comm	_ERR_FATAL,4,2                  ; @ERR_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Filesystem call made without initialization\n"

l_.str.1:                               ; @.str.1
	.asciz	"FS_Write: 0 bytes written\n"

l_.str.2:                               ; @.str.2
	.asciz	"FS_Write: -1 bytes written\n"

	.comm	_fsh,8,3                        ; @fsh
.subsections_via_symbols
