	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxs_dcp_run_aes
_mxs_dcp_run_aes:                       ## @mxs_dcp_run_aes
	.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, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movq	_global_sdcp@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	8(%r13), %rax
	movq	16(%rax), %r14
	movq	(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_ablkcipher_request_ctx
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edi
	movq	8(%r13), %rax
	movl	8(%rax), %esi
	movq	_AES_KEYSIZE_128@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addl	%edx, %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	callq	_dma_map_single
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edi
	movq	8(%r13), %rax
	movl	4(%rax), %esi
	movq	_DCP_BUF_SZ@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	(%r12), %ecx
	callq	_dma_map_single
	movq	%rax, %r12
	movl	(%r13), %edi
	movq	8(%r13), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movq	%rax, %r8
	movl	8(%r15), %ecx
	movq	_AES_BLOCK_SIZE@GOTPCREL(%rip), %rsi
	movl	%ecx, %eax
	cltd
	idivl	(%rsi)
	testl	%edx, %edx
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_2:
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	movq	_MXS_DCP_CONTROL0_DECR_SEMAPHORE@GOTPCREL(%rip), %rax
	movq	_MXS_DCP_CONTROL0_INTERRUPT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	movq	_MXS_DCP_CONTROL0_ENABLE_CIPHER@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	imulq	$56, -64(%rbp), %rax            ## 8-byte Folded Reload
	movl	%edx, (%r14,%rax)
	movq	_MXS_DCP_CONTROL0_PAYLOAD_KEY@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	leaq	(%r14,%rax), %rsi
	movl	%edx, (%r14,%rax)
	movq	-72(%rbp), %r10                 ## 8-byte Reload
	cmpq	$0, 8(%r10)
	je	LBB0_4
## %bb.3:
	movq	_MXS_DCP_CONTROL0_CIPHER_ENCRYPT@GOTPCREL(%rip), %rdi
	orl	(%rdi), %edx
	movl	%edx, (%rsi)
LBB0_4:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	testl	%r9d, %r9d
	je	LBB0_6
## %bb.5:
	movq	_MXS_DCP_CONTROL0_CIPHER_INIT@GOTPCREL(%rip), %rdi
	orl	(%rdi), %edx
	movl	%edx, (%rsi)
LBB0_6:
	movq	_MXS_DCP_CONTROL1_CIPHER_SELECT_AES128@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 48(%r14,%rax)
	cmpq	$0, (%r10)
	jne	LBB0_7
## %bb.8:
	movq	_MXS_DCP_CONTROL1_CIPHER_MODE_CBC@GOTPCREL(%rip), %rsi
	jmp	LBB0_9
LBB0_7:
	movq	_MXS_DCP_CONTROL1_CIPHER_MODE_ECB@GOTPCREL(%rip), %rsi
LBB0_9:
	orl	(%rsi), %edx
	movl	%edx, 48(%r14,%rax)
	movq	$0, 40(%r14,%rax)
	movq	%r12, 32(%r14,%rax)
	movq	%r8, 24(%r14,%rax)
	movl	%ecx, 4(%r14,%rax)
	movq	%rbx, 16(%r14,%rax)
	movq	$0, 8(%r14,%rax)
	movq	%r15, %rdi
	callq	_mxs_dcp_start_dma
	movl	%eax, %r12d
LBB0_10:
	movl	(%r13), %edi
	movq	_AES_KEYSIZE_128@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addl	%edx, %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movq	%rbx, %rsi
	callq	_dma_unmap_single
	movl	(%r13), %edi
	movq	_DCP_BUF_SZ@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	(%r14), %ecx
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_dma_unmap_single
	movl	(%r13), %edi
	movl	(%r15), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_dma_unmap_single
	movl	%r12d, %eax
	addq	$56, %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	_AES_KEYSIZE_128,4,2            ## @AES_KEYSIZE_128
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_DCP_BUF_SZ,4,2                 ## @DCP_BUF_SZ
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_AES_BLOCK_SIZE,4,2             ## @AES_BLOCK_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid block size!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.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_CIPHER,4,2 ## @MXS_DCP_CONTROL0_ENABLE_CIPHER
	.comm	_MXS_DCP_CONTROL0_PAYLOAD_KEY,4,2 ## @MXS_DCP_CONTROL0_PAYLOAD_KEY
	.comm	_MXS_DCP_CONTROL0_CIPHER_ENCRYPT,4,2 ## @MXS_DCP_CONTROL0_CIPHER_ENCRYPT
	.comm	_MXS_DCP_CONTROL0_CIPHER_INIT,4,2 ## @MXS_DCP_CONTROL0_CIPHER_INIT
	.comm	_MXS_DCP_CONTROL1_CIPHER_SELECT_AES128,4,2 ## @MXS_DCP_CONTROL1_CIPHER_SELECT_AES128
	.comm	_MXS_DCP_CONTROL1_CIPHER_MODE_ECB,4,2 ## @MXS_DCP_CONTROL1_CIPHER_MODE_ECB
	.comm	_MXS_DCP_CONTROL1_CIPHER_MODE_CBC,4,2 ## @MXS_DCP_CONTROL1_CIPHER_MODE_CBC
	.no_dead_strip	_mxs_dcp_run_aes
.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_aes
_mxs_dcp_run_aes:                       ; @mxs_dcp_run_aes
	.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	x28, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _global_sdcp@GOTPAGE
Lloh1:
	ldr	x8, [x8, _global_sdcp@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8]
	ldr	x8, [x25, #8]
	ldr	x24, [x8, #16]
	ldr	x23, [x0]
	mov	x0, x1
	bl	_ablkcipher_request_ctx
	mov	x26, x0
	ldr	w0, [x25]
	ldr	x8, [x25, #8]
Lloh3:
	adrp	x9, _AES_KEYSIZE_128@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AES_KEYSIZE_128@GOTPAGEOFF]
	ldr	w1, [x8, #8]
Lloh5:
	ldr	w8, [x9]
	lsl	w2, w8, #1
Lloh6:
	adrp	x21, _DMA_TO_DEVICE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x21]
	bl	_dma_map_single
	mov	x19, x0
	ldr	w0, [x25]
	ldr	x8, [x25, #8]
	ldr	w1, [x8, #4]
Lloh8:
	adrp	x27, _DCP_BUF_SZ@GOTPAGE
Lloh9:
	ldr	x27, [x27, _DCP_BUF_SZ@GOTPAGEOFF]
	ldr	w2, [x27]
	ldr	w3, [x21]
	bl	_dma_map_single
	mov	x21, x0
	ldr	w0, [x25]
	ldr	x8, [x25, #8]
	ldr	w1, [x8]
	ldr	w2, [x27]
Lloh10:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	bl	_dma_map_single
	mov	x22, x0
	ldr	w8, [x20, #8]
Lloh13:
	adrp	x9, _AES_BLOCK_SIZE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AES_BLOCK_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w9, w10, w9, w8
	cbz	w9, LBB0_2
; %bb.1:
	ldr	w0, [x25]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_2:
Lloh21:
	adrp	x9, _MXS_DCP_CONTROL0_DECR_SEMAPHORE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MXS_DCP_CONTROL0_DECR_SEMAPHORE@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
Lloh24:
	adrp	x10, _MXS_DCP_CONTROL0_INTERRUPT@GOTPAGE
Lloh25:
	ldr	x10, [x10, _MXS_DCP_CONTROL0_INTERRUPT@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
Lloh27:
	adrp	x11, _MXS_DCP_CONTROL0_ENABLE_CIPHER@GOTPAGE
Lloh28:
	ldr	x11, [x11, _MXS_DCP_CONTROL0_ENABLE_CIPHER@GOTPAGEOFF]
	orr	w9, w10, w9
Lloh29:
	ldr	w10, [x11]
	orr	w10, w9, w10
	mov	w9, #56
	madd	x9, x23, x9, x24
	str	w10, [x9]
Lloh30:
	adrp	x11, _MXS_DCP_CONTROL0_PAYLOAD_KEY@GOTPAGE
Lloh31:
	ldr	x11, [x11, _MXS_DCP_CONTROL0_PAYLOAD_KEY@GOTPAGEOFF]
Lloh32:
	ldr	w11, [x11]
	orr	w10, w11, w10
	str	w10, [x9]
	ldr	x11, [x26, #8]
	cbz	x11, LBB0_4
; %bb.3:
Lloh33:
	adrp	x11, _MXS_DCP_CONTROL0_CIPHER_ENCRYPT@GOTPAGE
Lloh34:
	ldr	x11, [x11, _MXS_DCP_CONTROL0_CIPHER_ENCRYPT@GOTPAGEOFF]
Lloh35:
	ldr	w11, [x11]
	orr	w10, w11, w10
	str	w10, [x9]
LBB0_4:
	cbz	w28, LBB0_6
; %bb.5:
Lloh36:
	adrp	x11, _MXS_DCP_CONTROL0_CIPHER_INIT@GOTPAGE
Lloh37:
	ldr	x11, [x11, _MXS_DCP_CONTROL0_CIPHER_INIT@GOTPAGEOFF]
Lloh38:
	ldr	w11, [x11]
	orr	w10, w10, w11
	str	w10, [x9]
LBB0_6:
Lloh39:
	adrp	x9, _MXS_DCP_CONTROL1_CIPHER_SELECT_AES128@GOTPAGE
Lloh40:
	ldr	x9, [x9, _MXS_DCP_CONTROL1_CIPHER_SELECT_AES128@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	mov	w10, #56
	madd	x10, x23, x10, x24
	str	w9, [x10, #48]
Lloh42:
	adrp	x11, _MXS_DCP_CONTROL1_CIPHER_MODE_CBC@GOTPAGE
Lloh43:
	ldr	x11, [x11, _MXS_DCP_CONTROL1_CIPHER_MODE_CBC@GOTPAGEOFF]
Lloh44:
	adrp	x12, _MXS_DCP_CONTROL1_CIPHER_MODE_ECB@GOTPAGE
Lloh45:
	ldr	x12, [x12, _MXS_DCP_CONTROL1_CIPHER_MODE_ECB@GOTPAGEOFF]
	ldr	x13, [x26]
	cmp	x13, #0
	csel	x11, x11, x12, eq
	ldr	w11, [x11]
	orr	w9, w11, w9
	str	w9, [x10, #48]
	stp	x21, xzr, [x10, #32]
	stp	x19, x22, [x10, #16]
	str	w8, [x10, #4]
	str	xzr, [x10, #8]
	mov	x0, x20
	bl	_mxs_dcp_start_dma
	mov	x20, x0
LBB0_7:
	ldr	w0, [x25]
Lloh46:
	adrp	x8, _AES_KEYSIZE_128@GOTPAGE
Lloh47:
	ldr	x8, [x8, _AES_KEYSIZE_128@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	lsl	w2, w8, #1
Lloh49:
	adrp	x23, _DMA_TO_DEVICE@GOTPAGE
Lloh50:
	ldr	x23, [x23, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x1, x19
	bl	_dma_unmap_single
	ldr	w0, [x25]
	ldr	w2, [x27]
	ldr	w3, [x23]
	mov	x1, x21
	bl	_dma_unmap_single
	ldr	w0, [x25]
	ldr	w2, [x27]
Lloh51:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh52:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh53:
	ldr	w3, [x8]
	mov	x1, x22
	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 AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_global_sdcp,8,3                ; @global_sdcp
	.comm	_AES_KEYSIZE_128,4,2            ; @AES_KEYSIZE_128
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_DCP_BUF_SZ,4,2                 ; @DCP_BUF_SZ
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_AES_BLOCK_SIZE,4,2             ; @AES_BLOCK_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid block size!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.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_CIPHER,4,2 ; @MXS_DCP_CONTROL0_ENABLE_CIPHER
	.comm	_MXS_DCP_CONTROL0_PAYLOAD_KEY,4,2 ; @MXS_DCP_CONTROL0_PAYLOAD_KEY
	.comm	_MXS_DCP_CONTROL0_CIPHER_ENCRYPT,4,2 ; @MXS_DCP_CONTROL0_CIPHER_ENCRYPT
	.comm	_MXS_DCP_CONTROL0_CIPHER_INIT,4,2 ; @MXS_DCP_CONTROL0_CIPHER_INIT
	.comm	_MXS_DCP_CONTROL1_CIPHER_SELECT_AES128,4,2 ; @MXS_DCP_CONTROL1_CIPHER_SELECT_AES128
	.comm	_MXS_DCP_CONTROL1_CIPHER_MODE_ECB,4,2 ; @MXS_DCP_CONTROL1_CIPHER_MODE_ECB
	.comm	_MXS_DCP_CONTROL1_CIPHER_MODE_CBC,4,2 ; @MXS_DCP_CONTROL1_CIPHER_MODE_CBC
	.no_dead_strip	_mxs_dcp_run_aes
.subsections_via_symbols
