	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function img_i2c_probe
_img_i2c_probe:                         ## @img_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	%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, %rbx
	movq	(%rdi), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$88, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 80(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	80(%r14), %rdi
LBB0_4:
	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
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_23:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devm_clk_get
	movq	%rax, 72(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	72(%r14), %rdi
	jmp	LBB0_4
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_23
LBB0_9:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devm_clk_get
	movq	%rax, 64(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	64(%r14), %rdi
	jmp	LBB0_4
LBB0_11:
	movq	_img_i2c_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	12(%rbx), %r8d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	xorl	%ecx, %ecx
	movq	%r14, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r13d
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r13d, %r12d
	jmp	LBB0_23
LBB0_13:
	leaq	60(%r14), %rdi
	movq	_img_i2c_check_timer@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_timer_setup
	movq	_timings@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r14)
	leaq	L_.str.6(%rip), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_of_property_read_u32
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:
	movl	-44(%rbp), %eax
	movl	%eax, 56(%r14)
LBB0_15:
	movq	%r14, %rdi
	movq	%r14, %rsi
	callq	_i2c_set_adapdata
	movq	%rbx, 40(%r14)
	movq	%r15, 32(%r14)
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movq	_img_i2c_algo@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r14)
	movl	$5, (%r14)
	movl	8(%rbx), %eax
	movl	%eax, 8(%r14)
	movl	4(%r14), %edi
	leaq	L_.str.7(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	_MODE_INACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_img_i2c_switch_mode
	leaq	52(%r14), %rdi
	callq	_spin_lock_init
	movq	%r14, %rdi
	addq	$48, %rdi
	callq	_init_completion
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	movq	_IMG_I2C_PM_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_pm_runtime_set_autosuspend_delay
	movq	%rbx, %rdi
	callq	_pm_runtime_use_autosuspend
	movq	%rbx, %rdi
	callq	_pm_runtime_enable
	movq	%rbx, %rdi
	callq	_pm_runtime_enabled
	testl	%eax, %eax
	je	LBB0_16
LBB0_17:
	movq	%r14, %rdi
	callq	_img_i2c_init
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_18
LBB0_20:
	movq	%rbx, %rdi
	callq	_pm_runtime_enabled
	testl	%eax, %eax
	jne	LBB0_22
## %bb.21:
	movq	%rbx, %rdi
	callq	_img_i2c_runtime_suspend
LBB0_22:
	movq	%rbx, %rdi
	callq	_pm_runtime_disable
	movq	%rbx, %rdi
	callq	_pm_runtime_dont_use_autosuspend
	jmp	LBB0_23
LBB0_16:
	movq	%rbx, %rdi
	callq	_img_i2c_runtime_resume
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
	jmp	LBB0_17
LBB0_18:
	movq	%r14, %rdi
	callq	_i2c_add_numbered_adapter
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jns	LBB0_23
## %bb.19:
	movl	%eax, %r12d
	jmp	LBB0_20
	.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	"can't get irq number\n"

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

L_.str.2:                               ## @.str.2
	.asciz	"can't get system clock\n"

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

L_.str.4:                               ## @.str.4
	.asciz	"can't get core clock\n"

	.comm	_img_i2c_isr,4,2                ## @img_i2c_isr
L_.str.5:                               ## @.str.5
	.asciz	"can't request irq %d\n"

	.comm	_img_i2c_check_timer,4,2        ## @img_i2c_check_timer
	.comm	_timings,8,3                    ## @timings
L_.str.6:                               ## @.str.6
	.asciz	"clock-frequency"

	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_img_i2c_algo,4,2               ## @img_i2c_algo
L_.str.7:                               ## @.str.7
	.asciz	"IMG SCB I2C"

	.comm	_MODE_INACTIVE,4,2              ## @MODE_INACTIVE
	.comm	_IMG_I2C_PM_TIMEOUT,4,2         ## @IMG_I2C_PM_TIMEOUT
	.no_dead_strip	_img_i2c_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function img_i2c_probe
_img_i2c_probe:                         ; @img_i2c_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #88
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	x0, [x20, #80]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x0, [x20, #80]
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_4:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	mov	x22, x0
	tbnz	w0, #31, LBB0_9
; %bb.7:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	x0, [x20, #72]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.8:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #72]
	b	LBB0_3
LBB0_9:
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_5
LBB0_10:
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	x0, [x20, #64]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.11:
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #64]
	b	LBB0_3
LBB0_12:
Lloh19:
	adrp	x8, _img_i2c_isr@GOTPAGE
Lloh20:
	ldr	x8, [x8, _img_i2c_isr@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	ldr	w4, [x19, #12]
	mov	x0, x19
	mov	x1, x22
	mov	w3, #0
	mov	x5, x20
	bl	_devm_request_irq
	cbz	w0, LBB0_14
; %bb.13:
	mov	x23, x0
	str	x22, [sp]
Lloh22:
	adrp	x1, l_.str.5@PAGE
Lloh23:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x22, x23
	b	LBB0_5
LBB0_14:
	add	x0, x20, #60
Lloh24:
	adrp	x8, _img_i2c_check_timer@GOTPAGE
Lloh25:
	ldr	x8, [x8, _img_i2c_check_timer@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
Lloh27:
	adrp	x8, _timings@GOTPAGE
Lloh28:
	ldr	x8, [x8, _timings@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	ldr	w8, [x8]
	str	w8, [x20, #56]
Lloh30:
	adrp	x1, l_.str.6@PAGE
Lloh31:
	add	x1, x1, l_.str.6@PAGEOFF
	add	x2, sp, #12
	mov	x0, x21
	bl	_of_property_read_u32
	cbnz	w0, LBB0_16
; %bb.15:
	ldr	w8, [sp, #12]
	str	w8, [x20, #56]
LBB0_16:
	mov	x0, x20
	mov	x1, x20
	bl	_i2c_set_adapdata
	stp	x21, x19, [x20, #32]
Lloh32:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	str	w8, [x20, #24]
Lloh35:
	adrp	x8, _img_i2c_algo@GOTPAGE
Lloh36:
	ldr	x8, [x8, _img_i2c_algo@GOTPAGEOFF]
	str	x8, [x20, #16]
	mov	w8, #5
	str	w8, [x20]
	ldr	w8, [x19, #8]
	str	w8, [x20, #8]
	ldr	w0, [x20, #4]
Lloh37:
	adrp	x2, l_.str.7@PAGE
Lloh38:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	w1, #4
	bl	_snprintf
Lloh39:
	adrp	x8, _MODE_INACTIVE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _MODE_INACTIVE@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_img_i2c_switch_mode
	add	x0, x20, #52
	bl	_spin_lock_init
	add	x0, x20, #48
	bl	_init_completion
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
Lloh42:
	adrp	x8, _IMG_I2C_PM_TIMEOUT@GOTPAGE
Lloh43:
	ldr	x8, [x8, _IMG_I2C_PM_TIMEOUT@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pm_runtime_set_autosuspend_delay
	mov	x0, x19
	bl	_pm_runtime_use_autosuspend
	mov	x0, x19
	bl	_pm_runtime_enable
	mov	x0, x19
	bl	_pm_runtime_enabled
	cbz	w0, LBB0_21
LBB0_17:
	mov	x0, x20
	bl	_img_i2c_init
	mov	x22, x0
	cbz	w0, LBB0_22
LBB0_18:
	mov	x0, x19
	bl	_pm_runtime_enabled
	cbnz	w0, LBB0_20
; %bb.19:
	mov	x0, x19
	bl	_img_i2c_runtime_suspend
LBB0_20:
	mov	x0, x19
	bl	_pm_runtime_disable
	mov	x0, x19
	bl	_pm_runtime_dont_use_autosuspend
	b	LBB0_5
LBB0_21:
	mov	x0, x19
	bl	_img_i2c_runtime_resume
	mov	x22, x0
	cbnz	w0, LBB0_5
	b	LBB0_17
LBB0_22:
	mov	x0, x20
	bl	_i2c_add_numbered_adapter
	tbnz	w0, #31, LBB0_24
; %bb.23:
	mov	w22, #0
	b	LBB0_5
LBB0_24:
	mov	x22, x0
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.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	"can't get irq number\n"

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

l_.str.2:                               ; @.str.2
	.asciz	"can't get system clock\n"

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

l_.str.4:                               ; @.str.4
	.asciz	"can't get core clock\n"

	.comm	_img_i2c_isr,4,2                ; @img_i2c_isr
l_.str.5:                               ; @.str.5
	.asciz	"can't request irq %d\n"

	.comm	_img_i2c_check_timer,4,2        ; @img_i2c_check_timer
	.comm	_timings,8,3                    ; @timings
l_.str.6:                               ; @.str.6
	.asciz	"clock-frequency"

	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_img_i2c_algo,4,2               ; @img_i2c_algo
l_.str.7:                               ; @.str.7
	.asciz	"IMG SCB I2C"

	.comm	_MODE_INACTIVE,4,2              ; @MODE_INACTIVE
	.comm	_IMG_I2C_PM_TIMEOUT,4,2         ; @IMG_I2C_PM_TIMEOUT
	.no_dead_strip	_img_i2c_probe
.subsections_via_symbols
