	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mkv_write_tracks
_mkv_write_tracks:                      ## @mkv_write_tracks
	.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
	pushq	%rax
	.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), %r14
	movq	24(%rdi), %r15
	movl	12(%r15), %r13d
	movq	_MATROSKA_ID_TRACKS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_avio_tell
	movl	%r13d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mkv_add_seekhead_entry
	testl	%eax, %eax
	js	LBB0_18
## %bb.1:
	movq	_MATROSKA_ID_TRACKS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r15, %rdx
	callq	_start_ebml_master_crc32
	testl	%eax, %eax
	js	LBB0_18
## %bb.2:
	movl	(%r12), %r9d
	testl	%r9d, %r9d
	jle	LBB0_13
## %bb.3:
	movq	8(%r12), %r10
	movq	_AV_DISPOSITION_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-1(%r9), %rdi
	movl	%r9d, %r8d
	andl	$3, %r8d
	cmpq	$3, %rdi
	jae	LBB0_5
## %bb.4:
	xorl	%edi, %edi
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_5:
	andl	$-4, %r9d
	xorl	%edi, %edi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r10,%rdi,8), %rcx
	movq	8(%r10,%rdi,8), %rsi
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	orl	%ebx, %ecx
	movl	(%rsi), %esi
	andl	%eax, %esi
	movq	16(%r10,%rdi,8), %rbx
	movl	(%rbx), %edx
	andl	%eax, %edx
	orl	%esi, %edx
	orl	%ecx, %edx
	movq	24(%r10,%rdi,8), %rcx
	movl	(%rcx), %ebx
	andl	%eax, %ebx
	orl	%edx, %ebx
	addq	$4, %rdi
	cmpq	%rdi, %r9
	jne	LBB0_6
LBB0_7:
	testq	%r8, %r8
	je	LBB0_10
## %bb.8:
	leaq	(%r10,%rdi,8), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rsi,8), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	orl	%ecx, %ebx
	incq	%rsi
	cmpq	%rsi, %r8
	jne	LBB0_9
LBB0_10:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %ecx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	movl	%ebx, %r8d
	callq	_mkv_write_track
	testl	%eax, %eax
	js	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_12 Depth=1
	incl	%r13d
	cmpl	(%r12), %r13d
	jl	LBB0_12
LBB0_13:
	movq	_AVIO_SEEKABLE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_16
## %bb.14:
	cmpl	$0, 8(%r15)
	je	LBB0_15
LBB0_16:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r15, %rdx
	callq	_end_ebml_master_crc32
	jmp	LBB0_17
LBB0_15:
	leaq	4(%r15), %rcx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r15, %rdx
	callq	_end_ebml_master_crc32_preliminary
LBB0_17:
	xorl	%eax, %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MATROSKA_ID_TRACKS,4,2         ## @MATROSKA_ID_TRACKS
	.comm	_AV_DISPOSITION_DEFAULT,4,2     ## @AV_DISPOSITION_DEFAULT
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ## @AVIO_SEEKABLE_NORMAL
	.no_dead_strip	_mkv_write_tracks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mkv_write_tracks
_mkv_write_tracks:                      ; @mkv_write_tracks
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
	ldp	x20, x19, [x0, #16]
	ldr	w22, [x19, #12]
Lloh0:
	adrp	x24, _MATROSKA_ID_TRACKS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MATROSKA_ID_TRACKS@GOTPAGEOFF]
	ldr	w23, [x24]
	mov	x0, x20
	bl	_avio_tell
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_mkv_add_seekhead_entry
	tbnz	w0, #31, LBB0_18
; %bb.1:
	ldr	w3, [x24]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x19
	bl	_start_ebml_master_crc32
	tbnz	w0, #31, LBB0_18
; %bb.2:
	ldr	w9, [x21]
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.3:
	ldr	x10, [x21, #8]
Lloh2:
	adrp	x8, _AV_DISPOSITION_DEFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_DISPOSITION_DEFAULT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w9, #4
	b.hs	LBB0_5
; %bb.4:
	mov	x11, #0
	mov	w22, #0
	b	LBB0_8
LBB0_5:
	mov	w14, #0
	mov	w15, #0
	mov	w13, #0
	mov	w12, #0
	and	x11, x9, #0xfffffffc
	add	x16, x10, #16
	mov	x17, x11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x0, x1, [x16, #-16]
	ldp	x2, x3, [x16], #32
	ldr	w0, [x0]
	ldr	w1, [x1]
	ldr	w2, [x2]
	and	w0, w8, w0
	and	w1, w8, w1
	ldr	w3, [x3]
	and	w2, w8, w2
	and	w3, w8, w3
	orr	w14, w0, w14
	orr	w15, w1, w15
	orr	w13, w2, w13
	orr	w12, w3, w12
	subs	x17, x17, #4
	b.ne	LBB0_6
; %bb.7:
	orr	w14, w15, w14
	orr	w13, w13, w14
	orr	w22, w12, w13
	cmp	x11, x9
	b.eq	LBB0_10
LBB0_8:
	add	x10, x10, x11, lsl #3
	sub	x9, x9, x11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10], #8
	ldr	w11, [x11]
	and	w11, w8, w11
	orr	w22, w11, w22
	subs	x9, x9, #1
	b.ne	LBB0_9
LBB0_10:
	mov	w23, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w3, [x19]
	mov	x0, x21
	mov	x1, x19
	mov	x2, x23
	mov	x4, x22
	bl	_mkv_write_track
	tbnz	w0, #31, LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	w23, w23, #1
	ldr	w8, [x21]
	cmp	w23, w8
	b.lt	LBB0_11
LBB0_13:
	ldr	w8, [x20]
Lloh5:
	adrp	x9, _AVIO_SEEKABLE_NORMAL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AVIO_SEEKABLE_NORMAL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_16
LBB0_15:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x19
	bl	_end_ebml_master_crc32
	b	LBB0_17
LBB0_16:
	add	x3, x19, #4
	mov	x0, x20
	mov	x1, x19
	mov	x2, x19
	bl	_end_ebml_master_crc32_preliminary
LBB0_17:
	mov	w0, #0
LBB0_18:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MATROSKA_ID_TRACKS,4,2         ; @MATROSKA_ID_TRACKS
	.comm	_AV_DISPOSITION_DEFAULT,4,2     ; @AV_DISPOSITION_DEFAULT
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ; @AVIO_SEEKABLE_NORMAL
	.no_dead_strip	_mkv_write_tracks
.subsections_via_symbols
