	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tea5767_autodetection          ## -- Begin function tea5767_autodetection
	.p2align	4, 0x90
_tea5767_autodetection:                 ## @tea5767_autodetection
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movl	%esi, -32(%rbp)
	movq	%rdi, -24(%rbp)
	movl	$-1, -13(%rbp)
	movl	$-1, -16(%rbp)
	leaq	-32(%rbp), %rdi
	leaq	-16(%rbp), %rsi
	movl	$7, %edx
	callq	_tuner_i2c_xfer_recv
	cmpl	$4, %eax
	jg	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_warn
	jmp	LBB0_10
LBB0_2:
	movb	-16(%rbp), %dl
	movb	-13(%rbp), %al
	movb	-12(%rbp), %cl
	cmpb	-15(%rbp), %dl
	jne	LBB0_7
## %bb.3:
	cmpb	-14(%rbp), %dl
	jne	LBB0_7
## %bb.4:
	cmpb	%al, %dl
	jne	LBB0_7
## %bb.5:
	cmpb	%cl, %dl
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_9
LBB0_7:
	andb	$15, %al
	xorl	%ebx, %ebx
	orb	%cl, %al
	je	LBB0_11
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
LBB0_9:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_warn
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"It is not a TEA5767. Received %i bytes.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"All bytes are equal. It is not a TEA5767\n"

L_.str.2:                               ## @.str.2
	.asciz	"Chip ID is not zero. It is not a TEA5767\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tea5767_autodetection          ; -- Begin function tea5767_autodetection
	.p2align	2
_tea5767_autodetection:                 ; @tea5767_autodetection
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	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
	str	w1, [sp, #16]
	str	x0, [sp, #24]
	mov	w8, #-1
	stur	w8, [sp, #11]
	str	w8, [sp, #8]
	add	x0, sp, #16
	add	x1, sp, #8
	mov	w2, #7
	bl	_tuner_i2c_xfer_recv
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, #4
	b.gt	LBB0_2
; %bb.1:
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_2:
	ldrb	w10, [sp, #8]
	ldrb	w11, [sp, #9]
	ldrb	w12, [sp, #10]
	ldrb	w8, [sp, #11]
	ldrb	w9, [sp, #12]
	cmp	w10, w11
	ccmp	w10, w12, #0, eq
	ccmp	w10, w8, #0, eq
	ccmp	w10, w9, #0, eq
	b.eq	LBB0_5
; %bb.3:
	and	w8, w8, #0xf
	orr	w8, w8, w9
	cbz	w8, LBB0_8
; %bb.4:
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_pr_warn
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
	mov	w0, #0
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"It is not a TEA5767. Received %i bytes.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"All bytes are equal. It is not a TEA5767\n"

l_.str.2:                               ; @.str.2
	.asciz	"Chip ID is not zero. It is not a TEA5767\n"

.subsections_via_symbols
