	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_i2c_wait_for_bb_valid
_omap_i2c_wait_for_bb_valid:            ## @omap_i2c_wait_for_bb_valid
	.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
	cmpl	$0, (%rdi)
	jne	LBB0_3
## %bb.1:
	movq	%rdi, %r15
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	_OMAP_I2C_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	addq	(%r12), %r14
	movq	_OMAP_I2C_STAT_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_omap_i2c_read_reg
	movq	_OMAP_I2C_STAT_BB@GOTPCREL(%rip), %rdx
	movq	_OMAP_I2C_STAT_BF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	je	LBB0_4
LBB0_2:
	movl	$1, (%r15)
LBB0_3:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_OMAP_I2C_SYSTEST_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_omap_i2c_read_reg
	movq	_OMAP_I2C_SYSTEST_SCL_I_FUNC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_OMAP_I2C_SYSTEST_SDA_I_FUNC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rdi
	movq	_OMAP_I2C_BUS_FREE_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%rdi, %rax
	testl	%r13d, %r13d
	cmoveq	%rax, %rbx
	movq	%rbx, %rsi
	callq	_time_after
	movl	$1, %r13d
	testq	%rax, %rax
	je	LBB0_10
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r13d, %r13d
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rdi
	movq	%r14, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, %edi
	callq	_msleep
	movq	_OMAP_I2C_STAT_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_omap_i2c_read_reg
	movq	_OMAP_I2C_STAT_BF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_OMAP_I2C_STAT_BB@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	je	LBB0_5
	jmp	LBB0_2
LBB0_12:
	movl	4(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_omap_i2c_recover_bus           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_OMAP_I2C_TIMEOUT,8,3           ## @OMAP_I2C_TIMEOUT
	.comm	_OMAP_I2C_STAT_REG,4,2          ## @OMAP_I2C_STAT_REG
	.comm	_OMAP_I2C_STAT_BB,4,2           ## @OMAP_I2C_STAT_BB
	.comm	_OMAP_I2C_STAT_BF,4,2           ## @OMAP_I2C_STAT_BF
	.comm	_OMAP_I2C_SYSTEST_REG,4,2       ## @OMAP_I2C_SYSTEST_REG
	.comm	_OMAP_I2C_SYSTEST_SCL_I_FUNC,4,2 ## @OMAP_I2C_SYSTEST_SCL_I_FUNC
	.comm	_OMAP_I2C_SYSTEST_SDA_I_FUNC,4,2 ## @OMAP_I2C_SYSTEST_SDA_I_FUNC
	.comm	_OMAP_I2C_BUS_FREE_TIMEOUT,8,3  ## @OMAP_I2C_BUS_FREE_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout waiting for bus ready\n"

	.no_dead_strip	_omap_i2c_wait_for_bb_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_i2c_wait_for_bb_valid
_omap_i2c_wait_for_bb_valid:            ; @omap_i2c_wait_for_bb_valid
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0]
	cbnz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x22, _jiffies@GOTPAGE
Lloh1:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x21, [x22]
Lloh2:
	adrp	x8, _OMAP_I2C_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OMAP_I2C_TIMEOUT@GOTPAGEOFF]
Lloh4:
	ldr	x26, [x8]
Lloh5:
	adrp	x23, _OMAP_I2C_STAT_REG@GOTPAGE
Lloh6:
	ldr	x23, [x23, _OMAP_I2C_STAT_REG@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_omap_i2c_read_reg
Lloh7:
	adrp	x24, _OMAP_I2C_STAT_BB@GOTPAGE
Lloh8:
	ldr	x24, [x24, _OMAP_I2C_STAT_BB@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh9:
	adrp	x25, _OMAP_I2C_STAT_BF@GOTPAGE
Lloh10:
	ldr	x25, [x25, _OMAP_I2C_STAT_BF@GOTPAGEOFF]
	ldr	w9, [x25]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_4
LBB0_2:
	mov	w8, #1
	str	w8, [x19]
LBB0_3:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x20, #0
	mov	w28, #0
	add	x21, x26, x21
Lloh11:
	adrp	x26, _OMAP_I2C_SYSTEST_REG@GOTPAGE
Lloh12:
	ldr	x26, [x26, _OMAP_I2C_SYSTEST_REG@GOTPAGEOFF]
Lloh13:
	adrp	x27, _OMAP_I2C_SYSTEST_SCL_I_FUNC@GOTPAGE
Lloh14:
	ldr	x27, [x27, _OMAP_I2C_SYSTEST_SCL_I_FUNC@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	bl	_omap_i2c_read_reg
	ldr	w8, [x27]
	tst	w8, w0
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh15:
	adrp	x8, _OMAP_I2C_SYSTEST_SDA_I_FUNC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _OMAP_I2C_SYSTEST_SDA_I_FUNC@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x22]
Lloh18:
	adrp	x8, _OMAP_I2C_BUS_FREE_TIMEOUT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _OMAP_I2C_BUS_FREE_TIMEOUT@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	add	x8, x8, x0
	cmp	w28, #0
	csel	x20, x8, x20, eq
	mov	x1, x20
	bl	_time_after
	cbnz	x0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w28, #1
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w28, #0
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x22]
	mov	x1, x21
	bl	_time_after
	cbnz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x23]
	mov	x0, x19
	bl	_omap_i2c_read_reg
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_5
	b	LBB0_2
LBB0_12:
	ldr	w0, [x19, #4]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	mov	x0, x19
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_omap_i2c_recover_bus
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_OMAP_I2C_TIMEOUT,8,3           ; @OMAP_I2C_TIMEOUT
	.comm	_OMAP_I2C_STAT_REG,4,2          ; @OMAP_I2C_STAT_REG
	.comm	_OMAP_I2C_STAT_BB,4,2           ; @OMAP_I2C_STAT_BB
	.comm	_OMAP_I2C_STAT_BF,4,2           ; @OMAP_I2C_STAT_BF
	.comm	_OMAP_I2C_SYSTEST_REG,4,2       ; @OMAP_I2C_SYSTEST_REG
	.comm	_OMAP_I2C_SYSTEST_SCL_I_FUNC,4,2 ; @OMAP_I2C_SYSTEST_SCL_I_FUNC
	.comm	_OMAP_I2C_SYSTEST_SDA_I_FUNC,4,2 ; @OMAP_I2C_SYSTEST_SDA_I_FUNC
	.comm	_OMAP_I2C_BUS_FREE_TIMEOUT,8,3  ; @OMAP_I2C_BUS_FREE_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout waiting for bus ready\n"

	.no_dead_strip	_omap_i2c_wait_for_bb_valid
.subsections_via_symbols
