	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_sha_info_update
_mtk_sha_info_update:                   ## @mtk_sha_info_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	%rdx, %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %edi
	callq	_ahash_request_ctx
	movq	%rax, %rbx
	leaq	24(%rax), %r12
	movq	_SHA_DATA_LEN_MSK@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	notl	%eax
	andl	%eax, 16(%rbx)
	addq	%r15, %r13
	movq	%r13, %rdi
	callq	_cpu_to_le32
	orl	%eax, 16(%rbx)
	movl	(%r14), %eax
	notl	%eax
	movq	32(%rbx), %rcx
	andl	%eax, (%rcx)
	movq	%r13, %rdi
	callq	_cpu_to_le32
	movq	32(%rbx), %rcx
	orl	%eax, (%rcx)
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_SHA_TFM_START@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	movq	(%r12), %rdx
	andl	%ecx, (%rdx)
LBB0_2:
	addq	%r15, %rax
	movq	%rax, 8(%rbx)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %edi
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rsi
	movl	$16, %edx
	callq	_dma_map_single
	movl	%eax, (%rbx)
	movl	(%r14), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	$16, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_4:
	movl	(%rbx), %eax
	addl	$16, %eax
	movl	%eax, 4(%rbx)
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SHA_DATA_LEN_MSK,4,2           ## @SHA_DATA_LEN_MSK
	.comm	_SHA_TFM_START,4,2              ## @SHA_TFM_START
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma %zu bytes error\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mtk_sha_info_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_sha_info_update
_mtk_sha_info_update:                   ; @mtk_sha_info_update
	.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	x23, x3
	mov	x21, x2
	mov	x19, x0
	ldr	w0, [x1]
	bl	_ahash_request_ctx
	mov	x20, x0
Lloh0:
	adrp	x24, _SHA_DATA_LEN_MSK@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SHA_DATA_LEN_MSK@GOTPAGEOFF]
	add	x22, x0, #24
	ldr	w8, [x24]
	ldr	w9, [x0, #16]
	bic	w8, w9, w8
	str	w8, [x0, #16]
	add	x23, x23, x21
	mov	x0, x23
	bl	_cpu_to_le32
	ldr	w8, [x20, #16]
	orr	w8, w8, w0
	str	w8, [x20, #16]
	ldr	w8, [x24]
	ldr	x9, [x20, #32]
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
	mov	x0, x23
	bl	_cpu_to_le32
	ldr	x8, [x20, #32]
	ldr	w9, [x8]
	orr	w9, w9, w0
	str	w9, [x8]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x9, _SHA_TFM_START@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SHA_TFM_START@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	ldr	x10, [x22]
	ldr	w11, [x10]
	bic	w9, w11, w9
	str	w9, [x10]
LBB0_2:
	add	x8, x8, x21
	str	x8, [x20, #8]
	ldr	w0, [x19]
Lloh5:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x1, x22
	mov	w2, #16
	bl	_dma_map_single
	mov	x1, x0
	str	w0, [x20]
	ldr	w0, [x19]
	bl	_dma_mapping_error
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #16
	bl	_dev_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	ldr	w8, [x20]
	add	w8, w8, #16
	str	w8, [x20, #4]
LBB0_5:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SHA_DATA_LEN_MSK,4,2           ; @SHA_DATA_LEN_MSK
	.comm	_SHA_TFM_START,4,2              ; @SHA_TFM_START
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma %zu bytes error\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mtk_sha_info_update
.subsections_via_symbols
