	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_do_copy                ## -- Begin function cx231xx_do_copy
	.p2align	4, 0x90
_cx231xx_do_copy:                       ## @cx231xx_do_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
	xorl	%eax, %eax
	cmpq	$0, 24(%rdi)
	setne	%al
	movq	8(%rdi,%rax,8), %r13
	testq	%r13, %r13
	je	LBB0_1
## %bb.2:
	movl	%ecx, %r12d
	movq	%rsi, %rbx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %r14d
	leal	(%r14,%r14), %r15d
	movq	%r13, %rdi
	callq	_videobuf_to_vmalloc
	movl	(%rbx), %ecx
	movl	%r15d, %edx
	subl	%ecx, %edx
	xorl	%r8d, %r8d
	cmpl	$1, 4(%rbx)
	cmovel	%r8d, %r15d
	movslq	%r15d, %rsi
	leaq	(%rax,%rsi,4), %rsi
	imull	8(%rbx), %r14d
	shll	$2, %r14d
	movslq	%r14d, %rdi
	addq	%rsi, %rdi
	movslq	%edx, %rsi
	addq	%rdi, %rsi
	cmpl	%r12d, %ecx
	cmovll	%ecx, %r12d
	movslq	%r12d, %rcx
	addq	%rsi, %rcx
	movslq	(%r13), %rdx
	leaq	(%rax,%rdx,4), %rax
	cmpq	%rcx, %rax
	jb	LBB0_4
## %bb.3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_cx231xx_swab
	xorl	%r8d, %r8d
	jmp	LBB0_4
LBB0_1:
	movl	$-1, %r8d
LBB0_4:
	movl	%r8d, %eax
	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_do_copy                ; -- Begin function cx231xx_do_copy
	.p2align	2
_cx231xx_do_copy:                       ; @cx231xx_do_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
	ldr	x8, [x0, #24]
	mov	w9, #16
	mov	w10, #8
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	x22, [x0, x8]
	cbz	x22, LBB0_3
; %bb.1:
	mov	x20, x3
	mov	x19, x2
	mov	x21, x1
	ldr	w23, [x0]
	lsl	w24, w23, #1
	mov	x0, x22
	bl	_videobuf_to_vmalloc
	mov	x8, x0
	mov	w0, #0
	ldp	w9, w10, [x21]
	sub	w11, w24, w9
	cmp	w10, #1
	csel	w10, wzr, w24, eq
	add	x10, x8, w10, sxtw #2
	ldr	w12, [x21, #8]
	mul	w12, w23, w12
	lsl	w12, w12, #2
	add	x10, x10, w12, sxtw
	add	x1, x10, w11, sxtw
	cmp	w9, w20
	csel	w2, w9, w20, lt
	add	x9, x1, w2, sxtw
	ldrsw	x10, [x22]
	add	x8, x8, x10, lsl #2
	cmp	x8, x9
	b.lo	LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_cx231xx_swab
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	mov	w0, #-1
LBB0_4:
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
