	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32f7_i2c_xfer
_stm32f7_i2c_xfer:                      ## @stm32f7_i2c_xfer
	.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
	movl	%edx, %r14d
	movq	%rsi, %r15
	callq	_i2c_get_adapdata
	movq	%rax, %rbx
	movq	40(%rax), %r13
	movq	%r15, 16(%rax)
	movl	%r14d, (%rax)
	movq	$0, 32(%rax)
	movl	$0, 48(%rax)
	movl	4(%rax), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_stm32f7_i2c_wait_free_bus
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_stm32f7_i2c_xfer_msg
	movq	%rbx, %rdi
	addq	$28, %rdi
	movl	24(%rbx), %esi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	52(%rbx), %r12d
	jmp	LBB0_8
LBB0_1:
	movl	%eax, %r14d
	jmp	LBB0_9
LBB0_5:
	movl	4(%rbx), %edi
	movq	16(%rbx), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.6:
	movl	(%r13), %edi
	callq	_dmaengine_terminate_all
LBB0_7:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_8:
	movl	4(%rbx), %edi
	callq	_pm_runtime_mark_last_busy
	movl	4(%rbx), %edi
	callq	_pm_runtime_put_autosuspend
	testl	%r12d, %r12d
	cmovsl	%r12d, %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Access to slave 0x%x timed out\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm32f7_i2c_xfer
_stm32f7_i2c_xfer:                      ; @stm32f7_i2c_xfer
	.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, x2
	mov	x21, x1
	bl	_i2c_get_adapdata
	mov	x20, x0
	ldr	x23, [x0, #40]
	str	x21, [x0, #16]
	str	w19, [x0]
	str	xzr, [x0, #32]
	str	wzr, [x0, #48]
	ldr	w0, [x0, #4]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_8
; %bb.1:
	mov	x0, x20
	bl	_stm32f7_i2c_wait_free_bus
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.2:
	mov	x0, x20
	mov	x1, x21
	bl	_stm32f7_i2c_xfer_msg
	add	x0, x20, #28
	ldr	w1, [x20, #24]
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w22, [x20, #52]
	b	LBB0_7
LBB0_4:
	ldr	w0, [x20, #4]
	ldr	x8, [x20, #16]
	ldr	w2, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w0, [x23]
	bl	_dmaengine_terminate_all
LBB0_6:
Lloh2:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_7:
	ldr	w0, [x20, #4]
	bl	_pm_runtime_mark_last_busy
	ldr	w0, [x20, #4]
	bl	_pm_runtime_put_autosuspend
	cmp	w22, #0
	csel	w0, w22, w19, lt
LBB0_8:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Access to slave 0x%x timed out\n"

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