	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function mkv_write_video_projection
LCPI0_0:
	.quad	0x3ef0000000000000              ## double 1.52587890625E-5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_mkv_write_video_projection:            ## @mkv_write_video_projection
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rax
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -48(%rbp)
	movl	$0, -144(%rbp)
	movq	_AV_PKT_DATA_SPHERICAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-144(%rbp), %rdx
	movq	%rax, %rdi
	callq	_av_stream_get_side_data
	xorl	%r15d, %r15d
	cmpl	$0, -144(%rbp)
	je	LBB0_19
## %bb.1:
	movq	%rax, %r12
	leaq	-136(%rbp), %rdi
	callq	_avio_open_dyn_buf
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movl	(%r12), %eax
	cmpl	$128, %eax
	je	LBB0_7
## %bb.4:
	cmpl	$130, %eax
	je	LBB0_8
## %bb.5:
	cmpl	$129, %eax
	jne	LBB0_21
## %bb.6:
	movq	-136(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOPROJECTIONTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MATROSKA_VIDEO_PROJECTION_TYPE_EQUIRECTANGULAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_put_ebml_uint
	jmp	LBB0_10
LBB0_2:
	movl	%eax, %r15d
	jmp	LBB0_19
LBB0_7:
	xorpd	%xmm0, %xmm0
	movupd	%xmm0, (%rsp)
	leaq	-140(%rbp), %rbx
	leaq	-128(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$20, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_ffio_init_context
	movq	-136(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOPROJECTIONTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MATROSKA_VIDEO_PROJECTION_TYPE_EQUIRECTANGULAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_put_ebml_uint
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_wb32
	movl	48(%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_wb32
	movl	44(%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_wb32
	movl	40(%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_wb32
	movl	36(%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_wb32
	movq	-136(%rbp), %rbx
	movq	_MATROSKA_ID_VIDEOPROJECTIONPRIVATE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	-140(%rbp), %rdi
	callq	_avio_tell
	movq	%rbx, %rdi
	movl	%r13d, %esi
	jmp	LBB0_9
LBB0_8:
	xorpd	%xmm0, %xmm0
	movupd	%xmm0, (%rsp)
	leaq	-140(%rbp), %rbx
	leaq	-128(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$12, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_ffio_init_context
	movq	-136(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOPROJECTIONTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MATROSKA_VIDEO_PROJECTION_TYPE_CUBEMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_put_ebml_uint
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_wb32
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_wb32
	movl	32(%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_wb32
	movq	-136(%rbp), %r13
	movq	_MATROSKA_ID_VIDEOPROJECTIONPRIVATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	-140(%rbp), %rdi
	callq	_avio_tell
	movq	%r13, %rdi
	movl	%ebx, %esi
LBB0_9:
	leaq	-128(%rbp), %rdx
	movl	%eax, %ecx
	callq	_put_ebml_binary
LBB0_10:
	movq	24(%r12), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	-136(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOPROJECTIONPOSEYAW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	mulsd	LCPI0_0(%rip), %xmm0
	callq	_put_ebml_float
LBB0_12:
	movq	16(%r12), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	-136(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOPROJECTIONPOSEPITCH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	mulsd	LCPI0_0(%rip), %xmm0
	callq	_put_ebml_float
LBB0_14:
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	-136(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOPROJECTIONPOSEROLL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	mulsd	LCPI0_0(%rip), %xmm0
	callq	_put_ebml_float
	jmp	LBB0_16
LBB0_21:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
LBB0_16:
	movq	-136(%rbp), %rdi
	leaq	-152(%rbp), %rsi
	callq	_avio_close_dyn_buf
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %ebx
	movq	_MATROSKA_ID_VIDEOPROJECTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_start_ebml_master
	movl	%eax, %r12d
	movq	-152(%rbp), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_avio_write
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_end_ebml_master
LBB0_18:
	leaq	-152(%rbp), %rdi
	callq	_av_freep
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.20:
	movl	%r15d, %eax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PKT_DATA_SPHERICAL,4,2      ## @AV_PKT_DATA_SPHERICAL
	.comm	_MATROSKA_ID_VIDEOPROJECTIONTYPE,4,2 ## @MATROSKA_ID_VIDEOPROJECTIONTYPE
	.comm	_MATROSKA_VIDEO_PROJECTION_TYPE_EQUIRECTANGULAR,4,2 ## @MATROSKA_VIDEO_PROJECTION_TYPE_EQUIRECTANGULAR
	.comm	_MATROSKA_ID_VIDEOPROJECTIONPRIVATE,4,2 ## @MATROSKA_ID_VIDEOPROJECTIONPRIVATE
	.comm	_MATROSKA_VIDEO_PROJECTION_TYPE_CUBEMAP,4,2 ## @MATROSKA_VIDEO_PROJECTION_TYPE_CUBEMAP
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown projection type\n"

	.comm	_MATROSKA_ID_VIDEOPROJECTIONPOSEYAW,4,2 ## @MATROSKA_ID_VIDEOPROJECTIONPOSEYAW
	.comm	_MATROSKA_ID_VIDEOPROJECTIONPOSEPITCH,4,2 ## @MATROSKA_ID_VIDEOPROJECTIONPOSEPITCH
	.comm	_MATROSKA_ID_VIDEOPROJECTIONPOSEROLL,4,2 ## @MATROSKA_ID_VIDEOPROJECTIONPOSEROLL
	.comm	_MATROSKA_ID_VIDEOPROJECTION,4,2 ## @MATROSKA_ID_VIDEOPROJECTION
	.no_dead_strip	_mkv_write_video_projection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mkv_write_video_projection
_mkv_write_video_projection:            ; @mkv_write_video_projection
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	mov	x8, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	stur	x9, [x29, #-40]
	str	wzr, [sp, #20]
Lloh3:
	adrp	x9, _AV_PKT_DATA_SPHERICAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_PKT_DATA_SPHERICAL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	add	x2, sp, #20
	mov	x0, x8
	bl	_av_stream_get_side_data
	ldr	w8, [sp, #20]
	cbz	w8, LBB0_18
; %bb.1:
	mov	x20, x0
	add	x0, sp, #24
	bl	_avio_open_dyn_buf
	tbnz	w0, #31, LBB0_19
; %bb.2:
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.3:
	cmp	w8, #130
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, #129
	b.ne	LBB0_14
; %bb.5:
	ldr	x0, [sp, #24]
Lloh6:
	adrp	x8, _MATROSKA_ID_VIDEOPROJECTIONTYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOPROJECTIONTYPE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _MATROSKA_VIDEO_PROJECTION_TYPE_EQUIRECTANGULAR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MATROSKA_VIDEO_PROJECTION_TYPE_EQUIRECTANGULAR@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	bl	_put_ebml_uint
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_9
	b	LBB0_10
LBB0_6:
	add	x0, sp, #36
	add	x1, sp, #40
	mov	w2, #20
	mov	w3, #1
	mov	x4, #0
	mov	x5, #0
	mov	x6, #0
	mov	x7, #0
	bl	_ffio_init_context
	ldr	x0, [sp, #24]
Lloh12:
	adrp	x8, _MATROSKA_ID_VIDEOPROJECTIONTYPE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOPROJECTIONTYPE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _MATROSKA_VIDEO_PROJECTION_TYPE_EQUIRECTANGULAR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MATROSKA_VIDEO_PROJECTION_TYPE_EQUIRECTANGULAR@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	bl	_put_ebml_uint
	add	x0, sp, #36
	mov	w1, #0
	bl	_avio_wb32
	ldr	w1, [x20, #48]
	add	x0, sp, #36
	bl	_avio_wb32
	ldr	w1, [x20, #44]
	add	x0, sp, #36
	bl	_avio_wb32
	ldr	w1, [x20, #40]
	add	x0, sp, #36
	bl	_avio_wb32
	ldr	w1, [x20, #36]
	b	LBB0_8
LBB0_7:
	add	x0, sp, #36
	add	x1, sp, #40
	mov	w2, #12
	mov	w3, #1
	mov	x4, #0
	mov	x5, #0
	mov	x6, #0
	mov	x7, #0
	bl	_ffio_init_context
	ldr	x0, [sp, #24]
Lloh18:
	adrp	x8, _MATROSKA_ID_VIDEOPROJECTIONTYPE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOPROJECTIONTYPE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _MATROSKA_VIDEO_PROJECTION_TYPE_CUBEMAP@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MATROSKA_VIDEO_PROJECTION_TYPE_CUBEMAP@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	bl	_put_ebml_uint
	add	x0, sp, #36
	mov	w1, #0
	bl	_avio_wb32
	add	x0, sp, #36
	mov	w1, #0
	bl	_avio_wb32
	ldr	w1, [x20, #32]
LBB0_8:
	add	x0, sp, #36
	bl	_avio_wb32
	ldr	x21, [sp, #24]
Lloh24:
	adrp	x8, _MATROSKA_ID_VIDEOPROJECTIONPRIVATE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOPROJECTIONPRIVATE@GOTPAGEOFF]
Lloh26:
	ldr	w22, [x8]
	add	x0, sp, #36
	bl	_avio_tell
	mov	x3, x0
	add	x2, sp, #40
	mov	x0, x21
	mov	x1, x22
	bl	_put_ebml_binary
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_10
LBB0_9:
	ldr	x0, [sp, #24]
Lloh27:
	adrp	x9, _MATROSKA_ID_VIDEOPROJECTIONPOSEYAW@GOTPAGE
Lloh28:
	ldr	x9, [x9, _MATROSKA_ID_VIDEOPROJECTIONPOSEYAW@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x9]
	scvtf	d0, x8
	mov	x8, #4535124824762089472
	fmov	d1, x8
	fmul	d0, d0, d1
	bl	_put_ebml_float
LBB0_10:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_12
; %bb.11:
	ldr	x0, [sp, #24]
Lloh30:
	adrp	x9, _MATROSKA_ID_VIDEOPROJECTIONPOSEPITCH@GOTPAGE
Lloh31:
	ldr	x9, [x9, _MATROSKA_ID_VIDEOPROJECTIONPOSEPITCH@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x9]
	scvtf	d0, x8
	mov	x8, #4535124824762089472
	fmov	d1, x8
	fmul	d0, d0, d1
	bl	_put_ebml_float
LBB0_12:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_15
; %bb.13:
	ldr	x0, [sp, #24]
Lloh33:
	adrp	x9, _MATROSKA_ID_VIDEOPROJECTIONPOSEROLL@GOTPAGE
Lloh34:
	ldr	x9, [x9, _MATROSKA_ID_VIDEOPROJECTIONPOSEROLL@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x9]
	scvtf	d0, x8
	mov	x8, #4535124824762089472
	fmov	d1, x8
	fmul	d0, d0, d1
	bl	_put_ebml_float
	b	LBB0_15
LBB0_14:
Lloh36:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
Lloh39:
	adrp	x2, l_.str@PAGE
Lloh40:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
LBB0_15:
	ldr	x0, [sp, #24]
	add	x1, sp, #8
	bl	_avio_close_dyn_buf
	cbz	w0, LBB0_17
; %bb.16:
	mov	x20, x0
Lloh41:
	adrp	x8, _MATROSKA_ID_VIDEOPROJECTION@GOTPAGE
Lloh42:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOPROJECTION@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_start_ebml_master
	mov	x21, x0
	ldr	x1, [sp, #8]
	mov	x0, x19
	mov	x2, x20
	bl	_avio_write
	mov	x0, x19
	mov	x1, x21
	bl	_end_ebml_master
LBB0_17:
	add	x0, sp, #8
	bl	_av_freep
LBB0_18:
	mov	w0, #0
LBB0_19:
	ldur	x8, [x29, #-40]
Lloh44:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh45:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PKT_DATA_SPHERICAL,4,2      ; @AV_PKT_DATA_SPHERICAL
	.comm	_MATROSKA_ID_VIDEOPROJECTIONTYPE,4,2 ; @MATROSKA_ID_VIDEOPROJECTIONTYPE
	.comm	_MATROSKA_VIDEO_PROJECTION_TYPE_EQUIRECTANGULAR,4,2 ; @MATROSKA_VIDEO_PROJECTION_TYPE_EQUIRECTANGULAR
	.comm	_MATROSKA_ID_VIDEOPROJECTIONPRIVATE,4,2 ; @MATROSKA_ID_VIDEOPROJECTIONPRIVATE
	.comm	_MATROSKA_VIDEO_PROJECTION_TYPE_CUBEMAP,4,2 ; @MATROSKA_VIDEO_PROJECTION_TYPE_CUBEMAP
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown projection type\n"

	.comm	_MATROSKA_ID_VIDEOPROJECTIONPOSEYAW,4,2 ; @MATROSKA_ID_VIDEOPROJECTIONPOSEYAW
	.comm	_MATROSKA_ID_VIDEOPROJECTIONPOSEPITCH,4,2 ; @MATROSKA_ID_VIDEOPROJECTIONPOSEPITCH
	.comm	_MATROSKA_ID_VIDEOPROJECTIONPOSEROLL,4,2 ; @MATROSKA_ID_VIDEOPROJECTIONPOSEROLL
	.comm	_MATROSKA_ID_VIDEOPROJECTION,4,2 ; @MATROSKA_ID_VIDEOPROJECTION
	.no_dead_strip	_mkv_write_video_projection
.subsections_via_symbols
