	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tvp5150_set_vbi
_tvp5150_set_vbi:                       ## @tvp5150_set_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %ebx
	movl	%ecx, %r12d
	movl	%edx, %r13d
	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
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_14
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_14
## %bb.3:
	cmpq	$-1, (%r14)
	je	LBB0_14
## %bb.4:
	addq	$24, %r14
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	cmpq	$-1, (%r14)
	leaq	24(%r14), %r14
	je	LBB0_13
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	testl	%r13d, -16(%r14)
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	-12(%r14), %eax
	jl	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	-8(%r14), %eax
	jg	LBB0_5
## %bb.9:
	andl	$240, %r12d
	orl	%r12d, %ebx
	movq	_TVP5150_LINE_MODE_INI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	(%rcx,%rax,2), %r14d
	addl	$-12, %r14d
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	testb	$1, %r12b
	je	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_tvp5150_write
LBB0_11:
	testb	$2, %r12b
	je	LBB0_14
## %bb.12:
	incl	%r14d
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_tvp5150_write
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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,4,2      ## @TVP5150_LINE_MODE_INI
	.no_dead_strip	_tvp5150_set_vbi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tvp5150_set_vbi
_tvp5150_set_vbi:                       ; @tvp5150_set_vbi
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x5
	mov	x24, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, 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, x19
	bl	_v4l2_err
	b	LBB0_13
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, w24, #3
	tst	w9, w8
	csel	w8, w24, w10, eq
	sub	w9, w8, #28
	cmn	w9, #22
	b.lo	LBB0_13
; %bb.3:
	ldr	x9, [x23]
	cmn	x9, #1
	b.eq	LBB0_13
; %bb.4:
	mov	w9, #0
	add	x10, x23, #12
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w9, w9, #1
	ldur	x11, [x10, #12]
	add	x10, x10, #24
	cmn	x11, #1
	b.eq	LBB0_13
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w11, [x10, #-4]
	tst	w11, w22
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w11, [x10]
	cmp	w8, w11
	b.lt	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w11, [x10, #4]
	cmp	w8, w11
	b.gt	LBB0_5
; %bb.9:
	and	w10, w21, #0xf0
	orr	w21, w9, w10
Lloh8:
	adrp	x9, _TVP5150_LINE_MODE_INI@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TVP5150_LINE_MODE_INI@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	add	w8, w9, w8, lsl #1
	sub	w22, w8, #12
	tbz	w20, #0, LBB0_11
; %bb.10:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_tvp5150_write
LBB0_11:
	tbz	w20, #1, LBB0_14
; %bb.12:
	add	w1, w22, #1
	mov	x0, x19
	mov	x2, x21
	bl	_tvp5150_write
	b	LBB0_14
LBB0_13:
	mov	w21, #0
LBB0_14:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 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,4,2      ; @TVP5150_LINE_MODE_INI
	.no_dead_strip	_tvp5150_set_vbi
.subsections_via_symbols
