	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mkv_find_next_segment
_mkv_find_next_segment:                 ## @mkv_find_next_segment
	.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	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r13
	.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)
	movl	$-1, %edi
	callq	_INT64_C
	movq	_MKV_ELEMENT_ID_INVALID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	%r12, %rdi
	movl	%eax, %esi
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	leaq	-48(%rbp), %r9
	callq	_mkv_read_element_header
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_STREAM_POSITION
	cmpq	(%r13), %r15
	jne	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %r14
	movq	-56(%rbp), %rax
	movq	_MKV_ELEMENT_ID_SEGMENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rbx
	movq	-64(%rbp), %r15
	movl	$-1, %edi
	callq	_INT64_C
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_mkv_read_element_data
	cmpq	(%r13), %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_STREAM_STATUS
	cmpq	(%r13), %rax
	je	LBB0_1
LBB0_5:
	movq	%r12, %rdi
	callq	_STREAM_STATUS
	cmpq	(%r13), %rax
	jne	LBB0_6
## %bb.7:
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rax
	movq	8(%rdx), %rcx
	incq	%rax
	movq	%rax, (%rdx)
	leaq	(%rax,%rax,2), %rax
	movq	%r14, 16(%rcx,%rax,8)
	movq	-64(%rbp), %rdx
	movq	%rdx, 8(%rcx,%rax,8)
	movq	-56(%rbp), %rdx
	movq	%rdx, (%rcx,%rax,8)
	movq	(%r13), %r15
	jmp	LBB0_8
LBB0_6:
	movq	%r12, %rdi
	callq	_STREAM_STATUS
	movq	%rax, %r15
LBB0_8:
	movq	%r15, %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	_MKV_ELEMENT_ID_INVALID,4,2     ## @MKV_ELEMENT_ID_INVALID
	.comm	_MKV_ELEMENT_ID_SEGMENT,8,3     ## @MKV_ELEMENT_ID_SEGMENT
	.no_dead_strip	_mkv_find_next_segment
.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_segment
_mkv_find_next_segment:                 ; @mkv_find_next_segment
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x25, _mkv_cluster_elements_list@GOTPAGE
Lloh1:
	ldr	x25, [x25, _mkv_cluster_elements_list@GOTPAGEOFF]
Lloh2:
	adrp	x26, _MKV_ELEMENT_ID_INVALID@GOTPAGE
Lloh3:
	ldr	x26, [x26, _MKV_ELEMENT_ID_INVALID@GOTPAGEOFF]
Lloh4:
	adrp	x24, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh5:
	ldr	x24, [x24, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh6:
	adrp	x27, _MKV_ELEMENT_ID_SEGMENT@GOTPAGE
Lloh7:
	ldr	x27, [x27, _MKV_ELEMENT_ID_SEGMENT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	str	x8, [sp, #8]
	mov	w0, #-1
	bl	_INT64_C
	mov	x1, x0
	ldr	w4, [x26]
	add	x2, sp, #16
	add	x3, sp, #24
	add	x5, sp, #8
	mov	x0, x20
	bl	_mkv_read_element_header
	mov	x22, x0
	mov	x0, x20
	bl	_STREAM_POSITION
	ldr	x8, [x24]
	cmp	x22, x8
	b.ne	LBB0_8
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x21, x0
	ldr	x8, [sp, #16]
	ldr	x9, [x27]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x22, [sp, #8]
	ldr	x23, [sp, #24]
	mov	w0, #-1
	bl	_INT64_C
	mov	x3, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_mkv_read_element_data
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x20
	bl	_STREAM_STATUS
	ldr	x8, [x24]
	cmp	x0, x8
	b.eq	LBB0_1
LBB0_5:
	mov	x0, x20
	bl	_STREAM_STATUS
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x8, x9, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	mov	w10, #24
	madd	x8, x8, x10, x9
	str	x21, [x8, #16]
	ldr	x9, [sp, #24]
	str	x9, [x8, #8]
	ldr	x9, [sp, #16]
	str	x9, [x8]
	ldr	x22, [x24]
	b	LBB0_8
LBB0_7:
	mov	x0, x20
	bl	_STREAM_STATUS
	mov	x22, x0
LBB0_8:
	mov	x0, x22
	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	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.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	_MKV_ELEMENT_ID_INVALID,4,2     ; @MKV_ELEMENT_ID_INVALID
	.comm	_MKV_ELEMENT_ID_SEGMENT,8,3     ; @MKV_ELEMENT_ID_SEGMENT
	.no_dead_strip	_mkv_find_next_segment
.subsections_via_symbols
