	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv64xxx_i2c_prepare_for_io
_mv64xxx_i2c_prepare_for_io:            ## @mv64xxx_i2c_prepare_for_io
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rsi, 48(%rdi)
	movq	$0, 40(%rdi)
	movl	16(%rsi), %eax
	movl	%eax, 32(%rdi)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rdi)
	movq	_MV64XXX_I2C_REG_CONTROL_ACK@GOTPCREL(%rip), %rax
	movq	_MV64XXX_I2C_REG_CONTROL_INTEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_MV64XXX_I2C_REG_CONTROL_TWSIEN@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%rdi)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rsi), %edx
	movl	8(%rsi), %r8d
	testl	%edx, (%rcx)
	setne	%cl
	movq	_I2C_M_REV_DIR_ADDR@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	setne	%al
	xorb	%cl, %al
	movzbl	%al, %ecx
	movq	_I2C_M_TEN@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_2
## %bb.1:
	movl	%r8d, %eax
	shrl	$7, %eax
	andl	$6, %eax
	addl	%eax, %ecx
	addl	$240, %ecx
	movzbl	%r8b, %eax
	jmp	LBB0_3
LBB0_2:
	andl	$127, %r8d
	leal	(%rcx,%r8,2), %ecx
	xorl	%eax, %eax
LBB0_3:
	movl	%ecx, 4(%rdi)
	movl	%eax, 8(%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MV64XXX_I2C_REG_CONTROL_ACK,4,2 ## @MV64XXX_I2C_REG_CONTROL_ACK
	.comm	_MV64XXX_I2C_REG_CONTROL_INTEN,4,2 ## @MV64XXX_I2C_REG_CONTROL_INTEN
	.comm	_MV64XXX_I2C_REG_CONTROL_TWSIEN,4,2 ## @MV64XXX_I2C_REG_CONTROL_TWSIEN
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_I2C_M_REV_DIR_ADDR,4,2         ## @I2C_M_REV_DIR_ADDR
	.comm	_I2C_M_TEN,4,2                  ## @I2C_M_TEN
	.no_dead_strip	_mv64xxx_i2c_prepare_for_io
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv64xxx_i2c_prepare_for_io
_mv64xxx_i2c_prepare_for_io:            ; @mv64xxx_i2c_prepare_for_io
	.cfi_startproc
; %bb.0:
	stp	xzr, x1, [x0, #40]
	ldr	w8, [x1, #16]
	str	w8, [x0, #32]
	stp	xzr, xzr, [x0, #16]
Lloh0:
	adrp	x8, _MV64XXX_I2C_REG_CONTROL_ACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MV64XXX_I2C_REG_CONTROL_ACK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MV64XXX_I2C_REG_CONTROL_INTEN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MV64XXX_I2C_REG_CONTROL_INTEN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _MV64XXX_I2C_REG_CONTROL_TWSIEN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MV64XXX_I2C_REG_CONTROL_TWSIEN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x0]
	ldr	w8, [x1]
Lloh9:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh10:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w9, ne
Lloh12:
	adrp	x10, _I2C_M_REV_DIR_ADDR@GOTPAGE
Lloh13:
	ldr	x10, [x10, _I2C_M_REV_DIR_ADDR@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w10, w8
	cset	w10, ne
	eor	w9, w9, w10
Lloh15:
	adrp	x10, _I2C_M_TEN@GOTPAGE
Lloh16:
	ldr	x10, [x10, _I2C_M_TEN@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	tst	w10, w8
	ldr	w8, [x1, #8]
	lsr	w10, w8, #7
	and	w10, w10, #0x6
	orr	w10, w10, w9
	bfi	w9, w8, #1, #7
	orr	w10, w10, #0xf0
	and	w8, w8, #0xff
	csel	w9, w9, w10, eq
	csel	w8, wzr, w8, eq
	stp	w9, w8, [x0, #4]
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MV64XXX_I2C_REG_CONTROL_ACK,4,2 ; @MV64XXX_I2C_REG_CONTROL_ACK
	.comm	_MV64XXX_I2C_REG_CONTROL_INTEN,4,2 ; @MV64XXX_I2C_REG_CONTROL_INTEN
	.comm	_MV64XXX_I2C_REG_CONTROL_TWSIEN,4,2 ; @MV64XXX_I2C_REG_CONTROL_TWSIEN
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_I2C_M_REV_DIR_ADDR,4,2         ; @I2C_M_REV_DIR_ADDR
	.comm	_I2C_M_TEN,4,2                  ; @I2C_M_TEN
	.no_dead_strip	_mv64xxx_i2c_prepare_for_io
.subsections_via_symbols
