	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sahara_sha_process
_sahara_sha_process:                    ## @sahara_sha_process
	.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	%rdi, %r15
	movq	_dev_ptr@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	callq	_ahash_request_ctx
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_sahara_sha_prepare_request
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	cmpq	$0, 32(%r12)
	je	LBB0_3
## %bb.2:
	movq	%r12, %r13
	addq	$32, %r13
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_sahara_sha_hw_data_descriptor_create
	movq	32(%rbx), %rax
	movq	(%rax), %rax
	movq	$0, (%rax)
	jmp	LBB0_4
LBB0_3:
	movq	(%rbx), %rdi
	movq	8(%r12), %rsi
	movl	16(%r12), %edx
	callq	_memcpy
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_sahara_sha_hw_context_descriptor_create
	movq	24(%rbx), %rax
	movq	32(%rbx), %rcx
	movq	8(%rax), %rax
	movq	(%rcx), %rcx
	movq	%rax, (%rcx)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_sahara_sha_hw_data_descriptor_create
	movq	32(%rbx), %rax
	movq	8(%rax), %r13
LBB0_4:
	movq	$0, (%r13)
	movq	%rbx, %rdi
	callq	_sahara_dump_descriptors
	movq	%rbx, %rdi
	callq	_sahara_dump_links
	leaq	20(%rbx), %r13
	movq	%r13, %rdi
	callq	_reinit_completion
	movq	24(%rbx), %rax
	movq	(%rax), %rsi
	movq	_SAHARA_REG_DAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_sahara_write
	movq	_SAHARA_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	cmpq	$0, 24(%r12)
	je	LBB0_8
## %bb.7:
	movl	16(%rbx), %edi
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_unmap_sg
LBB0_8:
	movq	8(%r12), %rdi
	movq	(%rbx), %rsi
	movl	16(%r12), %edx
	callq	_memcpy
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	movq	8(%r12), %rsi
	movl	(%r12), %edx
	callq	_memcpy
	jmp	LBB0_10
LBB0_5:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dev_ptr,8,3                    ## @dev_ptr
	.comm	_SAHARA_REG_DAR,4,2             ## @SAHARA_REG_DAR
	.comm	_SAHARA_TIMEOUT_MS,4,2          ## @SAHARA_TIMEOUT_MS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SHA timeout\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_sahara_sha_process
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sahara_sha_process
_sahara_sha_process:                    ; @sahara_sha_process
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _dev_ptr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dev_ptr@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	bl	_ahash_request_ctx
	mov	x20, x0
	mov	x0, x19
	bl	_sahara_sha_prepare_request
	cbz	w0, LBB0_10
; %bb.1:
	mov	x22, x20
	ldr	x8, [x22, #32]!
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w3, #0
	bl	_sahara_sha_hw_data_descriptor_create
	ldr	x8, [x21, #32]
	ldr	x8, [x8]
	str	xzr, [x8]
	b	LBB0_4
LBB0_3:
	ldr	x0, [x21]
	ldr	x1, [x20, #8]
	ldr	w2, [x20, #16]
	bl	_memcpy
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w3, #0
	bl	_sahara_sha_hw_context_descriptor_create
	ldp	x8, x9, [x21, #24]
	ldr	x8, [x8, #8]
	ldr	x9, [x9]
	str	x8, [x9]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w3, #1
	bl	_sahara_sha_hw_data_descriptor_create
	ldr	x8, [x21, #32]
	ldr	x22, [x8, #8]
LBB0_4:
	str	xzr, [x22]
	mov	x0, x21
	bl	_sahara_dump_descriptors
	mov	x0, x21
	bl	_sahara_dump_links
	add	x22, x21, #20
	mov	x0, x22
	bl	_reinit_completion
	ldr	x8, [x21, #24]
	ldr	x1, [x8]
Lloh3:
	adrp	x8, _SAHARA_REG_DAR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SAHARA_REG_DAR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_sahara_write
Lloh6:
	adrp	x8, _SAHARA_TIMEOUT_MS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SAHARA_TIMEOUT_MS@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x22
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_9
; %bb.5:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_7
; %bb.6:
	ldp	w1, w0, [x21, #12]
	ldr	w2, [x21, #8]
Lloh9:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	bl	_dma_unmap_sg
LBB0_7:
	ldr	x0, [x20, #8]
	ldr	x1, [x21]
	ldr	w2, [x20, #16]
	bl	_memcpy
	ldr	x0, [x19]
	cbz	x0, LBB0_10
; %bb.8:
	ldr	x1, [x20, #8]
	ldr	w2, [x20]
	bl	_memcpy
	mov	w0, #0
	b	LBB0_10
LBB0_9:
	ldr	w0, [x21, #16]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_dev_ptr,8,3                    ; @dev_ptr
	.comm	_SAHARA_REG_DAR,4,2             ; @SAHARA_REG_DAR
	.comm	_SAHARA_TIMEOUT_MS,4,2          ; @SAHARA_TIMEOUT_MS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SHA timeout\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_sahara_sha_process
.subsections_via_symbols
