	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mkv_read_subelements_ebml
_mkv_read_subelements_ebml:             ## @mkv_read_subelements_ebml
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_MKV_ELEMENT_ID_DOCTYPE@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_10
## %bb.1:
	movq	(%r14), %rax
	movq	(%rax), %rbx
	movaps	L___const.mkv_read_subelements_ebml.doctype(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	movb	$0, -48(%rbp)
	leal	-18(%r15), %eax
	cmpl	$-17, %eax
	jae	LBB0_2
LBB0_9:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_LOG_DEBUG
LBB0_16:
	movq	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_19
LBB0_10:
	movl	%esi, %ebx
	leaq	-64(%rbp), %rdx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_mkv_read_element_data_uint
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.11:
	leal	-128(%rbx), %eax
	cmpl	$2, %eax
	jb	LBB0_15
## %bb.12:
	cmpl	$130, %ebx
	je	LBB0_17
## %bb.13:
	cmpl	$131, %ebx
	jne	LBB0_18
## %bb.14:
	cmpl	$5, -64(%rbp)
	jge	LBB0_16
	jmp	LBB0_18
LBB0_2:
	leaq	L_.str(%rip), %rcx
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_READ_STRING
	cmpl	%r15d, %eax
	jne	LBB0_18
## %bb.3:
	cmpl	$4, %r15d
	je	LBB0_6
## %bb.4:
	cmpl	$8, %r15d
	jne	LBB0_9
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	leaq	-64(%rbp), %rdi
	movl	$8, %edx
	jmp	LBB0_7
LBB0_15:
	cmpl	$1, -64(%rbp)
	jne	LBB0_16
	jmp	LBB0_18
LBB0_17:
	cmpl	$9, -64(%rbp)
	jge	LBB0_16
LBB0_18:
	movq	%r14, %rdi
	callq	_STREAM_STATUS
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_21
## %bb.20:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	leaq	-64(%rbp), %rdi
	movl	$4, %edx
LBB0_7:
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movl	$1, (%rbx)
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_19
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_MKV_ELEMENT_ID_DOCTYPE,4,2     ## @MKV_ELEMENT_ID_DOCTYPE
	.section	__TEXT,__cstring,cstring_literals
	.p2align	4                               ## @__const.mkv_read_subelements_ebml.doctype
L___const.mkv_read_subelements_ebml.doctype:
	.asciz	"matroska doctype"

L_.str:                                 ## @.str
	.asciz	"string"

L_.str.1:                               ## @.str.1
	.asciz	"matroska"

L_.str.2:                               ## @.str.2
	.asciz	"webm"

L_.str.3:                               ## @.str.3
	.asciz	"invalid doctype"

	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,8,3 ## @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.no_dead_strip	_mkv_read_subelements_ebml
.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_ebml
_mkv_read_subelements_ebml:             ; @mkv_read_subelements_ebml
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _MKV_ELEMENT_ID_DOCTYPE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MKV_ELEMENT_ID_DOCTYPE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x19]
	ldr	x21, [x8]
	strb	wzr, [sp, #16]
Lloh6:
	adrp	x8, l___const.mkv_read_subelements_ebml.doctype@PAGE
Lloh7:
	add	x8, x8, l___const.mkv_read_subelements_ebml.doctype@PAGEOFF
Lloh8:
	ldr	q0, [x8]
	str	q0, [sp]
	sub	w8, w20, #18
	cmn	w8, #17
	b.hs	LBB0_9
LBB0_2:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_LOG_DEBUG
LBB0_3:
Lloh11:
	adrp	x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGEOFF]
Lloh13:
	ldr	x0, [x8]
	b	LBB0_16
LBB0_4:
	mov	x21, x1
	mov	x2, sp
	mov	x0, x19
	mov	x1, x20
	bl	_mkv_read_element_data_uint
Lloh14:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_16
; %bb.5:
	sub	w8, w21, #128
	cmp	w8, #2
	b.lo	LBB0_13
; %bb.6:
	cmp	w21, #130
	b.eq	LBB0_14
; %bb.7:
	cmp	w21, #131
	b.ne	LBB0_15
; %bb.8:
	ldr	w8, [sp]
	cmp	w8, #5
	b.ge	LBB0_3
	b	LBB0_15
LBB0_9:
Lloh17:
	adrp	x3, l_.str@PAGE
Lloh18:
	add	x3, x3, l_.str@PAGEOFF
	mov	x1, sp
	mov	x0, x19
	mov	x2, x20
	bl	_READ_STRING
	cmp	w0, w20
	b.ne	LBB0_15
; %bb.10:
	cmp	w20, #4
	b.eq	LBB0_18
; %bb.11:
	cmp	w20, #8
	b.ne	LBB0_2
; %bb.12:
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, sp
	mov	w2, #8
	bl	_strncmp
	cbnz	x0, LBB0_2
	b	LBB0_19
LBB0_13:
	ldr	w8, [sp]
	cmp	w8, #1
	b.ne	LBB0_3
	b	LBB0_15
LBB0_14:
	ldr	w8, [sp]
	cmp	w8, #9
	b.ge	LBB0_3
LBB0_15:
	mov	x0, x19
	bl	_STREAM_STATUS
LBB0_16:
	ldr	x8, [sp, #24]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.17:
	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
	add	sp, sp, #80
	ret
LBB0_18:
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, sp
	mov	w2, #4
	bl	_strncmp
	cbnz	x0, LBB0_2
LBB0_19:
	mov	w8, #1
	str	w8, [x21]
Lloh26:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh28:
	ldr	x0, [x8]
	b	LBB0_16
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAddLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_MKV_ELEMENT_ID_DOCTYPE,4,2     ; @MKV_ELEMENT_ID_DOCTYPE
	.section	__TEXT,__cstring,cstring_literals
l___const.mkv_read_subelements_ebml.doctype: ; @__const.mkv_read_subelements_ebml.doctype
	.asciz	"matroska doctype"

l_.str:                                 ; @.str
	.asciz	"string"

l_.str.1:                               ; @.str.1
	.asciz	"matroska"

l_.str.2:                               ; @.str.2
	.asciz	"webm"

l_.str.3:                               ; @.str.3
	.asciz	"invalid doctype"

	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,8,3 ; @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.no_dead_strip	_mkv_read_subelements_ebml
.subsections_via_symbols
