	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_do_vbi_copy            ## -- Begin function cx231xx_do_vbi_copy
	.p2align	4, 0x90
_cx231xx_do_vbi_copy:                   ## @cx231xx_do_vbi_copy
	.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
	movq	%rdi, %r13
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	%ecx, %r15d
	movq	%rsi, %rbx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	(%r13), %r14d
	addl	%r14d, %r14d
	callq	_videobuf_to_vmalloc
	movl	(%rbx), %ecx
	xorl	%r12d, %r12d
	movl	%r14d, %edx
	subl	%ecx, %edx
	cmovel	%r12d, %edx
	imull	4(%rbx), %r14d
	addl	%edx, %r14d
	cmpl	$2, 8(%rbx)
	jne	LBB0_4
## %bb.3:
	movl	(%r13), %edx
	imull	12(%rbx), %edx
	leal	(%r14,%rdx,2), %r14d
LBB0_4:
	movslq	%r14d, %rdx
	leaq	(%rax,%rdx,4), %rdi
	cmpl	%r15d, %ecx
	cmovll	%ecx, %r15d
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_memcpy
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_5:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_do_vbi_copy            ; -- Begin function cx231xx_do_vbi_copy
	.p2align	2
_cx231xx_do_vbi_copy:                   ; @cx231xx_do_vbi_copy
	.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	x22, x0
	ldr	x0, [x0, #8]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x3
	mov	x19, x2
	mov	x21, x1
	ldr	w8, [x22]
	lsl	w23, w8, #1
	bl	_videobuf_to_vmalloc
	ldp	w8, w9, [x21]
	subs	w10, w23, w8
	csel	w10, wzr, w10, eq
	madd	w9, w9, w23, w10
	ldr	w10, [x21, #8]
	cmp	w10, #2
	b.ne	LBB0_3
; %bb.2:
	ldr	w10, [x22]
	ldr	w11, [x21, #12]
	mul	w10, w10, w11
	add	w9, w9, w10, lsl #1
LBB0_3:
	add	x0, x0, w9, sxtw #2
	cmp	w8, w20
	csel	w2, w8, w20, lt
	mov	x1, x19
	bl	_memcpy
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
