	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function on2avc_decode_band_scales
_on2avc_decode_band_scales:             ## @on2avc_decode_band_scales
	.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
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rdi)
	jle	LBB0_19
## %bb.1:
	movq	%rdi, %rbx
	movl	$1, %r12d
	xorl	%r13d, %r13d
	movl	$1, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
                                        ## implicit-def: $r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r14d, %rdi
	shlq	$3, %rdi
	addq	16(%rbx), %rdi
	movslq	4(%rbx), %rax
	leal	(,%rax,8), %edx
	shlq	$3, %rax
	movq	%rdi, %rsi
	subq	%rax, %rsi
	callq	_memcpy
	addl	4(%rbx), %r14d
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	movslq	(%rbx), %rax
	incq	-48(%rbp)                       ## 8-byte Folded Spill
	cmpq	%rax, %r13
	jge	LBB0_19
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##       Child Loop BB0_7 Depth 3
	movq	40(%rbx), %rax
	cmpq	$0, (%rax,%r13,8)
	je	LBB0_21
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rbx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_18
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movslq	%r14d, %r14
	xorl	%r13d, %r13d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	16(%rbx), %rax
	movq	$0, (%rax,%r14,8)
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=2
	incq	%r14
	incq	%r13
	movslq	%r8d, %rax
	cmpq	%rax, %r13
	jge	LBB0_17
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_7 Depth 3
	movq	32(%rbx), %rsi
	cmpq	$0, (%rsi,%r14,8)
	je	LBB0_6
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	testl	%r12d, %r12d
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=2
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	$7, %esi
	callq	_get_bits
	movl	%eax, %r15d
	cmpl	$128, %r15d
	jb	LBB0_15
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=2
	movslq	(%rbx), %rcx
	movslq	%r8d, %rdx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rdi
	imulq	%rdx, %rdi
	addq	%r13, %rdi
	leaq	(%rsi,%rdi,8), %rsi
	shlq	$3, %rdx
	movq	%rax, %rdi
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpq	%rcx, %rdi
	jge	LBB0_22
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=3
	movq	40(%rbx), %rax
	cmpq	$0, (%rax,%rdi,8)
	jne	LBB0_22
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=3
	incq	%rdi
	cmpq	$0, (%rsi)
	leaq	(%rsi,%rdx), %rsi
	je	LBB0_7
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	28(%rbx), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	$9, %edx
	movl	$3, %ecx
	callq	_get_vlc2
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %r15d
	addl	$-60, %r15d
	cmpl	$128, %r15d
	jae	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	%r15d, %eax
	movq	8(%rbx), %rcx
	movq	16(%rbx), %rdx
	movq	(%rcx,%rax,8), %rax
	movq	%rax, (%rdx,%r14,8)
	movl	4(%rbx), %r8d
	xorl	%r12d, %r12d
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_14:
	movl	24(%rbx), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%r15d, %ecx
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_20
LBB0_19:
	xorl	%eax, %eax
LBB0_20:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid scale value %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_on2avc_decode_band_scales
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function on2avc_decode_band_scales
_on2avc_decode_band_scales:             ; @on2avc_decode_band_scales
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	x22, #0
	mov	w25, #0
	mov	w23, #1
	mov	w24, #1
                                        ; implicit-def: $w21
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #16]
	add	x0, x8, w25, sxtw #3
	ldrsw	x8, [x19, #4]
	sub	x1, x0, x8, lsl #3
	lsl	w2, w8, #3
	bl	_memcpy
	ldr	w8, [x19, #4]
	add	w25, w8, w25
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x23, x23, #1
	cmp	x22, x8
	b.ge	LBB0_20
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;       Child Loop BB0_13 Depth 3
	ldr	x8, [x19, #40]
	ldr	x8, [x8, x22, lsl #3]
	cbz	x8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x26, #0
	sxtw	x25, w25
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
	ldr	x9, [x19, #16]
	str	xzr, [x9, x25, lsl #3]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	x25, x25, #1
	add	x26, x26, #1
	cmp	x26, w8, sxtw
	b.ge	LBB0_18
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_13 Depth 3
	ldr	x10, [x19, #32]
	ldr	x9, [x10, x25, lsl #3]
	cbz	x9, LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_9 Depth=2
	cbz	w24, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x20
	mov	w1, #7
	bl	_get_bits
	mov	x21, x0
	cmp	w21, #128
	b.lo	LBB0_17
	b	LBB0_19
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=2
	ldrsw	x9, [x19]
	sxtw	x11, w8
	madd	x11, x23, x11, x26
	add	x10, x10, x11, lsl #3
	sbfiz	x11, x8, #3, #32
	mov	x12, x23
LBB0_13:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	cmp	x12, x9
	b.ge	LBB0_7
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=3
	ldr	x13, [x19, #40]
	ldr	x13, [x13, x12, lsl #3]
	cbnz	x13, LBB0_7
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=3
	ldr	x13, [x10]
	add	x12, x12, #1
	add	x10, x10, x11
	cbz	x13, LBB0_13
	b	LBB0_10
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=2
	ldr	w1, [x19, #28]
	mov	x0, x20
	mov	w2, #9
	mov	w3, #3
	bl	_get_vlc2
	add	w8, w21, w0
	sub	w21, w8, #60
	cmp	w21, #128
	b.hs	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_9 Depth=2
	mov	w24, #0
	ldp	x8, x9, [x19, #8]
	ldr	x8, [x8, w21, uxtw #3]
	str	x8, [x9, x25, lsl #3]
	ldr	w8, [x19, #4]
	b	LBB0_8
LBB0_18:                                ;   in Loop: Header=BB0_4 Depth=1
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
	b	LBB0_3
LBB0_19:
	ldr	w0, [x19, #24]
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
	mov	x3, x21
	bl	_av_log
Lloh5:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_21
LBB0_20:
	mov	w0, #0
LBB0_21:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid scale value %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_on2avc_decode_band_scales
.subsections_via_symbols
