	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mkv_read_subelements_compression
_mkv_read_subelements_compression:      ## @mkv_read_subelements_compression
	.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	%rdx, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	movq	_MKV_ELEMENT_ID_CONTENT_COMPRESSION_ALGO@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_8
## %bb.1:
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_mkv_read_element_data_uint
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.2:
	movl	-28(%rbp), %ecx
	testl	%ecx, %ecx
	je	LBB0_6
## %bb.3:
	cmpl	$3, %ecx
	jne	LBB0_4
## %bb.5:
	movq	_MKV_CONTENT_ENCODING_COMPRESSION_HEADER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%r15), %rdx
	movq	8(%r15), %rsi
	leaq	(%rdx,%rdx,2), %rdx
	movq	%rcx, (%rsi,%rdx,8)
	jmp	LBB0_19
LBB0_8:
	movq	_MKV_ELEMENT_ID_CONTENT_COMPRESSION_SETTINGS@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_17
## %bb.9:
	movq	(%r15), %rax
	movq	8(%r15), %rcx
	leaq	(%rax,%rax,2), %rax
	movq	(%rcx,%rax,8), %rax
	movq	_MKV_CONTENT_ENCODING_COMPRESSION_HEADER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.10:
	movq	_MKV_MAX_ENCODING_DATA@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jge	LBB0_12
## %bb.11:
	movq	_VC_CONTAINER_ERROR_OUT_OF_RESOURCES@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_17:
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rax
LBB0_18:
	movq	(%rax), %rax
	jmp	LBB0_19
LBB0_15:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_SKIP_BYTES
	jmp	LBB0_16
LBB0_6:
	movq	_MKV_CONTENT_ENCODING_COMPRESSION_ZLIB@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	(%r15), %rcx
	movq	8(%r15), %rdx
	leaq	(%rcx,%rcx,2), %rdi
	movq	%rsi, (%rdx,%rdi,8)
	jmp	LBB0_7
LBB0_4:
	movq	(%r15), %rcx
	movq	8(%r15), %rdx
LBB0_7:
	movq	_MKV_CONTENT_ENCODING_UNKNOWN@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	leaq	(%rcx,%rcx,2), %rcx
	movq	%rsi, (%rdx,%rcx,8)
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	%r14d, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	(%r15), %rcx
	movq	8(%r15), %rdx
	leaq	(%rcx,%rcx,2), %rcx
	movq	%rax, 16(%rdx,%rcx,8)
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_READ_BYTES
	movq	(%r15), %rcx
	movq	8(%r15), %rdx
	leaq	(%rcx,%rcx,2), %rcx
	xorl	%esi, %esi
	cmpq	%r14, %rax
	cmoveq	%rax, %rsi
	movq	%rsi, 8(%rdx,%rcx,8)
LBB0_16:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_STREAM_STATUS                  ## TAILCALL
LBB0_13:
	movq	_VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_MKV_ELEMENT_ID_CONTENT_COMPRESSION_ALGO,8,3 ## @MKV_ELEMENT_ID_CONTENT_COMPRESSION_ALGO
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_MKV_CONTENT_ENCODING_COMPRESSION_ZLIB,8,3 ## @MKV_CONTENT_ENCODING_COMPRESSION_ZLIB
	.comm	_MKV_CONTENT_ENCODING_COMPRESSION_HEADER,8,3 ## @MKV_CONTENT_ENCODING_COMPRESSION_HEADER
	.comm	_MKV_CONTENT_ENCODING_UNKNOWN,8,3 ## @MKV_CONTENT_ENCODING_UNKNOWN
	.comm	_MKV_ELEMENT_ID_CONTENT_COMPRESSION_SETTINGS,8,3 ## @MKV_ELEMENT_ID_CONTENT_COMPRESSION_SETTINGS
	.comm	_MKV_MAX_ENCODING_DATA,8,3      ## @MKV_MAX_ENCODING_DATA
	.comm	_VC_CONTAINER_ERROR_OUT_OF_RESOURCES,8,3 ## @VC_CONTAINER_ERROR_OUT_OF_RESOURCES
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ## @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.no_dead_strip	_mkv_read_subelements_compression
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mkv_read_subelements_compression
_mkv_read_subelements_compression:      ; @mkv_read_subelements_compression
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x21, [x8]
Lloh0:
	adrp	x8, _MKV_ELEMENT_ID_CONTENT_COMPRESSION_ALGO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MKV_ELEMENT_ID_CONTENT_COMPRESSION_ALGO@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_5
; %bb.1:
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_mkv_read_element_data_uint
Lloh3:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.2:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_12
; %bb.3:
	cmp	w8, #3
	b.ne	LBB0_13
; %bb.4:
Lloh6:
	adrp	x8, _MKV_CONTENT_ENCODING_COMPRESSION_HEADER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MKV_CONTENT_ENCODING_COMPRESSION_HEADER@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldp	x10, x9, [x21]
	mov	w11, #24
	mul	x10, x10, x11
	str	x8, [x9, x10]
	b	LBB0_15
LBB0_5:
Lloh9:
	adrp	x8, _MKV_ELEMENT_ID_CONTENT_COMPRESSION_SETTINGS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MKV_ELEMENT_ID_CONTENT_COMPRESSION_SETTINGS@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_9
; %bb.6:
	ldp	x9, x8, [x21]
	mov	w10, #24
	mul	x9, x9, x10
	ldr	x8, [x8, x9]
Lloh12:
	adrp	x9, _MKV_CONTENT_ENCODING_COMPRESSION_HEADER@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MKV_CONTENT_ENCODING_COMPRESSION_HEADER@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.7:
Lloh15:
	adrp	x8, _MKV_MAX_ENCODING_DATA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MKV_MAX_ENCODING_DATA@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ge	LBB0_16
; %bb.8:
Lloh18:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_RESOURCES@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_RESOURCES@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh20:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
LBB0_10:
	ldr	x0, [x8]
	b	LBB0_15
LBB0_11:
	mov	x0, x19
	mov	x1, x20
	bl	_SKIP_BYTES
	b	LBB0_18
LBB0_12:
Lloh22:
	adrp	x8, _MKV_CONTENT_ENCODING_COMPRESSION_ZLIB@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MKV_CONTENT_ENCODING_COMPRESSION_ZLIB@GOTPAGEOFF]
Lloh24:
	ldr	x10, [x8]
	ldp	x9, x8, [x21]
	mov	w11, #24
	mul	x11, x9, x11
	str	x10, [x8, x11]
	b	LBB0_14
LBB0_13:
	ldp	x9, x8, [x21]
LBB0_14:
Lloh25:
	adrp	x10, _MKV_CONTENT_ENCODING_UNKNOWN@GOTPAGE
Lloh26:
	ldr	x10, [x10, _MKV_CONTENT_ENCODING_UNKNOWN@GOTPAGEOFF]
Lloh27:
	ldr	x10, [x10]
	mov	w11, #24
	mul	x9, x9, x11
	str	x10, [x8, x9]
LBB0_15:
	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
	add	sp, sp, #64
	ret
LBB0_16:
	mov	x0, x20
	bl	_malloc
	cbz	x0, LBB0_19
; %bb.17:
	mov	x1, x0
	ldp	x9, x8, [x21]
	mov	w22, #24
	madd	x8, x9, x22, x8
	str	x0, [x8, #16]
	mov	x0, x19
	mov	x2, x20
	bl	_READ_BYTES
	ldp	x9, x8, [x21]
	madd	x8, x9, x22, x8
	cmp	x0, x20
	csel	x9, x0, xzr, eq
	str	x9, [x8, #8]
LBB0_18:
	mov	x0, x19
	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
	add	sp, sp, #64
	b	_STREAM_STATUS
LBB0_19:
Lloh28:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGE
Lloh29:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGEOFF]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MKV_ELEMENT_ID_CONTENT_COMPRESSION_ALGO,8,3 ; @MKV_ELEMENT_ID_CONTENT_COMPRESSION_ALGO
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_MKV_CONTENT_ENCODING_COMPRESSION_ZLIB,8,3 ; @MKV_CONTENT_ENCODING_COMPRESSION_ZLIB
	.comm	_MKV_CONTENT_ENCODING_COMPRESSION_HEADER,8,3 ; @MKV_CONTENT_ENCODING_COMPRESSION_HEADER
	.comm	_MKV_CONTENT_ENCODING_UNKNOWN,8,3 ; @MKV_CONTENT_ENCODING_UNKNOWN
	.comm	_MKV_ELEMENT_ID_CONTENT_COMPRESSION_SETTINGS,8,3 ; @MKV_ELEMENT_ID_CONTENT_COMPRESSION_SETTINGS
	.comm	_MKV_MAX_ENCODING_DATA,8,3      ; @MKV_MAX_ENCODING_DATA
	.comm	_VC_CONTAINER_ERROR_OUT_OF_RESOURCES,8,3 ; @VC_CONTAINER_ERROR_OUT_OF_RESOURCES
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ; @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.no_dead_strip	_mkv_read_subelements_compression
.subsections_via_symbols
