	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32f7_i2c_smbus_check_pec
_stm32f7_i2c_smbus_check_pec:           ## @stm32f7_i2c_smbus_check_pec
	.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_PECR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r14), %rdi
	callq	_readl_relaxed
	movl	16(%r14), %ecx
	addl	$-128, %ecx
	cmpl	$5, %ecx
	ja	LBB0_5
## %bb.1:
	movl	$3, %edx
	btl	%ecx, %edx
	jb	LBB0_6
## %bb.2:
	movl	$12, %edx
	btl	%ecx, %edx
	jae	LBB0_4
## %bb.3:
	movq	24(%r14), %rcx
	addq	$8, %rcx
	jmp	LBB0_7
LBB0_6:
	movq	24(%r14), %rcx
	addq	$16, %rcx
	jmp	LBB0_7
LBB0_4:
	movq	24(%r14), %rcx
	movq	(%rcx), %rdx
	leaq	(%rcx,%rdx,8), %rcx
LBB0_7:
	movq	(%rcx), %rcx
	xorl	%ebx, %ebx
	cmpq	%rcx, %rax
	je	LBB0_10
## %bb.8:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EBADMSG@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_5:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STM32F7_I2C_PECR,8,3           ## @STM32F7_I2C_PECR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported smbus protocol for PEC\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Bad PEC 0x%02x vs. 0x%02x\n"

	.comm	_EBADMSG,4,2                    ## @EBADMSG
	.no_dead_strip	_stm32f7_i2c_smbus_check_pec
.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_check_pec
_stm32f7_i2c_smbus_check_pec:           ; @stm32f7_i2c_smbus_check_pec
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _STM32F7_I2C_PECR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STM32F7_I2C_PECR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	w8, [x19, #16]
	sub	w8, w8, #128
	cmp	w8, #5
	b.hi	LBB0_9
; %bb.1:
	mov	w9, #1
	lsl	w8, w9, w8
	tst	w8, #0x3
	b.ne	LBB0_4
; %bb.2:
	tst	w8, #0xc
	b.eq	LBB0_5
; %bb.3:
	ldr	x8, [x19, #24]
	add	x8, x8, #8
	b	LBB0_6
LBB0_4:
	ldr	x8, [x19, #24]
	add	x8, x8, #16
	b	LBB0_6
LBB0_5:
	ldr	x8, [x19, #24]
	ldr	x9, [x8]
	add	x8, x8, x9, lsl #3
LBB0_6:
	ldr	x9, [x8]
	cmp	x0, x9
	b.ne	LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_11
LBB0_8:
	ldr	w8, [x19]
	stp	x0, x9, [sp]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_dev_err
Lloh5:
	adrp	x8, _EBADMSG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBADMSG@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
	ldr	w0, [x19]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_STM32F7_I2C_PECR,8,3           ; @STM32F7_I2C_PECR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported smbus protocol for PEC\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Bad PEC 0x%02x vs. 0x%02x\n"

	.comm	_EBADMSG,4,2                    ; @EBADMSG
	.no_dead_strip	_stm32f7_i2c_smbus_check_pec
.subsections_via_symbols
