	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SHA512_Final                   ## -- Begin function SHA512_Final
	.p2align	4, 0x90
_SHA512_Final:                          ## @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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rsi), %rax
	movq	40(%rsi), %r15
	movb	$-128, (%r15,%rax)
	movq	%rax, %rdi
	incq	%rdi
	je	LBB0_2
## %bb.1:
	addq	%r15, %rdi
	movl	$15, %edx
	subl	%eax, %edx
	xorl	%esi, %esi
	callq	_memset
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_sha512_block_data_order
LBB0_2:
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_memset
	movb	12(%rbx), %al
	movb	%al, 15(%r15)
	movb	13(%rbx), %al
	movb	%al, 14(%r15)
	movb	14(%rbx), %al
	movb	%al, 13(%r15)
	movb	15(%rbx), %al
	movb	%al, 12(%r15)
	movb	8(%rbx), %al
	movb	%al, 7(%r15)
	movb	9(%rbx), %al
	movb	%al, 6(%r15)
	movb	10(%rbx), %al
	movb	%al, 5(%r15)
	movb	11(%rbx), %al
	movb	%al, 4(%r15)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_sha512_block_data_order
	testq	%r14, %r14
	je	LBB0_14
## %bb.3:
	movl	16(%rbx), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_14
## %bb.4:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_11:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rcx
	movl	(%rcx,%rax,4), %ecx
	bswapl	%ecx
	movl	%ecx, 4(%r14,%rax,8)
	movq	24(%rbx), %rcx
	movl	4(%rcx,%rax,4), %ecx
	bswapl	%ecx
	movl	%ecx, 12(%r14,%rax,8)
	addq	$2, %rax
	cmpq	$16, %rax
	jne	LBB0_12
	jmp	LBB0_13
LBB0_9:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rcx
	movl	(%rcx,%rax,4), %ecx
	bswapl	%ecx
	movl	%ecx, 4(%r14,%rax,8)
	movq	24(%rbx), %rcx
	movl	4(%rcx,%rax,4), %ecx
	bswapl	%ecx
	movl	%ecx, 12(%r14,%rax,8)
	addq	$2, %rax
	cmpq	$16, %rax
	jne	LBB0_10
	jmp	LBB0_13
LBB0_7:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rcx
	movl	(%rcx,%rax,4), %ecx
	bswapl	%ecx
	movl	%ecx, 4(%r14,%rax,8)
	movq	24(%rbx), %rcx
	movl	4(%rcx,%rax,4), %ecx
	bswapl	%ecx
	movl	%ecx, 12(%r14,%rax,8)
	addq	$2, %rax
	cmpq	$16, %rax
	jne	LBB0_8
	jmp	LBB0_13
LBB0_5:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rcx
	movl	(%rcx,%rax,4), %ecx
	bswapl	%ecx
	movl	%ecx, 4(%r14,%rax,8)
	movq	24(%rbx), %rcx
	movl	4(%rcx,%rax,4), %ecx
	bswapl	%ecx
	movl	%ecx, 12(%r14,%rax,8)
	addq	$2, %rax
	cmpq	$16, %rax
	jne	LBB0_6
LBB0_13:
	movl	$1, %r12d
LBB0_14:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_11
	.long	L0_0_set_9
	.long	L0_0_set_7
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.comm	_SHA_LBLOCK,4,2                 ## @SHA_LBLOCK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SHA512_Final                   ; -- Begin function SHA512_Final
	.p2align	2
_SHA512_Final:                          ; @SHA512_Final
	.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	x19, x1
	mov	x20, x0
	ldr	x21, [x1, #40]
	ldr	x8, [x1]
	mov	w9, #128
	strb	w9, [x21, x8]
	adds	x9, x8, #1
	b.hs	LBB0_2
; %bb.1:
	add	x0, x21, x9
	mov	w9, #15
	sub	w2, w9, w8
	mov	w1, #0
	bl	_memset
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_sha512_block_data_order
LBB0_2:
	mov	x0, x21
	mov	w1, #0
	mov	w2, #0
	bl	_memset
	ldr	w8, [x19, #12]
	strb	w8, [x21, #15]
	ldr	w8, [x19, #12]
	lsr	w8, w8, #8
	strb	w8, [x21, #14]
	ldrh	w8, [x19, #14]
	strb	w8, [x21, #13]
	ldrb	w8, [x19, #15]
	strb	w8, [x21, #12]
	ldr	w8, [x19, #8]
	strb	w8, [x21, #7]
	ldr	w8, [x19, #8]
	lsr	w8, w8, #8
	strb	w8, [x21, #6]
	ldrh	w8, [x19, #10]
	strb	w8, [x21, #5]
	ldrb	w8, [x19, #11]
	strb	w8, [x21, #4]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_sha512_block_data_order
	cbz	x20, LBB0_7
; %bb.3:
	ldr	w8, [x19, #16]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_7
; %bb.4:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
	mov	x8, #0
	add	x9, x20, #7
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #24]
	ldr	w10, [x10, x8]
	rev	w10, w10
	stur	w10, [x9, #-3]
	add	x8, x8, #4
	add	x9, x9, #8
	cmp	x8, #64
	b.ne	LBB0_6
	b	LBB0_14
LBB0_7:
	mov	w0, #0
	b	LBB0_15
LBB0_8:
	mov	x8, #0
	add	x9, x20, #7
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #24]
	ldr	w10, [x10, x8]
	rev	w10, w10
	stur	w10, [x9, #-3]
	add	x8, x8, #4
	add	x9, x9, #8
	cmp	x8, #64
	b.ne	LBB0_9
	b	LBB0_14
LBB0_10:
	mov	x8, #0
	add	x9, x20, #7
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #24]
	ldr	w10, [x10, x8]
	rev	w10, w10
	stur	w10, [x9, #-3]
	add	x8, x8, #4
	add	x9, x9, #8
	cmp	x8, #64
	b.ne	LBB0_11
	b	LBB0_14
LBB0_12:
	mov	x8, #0
	add	x9, x20, #7
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #24]
	ldr	w10, [x10, x8]
	rev	w10, w10
	stur	w10, [x9, #-3]
	add	x8, x8, #4
	add	x9, x9, #8
	cmp	x8, #64
	b.ne	LBB0_13
LBB0_14:
	mov	w0, #1
LBB0_15:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_8-LBB0_5)>>2
	.byte	(LBB0_10-LBB0_5)>>2
	.byte	(LBB0_12-LBB0_5)>>2
                                        ; -- End function
	.comm	_SHA_LBLOCK,4,2                 ; @SHA_LBLOCK
.subsections_via_symbols
