	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avi_add_ientry
_avi_add_ientry:                        ## @avi_add_ientry
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r13
	movq	16(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movslq	%esi, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %r14
	movq	_AVI_INDEX_CLUSTER_SIZE@GOTPCREL(%rip), %rdi
	movl	8(%r14), %ecx
	movl	12(%r14), %esi
	movl	%ecx, %eax
	cltd
	idivl	(%rdi)
	movl	%edx, %ebx
	movslq	%eax, %r15
	cmpl	%ecx, %esi
	jg	LBB0_6
## %bb.1:
	movq	16(%r14), %rdi
	incl	%eax
	movl	$8, %esi
	movl	%eax, %edx
	callq	_av_realloc_f
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	_AVI_INDEX_CLUSTER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shll	$2, %edi
	callq	_av_malloc
	movq	16(%r14), %rcx
	movq	%rax, (%rcx,%r15,8)
	movq	16(%r14), %rax
	cmpq	$0, (%rax,%r15,8)
	je	LBB0_3
## %bb.5:
	movq	_AVI_INDEX_CLUSTER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, 12(%r14)
LBB0_6:
	movq	16(%r14), %rax
	movq	(%rax,%r15,8), %rax
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,2), %rcx
	movl	16(%rax,%rcx,8), %edi
	testq	%r13, %r13
	je	LBB0_8
## %bb.7:
	movq	%r13, %rsi
	movl	$4, %edx
	callq	_memcpy
	jmp	LBB0_9
LBB0_8:
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
LBB0_9:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	16(%r14), %rax
	movq	(%rax,%r15,8), %rax
	shlq	$3, %rbx
	leaq	(%rbx,%rbx,2), %rbx
	movl	%ecx, (%rax,%rbx)
	callq	_avio_tell
	subq	(%r13), %rax
	movq	16(%r14), %rcx
	movq	(%rcx,%r15,8), %rcx
	movq	%rax, 8(%rcx,%rbx)
	movl	%r12d, 4(%rcx,%rbx)
	movl	(%r14), %edi
	movl	%r12d, %esi
	callq	_FFMAX
	movl	%eax, (%r14)
	incl	8(%r14)
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	$0, 8(%r14)
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AVI_INDEX_CLUSTER_SIZE,4,2     ## @AVI_INDEX_CLUSTER_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_avi_add_ientry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avi_add_ientry
_avi_add_ientry:                        ; @avi_add_ientry
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x4
	mov	x20, x3
	mov	x22, x2
	ldp	x21, x24, [x0, #8]
	ldr	x8, [x0]
	ldr	x8, [x8, w1, sxtw #3]
Lloh0:
	adrp	x28, _AVI_INDEX_CLUSTER_SIZE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _AVI_INDEX_CLUSTER_SIZE@GOTPAGEOFF]
	ldr	x23, [x8]
	ldr	w26, [x28]
	ldp	w27, w8, [x23, #8]
	sdiv	w25, w27, w26
	cmp	w8, w27
	b.gt	LBB0_4
; %bb.1:
	ldr	x0, [x23, #16]
	add	w2, w25, #1
	mov	w1, #8
	bl	_av_realloc_f
	str	x0, [x23, #16]
	cbz	x0, LBB0_8
; %bb.2:
	ldr	w8, [x28]
	lsl	w0, w8, #2
	bl	_av_malloc
	ldr	x8, [x23, #16]
	mov	x9, x25
	sbfiz	x9, x9, #3, #32
	str	x0, [x8, x9]
	ldr	x8, [x23, #16]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_9
; %bb.3:
	ldr	w8, [x28]
	ldr	w9, [x23, #12]
	add	w8, w9, w8
	str	w8, [x23, #12]
LBB0_4:
	msub	w8, w25, w26, w27
	ldr	x9, [x23, #16]
	sxtw	x26, w25
	ldr	x9, [x9, w25, sxtw #3]
	sxtw	x25, w8
	mov	w10, #24
	smaddl	x8, w8, w10, x9
	ldr	w0, [x8, #16]
	cbz	x22, LBB0_6
; %bb.5:
	mov	x1, x22
	mov	w2, #4
	bl	_memcpy
	b	LBB0_7
LBB0_6:
	mov	w1, #0
	mov	w2, #4
	bl	_memset
LBB0_7:
	ldr	x8, [x23, #16]
	lsl	x22, x26, #3
	ldr	x8, [x8, x22]
	add	x9, x25, x25, lsl #1
	lsl	x25, x9, #3
	str	w20, [x8, x25]
	mov	x0, x21
	bl	_avio_tell
	ldr	x8, [x24]
	sub	x8, x0, x8
	ldr	x9, [x23, #16]
	ldr	x9, [x9, x22]
	add	x9, x9, x25
	str	x8, [x9, #8]
	str	w19, [x9, #4]
	ldr	w0, [x23]
	mov	x1, x19
	bl	_FFMAX
	str	w0, [x23]
	ldr	w8, [x23, #8]
	add	w8, w8, #1
	str	w8, [x23, #8]
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_8:
	str	xzr, [x23, #8]
LBB0_9:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AVI_INDEX_CLUSTER_SIZE,4,2     ; @AVI_INDEX_CLUSTER_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_avi_add_ientry
.subsections_via_symbols
