	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mp4_write_box_stsc
_mp4_write_box_stsc:                    ## @mp4_write_box_stsc
	.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, %r12
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	(%rcx), %rbx
	movq	(%rbx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_WRITE_U8
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_WRITE_U24
	movq	(%r15), %rax
	movq	_MP4_SAMPLE_TABLE_STSC@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movl	(%rax,%rcx,4), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	callq	_WRITE_U32
	cmpq	$0, 16(%rbx)
	je	LBB0_2
## %bb.1:
	movq	(%r15), %rax
	movq	(%r13), %rcx
	movl	(%rax,%rcx,4), %eax
	shll	$2, %eax
	leal	(%rax,%rax,2), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_WRITE_BYTES
	jmp	LBB0_18
LBB0_2:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %r14d
	xorl	%edi, %edi
	callq	_INT64_C
	movl	%r14d, %edi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	callq	_vc_container_io_seek
	leaq	-96(%rbp), %rsi
	movq	%r12, %rdi
	callq	_mp4_writer_read_sample_from_temp
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.3:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	$-1, %r15
	xorl	%r14d, %r14d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	xorl	%r13d, %r13d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	-88(%rbp), %r13
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	leaq	-96(%rbp), %rsi
	callq	_mp4_writer_read_sample_from_temp
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-96(%rbp), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%r13, %r15
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r14d, %r12d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	incl	%ebx
	xorl	%r12d, %r12d
	testl	%r14d, %r14d
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	leaq	L_.str.3(%rip), %rdx
	callq	_WRITE_U32
	movq	%r15, %rdi
	movl	%r14d, %esi
	leaq	L_.str.4(%rip), %rdx
	callq	_WRITE_U32
	movq	%r15, %rdi
	movl	$1, %esi
	leaq	L_.str.5(%rip), %rdx
	callq	_WRITE_U32
	incl	-48(%rbp)                       ## 4-byte Folded Spill
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	-88(%rbp), %r13
	incl	%r12d
	movq	%r13, %r15
	movl	%r12d, %r14d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_13:
	testl	%r14d, %r14d
	je	LBB0_14
## %bb.15:
	leaq	L_.str.3(%rip), %rdx
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_WRITE_U32
	leaq	L_.str.4(%rip), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_WRITE_U32
	leaq	L_.str.5(%rip), %rdx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_WRITE_U32
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	incl	%ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_14:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
LBB0_16:
	movq	_MP4_SAMPLE_TABLE_STSC@GOTPCREL(%rip), %r13
LBB0_17:
	movq	(%r15), %rax
	movq	(%r13), %rcx
	xorl	%edi, %edi
	cmpl	(%rax,%rcx,4), %ebx
	sete	%dil
	callq	_vc_container_assert
LBB0_18:
	movq	%r12, %rdi
	callq	_STREAM_STATUS
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"version"

L_.str.1:                               ## @.str.1
	.asciz	"flags"

	.comm	_MP4_SAMPLE_TABLE_STSC,8,3      ## @MP4_SAMPLE_TABLE_STSC
L_.str.2:                               ## @.str.2
	.asciz	"entry_count"

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

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

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

	.no_dead_strip	_mp4_write_box_stsc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mp4_write_box_stsc
_mp4_write_box_stsc:                    ; @mp4_write_box_stsc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	ldp	x9, x8, [x0]
	ldr	x27, [x8]
	ldr	x8, [x27]
	ldr	x8, [x9, x8, lsl #3]
	ldr	x8, [x8]
	ldr	x25, [x8]
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_WRITE_U8
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_WRITE_U24
	ldr	x8, [x25]
Lloh4:
	adrp	x22, _MP4_SAMPLE_TABLE_STSC@GOTPAGE
Lloh5:
	ldr	x22, [x22, _MP4_SAMPLE_TABLE_STSC@GOTPAGEOFF]
	ldr	x9, [x22]
	ldr	w1, [x8, x9, lsl #2]
Lloh6:
	adrp	x2, l_.str.2@PAGE
Lloh7:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_WRITE_U32
	ldr	x8, [x27, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x25]
	ldr	x9, [x22]
	ldr	w8, [x8, x9, lsl #2]
	add	w8, w8, w8, lsl #1
	lsl	w2, w8, #2
	mov	x0, x19
	mov	w1, #0
	bl	_WRITE_BYTES
	b	LBB0_16
LBB0_2:
	ldr	w20, [x27, #8]
	mov	w0, #0
	bl	_INT64_C
	mov	x1, x0
	mov	x0, x20
	bl	_vc_container_io_seek
	mov	x1, sp
	mov	x0, x19
	bl	_mp4_writer_read_sample_from_temp
	mov	w28, #0
Lloh8:
	adrp	x21, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh9:
	ldr	x21, [x21, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.3:
	mov	w20, #0
	mov	w22, #0
	mov	w24, #0
	mov	w28, #0
	mov	x23, #0
	mov	x26, #-1
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [sp, #8]
	add	x23, x8, x23
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x1, sp
	mov	x0, x19
	bl	_mp4_writer_read_sample_from_temp
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	x26, x23
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w24, w24, #1
	cbz	w20, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	x1, x22
Lloh10:
	adrp	x2, l_.str.3@PAGE
Lloh11:
	add	x2, x2, l_.str.3@PAGEOFF
	bl	_WRITE_U32
	mov	x0, x19
	mov	x1, x20
Lloh12:
	adrp	x2, l_.str.4@PAGE
Lloh13:
	add	x2, x2, l_.str.4@PAGEOFF
	bl	_WRITE_U32
	mov	x0, x19
	mov	w1, #1
Lloh14:
	adrp	x2, l_.str.5@PAGE
Lloh15:
	add	x2, x2, l_.str.5@PAGEOFF
	bl	_WRITE_U32
	mov	w20, #0
	add	w28, w28, #1
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x22, x24
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [sp, #8]
	add	x23, x8, x23
	add	w20, w20, #1
	mov	x26, x23
	b	LBB0_5
LBB0_12:
	cbz	w20, LBB0_14
; %bb.13:
Lloh16:
	adrp	x2, l_.str.3@PAGE
Lloh17:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, x22
	bl	_WRITE_U32
Lloh18:
	adrp	x2, l_.str.4@PAGE
Lloh19:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_WRITE_U32
Lloh20:
	adrp	x2, l_.str.5@PAGE
Lloh21:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	w1, #1
	bl	_WRITE_U32
	add	w28, w28, #1
LBB0_14:
Lloh22:
	adrp	x22, _MP4_SAMPLE_TABLE_STSC@GOTPAGE
Lloh23:
	ldr	x22, [x22, _MP4_SAMPLE_TABLE_STSC@GOTPAGEOFF]
LBB0_15:
	ldr	x8, [x25]
	ldr	x9, [x22]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w28, w8
	cset	w0, eq
	bl	_vc_container_assert
LBB0_16:
	mov	x0, x19
	bl	_STREAM_STATUS
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"version"

l_.str.1:                               ; @.str.1
	.asciz	"flags"

	.comm	_MP4_SAMPLE_TABLE_STSC,8,3      ; @MP4_SAMPLE_TABLE_STSC
l_.str.2:                               ; @.str.2
	.asciz	"entry_count"

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

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

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

	.no_dead_strip	_mp4_write_box_stsc
.subsections_via_symbols
