	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function au0828_copy_video
_au0828_copy_video:                     ## @au0828_copy_video
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	testq	%r9, %r9
	je	LBB0_17
## %bb.1:
	movq	%rcx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r8
	movq	(%rsi), %rax
	leaq	(%rax,%r9), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %r10
	movq	%r10, %rcx
	subq	%rax, %rcx
	cmpq	%r10, %rdx
	cmovbeq	%r9, %rcx
	movl	(%r8), %esi
	xorl	%r14d, %r14d
	cmpq	$0, 8(%rdi)
	leal	(%rsi,%rsi), %r15d
	movslq	%r15d, %rdi
	cmoveq	%rdi, %r14
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r13d
	addq	-48(%rbp), %r14                 ## 8-byte Folded Reload
	movq	%rax, %rdx
	orq	%rdi, %rdx
	shrq	$32, %rdx
	je	LBB0_2
## %bb.3:
	xorl	%edx, %edx
	divq	%rdi
	jmp	LBB0_4
LBB0_2:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r15d
                                        ## kill: def $edx killed $edx def $rdx
                                        ## kill: def $eax killed $eax def $rax
LBB0_4:
	imull	%eax, %esi
	leal	(%rdx,%rsi,4), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	cltq
	addq	%rax, %r14
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
                                        ## kill: def $r15d killed $r15d killed $r15 def $r15
	subl	%edx, %r15d
	cmpl	%r13d, %r15d
	cmovgel	%r13d, %r15d
	movslq	%r15d, %rsi
	addq	%r14, %rsi
	addq	-48(%rbp), %r10                 ## 8-byte Folded Reload
	cmpq	%r10, %rsi
	jbe	LBB0_6
## %bb.5:
	subl	%r10d, %esi
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r8, %r15
	callq	_au0828_isocdbg
	movq	%r15, %r8
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r15d
	addl	-48(%rbp), %r15d                ## 4-byte Folded Reload
	subl	%r14d, %r15d
	movl	%r15d, %r13d
LBB0_6:
	testl	%r15d, %r15d
	jle	LBB0_17
## %bb.7:
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	subl	%r15d, %r13d
	jle	LBB0_12
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rax
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	leal	(%r15,%rdx), %ecx
	movslq	%ecx, %r14
	addq	%rax, %r14
	cmpl	%r13d, %edx
	movl	%r13d, %r12d
	cmovll	%edx, %r12d
	movslq	%r12d, %rsi
	addq	%r14, %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	addq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	cmpq	%rax, %rsi
	jbe	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	subl	%eax, %esi
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_au0828_isocdbg
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r12d
	addl	-48(%rbp), %r12d                ## 4-byte Folded Reload
	subl	%r14d, %r12d
	movl	%r12d, %r13d
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	testl	%r12d, %r12d
	jle	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%r15d, %eax
	addq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movl	%r12d, %r15d
	subl	%r12d, %r13d
	jg	LBB0_8
LBB0_12:
	cmpl	$1441, -60(%rbp)                ## 4-byte Folded Reload
                                        ## imm = 0x5A1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	jl	LBB0_16
## %bb.13:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpb	$95, (%rcx)
	ja	LBB0_16
## %bb.14:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpb	$95, 1440(%rcx)
	ja	LBB0_16
## %bb.15:
	movl	$1, 4(%rax)
LBB0_16:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	addq	%rcx, (%rax)
LBB0_17:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Overflow of %zi bytes past buffer end (1)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Overflow %zi bytes past buf end (2)\n"

	.no_dead_strip	_au0828_copy_video
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function au0828_copy_video
_au0828_copy_video:                     ; @au0828_copy_video
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	cbz	x5, LBB0_14
; %bb.1:
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x19, x1
	mov	x27, x0
	ldr	w8, [x0]
	lsl	w20, w8, #1
	ldr	x9, [x1]
	ldp	x10, x11, [x2]
	sub	x12, x10, x9
	add	x13, x9, x5
	cmp	x13, x10
	csel	x28, x12, x5, hi
	sxtw	x12, w20
	cmp	x11, #0
	csel	x11, x12, xzr, eq
	add	x11, x4, x11
	udiv	x13, x9, x12
	msub	w9, w13, w12, w9
	mul	w8, w8, w13
	add	w8, w9, w8, lsl #2
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	add	x24, x11, w8, sxtw
	sub	w8, w20, w9
	cmp	w8, w28
	csel	w25, w8, w28, lt
	add	x8, x24, w25, sxtw
	add	x9, x4, x10
	cmp	x8, x9
	mov	x26, x28
	b.ls	LBB0_3
; %bb.2:
	sub	w1, w8, w9
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_au0828_isocdbg
	ldr	w8, [x23]
	add	w8, w21, w8
	sub	w25, w8, w24
	mov	x26, x25
LBB0_3:
	cmp	w25, #1
	b.lt	LBB0_14
; %bb.4:
	str	x27, [sp]                       ; 8-byte Folded Spill
	mov	x0, x24
	mov	x1, x22
	mov	x2, x25
	bl	_memcpy
	sub	w26, w26, w25
	cmp	w26, #1
	b.lt	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w25, w20
	add	x24, x24, w8, sxtw
	cmp	w20, w26
	csel	w27, w20, w26, lt
	add	x8, x24, w27, sxtw
	ldr	x9, [x23]
	add	x9, x21, x9
	cmp	x8, x9
	b.ls	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w1, w8, w9
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_au0828_isocdbg
	ldr	w8, [x23]
	add	w8, w21, w8
	sub	w27, w8, w24
	mov	x26, x27
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	w27, #1
	b.lt	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, w25, uxtw
	mov	x0, x24
	mov	x1, x22
	mov	x2, x27
	bl	_memcpy
	sub	w26, w26, w27
	mov	x25, x27
	cmp	w26, #0
	b.gt	LBB0_5
LBB0_9:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w8, #1441
	b.lt	LBB0_13
; %bb.10:
	ldrb	w8, [x21]
	cmp	w8, #95
	b.hi	LBB0_13
; %bb.11:
	ldrb	w8, [x21, #1440]
	cmp	w8, #95
	b.hi	LBB0_13
; %bb.12:
	mov	w8, #1
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	str	w8, [x9, #4]
LBB0_13:
	ldr	x8, [x19]
	add	x8, x8, x28
	str	x8, [x19]
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Overflow of %zi bytes past buffer end (1)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Overflow %zi bytes past buf end (2)\n"

	.no_dead_strip	_au0828_copy_video
.subsections_via_symbols
