	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mkv_init
_mkv_init:                              ## @mkv_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	(%rdi), %r14d
	movq	_MAX_TRACKS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %r14d
	jle	LBB0_1
## %bb.3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_1:
	testl	%r14d, %r14d
	jle	LBB0_12
## %bb.2:
	movq	8(%r15), %r8
	movq	_AV_CODEC_ID_ATRAC3@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	movq	_AV_CODEC_ID_COOK@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	movq	_AV_CODEC_ID_RA_288@GOTPCREL(%rip), %rax
	movq	(%rax), %r11
	movq	_AV_CODEC_ID_SIPR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_AV_CODEC_ID_RV10@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_AV_CODEC_ID_RV20@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r8,%rax,8), %rdi
	movq	(%rdi), %rdi
	movq	(%rdi), %rdi
	cmpq	%r9, %rdi
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%r10, %rdi
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%r11, %rdi
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%rdx, %rdi
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%rsi, %rdi
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%rcx, %rdi
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rax
	cmpq	%rax, %r14
	jne	LBB0_5
LBB0_12:
	cmpl	$0, 4(%r15)
	js	LBB0_13
## %bb.14:
	testl	%r14d, %r14d
	jle	LBB0_15
LBB0_16:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	movl	$64, %esi
	movl	$1, %edx
	movl	$1000, %ecx                     ## imm = 0x3E8
	callq	_avpriv_set_pts_info
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_17
	jmp	LBB0_18
LBB0_11:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	callq	_avcodec_get_name
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %ecx
	callq	_av_log
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_18
LBB0_13:
	movl	$1, 4(%r15)
	movq	16(%r15), %rax
	movl	$1, (%rax)
	testl	%r14d, %r14d
	jg	LBB0_16
LBB0_15:
	xorl	%r14d, %r14d
LBB0_18:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_TRACKS,4,2                 ## @MAX_TRACKS
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"At most %d streams are supported for muxing in Matroska\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AV_CODEC_ID_ATRAC3,8,3         ## @AV_CODEC_ID_ATRAC3
	.comm	_AV_CODEC_ID_COOK,8,3           ## @AV_CODEC_ID_COOK
	.comm	_AV_CODEC_ID_RA_288,8,3         ## @AV_CODEC_ID_RA_288
	.comm	_AV_CODEC_ID_SIPR,8,3           ## @AV_CODEC_ID_SIPR
	.comm	_AV_CODEC_ID_RV10,8,3           ## @AV_CODEC_ID_RV10
	.comm	_AV_CODEC_ID_RV20,8,3           ## @AV_CODEC_ID_RV20
L_.str.1:                               ## @.str.1
	.asciz	"The Matroska muxer does not yet support muxing %s\n"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
	.no_dead_strip	_mkv_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mkv_init
_mkv_init:                              ; @mkv_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _MAX_TRACKS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_TRACKS@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x9]
	cmp	w8, w3
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_2:
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
Lloh11:
	adrp	x10, _AV_CODEC_ID_ATRAC3@GOTPAGE
Lloh12:
	ldr	x10, [x10, _AV_CODEC_ID_ATRAC3@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh13:
	ldr	x10, [x10]
Lloh14:
	adrp	x11, _AV_CODEC_ID_COOK@GOTPAGE
Lloh15:
	ldr	x11, [x11, _AV_CODEC_ID_COOK@GOTPAGEOFF]
Lloh16:
	adrp	x12, _AV_CODEC_ID_RA_288@GOTPAGE
Lloh17:
	ldr	x12, [x12, _AV_CODEC_ID_RA_288@GOTPAGEOFF]
Lloh18:
	ldr	x11, [x11]
Lloh19:
	ldr	x12, [x12]
Lloh20:
	adrp	x13, _AV_CODEC_ID_SIPR@GOTPAGE
Lloh21:
	ldr	x13, [x13, _AV_CODEC_ID_SIPR@GOTPAGEOFF]
Lloh22:
	adrp	x14, _AV_CODEC_ID_RV10@GOTPAGE
Lloh23:
	ldr	x14, [x14, _AV_CODEC_ID_RV10@GOTPAGEOFF]
Lloh24:
	ldr	x13, [x13]
Lloh25:
	ldr	x14, [x14]
Lloh26:
	adrp	x16, _AV_CODEC_ID_RV20@GOTPAGE
Lloh27:
	ldr	x16, [x16, _AV_CODEC_ID_RV20@GOTPAGEOFF]
	mov	x15, x8
Lloh28:
	ldr	x16, [x16]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x17, [x9]
	ldr	x17, [x17]
	ldr	x0, [x17]
	cmp	x0, x10
	ccmp	x0, x11, #4, ne
	ccmp	x0, x12, #4, ne
	ccmp	x0, x13, #4, ne
	ccmp	x0, x14, #4, ne
	ccmp	x0, x16, #4, ne
	b.eq	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #8
	subs	x15, x15, #1
	b.ne	LBB0_4
LBB0_6:
	ldr	w9, [x19, #4]
	tbz	w9, #31, LBB0_8
; %bb.7:
	mov	w9, #1
	str	w9, [x19, #4]
	ldr	x10, [x19, #16]
	str	w9, [x10]
LBB0_8:
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x20, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x0, [x8, x20, lsl #3]
	mov	w1, #64
	mov	w2, #1
	mov	w3, #1000
	bl	_avpriv_set_pts_info
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.lt	LBB0_10
LBB0_11:
	mov	w0, #0
	b	LBB0_13
LBB0_12:
Lloh29:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh31:
	ldr	w20, [x8]
	bl	_avcodec_get_name
	mov	x3, x0
Lloh32:
	adrp	x2, l_.str.1@PAGE
Lloh33:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_av_log
Lloh34:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh35:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_TRACKS,4,2                 ; @MAX_TRACKS
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"At most %d streams are supported for muxing in Matroska\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AV_CODEC_ID_ATRAC3,8,3         ; @AV_CODEC_ID_ATRAC3
	.comm	_AV_CODEC_ID_COOK,8,3           ; @AV_CODEC_ID_COOK
	.comm	_AV_CODEC_ID_RA_288,8,3         ; @AV_CODEC_ID_RA_288
	.comm	_AV_CODEC_ID_SIPR,8,3           ; @AV_CODEC_ID_SIPR
	.comm	_AV_CODEC_ID_RV10,8,3           ; @AV_CODEC_ID_RV10
	.comm	_AV_CODEC_ID_RV20,8,3           ; @AV_CODEC_ID_RV20
l_.str.1:                               ; @.str.1
	.asciz	"The Matroska muxer does not yet support muxing %s\n"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
	.no_dead_strip	_mkv_init
.subsections_via_symbols
