	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mkv_add_seekhead_entry
_mkv_add_seekhead_entry:                ## @mkv_add_seekhead_entry
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	(%rdi), %rcx
	movq	8(%rdi), %rsi
	testq	%rcx, %rcx
	jle	LBB0_2
## %bb.1:
	movl	$-1, %eax
	cmpq	%rsi, %rcx
	jle	LBB0_4
LBB0_2:
	movq	24(%rbx), %rdi
	incq	%rsi
	movl	$16, %edx
	callq	_av_realloc_array
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rax, 24(%rbx)
	movq	8(%rbx), %rcx
	movq	%rcx, %rdx
	shlq	$4, %rdx
	movl	%r15d, 8(%rax,%rdx)
	subq	16(%rbx), %r14
	incq	%rcx
	movq	%rcx, 8(%rbx)
	movq	%r14, (%rax,%rdx)
	xorl	%eax, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mkv_add_seekhead_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mkv_add_seekhead_entry
_mkv_add_seekhead_entry:                ; @mkv_add_seekhead_entry
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldp	x9, x8, [x0]
	cmp	x9, #1
	ccmp	x9, x8, #0, ge
	b.le	LBB0_3
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x0, [x0, #24]
	add	x1, x8, #1
	mov	w2, #16
	bl	_av_realloc_array
	cbz	x0, LBB0_5
; %bb.2:
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #24]
	ldp	x9, x10, [x19, #8]
	add	x8, x8, x9, lsl #4
	str	w21, [x8, #8]
	sub	x10, x20, x10
	add	x9, x9, #1
	str	x9, [x19, #8]
	str	x10, [x8]
	b	LBB0_4
LBB0_3:
	mov	w0, #-1
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mkv_add_seekhead_entry
.subsections_via_symbols
