	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_aes_gcm_handle_queue
_omap_aes_gcm_handle_queue:             ## @omap_aes_gcm_handle_queue
	.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	%rsi, %rbx
	movq	%rdi, %r13
	leaq	24(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	28(%rdi), %r15
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_omap_aes_gcm_finish_req
	testb	$1, -56(%rbp)                   ## 1-byte Folded Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmovel	%r12d, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movb	$1, %al
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_lock_irqsave
	movl	$0, %r12d
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_aead_enqueue_request
	movl	%eax, %r12d
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_FLAGS_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	jne	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_aead_get_backlog
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_aead_dequeue_request
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %rbx
	movq	_FLAGS_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	testq	%r14, %r14
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%esi, %esi
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
	subl	(%rax), %esi
	movq	%r14, %rdi
	callq	*(%r14)
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_crypto_aead_reqtfm
	movl	%eax, %edi
	callq	_crypto_aead_ctx
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_aead_request_ctx
	movq	%r14, 16(%r13)
	movq	%r13, 8(%rax)
	movq	%rbx, 8(%r13)
	movl	(%rax), %ecx
	movq	_FLAGS_MODE_MASK@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movl	(%rdx), %eax
	notl	%eax
	andl	(%r13), %eax
	orl	%ecx, %eax
	movl	%eax, (%r13)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_omap_aes_gcm_copy_buffers
	testl	%eax, %eax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	callq	_omap_aes_write_ctrl
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	callq	_omap_aes_crypt_dma_start
	testl	%eax, %eax
	jne	LBB0_11
	jmp	LBB0_13
LBB0_12:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	jmp	LBB0_13
LBB0_8:
	movl	%eax, %r12d
LBB0_13:
	testb	$1, -56(%rbp)                   ## 1-byte Folded Reload
	cmovnel	-44(%rbp), %r12d                ## 4-byte Folded Reload
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FLAGS_BUSY,4,2                 ## @FLAGS_BUSY
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.comm	_FLAGS_MODE_MASK,4,2            ## @FLAGS_MODE_MASK
	.no_dead_strip	_omap_aes_gcm_handle_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_aes_gcm_handle_queue
_omap_aes_gcm_handle_queue:             ; @omap_aes_gcm_handle_queue
	.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	x23, x1
	mov	x20, x0
	mov	w25, #0
	add	x19, x0, #24
	add	x21, x0, #28
Lloh0:
	adrp	x27, _FLAGS_BUSY@GOTPAGE
Lloh1:
	ldr	x27, [x27, _FLAGS_BUSY@GOTPAGEOFF]
Lloh2:
	adrp	x28, _FLAGS_MODE_MASK@GOTPAGE
Lloh3:
	ldr	x28, [x28, _FLAGS_MODE_MASK@GOTPAGEOFF]
                                        ; implicit-def: $w26
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_omap_aes_gcm_finish_req
	mov	x23, #0
	tst	w25, #0x1
	csel	w26, w26, w22, ne
	mov	w25, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_spin_lock_irqsave
	cbz	x23, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	mov	x1, x23
	bl	_aead_enqueue_request
	mov	x22, x0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w22, #0
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x20]
	ldr	w9, [x27]
	tst	w9, w8
	b.ne	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_aead_get_backlog
	mov	x24, x0
	mov	x0, x21
	bl	_aead_dequeue_request
	cbz	x0, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x23, x0
	ldr	w8, [x27]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	cbz	x24, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x24]
Lloh4:
	adrp	x9, _EINPROGRESS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _EINPROGRESS@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	neg	w1, w9
	mov	x0, x24
	blr	x8
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	bl	_crypto_aead_reqtfm
	bl	_crypto_aead_ctx
	mov	x24, x0
	mov	x0, x23
	bl	_aead_request_ctx
	str	x20, [x0, #8]
	stp	x23, x24, [x20, #8]
	ldr	w8, [x28]
	ldr	w9, [x0]
	and	w8, w9, w8
	str	w8, [x0]
	ldr	w9, [x20]
	ldr	w10, [x28]
	bic	w9, w9, w10
	orr	w8, w9, w8
	str	w8, [x20]
	mov	x0, x20
	mov	x1, x23
	bl	_omap_aes_gcm_copy_buffers
	cbnz	w0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_omap_aes_write_ctrl
	mov	x1, x0
	cbnz	w0, LBB0_1
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_omap_aes_crypt_dma_start
	mov	x1, x0
	cbnz	w0, LBB0_1
	b	LBB0_14
LBB0_12:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	b	LBB0_14
LBB0_13:
	mov	x22, x0
LBB0_14:
	tst	w25, #0x1
	csel	w0, w26, w22, ne
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_FLAGS_BUSY,4,2                 ; @FLAGS_BUSY
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.comm	_FLAGS_MODE_MASK,4,2            ; @FLAGS_MODE_MASK
	.no_dead_strip	_omap_aes_gcm_handle_queue
.subsections_via_symbols
