	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_i2c_fill_tx_fifo
_tegra_i2c_fill_tx_fifo:                ## @tegra_i2c_fill_tx_fifo
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	(%rdi), %r14
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %rax
	cmpq	$0, (%rax)
	movq	_I2C_MST_FIFO_STATUS@GOTPCREL(%rip), %rax
	cmoveq	_I2C_FIFO_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_I2C_MST_FIFO_STATUS_TX_MASK@GOTPCREL(%rip), %rbx
	cmoveq	_I2C_FIFO_STATUS_TX_MASK@GOTPCREL(%rip), %rbx
	movq	_I2C_MST_FIFO_STATUS_TX_SHIFT@GOTPCREL(%rip), %r15
	cmoveq	_I2C_FIFO_STATUS_TX_SHIFT@GOTPCREL(%rip), %r15
	callq	_i2c_readl
	movl	%eax, %r13d
	movl	%eax, -44(%rbp)
	andl	(%rbx), %r13d
	movb	(%r15), %cl
	sarl	%cl, %r13d
	movq	_BYTES_PER_FIFO_WORD@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rcx
	movq	%r14, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_3
LBB0_1:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_3:
	testl	%eax, %eax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_5
## %bb.4:
	cmpl	%eax, %r13d
	cmovll	%r13d, %eax
	movslq	%eax, %rbx
	imulq	%rbx, %rcx
	subq	%rcx, %r14
	subl	%ebx, %r13d
	movq	%r14, (%r12)
	movq	(%rsi), %rax
	imulq	%rbx, %rax
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 8(%r12)
	xorl	%eax, %eax
	callq	_barrier
	movq	_I2C_TX_FIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%ebx, %ecx
	callq	_i2c_writesl
	movq	_BYTES_PER_FIFO_WORD@GOTPCREL(%rip), %rax
	imulq	(%rax), %rbx
	leaq	(%r15,%rbx,4), %r15
LBB0_5:
	testl	%r13d, %r13d
	jle	LBB0_8
## %bb.6:
	testq	%r14, %r14
	je	LBB0_8
## %bb.7:
	leaq	-44(%rbp), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	movl	-44(%rbp), %edi
	callq	_le32_to_cpu
	movl	%eax, -44(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r12)
	xorl	%eax, %eax
	callq	_barrier
	movl	-44(%rbp), %esi
	movq	_I2C_TX_FIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_i2c_writel
LBB0_8:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_MST_FIFO_STATUS,4,2        ## @I2C_MST_FIFO_STATUS
	.comm	_I2C_MST_FIFO_STATUS_TX_MASK,4,2 ## @I2C_MST_FIFO_STATUS_TX_MASK
	.comm	_I2C_MST_FIFO_STATUS_TX_SHIFT,4,2 ## @I2C_MST_FIFO_STATUS_TX_SHIFT
	.comm	_I2C_FIFO_STATUS,4,2            ## @I2C_FIFO_STATUS
	.comm	_I2C_FIFO_STATUS_TX_MASK,4,2    ## @I2C_FIFO_STATUS_TX_MASK
	.comm	_I2C_FIFO_STATUS_TX_SHIFT,4,2   ## @I2C_FIFO_STATUS_TX_SHIFT
	.comm	_BYTES_PER_FIFO_WORD,8,3        ## @BYTES_PER_FIFO_WORD
	.comm	_I2C_TX_FIFO,4,2                ## @I2C_TX_FIFO
	.no_dead_strip	_tegra_i2c_fill_tx_fifo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_i2c_fill_tx_fifo
_tegra_i2c_fill_tx_fifo:                ; @tegra_i2c_fill_tx_fifo
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldp	x21, x20, [x0]
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x9, _I2C_FIFO_STATUS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_FIFO_STATUS@GOTPAGEOFF]
	ldr	x8, [x8]
Lloh2:
	adrp	x10, _I2C_MST_FIFO_STATUS@GOTPAGE
Lloh3:
	ldr	x10, [x10, _I2C_MST_FIFO_STATUS@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	w1, [x8]
Lloh4:
	adrp	x8, _I2C_FIFO_STATUS_TX_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _I2C_FIFO_STATUS_TX_MASK@GOTPAGEOFF]
Lloh6:
	adrp	x9, _I2C_MST_FIFO_STATUS_TX_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _I2C_MST_FIFO_STATUS_TX_MASK@GOTPAGEOFF]
Lloh8:
	adrp	x10, _I2C_FIFO_STATUS_TX_SHIFT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _I2C_FIFO_STATUS_TX_SHIFT@GOTPAGEOFF]
	csel	x22, x8, x9, eq
Lloh10:
	adrp	x8, _I2C_MST_FIFO_STATUS_TX_SHIFT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _I2C_MST_FIFO_STATUS_TX_SHIFT@GOTPAGEOFF]
	csel	x23, x10, x8, eq
	bl	_i2c_readl
	str	w0, [sp, #12]
	ldr	w8, [x22]
	and	w8, w8, w0
	ldr	w9, [x23]
	asr	w24, w8, w9
Lloh12:
	adrp	x25, _BYTES_PER_FIFO_WORD@GOTPAGE
Lloh13:
	ldr	x25, [x25, _BYTES_PER_FIFO_WORD@GOTPAGEOFF]
	ldr	x8, [x25]
Lloh14:
	adrp	x23, _I2C_TX_FIFO@GOTPAGE
Lloh15:
	ldr	x23, [x23, _I2C_TX_FIFO@GOTPAGEOFF]
	udiv	x9, x21, x8
	cbz	w9, LBB0_2
; %bb.1:
	cmp	w24, w9
	csel	w22, w24, w9, lt
	sxtw	x26, w22
	msub	x21, x8, x26, x21
	sub	w24, w24, w22
	str	x21, [x19]
	ldr	x8, [x25]
	mul	x8, x8, x26
	add	x8, x20, x8, lsl #2
	str	x8, [x19, #8]
	bl	_barrier
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	mov	x3, x22
	bl	_i2c_writesl
	ldr	x8, [x25]
	mul	x8, x8, x26
	add	x20, x20, x8, lsl #2
LBB0_2:
	cmp	w24, #1
	ccmp	x21, #0, #4, ge
	b.eq	LBB0_4
; %bb.3:
	add	x0, sp, #12
	mov	x1, x20
	mov	x2, x21
	bl	_memcpy
	ldr	w0, [sp, #12]
	bl	_le32_to_cpu
	str	w0, [sp, #12]
	stp	xzr, xzr, [x19]
	bl	_barrier
	ldr	w1, [sp, #12]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_i2c_writel
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_MST_FIFO_STATUS,4,2        ; @I2C_MST_FIFO_STATUS
	.comm	_I2C_MST_FIFO_STATUS_TX_MASK,4,2 ; @I2C_MST_FIFO_STATUS_TX_MASK
	.comm	_I2C_MST_FIFO_STATUS_TX_SHIFT,4,2 ; @I2C_MST_FIFO_STATUS_TX_SHIFT
	.comm	_I2C_FIFO_STATUS,4,2            ; @I2C_FIFO_STATUS
	.comm	_I2C_FIFO_STATUS_TX_MASK,4,2    ; @I2C_FIFO_STATUS_TX_MASK
	.comm	_I2C_FIFO_STATUS_TX_SHIFT,4,2   ; @I2C_FIFO_STATUS_TX_SHIFT
	.comm	_BYTES_PER_FIFO_WORD,8,3        ; @BYTES_PER_FIFO_WORD
	.comm	_I2C_TX_FIFO,4,2                ; @I2C_TX_FIFO
	.no_dead_strip	_tegra_i2c_fill_tx_fifo
.subsections_via_symbols
