	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_aes_gcm_crypt
_mtk_aes_gcm_crypt:                     ## @mtk_aes_gcm_crypt
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_crypto_aead_reqtfm
	movl	%eax, %edi
	callq	_crypto_aead_ctx
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mtk_aes_gcm_ctx_cast
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_aead_request_ctx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_AES_FLAGS_ENCRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	xorl	%r12d, %r12d
	testl	%r14d, %r13d
	setne	-41(%rbp)                       ## 1-byte Folded Spill
	movq	%r15, %rdi
	callq	_mtk_aes_find_dev
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	8(%rbx), %rcx
	testl	%r14d, %r13d
	je	LBB0_5
## %bb.4:
	xorl	%edx, %edx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_6
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_5:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	8(%rsi), %rdx
LBB0_6:
	subq	%rdx, %rcx
	movq	%rcx, (%rsi)
	jne	LBB0_9
## %bb.7:
	cmpl	$0, 4(%rbx)
	je	LBB0_8
LBB0_9:
	movb	-41(%rbp), %cl                  ## 1-byte Reload
	movb	%cl, %r12b
	movq	_AES_FLAGS_GCM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r14d
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%r14d, (%rcx)
	movq	%rax, %rdi
	movl	%r12d, %esi
	movq	%rbx, %rdx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtk_aes_handle_queue           ## TAILCALL
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AES_FLAGS_ENCRYPT,4,2          ## @AES_FLAGS_ENCRYPT
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AES_FLAGS_GCM,4,2              ## @AES_FLAGS_GCM
	.no_dead_strip	_mtk_aes_gcm_crypt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_aes_gcm_crypt
_mtk_aes_gcm_crypt:                     ; @mtk_aes_gcm_crypt
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_crypto_aead_reqtfm
	bl	_crypto_aead_ctx
	mov	x24, x0
	bl	_mtk_aes_gcm_ctx_cast
	mov	x23, x0
	mov	x0, x19
	bl	_aead_request_ctx
	mov	x21, x0
Lloh0:
	adrp	x8, _AES_FLAGS_ENCRYPT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AES_FLAGS_ENCRYPT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ands	w25, w8, w20
	cset	w22, ne
	mov	x0, x24
	bl	_mtk_aes_find_dev
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	w25, LBB0_4
; %bb.2:
	mov	x9, #0
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
	ldr	x9, [x23, #8]
LBB0_5:
	subs	x8, x8, x9
	str	x8, [x23]
	b.ne	LBB0_7
; %bb.6:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _AES_FLAGS_GCM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AES_FLAGS_GCM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w8, w8, w20
	str	w8, [x21]
	mov	x1, x22
	mov	x2, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_mtk_aes_handle_queue
LBB0_8:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AES_FLAGS_ENCRYPT,4,2          ; @AES_FLAGS_ENCRYPT
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AES_FLAGS_GCM,4,2              ; @AES_FLAGS_GCM
	.no_dead_strip	_mtk_aes_gcm_crypt
.subsections_via_symbols
