	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_chunk_filename
_get_chunk_filename:                    ## @get_chunk_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	movq	_MAX_FILENAME_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movq	8(%rdi), %rcx
	movq	16(%rcx), %r14
	testl	%esi, %esi
	je	LBB0_7
## %bb.2:
	movl	8(%rcx), %esi
	testl	%esi, %esi
	je	LBB0_3
## %bb.5:
	movq	%rdx, %rdi
	movl	%eax, %edx
	callq	_av_strlcpy
	cmpl	(%r15), %eax
	jl	LBB0_10
## %bb.6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_4
LBB0_7:
	movl	(%rbx), %r8d
	movq	(%rcx), %rcx
	decq	%rcx
	movq	%rdx, %rdi
	movl	%eax, %esi
	movl	%r8d, %edx
	callq	_av_get_frame_filename
	testq	%rax, %rax
	js	LBB0_8
LBB0_10:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_4:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_9
LBB0_8:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %ecx
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_FILENAME_SIZE,4,2          ## @MAX_FILENAME_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No header filename provided\n"

L_.str.1:                               ## @.str.1
	.asciz	"Header filename too long\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid chunk filename template '%s'\n"

	.no_dead_strip	_get_chunk_filename
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_chunk_filename
_get_chunk_filename:                    ; @get_chunk_filename
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	cbz	x2, LBB0_10
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x21, _MAX_FILENAME_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MAX_FILENAME_SIZE@GOTPAGEOFF]
	ldr	w8, [x21]
	ldr	x10, [x0, #8]
	ldr	x19, [x10, #16]
	cbz	w1, LBB0_5
; %bb.2:
	ldr	w1, [x10, #8]
	cbz	w1, LBB0_7
; %bb.3:
	mov	x0, x2
	mov	x2, x8
	bl	_av_strlcpy
	ldr	w8, [x21]
	cmp	w0, w8
	b.lt	LBB0_6
; %bb.4:
Lloh2:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_5:
	ldr	w9, [x20]
	ldr	x10, [x10]
	sub	x3, x10, #1
	mov	x0, x2
	mov	x1, x8
	mov	x2, x9
	bl	_av_get_frame_filename
	tbnz	x0, #63, LBB0_8
LBB0_6:
	mov	w0, #0
	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
	add	sp, sp, #64
	ret
LBB0_7:
Lloh7:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh12:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w8, [x20]
	str	x8, [sp]
Lloh15:
	adrp	x2, l_.str.2@PAGE
Lloh16:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_av_log
LBB0_10:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	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
	add	sp, sp, #64
	b	_AVERROR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_FILENAME_SIZE,4,2          ; @MAX_FILENAME_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No header filename provided\n"

l_.str.1:                               ; @.str.1
	.asciz	"Header filename too long\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid chunk filename template '%s'\n"

	.no_dead_strip	_get_chunk_filename
.subsections_via_symbols
