	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_file
_add_file:                              ## @add_file
	.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
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	%rsi, -56(%rbp)
	movq	8(%rdi), %r15
	cmpq	$0, (%r15)
	jle	LBB0_3
## %bb.1:
	movq	%r13, %rdi
	callq	_safe_filename
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movq	%r13, %rcx
	callq	_av_log
	movq	_EPERM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %edi
	callq	_FAIL
LBB0_3:
	movq	%r13, %rdi
	callq	_avio_find_protocol_name
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_strlen
	movslq	%eax, %r14
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_memcmp
	testl	%eax, %eax
	je	LBB0_5
LBB0_8:
	movq	(%r12), %rdi
	callq	_strlen
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	addl	%ebx, %eax
	addl	$16, %eax
	movslq	%eax, %r14
	movq	%r14, %rdi
	callq	_av_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %edi
	callq	_FAIL
LBB0_10:
	movq	(%r12), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r13, %rcx
	callq	_ff_make_absolute_url
	leaq	-56(%rbp), %rdi
	callq	_av_freep
	movq	%rbx, %r13
LBB0_11:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	8(%r15), %eax
	movl	(%rbx), %edi
	cmpl	%edi, %eax
	jae	LBB0_13
## %bb.12:
	movq	16(%r15), %r12
	jmp	LBB0_18
LBB0_13:
	addl	%edi, %edi
	movl	$16, %esi
	callq	_FFMAX
	movq	%rax, %r14
	movl	8(%r15), %eax
	cmpq	%rax, %r14
	jbe	LBB0_16
## %bb.14:
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	shrq	$3, %rax
	movabsq	$2635249153387078803, %rcx      ## imm = 0x2492492492492493
	mulq	%rcx
	cmpq	%rdx, %r14
	ja	LBB0_16
## %bb.15:
	movq	16(%r15), %rdi
	imulq	$56, %r14, %rsi
	callq	_av_realloc
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_17
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %edi
	callq	_FAIL
	xorl	%r12d, %r12d
LBB0_17:
	movq	%r12, 16(%r15)
	movl	%r14d, (%rbx)
	movl	8(%r15), %eax
LBB0_18:
	leal	1(%rax), %ecx
	movl	%ecx, 8(%r15)
	movl	%eax, %eax
	imulq	$56, %rax, %rbx
	leaq	(%r12,%rbx), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	movq	%r13, (%r12,%rbx)
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, 48(%r12,%rbx)
	movq	(%rax), %rcx
	movq	%rcx, 40(%r12,%rbx)
	movq	(%rax), %rcx
	movq	%rcx, 32(%r12,%rbx)
	movq	(%rax), %rcx
	movq	%rcx, 24(%r12,%rbx)
	movq	(%rax), %rcx
	movq	%rcx, 16(%r12,%rbx)
	movq	(%rax), %rax
	movq	%rax, 8(%r12,%rbx)
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movb	(%r13,%r14), %al
	cmpb	$58, %al
	je	LBB0_7
## %bb.6:
	cmpb	$44, %al
	jne	LBB0_8
LBB0_7:
	movq	$0, -56(%rbp)
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsafe file name '%s'\n"

	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SIZE_MAX,4,2                   ## @SIZE_MAX
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.no_dead_strip	_add_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_file
_add_file:                              ; @add_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	str	x1, [sp, #8]
	ldr	x25, [x0, #8]
	ldr	x8, [x25]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_safe_filename
	cbnz	w0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	mov	x3, x20
	bl	_av_log
Lloh5:
	adrp	x8, _EPERM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_AVERROR
	bl	_FAIL
LBB0_3:
	mov	x0, x20
	bl	_avio_find_protocol_name
	cbz	x0, LBB0_5
; %bb.4:
	mov	x23, x0
	bl	_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x24, w0
	mov	x0, x20
	mov	x1, x23
	mov	x2, x24
	bl	_memcmp
	cbz	w0, LBB0_16
LBB0_5:
	ldr	x0, [x22]
	bl	_strlen
	mov	x23, x0
	mov	x0, x20
	bl	_strlen
	add	w8, w23, w0
	add	w8, w8, #16
	sxtw	x24, w8
	mov	x0, x24
	bl	_av_malloc
	mov	x23, x0
	cbnz	x0, LBB0_7
; %bb.6:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_AVERROR
	bl	_FAIL
LBB0_7:
	ldr	x2, [x22]
	mov	x0, x23
	mov	x1, x24
	mov	x3, x20
	bl	_ff_make_absolute_url
	add	x0, sp, #8
	bl	_av_freep
	mov	x20, x23
LBB0_8:
	ldr	w8, [x25, #8]
	ldr	w9, [x21]
	cmp	w8, w9
	b.hs	LBB0_10
; %bb.9:
	ldr	x0, [x25, #16]
	b	LBB0_15
LBB0_10:
	lsl	w0, w9, #1
	mov	w1, #16
	bl	_FFMAX
	mov	x22, x0
	ldr	w8, [x25, #8]
	cmp	x0, x8
	b.ls	LBB0_13
; %bb.11:
Lloh11:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh13:
	ldrsw	x8, [x8]
	lsr	x8, x8, #3
	mov	x9, #9363
	movk	x9, #37449, lsl #16
	movk	x9, #18724, lsl #32
	movk	x9, #9362, lsl #48
	umulh	x8, x8, x9
	cmp	x22, x8
	b.hi	LBB0_13
; %bb.12:
	ldr	x0, [x25, #16]
	mov	w8, #56
	mul	x1, x22, x8
	bl	_av_realloc
	cbnz	x0, LBB0_14
LBB0_13:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_AVERROR
	bl	_FAIL
	mov	x0, #0
LBB0_14:
	str	x0, [x25, #16]
	str	w22, [x21]
	ldr	w8, [x25, #8]
LBB0_15:
	add	w9, w8, #1
	str	w9, [x25, #8]
	mov	w9, #56
	umaddl	x21, w8, w9, x0
	mov	x0, x21
	mov	w1, #0
	mov	w2, #56
	bl	_memset
	str	x21, [x19]
	str	x20, [x21]
Lloh17:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x9, [x21, #48]
	ldr	x9, [x8]
	str	x9, [x21, #40]
	ldr	x9, [x8]
	str	x9, [x21, #32]
	ldr	x9, [x8]
	str	x9, [x21, #24]
	ldr	x9, [x8]
	str	x9, [x21, #16]
	ldr	x8, [x8]
	str	x8, [x21, #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
	add	sp, sp, #96
	ret
LBB0_16:
	ldrb	w8, [x20, x24]
	cmp	w8, #58
	b.eq	LBB0_18
; %bb.17:
	cmp	w8, #44
	b.ne	LBB0_5
LBB0_18:
	str	xzr, [sp, #8]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsafe file name '%s'\n"

	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SIZE_MAX,4,2                   ; @SIZE_MAX
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.no_dead_strip	_add_file
.subsections_via_symbols
