	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mov_write_tfhd_tag
_mov_write_tfhd_tag:                    ## @mov_write_tfhd_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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r13
	callq	_avio_tell
	movq	_MOV_TFHD_DEFAULT_SIZE@GOTPCREL(%rip), %r14
	movq	_MOV_TFHD_DEFAULT_DURATION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%r14), %ebx
	movq	_MOV_TFHD_BASE_DATA_OFFSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, %ebx
	cmpl	$0, (%r15)
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	jne	LBB0_1
## %bb.2:
	movq	_MOV_TFHD_DURATION_IS_EMPTY@GOTPCREL(%rip), %rdx
	jmp	LBB0_3
LBB0_1:
	movq	_MOV_TFHD_DEFAULT_FLAGS@GOTPCREL(%rip), %rdx
LBB0_3:
	movl	(%rdx), %edx
	orl	%ebx, %edx
	movl	(%r12), %esi
	movq	_FF_MOV_FLAG_OMIT_TFHD_OFFSET@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	andl	%esi, %edi
	notl	%ecx
	andl	%edx, %ecx
	testl	%edi, %edi
	cmovnel	%ecx, %edx
	movq	_FF_MOV_FLAG_DEFAULT_BASE_MOOF@GOTPCREL(%rip), %rdi
	andl	(%rdi), %esi
	movq	_MOV_TFHD_DEFAULT_BASE_IS_MOOF@GOTPCREL(%rip), %rdi
	orl	(%rdi), %ecx
	testl	%esi, %esi
	cmovel	%edx, %ecx
	movq	8(%r15), %rdx
	movq	_MODE_ISM@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	notl	%ebx
	movl	$-1, %r12d
	cmovel	%ebx, %r12d
	andl	%ecx, %r12d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_avio_wb32
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_ffio_wfourcc
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_avio_w8
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_avio_wb24
	movl	16(%r15), %esi
	movq	%r13, %rdi
	callq	_avio_wb32
	movq	_MOV_TFHD_BASE_DATA_OFFSET@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_avio_wb64
LBB0_5:
	movq	_MOV_TFHD_DEFAULT_DURATION@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_get_cluster_duration
	movl	%eax, 20(%r15)
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_avio_wb32
LBB0_7:
	testl	%r12d, (%r14)
	je	LBB0_12
## %bb.8:
	cmpl	$0, (%r15)
	je	LBB0_9
## %bb.10:
	movq	40(%r15), %rax
	movl	(%rax), %esi
	jmp	LBB0_11
LBB0_12:
	movl	$-1, 24(%r15)
	jmp	LBB0_13
LBB0_9:
	movl	$1, %esi
LBB0_11:
	movl	%esi, 24(%r15)
	movq	%r13, %rdi
	callq	_avio_wb32
LBB0_13:
	movq	_MOV_TFHD_DEFAULT_FLAGS@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_20
## %bb.14:
	cmpl	$2, (%r15)
	jl	LBB0_16
## %bb.15:
	movq	40(%r15), %rsi
	addq	$4, %rsi
	movq	%r15, %rdi
	callq	_get_sample_flags
	movl	%eax, %esi
	jmp	LBB0_19
LBB0_16:
	movq	32(%r15), %rax
	movq	(%rax), %rax
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_17
## %bb.18:
	movq	_MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_19
LBB0_17:
	movq	_MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES@GOTPCREL(%rip), %rax
	movq	_MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
LBB0_19:
	movl	%esi, 28(%r15)
	movq	%r13, %rdi
	callq	_avio_wb32
LBB0_20:
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_update_size                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MOV_TFHD_DEFAULT_SIZE,4,2      ## @MOV_TFHD_DEFAULT_SIZE
	.comm	_MOV_TFHD_DEFAULT_DURATION,4,2  ## @MOV_TFHD_DEFAULT_DURATION
	.comm	_MOV_TFHD_BASE_DATA_OFFSET,4,2  ## @MOV_TFHD_BASE_DATA_OFFSET
	.comm	_MOV_TFHD_DURATION_IS_EMPTY,4,2 ## @MOV_TFHD_DURATION_IS_EMPTY
	.comm	_MOV_TFHD_DEFAULT_FLAGS,4,2     ## @MOV_TFHD_DEFAULT_FLAGS
	.comm	_FF_MOV_FLAG_OMIT_TFHD_OFFSET,4,2 ## @FF_MOV_FLAG_OMIT_TFHD_OFFSET
	.comm	_FF_MOV_FLAG_DEFAULT_BASE_MOOF,4,2 ## @FF_MOV_FLAG_DEFAULT_BASE_MOOF
	.comm	_MOV_TFHD_DEFAULT_BASE_IS_MOOF,4,2 ## @MOV_TFHD_DEFAULT_BASE_IS_MOOF
	.comm	_MODE_ISM,8,3                   ## @MODE_ISM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tfhd"

	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.comm	_MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES,4,2 ## @MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES
	.comm	_MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC,4,2 ## @MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC
	.comm	_MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO,4,2 ## @MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO
	.no_dead_strip	_mov_write_tfhd_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_tfhd_tag
_mov_write_tfhd_tag:                    ; @mov_write_tfhd_tag
	.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, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_avio_tell
	mov	x20, x0
Lloh0:
	adrp	x25, _MOV_TFHD_DEFAULT_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _MOV_TFHD_DEFAULT_SIZE@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh2:
	adrp	x26, _MOV_TFHD_DEFAULT_DURATION@GOTPAGE
Lloh3:
	ldr	x26, [x26, _MOV_TFHD_DEFAULT_DURATION@GOTPAGEOFF]
	ldr	w9, [x26]
Lloh4:
	adrp	x27, _MOV_TFHD_BASE_DATA_OFFSET@GOTPAGE
Lloh5:
	ldr	x27, [x27, _MOV_TFHD_BASE_DATA_OFFSET@GOTPAGEOFF]
	orr	w8, w9, w8
	ldr	w9, [x27]
	orr	w8, w8, w9
	ldr	w10, [x21]
Lloh6:
	adrp	x11, _MOV_TFHD_DURATION_IS_EMPTY@GOTPAGE
Lloh7:
	ldr	x11, [x11, _MOV_TFHD_DURATION_IS_EMPTY@GOTPAGEOFF]
Lloh8:
	adrp	x24, _MOV_TFHD_DEFAULT_FLAGS@GOTPAGE
Lloh9:
	ldr	x24, [x24, _MOV_TFHD_DEFAULT_FLAGS@GOTPAGEOFF]
	cmp	w10, #0
	csel	x10, x11, x24, eq
	ldr	w10, [x10]
	orr	w10, w10, w8
	ldr	w11, [x22]
Lloh10:
	adrp	x12, _FF_MOV_FLAG_OMIT_TFHD_OFFSET@GOTPAGE
Lloh11:
	ldr	x12, [x12, _FF_MOV_FLAG_OMIT_TFHD_OFFSET@GOTPAGEOFF]
Lloh12:
	ldr	w12, [x12]
	bic	w9, w10, w9
	tst	w12, w11
	csel	w10, w10, w9, eq
Lloh13:
	adrp	x12, _FF_MOV_FLAG_DEFAULT_BASE_MOOF@GOTPAGE
Lloh14:
	ldr	x12, [x12, _FF_MOV_FLAG_DEFAULT_BASE_MOOF@GOTPAGEOFF]
Lloh15:
	ldr	w12, [x12]
Lloh16:
	adrp	x13, _MOV_TFHD_DEFAULT_BASE_IS_MOOF@GOTPAGE
Lloh17:
	ldr	x13, [x13, _MOV_TFHD_DEFAULT_BASE_IS_MOOF@GOTPAGEOFF]
Lloh18:
	ldr	w13, [x13]
	orr	w9, w13, w9
	tst	w12, w11
	csel	w9, w10, w9, eq
Lloh19:
	adrp	x10, _MODE_ISM@GOTPAGE
Lloh20:
	ldr	x10, [x10, _MODE_ISM@GOTPAGEOFF]
	ldr	x11, [x21, #8]
Lloh21:
	ldr	x10, [x10]
	cmp	x11, x10
	mov	w10, #-1
	csinv	w8, w10, w8, ne
	and	w22, w8, w9
	mov	x0, x19
	mov	w1, #0
	bl	_avio_wb32
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ffio_wfourcc
	mov	x0, x19
	mov	w1, #0
	bl	_avio_w8
	mov	x0, x19
	mov	x1, x22
	bl	_avio_wb24
	ldr	w1, [x21, #16]
	mov	x0, x19
	bl	_avio_wb32
	ldr	w8, [x27]
	tst	w8, w22
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x23
	bl	_avio_wb64
LBB0_2:
	ldr	w8, [x26]
	tst	w8, w22
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x21
	mov	w1, #0
	bl	_get_cluster_duration
	mov	x1, x0
	str	w0, [x21, #20]
	mov	x0, x19
	bl	_avio_wb32
LBB0_4:
	ldr	w8, [x25]
	tst	w8, w22
	b.eq	LBB0_7
; %bb.5:
	ldr	w8, [x21]
	cbz	w8, LBB0_8
; %bb.6:
	ldr	x8, [x21, #40]
	ldr	w1, [x8]
	b	LBB0_9
LBB0_7:
	mov	w8, #-1
	str	w8, [x21, #24]
	b	LBB0_10
LBB0_8:
	mov	w1, #1
LBB0_9:
	str	w1, [x21, #24]
	mov	x0, x19
	bl	_avio_wb32
LBB0_10:
	ldr	w8, [x24]
	tst	w8, w22
	b.eq	LBB0_15
; %bb.11:
	ldr	w8, [x21]
	cmp	w8, #2
	b.lt	LBB0_13
; %bb.12:
	ldr	x8, [x21, #40]
	add	x1, x8, #4
	mov	x0, x21
	bl	_get_sample_flags
	mov	x1, x0
	b	LBB0_14
LBB0_13:
	ldr	x8, [x21, #32]
	ldr	x8, [x8]
Lloh24:
	adrp	x9, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh25:
	ldr	x9, [x9, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
Lloh27:
	adrp	x10, _MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES@GOTPAGE
Lloh28:
	ldr	x10, [x10, _MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
Lloh30:
	adrp	x11, _MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC@GOTPAGE
Lloh31:
	ldr	x11, [x11, _MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC@GOTPAGEOFF]
Lloh32:
	ldr	w11, [x11]
	orr	w10, w11, w10
Lloh33:
	adrp	x11, _MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO@GOTPAGE
Lloh34:
	ldr	x11, [x11, _MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO@GOTPAGEOFF]
Lloh35:
	ldr	w11, [x11]
	cmp	x8, x9
	csel	w1, w10, w11, eq
LBB0_14:
	str	w1, [x21, #28]
	mov	x0, x19
	bl	_avio_wb32
LBB0_15:
	mov	x0, x19
	mov	x1, x20
	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
	b	_update_size
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MOV_TFHD_DEFAULT_SIZE,4,2      ; @MOV_TFHD_DEFAULT_SIZE
	.comm	_MOV_TFHD_DEFAULT_DURATION,4,2  ; @MOV_TFHD_DEFAULT_DURATION
	.comm	_MOV_TFHD_BASE_DATA_OFFSET,4,2  ; @MOV_TFHD_BASE_DATA_OFFSET
	.comm	_MOV_TFHD_DURATION_IS_EMPTY,4,2 ; @MOV_TFHD_DURATION_IS_EMPTY
	.comm	_MOV_TFHD_DEFAULT_FLAGS,4,2     ; @MOV_TFHD_DEFAULT_FLAGS
	.comm	_FF_MOV_FLAG_OMIT_TFHD_OFFSET,4,2 ; @FF_MOV_FLAG_OMIT_TFHD_OFFSET
	.comm	_FF_MOV_FLAG_DEFAULT_BASE_MOOF,4,2 ; @FF_MOV_FLAG_DEFAULT_BASE_MOOF
	.comm	_MOV_TFHD_DEFAULT_BASE_IS_MOOF,4,2 ; @MOV_TFHD_DEFAULT_BASE_IS_MOOF
	.comm	_MODE_ISM,8,3                   ; @MODE_ISM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tfhd"

	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.comm	_MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES,4,2 ; @MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES
	.comm	_MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC,4,2 ; @MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC
	.comm	_MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO,4,2 ; @MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO
	.no_dead_strip	_mov_write_tfhd_tag
.subsections_via_symbols
