	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sha1_calculate                 ## -- Begin function sha1_calculate
	.p2align	4, 0x90
_sha1_calculate:                        ## @sha1_calculate
	.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
	movl	$4136, %eax                     ## imm = 0x1028
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	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), %rax
	movl	(%rax), %edx
	callq	_filestream_open
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rbx, -4160(%rbp)               ## 8-byte Spill
	movb	$0, -4144(%rbp)
	leaq	-4152(%rbp), %r12
	movq	%r12, %rdi
	callq	_SHA1Reset
	leaq	-4144(%rbp), %r13
	movl	$-1, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_filestream_read
	movq	%rax, %r14
	testl	%r14d, %r14d
	js	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%r14d, %edx
	callq	_SHA1Input
	testl	%r14d, %r14d
	jne	LBB0_3
## %bb.5:
	leaq	-4152(%rbp), %rdi
	callq	_SHA1Result
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	-4152(%rbp), %rax
	movl	(%rax), %edx
	movl	4(%rax), %ecx
	movl	8(%rax), %r8d
	movl	12(%rax), %r9d
	movl	16(%rax), %eax
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rsi
	movq	-4160(%rbp), %rdi               ## 8-byte Reload
	callq	_sprintf
	xorl	%ebx, %ebx
LBB0_7:
	movq	%r15, %rdi
	callq	_filestream_close
	jmp	LBB0_8
LBB0_1:
	movl	$-1, %ebx
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movl	%ebx, %eax
	addq	$4136, %rsp                     ## imm = 0x1028
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	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	"%08X%08X%08X%08X%08X"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sha1_calculate                 ; -- Begin function sha1_calculate
	.p2align	2
_sha1_calculate:                        ; @sha1_calculate
	.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
	mov	w9, #4112
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #1, lsl #12             ; =4096
	sub	sp, sp, #16
	mov	x20, x1
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh5:
	adrp	x8, _RETRO_VFS_FILE_ACCESS_READ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RETRO_VFS_FILE_ACCESS_READ@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	bl	_filestream_open
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	strb	wzr, [sp, #8]
	mov	x0, sp
	bl	_SHA1Reset
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #4096
	bl	_filestream_read
	mov	x21, x0
	tbnz	w21, #31, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, sp
	add	x1, sp, #8
	mov	x2, x21
	bl	_SHA1Input
	cbnz	w21, LBB0_2
; %bb.4:
	mov	x0, sp
	bl	_SHA1Result
	cbz	w0, LBB0_6
; %bb.5:
	ldr	x8, [sp]
	ldp	w2, w3, [x8]
	ldp	w4, w5, [x8, #8]
	ldr	w6, [x8, #16]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_sprintf
	mov	w20, #0
	b	LBB0_7
LBB0_6:
	mov	w20, #-1
LBB0_7:
	mov	x0, x19
	bl	_filestream_close
	b	LBB0_9
LBB0_8:
	mov	w20, #-1
LBB0_9:
	ldur	x8, [x29, #-40]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x20
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #16
	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
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.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	"%08X%08X%08X%08X%08X"

.subsections_via_symbols
