	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function file_copy
_file_copy:                             ## @file_copy
	.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
	subq	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, -168(%rbp)                ## 8-byte Spill
	movq	%rsi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_RETRO_VFS_FILE_ACCESS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	callq	_filestream_open
	movq	%rax, %r13
	movl	$1, %r12d
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	-168(%rbp), %rdi                ## 8-byte Reload
	movq	%r15, %rdx
	callq	_strlcpy
	xorl	%r12d, %r12d
LBB0_2:
	movq	_RETRO_VFS_FILE_ACCESS_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_filestream_open
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	-168(%rbp), %rdi                ## 8-byte Reload
	movq	%r15, %rdx
	callq	_strlcpy
	xorl	%r12d, %r12d
LBB0_4:
	movq	%r13, %rdi
	callq	_filestream_eof
	testl	%eax, %eax
	jne	LBB0_12
## %bb.5:
	movq	%r15, -176(%rbp)                ## 8-byte Spill
	leaq	-160(%rbp), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm0, -144(%rbp)
	movaps	%xmm0, -160(%rbp)
	movl	$0, -64(%rbp)
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	$100, %edx
	callq	_filestream_read
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_filestream_error
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_filestream_write
	cmpq	%r15, %rax
	jne	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	callq	_filestream_eof
	testl	%eax, %eax
	je	LBB0_6
	jmp	LBB0_12
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.3(%rip), %rsi
LBB0_10:
	movq	-168(%rbp), %rdi                ## 8-byte Reload
	movq	-176(%rbp), %rdx                ## 8-byte Reload
	callq	_strlcpy
	xorl	%r12d, %r12d
LBB0_12:
	movq	%r13, %rdi
	callq	_filestream_close
	movq	%rbx, %rdi
	callq	_filestream_close
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movl	%r12d, %eax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RETRO_VFS_FILE_ACCESS_READ,4,2 ## @RETRO_VFS_FILE_ACCESS_READ
	.comm	_RETRO_VFS_FILE_ACCESS_HINT_NONE,4,2 ## @RETRO_VFS_FILE_ACCESS_HINT_NONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to open source file"

	.comm	_RETRO_VFS_FILE_ACCESS_WRITE,4,2 ## @RETRO_VFS_FILE_ACCESS_WRITE
L_.str.1:                               ## @.str.1
	.asciz	"unable to open destination file"

L_.str.2:                               ## @.str.2
	.asciz	"error reading file\n"

L_.str.3:                               ## @.str.3
	.asciz	"error writing to file\n"

	.no_dead_strip	_file_copy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function file_copy
_file_copy:                             ; @file_copy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _RETRO_VFS_FILE_ACCESS_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RETRO_VFS_FILE_ACCESS_READ@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x24, _RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPAGE
Lloh7:
	ldr	x24, [x24, _RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPAGEOFF]
	ldr	w2, [x24]
	bl	_filestream_open
	mov	x20, x0
	cbz	x0, LBB0_2
; %bb.1:
	mov	w23, #1
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	bl	_strlcpy
	mov	w23, #0
LBB0_3:
Lloh10:
	adrp	x8, _RETRO_VFS_FILE_ACCESS_WRITE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RETRO_VFS_FILE_ACCESS_WRITE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w2, [x24]
	mov	x0, x22
	bl	_filestream_open
	mov	x22, x0
	cbnz	x0, LBB0_5
; %bb.4:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	bl	_strlcpy
	mov	w23, #0
LBB0_5:
	mov	x0, x20
	bl	_filestream_eof
	cbnz	w0, LBB0_12
; %bb.6:
Lloh15:
	adrp	x24, l_.str.2@PAGE
Lloh16:
	add	x24, x24, l_.str.2@PAGEOFF
Lloh17:
	adrp	x26, l_.str.3@PAGE
Lloh18:
	add	x26, x26, l_.str.3@PAGEOFF
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [sp, #96]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #64]
	stp	q0, q0, [sp, #32]
	stp	q0, q0, [sp]
	mov	x1, sp
	mov	x0, x20
	mov	w2, #100
	bl	_filestream_read
	mov	x25, x0
	mov	x0, x22
	bl	_filestream_error
	cbnz	x0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x1, sp
	mov	x0, x22
	mov	x2, x25
	bl	_filestream_write
	cmp	x0, x25
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_filestream_eof
	cbz	w0, LBB0_7
	b	LBB0_12
LBB0_10:
	mov	x24, x26
LBB0_11:
	mov	x0, x21
	mov	x1, x24
	mov	x2, x19
	bl	_strlcpy
	mov	w23, #0
LBB0_12:
	mov	x0, x20
	bl	_filestream_close
	mov	x0, x22
	bl	_filestream_close
	ldur	x8, [x29, #-72]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x23
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_RETRO_VFS_FILE_ACCESS_READ,4,2 ; @RETRO_VFS_FILE_ACCESS_READ
	.comm	_RETRO_VFS_FILE_ACCESS_HINT_NONE,4,2 ; @RETRO_VFS_FILE_ACCESS_HINT_NONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to open source file"

	.comm	_RETRO_VFS_FILE_ACCESS_WRITE,4,2 ; @RETRO_VFS_FILE_ACCESS_WRITE
l_.str.1:                               ; @.str.1
	.asciz	"unable to open destination file"

l_.str.2:                               ; @.str.2
	.asciz	"error reading file\n"

l_.str.3:                               ; @.str.3
	.asciz	"error writing to file\n"

	.no_dead_strip	_file_copy
.subsections_via_symbols
