	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avi_write_avi_header_chunk
_avi_write_avi_header_chunk:            ## @avi_write_avi_header_chunk
	.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	%rdi, %r12
	movq	16(%rdi), %rax
	movq	(%rax), %r15
	movl	(%rdi), %r14d
	movl	$0, %edx
	movl	$0, %eax
	movl	$0, %r13d
	movl	$0, %esi
	movl	$0, %ecx
	testq	%r14, %r14
	je	LBB0_9
## %bb.1:
	movq	8(%r12), %rax
	movq	_VC_CONTAINER_ES_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rdx,8), %rbx
	movq	(%rbx), %rsi
	cmpq	%rcx, (%rsi)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdx
	cmpq	%rdx, %r14
	jne	LBB0_2
## %bb.4:
	xorl	%edx, %edx
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	jmp	LBB0_9
LBB0_5:
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	movq	8(%rsi), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %esi
	cmpl	$0, 8(%rax)
	je	LBB0_6
## %bb.7:
	movl	12(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	$1000000, %edi                  ## imm = 0xF4240
	movl	%esi, %r13d
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	callq	_UINT64_C
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	imull	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movq	(%rbx), %rcx
	movq	8(%rcx), %rcx
	cltd
	idivl	8(%rcx)
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%eax, %r13d
	jmp	LBB0_8
LBB0_6:
	xorl	%r13d, %r13d
LBB0_8:
	movl	(%rdi), %edx
	movl	4(%rdi), %eax
LBB0_9:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	cmpq	$0, 8(%r15)
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	je	LBB0_10
## %bb.11:
	movq	(%r15), %rax
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$0, %ebx
	jne	LBB0_13
## %bb.12:
	movq	_AVIF_HASINDEX@GOTPCREL(%rip), %rax
	movq	_AVIF_TRUSTCKTYPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	jmp	LBB0_13
LBB0_10:
	xorl	%ebx, %ebx
LBB0_13:
	movl	$97, %edi
	movl	$118, %esi
	movl	$105, %edx
	movl	$104, %ecx
	callq	_VC_FOURCC
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_WRITE_FOURCC
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movl	$56, %esi
	callq	_WRITE_U32
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_WRITE_U32
	leaq	L_.str.3(%rip), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_WRITE_U32
	leaq	L_.str.4(%rip), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_WRITE_U32
	leaq	L_.str.5(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_WRITE_U32
	leaq	L_.str.6(%rip), %rdx
	movq	%r12, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_WRITE_U32
	leaq	L_.str.7(%rip), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_WRITE_U32
	leaq	L_.str.8(%rip), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_WRITE_U32
	leaq	L_.str.9(%rip), %rdx
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_WRITE_U32
	leaq	L_.str.10(%rip), %rdx
	movq	%r12, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_WRITE_U32
	leaq	L_.str.11(%rip), %rdx
	movq	%r12, %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	callq	_WRITE_U32
	leaq	L_.str.12(%rip), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_WRITE_U32
	leaq	L_.str.13(%rip), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_WRITE_U32
	leaq	L_.str.14(%rip), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_WRITE_U32
	leaq	L_.str.15(%rip), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_WRITE_U32
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_STREAM_STATUS                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_ES_TYPE_VIDEO,8,3 ## @VC_CONTAINER_ES_TYPE_VIDEO
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_AVIF_HASINDEX,4,2              ## @AVIF_HASINDEX
	.comm	_AVIF_TRUSTCKTYPE,4,2           ## @AVIF_TRUSTCKTYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Chunk ID"

L_.str.1:                               ## @.str.1
	.asciz	"Chunk Size"

L_.str.2:                               ## @.str.2
	.asciz	"dwMicroSecPerFrame"

L_.str.3:                               ## @.str.3
	.asciz	"dwMaxBytesPerSec"

L_.str.4:                               ## @.str.4
	.asciz	"dwPaddingGranularity"

L_.str.5:                               ## @.str.5
	.asciz	"dwFlags"

L_.str.6:                               ## @.str.6
	.asciz	"dwTotalFrames"

L_.str.7:                               ## @.str.7
	.asciz	"dwInitialFrames"

L_.str.8:                               ## @.str.8
	.asciz	"dwStreams"

L_.str.9:                               ## @.str.9
	.asciz	"dwSuggestedBufferSize"

L_.str.10:                              ## @.str.10
	.asciz	"dwWidth"

L_.str.11:                              ## @.str.11
	.asciz	"dwHeight"

L_.str.12:                              ## @.str.12
	.asciz	"dwReserved0"

L_.str.13:                              ## @.str.13
	.asciz	"dwReserved1"

L_.str.14:                              ## @.str.14
	.asciz	"dwReserved2"

L_.str.15:                              ## @.str.15
	.asciz	"dwReserved3"

	.no_dead_strip	_avi_write_avi_header_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avi_write_avi_header_chunk
_avi_write_avi_header_chunk:            ; @avi_write_avi_header_chunk
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x26, [x8]
	ldr	w20, [x0]
	cbz	w20, LBB0_4
; %bb.1:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _VC_CONTAINER_ES_TYPE_VIDEO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VC_CONTAINER_ES_TYPE_VIDEO@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	mov	x10, x20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x24, [x8]
	ldr	x11, [x24]
	ldr	x12, [x11]
	cmp	x12, x9
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x8, #8
	subs	x10, x10, #1
	b.ne	LBB0_2
LBB0_4:
	mov	w24, #0
	mov	w23, #0
	mov	w25, #0
	mov	w21, #0
	mov	w22, #0
	ldr	x8, [x26, #8]
	cbnz	x8, LBB0_9
	b	LBB0_11
LBB0_5:
	ldr	x8, [x24, #8]
	ldr	x23, [x8]
	ldr	x8, [x11, #8]
	ldp	w22, w21, [x8]
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_7
; %bb.6:
	ldr	w25, [x8, #12]
	mov	w0, #16960
	movk	w0, #15, lsl #16
	bl	_UINT64_C
	mul	w8, w0, w25
	ldr	x9, [x24]
	ldr	x9, [x9, #8]
	ldr	w9, [x9, #8]
	sdiv	w25, w8, w9
	b	LBB0_8
LBB0_7:
	mov	w25, #0
LBB0_8:
	ldp	w24, w23, [x23]
	ldr	x8, [x26, #8]
	cbz	x8, LBB0_11
LBB0_9:
	ldr	x8, [x26]
Lloh3:
	adrp	x9, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
Lloh6:
	adrp	x8, _AVIF_HASINDEX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVIF_HASINDEX@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _AVIF_TRUSTCKTYPE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AVIF_TRUSTCKTYPE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w26, w9, w8
	b	LBB0_12
LBB0_11:
	mov	w26, #0
LBB0_12:
	mov	w0, #97
	mov	w1, #118
	mov	w2, #105
	mov	w3, #104
	bl	_VC_FOURCC
	mov	x1, x0
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_WRITE_FOURCC
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w1, #56
	bl	_WRITE_U32
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x1, x25
	bl	_WRITE_U32
Lloh18:
	adrp	x2, l_.str.3@PAGE
Lloh19:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_WRITE_U32
Lloh20:
	adrp	x2, l_.str.4@PAGE
Lloh21:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_WRITE_U32
Lloh22:
	adrp	x2, l_.str.5@PAGE
Lloh23:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x1, x26
	bl	_WRITE_U32
Lloh24:
	adrp	x2, l_.str.6@PAGE
Lloh25:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	mov	x1, x24
	bl	_WRITE_U32
Lloh26:
	adrp	x2, l_.str.7@PAGE
Lloh27:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_WRITE_U32
Lloh28:
	adrp	x2, l_.str.8@PAGE
Lloh29:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_WRITE_U32
Lloh30:
	adrp	x2, l_.str.9@PAGE
Lloh31:
	add	x2, x2, l_.str.9@PAGEOFF
	mov	x0, x19
	mov	x1, x23
	bl	_WRITE_U32
Lloh32:
	adrp	x2, l_.str.10@PAGE
Lloh33:
	add	x2, x2, l_.str.10@PAGEOFF
	mov	x0, x19
	mov	x1, x22
	bl	_WRITE_U32
Lloh34:
	adrp	x2, l_.str.11@PAGE
Lloh35:
	add	x2, x2, l_.str.11@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_WRITE_U32
Lloh36:
	adrp	x2, l_.str.12@PAGE
Lloh37:
	add	x2, x2, l_.str.12@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_WRITE_U32
Lloh38:
	adrp	x2, l_.str.13@PAGE
Lloh39:
	add	x2, x2, l_.str.13@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_WRITE_U32
Lloh40:
	adrp	x2, l_.str.14@PAGE
Lloh41:
	add	x2, x2, l_.str.14@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_WRITE_U32
Lloh42:
	adrp	x2, l_.str.15@PAGE
Lloh43:
	add	x2, x2, l_.str.15@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_WRITE_U32
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_STREAM_STATUS
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_ES_TYPE_VIDEO,8,3 ; @VC_CONTAINER_ES_TYPE_VIDEO
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_AVIF_HASINDEX,4,2              ; @AVIF_HASINDEX
	.comm	_AVIF_TRUSTCKTYPE,4,2           ; @AVIF_TRUSTCKTYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Chunk ID"

l_.str.1:                               ; @.str.1
	.asciz	"Chunk Size"

l_.str.2:                               ; @.str.2
	.asciz	"dwMicroSecPerFrame"

l_.str.3:                               ; @.str.3
	.asciz	"dwMaxBytesPerSec"

l_.str.4:                               ; @.str.4
	.asciz	"dwPaddingGranularity"

l_.str.5:                               ; @.str.5
	.asciz	"dwFlags"

l_.str.6:                               ; @.str.6
	.asciz	"dwTotalFrames"

l_.str.7:                               ; @.str.7
	.asciz	"dwInitialFrames"

l_.str.8:                               ; @.str.8
	.asciz	"dwStreams"

l_.str.9:                               ; @.str.9
	.asciz	"dwSuggestedBufferSize"

l_.str.10:                              ; @.str.10
	.asciz	"dwWidth"

l_.str.11:                              ; @.str.11
	.asciz	"dwHeight"

l_.str.12:                              ; @.str.12
	.asciz	"dwReserved0"

l_.str.13:                              ; @.str.13
	.asciz	"dwReserved1"

l_.str.14:                              ; @.str.14
	.asciz	"dwReserved2"

l_.str.15:                              ; @.str.15
	.asciz	"dwReserved3"

	.no_dead_strip	_avi_write_avi_header_chunk
.subsections_via_symbols
