	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvd_encode_rle
_dvd_encode_rle:                        ## @dvd_encode_rle
	.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	%r9, -88(%rbp)                  ## 8-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	testl	%r8d, %r8d
	jle	LBB0_22
## %bb.1:
	movq	%rsi, %rbx
	movslq	%edx, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rbx,%rax,4), %rbx
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	cmpl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_22
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	jle	LBB0_21
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
	movl	%r14d, %r13d
	movl	%r14d, %r14d
	movslq	(%rbx,%r14,4), %rax
	incl	%r13d
	movl	$1, %r15d
	cmpl	%ecx, %r13d
	jge	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%ecx, %r15d
	subl	%r14d, %r15d
	movl	$1, %esi
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	leal	(%r14,%rsi), %edx
	cmpl	%eax, (%rbx,%rdx,4)
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=3
	incq	%rsi
	cmpq	%rsi, %r15
	jne	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%ecx, %r13d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=2
	leal	(%r14,%rsi), %r13d
	movl	%esi, %r15d
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %r12d
	xorl	%edi, %edi
	cmpl	$4, %r12d
	setl	%dil
	callq	_av_assert0
	cmpl	$3, %r15d
	jbe	LBB0_19
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$15, %r15d
	jbe	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$63, %r15d
	ja	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=2
	xorl	%edi, %edi
	jmp	LBB0_17
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=2
	cmpl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=2
	xorl	%edi, %edi
	callq	_PUTNIBBLE
	xorl	%edi, %edi
	callq	_PUTNIBBLE
	xorl	%edi, %edi
	callq	_PUTNIBBLE
	jmp	LBB0_20
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$255, %r15d
	movl	$255, %eax
	cmovael	%eax, %r15d
	xorl	%edi, %edi
	callq	_PUTNIBBLE
	movl	%r15d, %edi
	shrl	$6, %edi
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=2
	callq	_PUTNIBBLE
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	%r15d, %edi
	shrl	$2, %edi
	callq	_PUTNIBBLE
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=2
	leal	(,%r15,4), %eax
	orl	%eax, %r12d
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	%r12d, %edi
	callq	_PUTNIBBLE
	addl	%r15d, %r14d
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %r14d
	jl	LBB0_4
	jmp	LBB0_21
LBB0_22:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_dvd_encode_rle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dvd_encode_rle
_dvd_encode_rle:                        ; @dvd_encode_rle
	.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
                                        ; kill: def $w2 killed $w2 def $x2
	ldr	x8, [x0]
	stp	x8, x0, [sp]                    ; 16-byte Folded Spill
	cmp	w4, #1
	b.lt	LBB0_23
; %bb.1:
	mov	x19, x5
	mov	x20, x4
	mov	x28, x3
	mov	x23, x1
	mov	w26, #0
	sxtw	x27, w2
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, x27, lsl #2
	add	w26, w26, #1
	cmp	w26, w20
	b.eq	LBB0_23
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;       Child Loop BB0_7 Depth 3
	cmp	w28, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w9, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_7 Depth 3
	mov	w25, w9
	ldrsw	x8, [x23, w9, uxtw #2]
	add	w21, w9, #1
	cmp	w21, w28
	b.ge	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	sub	w22, w28, w25
	mov	w9, #1
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	add	w10, w25, w9
	ldr	w10, [x23, w10, uxtw #2]
	cmp	w10, w8
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=3
	add	x9, x9, #1
	cmp	x22, x9
	b.ne	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x21, x28
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	w22, #1
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=2
	add	w21, w25, w9
	mov	x22, x9
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	w24, [x19, x8, lsl #2]
	cmp	w24, #4
	cset	w0, lt
	bl	_av_assert0
	cmp	w22, #3
	b.ls	LBB0_21
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=2
	cmp	w22, #15
	b.ls	LBB0_20
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=2
	cmp	w22, #63
	b.hi	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=2
	mov	w0, #0
	b	LBB0_19
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=2
	cmp	w21, w28
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_5 Depth=2
	mov	w0, #0
	bl	_PUTNIBBLE
	mov	w0, #0
	bl	_PUTNIBBLE
	mov	w0, #0
	bl	_PUTNIBBLE
	b	LBB0_22
LBB0_18:                                ;   in Loop: Header=BB0_5 Depth=2
	cmp	w22, #255
	mov	w8, #255
	csel	w22, w22, w8, lo
	mov	w0, #0
	bl	_PUTNIBBLE
	lsr	w0, w22, #6
LBB0_19:                                ;   in Loop: Header=BB0_5 Depth=2
	bl	_PUTNIBBLE
LBB0_20:                                ;   in Loop: Header=BB0_5 Depth=2
	lsr	w0, w22, #2
	bl	_PUTNIBBLE
LBB0_21:                                ;   in Loop: Header=BB0_5 Depth=2
	orr	w24, w24, w22, lsl #2
LBB0_22:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x0, x24
	bl	_PUTNIBBLE
	add	w9, w22, w25
	cmp	w9, w28
	b.lt	LBB0_5
	b	LBB0_2
LBB0_23:
	ldp	x9, x8, [sp]                    ; 16-byte Folded Reload
	str	x9, [x8]
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_dvd_encode_rle
.subsections_via_symbols
