	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxs_dcp_run_sha
_mxs_dcp_run_sha:                       ## @mxs_dcp_run_sha
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_global_sdcp@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	callq	_crypto_ahash_reqtfm
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_crypto_ahash_ctx
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_ahash_request_ctx
	movq	%rax, %r15
	movq	8(%r14), %rax
	movq	8(%rax), %rbx
	movq	(%r13), %r12
	movl	(%r14), %edi
	movl	4(%rax), %esi
	movq	_DCP_BUF_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movq	_MXS_DCP_CONTROL0_DECR_SEMAPHORE@GOTPCREL(%rip), %rdx
	movq	_MXS_DCP_CONTROL0_INTERRUPT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	_MXS_DCP_CONTROL0_ENABLE_HASH@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	shlq	$6, %r12
	leaq	(%rbx,%r12), %rdi
	movl	%ecx, (%rbx,%r12)
	movq	8(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	_MXS_DCP_CONTROL0_HASH_INIT@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, (%rdi)
LBB0_2:
	movq	$0, 56(%rbx,%r12)
	movq	%rax, 48(%rbx,%r12)
	movq	$0, 40(%rbx,%r12)
	movdqu	8(%r13), %xmm0
	movdqu	%xmm0, 8(%rbx,%r12)
	xorps	%xmm1, %xmm1
	movups	%xmm1, 24(%rbx,%r12)
	movq	(%r15), %rcx
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.3:
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.4:
	pextrq	$1, %xmm0, %rdx
	testq	%rdx, %rdx
	jne	LBB0_9
## %bb.5:
	movq	%rax, %r15
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_crypto_hash_alg_common
	movq	8(%r13), %rcx
	movq	_MXS_DCP_CONTROL1_HASH_SELECT_SHA1@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_6
## %bb.7:
	movq	_sha1_null_hash@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_9:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.11:
	leaq	(%rbx,%r12), %rax
	addq	$24, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movl	(%r14), %edi
	movq	8(%r14), %rax
	movl	(%rax), %esi
	movq	_DCP_SHA_PAY_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movq	%rax, %r12
	movq	_MXS_DCP_CONTROL0_HASH_TERM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, (%rax)
	jmp	LBB0_12
LBB0_10:
	xorl	%r12d, %r12d
LBB0_12:
	movq	%r13, %rdi
	callq	_mxs_dcp_start_dma
	movl	%eax, %ebx
	cmpq	$0, (%r15)
	je	LBB0_14
## %bb.13:
	movl	(%r14), %edi
	movq	_DCP_SHA_PAY_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rsi
	callq	_dma_unmap_single
LBB0_14:
	movq	_DCP_BUF_SZ@GOTPCREL(%rip), %rax
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_6:
	movq	_sha256_null_hash@GOTPCREL(%rip), %rcx
LBB0_8:
	movq	(%rcx), %rsi
	movq	8(%r14), %rcx
	movl	(%rcx), %edi
	movl	(%rax), %edx
	callq	_memcpy
	xorl	%ebx, %ebx
	movq	_DCP_BUF_SZ@GOTPCREL(%rip), %rax
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movq	%r15, %rsi
LBB0_15:
	movl	(%r14), %edi
	movl	(%rax), %edx
	movl	(%rcx), %ecx
	callq	_dma_unmap_single
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_global_sdcp,8,3                ## @global_sdcp
	.comm	_DCP_BUF_SZ,4,2                 ## @DCP_BUF_SZ
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_MXS_DCP_CONTROL0_DECR_SEMAPHORE,4,2 ## @MXS_DCP_CONTROL0_DECR_SEMAPHORE
	.comm	_MXS_DCP_CONTROL0_INTERRUPT,4,2 ## @MXS_DCP_CONTROL0_INTERRUPT
	.comm	_MXS_DCP_CONTROL0_ENABLE_HASH,4,2 ## @MXS_DCP_CONTROL0_ENABLE_HASH
	.comm	_MXS_DCP_CONTROL0_HASH_INIT,4,2 ## @MXS_DCP_CONTROL0_HASH_INIT
	.comm	_MXS_DCP_CONTROL1_HASH_SELECT_SHA1,8,3 ## @MXS_DCP_CONTROL1_HASH_SELECT_SHA1
	.comm	_sha1_null_hash,8,3             ## @sha1_null_hash
	.comm	_sha256_null_hash,8,3           ## @sha256_null_hash
	.comm	_DCP_SHA_PAY_SZ,4,2             ## @DCP_SHA_PAY_SZ
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_MXS_DCP_CONTROL0_HASH_TERM,4,2 ## @MXS_DCP_CONTROL0_HASH_TERM
	.no_dead_strip	_mxs_dcp_run_sha
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxs_dcp_run_sha
_mxs_dcp_run_sha:                       ; @mxs_dcp_run_sha
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
Lloh0:
	adrp	x8, _global_sdcp@GOTPAGE
Lloh1:
	ldr	x8, [x8, _global_sdcp@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	bl	_crypto_ahash_reqtfm
	mov	x22, x0
	bl	_crypto_ahash_ctx
	mov	x20, x0
	mov	x0, x19
	bl	_ahash_request_ctx
	mov	x21, x0
	ldr	x8, [x23, #8]
	ldr	x24, [x8, #8]
	ldr	x26, [x20]
	ldr	w0, [x23]
	ldr	w1, [x8, #4]
Lloh3:
	adrp	x28, _DCP_BUF_SZ@GOTPAGE
Lloh4:
	ldr	x28, [x28, _DCP_BUF_SZ@GOTPAGEOFF]
	ldr	w2, [x28]
Lloh5:
	adrp	x25, _DMA_TO_DEVICE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x25]
	bl	_dma_map_single
	mov	x19, x0
Lloh7:
	adrp	x8, _MXS_DCP_CONTROL0_DECR_SEMAPHORE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MXS_DCP_CONTROL0_DECR_SEMAPHORE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _MXS_DCP_CONTROL0_INTERRUPT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MXS_DCP_CONTROL0_INTERRUPT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh13:
	adrp	x9, _MXS_DCP_CONTROL0_ENABLE_HASH@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MXS_DCP_CONTROL0_ENABLE_HASH@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w9, w8, w9
	add	x26, x24, x26, lsl #6
	mov	x27, x26
	str	w9, [x26]
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh16:
	adrp	x10, _MXS_DCP_CONTROL0_HASH_INIT@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MXS_DCP_CONTROL0_HASH_INIT@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x27]
LBB0_2:
	ldp	x10, x9, [x20, #8]
	str	xzr, [x26, #24]!
	stp	x19, xzr, [x26, #24]
	stp	x10, x9, [x26, #-16]
	stp	xzr, xzr, [x26, #8]
	ldr	x10, [x21]
	cbz	x8, LBB0_6
; %bb.3:
	cbz	x10, LBB0_6
; %bb.4:
	cbnz	x9, LBB0_6
; %bb.5:
	mov	x0, x22
	bl	_crypto_hash_alg_common
Lloh19:
	adrp	x8, _MXS_DCP_CONTROL1_HASH_SELECT_SHA1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MXS_DCP_CONTROL1_HASH_SELECT_SHA1@GOTPAGEOFF]
	ldr	x9, [x20, #8]
Lloh21:
	ldr	x8, [x8]
Lloh22:
	adrp	x10, _sha1_null_hash@GOTPAGE
Lloh23:
	ldr	x10, [x10, _sha1_null_hash@GOTPAGEOFF]
Lloh24:
	adrp	x11, _sha256_null_hash@GOTPAGE
Lloh25:
	ldr	x11, [x11, _sha256_null_hash@GOTPAGEOFF]
	cmp	x9, x8
	csel	x8, x10, x11, eq
	ldr	x1, [x8]
	ldr	x8, [x23, #8]
	ldr	w8, [x8]
	ldr	w2, [x0]
	mov	x0, x8
	bl	_memcpy
	mov	w20, #0
	b	LBB0_12
LBB0_6:
Lloh26:
	adrp	x28, _DCP_SHA_PAY_SZ@GOTPAGE
Lloh27:
	ldr	x28, [x28, _DCP_SHA_PAY_SZ@GOTPAGEOFF]
Lloh28:
	adrp	x24, _DMA_FROM_DEVICE@GOTPAGE
Lloh29:
	ldr	x24, [x24, _DMA_FROM_DEVICE@GOTPAGEOFF]
	cbz	x10, LBB0_8
; %bb.7:
	ldr	w0, [x23]
	ldr	x8, [x23, #8]
	ldr	w1, [x8]
	ldr	w2, [x28]
	ldr	w3, [x24]
	bl	_dma_map_single
	mov	x22, x0
Lloh30:
	adrp	x8, _MXS_DCP_CONTROL0_HASH_TERM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MXS_DCP_CONTROL0_HASH_TERM@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	ldr	w9, [x27]
	orr	w8, w9, w8
	str	w8, [x27]
	str	x0, [x26]
	b	LBB0_9
LBB0_8:
	mov	x22, #0
LBB0_9:
	mov	x0, x20
	bl	_mxs_dcp_start_dma
	mov	x20, x0
	ldr	x8, [x21]
	cbz	x8, LBB0_11
; %bb.10:
	ldr	w0, [x23]
	ldr	w2, [x28]
	ldr	w3, [x24]
	mov	x1, x22
	bl	_dma_unmap_single
LBB0_11:
Lloh33:
	adrp	x28, _DCP_BUF_SZ@GOTPAGE
Lloh34:
	ldr	x28, [x28, _DCP_BUF_SZ@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x23]
	ldr	w2, [x28]
	ldr	w3, [x25]
	mov	x1, x19
	bl	_dma_unmap_single
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_global_sdcp,8,3                ; @global_sdcp
	.comm	_DCP_BUF_SZ,4,2                 ; @DCP_BUF_SZ
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_MXS_DCP_CONTROL0_DECR_SEMAPHORE,4,2 ; @MXS_DCP_CONTROL0_DECR_SEMAPHORE
	.comm	_MXS_DCP_CONTROL0_INTERRUPT,4,2 ; @MXS_DCP_CONTROL0_INTERRUPT
	.comm	_MXS_DCP_CONTROL0_ENABLE_HASH,4,2 ; @MXS_DCP_CONTROL0_ENABLE_HASH
	.comm	_MXS_DCP_CONTROL0_HASH_INIT,4,2 ; @MXS_DCP_CONTROL0_HASH_INIT
	.comm	_MXS_DCP_CONTROL1_HASH_SELECT_SHA1,8,3 ; @MXS_DCP_CONTROL1_HASH_SELECT_SHA1
	.comm	_sha1_null_hash,8,3             ; @sha1_null_hash
	.comm	_sha256_null_hash,8,3           ; @sha256_null_hash
	.comm	_DCP_SHA_PAY_SZ,4,2             ; @DCP_SHA_PAY_SZ
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_MXS_DCP_CONTROL0_HASH_TERM,4,2 ; @MXS_DCP_CONTROL0_HASH_TERM
	.no_dead_strip	_mxs_dcp_run_sha
.subsections_via_symbols
