	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tm2_read_deltas
_tm2_read_deltas:                       ## @tm2_read_deltas
	.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	%esi, %r12d
	movq	%rdi, %r15
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	movl	$9, %esi
	callq	_get_bits
	movl	%eax, %r13d
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_get_bits
	movl	%eax, %ebx
	xorl	%edi, %edi
	cmpl	$32, %eax
	setl	%dil
	callq	_av_assert2
	testl	%r13d, %r13d
	jle	LBB0_9
## %bb.1:
	movq	_TM2_DELTAS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jg	LBB0_9
## %bb.2:
	testl	%ebx, %ebx
	jle	LBB0_9
## %bb.3:
	leal	-1(%rbx), %ecx
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	$-1, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movslq	%r12d, %r12
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, %r14
	movl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_get_bits_long
	movl	%eax, %ecx
	andl	-52(%rbp), %ecx                 ## 4-byte Folded Reload
	cmovnel	-48(%rbp), %ecx                 ## 4-byte Folded Reload
	addl	%eax, %ecx
	movq	(%r15), %rax
	movq	(%rax,%r12,8), %rax
	movl	%ecx, (%rax,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_4
## %bb.5:
	xorl	%eax, %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	_TM2_DELTAS@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jge	LBB0_8
## %bb.6:
	movq	(%r15), %rcx
	movq	(%rcx,%r12,8), %rcx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rcx,%r13,4)
	incq	%r13
	cmpl	%r13d, (%rdx)
	jg	LBB0_7
	jmp	LBB0_8
LBB0_9:
	movl	12(%r15), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TM2_DELTAS,4,2                 ## @TM2_DELTAS
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Incorrect delta table: %i deltas x %i bits\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tm2_read_deltas
_tm2_read_deltas:                       ; @tm2_read_deltas
	.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	x23, x1
	mov	x19, x0
	add	x21, x0, #8
	mov	x0, x21
	mov	w1, #9
	bl	_get_bits
	mov	x20, x0
	mov	x0, x21
	mov	w1, #5
	bl	_get_bits
	mov	x22, x0
	cmp	w0, #32
	cset	w0, lt
	bl	_av_assert2
	cmp	w20, #1
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _TM2_DELTAS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TM2_DELTAS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w20, w8
	ccmp	w22, #1, #8, le
	b.ge	LBB0_3
LBB0_2:
	ldr	w0, [x19, #12]
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x20
	mov	x4, x22
	bl	_av_log
Lloh8:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_3:
	mov	x25, #0
	sub	w8, w22, #1
	mov	w9, #1
	lsl	w27, w9, w8
	mov	w8, #-1
	lsl	w28, w8, w22
	sxtw	x26, w23
	mov	w23, w20
	lsl	x24, x23, #2
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_get_bits_long
	tst	w0, w27
	csel	w8, wzr, w28, eq
	add	w8, w0, w8
	ldr	x9, [x19]
	ldr	x9, [x9, x26, lsl #3]
	str	w8, [x9, x25]
	add	x25, x25, #4
	cmp	x24, x25
	b.ne	LBB0_4
; %bb.5:
Lloh11:
	adrp	x10, _TM2_DELTAS@GOTPAGE
Lloh12:
	ldr	x10, [x10, _TM2_DELTAS@GOTPAGEOFF]
	ldr	w8, [x10]
	cmp	w20, w8
	b.ge	LBB0_8
; %bb.6:
	ldr	x8, [x19]
	ldr	x8, [x8, x26, lsl #3]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [x8, x23, lsl #2]
	add	x23, x23, #1
	ldr	w9, [x10]
	cmp	w9, w23
	b.gt	LBB0_7
LBB0_8:
	mov	w0, #0
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_TM2_DELTAS,4,2                 ; @TM2_DELTAS
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Incorrect delta table: %i deltas x %i bits\n"

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