	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_cipher_alg_register        ## -- Begin function mtk_cipher_alg_register
	.p2align	4, 0x90
_mtk_cipher_alg_register:               ## @mtk_cipher_alg_register
	.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, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_INIT_LIST_HEAD
	movq	%rbx, %rdi
	callq	_mtk_aes_record_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movl	(%rbx), %edi
	movq	16(%rbx), %rax
	movq	_MTK_RING0@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	_mtk_aes_irq@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	8(%rbx), %rax
	movl	(%rax), %r9d
	leaq	L_.str(%rip), %r8
	xorl	%ecx, %ecx
	callq	_devm_request_irq
	movl	(%rbx), %edi
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_8
LBB0_3:
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	_MTK_RING1@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rcx,%rdx,4), %esi
	movl	(%r12), %edx
	movl	4(%rax), %r9d
	leaq	L_.str(%rip), %r8
	xorl	%r15d, %r15d
	xorl	%ecx, %ecx
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r12d
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_7
LBB0_5:
	movq	(%r13), %rdi
	callq	_AIC_ENABLE_SET
	movq	_MTK_IRQ_RDR0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_mtk_aes_write
	movq	_MTK_RING1@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_AIC_ENABLE_SET
	movq	_MTK_IRQ_RDR1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_mtk_aes_write
	movq	_mtk_aes@GOTPCREL(%rip), %r12
	movq	%r12, %rdi
	callq	_spin_lock
	leaq	4(%r12), %rsi
	movq	%r14, %rdi
	callq	_list_add_tail
	movq	%r12, %rdi
	callq	_spin_unlock
	xorl	%eax, %eax
	callq	_mtk_aes_register_algs
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	movl	%eax, %r12d
	movq	_mtk_aes@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_spin_lock
	movq	%r14, %rdi
	callq	_list_del
	movq	%r15, %rdi
	callq	_spin_unlock
LBB0_7:
	movl	%r12d, %r15d
LBB0_8:
	movq	%rbx, %rdi
	callq	_mtk_aes_record_free
LBB0_9:
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_RING0,8,3                  ## @MTK_RING0
	.comm	_mtk_aes_irq,4,2                ## @mtk_aes_irq
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mtk-aes"

L_.str.1:                               ## @.str.1
	.asciz	"unable to request AES irq.\n"

	.comm	_MTK_RING1,8,3                  ## @MTK_RING1
	.comm	_MTK_IRQ_RDR0,4,2               ## @MTK_IRQ_RDR0
	.comm	_MTK_IRQ_RDR1,4,2               ## @MTK_IRQ_RDR1
	.comm	_mtk_aes,8,2                    ## @mtk_aes
L_.str.2:                               ## @.str.2
	.asciz	"mtk-aes initialization failed.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_cipher_alg_register        ; -- Begin function mtk_cipher_alg_register
	.p2align	2
_mtk_cipher_alg_register:               ; @mtk_cipher_alg_register
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	add	x20, x0, #4
	mov	x0, x20
	bl	_INIT_LIST_HEAD
	mov	x0, x19
	bl	_mtk_aes_record_init
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	w0, [x19]
Lloh0:
	adrp	x22, _MTK_RING0@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MTK_RING0@GOTPAGEOFF]
	ldr	x8, [x22]
	ldp	x10, x9, [x19, #8]
	ldr	w1, [x9, x8, lsl #2]
Lloh2:
	adrp	x24, _mtk_aes_irq@GOTPAGE
Lloh3:
	ldr	x24, [x24, _mtk_aes_irq@GOTPAGEOFF]
	ldr	w2, [x24]
	ldr	w5, [x10]
Lloh4:
	adrp	x4, l_.str@PAGE
Lloh5:
	add	x4, x4, l_.str@PAGEOFF
	mov	w3, #0
	bl	_devm_request_irq
	mov	x21, x0
	ldr	w0, [x19]
	cbnz	w21, LBB0_4
; %bb.2:
Lloh6:
	adrp	x23, _MTK_RING1@GOTPAGE
Lloh7:
	ldr	x23, [x23, _MTK_RING1@GOTPAGEOFF]
	ldr	x8, [x23]
	ldp	x10, x9, [x19, #8]
	ldr	w1, [x9, x8, lsl #2]
	ldr	w2, [x24]
	ldr	w5, [x10, #4]
Lloh8:
	adrp	x4, l_.str@PAGE
Lloh9:
	add	x4, x4, l_.str@PAGEOFF
	mov	w3, #0
	bl	_devm_request_irq
	cbz	w0, LBB0_8
; %bb.3:
	mov	x21, x0
	ldr	w0, [x19]
LBB0_4:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_5:
	mov	x0, x19
	bl	_mtk_aes_record_free
LBB0_6:
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	x0, [x22]
	bl	_AIC_ENABLE_SET
	mov	x1, x0
Lloh14:
	adrp	x8, _MTK_IRQ_RDR0@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MTK_IRQ_RDR0@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mtk_aes_write
	ldr	x0, [x23]
	bl	_AIC_ENABLE_SET
	mov	x1, x0
Lloh17:
	adrp	x8, _MTK_IRQ_RDR1@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MTK_IRQ_RDR1@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mtk_aes_write
Lloh20:
	adrp	x21, _mtk_aes@GOTPAGE
Lloh21:
	ldr	x21, [x21, _mtk_aes@GOTPAGEOFF]
	mov	x0, x21
	bl	_spin_lock
	add	x1, x21, #4
	mov	x0, x20
	bl	_list_add_tail
	mov	x0, x21
	bl	_spin_unlock
	bl	_mtk_aes_register_algs
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.9:
Lloh22:
	adrp	x22, _mtk_aes@GOTPAGE
Lloh23:
	ldr	x22, [x22, _mtk_aes@GOTPAGEOFF]
	mov	x0, x22
	bl	_spin_lock
	mov	x0, x20
	bl	_list_del
	mov	x0, x22
	bl	_spin_unlock
	b	LBB0_5
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_RING0,8,3                  ; @MTK_RING0
	.comm	_mtk_aes_irq,4,2                ; @mtk_aes_irq
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mtk-aes"

l_.str.1:                               ; @.str.1
	.asciz	"unable to request AES irq.\n"

	.comm	_MTK_RING1,8,3                  ; @MTK_RING1
	.comm	_MTK_IRQ_RDR0,4,2               ; @MTK_IRQ_RDR0
	.comm	_MTK_IRQ_RDR1,4,2               ; @MTK_IRQ_RDR1
	.comm	_mtk_aes,8,2                    ; @mtk_aes
l_.str.2:                               ; @.str.2
	.asciz	"mtk-aes initialization failed.\n"

.subsections_via_symbols
