	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk3x_i2c_prepare_read
_rk3x_i2c_prepare_read:                 ## @rk3x_i2c_prepare_read
	.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	%rdi, %r14
	movq	8(%rdi), %rax
	movl	(%rax), %r12d
	subl	(%rdi), %r12d
	movq	_REG_CON@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_i2c_readl
	movq	_REG_CON_LASTACK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%ebx, %ecx
	notl	%ecx
	andl	%eax, %ecx
	orl	%eax, %ebx
	cmpl	$33, %r12d
	cmovael	%ecx, %ebx
	cmpl	$0, (%r14)
	je	LBB0_2
## %bb.1:
	movq	_REG_CON_MOD_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	movq	_REG_CON_MOD_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG_CON_MOD
	orl	%eax, %ebx
LBB0_2:
	cmpl	$32, %r12d
	movl	$32, %r15d
	cmovbl	%r12d, %r15d
	movl	(%r13), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_i2c_writel
	movq	_REG_MRXCNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i2c_writel                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_CON,4,2                    ## @REG_CON
	.comm	_REG_CON_LASTACK,4,2            ## @REG_CON_LASTACK
	.comm	_REG_CON_MOD_MASK,4,2           ## @REG_CON_MOD_MASK
	.comm	_REG_CON_MOD_RX,4,2             ## @REG_CON_MOD_RX
	.comm	_REG_MRXCNT,4,2                 ## @REG_MRXCNT
	.no_dead_strip	_rk3x_i2c_prepare_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk3x_i2c_prepare_read
_rk3x_i2c_prepare_read:                 ; @rk3x_i2c_prepare_read
	.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	w8, [x8]
	ldr	w9, [x0]
	sub	w20, w8, w9
Lloh0:
	adrp	x21, _REG_CON@GOTPAGE
Lloh1:
	ldr	x21, [x21, _REG_CON@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_i2c_readl
Lloh2:
	adrp	x8, _REG_CON_LASTACK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REG_CON_LASTACK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w9, w0, w8
	orr	w8, w8, w0
	cmp	w20, #32
	csel	w1, w9, w8, hi
	ldr	w8, [x19]
	cbz	w8, LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _REG_CON_MOD_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _REG_CON_MOD_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w22, w1, w8
Lloh8:
	adrp	x8, _REG_CON_MOD_RX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_CON_MOD_RX@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_REG_CON_MOD
	orr	w1, w0, w22
LBB0_2:
	mov	w8, #32
	cmp	w20, #32
	csel	w20, w20, w8, lo
	ldr	w2, [x21]
	mov	x0, x19
	bl	_i2c_writel
Lloh11:
	adrp	x8, _REG_MRXCNT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REG_MRXCNT@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	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	_i2c_writel
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_CON,4,2                    ; @REG_CON
	.comm	_REG_CON_LASTACK,4,2            ; @REG_CON_LASTACK
	.comm	_REG_CON_MOD_MASK,4,2           ; @REG_CON_MOD_MASK
	.comm	_REG_CON_MOD_RX,4,2             ; @REG_CON_MOD_RX
	.comm	_REG_MRXCNT,4,2                 ; @REG_MRXCNT
	.no_dead_strip	_rk3x_i2c_prepare_read
.subsections_via_symbols
