	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_i2c_flush_fifos
_tegra_i2c_flush_fifos:                 ## @tegra_i2c_flush_fifos
	.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, %r15
	movq	_jiffies@GOTPCREL(%rip), %r13
	movq	_HZ@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	addq	(%r13), %r14
	movq	8(%rdi), %rax
	movq	_I2C_FIFO_CONTROL_TX_FLUSH@GOTPCREL(%rip), %rcx
	movq	_I2C_MST_FIFO_CONTROL_TX_FLUSH@GOTPCREL(%rip), %rdx
	movq	_I2C_FIFO_CONTROL_RX_FLUSH@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movq	_I2C_MST_FIFO_CONTROL_RX_FLUSH@GOTPCREL(%rip), %rdi
	movl	(%rdi), %r12d
	orl	(%rcx), %esi
	orl	(%rdx), %r12d
	cmpq	$0, (%rax)
	cmovel	%esi, %r12d
	movq	_I2C_MST_FIFO_CONTROL@GOTPCREL(%rip), %rax
	cmoveq	_I2C_FIFO_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_i2c_readl
	orl	%r12d, %eax
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_i2c_writel
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_i2c_readl
	xorl	%ecx, %ecx
	testl	%r12d, %eax
	je	LBB0_5
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	movq	%r14, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_i2c_readl
	testl	%r12d, %eax
	jne	LBB0_1
## %bb.4:
	xorl	%ecx, %ecx
	jmp	LBB0_5
LBB0_2:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
LBB0_5:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,8,3                         ## @HZ
	.comm	_I2C_MST_FIFO_CONTROL_TX_FLUSH,4,2 ## @I2C_MST_FIFO_CONTROL_TX_FLUSH
	.comm	_I2C_MST_FIFO_CONTROL_RX_FLUSH,4,2 ## @I2C_MST_FIFO_CONTROL_RX_FLUSH
	.comm	_I2C_MST_FIFO_CONTROL,4,2       ## @I2C_MST_FIFO_CONTROL
	.comm	_I2C_FIFO_CONTROL_TX_FLUSH,4,2  ## @I2C_FIFO_CONTROL_TX_FLUSH
	.comm	_I2C_FIFO_CONTROL_RX_FLUSH,4,2  ## @I2C_FIFO_CONTROL_RX_FLUSH
	.comm	_I2C_FIFO_CONTROL,4,2           ## @I2C_FIFO_CONTROL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout waiting for fifo flush\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_tegra_i2c_flush_fifos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_i2c_flush_fifos
_tegra_i2c_flush_fifos:                 ; @tegra_i2c_flush_fifos
	.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
Lloh0:
	adrp	x22, _jiffies@GOTPAGE
Lloh1:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x21, [x22]
Lloh2:
	adrp	x8, _HZ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh4:
	ldr	x24, [x8]
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _I2C_FIFO_CONTROL_TX_FLUSH@GOTPAGE
Lloh6:
	ldr	x9, [x9, _I2C_FIFO_CONTROL_TX_FLUSH@GOTPAGEOFF]
Lloh7:
	adrp	x10, _I2C_MST_FIFO_CONTROL_TX_FLUSH@GOTPAGE
Lloh8:
	ldr	x10, [x10, _I2C_MST_FIFO_CONTROL_TX_FLUSH@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	adrp	x11, _I2C_FIFO_CONTROL_RX_FLUSH@GOTPAGE
Lloh12:
	ldr	x11, [x11, _I2C_FIFO_CONTROL_RX_FLUSH@GOTPAGEOFF]
Lloh13:
	adrp	x12, _I2C_MST_FIFO_CONTROL_RX_FLUSH@GOTPAGE
Lloh14:
	ldr	x12, [x12, _I2C_MST_FIFO_CONTROL_RX_FLUSH@GOTPAGEOFF]
Lloh15:
	ldr	w11, [x11]
Lloh16:
	ldr	w12, [x12]
	orr	w9, w11, w9
	orr	w10, w12, w10
Lloh17:
	adrp	x11, _I2C_FIFO_CONTROL@GOTPAGE
Lloh18:
	ldr	x11, [x11, _I2C_FIFO_CONTROL@GOTPAGEOFF]
Lloh19:
	adrp	x12, _I2C_MST_FIFO_CONTROL@GOTPAGE
Lloh20:
	ldr	x12, [x12, _I2C_MST_FIFO_CONTROL@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x11, x12, eq
	csel	w23, w9, w10, eq
	ldr	w20, [x8]
	mov	x1, x20
	bl	_i2c_readl
	orr	w1, w0, w23
	mov	x0, x19
	mov	x2, x20
	bl	_i2c_writel
	mov	x0, x19
	mov	x1, x20
	bl	_i2c_readl
	tst	w0, w23
	b.eq	LBB0_4
; %bb.1:
	add	x21, x24, x21
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	mov	x1, x21
	bl	_time_after
	cbnz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	mov	x0, x19
	mov	x1, x20
	bl	_i2c_readl
	tst	w0, w23
	b.ne	LBB0_2
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	w0, [x19]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
Lloh23:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	ret
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,8,3                         ; @HZ
	.comm	_I2C_MST_FIFO_CONTROL_TX_FLUSH,4,2 ; @I2C_MST_FIFO_CONTROL_TX_FLUSH
	.comm	_I2C_MST_FIFO_CONTROL_RX_FLUSH,4,2 ; @I2C_MST_FIFO_CONTROL_RX_FLUSH
	.comm	_I2C_MST_FIFO_CONTROL,4,2       ; @I2C_MST_FIFO_CONTROL
	.comm	_I2C_FIFO_CONTROL_TX_FLUSH,4,2  ; @I2C_FIFO_CONTROL_TX_FLUSH
	.comm	_I2C_FIFO_CONTROL_RX_FLUSH,4,2  ; @I2C_FIFO_CONTROL_RX_FLUSH
	.comm	_I2C_FIFO_CONTROL,4,2           ; @I2C_FIFO_CONTROL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout waiting for fifo flush\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_tegra_i2c_flush_fifos
.subsections_via_symbols
