	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsi_i2c_reset_bus
_fsi_i2c_reset_bus:                     ## @fsi_i2c_reset_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	$0, -12(%rbp)
	movq	%rsi, %rdi
	callq	_i2c_recover_bus
	movl	(%rbx), %edi
	movq	_I2C_FSI_RESET_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_fsi_i2c_write_reg
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	_I2C_RESET_SLEEP_MIN_US@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_I2C_RESET_SLEEP_MAX_US@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usleep_range
	movl	(%rbx), %edi
	movq	_I2C_FSI_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-16(%rbp), %rdx
	callq	_fsi_i2c_read_reg
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movq	_I2C_STAT_CMD_COMP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	testl	%ecx, -16(%rbp)
	jne	LBB0_5
## %bb.3:
	movl	(%rbx), %edi
	movq	_I2C_FSI_RESET_I2C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_fsi_i2c_write_reg
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_fsi_i2c_dev_init
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FSI_RESET_ERR,4,2          ## @I2C_FSI_RESET_ERR
	.comm	_I2C_RESET_SLEEP_MIN_US,4,2     ## @I2C_RESET_SLEEP_MIN_US
	.comm	_I2C_RESET_SLEEP_MAX_US,4,2     ## @I2C_RESET_SLEEP_MAX_US
	.comm	_I2C_FSI_STAT,4,2               ## @I2C_FSI_STAT
	.comm	_I2C_STAT_CMD_COMP,4,2          ## @I2C_STAT_CMD_COMP
	.comm	_I2C_FSI_RESET_I2C,4,2          ## @I2C_FSI_RESET_I2C
	.no_dead_strip	_fsi_i2c_reset_bus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsi_i2c_reset_bus
_fsi_i2c_reset_bus:                     ; @fsi_i2c_reset_bus
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	str	wzr, [sp, #8]
	mov	x0, x1
	bl	_i2c_recover_bus
	ldr	w0, [x19]
Lloh0:
	adrp	x8, _I2C_FSI_RESET_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_FSI_RESET_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_fsi_i2c_write_reg
	cbnz	w0, LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _I2C_RESET_SLEEP_MIN_US@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_RESET_SLEEP_MIN_US@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _I2C_RESET_SLEEP_MAX_US@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I2C_RESET_SLEEP_MAX_US@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_usleep_range
	ldr	w0, [x19]
Lloh9:
	adrp	x8, _I2C_FSI_STAT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _I2C_FSI_STAT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_fsi_i2c_read_reg
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	w8, [sp, #12]
Lloh12:
	adrp	x9, _I2C_STAT_CMD_COMP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _I2C_STAT_CMD_COMP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_6
LBB0_4:
	ldr	w0, [x19]
Lloh15:
	adrp	x8, _I2C_FSI_RESET_I2C@GOTPAGE
Lloh16:
	ldr	x8, [x8, _I2C_FSI_RESET_I2C@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_fsi_i2c_write_reg
	cbnz	w0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_fsi_i2c_dev_init
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FSI_RESET_ERR,4,2          ; @I2C_FSI_RESET_ERR
	.comm	_I2C_RESET_SLEEP_MIN_US,4,2     ; @I2C_RESET_SLEEP_MIN_US
	.comm	_I2C_RESET_SLEEP_MAX_US,4,2     ; @I2C_RESET_SLEEP_MAX_US
	.comm	_I2C_FSI_STAT,4,2               ; @I2C_FSI_STAT
	.comm	_I2C_STAT_CMD_COMP,4,2          ; @I2C_STAT_CMD_COMP
	.comm	_I2C_FSI_RESET_I2C,4,2          ; @I2C_FSI_RESET_I2C
	.no_dead_strip	_fsi_i2c_reset_bus
.subsections_via_symbols
