	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_rstn
_handle_rstn:                           ## @handle_rstn
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r13d, %r13d
	cmpq	$0, 32(%rdi)
	je	LBB0_32
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %r12
	decq	(%rdi)
	jne	LBB0_20
## %bb.2:
	movq	24(%r12), %rax
	movq	(%rax), %rax
	movq	_AV_CODEC_ID_THP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.3:
	leaq	20(%r12), %r14
	movq	%r14, %rdi
	callq	_align_get_bits
	testl	%r15d, %r15d
	jle	LBB0_20
## %bb.4:
	movq	8(%r12), %rax
	movl	%r15d, %ebx
	cmpl	$8, %r15d
	jb	LBB0_5
## %bb.6:
	cmpq	%r14, %rax
	jae	LBB0_9
## %bb.7:
	leaq	(%rax,%rbx,4), %rcx
	leaq	16(%r12), %rdx
	cmpq	%rcx, %rdx
	jae	LBB0_9
LBB0_5:
	xorl	%esi, %esi
LBB0_16:
	movq	%rsi, %r8
	notq	%r8
	addq	%rbx, %r8
	movq	%rbx, %rdx
	andq	$3, %rdx
	je	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movzbl	16(%r12), %ecx
	movl	$4, %edi
	shll	%cl, %edi
	movl	%edi, (%rax,%rsi,4)
	incq	%rsi
	decq	%rdx
	jne	LBB0_17
LBB0_18:
	cmpq	$3, %r8
	jb	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movzbl	16(%r12), %ecx
	movl	$4, %edx
	shll	%cl, %edx
	movl	%edx, (%rax,%rsi,4)
	movzbl	16(%r12), %ecx
	movl	$4, %edx
	shll	%cl, %edx
	movl	%edx, 4(%rax,%rsi,4)
	movzbl	16(%r12), %ecx
	movl	$4, %edx
	shll	%cl, %edx
	movl	%edx, 8(%rax,%rsi,4)
	movzbl	16(%r12), %ecx
	movl	$4, %edx
	shll	%cl, %edx
	movl	%edx, 12(%rax,%rsi,4)
	addq	$4, %rsi
	cmpq	%rsi, %rbx
	jne	LBB0_19
	jmp	LBB0_20
LBB0_9:
	movl	%ebx, %esi
	andl	$-8, %esi
	leaq	-8(%rsi), %rcx
	movq	%rcx, %rdx
	shrq	$3, %rdx
	incq	%rdx
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.10:
	movq	%rdx, %rcx
	andq	$-2, %rcx
	movd	16(%r12), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movl	$4, %edi
	movd	%edi, %xmm1
	pslld	%xmm0, %xmm1
	pshufd	$0, %xmm1, %xmm0                ## xmm0 = xmm1[0,0,0,0]
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, (%rax,%rdi,4)
	movdqu	%xmm0, 16(%rax,%rdi,4)
	movdqu	%xmm0, 32(%rax,%rdi,4)
	movdqu	%xmm0, 48(%rax,%rdi,4)
	addq	$16, %rdi
	addq	$-2, %rcx
	jne	LBB0_11
	jmp	LBB0_13
LBB0_12:
	xorl	%edi, %edi
LBB0_13:
	testb	$1, %dl
	je	LBB0_15
## %bb.14:
	movd	16(%r12), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movl	$4, %ecx
	movd	%ecx, %xmm1
	pslld	%xmm0, %xmm1
	pshufd	$0, %xmm1, %xmm0                ## xmm0 = xmm1[0,0,0,0]
	movdqu	%xmm0, (%rax,%rdi,4)
	movdqu	%xmm0, 16(%rax,%rdi,4)
LBB0_15:
	cmpq	%rbx, %rsi
	jne	LBB0_16
LBB0_20:
	leaq	20(%r12), %r14
	movq	%r14, %rdi
	callq	_get_bits_count
	cmpq	$0, (%r12)
	jne	LBB0_32
## %bb.21:
	movl	%eax, %ebx
	negl	%ebx
	andl	$7, %ebx
	orl	$8, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_show_bits
	movl	$-1, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	notl	%edx
	cmpl	%edx, %eax
	je	LBB0_23
## %bb.22:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_show_bits
	cmpl	$255, %eax
	jne	LBB0_32
LBB0_23:
	movq	%r14, %rdi
	callq	_get_bits_count
	movl	%eax, %r13d
	movq	%r14, %rdi
	callq	_align_get_bits
	movq	%r14, %rdi
	callq	_get_bits_left
	cmpl	$8, %eax
	jl	LBB0_26
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	$8, %esi
	callq	_show_bits
	cmpl	$255, %eax
	jne	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	movq	%r14, %rdi
	movl	$8, %esi
	callq	_skip_bits
	movq	%r14, %rdi
	callq	_get_bits_left
	cmpl	$7, %eax
	jg	LBB0_24
LBB0_26:
	movq	%r14, %rdi
	callq	_get_bits_left
	cmpl	$8, %eax
	jl	LBB0_31
## %bb.27:
	movq	%r14, %rdi
	movl	$8, %esi
	callq	_get_bits
	andl	$248, %eax
	cmpl	$208, %eax
	jne	LBB0_31
## %bb.28:
	movl	$1, %r13d
	testl	%r15d, %r15d
	jle	LBB0_32
## %bb.29:
	movq	8(%r12), %rax
	movl	%r15d, %ebx
	cmpl	$8, %r15d
	jb	LBB0_30
## %bb.33:
	cmpq	%r14, %rax
	jae	LBB0_36
## %bb.34:
	leaq	(%rax,%rbx,4), %rcx
	leaq	16(%r12), %rdx
	cmpq	%rcx, %rdx
	jae	LBB0_36
LBB0_30:
	xorl	%esi, %esi
LBB0_43:
	movq	%rsi, %r8
	notq	%r8
	addq	%rbx, %r8
	movq	%rbx, %rdx
	andq	$3, %rdx
	je	LBB0_45
	.p2align	4, 0x90
LBB0_44:                                ## =>This Inner Loop Header: Depth=1
	movzbl	16(%r12), %ecx
	movl	$4, %edi
	shll	%cl, %edi
	movl	%edi, (%rax,%rsi,4)
	incq	%rsi
	decq	%rdx
	jne	LBB0_44
LBB0_45:
	cmpq	$3, %r8
	jb	LBB0_32
	.p2align	4, 0x90
LBB0_46:                                ## =>This Inner Loop Header: Depth=1
	movzbl	16(%r12), %ecx
	movl	$4, %edx
	shll	%cl, %edx
	movl	%edx, (%rax,%rsi,4)
	movzbl	16(%r12), %ecx
	movl	$4, %edx
	shll	%cl, %edx
	movl	%edx, 4(%rax,%rsi,4)
	movzbl	16(%r12), %ecx
	movl	$4, %edx
	shll	%cl, %edx
	movl	%edx, 8(%rax,%rsi,4)
	movzbl	16(%r12), %ecx
	movl	$4, %edx
	shll	%cl, %edx
	movl	%edx, 12(%rax,%rsi,4)
	addq	$4, %rsi
	cmpq	%rsi, %rbx
	jne	LBB0_46
	jmp	LBB0_32
LBB0_31:
	movq	%r14, %rdi
	callq	_get_bits_count
	subl	%eax, %r13d
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_skip_bits_long
	xorl	%r13d, %r13d
LBB0_32:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_36:
	movl	%ebx, %esi
	andl	$-8, %esi
	leaq	-8(%rsi), %rcx
	movq	%rcx, %rdx
	shrq	$3, %rdx
	incq	%rdx
	testq	%rcx, %rcx
	je	LBB0_39
## %bb.37:
	movq	%rdx, %rcx
	andq	$-2, %rcx
	movd	16(%r12), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movl	$4, %edi
	movd	%edi, %xmm1
	pslld	%xmm0, %xmm1
	pshufd	$0, %xmm1, %xmm0                ## xmm0 = xmm1[0,0,0,0]
	xorl	%edi, %edi
LBB0_38:                                ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, (%rax,%rdi,4)
	movdqu	%xmm0, 16(%rax,%rdi,4)
	movdqu	%xmm0, 32(%rax,%rdi,4)
	movdqu	%xmm0, 48(%rax,%rdi,4)
	addq	$16, %rdi
	addq	$-2, %rcx
	jne	LBB0_38
	jmp	LBB0_40
LBB0_39:
	xorl	%edi, %edi
LBB0_40:
	testb	$1, %dl
	je	LBB0_42
## %bb.41:
	movd	16(%r12), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movl	$4, %ecx
	movd	%ecx, %xmm1
	pslld	%xmm0, %xmm1
	pshufd	$0, %xmm1, %xmm0                ## xmm0 = xmm1[0,0,0,0]
	movdqu	%xmm0, (%rax,%rdi,4)
	movdqu	%xmm0, 16(%rax,%rdi,4)
LBB0_42:
	cmpq	%rbx, %rsi
	je	LBB0_32
	jmp	LBB0_43
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_CODEC_ID_THP,8,3            ## @AV_CODEC_ID_THP
	.no_dead_strip	_handle_rstn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_rstn
_handle_rstn:                           ; @handle_rstn
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_26
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	subs	x8, x8, #1
	str	x8, [x0]
	b.ne	LBB0_10
; %bb.2:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _AV_CODEC_ID_THP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_CODEC_ID_THP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.3:
	add	x0, x19, #20
	bl	_align_get_bits
	cmp	w20, #1
	b.lt	LBB0_10
; %bb.4:
	ldr	x9, [x19, #8]
	mov	w8, w20
	cmp	w20, #16
	b.lo	LBB0_7
; %bb.5:
	add	x10, x19, #20
	cmp	x9, x10
	b.hs	LBB0_28
; %bb.6:
	add	x10, x9, x8, lsl #2
	add	x11, x19, #16
	cmp	x11, x10
	b.hs	LBB0_28
LBB0_7:
	mov	x10, #0
LBB0_8:
	add	x9, x9, x10, lsl #2
	sub	x8, x8, x10
	mov	w10, #4
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x19, #16]
	lsl	w11, w10, w11
	str	w11, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_9
LBB0_10:
	add	x21, x19, #20
	mov	x0, x21
	bl	_get_bits_count
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19]
	cbnz	x9, LBB0_27
; %bb.11:
	neg	w8, w8
	mov	w22, #8
	bfxil	w22, w8, #0, #3
	mov	x0, x21
	mov	x1, x22
	bl	_show_bits
	mov	w8, #-1
	lsl	w8, w8, w22
	mvn	w8, w8
	cmp	w0, w8
	b.eq	LBB0_13
; %bb.12:
	mov	x0, x21
	mov	x1, x22
	bl	_show_bits
	cmp	w0, #255
	b.ne	LBB0_26
LBB0_13:
	mov	x0, x21
	bl	_get_bits_count
	mov	x22, x0
	mov	x0, x21
	bl	_align_get_bits
	mov	x0, x21
	bl	_get_bits_left
	cmp	w0, #8
	b.lt	LBB0_16
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	w1, #8
	bl	_show_bits
	cmp	w0, #255
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x21
	mov	w1, #8
	bl	_skip_bits
	mov	x0, x21
	bl	_get_bits_left
	cmp	w0, #7
	b.gt	LBB0_14
LBB0_16:
	mov	x0, x21
	bl	_get_bits_left
	cmp	w0, #8
	b.lt	LBB0_25
; %bb.17:
	mov	x0, x21
	mov	w1, #8
	bl	_get_bits
	and	w8, w0, #0xf8
	cmp	w8, #208
	b.ne	LBB0_25
; %bb.18:
	cmp	w20, #1
	b.lt	LBB0_34
; %bb.19:
	ldr	x9, [x19, #8]
	mov	w8, w20
	cmp	w20, #16
	b.lo	LBB0_22
; %bb.20:
	add	x10, x19, #20
	cmp	x9, x10
	b.hs	LBB0_31
; %bb.21:
	add	x10, x9, x8, lsl #2
	add	x11, x19, #16
	cmp	x11, x10
	b.hs	LBB0_31
LBB0_22:
	mov	x10, #0
LBB0_23:
	add	x9, x9, x10, lsl #2
	sub	x8, x8, x10
	mov	w10, #4
	mov	w0, #1
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x19, #16]
	lsl	w11, w10, w11
	str	w11, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_24
	b	LBB0_27
LBB0_25:
	mov	x0, x21
	bl	_get_bits_count
	sub	w1, w22, w0
	mov	x0, x21
	bl	_skip_bits_long
LBB0_26:
	mov	w0, #0
LBB0_27:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_28:
	and	x10, x8, #0xfffffff0
	ldr	s0, [x19, #16]
	movi.4s	v1, #4
	ushl.4s	v0, v1, v0
	dup.4s	v0, v0[0]
	add	x11, x9, #32
	mov	x12, x10
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	stp	q0, q0, [x11, #-32]
	stp	q0, q0, [x11], #64
	subs	x12, x12, #16
	b.ne	LBB0_29
; %bb.30:
	cmp	x10, x8
	b.eq	LBB0_10
	b	LBB0_8
LBB0_31:
	and	x10, x8, #0xfffffff0
	ldr	s0, [x19, #16]
	movi.4s	v1, #4
	ushl.4s	v0, v1, v0
	dup.4s	v0, v0[0]
	add	x11, x9, #32
	mov	x12, x10
LBB0_32:                                ; =>This Inner Loop Header: Depth=1
	stp	q0, q0, [x11, #-32]
	stp	q0, q0, [x11], #64
	subs	x12, x12, #16
	b.ne	LBB0_32
; %bb.33:
	cmp	x10, x8
	b.ne	LBB0_23
LBB0_34:
	mov	w0, #1
	b	LBB0_27
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_CODEC_ID_THP,8,3            ; @AV_CODEC_ID_THP
	.no_dead_strip	_handle_rstn
.subsections_via_symbols
