	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_safexcel_dequeue               ## -- Begin function safexcel_dequeue
	.p2align	4, 0x90
_safexcel_dequeue:                      ## @safexcel_dequeue
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movslq	%esi, %r12
	leaq	(%r12,%r12,4), %rcx
	movq	24(%rax,%rcx,8), %r14
	testq	%r14, %r14
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.4:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	16(%rax,%rcx,8), %rbx
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_5
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_2:
	movq	8(%r13), %rax
	leaq	(,%r12,8), %rcx
	leaq	(%rcx,%rcx,4), %r15
	leaq	(%rax,%r15), %rdi
	addq	$32, %rdi
	callq	_spin_lock_bh
	movq	8(%r13), %rax
	leaq	(%rax,%r15), %rdi
	addq	$36, %rdi
	callq	_crypto_get_backlog
	movq	%rax, %rbx
	movq	8(%r13), %rax
	leaq	(%rax,%r15), %rdi
	addq	$36, %rdi
	callq	_crypto_dequeue_request
	movq	%rax, %r14
	movq	8(%r13), %rax
	leaq	(%rax,%r15), %rdi
	addq	$32, %rdi
	callq	_spin_unlock_bh
	testq	%r14, %r14
	je	LBB0_3
LBB0_5:
	movl	8(%r14), %edi
	callq	_crypto_tfm_ctx
	leaq	-64(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	movq	%r14, %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.7:
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	subl	(%rax), %esi
	movq	%rbx, %rdi
	callq	*(%rbx)
LBB0_8:
	movl	-64(%rbp), %ecx
	movl	-60(%rbp), %eax
	movl	%ecx, %edx
	orl	%eax, %edx
	je	LBB0_2
## %bb.9:
	addl	%ecx, -52(%rbp)                 ## 4-byte Folded Spill
	addl	%eax, -48(%rbp)                 ## 4-byte Folded Spill
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	jmp	LBB0_2
LBB0_3:
	movq	8(%r13), %rax
	xorps	%xmm0, %xmm0
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movups	%xmm0, 16(%rax,%r14,8)
	jmp	LBB0_11
LBB0_10:
	movq	8(%r13), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, 24(%rax,%rcx,8)
	movq	%rcx, %r14
	movq	%rbx, 16(%rax,%rcx,8)
LBB0_11:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	je	LBB0_15
## %bb.12:
	shlq	$3, %r12
	leaq	(%r12,%r12,4), %rbx
	leaq	(%rax,%rbx), %rdi
	addq	$8, %rdi
	movl	%ecx, %r15d
	callq	_spin_lock_bh
	movq	8(%r13), %rax
	addl	%r15d, (%rax,%rbx)
	cmpl	$0, 4(%rax,%rbx)
	jne	LBB0_14
## %bb.13:
	movq	%r13, %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	callq	_safexcel_try_push_requests
	movq	8(%r13), %rax
	movl	$1, 4(%rax,%r14,8)
LBB0_14:
	leaq	(%rax,%r14,8), %rdi
	addq	$8, %rdi
	callq	_spin_unlock_bh
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	imull	(%r13), %ebx
	shll	$2, %ebx
	movq	%r13, %rdi
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %esi
	callq	_EIP197_HIA_RDR
	movq	_EIP197_HIA_xDR_PREP_COUNT@GOTPCREL(%rip), %r14
	addq	(%r14), %rax
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_writel
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	imull	4(%r13), %ebx
	shll	$2, %ebx
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_EIP197_HIA_CDR
	addq	(%r14), %rax
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_writel
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.comm	_EIP197_HIA_xDR_PREP_COUNT,8,3  ## @EIP197_HIA_xDR_PREP_COUNT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_safexcel_dequeue               ; -- Begin function safexcel_dequeue
	.p2align	2
_safexcel_dequeue:                      ; @safexcel_dequeue
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x1
	mov	x20, x0
	mov	w26, #0
	ldr	x8, [x0, #8]
	sxtw	x24, w19
	mov	w9, #40
	smaddl	x8, w1, w9, x8
	ldr	x22, [x8, #24]
	cbz	x22, LBB0_2
; %bb.1:
	ldr	x21, [x8, #16]
	mov	x23, x26
	mov	x25, x26
	b	LBB0_4
LBB0_2:
	mov	x23, x26
	mov	x25, x26
LBB0_3:
	ldr	x8, [x20, #8]
	add	x9, x24, x24, lsl #2
	lsl	x27, x9, #3
	add	x8, x8, x27
	add	x0, x8, #32
	bl	_spin_lock_bh
	ldr	x8, [x20, #8]
	add	x8, x8, x27
	add	x0, x8, #36
	bl	_crypto_get_backlog
	mov	x21, x0
	ldr	x8, [x20, #8]
	add	x8, x8, x27
	add	x0, x8, #36
	bl	_crypto_dequeue_request
	mov	x22, x0
	ldr	x8, [x20, #8]
	add	x8, x8, x27
	add	x0, x8, #32
	bl	_spin_unlock_bh
	cbz	x22, LBB0_8
LBB0_4:
	ldr	w0, [x22, #8]
	bl	_crypto_tfm_ctx
	ldr	x8, [x0]
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x22
	mov	x1, x19
	blr	x8
	cbnz	w0, LBB0_9
; %bb.5:
	cbz	x21, LBB0_7
; %bb.6:
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _EINPROGRESS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EINPROGRESS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	neg	w1, w9
	mov	x0, x21
	blr	x8
LBB0_7:
	ldp	w9, w8, [sp, #8]
	orr	w10, w8, w9
	add	w8, w8, w23
	add	w9, w9, w25
	cmp	w10, #0
	csel	w23, w23, w8, eq
	cinc	w26, w26, ne
	csel	w25, w25, w9, eq
	b	LBB0_3
LBB0_8:
	ldr	x8, [x20, #8]
	mov	w9, #40
	madd	x9, x24, x9, x8
	stp	xzr, xzr, [x9, #16]
	cbnz	w26, LBB0_10
	b	LBB0_13
LBB0_9:
	ldr	x8, [x20, #8]
	mov	w9, #40
	madd	x9, x24, x9, x8
	stp	x21, x22, [x9, #16]
	cbz	w26, LBB0_13
LBB0_10:
	add	x9, x24, x24, lsl #2
	lsl	x21, x9, #3
	add	x8, x8, x21
	add	x0, x8, #8
	bl	_spin_lock_bh
	ldr	x8, [x20, #8]
	add	x9, x8, x21
	ldp	w10, w11, [x9]
	add	w10, w10, w26
	str	w10, [x9]
	cbnz	w11, LBB0_12
; %bb.11:
	mov	x0, x20
	mov	x1, x19
	bl	_safexcel_try_push_requests
	ldr	x8, [x20, #8]
	mov	w9, #40
	madd	x9, x24, x9, x8
	mov	w10, #1
	str	w10, [x9, #4]
LBB0_12:
	mov	w9, #40
	madd	x8, x24, x9, x8
	add	x0, x8, #8
	bl	_spin_unlock_bh
	ldr	w8, [x20]
	mul	w8, w25, w8
	lsl	w21, w8, #2
	mov	x0, x20
	mov	x1, x19
	bl	_EIP197_HIA_RDR
Lloh3:
	adrp	x22, _EIP197_HIA_xDR_PREP_COUNT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _EIP197_HIA_xDR_PREP_COUNT@GOTPAGEOFF]
	ldr	x8, [x22]
	add	x1, x8, x0
	mov	x0, x21
	bl	_writel
	ldr	w8, [x20, #4]
	mul	w8, w23, w8
	lsl	w21, w8, #2
	mov	x0, x20
	mov	x1, x19
	bl	_EIP197_HIA_CDR
	ldr	x8, [x22]
	add	x1, x8, x0
	mov	x0, x21
	bl	_writel
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.comm	_EIP197_HIA_xDR_PREP_COUNT,8,3  ; @EIP197_HIA_xDR_PREP_COUNT
.subsections_via_symbols
