	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vbi_buffer_setup
_vbi_buffer_setup:                      ## @vbi_buffer_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	_V4L2_STD_625_50@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	jne	LBB0_1
## %bb.2:
	movq	_NTSC_VBI_LINES@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_PAL_VBI_LINES@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %ecx
	imull	4(%rax), %ecx
	shll	$2, %ecx
	movl	%ecx, (%rdx)
	movl	(%rsi), %eax
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	_CX231XX_DEF_VBI_BUF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsi)
LBB0_5:
	movq	_CX231XX_MIN_BUF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jae	LBB0_7
## %bb.6:
	movl	%ecx, (%rsi)
LBB0_7:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_STD_625_50,4,2            ## @V4L2_STD_625_50
	.comm	_PAL_VBI_LINES,4,2              ## @PAL_VBI_LINES
	.comm	_NTSC_VBI_LINES,4,2             ## @NTSC_VBI_LINES
	.comm	_CX231XX_DEF_VBI_BUF,4,2        ## @CX231XX_DEF_VBI_BUF
	.comm	_CX231XX_MIN_BUF,4,2            ## @CX231XX_MIN_BUF
	.no_dead_strip	_vbi_buffer_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vbi_buffer_setup
_vbi_buffer_setup:                      ; @vbi_buffer_setup
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _V4L2_STD_625_50@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_STD_625_50@GOTPAGEOFF]
Lloh2:
	adrp	x10, _PAL_VBI_LINES@GOTPAGE
Lloh3:
	ldr	x10, [x10, _PAL_VBI_LINES@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x11, _NTSC_VBI_LINES@GOTPAGE
Lloh6:
	ldr	x11, [x11, _NTSC_VBI_LINES@GOTPAGEOFF]
	ldp	w12, w8, [x8]
	tst	w9, w12
	csel	x9, x11, x10, eq
	ldr	w9, [x9]
	mul	w8, w9, w8
	lsl	w8, w8, #2
	str	w8, [x2]
	ldr	w8, [x1]
	cbnz	w8, LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _CX231XX_DEF_VBI_BUF@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CX231XX_DEF_VBI_BUF@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x1]
LBB0_2:
Lloh10:
	adrp	x9, _CX231XX_MIN_BUF@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CX231XX_MIN_BUF@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w8, w9
	b.hs	LBB0_4
; %bb.3:
	str	w9, [x1]
LBB0_4:
	mov	w0, #0
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_STD_625_50,4,2            ; @V4L2_STD_625_50
	.comm	_PAL_VBI_LINES,4,2              ; @PAL_VBI_LINES
	.comm	_NTSC_VBI_LINES,4,2             ; @NTSC_VBI_LINES
	.comm	_CX231XX_DEF_VBI_BUF,4,2        ; @CX231XX_DEF_VBI_BUF
	.comm	_CX231XX_MIN_BUF,4,2            ; @CX231XX_MIN_BUF
	.no_dead_strip	_vbi_buffer_setup
.subsections_via_symbols
