	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function expand_rle_row16
_expand_rle_row16:                      ## @expand_rle_row16
	.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, %r13d
	testl	%edx, %edx
	jle	LBB0_1
## %bb.2:
	movq	%rdi, %r12
	movslq	%edx, %rax
	leaq	(%rsi,%rax,2), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movslq	%r13d, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rax), %r15
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	jae	LBB0_13
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
                                        ##     Child Loop BB0_11 Depth 2
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$1, %eax
	jle	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_be16u
                                        ## kill: def $ax killed $ax def $eax
	movl	%eax, %r14d
	andb	$127, %r14b
	je	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	subq	%rbx, %rcx
	sarq	%rcx
	movzbl	%r14b, %edx
	decl	%edx
	imull	%r13d, %edx
	movslq	%edx, %rdx
	cmpq	%rdx, %rcx
	jle	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	testb	$-128, %al
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	callq	_bytestream2_get_ne16
	movl	%eax, %r13d
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzwl	%r13w, %esi
	movq	%rbx, %rdi
	callq	_AV_WN16A
	addq	%r15, %rbx
	decb	%r14b
	jne	LBB0_11
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	callq	_bytestream2_get_ne16
	movzwl	%ax, %esi
	movq	%rbx, %rdi
	callq	_AV_WN16A
	addq	%r15, %rbx
	decb	%r14b
	jne	LBB0_9
	jmp	LBB0_12
LBB0_1:
	movslq	%r13d, %rcx
	movq	%rsi, %rbx
	jmp	LBB0_14
LBB0_13:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
LBB0_14:
	subq	%rsi, %rbx
	sarq	%rbx
	movq	%rbx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_15
## %bb.16:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	jmp	LBB0_17
LBB0_15:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_17
LBB0_7:
	movl	4(%r12), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
LBB0_4:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_17:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$40, %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
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid pixel count.\n"

	.no_dead_strip	_expand_rle_row16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function expand_rle_row16
_expand_rle_row16:                      ; @expand_rle_row16
	.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	x20, x3
	mov	x19, x1
	cmp	w2, #0
	b.le	LBB0_10
; %bb.1:
	mov	x22, x0
	add	x25, x19, w2, sxtw #1
	mov	x8, x20
	sxtw	x24, w8
	sbfiz	x26, x8, #1, #32
	mov	x21, x19
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x21, x25
	b.hs	LBB0_11
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;     Child Loop BB0_8 Depth 2
	mov	x0, x22
	bl	_bytestream2_get_bytes_left
	cmp	w0, #1
	b.le	LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_bytestream2_get_be16u
	ands	w27, w0, #0x7f
	b.eq	LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x8, x25, x21
	sub	w9, w27, #1
	mul	w9, w9, w20
	sxtw	x9, w9
	cmp	x9, x8, asr #1
	b.ge	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	tbnz	w0, #7, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_bytestream2_get_ne16
	mov	x23, x0
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w27, w27, #1
	and	w28, w27, #0xff
	mov	x0, x21
	mov	x1, x23
	bl	_AV_WN16A
	add	x21, x21, x26
	cbnz	w28, LBB0_8
	b	LBB0_2
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w27, w27, #1
	and	w23, w27, #0xff
	mov	x0, x22
	bl	_bytestream2_get_ne16
	mov	x1, x0
	mov	x0, x21
	bl	_AV_WN16A
	add	x21, x21, x26
	cbnz	w23, LBB0_9
	b	LBB0_2
LBB0_10:
	sxtw	x24, w20
	mov	x21, x19
LBB0_11:
	sub	x8, x21, x19
	asr	x8, x8, #1
	sdiv	x0, x8, x24
	b	LBB0_14
LBB0_12:
	ldr	w0, [x22, #4]
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
LBB0_13:
Lloh5:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
LBB0_14:
                                        ; kill: def $w0 killed $w0 killed $x0
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid pixel count.\n"

	.no_dead_strip	_expand_rle_row16
.subsections_via_symbols
