	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvb_encode_rle4
_dvb_encode_rle4:                       ## @dvb_encode_rle4
	.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
	movl	%ecx, %r12d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rcx
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	testl	%r8d, %r8d
	jle	LBB0_26
## %bb.1:
	movq	%rsi, %r13
	movslq	%edx, %rax
	movslq	%r12d, %r15
	shlq	$2, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movl	%r12d, -56(%rbp)                ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edi, %edi
	callq	_PUTBITS4
	xorl	%edi, %edi
	callq	_PUTBITS4
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	$240, 4(%rcx)
	addq	$8, %rcx
	addq	-72(%rbp), %r13                 ## 8-byte Folded Reload
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	cmpl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_26
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_5 Depth 3
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	$17, (%rcx)
	testl	%r12d, %r12d
	jle	LBB0_25
## %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_5 Depth 3
	movslq	%r14d, %rax
	movl	(%r13,%rax,4), %ebx
	leal	1(%rax), %ecx
	cmpl	%ecx, %r12d
	cmovgl	%r12d, %ecx
	incq	%rax
	movl	%r14d, %r12d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpq	%r15, %rax
	jge	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=3
	incl	%r12d
	leaq	1(%rax), %rdx
	cmpl	%ebx, (%r13,%rax,4)
	movq	%rdx, %rax
	je	LBB0_5
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	%ecx, %r12d
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	subl	%r14d, %r12d
	testl	%ebx, %ebx
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$2, %r12d
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	xorl	%edi, %edi
	callq	_PUTBITS4
	movl	$2, %r12d
	movl	$13, %ebx
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=2
	testl	%ebx, %ebx
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$3, %r12d
	jl	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$9, %r12d
	jg	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=2
	xorl	%edi, %edi
	callq	_PUTBITS4
	leal	-2(%r12), %ebx
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	%r12d, %eax
	andl	$-4, %eax
	cmpl	$4, %eax
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_4 Depth=2
	xorl	%edi, %edi
	callq	_PUTBITS4
	leal	4(%r12), %edi
	callq	_PUTBITS4
	jmp	LBB0_23
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=2
	leal	-9(%r12), %eax
	cmpl	$15, %eax
	ja	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_4 Depth=2
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%edi, %edi
	callq	_PUTBITS4
	movl	$14, %edi
	callq	_PUTBITS4
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_PUTBITS4
	jmp	LBB0_23
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$25, %r12d
	jl	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$280, %r12d                     ## imm = 0x118
	movl	$280, %eax                      ## imm = 0x118
	cmovgel	%eax, %r12d
	leal	-25(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%edi, %edi
	callq	_PUTBITS4
	movl	$15, %edi
	callq	_PUTBITS4
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	shrl	$4, %edi
	callq	_PUTBITS4
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	andl	$15, %edi
	callq	_PUTBITS4
	jmp	LBB0_23
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	%ebx, %edi
	callq	_PUTBITS4
	movl	$1, %r12d
	testl	%ebx, %ebx
	jne	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_4 Depth=2
	movl	$12, %ebx
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	%ebx, %edi
	callq	_PUTBITS4
LBB0_24:                                ##   in Loop: Header=BB0_4 Depth=2
	addl	%r12d, %r14d
	movl	-56(%rbp), %r12d                ## 4-byte Reload
	cmpl	%r12d, %r14d
	jl	LBB0_4
	jmp	LBB0_25
LBB0_26:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rcx, (%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_rle4
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dvb_encode_rle4
_dvb_encode_rle4:                       ; @dvb_encode_rle4
	.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
	str	x0, [sp]                        ; 8-byte Folded Spill
	ldr	x26, [x0]
	cmp	w4, #1
	b.lt	LBB0_26
; %bb.1:
	mov	x20, x4
	mov	x21, x3
	mov	x22, x1
	mov	w25, #0
	sxtw	x27, w21
	sbfiz	x8, x2, #2, #32
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #0
	bl	_PUTBITS4
	mov	w0, #0
	bl	_PUTBITS4
	add	x8, x26, #8
	mov	w9, #240
	str	w9, [x26, #4]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	add	x22, x22, x9
	add	w25, w25, #1
	mov	x26, x8
	cmp	w25, w20
	b.eq	LBB0_27
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;       Child Loop BB0_6 Depth 3
	mov	w8, #17
	str	w8, [x26]
	cmp	w21, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w19, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_6 Depth 3
	ldr	w23, [x22, w19, sxtw #2]
	sxtw	x9, w19
	add	w8, w19, #1
	cmp	w21, w8
	csinc	w8, w21, w19, gt
	add	x10, x9, #1
	mov	x9, x19
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	cmp	x10, x27
	b.ge	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=3
	ldr	w11, [x22, x10, lsl #2]
	add	w9, w9, #1
	add	x10, x10, #1
	cmp	w11, w23
	b.eq	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=2
	sub	w28, w9, w19
	cbz	w23, LBB0_10
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=2
	mov	x9, x8
	sub	w28, w9, w19
	cbnz	w23, LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=2
	cmp	w28, #2
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=2
	mov	w0, #0
	bl	_PUTBITS4
	mov	w23, #13
	b	LBB0_24
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=2
	cbnz	w23, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=2
	cmp	w28, #3
	b.lt	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=2
	cmp	w28, #9
	b.gt	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=2
	mov	w0, #0
	bl	_PUTBITS4
	sub	w23, w28, #2
	b	LBB0_24
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=2
	and	w8, w28, #0xfffffffc
	cmp	w8, #4
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_5 Depth=2
	mov	w0, #0
	bl	_PUTBITS4
	add	w0, w28, #4
	bl	_PUTBITS4
	b	LBB0_24
LBB0_18:                                ;   in Loop: Header=BB0_5 Depth=2
	sub	w24, w28, #9
	cmp	w24, #15
	b.hi	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_5 Depth=2
	mov	w0, #0
	bl	_PUTBITS4
	mov	w0, #14
	bl	_PUTBITS4
	mov	x0, x24
	bl	_PUTBITS4
	b	LBB0_24
LBB0_20:                                ;   in Loop: Header=BB0_5 Depth=2
	cmp	w28, #25
	b.lt	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_5 Depth=2
	cmp	w28, #280
	mov	w8, #280
	csel	w28, w28, w8, lt
	sub	w24, w28, #25
	mov	w0, #0
	bl	_PUTBITS4
	mov	w0, #15
	bl	_PUTBITS4
	lsr	w0, w24, #4
	bl	_PUTBITS4
	and	w0, w24, #0xf
	bl	_PUTBITS4
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x0, x23
	bl	_PUTBITS4
	mov	w28, #1
	cbnz	w23, LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_5 Depth=2
	mov	w23, #12
LBB0_24:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x0, x23
	bl	_PUTBITS4
LBB0_25:                                ;   in Loop: Header=BB0_5 Depth=2
	add	w19, w28, w19
	cmp	w19, w21
	b.lt	LBB0_5
	b	LBB0_2
LBB0_26:
	mov	x8, x26
LBB0_27:
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	str	x8, [x9]
	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	_dvb_encode_rle4
.subsections_via_symbols
