	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_i2c_probe
_mtk_i2c_probe:                         ## @mtk_i2c_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	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%rax, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$64, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 60(%r12)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	60(%r12), %edi
	jmp	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_15:
	subl	(%rax), %r15d
LBB0_16:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movl	%eax, 56(%r12)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movl	56(%r12), %edi
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_7:
	movl	56(%r12), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_16
LBB0_9:
	movq	%r14, 48(%r12)
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdx
	callq	_of_property_read_u32
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movl	$100000, (%r12)                 ## imm = 0x186A0
	jmp	LBB0_11
LBB0_13:
	cmpl	$0, (%r12)
	je	LBB0_14
LBB0_11:
	movq	%r12, %r15
	addq	$8, %r15
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r12)
	movq	_mtk_i2c_algo@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r12)
	movl	$3, 8(%r12)
	movq	%r14, 24(%r12)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_i2c_set_adapdata
	movl	(%r14), %eax
	movl	%eax, 16(%r12)
	movl	12(%r12), %ebx
	movq	%r14, %rdi
	callq	_dev_name
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$4, %edx
	callq	_strlcpy
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_platform_set_drvdata
	movq	%r12, %rdi
	callq	_mtk_i2c_init
	movq	%r15, %rdi
	callq	_i2c_add_adapter
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_16
## %bb.12:
	movslq	(%r12), %rax
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$38, %rdx
	addl	%eax, %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_info
	jmp	LBB0_16
LBB0_14:
	movq	48(%r12), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no clock defined\n"

L_.str.1:                               ## @.str.1
	.asciz	"Unable to enable clock\n"

L_.str.2:                               ## @.str.2
	.asciz	"clock-frequency"

L_.str.3:                               ## @.str.3
	.asciz	"clock-frequency 0 not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_mtk_i2c_algo,4,2               ## @mtk_i2c_algo
L_.str.4:                               ## @.str.4
	.asciz	"clock %u kHz\n"

	.no_dead_strip	_mtk_i2c_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_i2c_probe
_mtk_i2c_probe:                         ; @mtk_i2c_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, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_platform_get_resource
	mov	x21, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #64
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x21
	bl	_devm_ioremap_resource
	str	w0, [x20, #60]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w0, [x20, #60]
	b	LBB0_8
LBB0_3:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	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_6:
	mov	x0, x19
	mov	x1, #0
	bl	_devm_clk_get
	str	w0, [x20, #56]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.7:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20, #56]
LBB0_8:
	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_9:
	ldr	w0, [x20, #56]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_11
; %bb.10:
	mov	x21, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_5
LBB0_11:
	str	x19, [x20, #48]
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_of_property_read_u32
	cbz	x0, LBB0_13
; %bb.12:
	mov	w8, #34464
	movk	w8, #1, lsl #16
	str	w8, [x20]
	b	LBB0_14
LBB0_13:
	ldr	w8, [x20]
	cbz	w8, LBB0_16
LBB0_14:
Lloh14:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x20, #40]
Lloh17:
	adrp	x8, _mtk_i2c_algo@GOTPAGE
Lloh18:
	ldr	x8, [x8, _mtk_i2c_algo@GOTPAGEOFF]
	mov	w9, #3
	mov	x21, x20
	str	w9, [x21, #8]!
	stp	x19, x8, [x20, #24]
	mov	x0, x21
	mov	x1, x20
	bl	_i2c_set_adapdata
	ldr	w8, [x19]
	str	w8, [x20, #16]
	ldr	w22, [x20, #12]
	mov	x0, x19
	bl	_dev_name
	mov	x1, x0
	mov	x0, x22
	mov	w2, #4
	bl	_strlcpy
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x20
	bl	_mtk_i2c_init
	mov	x0, x21
	bl	_i2c_add_adapter
	mov	x21, x0
	tbnz	w0, #31, LBB0_5
; %bb.15:
	ldrsw	x8, [x20]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w2, w8, w9
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	b	LBB0_5
LBB0_16:
	ldr	x0, [x20, #48]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_warn
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no clock defined\n"

l_.str.1:                               ; @.str.1
	.asciz	"Unable to enable clock\n"

l_.str.2:                               ; @.str.2
	.asciz	"clock-frequency"

l_.str.3:                               ; @.str.3
	.asciz	"clock-frequency 0 not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_mtk_i2c_algo,4,2               ; @mtk_i2c_algo
l_.str.4:                               ; @.str.4
	.asciz	"clock %u kHz\n"

	.no_dead_strip	_mtk_i2c_probe
.subsections_via_symbols
