	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function matroska_parse_laces
_matroska_parse_laces:                  ## @matroska_parse_laces
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movl	(%rdx), %r13d
	testl	%ecx, %ecx
	je	LBB0_13
## %bb.1:
	movl	%ecx, %r12d
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rbx
	xorl	%edi, %edi
	testl	%r13d, %r13d
	setg	%dil
	movq	%r9, %r14
	callq	_av_assert0
	movl	(%rbx), %edi
	incl	%edi
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	%edi, (%r14)
	movl	$4, %esi
	callq	_av_malloc_array
	testq	%rax, %rax
	je	LBB0_15
## %bb.2:
	movq	%rax, %r14
	addq	$4, %rbx
	decl	%r13d
	cmpl	$3, %r12d
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	je	LBB0_16
## %bb.3:
	xorl	%r15d, %r15d
	cmpl	$2, %r12d
	je	LBB0_20
## %bb.4:
	cmpl	$1, %r12d
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_29
## %bb.5:
	xorl	%eax, %eax
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %r8
	xorl	%edx, %edx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r8), %r15d
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	incq	%rax
	testl	%r15d, %r15d
	jne	LBB0_23
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movslq	(%rcx), %rsi
	decq	%rsi
	cmpq	%rsi, %rax
	jge	LBB0_22
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	$0, (%r14,%rax,4)
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%edx, %r13d
	jle	LBB0_6
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	(%rbx), %edi
	addl	%edi, %edx
	addl	%edi, %esi
	movl	%esi, (%r14,%rax,4)
	addq	$4, %rbx
	decl	%r13d
	cmpl	$255, %edi
	je	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_13:
	movl	$1, (%r9)
	movl	$4, %edi
	callq	_av_malloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movl	%r13d, (%rax)
	xorl	%r15d, %r15d
	jmp	LBB0_31
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_16:
	leaq	-88(%rbp), %rcx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_matroska_ebmlnum_uint
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_18
## %bb.17:
	movl	-88(%rbp), %esi
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jle	LBB0_32
LBB0_18:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_AV_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	testl	%r15d, %r15d
	js	LBB0_29
	jmp	LBB0_19
LBB0_20:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %ecx
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	LBB0_26
LBB0_19:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_29
LBB0_22:
	xorl	%r15d, %r15d
LBB0_23:
	movl	%r13d, %esi
	subl	%edx, %esi
	jle	LBB0_25
## %bb.24:
	movl	%eax, %eax
	movl	%esi, (%r14,%rax,4)
	jmp	LBB0_29
LBB0_25:
	movl	(%r8), %r15d
	jmp	LBB0_29
LBB0_26:
	testl	%ecx, %ecx
	jle	LBB0_29
## %bb.27:
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	movl	%eax, (%r14,%rsi,4)
	incq	%rsi
	movslq	(%rdi), %rcx
	cmpq	%rcx, %rsi
	jl	LBB0_28
LBB0_29:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
LBB0_30:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	movl	%r13d, (%rdx)
LBB0_31:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	movl	%r15d, %eax
	leaq	(%rbx,%rax,4), %rbx
	subl	%r15d, %r13d
	movl	%esi, (%r14)
	xorl	%r15d, %r15d
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$3, (%rcx)
	jl	LBB0_37
## %bb.33:
	movl	$1, %r12d
LBB0_34:                                ## =>This Inner Loop Header: Depth=1
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r13d, %edx
	leaq	-84(%rbp), %rcx
	callq	_matroska_ebmlnum_sint
	movq	_INT_MAX@GOTPCREL(%rip), %rcx
	movl	%eax, %edx
	testl	%eax, %eax
	js	LBB0_38
## %bb.35:                              ##   in Loop: Header=BB0_34 Depth=1
	movl	-84(%rbp), %eax
	addl	-4(%r14,%r12,4), %eax
	cmpl	(%rcx), %eax
	jg	LBB0_38
## %bb.36:                              ##   in Loop: Header=BB0_34 Depth=1
	movl	%edx, %ecx
	leaq	(%rbx,%rcx,4), %rbx
	subl	%edx, %r13d
	movl	%eax, (%r14,%r12,4)
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	addl	%eax, %esi
	incq	%r12
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movslq	(%rcx), %rax
	decq	%rax
	cmpq	%rax, %r12
	jl	LBB0_34
LBB0_37:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_41
LBB0_38:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_AV_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%edx, %r15d
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	movl	%r15d, %eax
	testl	%r15d, %r15d
	js	LBB0_40
## %bb.39:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_40:
	movl	%eax, %r15d
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	-68(%rbp), %esi                 ## 4-byte Reload
LBB0_41:
	movl	%r13d, %eax
	subl	%esi, %eax
	jle	LBB0_43
## %bb.42:
	movslq	(%rcx), %rcx
	movl	%eax, -4(%r14,%rcx,4)
	jmp	LBB0_30
LBB0_43:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_30
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_AV_LOG_INFO,4,2                ## @AV_LOG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EBML block data error\n"

	.no_dead_strip	_matroska_parse_laces
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function matroska_parse_laces
_matroska_parse_laces:                  ; @matroska_parse_laces
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x25, x5
	mov	x28, x4
	ldr	w19, [x2]
	cbz	w3, LBB0_14
; %bb.1:
	mov	x27, x3
	mov	x20, x2
	mov	x21, x1
	mov	x26, x0
	ldr	x22, [x1]
	cmp	w19, #0
	cset	w0, gt
	bl	_av_assert0
	ldr	w8, [x22], #4
	add	w0, w8, #1
	str	w0, [x25]
	mov	w1, #4
	bl	_av_malloc_array
	cbz	x0, LBB0_16
; %bb.2:
	mov	x23, x0
	sub	w24, w19, #1
	cmp	w27, #3
	b.eq	LBB0_17
; %bb.3:
	cmp	w27, #2
	b.eq	LBB0_21
; %bb.4:
	cmp	w27, #1
	b.ne	LBB0_28
; %bb.5:
	mov	x8, #0
	mov	w9, #0
Lloh0:
	adrp	x10, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x10, [x10, _AVERROR_INVALIDDATA@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x10]
	add	x8, x8, #1
	cbnz	w0, LBB0_12
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldrsw	x11, [x25]
	sub	x11, x11, #1
	cmp	x8, x11
	b.ge	LBB0_23
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w11, #0
	str	wzr, [x23, x8, lsl #2]
LBB0_9:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w24, w9
	b.le	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w12, [x22], #4
	add	w9, w12, w9
	add	w11, w11, w12
	str	w11, [x23, x8, lsl #2]
	sub	w24, w24, #1
	cmp	w12, #255
	b.eq	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #0
	add	x8, x8, #1
	cbz	w0, LBB0_7
LBB0_12:
	subs	w9, w24, w9
	b.le	LBB0_24
LBB0_13:
	str	w9, [x23, w8, uxtw #2]
	b	LBB0_29
LBB0_14:
	mov	w8, #1
	str	w8, [x25]
	mov	w0, #4
	bl	_av_malloc
	str	x0, [x28]
	cbz	x0, LBB0_16
; %bb.15:
	mov	x8, x0
	mov	w0, #0
	str	w19, [x8]
	b	LBB0_30
LBB0_16:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_AVERROR
LBB0_17:
	str	x28, [sp]                       ; 8-byte Folded Spill
	add	x3, sp, #12
	mov	x0, x26
	mov	x1, x22
	mov	x2, x24
	bl	_matroska_ebmlnum_uint
	mov	x27, x0
	tbnz	w0, #31, LBB0_19
; %bb.18:
	ldr	w28, [sp, #12]
Lloh5:
	adrp	x11, _INT_MAX@GOTPAGE
Lloh6:
	ldr	x11, [x11, _INT_MAX@GOTPAGEOFF]
	ldr	w8, [x11]
	cmp	w28, w8
	b.le	LBB0_31
LBB0_19:
	ldr	w0, [x26]
Lloh7:
	adrp	x8, _AV_LOG_INFO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_LOG_INFO@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
Lloh12:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w27, #0
	csel	w0, w27, w8, lt
LBB0_20:
	ldr	x28, [sp]                       ; 8-byte Folded Reload
	b	LBB0_29
LBB0_21:
	ldr	w8, [x25]
	sdiv	w9, w24, w8
	msub	w9, w9, w8, w24
	cbz	w9, LBB0_25
; %bb.22:
Lloh15:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	b	LBB0_29
LBB0_23:
	mov	w0, #0
	subs	w9, w24, w9
	b.gt	LBB0_13
LBB0_24:
	ldr	w0, [x10]
	b	LBB0_29
LBB0_25:
	cmp	w8, #1
	b.lt	LBB0_28
; %bb.26:
	mov	x9, #0
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	sdiv	w8, w24, w8
	str	w8, [x23, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x8, [x25]
	cmp	x9, x8
	b.lt	LBB0_27
LBB0_28:
	mov	w0, #0
LBB0_29:
	str	x22, [x21]
	str	x23, [x28]
	str	w24, [x20]
LBB0_30:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_31:
	add	x22, x22, w27, uxtw #2
	sub	w24, w24, w27
	str	w28, [x23]
	ldr	w8, [x25]
	cmp	w8, #3
	b.lt	LBB0_36
; %bb.32:
	mov	x19, #0
LBB0_33:                                ; =>This Inner Loop Header: Depth=1
	add	x3, sp, #8
	mov	x0, x26
	mov	x1, x22
	mov	x2, x24
	mov	x27, x11
	bl	_matroska_ebmlnum_sint
	mov	x11, x27
	mov	x27, x0
	tbnz	w0, #31, LBB0_37
; %bb.34:                               ;   in Loop: Header=BB0_33 Depth=1
	ldr	w8, [x23, x19, lsl #2]
	ldr	w9, [sp, #8]
	ldr	w10, [x11]
	add	w8, w9, w8
	cmp	w8, w10
	b.gt	LBB0_37
; %bb.35:                               ;   in Loop: Header=BB0_33 Depth=1
	add	x22, x22, w27, uxtw #2
	sub	w24, w24, w27
	add	x9, x23, x19, lsl #2
	str	w8, [x9, #4]
	add	w28, w8, w28
	ldrsw	x8, [x25]
	sub	x8, x8, #1
	add	x9, x19, #2
	add	x19, x19, #1
	cmp	x9, x8
	b.lt	LBB0_33
LBB0_36:
	mov	w0, #0
	b	LBB0_38
LBB0_37:
	ldr	w0, [x26]
Lloh18:
	adrp	x8, _AV_LOG_INFO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_INFO@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
Lloh23:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w27, #0
	csel	w0, w27, w8, lt
LBB0_38:
	subs	w8, w24, w28
	b.le	LBB0_40
; %bb.39:
	ldrsw	x9, [x25]
	add	x9, x23, x9, lsl #2
	stur	w8, [x9, #-4]
	b	LBB0_20
LBB0_40:
Lloh26:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	b	LBB0_20
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_AV_LOG_INFO,4,2                ; @AV_LOG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EBML block data error\n"

	.no_dead_strip	_matroska_parse_laces
.subsections_via_symbols
