	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function targa_decode_rle
_targa_decode_rle:                      ## @targa_decode_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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -80(%rbp)                 ## 4-byte Spill
	movl	%r8d, -76(%rbp)                 ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -88(%rbp)
	testq	%rdx, %rdx
	je	LBB0_18
## %bb.1:
	movl	%ecx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, -128(%rbp)                ## 8-byte Spill
	movl	16(%rbp), %r15d
	incl	%r15d
	sarl	$3, %r15d
	movslq	%r15d, %r14
	shlq	$2, %r14
	xorl	%ecx, %ecx
	movq	%rdx, %r13
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movq	%rsi, -120(%rbp)                ## 8-byte Spill
	movl	%r12d, -84(%rbp)                ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %eax
	testq	%r13, %r13
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_20
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
                                        ##       Child Loop BB0_13 Depth 3
                                        ##     Child Loop BB0_6 Depth 2
	movl	%ecx, -72(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_bytestream2_get_bytes_left
	testq	%rax, %rax
	jle	LBB0_19
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_bytestream2_get_byteu
	movl	%eax, %ecx
	andl	$127, %ecx
	incl	%ecx
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	testb	$-128, %al
	jne	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-72(%rbp), %ecx                 ## 4-byte Reload
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ecx, -72(%rbp)                 ## 4-byte Spill
	subl	%ecx, %r12d
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	movl	%r12d, %esi
	callq	_FFMIN
	movl	%eax, %r12d
	movl	%eax, %ebx
	imull	%r15d, %ebx
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_bytestream2_get_buffer
	movl	%r12d, %edx
	movl	-72(%rbp), %ecx                 ## 4-byte Reload
	movl	-84(%rbp), %r12d                ## 4-byte Reload
	addl	%edx, %ecx
	cmpl	%r12d, %ecx
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movl	%edx, %ebx
	movl	-80(%rbp), %edx                 ## 4-byte Reload
	leaq	-88(%rbp), %rcx
	movl	-76(%rbp), %r8d                 ## 4-byte Reload
	movl	24(%rbp), %r9d
	callq	_advance_line
	movl	%ebx, %edx
	movq	%rax, %r13
	xorl	%ecx, %ecx
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	movslq	%ebx, %rax
	leaq	(%r13,%rax,4), %r13
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=2
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	subl	%edx, %ebx
	testq	%r13, %r13
	je	LBB0_2
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=2
	testl	%ebx, %ebx
	jg	LBB0_6
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	leaq	-64(%rbp), %rsi
	movl	%r15d, %edx
	callq	_bytestream2_get_buffer
	movl	-72(%rbp), %ecx                 ## 4-byte Reload
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_13 Depth 3
	movl	%ecx, -72(%rbp)                 ## 4-byte Spill
	subl	%ecx, %r12d
	movl	%ebx, %edi
	movl	%r12d, %esi
	callq	_FFMIN
	subl	%eax, %ebx
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movl	%eax, -100(%rbp)                ## 4-byte Spill
	movl	%eax, %ebx
	leaq	-64(%rbp), %r12
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_12 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	addq	%r14, %r13
	decl	%ebx
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=2
	movl	-72(%rbp), %ecx                 ## 4-byte Reload
	addl	-100(%rbp), %ecx                ## 4-byte Folded Reload
	movl	-84(%rbp), %r12d                ## 4-byte Reload
	cmpl	%r12d, %ecx
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movl	-80(%rbp), %edx                 ## 4-byte Reload
	leaq	-88(%rbp), %rcx
	movl	-76(%rbp), %r8d                 ## 4-byte Reload
	movl	24(%rbp), %r9d
	callq	_advance_line
	movq	%rax, %r13
	xorl	%ecx, %ecx
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=2
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	testq	%r13, %r13
	je	LBB0_2
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=2
	testl	%ebx, %ebx
	jg	LBB0_12
	jmp	LBB0_2
LBB0_19:
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_22
LBB0_20:
	testl	%eax, %eax
	je	LBB0_18
## %bb.21:
	leaq	L_.str.1(%rip), %rdx
LBB0_22:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-128(%rbp), %rdi                ## 8-byte Reload
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_23
LBB0_18:
	xorl	%eax, %eax
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_26
## %bb.24:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Ran ouf of data before end-of-image\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Packet went out of bounds\n"

	.no_dead_strip	_targa_decode_rle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function targa_decode_rle
_targa_decode_rle:                      ; @targa_decode_rle
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	w5, w7, [sp, #28]               ; 8-byte Folded Spill
	str	w4, [sp, #24]                   ; 4-byte Folded Spill
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	str	wzr, [sp, #36]
	cbz	x2, LBB0_20
; %bb.1:
	mov	x23, x3
	mov	x25, x1
	stp	x0, x2, [sp, #8]                ; 16-byte Folded Spill
	mov	w19, #0
	add	w8, w6, #1
	asr	w27, w8, #3
	sbfiz	x22, x27, #2, #32
	mov	x28, x2
	mov	x24, x2
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	x28, LBB0_17
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_7 Depth 3
                                        ;     Child Loop BB0_14 Depth 2
	mov	x0, x25
	bl	_bytestream2_get_bytes_left
	cmp	x0, #1
	b.lt	LBB0_16
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	bl	_bytestream2_get_byteu
	and	w8, w0, #0x7f
	add	w26, w8, #1
	tbz	w0, #7, LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #40
	mov	x0, x25
	mov	x2, x27
	bl	_bytestream2_get_buffer
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_7 Depth 3
	sub	w1, w23, w19
	mov	x0, x26
	bl	_FFMIN
	mov	x20, x0
	sub	w26, w26, w0
	mov	x21, x0
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	add	x1, sp, #40
	mov	x0, x28
	mov	x2, x27
	bl	_memcpy
	add	x28, x28, x22
	subs	w21, w21, #1
	b.ne	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	add	w19, w20, w19
	cmp	w19, w23
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x3, sp, #36
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	mov	x1, x24
	ldp	w4, w2, [sp, #24]               ; 8-byte Folded Reload
	ldr	w5, [sp, #32]                   ; 4-byte Folded Reload
	bl	_advance_line
	mov	x24, x0
	mov	w19, #0
	mov	x28, x0
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=2
	cbz	x28, LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
	cmp	w26, #0
	b.gt	LBB0_6
	b	LBB0_2
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=2
	add	x3, sp, #36
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	mov	x1, x24
	ldp	w4, w2, [sp, #24]               ; 8-byte Folded Reload
	ldr	w5, [sp, #32]                   ; 4-byte Folded Reload
	bl	_advance_line
	mov	x24, x0
	mov	w19, #0
	mov	x28, x0
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=2
	cmp	x28, #0
	ccmp	w26, #0, #4, ne
	b.le	LBB0_2
LBB0_14:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w1, w23, w19
	mov	x0, x26
	bl	_FFMIN
	mov	x21, x0
	mul	w20, w0, w27
	mov	x0, x25
	mov	x1, x28
	mov	x2, x20
	bl	_bytestream2_get_buffer
	sub	w26, w26, w21
	add	w19, w21, w19
	cmp	w19, w23
	b.eq	LBB0_12
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x28, x28, w20, sxtw #2
	b	LBB0_13
LBB0_16:
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_19
LBB0_17:
	cbz	w26, LBB0_20
; %bb.18:
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_19:
Lloh7:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_av_log
Lloh10:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	b	LBB0_21
LBB0_20:
	mov	w0, #0
LBB0_21:
	ldr	x8, [sp, #56]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.22:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Ran ouf of data before end-of-image\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Packet went out of bounds\n"

	.no_dead_strip	_targa_decode_rle
.subsections_via_symbols
