	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32f7_i2c_get_free_slave_id
_stm32f7_i2c_get_free_slave_id:         ## @stm32f7_i2c_get_free_slave_id
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rdi, %r8
	movq	8(%rdi), %rdi
	movq	_STM32F7_I2C_MAX_SLAVE@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	testl	%r10d, %r10d
	jle	LBB0_7
## %bb.1:
	movq	_I2C_CLIENT_PEC@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorl	%eax, %eax
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r8), %rcx
	cmpl	$0, (%rcx,%rax,4)
	je	LBB0_5
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	cmpq	%rax, %r10
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$1, %rax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r9d, (%rsi)
	jne	LBB0_6
	jmp	LBB0_4
LBB0_7:
	movl	4(%rsi), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_5:
	movl	%eax, (%rdx)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STM32F7_I2C_MAX_SLAVE,4,2      ## @STM32F7_I2C_MAX_SLAVE
	.comm	_I2C_CLIENT_PEC,4,2             ## @I2C_CLIENT_PEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Slave 0x%x could not be registered\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_stm32f7_i2c_get_free_slave_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm32f7_i2c_get_free_slave_id
_stm32f7_i2c_get_free_slave_id:         ; @stm32f7_i2c_get_free_slave_id
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x8, x0
	ldr	x0, [x0, #8]
Lloh0:
	adrp	x9, _STM32F7_I2C_MAX_SLAVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STM32F7_I2C_MAX_SLAVE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x10, #0
Lloh3:
	adrp	x11, _I2C_CLIENT_PEC@GOTPAGE
Lloh4:
	ldr	x11, [x11, _I2C_CLIENT_PEC@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x12, [x8]
	ldr	w12, [x12, x10, lsl #2]
	cbz	w12, LBB0_7
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #1
	cmp	x9, x10
	b.eq	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x10, #1
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w12, [x1]
	tst	w11, w12
	b.ne	LBB0_3
	b	LBB0_2
LBB0_6:
	ldr	w2, [x1, #4]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	w0, #0
	str	w10, [x2]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_STM32F7_I2C_MAX_SLAVE,4,2      ; @STM32F7_I2C_MAX_SLAVE
	.comm	_I2C_CLIENT_PEC,4,2             ; @I2C_CLIENT_PEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Slave 0x%x could not be registered\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_stm32f7_i2c_get_free_slave_id
.subsections_via_symbols
