	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv64xxx_i2c_execute_msg
_mv64xxx_i2c_execute_msg:               ## @mv64xxx_i2c_execute_msg
	.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, %r15
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_mv64xxx_i2c_prepare_for_io
	movq	_I2C_M_NOSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	(%r15), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	24(%rbx), %rax
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_3
## %bb.2:
	movq	_MV64XXX_I2C_ACTION_CONTINUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_MV64XXX_I2C_ACTION_SEND_START@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_MV64XXX_I2C_STATE_WAITING_FOR_START_COND@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	jmp	LBB0_6
LBB0_3:
	movq	_MV64XXX_I2C_ACTION_SEND_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	decl	20(%rbx)
LBB0_6:
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	callq	_mv64xxx_i2c_do_action
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_mv64xxx_i2c_wait_for_completion
	movl	4(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_NOSTART,4,2              ## @I2C_M_NOSTART
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_MV64XXX_I2C_ACTION_CONTINUE,4,2 ## @MV64XXX_I2C_ACTION_CONTINUE
	.comm	_MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA,4,2 ## @MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA
	.comm	_MV64XXX_I2C_ACTION_SEND_DATA,4,2 ## @MV64XXX_I2C_ACTION_SEND_DATA
	.comm	_MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK,4,2 ## @MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK
	.comm	_MV64XXX_I2C_ACTION_SEND_START,4,2 ## @MV64XXX_I2C_ACTION_SEND_START
	.comm	_MV64XXX_I2C_STATE_WAITING_FOR_START_COND,4,2 ## @MV64XXX_I2C_STATE_WAITING_FOR_START_COND
	.no_dead_strip	_mv64xxx_i2c_execute_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv64xxx_i2c_execute_msg
_mv64xxx_i2c_execute_msg:               ; @mv64xxx_i2c_execute_msg
	.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
	mov	x21, x1
	mov	x19, x0
	add	x20, x0, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	x1, x21
	bl	_mv64xxx_i2c_prepare_for_io
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _I2C_M_NOSTART@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_M_NOSTART@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
Lloh6:
	adrp	x8, _MV64XXX_I2C_ACTION_CONTINUE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MV64XXX_I2C_ACTION_CONTINUE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _MV64XXX_I2C_ACTION_SEND_START@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MV64XXX_I2C_ACTION_SEND_START@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _MV64XXX_I2C_STATE_WAITING_FOR_START_COND@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MV64XXX_I2C_STATE_WAITING_FOR_START_COND@GOTPAGEOFF]
LBB0_4:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #12]
	b	LBB0_6
LBB0_5:
Lloh16:
	adrp	x8, _MV64XXX_I2C_ACTION_SEND_DATA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MV64XXX_I2C_ACTION_SEND_DATA@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #12]
	ldr	w8, [x19, #20]
	sub	w8, w8, #1
	str	w8, [x19, #20]
LBB0_6:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_mv64xxx_i2c_do_action
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_mv64xxx_i2c_wait_for_completion
	ldr	w0, [x19, #4]
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_NOSTART,4,2              ; @I2C_M_NOSTART
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_MV64XXX_I2C_ACTION_CONTINUE,4,2 ; @MV64XXX_I2C_ACTION_CONTINUE
	.comm	_MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA,4,2 ; @MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA
	.comm	_MV64XXX_I2C_ACTION_SEND_DATA,4,2 ; @MV64XXX_I2C_ACTION_SEND_DATA
	.comm	_MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK,4,2 ; @MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK
	.comm	_MV64XXX_I2C_ACTION_SEND_START,4,2 ; @MV64XXX_I2C_ACTION_SEND_START
	.comm	_MV64XXX_I2C_STATE_WAITING_FOR_START_COND,4,2 ; @MV64XXX_I2C_STATE_WAITING_FOR_START_COND
	.no_dead_strip	_mv64xxx_i2c_execute_msg
.subsections_via_symbols
