	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_copy_vbi_line          ## -- Begin function cx231xx_copy_vbi_line
	.p2align	4, 0x90
_cx231xx_copy_vbi_line:                 ## @cx231xx_copy_vbi_line
	.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	%r8d, %r15d
	movq	%rcx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movslq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %eax
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	cmpl	%r15d, %eax
	jne	LBB0_4
LBB0_3:
	movq	8(%rbx), %rcx
	jmp	LBB0_5
LBB0_1:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rdx, %r13
	callq	_cx231xx_reset_vbi_buffer
	movq	%r13, %rdx
	movl	(%rbx), %eax
	cmpl	%r15d, %eax
	je	LBB0_3
LBB0_4:
	movq	$0, 8(%rbx)
	xorl	%ecx, %ecx
LBB0_5:
	movq	8(%r14), %r13
	movl	%r15d, (%rbx)
	movq	16(%rbx), %rax
	cmpq	%r12, %rax
	movq	%r12, %r15
	cmovlq	%rax, %r15
	cmpq	24(%rbx), %rcx
	jge	LBB0_6
## %bb.7:
	movl	$1, 32(%rbx)
	testq	%r13, %r13
	je	LBB0_8
## %bb.9:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rcx
	callq	_cx231xx_do_vbi_copy
	addq	%r15, 40(%rbx)
	subq	%r15, 16(%rbx)
	jne	LBB0_12
## %bb.10:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, %rax
	movq	%rax, 16(%rbx)
	incq	8(%rbx)
	movl	$0, 32(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_cx231xx_is_vbi_buffer_done
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_vbi_buffer_filled
	movq	$0, 40(%rbx)
	movq	$0, 8(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_cx231xx_reset_vbi_buffer
	jmp	LBB0_12
LBB0_6:
	xorl	%ecx, %ecx
	cmpq	%r12, %rax
	setg	%cl
	subq	%r15, %rax
	movq	%rax, 16(%rbx)
	movl	%ecx, 32(%rbx)
	xorl	%r15d, %r15d
	jmp	LBB0_12
LBB0_8:
	xorl	%ecx, %ecx
	cmpq	%r12, %rax
	setg	%cl
	subq	%r15, %rax
	movq	%rax, 16(%rbx)
	movl	%ecx, 32(%rbx)
LBB0_12:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_copy_vbi_line          ; -- Begin function cx231xx_copy_vbi_line
	.p2align	2
_cx231xx_copy_vbi_line:                 ; @cx231xx_copy_vbi_line
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x4
	mov	x23, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldrsw	x25, [x0]
	ldr	w8, [x1]
	cmn	w8, #1
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, w21
	b.ne	LBB0_4
LBB0_2:
	ldr	x9, [x19, #8]
	b	LBB0_5
LBB0_3:
	mov	x0, x20
	mov	x1, x19
	bl	_cx231xx_reset_vbi_buffer
	ldr	w8, [x19]
	cmp	w8, w21
	b.eq	LBB0_2
LBB0_4:
	mov	x9, #0
	str	xzr, [x19, #8]
LBB0_5:
	ldr	x24, [x20, #8]
	str	w21, [x19]
	ldp	x8, x10, [x19, #16]
	cmp	x8, x23
	csel	x21, x8, x23, lt
	cmp	x9, x10
	b.ge	LBB0_10
; %bb.6:
	mov	w9, #1
	str	w9, [x19, #32]
	cbz	x24, LBB0_11
; %bb.7:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	mov	x3, x21
	bl	_cx231xx_do_vbi_copy
	ldr	x8, [x19, #40]
	add	x8, x8, x21
	str	x8, [x19, #40]
	ldr	x8, [x19, #16]
	subs	x8, x8, x21
	str	x8, [x19, #16]
	b.ne	LBB0_12
; %bb.8:
	lsl	x8, x25, #1
	ldr	x9, [x19, #8]
	add	x9, x9, #1
	stp	x9, x8, [x19, #8]
	str	wzr, [x19, #32]
	mov	x0, x20
	mov	x1, x19
	bl	_cx231xx_is_vbi_buffer_done
	cbz	x0, LBB0_12
; %bb.9:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x24
	bl	_vbi_buffer_filled
	str	xzr, [x19, #40]
	str	xzr, [x19, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_cx231xx_reset_vbi_buffer
	b	LBB0_12
LBB0_10:
	cmp	x8, x23
	cset	w9, gt
	sub	x8, x8, x21
	str	x8, [x19, #16]
	str	w9, [x19, #32]
	mov	x21, #0
	b	LBB0_12
LBB0_11:
	cmp	x8, x23
	cset	w9, gt
	sub	x8, x8, x21
	str	x8, [x19, #16]
	str	w9, [x19, #32]
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
