	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsi_i2c_set_port
_fsi_i2c_set_port:                      ## @fsi_i2c_set_port
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %r14
	movl	$0, -40(%rbp)
	movq	_I2C_FSI_MODE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_fsi_i2c_read_reg
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_I2C_MODE_PORT@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movl	-36(%rbp), %esi
	callq	_FIELD_GET
	movq	%rax, %rcx
	movq	(%rbx), %rsi
	xorl	%eax, %eax
	cmpq	%rsi, %rcx
	je	LBB0_4
## %bb.2:
	movl	(%r12), %edi
	movl	%edi, %ebx
	notl	%ebx
	andl	-36(%rbp), %ebx
	callq	_FIELD_PREP
	orl	%ebx, %eax
	movl	%eax, -36(%rbp)
	movl	(%r15), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_fsi_i2c_write_reg
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_I2C_FSI_RESET_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	_fsi_i2c_write_reg
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FSI_MODE,4,2               ## @I2C_FSI_MODE
	.comm	_I2C_MODE_PORT,4,2              ## @I2C_MODE_PORT
	.comm	_I2C_FSI_RESET_ERR,4,2          ## @I2C_FSI_RESET_ERR
	.no_dead_strip	_fsi_i2c_set_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsi_i2c_set_port
_fsi_i2c_set_port:                      ; @fsi_i2c_set_port
	.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, x0
	ldr	x8, [x0, #8]
	ldr	x19, [x8]
	str	wzr, [sp, #8]
Lloh0:
	adrp	x21, _I2C_FSI_MODE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _I2C_FSI_MODE@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_fsi_i2c_read_reg
	cbnz	w0, LBB0_5
; %bb.1:
Lloh2:
	adrp	x22, _I2C_MODE_PORT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _I2C_MODE_PORT@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w1, [sp, #12]
	bl	_FIELD_GET
	ldr	x1, [x20]
	cmp	x0, x1
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	ldr	w8, [sp, #12]
	ldr	w0, [x22]
	bic	w20, w8, w0
	bl	_FIELD_PREP
	orr	w8, w20, w0
	str	w8, [sp, #12]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_fsi_i2c_write_reg
	cbnz	w0, LBB0_5
; %bb.4:
Lloh4:
	adrp	x8, _I2C_FSI_RESET_ERR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _I2C_FSI_RESET_ERR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_fsi_i2c_write_reg
LBB0_5:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FSI_MODE,4,2               ; @I2C_FSI_MODE
	.comm	_I2C_MODE_PORT,4,2              ; @I2C_MODE_PORT
	.comm	_I2C_FSI_RESET_ERR,4,2          ; @I2C_FSI_RESET_ERR
	.no_dead_strip	_fsi_i2c_set_port
.subsections_via_symbols
