	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32f7_i2c_smbus_xfer
_stm32f7_i2c_smbus_xfer:                ## @stm32f7_i2c_smbus_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %ebx
	movl	%r8d, %r14d
	movl	%ecx, %r15d
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, %r13d
	callq	_i2c_get_adapdata
	movq	%rax, %r12
	movq	16(%rax), %rdi
	movq	24(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, 56(%r12)
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, 32(%r12)
	movb	%r15b, 36(%r12)
	movl	$1, 40(%r12)
	movq	%rdi, %rbx
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	callq	_stm32f7_i2c_wait_free_bus
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_27
## %bb.3:
	movq	16(%rbp), %rcx
	movzwl	-48(%rbp), %esi                 ## 2-byte Folded Reload
	movq	%r12, %rdi
	movl	%r14d, %edx
	movq	%rcx, %r14
	callq	_stm32f7_i2c_smbus_xfer_msg
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_27
## %bb.4:
	movq	%r12, %rdi
	addq	$12, %rdi
	movl	8(%r12), %esi
	callq	_wait_for_completion_timeout
	movl	44(%r12), %r13d
	testl	%r13d, %r13d
	je	LBB0_5
LBB0_27:
	movq	%rbx, %rdi
	callq	_pm_runtime_mark_last_busy
	movq	%rbx, %rdi
	callq	_pm_runtime_put_autosuspend
	jmp	LBB0_28
LBB0_1:
	movl	%eax, %r13d
LBB0_28:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	testq	%rax, %rax
	je	LBB0_6
## %bb.9:
	movq	_I2C_CLIENT_PEC@GOTPCREL(%rip), %rcx
	movq	_I2C_SMBUS_QUICK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %eax
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	testw	%dx, (%rcx)
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	je	LBB0_14
## %bb.10:
	testb	%r15b, %r15b
	je	LBB0_14
## %bb.11:
	cmpl	%ecx, %eax
	je	LBB0_14
## %bb.12:
	movq	%rsi, %r15
	movq	%r12, %rdi
	callq	_stm32f7_i2c_smbus_check_pec
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_27
## %bb.13:
	xorl	%r13d, %r13d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, (%r15)
	je	LBB0_27
	jmp	LBB0_16
LBB0_14:
	xorl	%r13d, %r13d
	testb	%r15b, %r15b
	je	LBB0_27
## %bb.15:
	cmpl	%ecx, %eax
	je	LBB0_27
LBB0_16:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	addl	$-128, %ecx
	cmpl	$5, %ecx
	ja	LBB0_25
## %bb.17:
	movl	$3, %eax
	btl	%ecx, %eax
	jb	LBB0_20
## %bb.18:
	movl	$12, %eax
	btl	%ecx, %eax
	jae	LBB0_21
## %bb.19:
	movq	48(%r12), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%r13d, %r13d
	jmp	LBB0_27
LBB0_6:
	movl	56(%r12), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_dbg
	cmpq	$0, (%r12)
	je	LBB0_8
## %bb.7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_dmaengine_terminate_all
LBB0_8:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
LBB0_26:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_27
LBB0_20:
	movq	48(%r12), %rax
	movl	4(%rax), %ecx
	shll	$8, %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r14)
	xorl	%r13d, %r13d
	jmp	LBB0_27
LBB0_21:
	movq	48(%r12), %rax
	movl	(%rax), %ecx
	xorl	%r13d, %r13d
	testl	%ecx, %ecx
	js	LBB0_27
## %bb.22:
	movq	(%r14), %rdx
	movl	%ecx, (%rdx)
	cmpl	$0, (%rax)
	jle	LBB0_27
## %bb.23:
	xorl	%r13d, %r13d
	xorl	%ecx, %ecx
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%rax,%rcx,4), %edx
	movq	(%r14), %rsi
	movl	%edx, 4(%rsi,%rcx,4)
	leaq	1(%rcx), %rdx
	movslq	(%rax), %rsi
	movq	%rdx, %rcx
	cmpq	%rsi, %rdx
	jl	LBB0_24
	jmp	LBB0_27
LBB0_25:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_26
	.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
	.comm	_I2C_CLIENT_PEC,2,1             ## @I2C_CLIENT_PEC
	.comm	_I2C_SMBUS_QUICK,4,2            ## @I2C_SMBUS_QUICK
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported smbus transaction\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_stm32f7_i2c_smbus_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_smbus_xfer
_stm32f7_i2c_smbus_xfer:                ; @stm32f7_i2c_smbus_xfer
	.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
	mov	x20, x6
	mov	x22, x5
	mov	x26, x4
	mov	x24, x3
	mov	x25, x2
	mov	x23, x1
	bl	_i2c_get_adapdata
	mov	x21, x0
	ldp	x19, x27, [x0, #16]
	str	w23, [x0, #56]
	str	w22, [x0, #32]
	strb	w24, [x0, #36]
	mov	w8, #1
	str	w8, [x0, #40]
	mov	x0, x19
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_5
; %bb.1:
	mov	x0, x21
	bl	_stm32f7_i2c_wait_free_bus
	mov	x23, x0
	cbnz	w0, LBB0_4
; %bb.2:
	mov	x0, x21
	mov	x1, x25
	mov	x2, x26
	mov	x3, x20
	bl	_stm32f7_i2c_smbus_xfer_msg
	mov	x23, x0
	cbnz	w0, LBB0_4
; %bb.3:
	add	x0, x21, #12
	ldr	w1, [x21, #8]
	bl	_wait_for_completion_timeout
	ldr	w23, [x21, #44]
	cbz	w23, LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_pm_runtime_mark_last_busy
	mov	x0, x19
	bl	_pm_runtime_put_autosuspend
	b	LBB0_6
LBB0_5:
	mov	x23, x0
LBB0_6:
	mov	x0, x23
	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_7:
	cbz	x0, LBB0_15
; %bb.8:
Lloh0:
	adrp	x8, _I2C_CLIENT_PEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_CLIENT_PEC@GOTPAGEOFF]
	ldrh	w8, [x8]
	and	w9, w8, w25
Lloh2:
	adrp	x25, _I2C_SMBUS_QUICK@GOTPAGE
Lloh3:
	ldr	x25, [x25, _I2C_SMBUS_QUICK@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w9, #0
	ccmp	w24, #0, #4, ne
	ccmp	w8, w22, #4, ne
	b.ne	LBB0_19
; %bb.9:
	mov	w23, #0
	cbz	w24, LBB0_4
; %bb.10:
	cmp	w8, w22
	b.eq	LBB0_4
LBB0_11:
	sub	w8, w22, #128
	cmp	w8, #5
	b.hi	LBB0_27
; %bb.12:
	mov	w9, #1
	lsl	w8, w9, w8
	tst	w8, #0x3
	b.ne	LBB0_21
; %bb.13:
	tst	w8, #0xc
	b.eq	LBB0_22
; %bb.14:
	mov	w23, #0
	ldr	x8, [x21, #48]
	ldr	w8, [x8]
	str	w8, [x20]
	b	LBB0_4
LBB0_15:
	ldr	w2, [x21, #56]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	x8, [x21]
	cbz	x8, LBB0_17
; %bb.16:
	ldr	w0, [x27]
	bl	_dmaengine_terminate_all
LBB0_17:
Lloh6:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_4
LBB0_19:
	mov	x0, x21
	bl	_stm32f7_i2c_smbus_check_pec
	mov	x23, x0
	cbnz	w0, LBB0_4
; %bb.20:
	ldr	w8, [x25]
	cmp	w8, w22
	b.ne	LBB0_11
	b	LBB0_26
LBB0_21:
	mov	w23, #0
	ldr	x8, [x21, #48]
	ldp	w9, w8, [x8]
	orr	w8, w9, w8, lsl #8
	str	w8, [x20]
	b	LBB0_4
LBB0_22:
	ldr	x8, [x21, #48]
	ldr	w9, [x8]
	tbnz	w9, #31, LBB0_26
; %bb.23:
	ldr	x10, [x20]
	str	w9, [x10]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_26
; %bb.24:
	mov	w9, #1
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	mov	w23, #0
	lsl	x10, x9, #2
	ldr	w11, [x8, x10]
	ldr	x12, [x20]
	str	w11, [x12, x10]
	ldrsw	x10, [x8]
	add	x11, x9, #1
	cmp	x9, x10
	mov	x9, x11
	b.lt	LBB0_25
	b	LBB0_4
LBB0_26:
	mov	w23, #0
	b	LBB0_4
LBB0_27:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_18
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.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
	.comm	_I2C_CLIENT_PEC,2,1             ; @I2C_CLIENT_PEC
	.comm	_I2C_SMBUS_QUICK,4,2            ; @I2C_SMBUS_QUICK
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported smbus transaction\n"

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