	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_sha_update_slow
_mtk_sha_update_slow:                   ## @mtk_sha_update_slow
	.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, %r15
	movq	%rdi, %r14
	movl	4(%rsi), %edi
	callq	_ahash_request_ctx
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_mtk_sha_append_sg
	movq	_SHA_FLAGS_FINUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_1
## %bb.2:
	movq	16(%rbx), %r12
	movl	(%r14), %edi
	movq	8(%rbx), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	testq	%r12, %r12
	je	LBB0_7
## %bb.3:
	movq	%rbx, %r12
	addq	$8, %r12
	jmp	LBB0_4
LBB0_1:
	movl	(%r14), %edi
	movq	%rbx, %r12
	addq	$8, %r12
	movq	8(%rbx), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
LBB0_4:
	movq	(%r12), %rcx
	movq	_SHA_BUF_SIZE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_6
## %bb.5:
	cmpq	$0, 16(%rbx)
	jne	LBB0_8
LBB0_6:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_SHA_FLAGS_FINAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_mtk_sha_fill_padding
	movq	8(%rbx), %rcx
LBB0_8:
	movq	$0, 8(%rbx)
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtk_sha_dma_map                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SHA_FLAGS_FINUP,4,2            ## @SHA_FLAGS_FINUP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"slow: bufcnt: %zu\n"

	.comm	_SHA_FLAGS_FINAL,4,2            ## @SHA_FLAGS_FINAL
	.comm	_SHA_BUF_SIZE,8,3               ## @SHA_BUF_SIZE
	.no_dead_strip	_mtk_sha_update_slow
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_sha_update_slow
_mtk_sha_update_slow:                   ; @mtk_sha_update_slow
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x1, #4]
	bl	_ahash_request_ctx
	mov	x21, x0
	bl	_mtk_sha_append_sg
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _SHA_FLAGS_FINUP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SHA_FLAGS_FINUP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	mov	x22, x21
	ldp	x2, x23, [x22, #8]!
	ldr	w0, [x20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	cbnz	x23, LBB0_4
; %bb.2:
Lloh5:
	adrp	x8, _SHA_FLAGS_FINAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SHA_FLAGS_FINAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	x0, x21
	mov	w1, #0
	bl	_mtk_sha_fill_padding
	ldr	x3, [x21, #8]
	b	LBB0_6
LBB0_3:
	ldr	w0, [x20]
	mov	x22, x21
	ldr	x2, [x22, #8]!
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
LBB0_4:
	ldr	x3, [x22]
Lloh10:
	adrp	x8, _SHA_BUF_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SHA_BUF_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x3, x8
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_7
LBB0_6:
	str	xzr, [x21, #8]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_mtk_sha_dma_map
LBB0_7:
	mov	w0, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SHA_FLAGS_FINUP,4,2            ; @SHA_FLAGS_FINUP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"slow: bufcnt: %zu\n"

	.comm	_SHA_FLAGS_FINAL,4,2            ; @SHA_FLAGS_FINAL
	.comm	_SHA_BUF_SIZE,8,3               ; @SHA_BUF_SIZE
	.no_dead_strip	_mtk_sha_update_slow
.subsections_via_symbols
