	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_gain_control
_decode_gain_control:                   ## @decode_gain_control
	.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
                                        ## kill: def $edx killed $edx def $rdx
	movq	(%rsi), %r14
	testl	%edx, %edx
	js	LBB0_1
## %bb.10:
	movq	%rdi, %rbx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	leal	1(%rdx), %edi
	xorl	%r15d, %r15d
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	incq	%r15
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	cmpq	%rdi, %r15
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_2
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movq	%rbx, %rdi
	movl	$3, %esi
	callq	_get_bits
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	leaq	(%r15,%r15,2), %rcx
	movl	%eax, (%r14,%rcx,8)
	testl	%eax, %eax
	jle	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %r14
	movq	8(%rax,%rcx,8), %r12
	movq	16(%rax,%rcx,8), %r13
	xorl	%r15d, %r15d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=2
	incq	%r15
	movslq	(%r14), %rax
	cmpq	%rax, %r15
	jge	LBB0_18
LBB0_13:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_get_bits
	movl	%eax, (%r12,%r15,4)
	movq	%rbx, %rdi
	movl	$5, %esi
	callq	_get_bits
	movl	%eax, (%r13,%r15,4)
	testq	%r15, %r15
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	cmpl	%eax, -4(%r13,%r15,4)
	jl	LBB0_17
## %bb.15:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_1:
	xorl	%edi, %edi
LBB0_3:
	movl	%edi, %ecx
	negl	%edi
	movq	%rcx, %rsi
	andq	$3, %rdi
	je	LBB0_7
## %bb.4:
	leaq	(%rcx,%rcx,2), %rax
	leaq	(%r14,%rax,8), %rax
	negq	%rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rax)
	decq	%rdx
	addq	$24, %rax
	cmpq	%rdx, %rdi
	jne	LBB0_5
## %bb.6:
	movq	%rcx, %rsi
	subq	%rdx, %rsi
LBB0_7:
	decq	%rcx
	xorl	%eax, %eax
	cmpq	$3, %rcx
	jb	LBB0_16
## %bb.8:
	shlq	$3, %rsi
	leaq	(%rsi,%rsi,2), %rcx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%r14,%rcx)
	movl	$0, 24(%r14,%rcx)
	movl	$0, 48(%r14,%rcx)
	movl	$0, 72(%r14,%rcx)
	addq	$96, %rcx
	cmpq	$96, %rcx
	jne	LBB0_9
LBB0_16:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%eax, %eax
	cmpl	$2, -56(%rbp)                   ## 4-byte Folded Reload
	jbe	LBB0_3
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_decode_gain_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_gain_control
_decode_gain_control:                   ; @decode_gain_control
	.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
	ldr	x21, [x1]
	tbnz	w2, #31, LBB0_9
; %bb.1:
	mov	x19, x2
	mov	x20, x0
	mov	x23, #0
	add	w22, w2, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	cmp	x23, x22
	b.eq	LBB0_19
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	mov	x0, x20
	mov	w1, #3
	bl	_get_bits
	mov	w8, #24
	madd	x25, x23, x8, x21
	str	w0, [x25]
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, #0
	ldp	x27, x28, [x25, #8]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x26, x26, #1
	ldrsw	x8, [x25]
	cmp	x26, x8
	b.ge	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x20
	mov	w1, #4
	bl	_get_bits
	lsl	x24, x26, #2
	str	w0, [x27, x24]
	mov	x0, x20
	mov	w1, #5
	bl	_get_bits
	str	w0, [x28, x24]
	cbz	x26, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x8, x28, x26, lsl #2
	ldur	w8, [x8, #-4]
	cmp	w8, w0
	b.lt	LBB0_5
; %bb.8:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_18
LBB0_9:
	mov	w22, #0
LBB0_10:
	mov	w11, w22
	mov	w8, #4
	sub	x9, x8, x11
	cmp	x9, #4
	b.hs	LBB0_12
; %bb.11:
	mov	x8, x11
	b	LBB0_15
LBB0_12:
	and	x10, x9, #0xfffffffffffffffc
	add	x8, x10, x11
	mov	w12, #24
	madd	x11, x11, x12, x21
	add	x11, x11, #48
	mov	x12, x10
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	stur	wzr, [x11, #-48]
	stur	wzr, [x11, #-24]
	str	wzr, [x11]
	str	wzr, [x11, #24]
	add	x11, x11, #96
	subs	x12, x12, #4
	b.ne	LBB0_13
; %bb.14:
	cmp	x9, x10
	b.eq	LBB0_17
LBB0_15:
	mov	w9, #24
	madd	x9, x8, x9, x21
	sub	x8, x8, #4
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	str	wzr, [x9], #24
	adds	x8, x8, #1
	b.lo	LBB0_16
LBB0_17:
	mov	w0, #0
LBB0_18:
	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
LBB0_19:
	cmp	w19, #2
	b.ls	LBB0_10
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_decode_gain_control
.subsections_via_symbols
