	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_preset_file                ## -- Begin function get_preset_file
	.p2align	4, 0x90
_get_preset_file:                       ## @get_preset_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -96(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r12d
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	movq	%rax, %r13
	movq	%rax, -80(%rbp)
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	movq	%rax, -72(%rbp)
	movq	_FFMPEG_DATADIR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)
	testl	%r12d, %r12d
	je	LBB0_1
## %bb.4:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_av_strlcpy
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fopen                          ## TAILCALL
LBB0_1:
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	testq	%r13, %r13
	je	LBB0_3
	.p2align	4, 0x90
LBB0_6:
	cmpq	$1, %r14
	leaq	L_.str.4(%rip), %r12
	leaq	L_.str.5(%rip), %rax
	cmoveq	%rax, %r12
	movq	%rbx, %rdi
	movq	%r15, %rsi
	leaq	L_.str.3(%rip), %rdx
	movq	%r13, %rcx
	movq	%r12, %r8
	movq	-88(%rbp), %r9                  ## 8-byte Reload
	xorl	%eax, %eax
	callq	_snprintf
	movq	%rbx, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_fopen
	cmpq	$0, -96(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_9
## %bb.7:
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	leaq	L_.str.6(%rip), %rdx
	movq	%r13, %rcx
	movq	%r12, %r8
	movq	-96(%rbp), %r9                  ## 8-byte Reload
	xorl	%eax, %eax
	callq	_snprintf
	movq	%rbx, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_fopen
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_3:
	xorl	%eax, %eax
LBB0_9:
	testq	%rax, %rax
	jne	LBB0_12
## %bb.10:
	cmpq	$1, %r14
	ja	LBB0_12
## %bb.11:
	movq	-72(%rbp,%r14,8), %r13
	incq	%r14
	testq	%r13, %r13
	jne	LBB0_6
	jmp	LBB0_3
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FFMPEG_DATADIR"

L_.str.1:                               ## @.str.1
	.asciz	"HOME"

	.comm	_FFMPEG_DATADIR,8,3             ## @FFMPEG_DATADIR
L_.str.2:                               ## @.str.2
	.asciz	"r"

L_.str.3:                               ## @.str.3
	.asciz	"%s%s/%s.ffpreset"

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

L_.str.5:                               ## @.str.5
	.asciz	"/.ffmpeg"

L_.str.6:                               ## @.str.6
	.asciz	"%s%s/%s-%s.ffpreset"

	.comm	_MAX_PATH,4,2                   ## @MAX_PATH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_preset_file                ; -- Begin function get_preset_file
	.p2align	2
_get_preset_file:                       ; @get_preset_file
	.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	x20, x4
	mov	x24, x3
	mov	x22, x2
	mov	x21, 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, #40]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	mov	x23, x0
	str	x0, [sp, #16]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
Lloh7:
	adrp	x8, _FFMPEG_DATADIR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _FFMPEG_DATADIR@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	stp	x0, x8, [sp, #24]
	cbz	w24, LBB0_4
; %bb.1:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_av_strlcpy
LBB0_2:
	ldr	x8, [sp, #40]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.3:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	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
	b	_fopen
LBB0_4:
	cbz	x23, LBB0_9
; %bb.5:
Lloh15:
	adrp	x2, l_.str.3@PAGE
Lloh16:
	add	x2, x2, l_.str.3@PAGEOFF
Lloh17:
	adrp	x4, l_.str.4@PAGE
Lloh18:
	add	x4, x4, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x23
	mov	x5, x22
	bl	_snprintf
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x20, LBB0_8
; %bb.6:
	cbnz	x0, LBB0_8
; %bb.7:
	str	x22, [sp]
Lloh21:
	adrp	x2, l_.str.6@PAGE
Lloh22:
	add	x2, x2, l_.str.6@PAGEOFF
Lloh23:
	adrp	x4, l_.str.4@PAGE
Lloh24:
	add	x4, x4, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x23
	mov	x5, x20
	bl	_snprintf
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_fopen
LBB0_8:
	cbnz	x0, LBB0_21
	b	LBB0_10
LBB0_9:
	mov	x0, #0
	cbnz	x0, LBB0_21
LBB0_10:
	ldr	x23, [sp, #24]
	cbz	x23, LBB0_15
; %bb.11:
Lloh27:
	adrp	x2, l_.str.3@PAGE
Lloh28:
	add	x2, x2, l_.str.3@PAGEOFF
Lloh29:
	adrp	x4, l_.str.5@PAGE
Lloh30:
	add	x4, x4, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x23
	mov	x5, x22
	bl	_snprintf
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x20, LBB0_14
; %bb.12:
	cbnz	x0, LBB0_14
; %bb.13:
	str	x22, [sp]
Lloh33:
	adrp	x2, l_.str.6@PAGE
Lloh34:
	add	x2, x2, l_.str.6@PAGEOFF
Lloh35:
	adrp	x4, l_.str.5@PAGE
Lloh36:
	add	x4, x4, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x23
	mov	x5, x20
	bl	_snprintf
Lloh37:
	adrp	x1, l_.str.2@PAGE
Lloh38:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_fopen
LBB0_14:
	cbnz	x0, LBB0_21
	b	LBB0_16
LBB0_15:
	mov	x0, #0
	cbnz	x0, LBB0_21
LBB0_16:
	ldr	x23, [sp, #32]
	cbz	x23, LBB0_20
; %bb.17:
Lloh39:
	adrp	x2, l_.str.3@PAGE
Lloh40:
	add	x2, x2, l_.str.3@PAGEOFF
Lloh41:
	adrp	x4, l_.str.4@PAGE
Lloh42:
	add	x4, x4, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x23
	mov	x5, x22
	bl	_snprintf
Lloh43:
	adrp	x1, l_.str.2@PAGE
Lloh44:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x20, LBB0_21
; %bb.18:
	cbnz	x0, LBB0_21
; %bb.19:
	str	x22, [sp]
Lloh45:
	adrp	x2, l_.str.6@PAGE
Lloh46:
	add	x2, x2, l_.str.6@PAGEOFF
Lloh47:
	adrp	x4, l_.str.4@PAGE
Lloh48:
	add	x4, x4, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x23
	mov	x5, x20
	bl	_snprintf
	b	LBB0_2
LBB0_20:
	mov	x0, #0
LBB0_21:
	ldr	x8, [sp, #40]
Lloh49:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh50:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh51:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.22:
	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_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FFMPEG_DATADIR"

l_.str.1:                               ; @.str.1
	.asciz	"HOME"

	.comm	_FFMPEG_DATADIR,8,3             ; @FFMPEG_DATADIR
l_.str.2:                               ; @.str.2
	.asciz	"r"

l_.str.3:                               ; @.str.3
	.asciz	"%s%s/%s.ffpreset"

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

l_.str.5:                               ; @.str.5
	.asciz	"/.ffmpeg"

l_.str.6:                               ; @.str.6
	.asciz	"%s%s/%s-%s.ffpreset"

	.comm	_MAX_PATH,4,2                   ; @MAX_PATH
.subsections_via_symbols
