	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_rle_encode                  ## -- Begin function ff_rle_encode
	.p2align	4, 0x90
_ff_rle_encode:                         ## @ff_rle_encode
	.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	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	testl	%r8d, %r8d
	jle	LBB0_8
## %bb.1:
	movl	%ecx, %r13d
	movq	%rdx, %r12
	movslq	%esi, %rax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	leaq	(%r15,%rax,4), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movslq	%ecx, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r12,%r13,4), %r12
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	addl	%r14d, %eax
	movq	%rbx, %r15
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	cmpl	%r8d, %eax
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	jge	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r8d, %ebx
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	subl	%eax, %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	$1, %ecx
	callq	_ff_rle_count_pixels
	cmpl	$2, %eax
	jl	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r14d
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	(%r15,%rax,4), %rbx
	addq	$4, %rbx
	cmpq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	ja	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, %eax
	xorl	16(%rbp), %eax
	addl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movl	%eax, (%r15)
	addq	$4, %r15
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movl	%r14d, %eax
	imull	%r13d, %eax
	movslq	%eax, %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	callq	_ff_rle_count_pixels
	movl	%eax, %r14d
	imull	%r13d, %eax
	movslq	%eax, %r13
	leaq	(%r15,%r13,4), %rax
	cmpq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	jae	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, %eax
	xorl	32(%rbp), %eax
	addl	24(%rbp), %eax
	leaq	4(%r15), %rdi
	movl	%eax, (%r15)
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	leaq	(%r15,%r13,4), %rbx
	addq	$4, %rbx
	jmp	LBB0_2
LBB0_8:
	subq	-64(%rbp), %rbx                 ## 8-byte Folded Reload
	shrq	$2, %rbx
	jmp	LBB0_11
LBB0_10:
	movl	$-1, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$40, %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	_ff_rle_encode                  ; -- Begin function ff_rle_encode
	.p2align	2
_ff_rle_encode:                         ; @ff_rle_encode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	stp	w6, w7, [sp, #24]               ; 8-byte Folded Spill
	str	w5, [sp, #20]                   ; 4-byte Folded Spill
	mov	x26, x0
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	cmp	w4, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x22, x4
	mov	x23, x3
	mov	x25, x2
	mov	w24, #0
	ldr	w19, [x29, #16]
	sxtw	x20, w23
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	mov	x26, x8
	add	x21, x8, w1, sxtw #2
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, x28, lsl #2
	add	w24, w27, w24
	cmp	w24, w22
	b.ge	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w28, w22, w24
	mov	x0, x25
	mov	x1, x28
	mov	x2, x23
	mov	w3, #1
	bl	_ff_rle_count_pixels
	cmp	w0, #2
	b.lt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x26, x20, lsl #2
	add	x8, x8, #4
	cmp	x8, x21
	b.hi	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x27, x0
	ldp	w9, w8, [sp, #20]               ; 8-byte Folded Reload
	eor	w8, w0, w8
	add	w8, w8, w9
	str	w8, [x26], #4
	mov	x0, x26
	mov	x1, x25
	mov	x2, x23
	bl	_memcpy
	add	x26, x26, x20, lsl #2
	mul	w8, w27, w23
	sxtw	x28, w8
	b	LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	mov	x1, x28
	mov	x2, x23
	mov	w3, #0
	bl	_ff_rle_count_pixels
	mov	x27, x0
	sxtw	x8, w27
	mul	x28, x8, x20
	add	x8, x26, x28, lsl #2
	cmp	x8, x21
	b.hs	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	eor	w8, w27, w19
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	add	w8, w8, w9
	str	w8, [x26], #4
	mov	x0, x26
	mov	x1, x25
	mov	x2, x28
	bl	_memcpy
	add	x26, x26, x28, lsl #2
	b	LBB0_2
LBB0_8:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	sub	x8, x26, x8
	lsr	x0, x8, #2
	b	LBB0_10
LBB0_9:
	mov	w0, #-1
LBB0_10:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	add	sp, sp, #128
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
