	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wp512_update
_wp512_update:                          ## @wp512_update
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r12
	callq	_shash_desc_ctx
	shll	$3, %r15d
	movl	(%rax), %r10d
	movl	%r10d, %r11d
	andl	$7, %r11d
	movq	8(%rax), %r9
	movq	16(%rax), %rdx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	24(%rax), %r8d
	movslq	%r8d, %rax
	xorl	%edi, %edi
	movl	$30, %esi
	movq	%r15, %rbx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	sarl	$8, %ecx
	movzbl	%bh, %edi
	addl	%ecx, %edi
	addl	(%rdx,%rsi,4), %edi
	movl	%edi, (%rdx,%rsi,4)
	sarl	$8, %edi
	shrq	$16, %rbx
	addq	$-2, %rsi
	cmpq	$-2, %rsi
	je	LBB0_6
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testl	%edi, %edi
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testq	%rbx, %rbx
	je	LBB0_6
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movzbl	%bl, %ecx
	addl	%edi, %ecx
	addl	4(%rdx,%rsi,4), %ecx
	movl	%ecx, 4(%rdx,%rsi,4)
	cmpl	$255, %ecx
	ja	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$256, %rbx                      ## imm = 0x100
	jae	LBB0_5
LBB0_6:
	cmpl	$9, %r15d
	jb	LBB0_7
## %bb.8:
	movl	$8, %ebx
	subl	%r11d, %ebx
	leal	-9(%r15), %ecx
	shrl	$3, %ecx
	incl	%ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	(%r9,%rax,4), %esi
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	leal	-16(%r15), %r14d
	addq	$7, %r14
	andq	$-8, %r14
	addq	$8, %r14
	xorl	%r15d, %r15d
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	%r10d, -52(%rbp)                ## 4-byte Spill
	movl	%r10d, %edx
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r11d, %ebx
	callq	_wp512_process_buffer
	movl	%ebx, %r11d
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	movq	-88(%rbp), %r9                  ## 8-byte Reload
	xorl	%edx, %edx
	xorl	%r8d, %r8d
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%ebx, %ecx
	shll	%cl, %r13d
	movslq	%r8d, %rcx
	movl	%r13d, (%r9,%rcx,4)
	addl	%r11d, %edx
	addq	$4, %r12
	addq	$8, %r15
	movl	%r13d, %esi
	cmpq	%r15, %r14
	je	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r12), %r13d
	movl	%r13d, %edi
	movl	%r11d, %ecx
	shrl	%cl, %edi
	orl	%esi, %edi
	movslq	%r8d, %rcx
	movl	%edi, (%r9,%rcx,4)
	addl	%ebx, %edx
	movq	_WP512_BLOCK_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$3, %ecx
	cmpl	%ecx, %edx
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incl	%r8d
	jmp	LBB0_12
LBB0_7:
	xorl	%ecx, %ecx
	movl	%r10d, %edx
	testl	%r15d, %r15d
	jne	LBB0_15
	jmp	LBB0_19
LBB0_13:
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	subl	%r15d, %ecx
	movq	%rcx, %r15
	movl	-52(%rbp), %r10d                ## 4-byte Reload
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	testl	%r15d, %r15d
	je	LBB0_19
LBB0_15:
	movzbl	(%r12,%rcx,4), %r14d
	movl	%r14d, %esi
	movl	%r11d, %ecx
	shrl	%cl, %esi
	movslq	%r8d, %rcx
	orl	%esi, (%r9,%rcx,4)
	orl	$-8, %r10d
	movl	$8, %ebx
	subl	%r11d, %ebx
	addl	%ebx, %edx
	addl	%r10d, %r15d
	movq	_WP512_BLOCK_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$3, %ecx
	cmpl	%ecx, %edx
	jne	LBB0_16
## %bb.17:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r9, %r12
	callq	_wp512_process_buffer
	movq	%r12, %r9
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	jmp	LBB0_18
LBB0_16:
	incl	%r8d
LBB0_18:
	movl	%ebx, %ecx
	shll	%cl, %r14d
	addl	%edx, %r15d
	movslq	%r8d, %rcx
	movl	%r14d, (%r9,%rcx,4)
	movl	%r15d, %edx
LBB0_19:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%edx, (%rcx)
	movl	%r8d, 24(%rcx)
	xorl	%eax, %eax
	addq	$56, %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
	.no_dead_strip	_wp512_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wp512_update
_wp512_update:                          ; @wp512_update
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x20, x1
	bl	_shash_desc_ctx
	mov	x19, x0
	mov	w10, #0
	lsl	w22, w21, #3
	ldr	w23, [x0]
	mov	x9, x23
	and	w24, w23, #0x7
	ldp	x21, x12, [x0, #8]
	ldr	w8, [x0, #24]
	mov	x11, x8
	sxtw	x11, w11
	mov	w13, #124
	mov	x14, x22
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w15, [x12, x13]
	add	w10, w10, w14, uxtb
	add	w10, w10, w15
	str	w10, [x12, x13]
	asr	w10, w10, #8
	lsr	x14, x14, #8
	sub	x13, x13, #4
	cmn	x13, #4
	b.eq	LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cbnz	w10, LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cbnz	x14, LBB0_1
LBB0_4:
Lloh0:
	adrp	x25, _WP512_BLOCK_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _WP512_BLOCK_SIZE@GOTPAGEOFF]
	subs	w10, w22, #9
	b.lo	LBB0_10
; %bb.5:
	mov	w12, #8
	sub	w27, w12, w24
	lsr	w10, w10, #3
	add	w10, w10, #1
	stp	x10, x20, [sp]                  ; 16-byte Folded Spill
	ldr	w10, [x21, x11, lsl #2]
	sub	w11, w22, #16
	add	x11, x11, #7
	lsr	x11, x11, #1
	and	x11, x11, #0xfffffffc
	add	x28, x11, #4
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	bl	_wp512_process_buffer
	mov	w9, #0
	mov	w8, #0
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	lsl	w10, w26, w27
	str	w10, [x21, w8, sxtw #2]
	add	w9, w9, w24
	sub	w22, w22, #8
	add	x20, x20, #4
	subs	x28, x28, #4
	b.eq	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w26, [x20]
	lsr	w11, w26, w24
	orr	w10, w11, w10
	str	w10, [x21, w8, sxtw #2]
	add	w9, w9, w27
	ldr	w10, [x25]
	cmp	w9, w10, lsl #3
	b.eq	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	w8, w8, #1
	b	LBB0_7
LBB0_10:
	mov	x10, #0
	cbnz	w22, LBB0_12
	b	LBB0_16
LBB0_11:
	ldp	x10, x20, [sp]                  ; 16-byte Folded Reload
	cbz	w22, LBB0_16
LBB0_12:
	lsl	x10, x10, #2
	ldrb	w20, [x20, x10]
	lsr	w10, w20, w24
	sbfiz	x11, x8, #2, #32
	ldr	w12, [x21, x11]
	orr	w10, w10, w12
	str	w10, [x21, x11]
	orr	w10, w23, #0xfffffff8
	mov	w11, #8
	sub	w23, w11, w24
	add	w9, w9, w23
	add	w22, w22, w10
	ldr	w10, [x25]
	cmp	w9, w10, lsl #3
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_wp512_process_buffer
	mov	w9, #0
	mov	w8, #0
	b	LBB0_15
LBB0_14:
	add	w8, w8, #1
LBB0_15:
	lsl	w10, w20, w23
	str	w10, [x21, w8, sxtw #2]
	add	w9, w22, w9
LBB0_16:
	str	w9, [x19]
	str	w8, [x19, #24]
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_WP512_BLOCK_SIZE,4,2           ; @WP512_BLOCK_SIZE
	.no_dead_strip	_wp512_update
.subsections_via_symbols
