	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FS_FOpenFileRead               ## -- Begin function FS_FOpenFileRead
	.p2align	4, 0x90
_FS_FOpenFileRead:                      ## @FS_FOpenFileRead
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_fs_searchpaths@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	jne	LBB0_2
## %bb.1:
	movq	_ERR_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_Com_Error
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_Q3CONFIG_CFG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testl	%eax, %eax
	sete	%r13b
	jmp	LBB0_5
LBB0_3:
	movb	$1, %r13b
LBB0_5:
	movq	(%rbx), %rbx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	testq	%rax, %rax
	jg	LBB0_17
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%rbx), %rbx
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	testb	%r13b, %r13b
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, (%rbx)
	jne	LBB0_13
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movl	%r14d, %ecx
	callq	_FS_FOpenFileReadDir
	testq	%r12, %r12
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	testq	%rax, %rax
	js	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, (%r12)
	je	LBB0_13
	jmp	LBB0_17
LBB0_14:
	testq	%r12, %r12
	je	LBB0_15
## %bb.16:
	movq	$0, (%r12)
	movq	$-1, %rax
	jmp	LBB0_17
LBB0_15:
	xorl	%eax, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fs_searchpaths,8,3             ## @fs_searchpaths
	.comm	_ERR_FATAL,4,2                  ## @ERR_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Filesystem call made without initialization"

L_.str.1:                               ## @.str.1
	.asciz	"autoexec.cfg"

	.comm	_Q3CONFIG_CFG,8,3               ## @Q3CONFIG_CFG
	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_missingFiles,8,3               ## @missingFiles
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FS_FOpenFileRead               ; -- Begin function FS_FOpenFileRead
	.p2align	2
_FS_FOpenFileRead:                      ; @FS_FOpenFileRead
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _fs_searchpaths@GOTPAGE
Lloh1:
	ldr	x22, [x22, _fs_searchpaths@GOTPAGEOFF]
	ldr	x8, [x22]
	cbnz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _ERR_FATAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERR_FATAL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_Com_Error
LBB0_2:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_strcmp
	cbz	w0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _Q3CONFIG_CFG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _Q3CONFIG_CFG@GOTPAGEOFF]
Lloh11:
	ldr	x1, [x8]
	mov	x0, x21
	bl	_strcmp
	cmp	w0, #0
	cset	w23, eq
	ldr	x22, [x22]
	cbnz	x22, LBB0_5
	b	LBB0_13
LBB0_4:
	mov	w23, #1
	ldr	x22, [x22]
	cbz	x22, LBB0_13
LBB0_5:
Lloh12:
	adrp	x24, _qfalse@GOTPAGE
Lloh13:
	ldr	x24, [x24, _qfalse@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	cmp	x0, #0
	b.gt	LBB0_16
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x22, [x22, #8]
	cbz	x22, LBB0_13
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w23, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x22]
	cbnz	x8, LBB0_7
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w4, [x24]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	mov	x3, x20
	bl	_FS_FOpenFileReadDir
	cbz	x19, LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	tbnz	x0, #63, LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x19]
	cbz	x8, LBB0_7
	b	LBB0_16
LBB0_13:
	cbz	x19, LBB0_15
; %bb.14:
	str	xzr, [x19]
	mov	x0, #-1
	b	LBB0_16
LBB0_15:
	mov	x0, #0
LBB0_16:
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_fs_searchpaths,8,3             ; @fs_searchpaths
	.comm	_ERR_FATAL,4,2                  ; @ERR_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Filesystem call made without initialization"

l_.str.1:                               ; @.str.1
	.asciz	"autoexec.cfg"

	.comm	_Q3CONFIG_CFG,8,3               ; @Q3CONFIG_CFG
	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_missingFiles,8,3               ; @missingFiles
.subsections_via_symbols
