	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function truemotion2rt_decode_header
_truemotion2rt_decode_header:           ## @truemotion2rt_decode_header
	.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	$520, %rsp                      ## imm = 0x208
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r13
	leaq	-560(%rbp), %r12
	movl	$512, %esi                      ## imm = 0x200
	movq	%r12, %rdi
	callq	___bzero
	movl	8(%rbx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_9
## %bb.1:
	movq	(%rbx), %rax
	movl	(%rax), %r15d
	leal	(,%r15,8), %edx
	shrl	$5, %r15d
	orl	%edx, %r15d
	andl	$127, %r15d
	cmpl	$9, %r15d
	ja	LBB0_3
## %bb.2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%r15d, %ecx
	jmp	LBB0_10
LBB0_3:
	cmpl	%ecx, %r15d
	jae	LBB0_9
## %bb.4:
	movl	4(%rax), %esi
	leaq	-1(%r15), %rdx
	movl	$1, %ecx
	cmpq	$8, %rdx
	jb	LBB0_19
## %bb.5:
	subq	%rax, %r12
	addq	$-8, %r12
	cmpq	$32, %r12
	jb	LBB0_19
## %bb.6:
	movq	%rdx, %rcx
	andq	$-8, %rcx
	movd	%esi, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	-8(%rcx), %rsi
	movq	%rsi, %rbx
	shrq	$3, %rbx
	incq	%rbx
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.7:
	movq	%rbx, %rdi
	andq	$-2, %rdi
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	8(%rax,%rsi,4), %xmm1
	movdqu	24(%rax,%rsi,4), %xmm2
	movdqa	%xmm1, %xmm3
	palignr	$12, %xmm0, %xmm3               ## xmm3 = xmm0[12,13,14,15],xmm3[0,1,2,3,4,5,6,7,8,9,10,11]
	movdqa	%xmm2, %xmm0
	palignr	$12, %xmm1, %xmm0               ## xmm0 = xmm1[12,13,14,15],xmm0[0,1,2,3,4,5,6,7,8,9,10,11]
	pxor	%xmm1, %xmm3
	pxor	%xmm2, %xmm0
	movdqa	%xmm3, -560(%rbp,%rsi,4)
	movdqa	%xmm0, -544(%rbp,%rsi,4)
	movdqu	40(%rax,%rsi,4), %xmm1
	movdqu	56(%rax,%rsi,4), %xmm0
	movdqa	%xmm1, %xmm3
	palignr	$12, %xmm2, %xmm3               ## xmm3 = xmm2[12,13,14,15],xmm3[0,1,2,3,4,5,6,7,8,9,10,11]
	movdqa	%xmm0, %xmm2
	palignr	$12, %xmm1, %xmm2               ## xmm2 = xmm1[12,13,14,15],xmm2[0,1,2,3,4,5,6,7,8,9,10,11]
	pxor	%xmm1, %xmm3
	pxor	%xmm0, %xmm2
	movdqa	%xmm3, -528(%rbp,%rsi,4)
	movdqa	%xmm2, -512(%rbp,%rsi,4)
	addq	$16, %rsi
	addq	$-2, %rdi
	jne	LBB0_8
	jmp	LBB0_15
LBB0_9:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
LBB0_10:
	callq	_av_log
LBB0_11:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_28
## %bb.13:
	movl	%r15d, %eax
	addq	$520, %rsp                      ## imm = 0x208
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	xorl	%esi, %esi
LBB0_15:
	testb	$1, %bl
	je	LBB0_17
## %bb.16:
	leaq	(,%rsi,4), %rdi
	orq	$8, %rdi
	movdqu	(%rax,%rdi), %xmm1
	movdqa	%xmm1, %xmm2
	palignr	$12, %xmm0, %xmm2               ## xmm2 = xmm0[12,13,14,15],xmm2[0,1,2,3,4,5,6,7,8,9,10,11]
	movdqu	16(%rax,%rdi), %xmm0
	movdqa	%xmm0, %xmm3
	palignr	$12, %xmm1, %xmm3               ## xmm3 = xmm1[12,13,14,15],xmm3[0,1,2,3,4,5,6,7,8,9,10,11]
	pxor	%xmm1, %xmm2
	pxor	%xmm0, %xmm3
	movdqa	%xmm2, -560(%rbp,%rsi,4)
	movdqa	%xmm3, -544(%rbp,%rsi,4)
LBB0_17:
	cmpq	%rcx, %rdx
	je	LBB0_23
## %bb.18:
	orq	$1, %rcx
	pextrd	$3, %xmm0, %esi
LBB0_19:
	movl	%r15d, %ebx
	subl	%ecx, %ebx
	movq	%rcx, %r8
	notq	%r8
	addq	%r15, %r8
	andq	$3, %rbx
	je	LBB0_26
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	leaq	1(%rcx), %rdx
	movl	4(%rax,%rcx,4), %edi
	xorl	%edi, %esi
	movl	%esi, -564(%rbp,%rcx,4)
	movl	%edi, %esi
	movq	%rdx, %rcx
	decq	%rbx
	jne	LBB0_20
## %bb.21:
	cmpq	$3, %r8
	jb	LBB0_23
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%rax,%rdx,4), %ecx
	xorl	%ecx, %edi
	movl	%edi, -564(%rbp,%rdx,4)
	movl	8(%rax,%rdx,4), %esi
	xorl	%esi, %ecx
	movl	%ecx, -560(%rbp,%rdx,4)
	movl	12(%rax,%rdx,4), %ecx
	xorl	%ecx, %esi
	movl	%esi, -556(%rbp,%rdx,4)
	movl	16(%rax,%rdx,4), %edi
	xorl	%edi, %ecx
	movl	%ecx, -552(%rbp,%rdx,4)
	leaq	4(%rdx), %rcx
	movq	%rcx, %rdx
	cmpq	%rcx, %r15
	jne	LBB0_22
LBB0_23:
	movl	-556(%rbp), %eax
	movl	%eax, (%r13)
	cmpl	$1, -548(%rbp)
	movl	$2, %ecx
	sbbl	$0, %ecx
	movl	%ecx, 4(%r13)
	addl	$-5, %eax
	cmpl	$-4, %eax
	jbe	LBB0_11
## %bb.24:
	leaq	-540(%rbp), %rdi
	callq	_AV_RL16
	movl	%eax, %ebx
	leaq	-532(%rbp), %rdi
	callq	_AV_RL16
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_ff_set_dimensions
	testl	%eax, %eax
	js	LBB0_27
## %bb.25:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	movl	%r15d, %ecx
	callq	_av_log
	jmp	LBB0_12
LBB0_26:
	movl	%esi, %edi
	movq	%rcx, %rdx
	cmpq	$3, %r8
	jae	LBB0_22
	jmp	LBB0_23
LBB0_27:
	movl	%eax, %r15d
	jmp	LBB0_12
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"input packet too small (%d)\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"invalid header size (%d)\n"

	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.2:                               ## @.str.2
	.asciz	"Header size: %d\n"

	.no_dead_strip	_truemotion2rt_decode_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function truemotion2rt_decode_header
_truemotion2rt_decode_header:           ; @truemotion2rt_decode_header
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #528
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x8, [x0]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #480]
	stp	q0, q0, [sp, #448]
	stp	q0, q0, [sp, #416]
	stp	q0, q0, [sp, #384]
	stp	q0, q0, [sp, #352]
	stp	q0, q0, [sp, #320]
	stp	q0, q0, [sp, #288]
	stp	q0, q0, [sp, #256]
	stp	q0, q0, [sp, #224]
	stp	q0, q0, [sp, #192]
	stp	q0, q0, [sp, #160]
	stp	q0, q0, [sp, #128]
	stp	q0, q0, [sp, #96]
	stp	q0, q0, [sp, #64]
	stp	q0, q0, [sp, #32]
	stp	q0, q0, [sp]
	ldr	w3, [x1, #8]
	cmp	w3, #0
	b.le	LBB0_12
; %bb.1:
	ldr	x9, [x1]
	ldr	w10, [x9]
	lsr	w11, w10, #5
	orr	w10, w11, w10, lsl #3
	and	x20, x10, #0x7f
	cmp	w20, #9
	b.hi	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	b	LBB0_13
LBB0_3:
	cmp	w20, w3
	b.hs	LBB0_12
; %bb.4:
	ldr	w11, [x9, #4]
	sub	x12, x20, #1
	cmp	x12, #16
	b.lo	LBB0_6
; %bb.5:
	mov	x14, sp
	sub	x10, x14, x9
	sub	x10, x10, #8
	cmp	x10, #64
	b.hs	LBB0_17
LBB0_6:
	mov	w10, #1
LBB0_7:
	lsl	x13, x10, #2
	mov	x12, sp
	add	x12, x13, x12
	sub	x12, x12, #4
	sub	x10, x20, x10
	add	x9, x13, x9
	add	x9, x9, #4
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x9], #4
	eor	w11, w13, w11
	str	w11, [x12], #4
	mov	x11, x13
	subs	x10, x10, #1
	b.ne	LBB0_8
LBB0_9:
	ldr	w9, [sp, #4]
	str	w9, [x8]
	ldr	w10, [sp, #12]
	cmp	w10, #0
	mov	w10, #1
	cinc	w10, w10, ne
	str	w10, [x8, #4]
	sub	w8, w9, #5
	cmn	w8, #4
	b.ls	LBB0_14
; %bb.10:
	mov	x22, sp
	add	x0, x22, #20
	bl	_AV_RL16
	mov	x21, x0
	add	x0, x22, #28
	bl	_AV_RL16
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	bl	_ff_set_dimensions
	tbnz	w0, #31, LBB0_21
; %bb.11:
Lloh8:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str.2@PAGE
Lloh12:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_av_log
	b	LBB0_15
LBB0_12:
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str@PAGE
Lloh17:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
LBB0_13:
	bl	_av_log
LBB0_14:
Lloh18:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh20:
	ldr	w20, [x8]
LBB0_15:
	ldur	x8, [x29, #-56]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.16:
	mov	x0, x20
	add	sp, sp, #528
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_17:
	and	x13, x12, #0xfffffffffffffff0
	orr	x10, x13, #0x1
	dup.4s	v0, w11
	add	x11, x9, #40
	add	x14, x14, #32
	mov	x15, x13
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x11, #-32]
	ext.16b	v3, v0, v1, #12
	ldp	q4, q0, [x11], #64
	ext.16b	v5, v1, v2, #12
	ext.16b	v6, v2, v4, #12
	ext.16b	v7, v4, v0, #12
	eor.16b	v1, v1, v3
	eor.16b	v2, v2, v5
	eor.16b	v3, v4, v6
	eor.16b	v4, v0, v7
	stp	q1, q2, [x14, #-32]
	stp	q3, q4, [x14], #64
	subs	x15, x15, #16
	b.ne	LBB0_18
; %bb.19:
	cmp	x12, x13
	b.eq	LBB0_9
; %bb.20:
	mov.s	w11, v0[3]
	b	LBB0_7
LBB0_21:
	mov	x20, x0
	b	LBB0_15
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"input packet too small (%d)\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"invalid header size (%d)\n"

	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.2:                               ; @.str.2
	.asciz	"Header size: %d\n"

	.no_dead_strip	_truemotion2rt_decode_header
.subsections_via_symbols
