	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_imx_remove
_i2c_imx_remove:                        ## @i2c_imx_remove
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_platform_get_drvdata
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	leaq	16(%rbx), %r15
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_i2c_del_adapter
	cmpq	$0, 8(%rbx)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_i2c_imx_dma_free
LBB0_4:
	movq	_IMX_I2C_IADR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_imx_i2c_write_reg
	movq	_IMX_I2C_IFDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_imx_i2c_write_reg
	movq	_IMX_I2C_I2CR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_imx_i2c_write_reg
	movq	_IMX_I2C_I2SR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_imx_i2c_write_reg
	movl	(%rbx), %edi
	movq	%rbx, %rsi
	addq	$4, %rsi
	callq	_clk_notifier_unregister
	movl	(%rbx), %edi
	callq	_clk_disable_unprepare
	movq	%r14, %rdi
	callq	_pm_runtime_put_noidle
	movq	%r14, %rdi
	callq	_pm_runtime_disable
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %r15d
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"adapter removed\n"

	.comm	_IMX_I2C_IADR,4,2               ## @IMX_I2C_IADR
	.comm	_IMX_I2C_IFDR,4,2               ## @IMX_I2C_IFDR
	.comm	_IMX_I2C_I2CR,4,2               ## @IMX_I2C_I2CR
	.comm	_IMX_I2C_I2SR,4,2               ## @IMX_I2C_I2SR
	.no_dead_strip	_i2c_imx_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_imx_remove
_i2c_imx_remove:                        ; @i2c_imx_remove
	.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
	bl	_platform_get_drvdata
	mov	x20, x0
	mov	x0, x19
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_4
; %bb.1:
	add	x21, x20, #16
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	mov	x0, x21
	bl	_i2c_del_adapter
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_i2c_imx_dma_free
LBB0_3:
Lloh2:
	adrp	x8, _IMX_I2C_IADR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IMX_I2C_IADR@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w0, #0
	mov	x1, x20
	bl	_imx_i2c_write_reg
Lloh5:
	adrp	x8, _IMX_I2C_IFDR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IMX_I2C_IFDR@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	w0, #0
	mov	x1, x20
	bl	_imx_i2c_write_reg
Lloh8:
	adrp	x8, _IMX_I2C_I2CR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IMX_I2C_I2CR@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	w0, #0
	mov	x1, x20
	bl	_imx_i2c_write_reg
Lloh11:
	adrp	x8, _IMX_I2C_I2SR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IMX_I2C_I2SR@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	w0, #0
	mov	x1, x20
	bl	_imx_i2c_write_reg
	ldr	w0, [x20]
	add	x1, x20, #4
	bl	_clk_notifier_unregister
	ldr	w0, [x20]
	bl	_clk_disable_unprepare
	mov	x0, x19
	bl	_pm_runtime_put_noidle
	mov	x0, x19
	bl	_pm_runtime_disable
	mov	w0, #0
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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"adapter removed\n"

	.comm	_IMX_I2C_IADR,4,2               ; @IMX_I2C_IADR
	.comm	_IMX_I2C_IFDR,4,2               ; @IMX_I2C_IFDR
	.comm	_IMX_I2C_I2CR,4,2               ; @IMX_I2C_I2CR
	.comm	_IMX_I2C_I2SR,4,2               ; @IMX_I2C_I2SR
	.no_dead_strip	_i2c_imx_remove
.subsections_via_symbols
