	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mov_write_ctts_tag
_mov_write_ctts_tag:                    ## @mov_write_ctts_tag
	.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
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	(%rdi), %rbx
	movl	(%rdx), %edi
	incl	%edi
	movl	$16, %esi
	callq	_av_malloc_array
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	%rax, %r14
	movl	$1, (%rax)
	movq	8(%r15), %rax
	movq	(%rax), %rdx
	movq	%rdx, 8(%r14)
	movl	(%r15), %ecx
	cmpl	$2, %ecx
	jl	LBB0_2
## %bb.3:
	movl	$1, %esi
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r15
	movq	%r15, %rdx
	shlq	$4, %rdx
	movq	%rdi, 8(%r14,%rdx)
	movl	$1, (%r14,%rdx)
	movq	%rdi, %rdx
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rsi
	cmpq	%rsi, %rcx
	je	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rsi,8), %rdi
	cmpq	%rdx, %rdi
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	shlq	$4, %rdi
	incl	(%r14,%rdi)
	jmp	LBB0_7
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_2:
	xorl	%r15d, %r15d
LBB0_8:
	leaq	1(%r15), %r12
	leaq	16(,%r12,8), %rsi
	movq	%r13, %rdi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	callq	_avio_wb32
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_ffio_wfourcc
	movq	_FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%esi, %esi
	andl	(%rbx), %eax
	setne	%sil
	movq	%r13, %rdi
	callq	_avio_w8
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_avio_wb24
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_avio_wb32
	incq	%r15
	je	LBB0_11
## %bb.9:
	movq	%r14, %rbx
	addq	$8, %rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movslq	-8(%rbx), %rsi
	movq	%r13, %rdi
	callq	_avio_wb32
	movq	(%rbx), %rsi
	movq	%r13, %rdi
	callq	_avio_wb32
	addq	$16, %rbx
	decq	%r15
	jne	LBB0_10
LBB0_11:
	movq	%r14, %rdi
	callq	_av_free
	movq	-48(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ctts"

	.comm	_FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS,4,2 ## @FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS
	.no_dead_strip	_mov_write_ctts_tag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mov_write_ctts_tag
_mov_write_ctts_tag:                    ; @mov_write_ctts_tag
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x19, x1
	ldr	x23, [x0]
	ldr	w8, [x2]
	add	w0, w8, #1
	mov	w1, #16
	bl	_av_malloc_array
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	mov	w8, #1
	str	w8, [x0]
	ldr	x11, [x21, #8]
	ldr	x10, [x11]
	str	x10, [x0, #8]
	ldr	w12, [x21]
	cmp	w12, #2
	b.lt	LBB0_8
; %bb.2:
	mov	x9, #0
	add	x11, x11, #8
	sub	x12, x12, #1
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #1
	add	x10, x20, x9, lsl #4
	str	x13, [x10, #8]
	str	w8, [x10]
	mov	x10, x13
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x11, x11, #8
	subs	x12, x12, #1
	b.eq	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x11]
	cmp	x13, x10
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	lsl	x13, x9, #4
	ldr	w14, [x20, x13]
	add	w14, w14, #1
	str	w14, [x20, x13]
	b	LBB0_4
LBB0_7:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_8:
	mov	x9, #0
LBB0_9:
	adds	x22, x9, #1
	cset	w24, hs
	lsl	x8, x22, #3
	add	x21, x8, #16
	mov	x0, x19
	mov	x1, x21
	bl	_avio_wb32
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ffio_wfourcc
	ldr	w8, [x23]
Lloh5:
	adrp	x9, _FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w1, ne
	mov	x0, x19
	bl	_avio_w8
	mov	x0, x19
	mov	w1, #0
	bl	_avio_wb24
	mov	x0, x19
	mov	x1, x22
	bl	_avio_wb32
	tbnz	w24, #0, LBB0_12
; %bb.10:
	add	x23, x20, #8
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldursw	x1, [x23, #-8]
	mov	x0, x19
	bl	_avio_wb32
	ldr	x1, [x23], #16
	mov	x0, x19
	bl	_avio_wb32
	subs	x22, x22, #1
	b.ne	LBB0_11
LBB0_12:
	mov	x0, x20
	bl	_av_free
	mov	x0, x21
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ctts"

	.comm	_FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS,4,2 ; @FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS
	.no_dead_strip	_mov_write_ctts_tag
.subsections_via_symbols
