	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st_i2c_recover_bus
_st_i2c_recover_bus:                    ## @st_i2c_recover_bus
	.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
	callq	_i2c_get_adapdata
	movq	%rax, %rbx
	movl	8(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_SSC_IEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel_relaxed
	movq	%rbx, %rdi
	callq	_st_i2c_hw_config
	movq	_SSC_CTL_EN@GOTPCREL(%rip), %rax
	movq	_SSC_CTL_MS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_SSC_CTL_EN_RX_FIFO@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_SSC_CTL_EN_TX_FIFO@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_SSC_CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_st_i2c_set_bits
	movq	_SSC_I2C@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	movq	_SSC_I2C_I2CM@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_st_i2c_clr_bits
	movl	$8000, %edi                     ## imm = 0x1F40
	movl	$10000, %esi                    ## imm = 0x2710
	callq	_usleep_range
	movq	_SSC_TBUF@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel_relaxed
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_usleep_range
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	movl	(%r15), %esi
	callq	_st_i2c_set_bits
	xorl	%eax, %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	"Trying to recover bus\n"

	.comm	_SSC_IEN,8,3                    ## @SSC_IEN
	.comm	_SSC_CTL_EN,4,2                 ## @SSC_CTL_EN
	.comm	_SSC_CTL_MS,4,2                 ## @SSC_CTL_MS
	.comm	_SSC_CTL_EN_RX_FIFO,4,2         ## @SSC_CTL_EN_RX_FIFO
	.comm	_SSC_CTL_EN_TX_FIFO,4,2         ## @SSC_CTL_EN_TX_FIFO
	.comm	_SSC_CTL,8,3                    ## @SSC_CTL
	.comm	_SSC_I2C,8,3                    ## @SSC_I2C
	.comm	_SSC_I2C_I2CM,4,2               ## @SSC_I2C_I2CM
	.comm	_SSC_TBUF,8,3                   ## @SSC_TBUF
	.no_dead_strip	_st_i2c_recover_bus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function st_i2c_recover_bus
_st_i2c_recover_bus:                    ; @st_i2c_recover_bus
	.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
	bl	_i2c_get_adapdata
	mov	x19, x0
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _SSC_IEN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SSC_IEN@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel_relaxed
	mov	x0, x19
	bl	_st_i2c_hw_config
Lloh5:
	adrp	x8, _SSC_CTL_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SSC_CTL_EN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _SSC_CTL_MS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SSC_CTL_MS@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _SSC_CTL_EN_RX_FIFO@GOTPAGE
Lloh12:
	ldr	x10, [x10, _SSC_CTL_EN_RX_FIFO@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh13:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh14:
	adrp	x9, _SSC_CTL_EN_TX_FIFO@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SSC_CTL_EN_TX_FIFO@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	x8, [x19]
Lloh17:
	adrp	x9, _SSC_CTL@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SSC_CTL@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_st_i2c_set_bits
Lloh20:
	adrp	x20, _SSC_I2C@GOTPAGE
Lloh21:
	ldr	x20, [x20, _SSC_I2C@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
Lloh22:
	adrp	x21, _SSC_I2C_I2CM@GOTPAGE
Lloh23:
	ldr	x21, [x21, _SSC_I2C_I2CM@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_st_i2c_clr_bits
	mov	w0, #8000
	mov	w1, #10000
	bl	_usleep_range
	ldr	x8, [x19]
Lloh24:
	adrp	x9, _SSC_TBUF@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SSC_TBUF@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel_relaxed
	mov	w0, #2000
	mov	w1, #4000
	bl	_usleep_range
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	ldr	w1, [x21]
	bl	_st_i2c_set_bits
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Trying to recover bus\n"

	.comm	_SSC_IEN,8,3                    ; @SSC_IEN
	.comm	_SSC_CTL_EN,4,2                 ; @SSC_CTL_EN
	.comm	_SSC_CTL_MS,4,2                 ; @SSC_CTL_MS
	.comm	_SSC_CTL_EN_RX_FIFO,4,2         ; @SSC_CTL_EN_RX_FIFO
	.comm	_SSC_CTL_EN_TX_FIFO,4,2         ; @SSC_CTL_EN_TX_FIFO
	.comm	_SSC_CTL,8,3                    ; @SSC_CTL
	.comm	_SSC_I2C,8,3                    ; @SSC_I2C
	.comm	_SSC_I2C_I2CM,4,2               ; @SSC_I2C_I2CM
	.comm	_SSC_TBUF,8,3                   ; @SSC_TBUF
	.no_dead_strip	_st_i2c_recover_bus
.subsections_via_symbols
