	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Sys_ErrorDialog                ## -- Begin function Sys_ErrorDialog
	.p2align	4, 0x90
_Sys_ErrorDialog:                       ## @Sys_ErrorDialog
	.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	$1032, %rsp                     ## imm = 0x408
	.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)
	leaq	L_.str(%rip), %rdi
	callq	_Cvar_VariableString
	movq	%rax, %r13
	leaq	L_.str.1(%rip), %rdi
	callq	_Cvar_VariableString
	movq	%rax, %rbx
	leaq	L_.str.3(%rip), %rdx
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_FS_BuildOSPath
	movq	%rax, %r14
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_FS_BuildOSPath
	movq	%rax, %r15
	leaq	L_.str.4(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_va
	movl	%eax, %edi
	callq	_Sys_Print
	movq	_DT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.5(%rip), %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_va
	leaq	L_.str.6(%rip), %rdx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_Sys_Dialog
	movq	%r13, %rdi
	callq	_Sys_Mkdir
	testl	%eax, %eax
	je	LBB0_1
## %bb.4:
	movq	%r14, %rdi
	callq	_Sys_Mkdir
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_TRUNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r15, %rdi
	movl	$416, %edx                      ## imm = 0x1A0
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_14
## %bb.8:
	movl	%eax, %r14d
	leaq	-1072(%rbp), %r15
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_CON_LogRead
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%eax, %ebx
	movl	%r14d, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_write
	cmpl	%ebx, %eax
	je	LBB0_9
## %bb.11:
	leaq	L_.str.9(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_Com_Printf
LBB0_12:
	movl	%r14d, %edi
	callq	_close
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.16:
	addq	$1032, %rsp                     ## imm = 0x408
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.2:
	leaq	L_.str.7(%rip), %rdi
	movq	%r13, %rsi
	jmp	LBB0_3
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.6:
	leaq	L_.str.7(%rip), %rdi
	movq	%r14, %rsi
	jmp	LBB0_3
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.15:
	leaq	L_.str.8(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
LBB0_3:
	addq	$1032, %rsp                     ## imm = 0x408
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Com_Printf                     ## TAILCALL
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fs_homepath"

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

L_.str.2:                               ## @.str.2
	.asciz	"crashlog.txt"

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

L_.str.4:                               ## @.str.4
	.asciz	"%s\n"

	.comm	_DT_ERROR,4,2                   ## @DT_ERROR
L_.str.5:                               ## @.str.5
	.asciz	"%s. See \"%s\" for details."

L_.str.6:                               ## @.str.6
	.asciz	"Error"

L_.str.7:                               ## @.str.7
	.asciz	"ERROR: couldn't create path '%s' for crash log.\n"

	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
L_.str.8:                               ## @.str.8
	.asciz	"ERROR: couldn't open %s\n"

L_.str.9:                               ## @.str.9
	.asciz	"ERROR: couldn't fully write to %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Sys_ErrorDialog                ; -- Begin function Sys_ErrorDialog
	.p2align	2
_Sys_ErrorDialog:                       ; @Sys_ErrorDialog
	.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
	sub	sp, sp, #1040
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Cvar_VariableString
	mov	x19, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Cvar_VariableString
	mov	x21, x0
Lloh7:
	adrp	x2, l_.str.3@PAGE
Lloh8:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_FS_BuildOSPath
	mov	x20, x0
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_FS_BuildOSPath
	mov	x21, x0
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x22
	bl	_va
	bl	_Sys_Print
Lloh13:
	adrp	x8, _DT_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DT_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w23, [x8]
	str	x21, [sp]
Lloh16:
	adrp	x0, l_.str.5@PAGE
Lloh17:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x22
	bl	_va
	mov	x1, x0
Lloh18:
	adrp	x2, l_.str.6@PAGE
Lloh19:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x23
	bl	_Sys_Dialog
	mov	x0, x19
	bl	_Sys_Mkdir
	cbz	w0, LBB0_9
; %bb.1:
	mov	x0, x20
	bl	_Sys_Mkdir
	cbz	w0, LBB0_11
; %bb.2:
Lloh20:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh24:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh26:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh27:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x21
	mov	w2, #416
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.3:
	mov	x19, x0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	mov	w1, #1024
	bl	_CON_LogRead
	cbz	w0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, x0
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x20
	bl	_write
	cmp	w0, w20
	b.eq	LBB0_4
; %bb.6:
Lloh29:
	adrp	x0, l_.str.9@PAGE
Lloh30:
	add	x0, x0, l_.str.9@PAGEOFF
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_Com_Printf
LBB0_7:
	mov	x0, x19
	bl	_close
	ldur	x8, [x29, #-56]
Lloh33:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh34:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.8:
	add	sp, sp, #1040
	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
LBB0_9:
	ldur	x8, [x29, #-56]
Lloh36:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh37:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.10:
Lloh39:
	adrp	x0, l_.str.7@PAGE
Lloh40:
	add	x0, x0, l_.str.7@PAGEOFF
	mov	x1, x19
	b	LBB0_15
LBB0_11:
	ldur	x8, [x29, #-56]
Lloh41:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh42:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.12:
Lloh44:
	adrp	x0, l_.str.7@PAGE
Lloh45:
	add	x0, x0, l_.str.7@PAGEOFF
	mov	x1, x20
	b	LBB0_15
LBB0_13:
	ldur	x8, [x29, #-56]
Lloh46:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh47:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.14:
Lloh49:
	adrp	x0, l_.str.8@PAGE
Lloh50:
	add	x0, x0, l_.str.8@PAGEOFF
Lloh51:
	adrp	x1, l_.str.2@PAGE
Lloh52:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_15:
	add	sp, sp, #1040
	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
	b	_Com_Printf
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fs_homepath"

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

l_.str.2:                               ; @.str.2
	.asciz	"crashlog.txt"

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

l_.str.4:                               ; @.str.4
	.asciz	"%s\n"

	.comm	_DT_ERROR,4,2                   ; @DT_ERROR
l_.str.5:                               ; @.str.5
	.asciz	"%s. See \"%s\" for details."

l_.str.6:                               ; @.str.6
	.asciz	"Error"

l_.str.7:                               ; @.str.7
	.asciz	"ERROR: couldn't create path '%s' for crash log.\n"

	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
l_.str.8:                               ; @.str.8
	.asciz	"ERROR: couldn't open %s\n"

l_.str.9:                               ; @.str.9
	.asciz	"ERROR: couldn't fully write to %s\n"

.subsections_via_symbols
