	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_segment_filename
_set_segment_filename:                  ## @set_segment_filename
	.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	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rbx
	movq	32(%rbx), %r14
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_2
## %bb.1:
	movl	4(%rbx), %eax
	cltd
	idivl	%ecx
	movl	%edx, 4(%rbx)
LBB0_2:
	cmpq	$0, 24(%rbx)
	je	LBB0_7
## %bb.3:
	leaq	-1084(%rbp), %r15
	movq	%r15, %rdi
	callq	_time
	leaq	-1080(%rbp), %rsi
	movq	%r15, %rdi
	callq	_localtime_r
	movl	(%r12), %edx
	leaq	-1072(%rbp), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	movq	%rax, %rcx
	callq	_strftime
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_5
LBB0_7:
	movl	(%r12), %edx
	movl	4(%rbx), %ecx
	leaq	-1072(%rbp), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_av_get_frame_filename
	testq	%rax, %rax
	js	LBB0_8
LBB0_9:
	leaq	-1072(%rbp), %rdi
	callq	_av_strdup
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_ff_format_set_url
	movl	(%r14), %edi
	callq	_av_basename
	movq	%rax, %rdi
	callq	_strlen
	movq	%rax, %r13
	incq	%r13
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_strlen
	addq	%rax, %r13
LBB0_13:
	leaq	16(%rbx), %rdi
	movq	%r13, %rsi
	callq	_av_reallocp
	testl	%eax, %eax
	js	LBB0_15
## %bb.14:
	movl	16(%rbx), %r15d
	movq	8(%rbx), %rax
	testq	%rax, %rax
	leaq	L_.str.3(%rip), %r12
	cmovneq	%rax, %r12
	movl	(%r14), %edi
	callq	_av_basename
	leaq	L_.str.2(%rip), %rdx
	movl	%r15d, %edi
	movq	%r13, %rsi
	movq	%r12, %rcx
	movq	%rax, %r8
	callq	_snprintf
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_8:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_17
## %bb.16:
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not get segment filename with strftime\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Invalid segment filename template '%s'\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"%s%s"

L_.str.3:                               ## @.str.3
	.space	1

	.no_dead_strip	_set_segment_filename
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_segment_filename
_set_segment_filename:                  ; @set_segment_filename
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #1056
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x22, [x0, #8]
	ldr	x19, [x22, #32]
	ldr	w8, [x22]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w9, [x22, #4]
	sdiv	w10, w9, w8
	msub	w8, w10, w8, w9
	str	w8, [x22, #4]
LBB0_2:
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_5
; %bb.3:
	add	x0, sp, #20
	bl	_time
	add	x0, sp, #20
	add	x1, sp, #16
	bl	_localtime_r
	mov	x3, x0
	ldr	w2, [x20]
	add	x0, sp, #24
	mov	w1, #1024
	bl	_strftime
	cbnz	w0, LBB0_6
; %bb.4:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_13
LBB0_5:
	ldr	w2, [x20]
	ldr	w3, [x22, #4]
	add	x0, sp, #24
	mov	w1, #1024
	bl	_av_get_frame_filename
	tbnz	x0, #63, LBB0_12
LBB0_6:
	add	x0, sp, #24
	bl	_av_strdup
	cbz	x0, LBB0_11
; %bb.7:
	mov	x1, x0
	mov	x0, x19
	bl	_ff_format_set_url
	ldr	w0, [x19]
	bl	_av_basename
	bl	_strlen
	add	x20, x0, #1
	ldr	x0, [x22, #8]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_strlen
	add	x20, x0, x20
LBB0_9:
	add	x0, x22, #16
	mov	x1, x20
	bl	_av_reallocp
	tbnz	w0, #31, LBB0_15
; %bb.10:
	ldr	w21, [x22, #16]
	ldr	x8, [x22, #8]
Lloh8:
	adrp	x9, l_.str.3@PAGE
Lloh9:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	x8, #0
	csel	x22, x9, x8, eq
	ldr	w0, [x19]
	bl	_av_basename
	mov	x4, x0
Lloh10:
	adrp	x2, l_.str.2@PAGE
Lloh11:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x1, x20
	mov	x3, x22
	bl	_snprintf
	mov	w0, #0
	b	LBB0_15
LBB0_11:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	w8, [x20]
	str	x8, [sp]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_13:
	mov	x0, x19
	bl	_av_log
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_15:
	ldur	x8, [x29, #-56]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	add	sp, sp, #1056
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not get segment filename with strftime\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Invalid segment filename template '%s'\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"%s%s"

l_.str.3:                               ; @.str.3
	.space	1

	.no_dead_strip	_set_segment_filename
.subsections_via_symbols
