	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpi2c_imx_read_rxfifo
_lpi2c_imx_read_rxfifo:                 ## @lpi2c_imx_read_rxfifo
	.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	%rdi, %rbx
	movq	_LPI2C_MRDR@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	16(%rbx), %rdi
	callq	_readl
	movq	_MRDR_RXEMPTY@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	jne	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	%al, %eax
	movq	(%rbx), %rcx
	movslq	8(%rbx), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 8(%rbx)
	movl	%eax, (%rcx,%rdx,4)
	movq	(%r14), %rdi
	addq	16(%rbx), %rdi
	callq	_readl
	testl	%eax, (%r15)
	je	LBB0_1
LBB0_3:
	cmpq	$0, 24(%rbx)
	je	LBB0_4
## %bb.5:
	movq	(%rbx), %rax
	movl	12(%rbx), %r14d
	addl	(%rax), %r14d
	movl	%r14d, 12(%rbx)
	subl	8(%rbx), %r14d
	jne	LBB0_7
LBB0_13:
	addq	$32, %rbx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_complete                       ## TAILCALL
LBB0_4:
	movl	12(%rbx), %r14d
	subl	8(%rbx), %r14d
	je	LBB0_13
LBB0_7:
	movq	%rbx, %rdi
	callq	_lpi2c_imx_set_rx_watermark
	cmpq	$0, 24(%rbx)
	je	LBB0_9
## %bb.8:
	movq	$0, 24(%rbx)
	movq	_RECV_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$8, %eax
LBB0_11:
	orl	%eax, %r14d
	movq	_LPI2C_MTDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	movl	%r14d, %edi
	callq	_writel
	jmp	LBB0_12
LBB0_9:
	cmpb	$0, 8(%rbx)
	je	LBB0_10
LBB0_12:
	movq	_MIER_RDIE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_lpi2c_imx_intctrl              ## TAILCALL
LBB0_10:
	movq	_CHUNK_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r14d
	cmovbl	%r14d, %eax
	decl	%eax
	movq	_RECV_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	shll	$8, %r14d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_LPI2C_MRDR,8,3                 ## @LPI2C_MRDR
	.comm	_MRDR_RXEMPTY,4,2               ## @MRDR_RXEMPTY
	.comm	_RECV_DATA,4,2                  ## @RECV_DATA
	.comm	_LPI2C_MTDR,8,3                 ## @LPI2C_MTDR
	.comm	_CHUNK_DATA,4,2                 ## @CHUNK_DATA
	.comm	_MIER_RDIE,4,2                  ## @MIER_RDIE
	.no_dead_strip	_lpi2c_imx_read_rxfifo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpi2c_imx_read_rxfifo
_lpi2c_imx_read_rxfifo:                 ; @lpi2c_imx_read_rxfifo
	.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, #16]
Lloh0:
	adrp	x20, _LPI2C_MRDR@GOTPAGE
Lloh1:
	ldr	x20, [x20, _LPI2C_MRDR@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x21, _MRDR_RXEMPTY@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MRDR_RXEMPTY@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	and	w8, w0, #0xff
	ldr	x9, [x19]
	ldrsw	x10, [x19, #8]
	add	w11, w10, #1
	str	w11, [x19, #8]
	str	w8, [x9, x10, lsl #2]
	ldr	x8, [x19, #16]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
	b	LBB0_1
LBB0_3:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	x8, [x19]
	ldr	w8, [x8]
	ldr	w9, [x19, #12]
	add	w8, w9, w8
	str	w8, [x19, #12]
	b	LBB0_6
LBB0_5:
	ldr	w8, [x19, #12]
LBB0_6:
	ldr	w9, [x19, #8]
	subs	w20, w8, w9
	b.ne	LBB0_8
; %bb.7:
	add	x0, x19, #32
	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	_complete
LBB0_8:
	mov	x0, x19
	bl	_lpi2c_imx_set_rx_watermark
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_11
; %bb.9:
	str	xzr, [x19, #24]
Lloh4:
	adrp	x8, _RECV_DATA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RECV_DATA@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	lsl	w8, w8, #8
LBB0_10:
	orr	w0, w8, w20
	ldr	x8, [x19, #16]
Lloh7:
	adrp	x9, _LPI2C_MTDR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _LPI2C_MTDR@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	b	LBB0_12
LBB0_11:
	ldrb	w8, [x19, #8]
	cbz	w8, LBB0_13
LBB0_12:
Lloh10:
	adrp	x8, _MIER_RDIE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MIER_RDIE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	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	_lpi2c_imx_intctrl
LBB0_13:
Lloh13:
	adrp	x8, _CHUNK_DATA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CHUNK_DATA@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w20, w8
	csel	w8, w20, w8, lo
	sub	w8, w8, #1
Lloh16:
	adrp	x9, _RECV_DATA@GOTPAGE
Lloh17:
	ldr	x9, [x9, _RECV_DATA@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	lsl	w20, w9, #8
	b	LBB0_10
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_LPI2C_MRDR,8,3                 ; @LPI2C_MRDR
	.comm	_MRDR_RXEMPTY,4,2               ; @MRDR_RXEMPTY
	.comm	_RECV_DATA,4,2                  ; @RECV_DATA
	.comm	_LPI2C_MTDR,8,3                 ; @LPI2C_MTDR
	.comm	_CHUNK_DATA,4,2                 ; @CHUNK_DATA
	.comm	_MIER_RDIE,4,2                  ; @MIER_RDIE
	.no_dead_strip	_lpi2c_imx_read_rxfifo
.subsections_via_symbols
