	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_entry
_add_entry:                             ## @add_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	%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
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	$0, -72(%rbp)
	movl	24(%rbx), %edi
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_lseek
	testq	%rax, %rax
	js	LBB0_1
## %bb.3:
	movq	%rax, %r15
	movq	%rax, 16(%rbx)
	movl	24(%rbx), %edi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_write
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	%eax, %r13d
	movl	%eax, %eax
	addq	%rax, 16(%rbx)
	movl	8(%rbx), %edi
	movq	_cmp@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-64(%rbp), %rcx
	movq	%rbx, %rsi
	callq	_av_tree_find
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	-64(%rbp), %rax
LBB0_7:
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movslq	8(%rax), %rcx
	movq	(%rax), %rdx
	addq	%rcx, %rdx
	cmpq	(%rbx), %rdx
	jne	LBB0_10
## %bb.9:
	movq	16(%rax), %rdx
	addq	%rcx, %rdx
	cmpq	%r15, %rdx
	jne	LBB0_10
## %bb.19:
	addl	%r13d, %ecx
	movl	%ecx, 8(%rax)
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_2
LBB0_10:
	movl	$24, %edi
	callq	_av_malloc
	movq	%rax, %r12
	xorl	%eax, %eax
	callq	_av_tree_node_alloc
	movq	%rax, -72(%rbp)
	testq	%r12, %r12
	je	LBB0_12
## %bb.11:
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	(%rbx), %rax
	addq	$8, %rbx
	movq	%rax, (%r12)
	movq	%r15, 16(%r12)
	movl	%r13d, 8(%r12)
	movq	_cmp@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-72(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_av_tree_insert
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:
	cmpq	%r12, %rax
	je	LBB0_17
## %bb.15:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movl	$-1, %ebx
	jmp	LBB0_16
LBB0_4:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_2:
	movq	%r14, %rdi
	callq	_av_log
	xorl	%r12d, %r12d
	jmp	LBB0_16
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
LBB0_16:
	movq	%r12, %rdi
	callq	_av_free
	movq	-72(%rbp), %rdi
	callq	_av_free
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.18:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_errno,4,2                      ## @errno
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"seek in cache failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"write in cache failed\n"

	.comm	_cmp,4,2                        ## @cmp
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"av_tree_insert failed\n"

	.no_dead_strip	_add_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_entry
_add_entry:                             ; @add_entry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x20, [x0]
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp]
	ldr	w0, [x20, #24]
Lloh3:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_lseek
	tbnz	x0, #63, LBB0_6
; %bb.1:
	mov	x21, x0
	str	x0, [x20, #16]
	ldr	w0, [x20, #24]
	mov	x1, x23
	mov	x2, x22
	bl	_write
	tbnz	w0, #31, LBB0_12
; %bb.2:
	mov	x23, x0
	ldr	x8, [x20, #16]
	add	x8, x8, w0, uxtw
	str	x8, [x20, #16]
	mov	x24, x20
	ldr	w0, [x24, #8]!
Lloh6:
	adrp	x25, _cmp@GOTPAGE
Lloh7:
	ldr	x25, [x25, _cmp@GOTPAGEOFF]
	ldr	w2, [x25]
	add	x3, sp, #8
	mov	x1, x20
	bl	_av_tree_find
	ldr	x8, [sp, #8]
	cmp	x0, #0
	csel	x8, x8, x0, eq
	cbz	x8, LBB0_7
; %bb.3:
	ldr	x10, [x8]
	ldrsw	x9, [x8, #8]
	ldr	x11, [x20]
	add	x10, x10, x9
	cmp	x10, x11
	b.ne	LBB0_7
; %bb.4:
	ldr	x10, [x8, #16]
	add	x10, x10, x9
	cmp	x10, x21
	b.ne	LBB0_7
; %bb.5:
	mov	w20, #0
	add	w9, w9, w23
	str	w9, [x8, #8]
	b	LBB0_16
LBB0_6:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_13
LBB0_7:
	mov	w0, #24
	bl	_av_malloc
	mov	x22, x0
	bl	_av_tree_node_alloc
	str	x0, [sp]
	cbz	x22, LBB0_14
; %bb.8:
	cbz	x0, LBB0_14
; %bb.9:
	ldr	x8, [x20]
	str	x8, [x22]
	str	x21, [x22, #16]
	str	w23, [x22, #8]
	ldr	w2, [x25]
	mov	x3, sp
	mov	x0, x24
	mov	x1, x22
	bl	_av_tree_insert
	mov	w20, #0
	cbz	x0, LBB0_16
; %bb.10:
	cmp	x0, x22
	b.eq	LBB0_16
; %bb.11:
Lloh16:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w20, #-1
	b	LBB0_15
LBB0_12:
Lloh21:
	adrp	x8, _errno@GOTPAGE
Lloh22:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
Lloh24:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x2, l_.str.1@PAGE
Lloh28:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_13:
	mov	x0, x19
	bl	_av_log
	mov	x22, #0
	b	LBB0_15
LBB0_14:
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
LBB0_15:
	mov	x0, x22
	bl	_av_free
	ldr	x0, [sp]
	bl	_av_free
LBB0_16:
	ldr	x8, [sp, #24]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	mov	x0, x20
	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
	add	sp, sp, #112
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_errno,4,2                      ; @errno
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"seek in cache failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"write in cache failed\n"

	.comm	_cmp,4,2                        ; @cmp
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"av_tree_insert failed\n"

	.no_dead_strip	_add_entry
.subsections_via_symbols
