	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tvp5150_get_vbi
_tvp5150_get_vbi:                       ## @tvp5150_get_vbi
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_to_tvp5150
	movl	(%rax), %ecx
	movq	_V4L2_STD_ALL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_v4l2_err
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_2:
	movq	_V4L2_STD_625_50@GOTPCREL(%rip), %rdx
	leal	3(%rbx), %eax
	testl	%ecx, (%rdx)
	cmovel	%ebx, %eax
	leal	-28(%rax), %ecx
	xorl	%ebx, %ebx
	cmpl	$-22, %ecx
	jb	LBB0_7
## %bb.3:
	leal	(%rax,%rax), %r12d
	addl	$-12, %r12d
	movq	_TVP5150_LINE_MODE_INI@GOTPCREL(%rip), %rax
	addq	(%rax), %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_tvp5150_read
	andl	$15, %eax
	xorl	%ebx, %ebx
	cmpl	$15, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %eax
	movl	(%r14,%rax,4), %ebx
LBB0_5:
	incq	%r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_tvp5150_read
	andl	$15, %eax
	cmpl	$15, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %eax
	orl	(%r14,%rax,4), %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_STD_ALL,4,2               ## @V4L2_STD_ALL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VBI can't be configured without knowing number of lines\n"

	.comm	_V4L2_STD_625_50,4,2            ## @V4L2_STD_625_50
	.comm	_TVP5150_LINE_MODE_INI,8,3      ## @TVP5150_LINE_MODE_INI
	.no_dead_strip	_tvp5150_get_vbi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tvp5150_get_vbi
_tvp5150_get_vbi:                       ; @tvp5150_get_vbi
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_to_tvp5150
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _V4L2_STD_ALL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_STD_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_v4l2_err
	mov	w21, #0
	b	LBB0_9
LBB0_2:
Lloh5:
	adrp	x9, _V4L2_STD_625_50@GOTPAGE
Lloh6:
	ldr	x9, [x9, _V4L2_STD_625_50@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	add	w10, w21, #3
	tst	w9, w8
	csel	w8, w21, w10, eq
	sub	w9, w8, #28
	cmn	w9, #22
	b.hs	LBB0_4
; %bb.3:
	mov	w21, #0
	b	LBB0_9
LBB0_4:
	lsl	w8, w8, #1
	sub	w8, w8, #12
Lloh8:
	adrp	x9, _TVP5150_LINE_MODE_INI@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TVP5150_LINE_MODE_INI@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x22, x9, x8
	mov	x0, x20
	mov	x1, x22
	bl	_tvp5150_read
	and	w8, w0, #0xf
	cmp	w8, #15
	b.ne	LBB0_6
; %bb.5:
	mov	w21, #0
	b	LBB0_7
LBB0_6:
	ldr	w21, [x19, w8, uxtw #2]
LBB0_7:
	add	x1, x22, #1
	mov	x0, x20
	bl	_tvp5150_read
	and	w8, w0, #0xf
	cmp	w8, #15
	b.eq	LBB0_9
; %bb.8:
	ldr	w8, [x19, w8, uxtw #2]
	orr	w21, w8, w21
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_STD_ALL,4,2               ; @V4L2_STD_ALL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VBI can't be configured without knowing number of lines\n"

	.comm	_V4L2_STD_625_50,4,2            ; @V4L2_STD_625_50
	.comm	_TVP5150_LINE_MODE_INI,8,3      ; @TVP5150_LINE_MODE_INI
	.no_dead_strip	_tvp5150_get_vbi
.subsections_via_symbols
