	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_finalize_hashfile              ## -- Begin function finalize_hashfile
	.p2align	4, 0x90
_finalize_hashfile:                     ## @finalize_hashfile
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_hashflush
	movq	_the_hash_algo@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	20(%rbx), %edi
	leaq	24(%rbx), %rsi
	callq	*8(%rax)
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	movl	20(%rbx), %esi
	movq	%r14, %rdi
	callq	_hashcpy
LBB0_2:
	movq	_CSUM_HASH_IN_STREAM@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_4
## %bb.3:
	movl	20(%rbx), %esi
	movq	(%r12), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_flush
LBB0_4:
	movq	_CSUM_FSYNC@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_6
## %bb.5:
	movq	(%rbx), %rdi
	movl	16(%rbx), %esi
	callq	_fsync_or_die
LBB0_6:
	movq	_CSUM_CLOSE@GOTPCREL(%rip), %rax
	movq	(%rbx), %r14
	testl	%r15d, (%rax)
	je	LBB0_9
## %bb.7:
	movq	%r14, %rdi
	callq	_close
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	16(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_die_errno
LBB0_9:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	js	LBB0_16
## %bb.10:
	leaq	-33(%rbp), %rsi
	movl	$1, %edx
	callq	_read_in_full
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	jne	LBB0_13
	jmp	LBB0_14
LBB0_11:
	movl	16(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_die_errno
LBB0_13:
	movl	16(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_die
LBB0_14:
	movq	8(%rbx), %rdi
	callq	_close
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movl	16(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_die_errno
LBB0_16:
	movq	%rbx, %rdi
	callq	_free
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_the_hash_algo,8,3              ## @the_hash_algo
	.comm	_CSUM_HASH_IN_STREAM,4,2        ## @CSUM_HASH_IN_STREAM
	.comm	_CSUM_FSYNC,4,2                 ## @CSUM_FSYNC
	.comm	_CSUM_CLOSE,4,2                 ## @CSUM_CLOSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: sha1 file error on close"

L_.str.1:                               ## @.str.1
	.asciz	"%s: error when reading the tail of sha1 file"

L_.str.2:                               ## @.str.2
	.asciz	"%s: sha1 file has trailing garbage"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_finalize_hashfile              ; -- Begin function finalize_hashfile
	.p2align	2
_finalize_hashfile:                     ; @finalize_hashfile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_hashflush
Lloh0:
	adrp	x22, _the_hash_algo@GOTPAGE
Lloh1:
	ldr	x22, [x22, _the_hash_algo@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	ldr	w0, [x19, #20]
	add	x1, x19, #24
	blr	x8
	cbz	x20, LBB0_2
; %bb.1:
	ldr	w1, [x19, #20]
	mov	x0, x20
	bl	_hashcpy
LBB0_2:
Lloh2:
	adrp	x8, _CSUM_HASH_IN_STREAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CSUM_HASH_IN_STREAM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_4
; %bb.3:
	ldr	w1, [x19, #20]
	ldr	x8, [x22]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_flush
LBB0_4:
Lloh5:
	adrp	x8, _CSUM_FSYNC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CSUM_FSYNC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.5:
	ldr	x0, [x19]
	ldr	w1, [x19, #16]
	bl	_fsync_or_die
LBB0_6:
Lloh8:
	adrp	x8, _CSUM_CLOSE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CSUM_CLOSE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	x20, [x19]
	tst	w8, w21
	b.eq	LBB0_10
; %bb.7:
	mov	x0, x20
	bl	_close
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w1, [x19, #16]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_die_errno
LBB0_9:
	mov	w20, #0
LBB0_10:
	ldr	x0, [x19, #8]
	tbnz	x0, #63, LBB0_17
; %bb.11:
	add	x1, sp, #15
	mov	w2, #1
	bl	_read_in_full
	tbnz	w0, #31, LBB0_13
; %bb.12:
	cbnz	w0, LBB0_14
	b	LBB0_15
LBB0_13:
	ldr	w1, [x19, #16]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_die_errno
LBB0_14:
	ldr	w1, [x19, #16]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_die
LBB0_15:
	ldr	x0, [x19, #8]
	bl	_close
	cbz	x0, LBB0_17
; %bb.16:
	ldr	w1, [x19, #16]
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_die_errno
LBB0_17:
	mov	x0, x19
	bl	_free
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_the_hash_algo,8,3              ; @the_hash_algo
	.comm	_CSUM_HASH_IN_STREAM,4,2        ; @CSUM_HASH_IN_STREAM
	.comm	_CSUM_FSYNC,4,2                 ; @CSUM_FSYNC
	.comm	_CSUM_CLOSE,4,2                 ; @CSUM_CLOSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: sha1 file error on close"

l_.str.1:                               ; @.str.1
	.asciz	"%s: error when reading the tail of sha1 file"

l_.str.2:                               ; @.str.2
	.asciz	"%s: sha1 file has trailing garbage"

.subsections_via_symbols
