	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function st_i2c_wait_free_bus
_st_i2c_wait_free_bus:                  ## @st_i2c_wait_free_bus
	.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, %rbx
	movq	_SSC_STA@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_readl_relaxed
	movq	_SSC_STA_BUSY@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	testl	%eax, (%r12)
	je	LBB0_13
## %bb.1:
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_usleep_range
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_readl_relaxed
	testl	%eax, (%r12)
	je	LBB0_13
## %bb.2:
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_usleep_range
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_readl_relaxed
	testl	%eax, (%r12)
	je	LBB0_13
## %bb.3:
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_usleep_range
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_readl_relaxed
	testl	%eax, (%r12)
	je	LBB0_13
## %bb.4:
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_usleep_range
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_readl_relaxed
	testl	%eax, (%r12)
	je	LBB0_13
## %bb.5:
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_usleep_range
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_readl_relaxed
	testl	%eax, (%r12)
	je	LBB0_13
## %bb.6:
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_usleep_range
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_readl_relaxed
	testl	%eax, (%r12)
	je	LBB0_13
## %bb.7:
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_usleep_range
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_readl_relaxed
	testl	%eax, (%r12)
	je	LBB0_13
## %bb.8:
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_usleep_range
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_readl_relaxed
	testl	%eax, (%r12)
	je	LBB0_13
## %bb.9:
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_usleep_range
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_readl_relaxed
	testl	%eax, (%r12)
	je	LBB0_13
## %bb.10:
	movl	%eax, %r15d
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_usleep_range
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
	leaq	4(%rbx), %rdi
	callq	_i2c_recover_bus
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r14d
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_13
LBB0_12:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_13:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSC_STA,8,3                    ## @SSC_STA
	.comm	_SSC_STA_BUSY,4,2               ## @SSC_STA_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bus not free (status = 0x%08x)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to recover the bus (%d)\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_st_i2c_wait_free_bus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function st_i2c_wait_free_bus
_st_i2c_wait_free_bus:                  ; @st_i2c_wait_free_bus
	.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]
Lloh0:
	adrp	x20, _SSC_STA@GOTPAGE
Lloh1:
	ldr	x20, [x20, _SSC_STA@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh2:
	adrp	x21, _SSC_STA_BUSY@GOTPAGE
Lloh3:
	ldr	x21, [x21, _SSC_STA_BUSY@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.1:
	mov	w0, #2000
	mov	w1, #4000
	bl	_usleep_range
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.2:
	mov	w0, #2000
	mov	w1, #4000
	bl	_usleep_range
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.3:
	mov	w0, #2000
	mov	w1, #4000
	bl	_usleep_range
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.4:
	mov	w0, #2000
	mov	w1, #4000
	bl	_usleep_range
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.5:
	mov	w0, #2000
	mov	w1, #4000
	bl	_usleep_range
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.6:
	mov	w0, #2000
	mov	w1, #4000
	bl	_usleep_range
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.7:
	mov	w0, #2000
	mov	w1, #4000
	bl	_usleep_range
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.8:
	mov	w0, #2000
	mov	w1, #4000
	bl	_usleep_range
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.9:
	mov	w0, #2000
	mov	w1, #4000
	bl	_usleep_range
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.10:
	mov	x20, x0
	mov	w0, #2000
	mov	w1, #4000
	bl	_usleep_range
	mov	x21, x19
	ldr	w0, [x21], #4
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	mov	x0, x21
	bl	_i2c_recover_bus
	cbz	w0, LBB0_14
; %bb.11:
	mov	x20, x0
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_13
LBB0_12:
	mov	w20, #0
LBB0_13:
	mov	x0, 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
	ret
LBB0_14:
Lloh8:
	adrp	x8, _EBUSY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SSC_STA,8,3                    ; @SSC_STA
	.comm	_SSC_STA_BUSY,4,2               ; @SSC_STA_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bus not free (status = 0x%08x)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to recover the bus (%d)\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_st_i2c_wait_free_bus
.subsections_via_symbols
