	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_i2c_process_msg
_cdns_i2c_process_msg:                  ## @cdns_i2c_process_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	%rsi, 16(%rdi)
	movl	$0, (%rdi)
	leaq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_reinit_completion
	movq	_CDNS_I2C_CR_OFFSET@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_cdns_i2c_readreg
	movq	_I2C_M_TEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_CDNS_I2C_CR_NEA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%edx, (%rbx)
	je	LBB0_3
## %bb.1:
	testl	%eax, %ecx
	je	LBB0_6
## %bb.2:
	notl	%ecx
	andl	%ecx, %eax
	jmp	LBB0_5
LBB0_3:
	testl	%eax, %ecx
	jne	LBB0_6
## %bb.4:
	orl	%ecx, %eax
LBB0_5:
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_cdns_i2c_writereg
LBB0_6:
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	callq	_cdns_i2c_mrecv
	jmp	LBB0_9
LBB0_8:
	movq	%r12, %rdi
	callq	_cdns_i2c_msend
LBB0_9:
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	_CDNS_I2C_IXR_ALL_INTR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CDNS_I2C_IDR_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_cdns_i2c_writereg
	movq	_CDNS_I2C_IXR_ARB_LOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_12
## %bb.13:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_10:
	movq	%r14, %rdi
	callq	_cdns_i2c_master_reset
	movl	4(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
LBB0_14:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_15
LBB0_12:
	xorl	%eax, %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CDNS_I2C_CR_OFFSET,4,2         ## @CDNS_I2C_CR_OFFSET
	.comm	_I2C_M_TEN,4,2                  ## @I2C_M_TEN
	.comm	_CDNS_I2C_CR_NEA,4,2            ## @CDNS_I2C_CR_NEA
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout waiting on completion\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_CDNS_I2C_IXR_ALL_INTR_MASK,4,2 ## @CDNS_I2C_IXR_ALL_INTR_MASK
	.comm	_CDNS_I2C_IDR_OFFSET,4,2        ## @CDNS_I2C_IDR_OFFSET
	.comm	_CDNS_I2C_IXR_ARB_LOST,4,2      ## @CDNS_I2C_IXR_ARB_LOST
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_cdns_i2c_process_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdns_i2c_process_msg
_cdns_i2c_process_msg:                  ; @cdns_i2c_process_msg
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	str	x1, [x0, #16]
	str	wzr, [x0]
	add	x21, x0, #8
	mov	x0, x21
	bl	_reinit_completion
Lloh0:
	adrp	x23, _CDNS_I2C_CR_OFFSET@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CDNS_I2C_CR_OFFSET@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_cdns_i2c_readreg
	ldr	w10, [x22]
Lloh2:
	adrp	x8, _I2C_M_TEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I2C_M_TEN@GOTPAGEOFF]
Lloh4:
	ldr	w11, [x8]
Lloh5:
	adrp	x8, _CDNS_I2C_CR_NEA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CDNS_I2C_CR_NEA@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	and	w9, w8, w0
	tst	w11, w10
	b.eq	LBB0_3
; %bb.1:
	cbz	w9, LBB0_6
; %bb.2:
	bic	w0, w0, w8
	b	LBB0_5
LBB0_3:
	cbnz	w9, LBB0_6
; %bb.4:
	orr	w0, w8, w0
LBB0_5:
	ldr	w1, [x23]
	bl	_cdns_i2c_writereg
LBB0_6:
	ldr	w8, [x22]
Lloh8:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh9:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	mov	x0, x19
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	bl	_cdns_i2c_mrecv
	b	LBB0_9
LBB0_8:
	bl	_cdns_i2c_msend
LBB0_9:
	ldr	w1, [x20]
	mov	x0, x21
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_12
; %bb.10:
Lloh11:
	adrp	x8, _CDNS_I2C_IXR_ALL_INTR_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CDNS_I2C_IXR_ALL_INTR_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _CDNS_I2C_IDR_OFFSET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CDNS_I2C_IDR_OFFSET@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_cdns_i2c_writereg
	ldr	w8, [x19]
Lloh17:
	adrp	x9, _CDNS_I2C_IXR_ARB_LOST@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CDNS_I2C_IXR_ARB_LOST@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.11:
Lloh20:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
	mov	x0, x20
	bl	_cdns_i2c_master_reset
	ldr	w0, [x19, #4]
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh24:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_14:
	mov	w0, #0
LBB0_15:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_CDNS_I2C_CR_OFFSET,4,2         ; @CDNS_I2C_CR_OFFSET
	.comm	_I2C_M_TEN,4,2                  ; @I2C_M_TEN
	.comm	_CDNS_I2C_CR_NEA,4,2            ; @CDNS_I2C_CR_NEA
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout waiting on completion\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_CDNS_I2C_IXR_ALL_INTR_MASK,4,2 ; @CDNS_I2C_IXR_ALL_INTR_MASK
	.comm	_CDNS_I2C_IDR_OFFSET,4,2        ; @CDNS_I2C_IDR_OFFSET
	.comm	_CDNS_I2C_IXR_ARB_LOST,4,2      ; @CDNS_I2C_IXR_ARB_LOST
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_cdns_i2c_process_msg
.subsections_via_symbols
