	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movl	%ecx, %ebx
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %r14
	callq	_to_tvp5150
	movl	(%rax), %edx
	movq	_V4L2_STD_ALL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	jne	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_2:
	movq	_V4L2_STD_625_50@GOTPCREL(%rip), %rcx
	leal	3(%rbx), %r14d
	testl	%edx, (%rcx)
	cmovel	%ebx, %r14d
	leal	-28(%r14), %ecx
	xorl	%ebx, %ebx
	cmpl	$-22, %ecx
	jb	LBB0_16
## %bb.3:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movq	_vbi_ram_default@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_4
## %bb.5:
	xorl	%r12d, %r12d
	movl	$8, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	incl	%r15d
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%r12
	callq	_ARRAY_SIZE
	cltq
	addq	$12, %rbx
	cmpq	%rax, %r12
	jge	LBB0_12
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	_vbi_ram_default@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	-8(%rdi,%rbx), %eax
	testl	%eax, %eax
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	testl	%r13d, %eax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	-4(%rdi,%rbx), %r14d
	jl	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	(%rdi,%rbx), %r14d
	jg	LBB0_10
	jmp	LBB0_12
LBB0_4:
	xorl	%r15d, %r15d
LBB0_12:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	andl	$240, %ebx
	orl	%r15d, %ebx
	movq	_TVP5150_LINE_MODE_INI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%r14,2), %r15d
	addl	$-12, %r15d
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	testb	$1, %r14b
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_14
## %bb.13:
	movl	4(%r12), %edi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_regmap_write
LBB0_14:
	testb	$2, %r14b
	je	LBB0_16
## %bb.15:
	movl	4(%r12), %edi
	incl	%r15d
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_regmap_write
LBB0_16:
	movl	%ebx, %eax
	addq	$24, %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	_vbi_ram_default,8,3            ## @vbi_ram_default
	.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	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x23, x3
	mov	x21, x2
	mov	x22, x1
	mov	x24, 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:
	ldr	w0, [x24]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	w21, #0
	b	LBB0_17
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, w23, #3
	tst	w9, w8
	csel	w23, w23, w10, eq
	sub	w8, w23, #28
	cmn	w8, #22
	b.hs	LBB0_4
; %bb.3:
	mov	w21, #0
	b	LBB0_17
LBB0_4:
	mov	x20, x0
Lloh8:
	adrp	x24, _vbi_ram_default@GOTPAGE
Lloh9:
	ldr	x24, [x24, _vbi_ram_default@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.5:
	mov	x26, #0
	mov	x27, #0
	mov	w25, #0
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w25, w25, #1
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x27, x27, #1
	bl	_ARRAY_SIZE
	add	x26, x26, #12
	cmp	x27, w0, sxtw
	b.ge	LBB0_13
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	ldr	w8, [x0, x26]
	cbz	w8, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	tst	w8, w22
	b.eq	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x8, x0, x26
	ldr	w9, [x8, #4]
	cmp	w23, w9
	b.lt	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x8, #8]
	cmp	w23, w8
	b.gt	LBB0_6
	b	LBB0_13
LBB0_12:
	mov	w25, #0
LBB0_13:
	and	w8, w21, #0xf0
	orr	w21, w25, w8
Lloh10:
	adrp	x8, _TVP5150_LINE_MODE_INI@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TVP5150_LINE_MODE_INI@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	add	w8, w8, w23, lsl #1
	sub	w22, w8, #12
	tbz	w19, #0, LBB0_15
; %bb.14:
	ldr	w0, [x20, #4]
	mov	x1, x22
	mov	x2, x21
	bl	_regmap_write
LBB0_15:
	tbz	w19, #1, LBB0_17
; %bb.16:
	ldr	w0, [x20, #4]
	add	w1, w22, #1
	mov	x2, x21
	bl	_regmap_write
LBB0_17:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.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	_vbi_ram_default,8,3            ; @vbi_ram_default
	.comm	_TVP5150_LINE_MODE_INI,4,2      ; @TVP5150_LINE_MODE_INI
	.no_dead_strip	_tvp5150_set_vbi
.subsections_via_symbols
