	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda1997x_parse_infoframe
_tda1997x_parse_infoframe:              ## @tda1997x_parse_infoframe
	.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	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	32(%rdi), %r14
	leaq	-208(%rbp), %r15
	movq	%r14, %rdi
	movl	$160, %edx
	movq	%r15, %rcx
	callq	_io_readn
	movl	%eax, %r13d
	leaq	-224(%rbp), %rdi
	movq	%r15, %rsi
	movl	$160, %edx
	callq	_hdmi_infoframe_unpack
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	24(%r12), %rdi
	movl	-208(%rbp), %r8d
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	callq	_v4l_err
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%r15d, %eax
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_KERN_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%r12), %rsi
	leaq	-224(%rbp), %rdx
	callq	_hdmi_infoframe_log
	movl	-224(%rbp), %eax
	cmpl	$128, %eax
	je	LBB0_10
## %bb.3:
	cmpl	$129, %eax
	jne	LBB0_11
## %bb.4:
	movl	$-135, %eax
	addl	-212(%rbp), %eax
	cmpl	$6, %eax
	ja	LBB0_6
## %bb.5:
	cltq
	leaq	l_switch.table.tda1997x_parse_infoframe(%rip), %rcx
	movl	(%rcx,%rax,4), %eax
	movl	%eax, (%r12)
LBB0_6:
	movl	$-131, %eax
	addl	-216(%rbp), %eax
	cmpl	$2, %eax
	ja	LBB0_8
## %bb.7:
	shll	$2, %eax
	movl	$24, %ecx
	subl	%eax, %ecx
	movl	%ecx, 4(%r12)
LBB0_8:
	movl	-220(%rbp), %eax
	movl	%eax, 20(%r12)
	cmpl	$129, 16(%r12)
	je	LBB0_11
## %bb.9:
	movl	$129, 16(%r12)
	movq	%r14, %rdi
	movl	$129, %esi
	callq	_tda1997x_configure_audout
	movq	_RESET_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_tda1997x_hdmi_info_reset
	jmp	LBB0_11
LBB0_10:
	movq	-224(%rbp), %rax
	movq	%rax, 8(%r12)
	movq	%r12, %rdi
	callq	_set_rgb_quantization_range
	movq	_REG_PIX_REPEAT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_io_read
	movq	_PIX_REPEAT_MASK_UP_SEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	-220(%rbp), %eax
	movq	_PIX_REPEAT_CHROMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_PIX_REPEAT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edi
	movq	_HDMI_COLORSPACE_YUV422@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpl	(%rcx), %eax
	cmovel	%edi, %edx
	orl	%esi, %edx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_io_write
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_io_read
	movq	_PIX_REPEAT_MASK_REP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	orl	-224(%rbp), %edx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_io_write
	movq	%r14, %rdi
	callq	_tda1997x_configure_csc
	jmp	LBB0_11
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed parsing %d byte infoframe: 0x%04x/0x%02x\n"

	.comm	_KERN_INFO,4,2                  ## @KERN_INFO
	.comm	_RESET_AUDIO,4,2                ## @RESET_AUDIO
	.comm	_REG_PIX_REPEAT,4,2             ## @REG_PIX_REPEAT
	.comm	_PIX_REPEAT_MASK_UP_SEL,4,2     ## @PIX_REPEAT_MASK_UP_SEL
	.comm	_HDMI_COLORSPACE_YUV422,4,2     ## @HDMI_COLORSPACE_YUV422
	.comm	_PIX_REPEAT_CHROMA,4,2          ## @PIX_REPEAT_CHROMA
	.comm	_PIX_REPEAT_SHIFT,4,2           ## @PIX_REPEAT_SHIFT
	.comm	_PIX_REPEAT_MASK_REP,4,2        ## @PIX_REPEAT_MASK_REP
	.no_dead_strip	_tda1997x_parse_infoframe
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.tda1997x_parse_infoframe
l_switch.table.tda1997x_parse_infoframe:
	.long	96000                           ## 0x17700
	.long	88200                           ## 0x15888
	.long	48000                           ## 0xbb80
	.long	44100                           ## 0xac44
	.long	32000                           ## 0x7d00
	.long	192000                          ## 0x2ee00
	.long	176400                          ## 0x2b110

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda1997x_parse_infoframe
_tda1997x_parse_infoframe:              ; @tda1997x_parse_infoframe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #256
	.cfi_def_cfa_offset 256
	stp	x24, x23, [sp, #192]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #208]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #224]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #240]            ; 16-byte Folded Spill
	add	x29, sp, #240
	.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	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	add	x20, x0, #32
	add	x3, sp, #24
	mov	x0, x20
	mov	w2, #160
	bl	_io_readn
	mov	x23, x0
	add	x0, sp, #8
	add	x1, sp, #24
	mov	w2, #160
	bl	_hdmi_infoframe_unpack
	mov	x19, x0
	cbz	w0, LBB0_4
; %bb.1:
	ldr	x0, [x21, #24]
	ldr	w4, [sp, #24]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	x3, x22
	bl	_v4l_err
LBB0_2:
	ldur	x8, [x29, #-56]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.3:
	mov	x0, x19
	ldp	x29, x30, [sp, #240]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #224]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #208]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #192]            ; 16-byte Folded Reload
	add	sp, sp, #256
	ret
LBB0_4:
Lloh8:
	adrp	x8, _KERN_INFO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _KERN_INFO@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	x1, [x21, #24]
	add	x2, sp, #8
	bl	_hdmi_infoframe_log
	ldr	w8, [sp, #8]
	cmp	w8, #128
	b.eq	LBB0_12
; %bb.5:
	cmp	w8, #129
	b.ne	LBB0_2
; %bb.6:
	ldr	w8, [sp, #20]
	sub	w8, w8, #135
	cmp	w8, #6
	b.hi	LBB0_8
; %bb.7:
Lloh11:
	adrp	x9, l_switch.table.tda1997x_parse_infoframe@PAGE
Lloh12:
	add	x9, x9, l_switch.table.tda1997x_parse_infoframe@PAGEOFF
	ldr	w8, [x9, w8, sxtw #2]
	str	w8, [x21]
LBB0_8:
	ldr	w8, [sp, #16]
	sub	w8, w8, #131
	cmp	w8, #2
	b.hi	LBB0_10
; %bb.9:
	mov	w9, #24
	sub	w8, w9, w8, lsl #2
	str	w8, [x21, #4]
LBB0_10:
	ldr	w8, [sp, #12]
	str	w8, [x21, #20]
	ldr	w8, [x21, #16]
	cmp	w8, #129
	b.eq	LBB0_2
; %bb.11:
	mov	w8, #129
	str	w8, [x21, #16]
	mov	x0, x20
	mov	w1, #129
	bl	_tda1997x_configure_audout
Lloh13:
	adrp	x8, _RESET_AUDIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RESET_AUDIO@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_tda1997x_hdmi_info_reset
	b	LBB0_2
LBB0_12:
	ldr	x8, [sp, #8]
	str	x8, [x21, #8]
	mov	x0, x21
	bl	_set_rgb_quantization_range
Lloh16:
	adrp	x21, _REG_PIX_REPEAT@GOTPAGE
Lloh17:
	ldr	x21, [x21, _REG_PIX_REPEAT@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_io_read
Lloh18:
	adrp	x8, _PIX_REPEAT_MASK_UP_SEL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PIX_REPEAT_MASK_UP_SEL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	bic	w8, w0, w8
	ldr	w9, [sp, #12]
Lloh21:
	adrp	x10, _HDMI_COLORSPACE_YUV422@GOTPAGE
Lloh22:
	ldr	x10, [x10, _HDMI_COLORSPACE_YUV422@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
Lloh24:
	adrp	x11, _PIX_REPEAT_CHROMA@GOTPAGE
Lloh25:
	ldr	x11, [x11, _PIX_REPEAT_CHROMA@GOTPAGEOFF]
Lloh26:
	ldr	w11, [x11]
Lloh27:
	adrp	x12, _PIX_REPEAT_SHIFT@GOTPAGE
Lloh28:
	ldr	x12, [x12, _PIX_REPEAT_SHIFT@GOTPAGEOFF]
Lloh29:
	ldr	w12, [x12]
	lsl	w11, w11, w12
	cmp	w9, w10
	csel	w9, w11, wzr, eq
	orr	w2, w9, w8
	ldr	w1, [x21]
	mov	x0, x20
	bl	_io_write
	ldr	w1, [x21]
	mov	x0, x20
	bl	_io_read
Lloh30:
	adrp	x8, _PIX_REPEAT_MASK_REP@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PIX_REPEAT_MASK_REP@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	bic	w8, w0, w8
	ldr	w9, [sp, #8]
	orr	w2, w8, w9
	ldr	w1, [x21]
	mov	x0, x20
	bl	_io_write
	mov	x0, x20
	bl	_tda1997x_configure_csc
	b	LBB0_2
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed parsing %d byte infoframe: 0x%04x/0x%02x\n"

	.comm	_KERN_INFO,4,2                  ; @KERN_INFO
	.comm	_RESET_AUDIO,4,2                ; @RESET_AUDIO
	.comm	_REG_PIX_REPEAT,4,2             ; @REG_PIX_REPEAT
	.comm	_PIX_REPEAT_MASK_UP_SEL,4,2     ; @PIX_REPEAT_MASK_UP_SEL
	.comm	_HDMI_COLORSPACE_YUV422,4,2     ; @HDMI_COLORSPACE_YUV422
	.comm	_PIX_REPEAT_CHROMA,4,2          ; @PIX_REPEAT_CHROMA
	.comm	_PIX_REPEAT_SHIFT,4,2           ; @PIX_REPEAT_SHIFT
	.comm	_PIX_REPEAT_MASK_REP,4,2        ; @PIX_REPEAT_MASK_REP
	.no_dead_strip	_tda1997x_parse_infoframe
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.tda1997x_parse_infoframe
l_switch.table.tda1997x_parse_infoframe:
	.long	96000                           ; 0x17700
	.long	88200                           ; 0x15888
	.long	48000                           ; 0xbb80
	.long	44100                           ; 0xac44
	.long	32000                           ; 0x7d00
	.long	192000                          ; 0x2ee00
	.long	176400                          ; 0x2b110

.subsections_via_symbols
