	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32f7_i2c_wait_free_bus
_stm32f7_i2c_wait_free_bus:             ## @stm32f7_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_STM32F7_I2C_ISR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r14), %rdi
	movl	$1, %edx
	movl	$10, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	callq	_readl_relaxed_poll_timeout
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	leaq	4(%r14), %rdi
	callq	_stm32f7_i2c_release_bus
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STM32F7_I2C_ISR,8,3            ## @STM32F7_I2C_ISR
	.comm	_STM32F7_I2C_ISR_BUSY,4,2       ## @STM32F7_I2C_ISR_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bus busy\n"

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

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_stm32f7_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 stm32f7_i2c_wait_free_bus
_stm32f7_i2c_wait_free_bus:             ; @stm32f7_i2c_wait_free_bus
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _STM32F7_I2C_ISR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STM32F7_I2C_ISR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	mov	w2, #1
	mov	w3, #10
	mov	w4, #1000
	bl	_readl_relaxed_poll_timeout
	cbz	w0, LBB0_3
; %bb.1:
	mov	x20, x19
	ldr	w0, [x20], #4
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	mov	x0, x20
	bl	_stm32f7_i2c_release_bus
	cbz	w0, LBB0_4
; %bb.2:
	mov	x20, x0
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_5
LBB0_3:
	mov	w20, #0
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_STM32F7_I2C_ISR,8,3            ; @STM32F7_I2C_ISR
	.comm	_STM32F7_I2C_ISR_BUSY,4,2       ; @STM32F7_I2C_ISR_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bus busy\n"

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

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