	.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, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r13
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movl	56(%r13), %edi
	movq	32(%r13), %rax
	movq	(%rax), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_lseek
	movq	%rax, -72(%rbp)
	testq	%rax, %rax
	js	LBB0_1
## %bb.3:
	movq	%rax, 40(%r13)
	movq	32(%r13), %rcx
	movq	%rax, (%rcx)
	movslq	%r14d, %rbx
	movq	-72(%rbp), %rax
	addq	%rbx, %rax
	cmpq	(%r13), %rax
	jge	LBB0_4
LBB0_10:
	movl	56(%r13), %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_write
	testq	%rax, %rax
	js	LBB0_7
## %bb.11:
	movq	%rax, %r14
	movq	$0, 48(%r13)
	addq	%rax, 40(%r13)
	movq	32(%r13), %rax
	addq	%r14, (%rax)
	movq	24(%r13), %rax
	addq	%r14, (%rax)
	movl	8(%rax), %edi
	leaq	16(%r13), %rbx
	movq	_cmp@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	-64(%rbp), %rcx
	movq	%rbx, %rsi
	callq	_ijk_av_tree_find
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movq	-64(%rbp), %rax
LBB0_13:
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movq	8(%rax), %rcx
	movq	(%rax), %rdx
	addq	%rcx, %rdx
	cmpq	(%rbx), %rdx
	jne	LBB0_16
## %bb.15:
	movq	16(%rax), %rdx
	addq	%rcx, %rdx
	cmpq	-72(%rbp), %rdx
	jne	LBB0_16
## %bb.25:
	addq	%r14, %rcx
	movq	%rcx, 8(%rax)
	jmp	LBB0_23
LBB0_1:
	incq	48(%r13)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_26
## %bb.2:
	movq	%r12, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ijkio_cache_file_error         ## TAILCALL
LBB0_4:
	leaq	-72(%rbp), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_ijkio_cache_file_overrang
	cmpq	%rbx, %rax
	jge	LBB0_6
## %bb.5:
	movl	$1, 8(%r13)
	movq	_FILE_RW_ERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	jmp	LBB0_23
LBB0_16:
	movl	$24, %edi
	callq	_malloc
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_ijk_av_tree_node_alloc
	movq	%rax, -80(%rbp)
	testq	%rbx, %rbx
	je	LBB0_18
## %bb.17:
	testq	%rax, %rax
	je	LBB0_18
## %bb.19:
	movq	16(%r13), %rax
	movq	%rax, (%rbx)
	movq	-72(%rbp), %rax
	movq	%rax, 16(%rbx)
	movq	%r14, 8(%rbx)
	movq	24(%r13), %rdi
	addq	$8, %rdi
	movl	(%r15), %edx
	leaq	-80(%rbp), %rcx
	movq	%rbx, %rsi
	callq	_ijk_av_tree_insert
	testq	%rax, %rax
	je	LBB0_23
## %bb.20:
	cmpq	%rbx, %rax
	je	LBB0_23
## %bb.21:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%edi, %edi
	callq	_av_log
	movq	$-1, %r14
	jmp	LBB0_22
LBB0_6:
	cmpq	$0, -72(%rbp)
	js	LBB0_7
## %bb.8:
	cmpq	(%r13), %rax
	jne	LBB0_10
## %bb.9:
	xorl	%r14d, %r14d
	jmp	LBB0_23
LBB0_7:
	incq	48(%r13)
	movq	%r12, %rdi
	callq	_ijkio_cache_file_error
	movq	%rax, %r14
	jmp	LBB0_23
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IJKAVERROR
	movq	%rax, %r14
LBB0_22:
	movq	%rbx, %rdi
	callq	_free
	movq	-80(%rbp), %rdi
	callq	_free
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_26
## %bb.24:
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_FILE_RW_ERROR,8,3              ## @FILE_RW_ERROR
	.comm	_cmp,4,2                        ## @cmp
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.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	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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x22, [x0]
	stp	xzr, xzr, [sp, #24]
	ldr	w0, [x22, #56]
	ldr	x8, [x22, #32]
	ldr	x1, [x8]
Lloh3:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_lseek
	str	x0, [sp, #16]
	tbnz	x0, #63, LBB0_7
; %bb.1:
	str	x0, [x22, #40]
	ldr	x8, [x22, #32]
	str	x0, [x8]
	ldr	x8, [sp, #16]
	sxtw	x23, w19
	ldr	x9, [x22]
	add	x8, x8, x23
	cmp	x8, x9
	b.ge	LBB0_9
LBB0_2:
	ldr	w0, [x22, #56]
	mov	x1, x21
	mov	x2, x19
	bl	_write
	tbnz	x0, #63, LBB0_19
; %bb.3:
	mov	x19, x0
	ldp	x9, x8, [x22, #32]
	add	x8, x8, x0
	stp	x8, xzr, [x22, #40]
	ldr	x8, [x9]
	add	x8, x8, x0
	str	x8, [x9]
	ldr	x8, [x22, #24]
	ldr	x9, [x8]
	add	x9, x9, x0
	str	x9, [x8]
	ldr	w0, [x8, #8]
	add	x20, x22, #16
Lloh6:
	adrp	x21, _cmp@GOTPAGE
Lloh7:
	ldr	x21, [x21, _cmp@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x3, sp, #24
	mov	x1, x20
	bl	_ijk_av_tree_find
	ldr	x8, [sp, #24]
	cmp	x0, #0
	csel	x8, x8, x0, eq
	cbz	x8, LBB0_11
; %bb.4:
	ldp	x10, x9, [x8]
	ldr	x11, [x20]
	add	x10, x9, x10
	cmp	x10, x11
	b.ne	LBB0_11
; %bb.5:
	ldr	x10, [x8, #16]
	ldr	x11, [sp, #16]
	add	x10, x10, x9
	cmp	x10, x11
	b.ne	LBB0_11
; %bb.6:
	add	x9, x9, x19
	str	x9, [x8, #8]
	b	LBB0_22
LBB0_7:
	ldr	x8, [x22, #48]
	add	x8, x8, #1
	str	x8, [x22, #48]
	ldr	x8, [sp, #40]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.8:
	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
	add	sp, sp, #112
	b	_ijkio_cache_file_error
LBB0_9:
	add	x1, sp, #16
	mov	x0, x20
	mov	x2, x19
	bl	_ijkio_cache_file_overrang
	cmp	x0, x23
	b.ge	LBB0_16
; %bb.10:
	mov	w8, #1
	str	w8, [x22, #8]
Lloh11:
	adrp	x8, _FILE_RW_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FILE_RW_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	x19, [x8]
	b	LBB0_22
LBB0_11:
	mov	w0, #24
	bl	_malloc
	mov	x20, x0
	bl	_ijk_av_tree_node_alloc
	str	x0, [sp, #8]
	cbz	x20, LBB0_20
; %bb.12:
	cbz	x0, LBB0_20
; %bb.13:
	ldr	x8, [x22, #16]
	stp	x8, x19, [x20]
	ldr	x8, [sp, #16]
	str	x8, [x20, #16]
	ldr	x8, [x22, #24]
	add	x0, x8, #8
	ldr	w2, [x21]
	add	x3, sp, #8
	mov	x1, x20
	bl	_ijk_av_tree_insert
	cbz	x0, LBB0_22
; %bb.14:
	cmp	x0, x20
	b.eq	LBB0_22
; %bb.15:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	bl	_av_log
	mov	x19, #-1
	b	LBB0_21
LBB0_16:
	ldr	x8, [sp, #16]
	tbnz	x8, #63, LBB0_19
; %bb.17:
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.18:
	mov	x19, #0
	b	LBB0_22
LBB0_19:
	ldr	x8, [x22, #48]
	add	x8, x8, #1
	str	x8, [x22, #48]
	mov	x0, x20
	bl	_ijkio_cache_file_error
	mov	x19, x0
	b	LBB0_22
LBB0_20:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_IJKAVERROR
	mov	x19, x0
LBB0_21:
	mov	x0, x20
	bl	_free
	ldr	x0, [sp, #8]
	bl	_free
LBB0_22:
	ldr	x8, [sp, #40]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	mov	x0, x19
	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
	add	sp, sp, #112
	ret
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_FILE_RW_ERROR,8,3              ; @FILE_RW_ERROR
	.comm	_cmp,4,2                        ; @cmp
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"av_tree_insert failed\n"

	.no_dead_strip	_add_entry
.subsections_via_symbols
