	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mp4_write_box_stts
_mp4_write_box_stts:                    ## @mp4_write_box_stts
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	(%rcx), %r14
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	leaq	L_.str(%rip), %rdx
	xorl	%esi, %esi
	callq	_WRITE_U8
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_WRITE_U24
	movq	(%rbx), %rax
	movq	_MP4_SAMPLE_TABLE_STTS@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movl	(%rax,%rcx,4), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	callq	_WRITE_U32
	cmpq	$0, 16(%r14)
	je	LBB0_1
## %bb.9:
	movq	(%rbx), %rax
	movq	(%r12), %rcx
	movl	(%rax,%rcx,4), %edx
	shll	$3, %edx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_WRITE_BYTES
	movq	%r13, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_STREAM_STATUS                  ## TAILCALL
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	8(%r14), %ebx
	xorl	%edi, %edi
	callq	_INT64_C
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_vc_container_io_seek
	movl	$0, -64(%rbp)
	leaq	-64(%rbp), %rsi
	movq	%r13, %rdi
	callq	_mp4_writer_read_sample_from_temp
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_8
## %bb.2:
	xorl	%r12d, %r12d
	leaq	-64(%rbp), %rbx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movl	$1, %esi
	leaq	L_.str.3(%rip), %rdx
	callq	_WRITE_U32
	movq	%r13, %rdi
	movl	%ebx, %esi
	leaq	L_.str.4(%rip), %rdx
	callq	_WRITE_U32
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	addl	%ebx, %r12d
	movq	%r14, %rbx
	movq	-80(%rbp), %r14                 ## 8-byte Reload
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_mp4_writer_read_sample_from_temp
	cmpq	(%r15), %rax
	jne	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax
	cmpq	(%r14), %rax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %r14
	movq	_MP4_TIMESCALE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	-64(%rbp), %eax
	cltq
	imulq	$1125899907, %rax, %rbx         ## imm = 0x431BDE83
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$50, %rbx
	addl	%eax, %ebx
	subl	%r12d, %ebx
	testl	%ebx, %ebx
	jg	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_8:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	_MP4_SAMPLE_TABLE_STTS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edi, %edi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	cmpl	(%rax,%rcx,4), %edx
	sete	%dil
	callq	_vc_container_assert
	movq	%r13, %rdi
	callq	_STREAM_STATUS
	addq	$40, %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_STTS,8,3      ## @MP4_SAMPLE_TABLE_STTS
L_.str.2:                               ## @.str.2
	.asciz	"entry_count"

	.comm	_MP4_TIMESCALE,4,2              ## @MP4_TIMESCALE
L_.str.3:                               ## @.str.3
	.asciz	"sample_count"

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

	.no_dead_strip	_mp4_write_box_stts
.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_stts
_mp4_write_box_stts:                    ; @mp4_write_box_stts
	.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	x23, [x8]
	ldr	x8, [x23]
	ldr	x8, [x9, x8, lsl #3]
	ldr	x8, [x8]
	ldr	x24, [x8]
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	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, [x24]
Lloh4:
	adrp	x20, _MP4_SAMPLE_TABLE_STTS@GOTPAGE
Lloh5:
	ldr	x20, [x20, _MP4_SAMPLE_TABLE_STTS@GOTPAGEOFF]
	ldr	x9, [x20]
	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, [x23, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x24]
	ldr	x9, [x20]
	ldr	w8, [x8, x9, lsl #2]
	lsl	w2, w8, #3
	mov	x0, x19
	mov	w1, #0
	bl	_WRITE_BYTES
	mov	x0, x19
	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
	b	_STREAM_STATUS
LBB0_2:
	ldr	w20, [x23, #8]
	mov	w0, #0
	bl	_INT64_C
	mov	x1, x0
	mov	x0, x20
	bl	_vc_container_io_seek
	str	wzr, [sp]
	mov	x1, sp
	mov	x0, x19
	bl	_mp4_writer_read_sample_from_temp
	mov	w26, #0
Lloh8:
	adrp	x27, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh9:
	ldr	x27, [x27, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.3:
	mov	w28, #0
	mov	w26, #0
	mov	w25, #56963
	movk	w25, #17179, lsl #16
Lloh10:
	adrp	x20, l_.str.3@PAGE
Lloh11:
	add	x20, x20, l_.str.3@PAGEOFF
Lloh12:
	adrp	x21, l_.str.4@PAGE
Lloh13:
	add	x21, x21, l_.str.4@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, sp
	mov	x0, x19
	bl	_mp4_writer_read_sample_from_temp
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp]
Lloh14:
	adrp	x9, _MP4_TIMESCALE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MP4_TIMESCALE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	mul	w8, w9, w8
	smull	x8, w8, w25
	lsr	x9, x8, #63
	asr	x8, x8, #50
	add	w8, w8, w9
	sub	w8, w8, w28
	cmp	w8, #0
	csel	w22, w8, wzr, gt
	mov	x0, x19
	mov	w1, #1
	mov	x2, x20
	bl	_WRITE_U32
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_WRITE_U32
	add	w26, w26, #1
	add	w28, w22, w28
	b	LBB0_4
LBB0_7:
	ldr	x8, [x24]
Lloh17:
	adrp	x9, _MP4_SAMPLE_TABLE_STTS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MP4_SAMPLE_TABLE_STTS@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w26, w8
	cset	w0, eq
	bl	_vc_container_assert
	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	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.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_STTS,8,3      ; @MP4_SAMPLE_TABLE_STTS
l_.str.2:                               ; @.str.2
	.asciz	"entry_count"

	.comm	_MP4_TIMESCALE,4,2              ; @MP4_TIMESCALE
l_.str.3:                               ; @.str.3
	.asciz	"sample_count"

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

	.no_dead_strip	_mp4_write_box_stts
.subsections_via_symbols
