	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dce_i2c_sw_engine_submit_payload ## -- Begin function dce_i2c_sw_engine_submit_payload
	.p2align	4, 0x90
_dce_i2c_sw_engine_submit_payload:      ## @dce_i2c_sw_engine_submit_payload
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$32, %rsp
	xorl	%r8d, %r8d
	cmpl	$0, 12(%rsi)
	sete	%r8b
	movq	_DCE_I2C_TRANSACTION_ACTION_I2C_WRITE_MOT@GOTPCREL(%rip), %rcx
	cmoveq	_DCE_I2C_TRANSACTION_ACTION_I2C_READ_MOT@GOTPCREL(%rip), %rcx
	movq	_DCE_I2C_TRANSACTION_ACTION_I2C_WRITE@GOTPCREL(%rip), %rax
	cmoveq	_DCE_I2C_TRANSACTION_ACTION_I2C_READ@GOTPCREL(%rip), %rax
	testl	%edx, %edx
	cmovneq	%rcx, %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movl	(%rsi), %eax
	leal	(%r8,%rax,2), %eax
	cltq
	movq	%rax, -16(%rbp)
	movl	8(%rsi), %eax
	movl	%eax, -20(%rbp)
	movl	4(%rsi), %eax
	movl	%eax, -24(%rbp)
	leaq	-32(%rbp), %rsi
	callq	_dce_i2c_sw_engine_submit_channel_request
	movq	-32(%rbp), %rax
	movq	_I2C_CHANNEL_OPERATION_ENGINE_BUSY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%cl
	movq	_I2C_CHANNEL_OPERATION_FAILED@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	setne	%al
	andb	%cl, %al
	movzbl	%al, %eax
	addq	$32, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DCE_I2C_TRANSACTION_ACTION_I2C_READ_MOT,4,2 ## @DCE_I2C_TRANSACTION_ACTION_I2C_READ_MOT
	.comm	_DCE_I2C_TRANSACTION_ACTION_I2C_READ,4,2 ## @DCE_I2C_TRANSACTION_ACTION_I2C_READ
	.comm	_DCE_I2C_TRANSACTION_ACTION_I2C_WRITE_MOT,4,2 ## @DCE_I2C_TRANSACTION_ACTION_I2C_WRITE_MOT
	.comm	_DCE_I2C_TRANSACTION_ACTION_I2C_WRITE,4,2 ## @DCE_I2C_TRANSACTION_ACTION_I2C_WRITE
	.comm	_I2C_CHANNEL_OPERATION_ENGINE_BUSY,8,3 ## @I2C_CHANNEL_OPERATION_ENGINE_BUSY
	.comm	_I2C_CHANNEL_OPERATION_FAILED,8,3 ## @I2C_CHANNEL_OPERATION_FAILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dce_i2c_sw_engine_submit_payload ; -- Begin function dce_i2c_sw_engine_submit_payload
	.p2align	2
_dce_i2c_sw_engine_submit_payload:      ; @dce_i2c_sw_engine_submit_payload
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	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
	ldr	w8, [x1, #12]
Lloh0:
	adrp	x9, _DCE_I2C_TRANSACTION_ACTION_I2C_READ_MOT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DCE_I2C_TRANSACTION_ACTION_I2C_READ_MOT@GOTPAGEOFF]
Lloh2:
	adrp	x10, _DCE_I2C_TRANSACTION_ACTION_I2C_WRITE_MOT@GOTPAGE
Lloh3:
	ldr	x10, [x10, _DCE_I2C_TRANSACTION_ACTION_I2C_WRITE_MOT@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x9, x10, eq
Lloh4:
	adrp	x9, _DCE_I2C_TRANSACTION_ACTION_I2C_READ@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DCE_I2C_TRANSACTION_ACTION_I2C_READ@GOTPAGEOFF]
Lloh6:
	adrp	x10, _DCE_I2C_TRANSACTION_ACTION_I2C_WRITE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DCE_I2C_TRANSACTION_ACTION_I2C_WRITE@GOTPAGEOFF]
	cset	w11, eq
	csel	x9, x9, x10, eq
	cmp	w2, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [sp, #24]
	ldr	w8, [x1]
	bfi	w11, w8, #1, #31
	sxtw	x8, w11
	str	x8, [sp, #16]
	ldur	d0, [x1, #4]
	str	d0, [sp, #8]
	mov	x1, sp
	bl	_dce_i2c_sw_engine_submit_channel_request
	ldr	x8, [sp]
Lloh8:
	adrp	x9, _I2C_CHANNEL_OPERATION_ENGINE_BUSY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _I2C_CHANNEL_OPERATION_ENGINE_BUSY@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh11:
	adrp	x9, _I2C_CHANNEL_OPERATION_FAILED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _I2C_CHANNEL_OPERATION_FAILED@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w0, ne
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DCE_I2C_TRANSACTION_ACTION_I2C_READ_MOT,4,2 ; @DCE_I2C_TRANSACTION_ACTION_I2C_READ_MOT
	.comm	_DCE_I2C_TRANSACTION_ACTION_I2C_READ,4,2 ; @DCE_I2C_TRANSACTION_ACTION_I2C_READ
	.comm	_DCE_I2C_TRANSACTION_ACTION_I2C_WRITE_MOT,4,2 ; @DCE_I2C_TRANSACTION_ACTION_I2C_WRITE_MOT
	.comm	_DCE_I2C_TRANSACTION_ACTION_I2C_WRITE,4,2 ; @DCE_I2C_TRANSACTION_ACTION_I2C_WRITE
	.comm	_I2C_CHANNEL_OPERATION_ENGINE_BUSY,8,3 ; @I2C_CHANNEL_OPERATION_ENGINE_BUSY
	.comm	_I2C_CHANNEL_OPERATION_FAILED,8,3 ; @I2C_CHANNEL_OPERATION_FAILED
.subsections_via_symbols
