	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcx_rle_decode
_pcx_rle_decode:                        ## @pcx_rle_decode
	.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	%ecx, %r14d
	movl	%edx, %r13d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	callq	_bytestream2_get_bytes_left
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	testl	%r14d, %r14d
	je	LBB0_16
## %bb.3:
	testl	%r13d, %r13d
	je	LBB0_17
## %bb.4:
	movl	%r13d, %r12d
	xorl	%r14d, %r14d
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	-52(%rbp), %r13d                ## 4-byte Reload
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpl	%r13d, %r14d
	jae	LBB0_17
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movq	%rbx, %rdi
	callq	_bytestream2_get_bytes_left
	testl	%eax, %eax
	jle	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	callq	_bytestream2_get_byte
	movq	%rbx, %rdi
	movl	%eax, %r15d
	movb	$1, %bl
	cmpb	$-64, %al
	jb	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	callq	_bytestream2_get_bytes_left
	testl	%eax, %eax
	jle	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	andb	$63, %r15b
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_bytestream2_get_byte
	movl	%r15d, %ebx
	movl	%eax, %r15d
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%r13d, %r14d
	jae	LBB0_6
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	testb	%bl, %bl
	je	LBB0_6
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%r13d, %eax
	movl	%r14d, %r13d
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r13), %rdi
	notl	%r14d
	addl	%eax, %r14d
	decb	%bl
	movzbl	%bl, %edx
	cmpl	%r14d, %edx
	cmovael	%r14d, %edx
	incl	%edx
	testl	%r14d, %r14d
	movl	$1, %eax
	cmovel	%eax, %edx
	movzbl	%r15b, %esi
	callq	_memset
	movq	%r13, %r14
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	incq	%r14
	subb	$1, %bl
	setb	%al
	cmpq	%r12, %r14
	jae	LBB0_5
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	testb	%al, %al
	je	LBB0_14
	jmp	LBB0_5
LBB0_1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_18
LBB0_16:
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_bytestream2_get_buffer
LBB0_17:
	xorl	%eax, %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_pcx_rle_decode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcx_rle_decode
_pcx_rle_decode:                        ; @pcx_rle_decode
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_bytestream2_get_bytes_left
	cmp	w0, #0
	b.le	LBB0_13
; %bb.1:
	cbz	w22, LBB0_14
; %bb.2:
	cbz	w19, LBB0_15
; %bb.3:
	mov	w25, #0
	mov	w23, w19
	mov	w24, #1
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	w25, w19
	b.hs	LBB0_15
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	mov	x0, x21
	bl	_bytestream2_get_bytes_left
	cmp	w0, #1
	b.lt	LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_bytestream2_get_byte
	mov	x22, x0
	cmp	w0, #192
	b.lo	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_bytestream2_get_bytes_left
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	and	w26, w22, #0x3f
	mov	x0, x21
	bl	_bytestream2_get_byte
	mov	x22, x0
	cmp	w25, w19
	b.lo	LBB0_10
	b	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w26, #1
	cmp	w25, w19
	b.hs	LBB0_4
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	cbz	w26, LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w27, w25
	add	x0, x20, x27
	mvn	w8, w25
	sub	w9, w26, #1
	and	w9, w9, #0xff
	add	w8, w8, w19
	cmp	w9, w8
	csel	w9, w9, w8, lo
	cmp	w8, #0
	csinc	w2, w24, w9, eq
	mov	x1, x22
	bl	_memset
	mov	x25, x27
LBB0_12:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w26, w26, #1
	add	x25, x25, #1
	cmp	x25, x23
	and	w8, w26, #0xff
	ccmp	w8, #0, #4, lo
	b.ne	LBB0_12
	b	LBB0_4
LBB0_13:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_16
LBB0_14:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_bytestream2_get_buffer
LBB0_15:
	mov	w0, #0
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_pcx_rle_decode
.subsections_via_symbols
