	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_i2c_prepare_xfer
_meson_i2c_prepare_xfer:                ## @meson_i2c_prepare_xfer
	.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, %r15
	movq	32(%rdi), %rax
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	andl	(%rax), %r14d
	movq	8(%rax), %rdi
	subq	8(%r15), %rdi
	movl	$8, %esi
	callq	_min
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, (%r15)
	cmpl	$2, %eax
	jl	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	movq	_TOKEN_DATA@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_meson_i2c_add_token
	incl	%ebx
	movl	(%r15), %eax
	leal	-1(%rax), %ecx
	cmpl	%ecx, %ebx
	jl	LBB0_2
LBB0_3:
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.5:
	cltq
	addq	8(%r15), %rax
	movq	32(%r15), %rcx
	cmpq	8(%rcx), %rax
	jge	LBB0_13
LBB0_6:
	movq	_TOKEN_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_meson_i2c_add_token
LBB0_7:
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.8:
	movq	32(%r15), %rax
	movq	8(%r15), %rsi
	addq	16(%rax), %rsi
	movl	(%r15), %edx
	movq	%r15, %rdi
	callq	_meson_i2c_put_data
LBB0_9:
	cmpq	$0, 40(%r15)
	je	LBB0_12
LBB0_10:
	movslq	(%r15), %rax
	addq	8(%r15), %rax
	movq	32(%r15), %rcx
	cmpq	8(%rcx), %rax
	jl	LBB0_12
## %bb.11:
	movq	_TOKEN_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_meson_i2c_add_token
	jmp	LBB0_12
LBB0_13:
	movq	_TOKEN_DATA_LAST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_meson_i2c_add_token
	cmpq	$0, 40(%r15)
	jne	LBB0_10
LBB0_12:
	movq	24(%r15), %rax
	movl	(%rax), %edi
	movq	_REG_TOK_LIST0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	callq	_writel
	movq	24(%r15), %rax
	movl	4(%rax), %edi
	movq	_REG_TOK_LIST1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_TOKEN_DATA,4,2                 ## @TOKEN_DATA
	.comm	_TOKEN_DATA_LAST,4,2            ## @TOKEN_DATA_LAST
	.comm	_TOKEN_STOP,4,2                 ## @TOKEN_STOP
	.comm	_REG_TOK_LIST0,8,3              ## @REG_TOK_LIST0
	.comm	_REG_TOK_LIST1,8,3              ## @REG_TOK_LIST1
	.no_dead_strip	_meson_i2c_prepare_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function meson_i2c_prepare_xfer
_meson_i2c_prepare_xfer:                ; @meson_i2c_prepare_xfer
	.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	x19, x0
	ldr	x8, [x0, #32]
	ldr	w20, [x8]
Lloh0:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x9]
	ldr	x8, [x8, #8]
	ldr	x9, [x0, #8]
	sub	x0, x8, x9
	mov	w1, #8
	bl	_min
	str	w0, [x19]
	cmp	w0, #2
	b.lt	LBB0_3
; %bb.1:
	mov	w22, #0
Lloh3:
	adrp	x23, _TOKEN_DATA@GOTPAGE
Lloh4:
	ldr	x23, [x23, _TOKEN_DATA@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_meson_i2c_add_token
	add	w22, w22, #1
	ldr	w0, [x19]
	sub	w8, w0, #1
	cmp	w22, w8
	b.lt	LBB0_2
LBB0_3:
	and	w20, w21, w20
	cbz	w0, LBB0_7
; %bb.4:
	cbz	w20, LBB0_6
; %bb.5:
	ldr	x8, [x19, #8]
	add	x8, x8, w0, sxtw
	ldr	x9, [x19, #32]
	ldr	x9, [x9, #8]
	cmp	x8, x9
	b.ge	LBB0_12
LBB0_6:
Lloh5:
	adrp	x8, _TOKEN_DATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TOKEN_DATA@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_meson_i2c_add_token
LBB0_7:
	cbnz	w20, LBB0_9
; %bb.8:
	ldr	x8, [x19, #32]
	ldr	x8, [x8, #16]
	ldr	x9, [x19, #8]
	add	x1, x9, x8
	ldr	w2, [x19]
	mov	x0, x19
	bl	_meson_i2c_put_data
LBB0_9:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_13
LBB0_10:
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	ldr	x10, [x19, #32]
	ldr	x10, [x10, #8]
	add	x8, x8, x9
	cmp	x8, x10
	b.lt	LBB0_13
; %bb.11:
Lloh8:
	adrp	x8, _TOKEN_STOP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TOKEN_STOP@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_meson_i2c_add_token
	b	LBB0_13
LBB0_12:
Lloh11:
	adrp	x8, _TOKEN_DATA_LAST@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TOKEN_DATA_LAST@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_meson_i2c_add_token
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_10
LBB0_13:
	ldp	x9, x8, [x19, #16]
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _REG_TOK_LIST0@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REG_TOK_LIST0@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	add	x1, x8, x9
	bl	_writel
	ldp	x9, x8, [x19, #16]
	ldr	w0, [x8, #4]
Lloh17:
	adrp	x8, _REG_TOK_LIST1@GOTPAGE
Lloh18:
	ldr	x8, [x8, _REG_TOK_LIST1@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	add	x1, x8, x9
	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
	b	_writel
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_TOKEN_DATA,4,2                 ; @TOKEN_DATA
	.comm	_TOKEN_DATA_LAST,4,2            ; @TOKEN_DATA_LAST
	.comm	_TOKEN_STOP,4,2                 ; @TOKEN_STOP
	.comm	_REG_TOK_LIST0,8,3              ; @REG_TOK_LIST0
	.comm	_REG_TOK_LIST1,8,3              ; @REG_TOK_LIST1
	.no_dead_strip	_meson_i2c_prepare_xfer
.subsections_via_symbols
