	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mov_write_moof_tag
_mov_write_moof_tag:                    ## @mov_write_moof_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	leaq	-56(%rbp), %rdi
	callq	_ffio_open_null_buf
	testl	%eax, %eax
	js	LBB0_15
## %bb.1:
	movq	-56(%rbp), %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_mov_write_moof_tag_internal
	movq	-56(%rbp), %rdi
	callq	_ffio_close_null_buf
	movl	(%rbx), %esi
	movq	_FF_MOV_FLAG_DASH@GOTPCREL(%rip), %rcx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movslq	%eax, %r12
	testl	%esi, (%rcx)
	je	LBB0_4
## %bb.2:
	movq	_FF_MOV_FLAG_GLOBAL_SIDX@GOTPCREL(%rip), %rcx
	movq	_FF_MOV_FLAG_SKIP_SIDX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%esi, %edx
	jne	LBB0_4
## %bb.3:
	leaq	(%r12,%r13), %rcx
	addq	$8, %rcx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_mov_write_sidx_tags
LBB0_4:
	movq	8(%rbx), %rax
	movq	_MOV_PRFT_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_7
## %bb.5:
	movq	_MOV_PRFT_NB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_mov_write_prft_tag
LBB0_7:
	movl	(%rbx), %eax
	movq	_FF_MOV_FLAG_GLOBAL_SIDX@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
LBB0_10:
	leaq	(%r12,%r13), %rcx
	addq	$8, %rcx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_mov_add_tfra_entries
	testl	%eax, %eax
	js	LBB0_15
## %bb.11:
	movl	(%rbx), %eax
	movq	_FF_MOV_FLAG_GLOBAL_SIDX@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_14
## %bb.12:
	movq	_FF_MOV_FLAG_SKIP_TRAILER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.13:
	movq	16(%rbx), %rdx
	incq	%rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mov_prune_frag_info
	jmp	LBB0_14
LBB0_8:
	movq	_FF_MOV_FLAG_SKIP_TRAILER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	cmpq	$0, 16(%rbx)
	jne	LBB0_10
LBB0_14:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_mov_write_moof_tag_internal
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FF_MOV_FLAG_DASH,4,2           ## @FF_MOV_FLAG_DASH
	.comm	_FF_MOV_FLAG_GLOBAL_SIDX,4,2    ## @FF_MOV_FLAG_GLOBAL_SIDX
	.comm	_FF_MOV_FLAG_SKIP_SIDX,4,2      ## @FF_MOV_FLAG_SKIP_SIDX
	.comm	_MOV_PRFT_NONE,8,3              ## @MOV_PRFT_NONE
	.comm	_MOV_PRFT_NB,8,3                ## @MOV_PRFT_NB
	.comm	_FF_MOV_FLAG_SKIP_TRAILER,4,2   ## @FF_MOV_FLAG_SKIP_TRAILER
	.no_dead_strip	_mov_write_moof_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_moof_tag
_mov_write_moof_tag:                    ; @mov_write_moof_tag
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x23, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	add	x0, sp, #8
	bl	_ffio_open_null_buf
	tbnz	w0, #31, LBB0_14
; %bb.1:
	ldr	x0, [sp, #8]
	mov	x1, x20
	mov	x2, x19
	mov	w3, #0
	bl	_mov_write_moof_tag_internal
	ldr	x0, [sp, #8]
	bl	_ffio_close_null_buf
	mov	x22, x0
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _FF_MOV_FLAG_DASH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FF_MOV_FLAG_DASH@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x24, _FF_MOV_FLAG_GLOBAL_SIDX@GOTPAGE
Lloh4:
	ldr	x24, [x24, _FF_MOV_FLAG_GLOBAL_SIDX@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	ldr	w9, [x24]
Lloh5:
	adrp	x10, _FF_MOV_FLAG_SKIP_SIDX@GOTPAGE
Lloh6:
	ldr	x10, [x10, _FF_MOV_FLAG_SKIP_SIDX@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	add	w8, w22, #8
	add	x3, x23, w8, sxtw
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_mov_write_sidx_tags
LBB0_4:
	ldr	x8, [x20, #8]
Lloh8:
	adrp	x9, _MOV_PRFT_NONE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MOV_PRFT_NONE@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x10, _MOV_PRFT_NB@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MOV_PRFT_NB@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #0, gt
	b.ge	LBB0_6
; %bb.5:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_mov_write_prft_tag
LBB0_6:
	ldr	w8, [x20]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_11
LBB0_7:
	add	w8, w22, #8
	add	x3, x23, w8, sxtw
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_mov_add_tfra_entries
	tbnz	w0, #31, LBB0_14
; %bb.8:
	ldr	w8, [x20]
	ldr	w9, [x24]
	tst	w9, w8
	b.ne	LBB0_13
; %bb.9:
Lloh14:
	adrp	x9, _FF_MOV_FLAG_SKIP_TRAILER@GOTPAGE
Lloh15:
	ldr	x9, [x9, _FF_MOV_FLAG_SKIP_TRAILER@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.10:
	ldr	x8, [x20, #16]
	add	x2, x8, #1
	mov	x0, x20
	mov	x1, x19
	bl	_mov_prune_frag_info
	b	LBB0_13
LBB0_11:
Lloh17:
	adrp	x9, _FF_MOV_FLAG_SKIP_TRAILER@GOTPAGE
Lloh18:
	ldr	x9, [x9, _FF_MOV_FLAG_SKIP_TRAILER@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.12:
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_7
LBB0_13:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	bl	_mov_write_moof_tag_internal
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_FF_MOV_FLAG_DASH,4,2           ; @FF_MOV_FLAG_DASH
	.comm	_FF_MOV_FLAG_GLOBAL_SIDX,4,2    ; @FF_MOV_FLAG_GLOBAL_SIDX
	.comm	_FF_MOV_FLAG_SKIP_SIDX,4,2      ; @FF_MOV_FLAG_SKIP_SIDX
	.comm	_MOV_PRFT_NONE,8,3              ; @MOV_PRFT_NONE
	.comm	_MOV_PRFT_NB,8,3                ; @MOV_PRFT_NB
	.comm	_FF_MOV_FLAG_SKIP_TRAILER,4,2   ; @FF_MOV_FLAG_SKIP_TRAILER
	.no_dead_strip	_mov_write_moof_tag
.subsections_via_symbols
