	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_i2c_mrecv
_cdns_i2c_mrecv:                        ## @cdns_i2c_mrecv
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movl	12(%rax), %ecx
	movl	%ecx, 24(%rdi)
	movl	(%rax), %eax
	movl	%eax, (%rdi)
	movq	_CDNS_I2C_CR_OFFSET@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_cdns_i2c_readreg
	movq	_CDNS_I2C_CR_RW@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_CDNS_I2C_CR_CLR_FIFO@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	8(%rbx), %rcx
	movq	_I2C_M_RECV_LEN@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	testl	%edx, 4(%rcx)
	je	LBB0_1
## %bb.2:
	movq	_I2C_SMBUS_BLOCK_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	incl	%ecx
	movl	%ecx, (%rbx)
	jmp	LBB0_3
LBB0_1:
	movl	(%rbx), %ecx
LBB0_3:
	movl	%ecx, 4(%rbx)
	movl	%ecx, %ecx
	movq	_CDNS_I2C_FIFO_DEPTH@GOTPCREL(%rip), %r15
	cmpq	%rcx, (%r15)
	jl	LBB0_5
## %bb.4:
	cmpq	$0, 16(%rbx)
	je	LBB0_6
LBB0_5:
	movq	_CDNS_I2C_CR_HOLD@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
LBB0_7:
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_cdns_i2c_writereg
	movq	_CDNS_I2C_ISR_OFFSET@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_cdns_i2c_readreg
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_cdns_i2c_writereg
	movl	(%rbx), %edi
	movq	_CDNS_I2C_TRANSFER_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movq	_CDNS_I2C_XFER_SIZE_OFFSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	cmpl	%eax, %edi
	jbe	LBB0_9
## %bb.8:
	movl	%eax, %edi
	callq	_cdns_i2c_writereg
	movl	(%r12), %eax
	movl	%eax, 4(%rbx)
	jmp	LBB0_10
LBB0_9:
	callq	_cdns_i2c_writereg
LBB0_10:
	movq	8(%rbx), %rax
	movq	_CDNS_I2C_ADDR_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	8(%rax), %edi
	movq	_CDNS_I2C_ADDR_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_cdns_i2c_writereg
	cmpq	$0, 16(%rbx)
	jne	LBB0_14
## %bb.11:
	movq	8(%rbx), %rax
	movl	4(%rax), %eax
	notl	%eax
	testl	%eax, (%r14)
	je	LBB0_14
## %bb.12:
	movl	(%rbx), %eax
	cmpq	%rax, (%r15)
	jl	LBB0_14
## %bb.13:
	movq	%rbx, %rdi
	callq	_cdns_i2c_clear_bus_hold
LBB0_14:
	movq	_CDNS_I2C_ENABLED_INTR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CDNS_I2C_IER_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cdns_i2c_writereg              ## TAILCALL
LBB0_6:
	movq	_CDNS_I2C_CR_HOLD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_CDNS_I2C_CR_OFFSET,4,2         ## @CDNS_I2C_CR_OFFSET
	.comm	_CDNS_I2C_CR_RW,4,2             ## @CDNS_I2C_CR_RW
	.comm	_CDNS_I2C_CR_CLR_FIFO,4,2       ## @CDNS_I2C_CR_CLR_FIFO
	.comm	_I2C_M_RECV_LEN,4,2             ## @I2C_M_RECV_LEN
	.comm	_I2C_SMBUS_BLOCK_MAX,4,2        ## @I2C_SMBUS_BLOCK_MAX
	.comm	_CDNS_I2C_FIFO_DEPTH,8,3        ## @CDNS_I2C_FIFO_DEPTH
	.comm	_CDNS_I2C_CR_HOLD,4,2           ## @CDNS_I2C_CR_HOLD
	.comm	_CDNS_I2C_ISR_OFFSET,4,2        ## @CDNS_I2C_ISR_OFFSET
	.comm	_CDNS_I2C_TRANSFER_SIZE,4,2     ## @CDNS_I2C_TRANSFER_SIZE
	.comm	_CDNS_I2C_XFER_SIZE_OFFSET,4,2  ## @CDNS_I2C_XFER_SIZE_OFFSET
	.comm	_CDNS_I2C_ADDR_MASK,4,2         ## @CDNS_I2C_ADDR_MASK
	.comm	_CDNS_I2C_ADDR_OFFSET,4,2       ## @CDNS_I2C_ADDR_OFFSET
	.comm	_CDNS_I2C_ENABLED_INTR_MASK,4,2 ## @CDNS_I2C_ENABLED_INTR_MASK
	.comm	_CDNS_I2C_IER_OFFSET,4,2        ## @CDNS_I2C_IER_OFFSET
	.no_dead_strip	_cdns_i2c_mrecv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdns_i2c_mrecv
_cdns_i2c_mrecv:                        ; @cdns_i2c_mrecv
	.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	x19, x0
	ldr	x8, [x0, #8]
	ldr	w9, [x8, #12]
	str	w9, [x0, #24]
	ldr	w8, [x8]
	str	w8, [x0]
Lloh0:
	adrp	x22, _CDNS_I2C_CR_OFFSET@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CDNS_I2C_CR_OFFSET@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_cdns_i2c_readreg
Lloh2:
	adrp	x8, _CDNS_I2C_CR_RW@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CDNS_I2C_CR_RW@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x8]
Lloh5:
	adrp	x8, _CDNS_I2C_CR_CLR_FIFO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CDNS_I2C_CR_CLR_FIFO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w9, w9, w0
	ldr	x10, [x19, #8]
	ldr	w10, [x10, #4]
Lloh8:
	adrp	x20, _I2C_M_RECV_LEN@GOTPAGE
Lloh9:
	ldr	x20, [x20, _I2C_M_RECV_LEN@GOTPAGEOFF]
	ldr	w11, [x20]
	tst	w11, w10
	b.eq	LBB0_2
; %bb.1:
Lloh10:
	adrp	x10, _I2C_SMBUS_BLOCK_MAX@GOTPAGE
Lloh11:
	ldr	x10, [x10, _I2C_SMBUS_BLOCK_MAX@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	add	w10, w10, #1
	str	w10, [x19]
	b	LBB0_3
LBB0_2:
	ldr	w10, [x19]
LBB0_3:
	orr	w8, w9, w8
	str	w10, [x19, #4]
Lloh13:
	adrp	x21, _CDNS_I2C_FIFO_DEPTH@GOTPAGE
Lloh14:
	ldr	x21, [x21, _CDNS_I2C_FIFO_DEPTH@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x9, w10, uxtw
	b.lt	LBB0_5
; %bb.4:
	ldr	x9, [x19, #16]
	cbz	x9, LBB0_14
LBB0_5:
Lloh15:
	adrp	x9, _CDNS_I2C_CR_HOLD@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CDNS_I2C_CR_HOLD@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w0, w9, w8
LBB0_6:
	ldr	w1, [x22]
	bl	_cdns_i2c_writereg
Lloh18:
	adrp	x22, _CDNS_I2C_ISR_OFFSET@GOTPAGE
Lloh19:
	ldr	x22, [x22, _CDNS_I2C_ISR_OFFSET@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_cdns_i2c_readreg
	ldr	w1, [x22]
	bl	_cdns_i2c_writereg
Lloh20:
	adrp	x22, _CDNS_I2C_TRANSFER_SIZE@GOTPAGE
Lloh21:
	ldr	x22, [x22, _CDNS_I2C_TRANSFER_SIZE@GOTPAGEOFF]
	ldr	w0, [x19]
	ldr	w8, [x22]
Lloh22:
	adrp	x9, _CDNS_I2C_XFER_SIZE_OFFSET@GOTPAGE
Lloh23:
	ldr	x9, [x9, _CDNS_I2C_XFER_SIZE_OFFSET@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x9]
	cmp	w0, w8
	b.ls	LBB0_8
; %bb.7:
	mov	x0, x8
	bl	_cdns_i2c_writereg
	ldr	w8, [x22]
	str	w8, [x19, #4]
	b	LBB0_9
LBB0_8:
	bl	_cdns_i2c_writereg
LBB0_9:
	ldr	x8, [x19, #8]
Lloh25:
	adrp	x9, _CDNS_I2C_ADDR_MASK@GOTPAGE
Lloh26:
	ldr	x9, [x9, _CDNS_I2C_ADDR_MASK@GOTPAGEOFF]
	ldr	w8, [x8, #8]
Lloh27:
	ldr	w9, [x9]
	and	w0, w9, w8
Lloh28:
	adrp	x8, _CDNS_I2C_ADDR_OFFSET@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CDNS_I2C_ADDR_OFFSET@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	bl	_cdns_i2c_writereg
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_13
; %bb.10:
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #4]
	ldr	w9, [x20]
	bics	wzr, w9, w8
	b.eq	LBB0_13
; %bb.11:
	ldr	w8, [x19]
	ldr	x9, [x21]
	cmp	x9, x8
	b.lt	LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_cdns_i2c_clear_bus_hold
LBB0_13:
Lloh31:
	adrp	x8, _CDNS_I2C_ENABLED_INTR_MASK@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CDNS_I2C_ENABLED_INTR_MASK@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
Lloh34:
	adrp	x8, _CDNS_I2C_IER_OFFSET@GOTPAGE
Lloh35:
	ldr	x8, [x8, _CDNS_I2C_IER_OFFSET@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	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
	b	_cdns_i2c_writereg
LBB0_14:
Lloh37:
	adrp	x9, _CDNS_I2C_CR_HOLD@GOTPAGE
Lloh38:
	ldr	x9, [x9, _CDNS_I2C_CR_HOLD@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	bic	w0, w8, w9
	b	LBB0_6
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_CDNS_I2C_CR_OFFSET,4,2         ; @CDNS_I2C_CR_OFFSET
	.comm	_CDNS_I2C_CR_RW,4,2             ; @CDNS_I2C_CR_RW
	.comm	_CDNS_I2C_CR_CLR_FIFO,4,2       ; @CDNS_I2C_CR_CLR_FIFO
	.comm	_I2C_M_RECV_LEN,4,2             ; @I2C_M_RECV_LEN
	.comm	_I2C_SMBUS_BLOCK_MAX,4,2        ; @I2C_SMBUS_BLOCK_MAX
	.comm	_CDNS_I2C_FIFO_DEPTH,8,3        ; @CDNS_I2C_FIFO_DEPTH
	.comm	_CDNS_I2C_CR_HOLD,4,2           ; @CDNS_I2C_CR_HOLD
	.comm	_CDNS_I2C_ISR_OFFSET,4,2        ; @CDNS_I2C_ISR_OFFSET
	.comm	_CDNS_I2C_TRANSFER_SIZE,4,2     ; @CDNS_I2C_TRANSFER_SIZE
	.comm	_CDNS_I2C_XFER_SIZE_OFFSET,4,2  ; @CDNS_I2C_XFER_SIZE_OFFSET
	.comm	_CDNS_I2C_ADDR_MASK,4,2         ; @CDNS_I2C_ADDR_MASK
	.comm	_CDNS_I2C_ADDR_OFFSET,4,2       ; @CDNS_I2C_ADDR_OFFSET
	.comm	_CDNS_I2C_ENABLED_INTR_MASK,4,2 ; @CDNS_I2C_ENABLED_INTR_MASK
	.comm	_CDNS_I2C_IER_OFFSET,4,2        ; @CDNS_I2C_IER_OFFSET
	.no_dead_strip	_cdns_i2c_mrecv
.subsections_via_symbols
