	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_crypto_probe
_mtk_crypto_probe:                      ## @mtk_crypto_probe
	.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, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_devm_platform_ioremap_resource
	movl	%eax, 20(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movl	20(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_MTK_IRQ_NUM@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_9
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_platform_get_irq
	movq	%rax, %r12
	movq	(%r14), %rax
	movq	%r12, (%rax,%rbx,8)
	testq	%r12, %r12
	js	LBB0_24
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_8
LBB0_9:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_devm_clk_get
	movl	%eax, 16(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_24:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r15, 8(%r14)
	movq	%r15, %rdi
	callq	_pm_runtime_enable
	movq	8(%r14), %rdi
	callq	_pm_runtime_get_sync
	movl	16(%r14), %edi
	callq	_clk_prepare_enable
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.12:
	movq	%r14, %rdi
	callq	_mtk_desc_ring_alloc
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	%eax, %r12d
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_22
LBB0_14:
	movq	%r14, %rdi
	callq	_mtk_accelerator_init
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %r12d
	movq	8(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_21
LBB0_16:
	movq	%r14, %rdi
	callq	_mtk_cipher_alg_register
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %r12d
	movq	8(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_20
LBB0_18:
	movq	%r14, %rdi
	callq	_mtk_hash_alg_register
	testl	%eax, %eax
	je	LBB0_25
## %bb.19:
	movl	%eax, %r12d
	movq	8(%r14), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_err
	movq	%r14, %rdi
	callq	_mtk_cipher_alg_release
LBB0_20:
	movq	%r14, %rdi
	callq	_mtk_dfe_dse_reset
LBB0_21:
	movq	%r14, %rdi
	callq	_mtk_desc_dma_free
LBB0_22:
	movl	16(%r14), %edi
	callq	_clk_disable_unprepare
LBB0_23:
	movq	8(%r14), %rdi
	callq	_pm_runtime_put_sync
	movq	8(%r14), %rdi
	callq	_pm_runtime_disable
	jmp	LBB0_24
LBB0_25:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	xorl	%r12d, %r12d
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MTK_IRQ_NUM,4,2                ## @MTK_IRQ_NUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cryp"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.1:                               ## @.str.1
	.asciz	"Unable to allocate descriptor rings.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to initialize cryptographic engine.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Unable to register cipher algorithm.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Unable to register hash algorithm.\n"

	.no_dead_strip	_mtk_crypto_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_crypto_probe
_mtk_crypto_probe:                      ; @mtk_crypto_probe
	.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	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	mov	w1, #0
	bl	_devm_platform_ioremap_resource
	str	w0, [x19, #20]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w0, [x19, #20]
	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
	b	_PTR_ERR
LBB0_3:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_10
LBB0_4:
Lloh5:
	adrp	x23, _MTK_IRQ_NUM@GOTPAGE
Lloh6:
	ldr	x23, [x23, _MTK_IRQ_NUM@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x22, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_platform_get_irq
	ldr	x8, [x19]
	str	x0, [x8, x22, lsl #3]
	tbnz	x0, #63, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x23]
	cmp	x22, x8
	b.lt	LBB0_6
LBB0_8:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_devm_clk_get
	str	w0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_13
; %bb.9:
Lloh9:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_11:
	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_12:
	mov	x21, x0
	b	LBB0_11
LBB0_13:
	str	x20, [x19, #8]
	mov	x0, x20
	bl	_pm_runtime_enable
	ldr	x0, [x19, #8]
	bl	_pm_runtime_get_sync
	ldr	w0, [x19, #16]
	bl	_clk_prepare_enable
	mov	x21, x0
	cbnz	w0, LBB0_25
; %bb.14:
	mov	x0, x19
	bl	_mtk_desc_ring_alloc
	cbz	w0, LBB0_16
; %bb.15:
	mov	x21, x0
	ldr	x0, [x19, #8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_24
LBB0_16:
	mov	x0, x19
	bl	_mtk_accelerator_init
	cbz	w0, LBB0_18
; %bb.17:
	mov	x21, x0
	ldr	x0, [x19, #8]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_23
LBB0_18:
	mov	x0, x19
	bl	_mtk_cipher_alg_register
	cbz	w0, LBB0_20
; %bb.19:
	mov	x21, x0
	ldr	x0, [x19, #8]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	b	LBB0_22
LBB0_20:
	mov	x0, x19
	bl	_mtk_hash_alg_register
	mov	x21, x0
	cbz	w0, LBB0_26
; %bb.21:
	ldr	x0, [x19, #8]
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	bl	_mtk_cipher_alg_release
LBB0_22:
	mov	x0, x19
	bl	_mtk_dfe_dse_reset
LBB0_23:
	mov	x0, x19
	bl	_mtk_desc_dma_free
LBB0_24:
	ldr	w0, [x19, #16]
	bl	_clk_disable_unprepare
LBB0_25:
	ldr	x0, [x19, #8]
	bl	_pm_runtime_put_sync
	ldr	x0, [x19, #8]
	bl	_pm_runtime_disable
	b	LBB0_11
LBB0_26:
	mov	x0, x20
	mov	x1, x19
	bl	_platform_set_drvdata
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MTK_IRQ_NUM,4,2                ; @MTK_IRQ_NUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cryp"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.1:                               ; @.str.1
	.asciz	"Unable to allocate descriptor rings.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to initialize cryptographic engine.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Unable to register cipher algorithm.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Unable to register hash algorithm.\n"

	.no_dead_strip	_mtk_crypto_probe
.subsections_via_symbols
