	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WriteMapFile                   ## -- Begin function WriteMapFile
	.p2align	4, 0x90
_WriteMapFile:                          ## @WriteMapFile
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_c_writtenbrushes@GOTPCREL(%rip), %r12
	movq	$0, (%r12)
	xorl	%eax, %eax
	callq	_I_FloatTime
	movsd	%xmm0, -40(%rbp)                ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_Log_Print
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_WriteMapFileSafe
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_fclose
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.5:
	movsd	(%r12), %xmm0                   ## xmm0 = mem[0],zero
	leaq	L_.str.4(%rip), %rdi
	movb	$1, %al
	callq	_Log_Print
	xorl	%eax, %eax
	callq	_I_FloatTime
	subsd	-40(%rbp), %xmm0                ## 8-byte Folded Reload
	leaq	L_.str.5(%rip), %rdi
	movb	$1, %al
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Log_Print                      ## TAILCALL
LBB0_1:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.3(%rip), %rdi
LBB0_2:
	movq	%r14, %rsi
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Log_Print                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_c_writtenbrushes,8,3           ## @c_writtenbrushes
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"writing %s\n"

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

L_.str.2:                               ## @.str.2
	.asciz	"can't open %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"error writing map file %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"written %d brushes\n"

L_.str.5:                               ## @.str.5
	.asciz	"map file written in %5.0f seconds\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WriteMapFile                   ; -- Begin function WriteMapFile
	.p2align	2
_WriteMapFile:                          ; @WriteMapFile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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 b8, -56
	.cfi_offset b9, -64
	mov	x19, x0
Lloh0:
	adrp	x22, _c_writtenbrushes@GOTPAGE
Lloh1:
	ldr	x22, [x22, _c_writtenbrushes@GOTPAGEOFF]
	str	xzr, [x22]
	bl	_I_FloatTime
	fmov	d8, d0
	str	x19, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_Print
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	bl	_WriteMapFileSafe
	mov	x21, x0
	mov	x0, x20
	bl	_fclose
	cbz	w21, LBB0_4
; %bb.2:
	ldr	d0, [x22]
	str	d0, [sp]
Lloh6:
	adrp	x0, l_.str.4@PAGE
Lloh7:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_Log_Print
	bl	_I_FloatTime
	fsub	d0, d0, d8
	str	d0, [sp]
Lloh8:
	adrp	x0, l_.str.5@PAGE
Lloh9:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_5
LBB0_3:
	str	x19, [sp]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_4:
	str	x19, [sp]
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_5:
	bl	_Log_Print
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_c_writtenbrushes,8,3           ; @c_writtenbrushes
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"writing %s\n"

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

l_.str.2:                               ; @.str.2
	.asciz	"can't open %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"error writing map file %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"written %d brushes\n"

l_.str.5:                               ; @.str.5
	.asciz	"map file written in %5.0f seconds\n"

.subsections_via_symbols
