	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_sha512_final                ## -- Begin function av_sha512_final
	.p2align	4, 0x90
_av_sha512_final:                       ## @av_sha512_final
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	$0, -28(%rbp)
	movl	(%rdi), %edi
	shll	$3, %edi
	callq	_av_be2ne64
	movl	%eax, -32(%rbp)
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_av_sha512_update
	movl	(%rbx), %eax
	andl	$127, %eax
	cmpl	$112, %eax
	je	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_av_sha512_update
	movl	(%rbx), %eax
	andl	$127, %eax
	cmpl	$112, %eax
	jne	LBB0_2
LBB0_3:
	leaq	-28(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$8, %edx
	callq	_av_sha512_update
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$8, %edx
	callq	_av_sha512_update
	movl	$0, -28(%rbp)
	movl	4(%rbx), %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leal	(,%rax,8), %ecx
	movslq	%ecx, %rdi
	addq	%r14, %rdi
	movq	8(%rbx), %rcx
	cltq
	movl	(%rcx,%rax,4), %esi
	callq	_AV_WB64
	movl	-28(%rbp), %eax
	incl	%eax
	movl	%eax, -28(%rbp)
	movl	4(%rbx), %ecx
	cmpl	%ecx, %eax
	jl	LBB0_4
## %bb.5:
	shll	$3, %eax
	cltq
LBB0_6:
	testb	$1, %cl
	je	LBB0_8
## %bb.7:
	addq	%rax, %r14
	movq	%r14, %rdi
	callq	_AV_WB32
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\200"

L_.str.1:                               ## @.str.1
	.space	1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_sha512_final                ; -- Begin function av_sha512_final
	.p2align	2
_av_sha512_final:                       ; @av_sha512_final
	.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	x19, x1
	mov	x20, x0
	str	wzr, [sp, #12]
	ldr	w8, [x0]
	lsl	w0, w8, #3
	bl	_av_be2ne64
	str	w0, [sp, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	w2, #1
	bl	_av_sha512_update
	ldr	w8, [x20]
	and	w8, w8, #0x7f
	cmp	w8, #112
	b.eq	LBB0_3
; %bb.1:
Lloh2:
	adrp	x21, l_.str.1@PAGE
Lloh3:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1
	bl	_av_sha512_update
	ldr	w8, [x20]
	and	w8, w8, #0x7f
	cmp	w8, #112
	b.ne	LBB0_2
LBB0_3:
	add	x1, sp, #12
	mov	x0, x20
	mov	w2, #8
	bl	_av_sha512_update
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #8
	bl	_av_sha512_update
	str	wzr, [sp, #12]
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.4:
	mov	w9, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x19, w9, sxtw #3
	ldr	x8, [x20, #8]
	ldr	w1, [x8, w9, sxtw #2]
	bl	_AV_WB64
	ldr	w8, [sp, #12]
	add	w9, w8, #1
	str	w9, [sp, #12]
	ldr	w8, [x20, #4]
	cmp	w9, w8
	b.lt	LBB0_5
; %bb.6:
	lsl	w9, w9, #3
	sxtw	x9, w9
	tbz	w8, #0, LBB0_8
LBB0_7:
	add	x0, x19, x9
	bl	_AV_WB32
LBB0_8:
	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
LBB0_9:
	mov	x9, #0
	tbnz	w8, #0, LBB0_7
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\200"

l_.str.1:                               ; @.str.1
	.space	1

.subsections_via_symbols
