	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mkv_find_next_element
_mkv_find_next_element:                 ## @mkv_find_next_element
	.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
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_mkv_cluster_elements_list@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%r14, %rdi
	callq	_STREAM_POSITION
	movq	(%r15), %rcx
	movq	16(%r15), %rdx
	leaq	(%rcx,%rcx,2), %rcx
	movq	8(%rdx,%rcx,8), %rsi
	addq	(%rdx,%rcx,8), %rsi
	cmpq	%rsi, %rax
	jge	LBB0_10
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	callq	_INT64_C
	shll	$30, %eax
	movq	(%r15), %rcx
	movq	16(%r15), %rdx
	leaq	(%rcx,%rcx,2), %rcx
	movq	16(%rdx,%rcx,8), %r8
	movq	%r14, %rdi
	movl	%eax, %esi
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	leaq	-48(%rbp), %r9
	callq	_mkv_read_element_header
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_STREAM_POSITION
	cmpq	(%rbx), %r12
	jne	LBB0_16
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %r13
	movq	-56(%rbp), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, %rax
	je	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_MKV_ELEMENT_ID_BLOCKGROUP@GOTPCREL(%rip), %rdx
	cmpq	%rcx, (%rdx)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_MKV_ELEMENT_ID_SIMPLE_BLOCK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_13
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_MKV_ELEMENT_ID_BLOCK@GOTPCREL(%rip), %rdx
	cmpq	%rcx, (%rdx)
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_MKV_ELEMENT_ID_REFERENCE_BLOCK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, 8(%r15)
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_STREAM_POSITION
	movq	-64(%rbp), %rbx
	addq	%rbx, %rax
	movq	(%r15), %rcx
	movq	16(%r15), %rdx
	leaq	(%rcx,%rcx,2), %rcx
	movq	8(%rdx,%rcx,8), %rsi
	addq	(%rdx,%rcx,8), %rsi
	cmpq	%rsi, %rax
	jge	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %r12
	movl	$1, %edi
	callq	_INT64_C
	shll	$30, %eax
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	callq	_mkv_read_element_data
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_STREAM_STATUS
	cmpq	(%rbx), %rax
	je	LBB0_1
LBB0_13:
	movq	%r14, %rdi
	callq	_STREAM_STATUS
	cmpq	(%rbx), %rax
	jne	LBB0_14
## %bb.15:
	movq	(%r15), %rax
	movq	16(%r15), %rcx
	incq	%rax
	movq	%rax, (%r15)
	leaq	(%rax,%rax,2), %rax
	movq	%r13, (%rcx,%rax,8)
	movq	-64(%rbp), %rdx
	movq	%rdx, 8(%rcx,%rax,8)
	movq	-56(%rbp), %rdx
	movq	%rdx, 16(%rcx,%rax,8)
	movq	(%rbx), %r12
	jmp	LBB0_16
LBB0_10:
	movq	_VC_CONTAINER_ERROR_NOT_FOUND@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	jmp	LBB0_16
LBB0_14:
	movq	%r14, %rdi
	callq	_STREAM_STATUS
	movq	%rax, %r12
LBB0_16:
	movq	%r12, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_mkv_cluster_elements_list,8,3  ## @mkv_cluster_elements_list
	.comm	_VC_CONTAINER_ERROR_NOT_FOUND,8,3 ## @VC_CONTAINER_ERROR_NOT_FOUND
	.comm	_MKV_ELEMENT_ID_BLOCKGROUP,8,3  ## @MKV_ELEMENT_ID_BLOCKGROUP
	.comm	_MKV_ELEMENT_ID_SIMPLE_BLOCK,8,3 ## @MKV_ELEMENT_ID_SIMPLE_BLOCK
	.comm	_MKV_ELEMENT_ID_BLOCK,8,3       ## @MKV_ELEMENT_ID_BLOCK
	.comm	_MKV_ELEMENT_ID_REFERENCE_BLOCK,8,3 ## @MKV_ELEMENT_ID_REFERENCE_BLOCK
	.comm	_MKV_MAX_ELEMENT_SIZE,8,3       ## @MKV_MAX_ELEMENT_SIZE
	.no_dead_strip	_mkv_find_next_element
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mkv_find_next_element
_mkv_find_next_element:                 ; @mkv_find_next_element
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x26, _mkv_cluster_elements_list@GOTPAGE
Lloh1:
	ldr	x26, [x26, _mkv_cluster_elements_list@GOTPAGEOFF]
	mov	w27, #24
Lloh2:
	adrp	x25, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh3:
	ldr	x25, [x25, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh4:
	adrp	x28, _MKV_ELEMENT_ID_SIMPLE_BLOCK@GOTPAGE
Lloh5:
	ldr	x28, [x28, _MKV_ELEMENT_ID_SIMPLE_BLOCK@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	str	x8, [sp, #8]
	mov	x0, x20
	bl	_STREAM_POSITION
	ldr	x8, [x19, #16]
	ldr	x9, [x19]
	madd	x8, x9, x27, x8
	ldp	x9, x8, [x8]
	add	x8, x8, x9
	cmp	x0, x8
	b.ge	LBB0_13
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1
	bl	_INT64_C
	lsl	w1, w0, #30
	ldr	x8, [x19, #16]
	ldr	x9, [x19]
	madd	x8, x9, x27, x8
	ldr	x4, [x8, #16]
	add	x2, sp, #16
	add	x3, sp, #24
	add	x5, sp, #8
	mov	x0, x20
	bl	_mkv_read_element_header
	mov	x23, x0
	mov	x0, x20
	bl	_STREAM_POSITION
	ldr	x8, [x25]
	cmp	x23, x8
	b.ne	LBB0_15
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x22, x0
	ldr	x8, [sp, #16]
	cmp	x8, x21
	b.eq	LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh6:
	adrp	x9, _MKV_ELEMENT_ID_BLOCKGROUP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MKV_ELEMENT_ID_BLOCKGROUP@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	x10, [x28]
	cmp	x9, x21
	ccmp	x8, x10, #0, eq
	b.eq	LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh9:
	adrp	x9, _MKV_ELEMENT_ID_BLOCK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MKV_ELEMENT_ID_BLOCK@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x21
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh12:
	adrp	x9, _MKV_ELEMENT_ID_REFERENCE_BLOCK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MKV_ELEMENT_ID_REFERENCE_BLOCK@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x20
	bl	_STREAM_POSITION
	ldr	x23, [sp, #24]
	add	x8, x23, x0
	ldr	x9, [x19, #16]
	ldr	x10, [x19]
	madd	x9, x10, x27, x9
	ldp	x10, x9, [x9]
	add	x9, x9, x10
	cmp	x8, x9
	b.ge	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x24, [sp, #8]
	mov	w0, #1
	bl	_INT64_C
	lsl	w3, w0, #30
	mov	x0, x20
	mov	x1, x24
	mov	x2, x23
	bl	_mkv_read_element_data
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x20
	bl	_STREAM_STATUS
	ldr	x8, [x25]
	cmp	x0, x8
	b.eq	LBB0_1
LBB0_11:
	mov	x0, x20
	bl	_STREAM_STATUS
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.12:
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	ldr	x9, [x19, #16]
	mov	w10, #24
	madd	x8, x8, x10, x9
	str	x22, [x8]
	ldr	x9, [sp, #24]
	str	x9, [x8, #8]
	ldr	x9, [sp, #16]
	str	x9, [x8, #16]
	ldr	x23, [x25]
	b	LBB0_15
LBB0_13:
Lloh15:
	adrp	x8, _VC_CONTAINER_ERROR_NOT_FOUND@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_NOT_FOUND@GOTPAGEOFF]
Lloh17:
	ldr	x23, [x8]
	b	LBB0_15
LBB0_14:
	mov	x0, x20
	bl	_STREAM_STATUS
	mov	x23, x0
LBB0_15:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_mkv_cluster_elements_list,8,3  ; @mkv_cluster_elements_list
	.comm	_VC_CONTAINER_ERROR_NOT_FOUND,8,3 ; @VC_CONTAINER_ERROR_NOT_FOUND
	.comm	_MKV_ELEMENT_ID_BLOCKGROUP,8,3  ; @MKV_ELEMENT_ID_BLOCKGROUP
	.comm	_MKV_ELEMENT_ID_SIMPLE_BLOCK,8,3 ; @MKV_ELEMENT_ID_SIMPLE_BLOCK
	.comm	_MKV_ELEMENT_ID_BLOCK,8,3       ; @MKV_ELEMENT_ID_BLOCK
	.comm	_MKV_ELEMENT_ID_REFERENCE_BLOCK,8,3 ; @MKV_ELEMENT_ID_REFERENCE_BLOCK
	.comm	_MKV_MAX_ELEMENT_SIZE,8,3       ; @MKV_MAX_ELEMENT_SIZE
	.no_dead_strip	_mkv_find_next_element
.subsections_via_symbols
