	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sprd_i2c_probe
_sprd_i2c_probe:                        ## @sprd_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_of_alias_get_id
	movl	%eax, 8(%rbx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$88, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_devm_platform_ioremap_resource
	movl	%eax, 84(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.22:
	movl	84(%r14), %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_21:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	%rax, (%r14)
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	leaq	24(%r14), %r15
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_i2c_set_adapdata
	movq	%r14, %rdi
	addq	$80, %rdi
	callq	_init_completion
	movl	76(%r14), %edi
	leaq	L_.str.2(%rip), %rdx
	leaq	L_.str.3(%rip), %rcx
	movl	$4, %esi
	callq	_snprintf
	movl	$100000, 8(%r14)                ## imm = 0x186A0
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%r14)
	movq	%rbx, 16(%r14)
	movl	$3, 24(%r14)
	movq	_sprd_i2c_algo@GOTPCREL(%rip), %rax
	movq	%rax, 64(%r14)
	movq	%r14, 56(%r14)
	movq	%rbx, 40(%r14)
	movl	8(%rbx), %eax
	movl	%eax, 48(%r14)
	movl	(%rbx), %edi
	movl	%edi, 32(%r14)
	leaq	L_.str.4(%rip), %rsi
	leaq	-36(%rbp), %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	8(%r14), %eax
	cmpl	$100000, %eax                   ## imm = 0x186A0
	jne	LBB0_10
	jmp	LBB0_12
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%r14), %r12d
	jmp	LBB0_21
LBB0_7:
	movl	-36(%rbp), %eax
	movl	%eax, 8(%r14)
	cmpl	$100000, %eax                   ## imm = 0x186A0
	je	LBB0_12
LBB0_10:
	cmpl	$400000, %eax                   ## imm = 0x61A80
	jne	LBB0_11
LBB0_12:
	movq	%r14, %rdi
	callq	_sprd_i2c_clk_init
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_21
## %bb.13:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	movl	12(%r14), %edi
	callq	_clk_prepare_enable
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_21
## %bb.14:
	movq	%r14, %rdi
	callq	_sprd_i2c_enable
	movq	16(%r14), %rdi
	movq	_SPRD_I2C_PM_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pm_runtime_set_autosuspend_delay
	movq	16(%r14), %rdi
	callq	_pm_runtime_use_autosuspend
	movq	16(%r14), %rdi
	callq	_pm_runtime_set_active
	movq	16(%r14), %rdi
	callq	_pm_runtime_enable
	movq	16(%r14), %rdi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:
	movl	(%r14), %esi
	movq	_sprd_i2c_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_sprd_i2c_isr_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQF_NO_SUSPEND@GOTPCREL(%rip), %rax
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rdi
	movl	(%rdi), %r8d
	orl	(%rax), %r8d
	movl	4(%rbx), %r9d
	movq	%r14, (%rsp)
	movq	%rbx, %rdi
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %r12d
	movq	(%r14), %rdx
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_20
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_15:
	movl	%eax, %r12d
	jmp	LBB0_20
LBB0_18:
	movq	%r15, %rdi
	callq	_i2c_add_numbered_adapter
	testl	%eax, %eax
	je	LBB0_23
## %bb.19:
	movl	%eax, %r12d
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_20:
	movq	16(%r14), %rdi
	callq	_pm_runtime_put_noidle
	movq	16(%r14), %rdi
	callq	_pm_runtime_disable
	movl	12(%r14), %edi
	callq	_clk_disable_unprepare
	jmp	LBB0_21
LBB0_23:
	movq	16(%r14), %rdi
	callq	_pm_runtime_mark_last_busy
	movq	16(%r14), %rdi
	callq	_pm_runtime_put_autosuspend
	xorl	%r12d, %r12d
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"failed to get irq resource\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s"

L_.str.3:                               ## @.str.3
	.asciz	"sprd-i2c"

	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_sprd_i2c_algo,4,2              ## @sprd_i2c_algo
L_.str.4:                               ## @.str.4
	.asciz	"clock-frequency"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SPRD_I2C_PM_TIMEOUT,4,2        ## @SPRD_I2C_PM_TIMEOUT
	.comm	_sprd_i2c_isr,4,2               ## @sprd_i2c_isr
	.comm	_sprd_i2c_isr_thread,4,2        ## @sprd_i2c_isr_thread
	.comm	_IRQF_NO_SUSPEND,4,2            ## @IRQF_NO_SUSPEND
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.5:                               ## @.str.5
	.asciz	"failed to request irq %d\n"

L_.str.6:                               ## @.str.6
	.asciz	"add adapter failed\n"

	.no_dead_strip	_sprd_i2c_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sprd_i2c_probe
_sprd_i2c_probe:                        ; @sprd_i2c_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	x20, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_of_alias_get_id
	str	w0, [x20, #8]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #88
	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, #84]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w0, [x19, #84]
	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_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	mov	x0, x22
	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_6:
	mov	x0, x20
	mov	w1, #0
	bl	_platform_get_irq
	str	x0, [x19]
	tbnz	x0, #63, LBB0_9
; %bb.7:
	add	x21, x19, #24
	mov	x0, x21
	mov	x1, x19
	bl	_i2c_set_adapdata
	add	x0, x19, #80
	bl	_init_completion
	ldr	w0, [x19, #76]
Lloh7:
	adrp	x2, l_.str.2@PAGE
Lloh8:
	add	x2, x2, l_.str.2@PAGEOFF
Lloh9:
	adrp	x3, l_.str.3@PAGE
Lloh10:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	w1, #4
	bl	_snprintf
	mov	w8, #34464
	movk	w8, #1, lsl #16
	str	w8, [x19, #8]
Lloh11:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x19, #72]
	str	x20, [x19, #16]
	mov	w8, #3
	str	w8, [x19, #24]
Lloh14:
	adrp	x8, _sprd_i2c_algo@GOTPAGE
Lloh15:
	ldr	x8, [x8, _sprd_i2c_algo@GOTPAGEOFF]
	stp	x19, x8, [x19, #56]
	str	x20, [x19, #40]
	ldr	w8, [x20, #8]
	str	w8, [x19, #48]
	ldr	w0, [x20]
	str	w0, [x19, #32]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x2, sp, #12
	bl	_of_property_read_u32
	cbz	w0, LBB0_10
; %bb.8:
	ldr	w8, [x19, #8]
	b	LBB0_11
LBB0_9:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w22, [x19]
	b	LBB0_5
LBB0_10:
	ldr	w8, [sp, #12]
	str	w8, [x19, #8]
LBB0_11:
	mov	w9, #34464
	movk	w9, #1, lsl #16
	cmp	w8, w9
	mov	w9, #6784
	movk	w9, #6, lsl #16
	ccmp	w8, w9, #4, ne
	b.ne	LBB0_17
; %bb.12:
	mov	x0, x19
	bl	_sprd_i2c_clk_init
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.13:
	mov	x0, x20
	mov	x1, x19
	bl	_platform_set_drvdata
	ldr	w0, [x19, #12]
	bl	_clk_prepare_enable
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.14:
	mov	x0, x19
	bl	_sprd_i2c_enable
	ldr	x0, [x19, #16]
Lloh20:
	adrp	x8, _SPRD_I2C_PM_TIMEOUT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SPRD_I2C_PM_TIMEOUT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_pm_runtime_set_autosuspend_delay
	ldr	x0, [x19, #16]
	bl	_pm_runtime_use_autosuspend
	ldr	x0, [x19, #16]
	bl	_pm_runtime_set_active
	ldr	x0, [x19, #16]
	bl	_pm_runtime_enable
	ldr	x0, [x19, #16]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_18
; %bb.15:
	ldr	w1, [x19]
Lloh23:
	adrp	x8, _sprd_i2c_isr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _sprd_i2c_isr@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
Lloh26:
	adrp	x8, _sprd_i2c_isr_thread@GOTPAGE
Lloh27:
	ldr	x8, [x8, _sprd_i2c_isr_thread@GOTPAGEOFF]
Lloh28:
	ldr	w3, [x8]
Lloh29:
	adrp	x8, _IRQF_NO_SUSPEND@GOTPAGE
Lloh30:
	ldr	x8, [x8, _IRQF_NO_SUSPEND@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	adrp	x9, _IRQF_ONESHOT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w4, w9, w8
	ldr	w5, [x20, #4]
	mov	x0, x20
	mov	x6, x19
	bl	_devm_request_threaded_irq
	cbz	w0, LBB0_19
; %bb.16:
	mov	x22, x0
	ldr	x8, [x19]
	str	x8, [sp]
Lloh35:
	adrp	x1, l_.str.5@PAGE
Lloh36:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_21
LBB0_17:
Lloh37:
	adrp	x8, _EINVAL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_18:
	mov	x22, x0
	b	LBB0_22
LBB0_19:
	mov	x0, x21
	bl	_i2c_add_numbered_adapter
	mov	x22, x0
	cbz	w0, LBB0_23
; %bb.20:
Lloh39:
	adrp	x1, l_.str.6@PAGE
Lloh40:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_21:
	mov	x0, x20
	bl	_dev_err
LBB0_22:
	ldr	x0, [x19, #16]
	bl	_pm_runtime_put_noidle
	ldr	x0, [x19, #16]
	bl	_pm_runtime_disable
	ldr	w0, [x19, #12]
	bl	_clk_disable_unprepare
	b	LBB0_5
LBB0_23:
	ldr	x0, [x19, #16]
	bl	_pm_runtime_mark_last_busy
	ldr	x0, [x19, #16]
	bl	_pm_runtime_put_autosuspend
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"failed to get irq resource\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s"

l_.str.3:                               ; @.str.3
	.asciz	"sprd-i2c"

	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_sprd_i2c_algo,4,2              ; @sprd_i2c_algo
l_.str.4:                               ; @.str.4
	.asciz	"clock-frequency"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SPRD_I2C_PM_TIMEOUT,4,2        ; @SPRD_I2C_PM_TIMEOUT
	.comm	_sprd_i2c_isr,4,2               ; @sprd_i2c_isr
	.comm	_sprd_i2c_isr_thread,4,2        ; @sprd_i2c_isr_thread
	.comm	_IRQF_NO_SUSPEND,4,2            ; @IRQF_NO_SUSPEND
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.5:                               ; @.str.5
	.asciz	"failed to request irq %d\n"

l_.str.6:                               ; @.str.6
	.asciz	"add adapter failed\n"

	.no_dead_strip	_sprd_i2c_probe
.subsections_via_symbols
