	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_aes_record_init
_mtk_aes_record_init:                   ## @mtk_aes_record_init
	.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), %r13
	movq	_MTK_REC_NUM@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_5
## %bb.1:
	movq	%rdi, %r15
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movl	$40, %edi
	callq	_kzalloc
	movq	%rax, (%r13,%r12,8)
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %edi
	movq	_AES_BUF_ORDER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	___get_free_pages
	movq	(%r13,%r12,8), %rcx
	movq	%rax, (%rcx)
	movq	(%r13,%r12,8), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, 32(%rax)
	movq	(%r13,%r12,8), %rdi
	addq	$24, %rdi
	callq	_spin_lock_init
	movq	(%r13,%r12,8), %rdi
	addq	$20, %rdi
	movq	_AES_QUEUE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_crypto_init_queue
	movq	(%r13,%r12,8), %rdx
	leaq	16(%rdx), %rdi
	movq	_mtk_aes_queue_task@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_tasklet_init
	movq	(%r13,%r12,8), %rdx
	leaq	12(%rdx), %rdi
	movq	_mtk_aes_done_task@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_tasklet_init
	incq	%r12
	movq	_MTK_REC_NUM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$-8, %rbx
	cmpq	%rax, %r12
	jl	LBB0_2
LBB0_5:
	movq	_MTK_RING0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r13), %rcx
	movl	%eax, 8(%rcx)
	movq	_MTK_RING1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r13), %rcx
	movl	%eax, 8(%rcx)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_6:
	testl	%r12d, %r12d
	je	LBB0_9
## %bb.7:
	negq	%rbx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	-8(%r13,%rbx), %rax
	movq	(%rax), %rdi
	callq	_free_page
	movq	-8(%r13,%rbx), %rdi
	callq	_kfree
	addq	$-8, %rbx
	jne	LBB0_8
LBB0_9:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MTK_REC_NUM,4,2                ## @MTK_REC_NUM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_AES_BUF_ORDER,4,2              ## @AES_BUF_ORDER
	.comm	_AES_QUEUE_SIZE,4,2             ## @AES_QUEUE_SIZE
	.comm	_mtk_aes_queue_task,4,2         ## @mtk_aes_queue_task
	.comm	_mtk_aes_done_task,4,2          ## @mtk_aes_done_task
	.comm	_MTK_RING0,4,2                  ## @MTK_RING0
	.comm	_MTK_RING1,4,2                  ## @MTK_RING1
	.no_dead_strip	_mtk_aes_record_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_aes_record_init
_mtk_aes_record_init:                   ; @mtk_aes_record_init
	.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
	ldr	x21, [x0]
Lloh0:
	adrp	x22, _MTK_REC_NUM@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MTK_REC_NUM@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x20, x0
	mov	x23, #0
	mov	x24, #0
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh5:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	adrp	x26, _AES_BUF_ORDER@GOTPAGE
Lloh8:
	ldr	x26, [x26, _AES_BUF_ORDER@GOTPAGEOFF]
Lloh9:
	adrp	x28, _mtk_aes_queue_task@GOTPAGE
Lloh10:
	ldr	x28, [x28, _mtk_aes_queue_task@GOTPAGEOFF]
Lloh11:
	adrp	x19, _mtk_aes_done_task@GOTPAGE
Lloh12:
	ldr	x19, [x19, _mtk_aes_done_task@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	w0, #40
	bl	_kzalloc
	str	x0, [x21, x24, lsl #3]
	cbz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x25]
	ldr	w1, [x26]
	bl	___get_free_pages
	lsl	x27, x24, #3
	ldr	x8, [x21, x27]
	str	x0, [x8]
	ldr	x8, [x21, x27]
	ldr	x9, [x8]
	cbz	x9, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	str	x20, [x8, #32]
	ldr	x8, [x21, x27]
	add	x0, x8, #24
	bl	_spin_lock_init
	ldr	x8, [x21, x27]
	add	x0, x8, #20
Lloh13:
	adrp	x8, _AES_QUEUE_SIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AES_QUEUE_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	bl	_crypto_init_queue
	ldr	x2, [x21, x27]
	add	x0, x2, #16
	ldr	w1, [x28]
	bl	_tasklet_init
	ldr	x2, [x21, x27]
	add	x0, x2, #12
	ldr	w1, [x19]
	bl	_tasklet_init
	add	x24, x24, #1
	ldrsw	x8, [x22]
	sub	x23, x23, #8
	cmp	x24, x8
	b.lt	LBB0_2
LBB0_5:
	mov	w0, #0
Lloh16:
	adrp	x8, _MTK_RING0@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MTK_RING0@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldp	x9, x10, [x21]
	str	w8, [x9, #8]
Lloh19:
	adrp	x8, _MTK_RING1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MTK_RING1@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x10, #8]
	b	LBB0_10
LBB0_6:
	cbz	w24, LBB0_9
; %bb.7:
	neg	x19, x23
	sub	x20, x21, #8
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, x19]
	ldr	x0, [x8]
	bl	_free_page
	ldr	x0, [x20, x19]
	bl	_kfree
	subs	x19, x19, #8
	b.ne	LBB0_8
LBB0_9:
	ldr	w0, [sp, #12]                   ; 4-byte Folded Reload
LBB0_10:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MTK_REC_NUM,4,2                ; @MTK_REC_NUM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_AES_BUF_ORDER,4,2              ; @AES_BUF_ORDER
	.comm	_AES_QUEUE_SIZE,4,2             ; @AES_QUEUE_SIZE
	.comm	_mtk_aes_queue_task,4,2         ; @mtk_aes_queue_task
	.comm	_mtk_aes_done_task,4,2          ; @mtk_aes_done_task
	.comm	_MTK_RING0,4,2                  ; @MTK_RING0
	.comm	_MTK_RING1,4,2                  ; @MTK_RING1
	.no_dead_strip	_mtk_aes_record_init
.subsections_via_symbols
