	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsi_i2c_reset_engine
_fsi_i2c_reset_engine:                  ## @fsi_i2c_reset_engine
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movl	$0, -28(%rbp)
	movl	(%rdi), %edi
	movq	_I2C_FSI_RESET_I2C@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	callq	_fsi_i2c_write_reg
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	%rbx, %rdi
	callq	_fsi_i2c_dev_init
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movl	(%rbx), %edi
	movq	_I2C_FSI_MODE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-32(%rbp), %rdx
	callq	_fsi_i2c_read_reg
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	movq	_I2C_MODE_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %eax
	notl	%eax
	andl	%eax, -32(%rbp)
	movq	%r14, %rsi
	callq	_FIELD_PREP
	orl	%eax, -32(%rbp)
	movl	(%rbx), %edi
	movl	(%r15), %esi
	leaq	-32(%rbp), %rdx
	callq	_fsi_i2c_write_reg
	testl	%eax, %eax
	jne	LBB0_6
LBB0_5:
	movq	_I2C_PORT_BUSY_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movl	(%rbx), %edi
	movq	_I2C_FSI_PORT_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	callq	_fsi_i2c_write_reg
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FSI_RESET_I2C,4,2          ## @I2C_FSI_RESET_I2C
	.comm	_I2C_FSI_MODE,4,2               ## @I2C_FSI_MODE
	.comm	_I2C_MODE_PORT,4,2              ## @I2C_MODE_PORT
	.comm	_I2C_PORT_BUSY_RESET,4,2        ## @I2C_PORT_BUSY_RESET
	.comm	_I2C_FSI_PORT_BUSY,4,2          ## @I2C_FSI_PORT_BUSY
	.no_dead_strip	_fsi_i2c_reset_engine
.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_engine
_fsi_i2c_reset_engine:                  ; @fsi_i2c_reset_engine
	.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, x1
	mov	x19, x0
	str	wzr, [sp, #8]
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _I2C_FSI_RESET_I2C@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_FSI_RESET_I2C@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_fsi_i2c_write_reg
	cbnz	w0, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_fsi_i2c_dev_init
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	w0, [x19]
Lloh3:
	adrp	x21, _I2C_FSI_MODE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _I2C_FSI_MODE@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_fsi_i2c_read_reg
	cbnz	w0, LBB0_6
; %bb.3:
	cbz	x20, LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _I2C_MODE_PORT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I2C_MODE_PORT@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w8, [sp, #12]
	bic	w8, w8, w0
	str	w8, [sp, #12]
	mov	x1, x20
	bl	_FIELD_PREP
	ldr	w8, [sp, #12]
	orr	w8, w8, w0
	str	w8, [sp, #12]
	ldr	w0, [x19]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_fsi_i2c_write_reg
	cbnz	w0, LBB0_6
LBB0_5:
Lloh8:
	adrp	x8, _I2C_PORT_BUSY_RESET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I2C_PORT_BUSY_RESET@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	w0, [x19]
Lloh11:
	adrp	x8, _I2C_FSI_PORT_BUSY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I2C_FSI_PORT_BUSY@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_fsi_i2c_write_reg
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FSI_RESET_I2C,4,2          ; @I2C_FSI_RESET_I2C
	.comm	_I2C_FSI_MODE,4,2               ; @I2C_FSI_MODE
	.comm	_I2C_MODE_PORT,4,2              ; @I2C_MODE_PORT
	.comm	_I2C_PORT_BUSY_RESET,4,2        ; @I2C_PORT_BUSY_RESET
	.comm	_I2C_FSI_PORT_BUSY,4,2          ; @I2C_FSI_PORT_BUSY
	.no_dead_strip	_fsi_i2c_reset_engine
.subsections_via_symbols
