	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_file_crc32                     ## -- Begin function file_crc32
	.p2align	4, 0x90
_file_crc32:                            ## @file_crc32
	.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
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movl	%edi, %ebx
	movq	_RETRO_VFS_FILE_ACCESS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r15d, %r15d
	movq	%rsi, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_filestream_open
	testq	%rax, %rax
	je	LBB0_13
## %bb.3:
	movq	%rax, %r14
	movq	_CRC32_BUFFER_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	_CRC32_MAX_MB@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_11
## %bb.6:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_filestream_read
	testq	%rax, %rax
	js	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%ebx, %edi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_encoding_crc32
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_filestream_eof
	testq	%rax, %rax
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	incl	%r13d
	movq	_CRC32_MAX_MB@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jb	LBB0_8
	jmp	LBB0_11
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_13
LBB0_4:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_9:
	xorl	%ebx, %ebx
LBB0_11:
	movq	%r15, %rdi
	callq	_free
LBB0_12:
	movq	%r14, %rdi
	callq	_filestream_close
	movl	%ebx, %r15d
LBB0_13:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RETRO_VFS_FILE_ACCESS_READ,4,2 ## @RETRO_VFS_FILE_ACCESS_READ
	.comm	_CRC32_BUFFER_SIZE,4,2          ## @CRC32_BUFFER_SIZE
	.comm	_CRC32_MAX_MB,4,2               ## @CRC32_MAX_MB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_file_crc32                     ; -- Begin function file_crc32
	.p2align	2
_file_crc32:                            ; @file_crc32
	.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
	cbz	x1, LBB0_8
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _RETRO_VFS_FILE_ACCESS_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RETRO_VFS_FILE_ACCESS_READ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	x0, x1
	mov	x1, x8
	mov	w2, #0
	bl	_filestream_open
	cbz	x0, LBB0_8
; %bb.2:
	mov	x20, x0
Lloh3:
	adrp	x22, _CRC32_BUFFER_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _CRC32_BUFFER_SIZE@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_malloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x21, x0
Lloh5:
	adrp	x23, _CRC32_MAX_MB@GOTPAGE
Lloh6:
	ldr	x23, [x23, _CRC32_MAX_MB@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_11
; %bb.4:
	mov	w24, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x22]
	mov	x0, x20
	mov	x1, x21
	bl	_filestream_read
	tbnz	x0, #63, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_encoding_crc32
	mov	x19, x0
	mov	x0, x20
	bl	_filestream_eof
	cbnz	x0, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w24, w24, #1
	ldr	w8, [x23]
	cmp	w24, w8
	b.lo	LBB0_5
	b	LBB0_11
LBB0_8:
	mov	w19, #0
	b	LBB0_13
LBB0_9:
	mov	w19, #0
	b	LBB0_12
LBB0_10:
	mov	w19, #0
LBB0_11:
	mov	x0, x21
	bl	_free
LBB0_12:
	mov	x0, x20
	bl	_filestream_close
LBB0_13:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_RETRO_VFS_FILE_ACCESS_READ,4,2 ; @RETRO_VFS_FILE_ACCESS_READ
	.comm	_CRC32_BUFFER_SIZE,4,2          ; @CRC32_BUFFER_SIZE
	.comm	_CRC32_MAX_MB,4,2               ; @CRC32_MAX_MB
.subsections_via_symbols
