	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvb_encode_rle8
_dvb_encode_rle8:                       ## @dvb_encode_rle8
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	testl	%r8d, %r8d
	jle	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movslq	%edx, %rdx
	movslq	%ecx, %r14
	shlq	$2, %rdx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	xorl	%edx, %edx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=1
	movabsq	$1030792151040, %rax            ## imm = 0xF000000000
	movq	%rax, (%r13)
	addq	$8, %r13
	addq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	incl	%edx
	movq	%r13, %rax
	cmpl	-48(%rbp), %edx                 ## 4-byte Folded Reload
	je	LBB0_22
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
	leaq	4(%rax), %r13
	movl	$18, (%rax)
	testl	%ecx, %ecx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	jle	LBB0_21
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	%r12d, (%r13)
	addq	$4, %r13
	movl	$1, %eax
LBB0_20:                                ##   in Loop: Header=BB0_5 Depth=2
	addl	%eax, %r15d
	cmpl	%ecx, %r15d
	jge	LBB0_21
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
	movslq	%r15d, %rax
	movl	(%rbx,%rax,4), %r12d
	leal	1(%rax), %esi
	cmpl	%esi, %ecx
	cmovgl	%ecx, %esi
	incq	%rax
	movl	%r15d, %edi
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpq	%r14, %rax
	jge	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=3
	incl	%edi
	leaq	1(%rax), %rdx
	cmpl	%r12d, (%rbx,%rax,4)
	movq	%rdx, %rax
	je	LBB0_6
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=2
	movl	%esi, %edi
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=2
	subl	%r15d, %edi
	cmpl	$1, %edi
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=2
	testl	%r12d, %r12d
	jne	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=2
	testl	%r12d, %r12d
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=2
	cmpl	$3, %edi
	jl	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=2
	movl	$127, %esi
	callq	_FFMIN
	movl	$0, (%r13)
	movl	%eax, %ecx
	subl	$-128, %ecx
	movl	%ecx, 4(%r13)
	movl	%r12d, 8(%r13)
	addq	$12, %r13
	jmp	LBB0_19
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	$127, %esi
	callq	_FFMIN
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	$0, (%r13)
	movl	%eax, 4(%r13)
	addq	$8, %r13
	jmp	LBB0_20
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	%r12d, (%r13)
	cmpl	$2, %edi
	jne	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=2
	movl	%r12d, 4(%r13)
	addq	$8, %r13
	movl	$2, %eax
	jmp	LBB0_19
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=2
	addq	$4, %r13
	movl	$1, %eax
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_20
LBB0_1:
	movq	%rax, %r13
LBB0_22:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_dvb_encode_rle8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function dvb_encode_rle8
lCPI0_0:
	.long	0                               ; 0x0
	.long	240                             ; 0xf0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_dvb_encode_rle8:                       ; @dvb_encode_rle8
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
                                        ; kill: def $w2 killed $w2 def $x2
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x23, [x0]
	cmp	w4, #1
	b.lt	LBB0_21
; %bb.1:
	mov	x20, x4
	mov	x21, x3
	mov	x22, x1
	mov	w24, #0
	sxtw	x25, w21
	sbfiz	x26, x2, #2, #32
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
	mov	w27, #18
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	d8, [x23], #8
	add	x22, x22, x26
	add	w24, w24, #1
	cmp	w24, w20
	b.eq	LBB0_21
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;       Child Loop BB0_8 Depth 3
	str	w27, [x23], #4
	cmp	w21, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w28, #0
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=2
	str	w19, [x23], #4
	mov	w0, #1
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	w28, w0, w28
	cmp	w28, w21
	b.ge	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_8 Depth 3
	ldr	w19, [x22, w28, sxtw #2]
	sxtw	x9, w28
	add	w8, w28, #1
	cmp	w21, w8
	csinc	w8, w21, w28, gt
	add	x10, x9, #1
	mov	x9, x28
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	cmp	x10, x25
	b.ge	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=3
	ldr	w11, [x22, x10, lsl #2]
	add	w9, w9, #1
	add	x10, x10, #1
	cmp	w11, w19
	b.eq	LBB0_8
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x9, x8
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=2
	sub	w0, w9, w28
	cmp	w0, #1
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=2
	cbnz	w19, LBB0_5
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=2
	cbz	w19, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=2
	cmp	w0, #3
	b.lt	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=2
	mov	w1, #127
	bl	_FFMIN
	add	w8, w0, #128
	stp	wzr, w8, [x23]
	str	w19, [x23, #8]
	add	x23, x23, #12
	b	LBB0_6
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	w1, #127
	bl	_FFMIN
	stp	wzr, w0, [x23]
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x8, x23
	str	w19, [x8], #4
	cmp	w0, #2
	b.ne	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_7 Depth=2
	str	w19, [x23, #4]
LBB0_19:                                ;   in Loop: Header=BB0_7 Depth=2
	add	x23, x23, #8
	b	LBB0_6
LBB0_20:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	w0, #1
	mov	x23, x8
	b	LBB0_6
LBB0_21:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x23, [x8]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_dvb_encode_rle8
.subsections_via_symbols
