	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avermedia_eeprom
_avermedia_eeprom:                      ## @avermedia_eeprom
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_eeprom_data@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	260(%rax), %r15d
	movl	264(%rax), %esi
	movl	%r15d, %ecx
	andl	$7, %ecx
	movl	%esi, %edx
	shrl	$4, %edx
	andl	$15, %edx
	andl	$1, %esi
	movl	%esi, (%rdi)
	xorl	%ebx, %ebx
	testb	$5, %r15b
	jne	LBB0_3
## %bb.1:
	cmpl	$10, %edx
	ja	LBB0_3
## %bb.2:
	movq	_tuner_0_table@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rsi,%rdx,4), %ebx
LBB0_3:
	cmpl	$1, %ecx
	jne	LBB0_6
## %bb.4:
	cmpl	$9, %edx
	ja	LBB0_6
## %bb.5:
	movq	_tuner_1_table@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	%edx, %edi
	movl	(%rsi,%rdi,4), %ebx
LBB0_6:
	xorl	$4, %ecx
	xorl	$9, %edx
	orl	%ecx, %edx
	jne	LBB0_8
## %bb.7:
	movq	_TUNER_LG_NTSC_NEW_TAPC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_8:
	movl	8(%r14), %esi
	movl	260(%rax), %edx
	movl	264(%rax), %ecx
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.9:
	movl	%ebx, 4(%r14)
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_cont
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_cont
LBB0_11:
	testb	$24, %r15b
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.4(%rip), %rdx
	movq	%rdx, %rsi
	cmoveq	%rax, %rsi
	cmpl	$0, (%r14)
	cmoveq	%rax, %rdx
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_cont                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_eeprom_data,8,3                ## @eeprom_data
	.comm	_tuner_0_table,8,3              ## @tuner_0_table
	.comm	_tuner_1_table,8,3              ## @tuner_1_table
	.comm	_TUNER_LG_NTSC_NEW_TAPC,4,2     ## @TUNER_LG_NTSC_NEW_TAPC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d: Avermedia eeprom[0x%02x%02x]: tuner="

L_.str.1:                               ## @.str.1
	.asciz	"%d"

L_.str.2:                               ## @.str.2
	.asciz	"Unknown type"

L_.str.3:                               ## @.str.3
	.asciz	" radio:%s remote control:%s\n"

L_.str.4:                               ## @.str.4
	.asciz	"yes"

L_.str.5:                               ## @.str.5
	.asciz	"no"

	.no_dead_strip	_avermedia_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avermedia_eeprom
_avermedia_eeprom:                      ; @avermedia_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _eeprom_data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _eeprom_data@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w20, [x8, #260]
	and	w9, w20, #0x7
	ldr	w11, [x8, #264]
	ubfx	x10, x11, #4, #4
	and	w11, w11, #0x1
	str	w11, [x0]
	mov	w11, #5
	and	w11, w20, w11
	cmp	w11, #0
	ccmp	w10, #10, #2, eq
	b.ls	LBB0_2
; %bb.1:
	mov	w11, #0
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x11, _tuner_0_table@GOTPAGE
Lloh4:
	ldr	x11, [x11, _tuner_0_table@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	ldr	w11, [x11, x10, lsl #2]
LBB0_3:
	cmp	w9, #1
	ccmp	w10, #9, #2, eq
	b.hi	LBB0_5
; %bb.4:
Lloh6:
	adrp	x11, _tuner_1_table@GOTPAGE
Lloh7:
	ldr	x11, [x11, _tuner_1_table@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	ldr	w11, [x11, w10, uxtw #2]
LBB0_5:
	cmp	w10, #9
Lloh9:
	adrp	x10, _TUNER_LG_NTSC_NEW_TAPC@GOTPAGE
Lloh10:
	ldr	x10, [x10, _TUNER_LG_NTSC_NEW_TAPC@GOTPAGEOFF]
	ccmp	w9, #4, #0, eq
Lloh11:
	ldr	w9, [x10]
	csel	w21, w9, w11, eq
	ldr	w1, [x19, #8]
	ldr	w2, [x8, #260]
	ldr	w3, [x8, #264]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	cbz	w21, LBB0_7
; %bb.6:
	str	w21, [x19, #4]
	str	x21, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_8:
	bl	_pr_cont
Lloh18:
	adrp	x8, l_.str.4@PAGE
Lloh19:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh20:
	adrp	x9, l_.str.5@PAGE
Lloh21:
	add	x9, x9, l_.str.5@PAGEOFF
	tst	w20, #0x18
	csel	x10, x9, x8, eq
	ldr	w11, [x19]
	cmp	w11, #0
	csel	x8, x9, x8, eq
	stp	x10, x8, [sp]
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_cont
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_eeprom_data,8,3                ; @eeprom_data
	.comm	_tuner_0_table,8,3              ; @tuner_0_table
	.comm	_tuner_1_table,8,3              ; @tuner_1_table
	.comm	_TUNER_LG_NTSC_NEW_TAPC,4,2     ; @TUNER_LG_NTSC_NEW_TAPC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d: Avermedia eeprom[0x%02x%02x]: tuner="

l_.str.1:                               ; @.str.1
	.asciz	"%d"

l_.str.2:                               ; @.str.2
	.asciz	"Unknown type"

l_.str.3:                               ; @.str.3
	.asciz	" radio:%s remote control:%s\n"

l_.str.4:                               ; @.str.4
	.asciz	"yes"

l_.str.5:                               ; @.str.5
	.asciz	"no"

	.no_dead_strip	_avermedia_eeprom
.subsections_via_symbols
