	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wp512_final
_wp512_final:                           ## @wp512_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	%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
	movq	%rsi, %r14
	callq	_shash_desc_ctx
	movq	%rax, %rbx
	movq	(%rax), %r13
	movq	8(%rax), %r12
	movl	16(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %ecx
	andb	$7, %cl
	movl	$128, %eax
	shrl	%cl, %eax
	movslq	20(%rbx), %rsi
	orl	%eax, (%r13,%rsi,4)
	movq	%rsi, %rcx
	incq	%rcx
	movq	_WP512_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_WP512_LENGTHBYTES@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%eax, %r15d
	subl	%edx, %r15d
	cmpl	%r15d, %esi
	jl	LBB0_4
## %bb.1:
	subl	%ecx, %eax
	jle	LBB0_3
## %bb.2:
	leaq	(,%rcx,4), %rdi
	addq	%r13, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_memset
LBB0_3:
	movq	%rbx, %rdi
	callq	_wp512_process_buffer
	movq	_WP512_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_WP512_LENGTHBYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	subl	%edx, %r15d
	xorl	%ecx, %ecx
LBB0_4:
	movl	%r15d, %eax
	subl	%ecx, %eax
	jle	LBB0_6
## %bb.5:
	movslq	%ecx, %rcx
	leaq	(,%rcx,4), %rdi
	addq	%r13, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_memset
	movq	_WP512_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_WP512_LENGTHBYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	subl	%edx, %r15d
LBB0_6:
	movslq	%r15d, %rax
	leaq	(,%rax,4), %rdi
	addq	%r13, %rdi
	movq	%r12, %rsi
	callq	_memcpy
	movq	%rbx, %rdi
	callq	_wp512_process_buffer
	movq	_WP512_DIGEST_SIZE@GOTPCREL(%rip), %r13
	cmpl	$8, (%r13)
	jl	LBB0_9
## %bb.7:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rax
	movl	(%rax,%r12,4), %edi
	callq	_cpu_to_be64
	movl	%eax, (%r14,%r12,4)
	incq	%r12
	movl	(%r13), %eax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rax
	cmpq	%rax, %r12
	jl	LBB0_8
LBB0_9:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 16(%rbx)
	movl	%r15d, 20(%rbx)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WP512_BLOCK_SIZE,4,2           ## @WP512_BLOCK_SIZE
	.comm	_WP512_LENGTHBYTES,4,2          ## @WP512_LENGTHBYTES
	.comm	_WP512_DIGEST_SIZE,4,2          ## @WP512_DIGEST_SIZE
	.no_dead_strip	_wp512_final
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wp512_final
_wp512_final:                           ; @wp512_final
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	bl	_shash_desc_ctx
	mov	x20, x0
	ldp	x23, x21, [x0]
	ldp	w22, w10, [x0, #16]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	and	x8, x22, #0x7
	mov	w9, #128
	lsr	w8, w9, w8
	lsl	x9, x10, #2
	ldr	w11, [x23, x9]
	orr	w8, w11, w8
	str	w8, [x23, x9]
	add	w9, w10, #1
Lloh0:
	adrp	x25, _WP512_BLOCK_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _WP512_BLOCK_SIZE@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh2:
	adrp	x26, _WP512_LENGTHBYTES@GOTPAGE
Lloh3:
	ldr	x26, [x26, _WP512_LENGTHBYTES@GOTPAGEOFF]
	ldr	w2, [x26]
	sub	w24, w8, w2
	cmp	w10, w24
	b.lt	LBB0_4
; %bb.1:
	subs	w2, w8, w9
	b.le	LBB0_3
; %bb.2:
	add	x0, x23, w9, sxtw #2
	mov	w1, #0
	bl	_memset
LBB0_3:
	mov	x0, x20
	bl	_wp512_process_buffer
	mov	w9, #0
	ldr	w8, [x25]
	ldr	w2, [x26]
	sub	w24, w8, w2
LBB0_4:
	subs	w8, w24, w9
	b.le	LBB0_6
; %bb.5:
	add	x0, x23, w9, sxtw #2
	mov	w1, #0
	mov	x2, x8
	bl	_memset
	ldr	w8, [x25]
	ldr	w2, [x26]
	sub	w24, w8, w2
LBB0_6:
	add	x0, x23, w24, sxtw #2
	mov	x1, x21
	bl	_memcpy
	mov	x0, x20
	bl	_wp512_process_buffer
Lloh4:
	adrp	x21, _WP512_DIGEST_SIZE@GOTPAGE
Lloh5:
	ldr	x21, [x21, _WP512_DIGEST_SIZE@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #8
	b.lt	LBB0_9
; %bb.7:
	mov	x23, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	lsl	x25, x23, #2
	ldr	w0, [x8, x25]
	bl	_cpu_to_be64
	str	w0, [x19, x25]
	add	x23, x23, #1
	ldr	w8, [x21]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	cmp	x23, w8, sxtw
	b.lt	LBB0_8
LBB0_9:
	stp	w22, w24, [x20, #16]
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_WP512_BLOCK_SIZE,4,2           ; @WP512_BLOCK_SIZE
	.comm	_WP512_LENGTHBYTES,4,2          ; @WP512_LENGTHBYTES
	.comm	_WP512_DIGEST_SIZE,4,2          ; @WP512_DIGEST_SIZE
	.no_dead_strip	_wp512_final
.subsections_via_symbols
