	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mkv_write_codecprivate
_mkv_write_codecprivate:                ## @mkv_write_codecprivate
	.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
	movl	%r8d, %ebx
	movl	%ecx, %r14d
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r12
	leaq	-56(%rbp), %rdi
	callq	_avio_open_dyn_buf
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.2:
	movq	-56(%rbp), %rcx
	movq	%r12, %rdi
	movq	%r15, %r14
	movq	%r15, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_mkv_write_native_codecprivate
	movl	%eax, %r13d
LBB0_3:
	movq	-56(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	callq	_avio_close_dyn_buf
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	_MATROSKA_ID_CODECPRIVATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	-64(%rbp), %rdx
	movq	%r14, %rdi
	movl	%eax, %ecx
	callq	_put_ebml_binary
LBB0_5:
	movq	-64(%rbp), %rdi
	callq	_av_free
LBB0_6:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rax
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.8:
	testl	%ebx, %ebx
	je	LBB0_22
## %bb.9:
	movl	8(%r14), %esi
	testl	%esi, %esi
	jne	LBB0_11
## %bb.10:
	movq	_ff_codec_movvideo_tags@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r14), %rsi
	callq	_ff_codec_get_tag
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%rax, %rsi
	movl	%esi, 8(%r14)
LBB0_11:
	movq	_ff_codec_movvideo_tags@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_ff_codec_get_id
	cmpq	16(%r14), %rax
	movq	%r15, %r14
	jne	LBB0_31
## %bb.12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 24(%rax)
	je	LBB0_28
## %bb.13:
	movl	(%r12), %r15d
	movl	32(%rax), %edi
	addl	$4, %edi
	movq	%rax, %rbx
	callq	_AV_RL32
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ff_codec_get_id
	cmpq	16(%rbx), %rax
	je	LBB0_31
## %bb.14:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	24(%rbx), %rsi
	addq	$90, %rsi
	jmp	LBB0_29
LBB0_15:
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.16:
	movq	_ff_codec_wav_tags@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r14), %rsi
	movq	%r14, %rbx
	callq	_ff_codec_get_tag
	testl	%eax, %eax
	jne	LBB0_18
## %bb.17:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	16(%rbx), %rdi
	callq	_avcodec_get_name
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %ecx
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r13d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
LBB0_18:
	cmpl	$0, 8(%rbx)
	movq	%r15, %r14
	jne	LBB0_20
## %bb.19:
	movl	%eax, 8(%rbx)
LBB0_20:
	movq	-56(%rbp), %rsi
	movq	_FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_ff_put_wav_header
	jmp	LBB0_3
LBB0_21:
	movq	%r15, %r14
	jmp	LBB0_3
LBB0_22:
	movq	_ff_codec_bmp_tags@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	16(%r14), %rsi
	callq	_ff_codec_get_tag
	testq	%rax, %rax
	jne	LBB0_24
## %bb.23:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	16(%r14), %rdi
	callq	_avcodec_get_name
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	_ff_codec_bmp_tags@GOTPCREL(%rip), %rbx
	movl	%eax, %ecx
	callq	_av_log
LBB0_24:
	cmpl	$0, 8(%r14)
	movq	%r14, %rsi
	jne	LBB0_25
## %bb.26:
	movl	(%rbx), %edi
	movq	16(%rsi), %rsi
	callq	_ff_codec_get_tag
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, 8(%rsi)
	testl	%eax, %eax
	je	LBB0_32
LBB0_25:
	movq	%r15, %r14
LBB0_34:
	movq	-56(%rbp), %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ff_put_bmp_header
	jmp	LBB0_3
LBB0_28:
	movl	$90, %esi
	movq	%rax, %rbx
LBB0_29:
	movq	-56(%rbp), %rdi
	callq	_avio_wb32
	movq	-56(%rbp), %rdi
	movl	8(%rbx), %esi
	callq	_avio_wl32
	movl	$82, %ebx
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rdi
	xorl	%esi, %esi
	callq	_avio_w8
	decl	%ebx
	jne	LBB0_30
LBB0_31:
	movq	-56(%rbp), %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	32(%rax), %esi
	movq	24(%rax), %rdx
	callq	_avio_write
	jmp	LBB0_3
LBB0_32:
	movq	16(%rsi), %rdi
	movq	_AV_CODEC_ID_RAWVIDEO@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	movq	%r15, %r14
	je	LBB0_34
## %bb.33:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_avcodec_get_name
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %r13d
	jmp	LBB0_34
	.cfi_endproc
                                        ## -- End function
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.comm	_ff_codec_movvideo_tags,4,2     ## @ff_codec_movvideo_tags
	.comm	_ff_codec_bmp_tags,4,2          ## @ff_codec_bmp_tags
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"codec %s is not supported by this format\n"

	.comm	_AV_CODEC_ID_RAWVIDEO,8,3       ## @AV_CODEC_ID_RAWVIDEO
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"No bmp codec tag found for codec %s\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AVMEDIA_TYPE_AUDIO,8,3         ## @AVMEDIA_TYPE_AUDIO
	.comm	_ff_codec_wav_tags,4,2          ## @ff_codec_wav_tags
L_.str.2:                               ## @.str.2
	.asciz	"No wav codec tag found for codec %s\n"

	.comm	_FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX,4,2 ## @FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX
	.comm	_MATROSKA_ID_CODECPRIVATE,4,2   ## @MATROSKA_ID_CODECPRIVATE
	.no_dead_strip	_mkv_write_codecprivate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mkv_write_codecprivate
_mkv_write_codecprivate:                ; @mkv_write_codecprivate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x23, x4
	mov	x24, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	add	x0, sp, #8
	bl	_avio_open_dyn_buf
	mov	x20, x0
	tbnz	w0, #31, LBB0_6
; %bb.1:
	cbz	w24, LBB0_7
; %bb.2:
	ldr	x3, [sp, #8]
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	bl	_mkv_write_native_codecprivate
	mov	x20, x0
LBB0_3:
	ldr	x0, [sp, #8]
	mov	x1, sp
	bl	_avio_close_dyn_buf
	cbz	w0, LBB0_5
; %bb.4:
	mov	x3, x0
Lloh0:
	adrp	x8, _MATROSKA_ID_CODECPRIVATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MATROSKA_ID_CODECPRIVATE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x2, [sp]
	mov	x0, x19
	bl	_put_ebml_binary
LBB0_5:
	ldr	x0, [sp]
	bl	_av_free
LBB0_6:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
LBB0_7:
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.8:
	cbz	w23, LBB0_21
; %bb.9:
	ldr	w1, [x21, #8]
Lloh6:
	adrp	x22, _ff_codec_movvideo_tags@GOTPAGE
Lloh7:
	ldr	x22, [x22, _ff_codec_movvideo_tags@GOTPAGEOFF]
	cbnz	w1, LBB0_11
; %bb.10:
	ldr	w0, [x22]
	ldr	x1, [x21, #16]
	bl	_ff_codec_get_tag
	mov	x1, x0
	str	w1, [x21, #8]
LBB0_11:
	ldr	w0, [x22]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_ff_codec_get_id
	ldr	x8, [x21, #16]
	cmp	x0, x8
	b.ne	LBB0_31
; %bb.12:
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_28
; %bb.13:
	ldr	w22, [x22]
	ldr	w8, [x21, #32]
	add	w0, w8, #4
	bl	_AV_RL32
	mov	x1, x0
	mov	x0, x22
	bl	_ff_codec_get_id
	ldr	x8, [x21, #16]
	cmp	x0, x8
	b.eq	LBB0_31
; %bb.14:
	ldr	x8, [x21, #24]
	add	x1, x8, #90
	b	LBB0_29
LBB0_15:
Lloh8:
	adrp	x9, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.16:
Lloh11:
	adrp	x8, _ff_codec_wav_tags@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ff_codec_wav_tags@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	x1, [x21, #16]
	bl	_ff_codec_get_tag
	mov	x23, x0
	cbnz	w23, LBB0_18
; %bb.17:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w20, [x8]
	ldr	x0, [x21, #16]
	bl	_avcodec_get_name
	mov	x3, x0
Lloh17:
	adrp	x2, l_.str.2@PAGE
Lloh18:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x22
	mov	x1, x20
	bl	_av_log
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
LBB0_18:
	ldr	w8, [x21, #8]
	cbnz	w8, LBB0_20
; %bb.19:
	str	w23, [x21, #8]
LBB0_20:
	ldr	x1, [sp, #8]
Lloh22:
	adrp	x8, _FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX@GOTPAGE
Lloh23:
	ldr	x8, [x8, _FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x8]
	mov	x0, x22
	mov	x2, x21
	bl	_ff_put_wav_header
	b	LBB0_3
LBB0_21:
Lloh25:
	adrp	x24, _ff_codec_bmp_tags@GOTPAGE
Lloh26:
	ldr	x24, [x24, _ff_codec_bmp_tags@GOTPAGEOFF]
	ldr	w0, [x24]
	ldr	x1, [x21, #16]
	bl	_ff_codec_get_tag
	cbnz	x0, LBB0_23
; %bb.22:
Lloh27:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh29:
	ldr	w23, [x8]
	ldr	x0, [x21, #16]
	bl	_avcodec_get_name
	mov	x3, x0
Lloh30:
	adrp	x2, l_.str@PAGE
Lloh31:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	mov	x1, x23
	bl	_av_log
LBB0_23:
	ldr	w8, [x21, #8]
	cbnz	w8, LBB0_27
; %bb.24:
	ldr	w0, [x24]
	ldr	x1, [x21, #16]
	bl	_ff_codec_get_tag
	str	w0, [x21, #8]
	cbnz	w0, LBB0_27
; %bb.25:
	ldr	x0, [x21, #16]
Lloh32:
	adrp	x8, _AV_CODEC_ID_RAWVIDEO@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AV_CODEC_ID_RAWVIDEO@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_27
; %bb.26:
Lloh35:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh37:
	ldr	w20, [x8]
	bl	_avcodec_get_name
	mov	x3, x0
Lloh38:
	adrp	x2, l_.str.1@PAGE
Lloh39:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x1, x20
	bl	_av_log
Lloh40:
	adrp	x8, _EINVAL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
LBB0_27:
	ldr	x0, [sp, #8]
	mov	x1, x21
	mov	w2, #0
	mov	w3, #0
	bl	_ff_put_bmp_header
	b	LBB0_3
LBB0_28:
	mov	w1, #90
LBB0_29:
	ldr	x0, [sp, #8]
	bl	_avio_wb32
	ldr	x0, [sp, #8]
	ldr	w1, [x21, #8]
	bl	_avio_wl32
	mov	w22, #82
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [sp, #8]
	mov	w1, #0
	bl	_avio_w8
	subs	w22, w22, #1
	b.ne	LBB0_30
LBB0_31:
	ldr	x0, [sp, #8]
	ldr	w1, [x21, #32]
	ldr	x2, [x21, #24]
	bl	_avio_write
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.comm	_ff_codec_movvideo_tags,4,2     ; @ff_codec_movvideo_tags
	.comm	_ff_codec_bmp_tags,4,2          ; @ff_codec_bmp_tags
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"codec %s is not supported by this format\n"

	.comm	_AV_CODEC_ID_RAWVIDEO,8,3       ; @AV_CODEC_ID_RAWVIDEO
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"No bmp codec tag found for codec %s\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AVMEDIA_TYPE_AUDIO,8,3         ; @AVMEDIA_TYPE_AUDIO
	.comm	_ff_codec_wav_tags,4,2          ; @ff_codec_wav_tags
l_.str.2:                               ; @.str.2
	.asciz	"No wav codec tag found for codec %s\n"

	.comm	_FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX,4,2 ; @FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX
	.comm	_MATROSKA_ID_CODECPRIVATE,4,2   ; @MATROSKA_ID_CODECPRIVATE
	.no_dead_strip	_mkv_write_codecprivate
.subsections_via_symbols
