	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function targa_encode_rle
_targa_encode_rle:                      ## @targa_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	testl	%r9d, %r9d
	jle	LBB0_5
## %bb.1:
	movl	%r9d, %r14d
	movq	%rdx, %r12
	movl	%esi, %r15d
	xorl	%r13d, %r13d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	movslq	(%rax), %rax
	movslq	%r13d, %rdx
	imulq	%rax, %rdx
	addq	(%rcx), %rdx
	subq	$8, %rsp
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	$127, %r9d
	pushq	$0
	pushq	$-1
	pushq	$0
	callq	_ff_rle_encode
	addq	$32, %rsp
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%eax, %rcx
	leaq	(%rbx,%rcx,4), %rbx
	subl	%eax, %r15d
	incl	%r13d
	cmpl	%r13d, %r14d
	jne	LBB0_2
LBB0_5:
	subq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	shrq	$2, %rbx
	jmp	LBB0_6
LBB0_3:
	movl	$-1, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_targa_encode_rle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function targa_encode_rle
_targa_encode_rle:                      ; @targa_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
	mov	x22, x0
	mov	x25, x0
	cmp	w5, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x23, x2
	mov	x24, x1
	mov	w27, #0
	mov	x25, x22
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x9, x8, [x23]
	ldr	x8, [x8]
	ldrsw	x9, [x9]
	sxtw	x10, w27
	madd	x2, x9, x10, x8
	str	wzr, [sp]
	mov	w26, #-1
	mov	x0, x25
	mov	x1, x24
	mov	x3, x21
	mov	x4, x20
	mov	w5, #127
	mov	w6, #0
	mov	w7, #-1
	bl	_ff_rle_encode
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x25, x25, w0, sxtw #2
	sub	w24, w24, w0
	add	w27, w27, #1
	cmp	w19, w27
	b.ne	LBB0_2
LBB0_4:
	sub	x8, x25, x22
	lsr	x26, x8, #2
LBB0_5:
	mov	x0, x26
	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	_targa_encode_rle
.subsections_via_symbols
