	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_ecc_probe
_mtk_ecc_probe:                         ## @mtk_ecc_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_of_device_get_match_data
	movq	%rax, 32(%r15)
	movq	(%rax), %rcx
	movq	8(%rax), %rdx
	movq	16(%rax), %rdi
	imulq	-8(%rdx,%rcx,8), %rdi
	addq	$7, %rdi
	shrq	$3, %rdi
	movl	$4, %esi
	callq	_round_up
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_devm_kzalloc
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 20(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movl	20(%r15), %edi
	callq	_PTR_ERR
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	20(%r15), %edi
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movl	%eax, 16(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	16(%r15), %edi
	callq	_PTR_ERR
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	16(%r15), %edi
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_8:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_set_mask
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r12d, %ebx
	jmp	LBB0_15
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_15
LBB0_12:
	movq	_mtk_ecc_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.4(%rip), %r8
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%ecx, %ecx
	movq	%r15, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movl	%r12d, %ebx
	jmp	LBB0_15
LBB0_14:
	movq	%r14, 8(%r15)
	movq	%r15, %rdi
	callq	_mutex_init
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	xorl	%ebx, %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to map regs: %ld\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to get clock: %ld\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to get irq: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to set DMA mask\n"

	.comm	_mtk_ecc_irq,4,2                ## @mtk_ecc_irq
L_.str.4:                               ## @.str.4
	.asciz	"mtk-ecc"

L_.str.5:                               ## @.str.5
	.asciz	"failed to request irq\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.6:                               ## @.str.6
	.asciz	"probed\n"

	.no_dead_strip	_mtk_ecc_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_ecc_probe
_mtk_ecc_probe:                         ; @mtk_ecc_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_of_device_get_match_data
	str	x0, [x20, #32]
	ldp	x8, x9, [x0]
	add	x8, x9, x8, lsl #3
	ldur	x8, [x8, #-8]
	ldr	x9, [x0, #16]
	orr	x10, xzr, #0x7
	madd	x8, x9, x8, x10
	lsr	x0, x8, #3
	mov	w1, #4
	bl	_round_up
	mov	x1, x0
	ldr	w2, [x21]
	mov	x0, x19
	bl	_devm_kzalloc
	str	x0, [x20, #24]
	cbz	x0, LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	w0, [x20, #20]
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.3:
	ldr	w0, [x20, #20]
	bl	_PTR_ERR
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20, #20]
	b	LBB0_9
LBB0_4:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	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
	add	sp, sp, #64
	ret
LBB0_7:
	mov	x0, x19
	mov	x1, #0
	bl	_devm_clk_get
	str	w0, [x20, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.8:
	ldr	w0, [x20, #16]
	bl	_PTR_ERR
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20, #16]
LBB0_9:
	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
	add	sp, sp, #64
	b	_PTR_ERR
LBB0_10:
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	mov	x21, x0
	tbnz	w0, #31, LBB0_13
; %bb.11:
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_dma_set_mask
	cbz	w0, LBB0_14
; %bb.12:
	mov	x22, x0
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x21, x22
	b	LBB0_6
LBB0_13:
	str	x21, [sp]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_6
LBB0_14:
Lloh15:
	adrp	x8, _mtk_ecc_irq@GOTPAGE
Lloh16:
	ldr	x8, [x8, _mtk_ecc_irq@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
Lloh18:
	adrp	x4, l_.str.4@PAGE
Lloh19:
	add	x4, x4, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	w3, #0
	mov	x5, x20
	bl	_devm_request_irq
	cbz	w0, LBB0_16
; %bb.15:
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_16:
	str	x19, [x20, #8]
	mov	x0, x20
	bl	_mutex_init
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
Lloh24:
	adrp	x1, l_.str.6@PAGE
Lloh25:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	mov	w21, #0
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to map regs: %ld\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to get clock: %ld\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to get irq: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to set DMA mask\n"

	.comm	_mtk_ecc_irq,4,2                ; @mtk_ecc_irq
l_.str.4:                               ; @.str.4
	.asciz	"mtk-ecc"

l_.str.5:                               ; @.str.5
	.asciz	"failed to request irq\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.6:                               ; @.str.6
	.asciz	"probed\n"

	.no_dead_strip	_mtk_ecc_probe
.subsections_via_symbols
