	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_smi_common_probe
_mtk_smi_common_probe:                  ## @mtk_smi_common_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), %rax
	movl	(%rax), %edx
	movl	$72, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, 64(%rax)
	movq	%r14, %rdi
	callq	_of_device_get_match_data
	movq	%rax, 24(%rbx)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_clk_get
	movq	%rax, 56(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	56(%rbx), %rdi
	jmp	LBB0_21
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_clk_get
	movq	%rax, 48(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	48(%rbx), %rdi
LBB0_21:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_6:
	movq	24(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_11
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_clk_get
	movq	%rax, 40(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	40(%rbx), %rdi
	jmp	LBB0_21
LBB0_9:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_clk_get
	movq	%rax, 32(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.20:
	movq	32(%rbx), %rdi
	jmp	LBB0_21
LBB0_10:
	movq	24(%rbx), %rax
LBB0_11:
	movq	(%rax), %r15
	movq	_MTK_SMI_GEN1@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	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
	cmpq	%r12, %r15
	jne	LBB0_18
## %bb.12:
	movq	%rax, 16(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	16(%rbx), %rdi
	jmp	LBB0_21
LBB0_18:
	movq	%rax, (%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_16
## %bb.19:
	movq	(%rbx), %rdi
	jmp	LBB0_21
LBB0_14:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_clk_get
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	8(%rbx), %rdi
	testq	%rax, %rax
	jne	LBB0_21
## %bb.15:
	callq	_clk_prepare_enable
	testl	%eax, %eax
	jne	LBB0_17
LBB0_16:
	movq	%r14, %rdi
	callq	_pm_runtime_enable
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_platform_set_drvdata
	xorl	%eax, %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"apb"

L_.str.1:                               ## @.str.1
	.asciz	"smi"

L_.str.2:                               ## @.str.2
	.asciz	"gals0"

L_.str.3:                               ## @.str.3
	.asciz	"gals1"

	.comm	_MTK_SMI_GEN1,8,3               ## @MTK_SMI_GEN1
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.4:                               ## @.str.4
	.asciz	"async"

	.no_dead_strip	_mtk_smi_common_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_smi_common_probe
_mtk_smi_common_probe:                  ; @mtk_smi_common_probe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #72
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	str	x19, [x0, #64]
	mov	x0, x19
	bl	_of_device_get_match_data
	str	x0, [x20, #24]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	x0, [x20, #56]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x0, [x20, #56]
	b	LBB0_7
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	x0, [x20, #48]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.6:
	ldr	x0, [x20, #48]
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_8:
	ldr	x8, [x20, #24]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_14
; %bb.9:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	x0, [x20, #40]
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.10:
	ldr	x0, [x20, #40]
	b	LBB0_7
LBB0_11:
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	x0, [x20, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_13
; %bb.12:
	ldr	x0, [x20, #32]
	b	LBB0_7
LBB0_13:
	ldr	x8, [x20, #24]
LBB0_14:
	ldr	x21, [x8]
Lloh14:
	adrp	x8, _MTK_SMI_GEN1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MTK_SMI_GEN1@GOTPAGEOFF]
Lloh16:
	ldr	x22, [x8]
Lloh17:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	cmp	x21, x22
	b.ne	LBB0_17
; %bb.15:
	str	x0, [x20, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_19
; %bb.16:
	ldr	x0, [x20, #16]
	b	LBB0_7
LBB0_17:
	str	x0, [x20]
	bl	_IS_ERR
	cbz	x0, LBB0_21
; %bb.18:
	ldr	x0, [x20]
	b	LBB0_7
LBB0_19:
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	x0, [x20, #8]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x20, #8]
	cbnz	x8, LBB0_7
; %bb.20:
	bl	_clk_prepare_enable
	cbnz	w0, LBB0_4
LBB0_21:
	mov	x0, x19
	bl	_pm_runtime_enable
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	w0, #0
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"apb"

l_.str.1:                               ; @.str.1
	.asciz	"smi"

l_.str.2:                               ; @.str.2
	.asciz	"gals0"

l_.str.3:                               ; @.str.3
	.asciz	"gals1"

	.comm	_MTK_SMI_GEN1,8,3               ; @MTK_SMI_GEN1
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.4:                               ; @.str.4
	.asciz	"async"

	.no_dead_strip	_mtk_smi_common_probe
.subsections_via_symbols
