	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mov_write_dvc1_structs
_mov_write_dvc1_structs:                ## @mov_write_dvc1_structs
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movslq	(%rdi), %rdi
	leaq	(,%rdi,4), %r13
	addq	24(%r14), %r13
	movl	40(%r14), %r15d
	movq	8(%r14), %rax
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	jne	LBB0_1
## %bb.2:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%edi, %edi
	callq	_av_log
	movl	(%r14), %edi
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$1, %ebx
	jmp	LBB0_3
LBB0_1:
	movl	32(%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	36(%r14), %ebx
LBB0_3:
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_av_mallocz
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_18
## %bb.4:
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movl	%r15d, -72(%rbp)                ## 4-byte Spill
	movq	24(%r14), %rdi
	movq	%r13, %rsi
	callq	_find_next_marker
	cmpq	%r13, %rax
	jae	LBB0_12
## %bb.5:
	movq	%rax, %r15
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	movl	$3, %esi
	callq	_get_bits
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	$35, %esi
	callq	_skip_bits_long
	movl	$1, -56(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_skip_bits
	movq	%rbx, %rdi
	callq	_get_bits1
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_skip_bits
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %r15
	cmpq	%r13, %r14
	jae	LBB0_11
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leaq	16(%r15), %r12
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_find_next_marker
	movq	%rax, %r14
	movq	%rax, %rsi
	subq	%r15, %rsi
	shrq	$2, %rsi
	addl	$-4, %esi
	testl	%esi, %esi
	jle	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_vc1_unescape_buffer
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,8), %edx
	leaq	-76(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_init_get_bits
	movq	%r15, %rdi
	callq	_AV_RB32
	movq	_VC1_CODE_SEQHDR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	leaq	-76(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_get_bits
	movq	_PROFILE_ADVANCED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_9
	jmp	LBB0_12
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_11:
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_12
## %bb.13:
	leaq	-80(%rbp), %r15
	movq	%r15, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movl	$7, %edx
	callq	_init_put_bits
	movq	%r15, %rdi
	movl	$4, %esi
	movl	$12, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$3, %esi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_put_bits
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$3, %esi
	movl	%ebx, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$6, %esi
	xorl	%edx, %edx
	callq	_put_bits
	xorl	%edx, %edx
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	sete	%dl
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_put_bits
	xorl	%edx, %edx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	sete	%dl
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_put_bits
	xorl	%edx, %edx
	cmpl	$0, -68(%rbp)                   ## 4-byte Folded Reload
	sete	%dl
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_put_bits
	xorl	%edx, %edx
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	sete	%dl
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_put_bits
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	16(%r14), %rcx
	movl	(%rcx), %eax
	movl	$-1, %esi
	testl	%eax, %eax
	jle	LBB0_16
## %bb.14:
	movl	4(%rcx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_16
## %bb.15:
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %esi
LBB0_16:
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_put_bits32
	movq	%rbx, %rdi
	callq	_flush_put_bits
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_free
	jmp	LBB0_17
LBB0_12:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_free
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r13d
LBB0_17:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"moov atom written before any packets, unable to write correct dvc1 atom. Set the delay_moov flag to fix this.\n"

	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ## @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_VC1_CODE_SEQHDR,8,3            ## @VC1_CODE_SEQHDR
	.comm	_PROFILE_ADVANCED,4,2           ## @PROFILE_ADVANCED
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.no_dead_strip	_mov_write_dvc1_structs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mov_write_dvc1_structs
_mov_write_dvc1_structs:                ; @mov_write_dvc1_structs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x28, x1
	mov	x19, x0
	ldr	x21, [x0, #24]
	ldrsw	x22, [x0]
	ldr	w23, [x0, #40]
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	bl	_av_log
	ldr	w8, [x19]
	mov	w27, #1
	mov	w25, #1
	b	LBB0_3
LBB0_2:
	ldp	w27, w25, [x19, #32]
	mov	x8, x22
LBB0_3:
Lloh8:
	adrp	x9, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	add	w0, w9, w8
	bl	_av_mallocz
	cbz	x0, LBB0_11
; %bb.4:
	mov	x20, x0
	add	x24, x21, x22, lsl #2
	ldr	x0, [x19, #24]
	mov	x1, x24
	bl	_find_next_marker
	cmp	x0, x24
	b.hs	LBB0_16
; %bb.5:
	mov	x26, x0
	str	x28, [sp]                       ; 8-byte Folded Spill
	stp	w27, w25, [sp, #12]             ; 8-byte Folded Spill
	str	w23, [sp, #20]                  ; 4-byte Folded Spill
	mov	w23, #0
	mov	w22, #0
	mov	w21, #0
Lloh11:
	adrp	x28, _VC1_CODE_SEQHDR@GOTPAGE
Lloh12:
	ldr	x28, [x28, _VC1_CODE_SEQHDR@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x0, sp, #24
	mov	w1, #3
	bl	_get_bits
	mov	x22, x0
	add	x0, sp, #24
	mov	w1, #35
	bl	_skip_bits_long
	mov	w21, #1
	add	x0, sp, #24
	mov	w1, #1
	bl	_skip_bits
	add	x0, sp, #24
	bl	_get_bits1
	mov	x23, x0
	add	x0, sp, #24
	mov	w1, #4
	bl	_skip_bits
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x26, x25
	cmp	x25, x24
	b.hs	LBB0_12
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x27, x26, #16
	mov	x0, x27
	mov	x1, x24
	bl	_find_next_marker
	mov	x25, x0
	sub	x8, x0, x26
	lsr	x8, x8, #2
	sub	w1, w8, #4
	cmp	w1, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x27
	mov	x2, x20
	bl	_vc1_unescape_buffer
	lsl	w2, w0, #3
	add	x0, sp, #24
	mov	x1, x20
	bl	_init_get_bits
	mov	x0, x26
	bl	_AV_RB32
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x0, sp, #24
	mov	w1, #2
	bl	_get_bits
Lloh13:
	adrp	x8, _PROFILE_ADVANCED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PROFILE_ADVANCED@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_6
	b	LBB0_16
LBB0_11:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_AVERROR
LBB0_12:
	ldp	w25, w24, [sp, #16]             ; 8-byte Folded Reload
	ldr	w26, [sp, #12]                  ; 4-byte Folded Reload
	ldr	x1, [sp]                        ; 8-byte Folded Reload
	cbz	w21, LBB0_16
; %bb.13:
	add	x0, sp, #28
	mov	w2, #7
	bl	_init_put_bits
	add	x0, sp, #28
	mov	w1, #4
	mov	w2, #12
	bl	_put_bits
	add	x0, sp, #28
	mov	w1, #3
	mov	x2, x22
	bl	_put_bits
	add	x0, sp, #28
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	add	x0, sp, #28
	mov	w1, #3
	mov	x2, x22
	bl	_put_bits
	add	x0, sp, #28
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	add	x0, sp, #28
	mov	w1, #6
	mov	w2, #0
	bl	_put_bits
	cmp	w23, #0
	cset	w2, eq
	add	x0, sp, #28
	mov	w1, #1
	bl	_put_bits
	cmp	w26, #0
	cset	w2, eq
	add	x0, sp, #28
	mov	w1, #1
	bl	_put_bits
	cmp	w25, #0
	cset	w2, eq
	add	x0, sp, #28
	mov	w1, #1
	bl	_put_bits
	cmp	w24, #0
	cset	w2, eq
	add	x0, sp, #28
	mov	w1, #1
	bl	_put_bits
	add	x0, sp, #28
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	add	x0, sp, #28
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	ldr	x9, [x19, #16]
	ldr	w8, [x9]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.14:
	ldr	w9, [x9, #4]
	cmp	w9, #1
	b.lt	LBB0_17
; %bb.15:
	udiv	w1, w8, w9
	b	LBB0_18
LBB0_16:
	mov	x0, x20
	bl	_av_free
Lloh19:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_19
LBB0_17:
	mov	w1, #-1
LBB0_18:
	add	x0, sp, #28
	bl	_put_bits32
	add	x0, sp, #28
	bl	_flush_put_bits
	mov	x0, x20
	bl	_av_free
	mov	w0, #0
LBB0_19:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"moov atom written before any packets, unable to write correct dvc1 atom. Set the delay_moov flag to fix this.\n"

	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ; @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_VC1_CODE_SEQHDR,8,3            ; @VC1_CODE_SEQHDR
	.comm	_PROFILE_ADVANCED,4,2           ; @PROFILE_ADVANCED
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.no_dead_strip	_mov_write_dvc1_structs
.subsections_via_symbols
