	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_preset_file_2
_get_preset_file_2:                     ## @get_preset_file_2
	.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	$1064, %rsp                     ## imm = 0x428
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -1096(%rbp)               ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	movq	%rax, -1088(%rbp)
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	movq	%rax, -1080(%rbp)
	movq	_AVCONV_DATADIR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -1072(%rbp)
	leaq	-1088(%rbp), %rdi
	callq	_FF_ARRAY_ELEMS
	movl	$-1, %r12d
	testl	%eax, %eax
	jle	LBB0_9
## %bb.1:
	movl	$1, %r14d
	leaq	-1056(%rbp), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-1096(%rbp,%r14,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$2, %r14
	leaq	L_.str.3(%rip), %r8
	leaq	L_.str.4(%rip), %rax
	cmoveq	%rax, %r8
	movq	%r15, (%rsp)
	movq	%r13, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %r9
	xorl	%eax, %eax
	callq	_snprintf
	movq	_AVIO_FLAG_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-1096(%rbp), %rdi               ## 8-byte Reload
	movq	%r13, %rsi
	movq	_int_cb@GOTPCREL(%rip), %rcx
	xorl	%r8d, %r8d
	callq	_avio_open2
	movl	%eax, %r12d
	testl	%eax, %eax
	jns	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-1096(%rbp,%r14,8), %rcx
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$2, %r14
	leaq	L_.str.3(%rip), %r8
	leaq	L_.str.4(%rip), %rax
	cmoveq	%rax, %r8
	movq	%r13, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	leaq	L_.str.5(%rip), %rdx
	movq	%r15, %r9
	xorl	%eax, %eax
	callq	_snprintf
	movq	_AVIO_FLAG_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-1096(%rbp), %rdi               ## 8-byte Reload
	movq	%r13, %rsi
	movq	_int_cb@GOTPCREL(%rip), %rcx
	xorl	%r8d, %r8d
	callq	_avio_open2
	movl	%eax, %r12d
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	-1088(%rbp), %rdi
	callq	_FF_ARRAY_ELEMS
	cltq
	cmpq	%rax, %r14
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	testl	%r12d, %r12d
	js	LBB0_2
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%r12d, %eax
	addq	$1064, %rsp                     ## imm = 0x428
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AVCONV_DATADIR"

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

	.comm	_AVCONV_DATADIR,8,3             ## @AVCONV_DATADIR
L_.str.2:                               ## @.str.2
	.asciz	"%s%s/%s-%s.avpreset"

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

L_.str.4:                               ## @.str.4
	.asciz	"/.avconv"

	.comm	_AVIO_FLAG_READ,4,2             ## @AVIO_FLAG_READ
	.comm	_int_cb,4,2                     ## @int_cb
L_.str.5:                               ## @.str.5
	.asciz	"%s%s/%s.avpreset"

	.no_dead_strip	_get_preset_file_2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_preset_file_2
_get_preset_file_2:                     ; @get_preset_file_2
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #1056
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	str	x0, [sp, #16]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
Lloh7:
	adrp	x8, _AVCONV_DATADIR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AVCONV_DATADIR@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	stp	x0, x8, [sp, #24]
	add	x26, sp, #16
	add	x0, sp, #16
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x27, #0
	mov	w25, #-1
Lloh10:
	adrp	x28, l_.str.3@PAGE
Lloh11:
	add	x28, x28, l_.str.3@PAGEOFF
Lloh12:
	adrp	x22, l_.str.4@PAGE
Lloh13:
	add	x22, x22, l_.str.4@PAGEOFF
Lloh14:
	adrp	x24, _AVIO_FLAG_READ@GOTPAGE
Lloh15:
	ldr	x24, [x24, _AVIO_FLAG_READ@GOTPAGEOFF]
Lloh16:
	adrp	x23, _int_cb@GOTPAGE
Lloh17:
	ldr	x23, [x23, _int_cb@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x3, [x26, x27, lsl #3]
	cbz	x3, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cbz	x20, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	x27, #1
	csel	x4, x22, x28, eq
	str	x21, [sp]
	add	x0, sp, #40
	mov	w1, #1000
Lloh18:
	adrp	x2, l_.str.2@PAGE
Lloh19:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x5, x20
	bl	_snprintf
	ldr	w2, [x24]
	add	x1, sp, #40
	mov	x0, x19
	mov	x3, x23
	mov	x4, #0
	bl	_avio_open2
	mov	x25, x0
	tbz	w0, #31, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x3, [x26, x27, lsl #3]
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	x27, #1
	csel	x4, x22, x28, eq
	add	x0, sp, #40
	mov	w1, #1000
Lloh20:
	adrp	x2, l_.str.5@PAGE
Lloh21:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x5, x21
	bl	_snprintf
	ldr	w2, [x24]
	add	x1, sp, #40
	mov	x0, x19
	mov	x3, x23
	mov	x4, #0
	bl	_avio_open2
	mov	x25, x0
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x27, x27, #1
	add	x0, sp, #16
	bl	_FF_ARRAY_ELEMS
	cmp	x27, w0, sxtw
	b.ge	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	tbnz	w25, #31, LBB0_2
	b	LBB0_10
LBB0_9:
	mov	w25, #-1
LBB0_10:
	ldur	x8, [x29, #-96]
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_12
; %bb.11:
	mov	x0, x25
	add	sp, sp, #1056
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AVCONV_DATADIR"

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

	.comm	_AVCONV_DATADIR,8,3             ; @AVCONV_DATADIR
l_.str.2:                               ; @.str.2
	.asciz	"%s%s/%s-%s.avpreset"

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

l_.str.4:                               ; @.str.4
	.asciz	"/.avconv"

	.comm	_AVIO_FLAG_READ,4,2             ; @AVIO_FLAG_READ
	.comm	_int_cb,4,2                     ; @int_cb
l_.str.5:                               ; @.str.5
	.asciz	"%s%s/%s.avpreset"

	.no_dead_strip	_get_preset_file_2
.subsections_via_symbols
