	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LightMain                      ## -- Begin function LightMain
	.p2align	4, 0x90
_LightMain:                             ## @LightMain
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	__printf
	movq	_qfalse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_verbose@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	$1, %r12d
	cmpl	$2, %ebx
	jl	LBB0_35
## %bb.1:
	movl	$1, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r12d
LBB0_34:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r12d
	cmpl	%ebx, %r12d
	jge	LBB0_35
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%r12d, %r15
	movq	(%r14,%r15,8), %r13
	movq	%r13, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.6(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.8(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.10(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.12(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.14(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.16(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.18(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_24
## %bb.25:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.20(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_26
## %bb.27:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.22(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_28
## %bb.29:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.24(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_30
## %bb.31:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.26(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_35
## %bb.32:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_dump@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	leaq	L_.str.27(%rip), %rdi
	jmp	LBB0_33
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_verbose@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_34
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%r15), %r12d
	movq	8(%r14,%r15,8), %rdi
	callq	_atoi
	movq	_numthreads@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_34
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%r15), %r12d
	movq	8(%r14,%r15,8), %rdi
	callq	_atof
	movq	_areaScale@GOTPCREL(%rip), %rax
	mulsd	(%rax), %xmm0
	movsd	%xmm0, (%rax)
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_10
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%r15), %r12d
	movq	8(%r14,%r15,8), %rdi
	callq	_atof
	movq	_pointScale@GOTPCREL(%rip), %rax
	mulsd	(%rax), %xmm0
	movsd	%xmm0, (%rax)
	leaq	L_.str.7(%rip), %rdi
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movb	$1, %al
	callq	__printf
	jmp	LBB0_34
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_notrace@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	leaq	L_.str.9(%rip), %rdi
	jmp	LBB0_33
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_patchshadows@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	leaq	L_.str.11(%rip), %rdi
	jmp	LBB0_33
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_extra@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	leaq	L_.str.13(%rip), %rdi
	jmp	LBB0_33
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_extra@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_extraWide@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	leaq	L_.str.15(%rip), %rdi
	jmp	LBB0_33
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%r15), %r12d
	movq	8(%r14,%r15,8), %rdi
	callq	_atoi
	cmpl	$2, %eax
	movl	$1, %ecx
	cmovll	%ecx, %eax
	movq	_samplesize@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str.17(%rip), %rdi
	movl	%eax, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	__printf
	jmp	LBB0_34
LBB0_24:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_novertexlighting@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	leaq	L_.str.19(%rip), %rdi
	jmp	LBB0_33
LBB0_26:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_nogridlighting@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	leaq	L_.str.21(%rip), %rdi
	jmp	LBB0_33
LBB0_28:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_lightmapBorder@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	leaq	L_.str.23(%rip), %rdi
	jmp	LBB0_33
LBB0_30:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_noSurfaces@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	leaq	L_.str.25(%rip), %rdi
LBB0_33:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	__printf
	jmp	LBB0_34
LBB0_35:
	xorl	%eax, %eax
	callq	_ThreadSetDefault
	decl	%ebx
	cmpl	%ebx, %r12d
	jne	LBB0_39
## %bb.36:
	xorl	%eax, %eax
	callq	_I_FloatTime
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	movslq	%r12d, %rbx
	movq	(%r14,%rbx,8), %rdi
	callq	_SetQdirFromPath
	movq	_source@GOTPCREL(%rip), %r15
	movsd	(%r15), %xmm0                   ## xmm0 = mem[0],zero
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	movq	(%r14,%rbx,8), %rdi
	callq	_ExpandArg
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movl	%eax, %edi
	callq	_strcpy
	movsd	(%r15), %xmm0                   ## xmm0 = mem[0],zero
	callq	_StripExtension
	movsd	(%r15), %xmm0                   ## xmm0 = mem[0],zero
	leaq	L_.str.29(%rip), %rdi
	callq	_DefaultExtension
	xorl	%eax, %eax
	callq	_LoadShaderInfo
	movsd	(%r15), %xmm0                   ## xmm0 = mem[0],zero
	leaq	L_.str.30(%rip), %rdi
	movb	$1, %al
	callq	__printf
	movsd	(%r15), %xmm0                   ## xmm0 = mem[0],zero
	callq	_LoadBSPFile
	xorl	%eax, %eax
	callq	_FindSkyBrushes
	xorl	%eax, %eax
	callq	_ParseEntities
	movq	_entities@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	leaq	L_.str.31(%rip), %rsi
	callq	_ValueForKey
	cmpb	$0, (%rax)
	je	LBB0_38
## %bb.37:
	movq	_gridSize@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	leaq	4(%rdx), %rcx
	leaq	8(%rdx), %r8
	leaq	L_.str.32(%rip), %rsi
	movq	%rax, %rdi
	callq	_sscanf
	movq	(%rbx), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edx
	movl	8(%rax), %ecx
	leaq	L_.str.33(%rip), %rdi
	xorl	%eax, %eax
	callq	__printf
LBB0_38:
	xorl	%eax, %eax
	callq	_CreateFilters
	xorl	%eax, %eax
	callq	_InitTrace
	xorl	%eax, %eax
	callq	_SetEntityOrigins
	xorl	%eax, %eax
	callq	_CountLightmaps
	xorl	%eax, %eax
	callq	_CreateSurfaceLights
	xorl	%eax, %eax
	callq	_LightWorld
	movsd	(%r15), %xmm0                   ## xmm0 = mem[0],zero
	leaq	L_.str.34(%rip), %rdi
	movb	$1, %al
	callq	__printf
	movsd	(%r15), %xmm0                   ## xmm0 = mem[0],zero
	callq	_WriteBSPFile
	xorl	%eax, %eax
	callq	_I_FloatTime
	subsd	-56(%rbp), %xmm0                ## 8-byte Folded Reload
	leaq	L_.str.35(%rip), %rdi
	movb	$1, %al
	callq	__printf
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_39:
	leaq	L_.str.28(%rip), %rdi
	xorl	%eax, %eax
	callq	__printf
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"----- Lighting ----\n"

	.comm	_qfalse,8,3                     ## @qfalse
	.comm	_verbose,8,3                    ## @verbose
L_.str.1:                               ## @.str.1
	.asciz	"-tempname"

L_.str.2:                               ## @.str.2
	.asciz	"-v"

	.comm	_qtrue,8,3                      ## @qtrue
L_.str.3:                               ## @.str.3
	.asciz	"-threads"

	.comm	_numthreads,8,3                 ## @numthreads
L_.str.4:                               ## @.str.4
	.asciz	"-area"

	.comm	_areaScale,8,3                  ## @areaScale
L_.str.5:                               ## @.str.5
	.asciz	"area light scaling at %f\n"

L_.str.6:                               ## @.str.6
	.asciz	"-point"

	.comm	_pointScale,8,3                 ## @pointScale
L_.str.7:                               ## @.str.7
	.asciz	"point light scaling at %f\n"

L_.str.8:                               ## @.str.8
	.asciz	"-notrace"

	.comm	_notrace,8,3                    ## @notrace
L_.str.9:                               ## @.str.9
	.asciz	"No occlusion tracing\n"

L_.str.10:                              ## @.str.10
	.asciz	"-patchshadows"

	.comm	_patchshadows,8,3               ## @patchshadows
L_.str.11:                              ## @.str.11
	.asciz	"Patch shadow casting enabled\n"

L_.str.12:                              ## @.str.12
	.asciz	"-extra"

	.comm	_extra,8,3                      ## @extra
L_.str.13:                              ## @.str.13
	.asciz	"Extra detail tracing\n"

L_.str.14:                              ## @.str.14
	.asciz	"-extrawide"

	.comm	_extraWide,8,3                  ## @extraWide
L_.str.15:                              ## @.str.15
	.asciz	"Extra wide detail tracing\n"

L_.str.16:                              ## @.str.16
	.asciz	"-samplesize"

	.comm	_samplesize,4,2                 ## @samplesize
L_.str.17:                              ## @.str.17
	.asciz	"lightmap sample size is %dx%d units\n"

L_.str.18:                              ## @.str.18
	.asciz	"-novertex"

	.comm	_novertexlighting,8,3           ## @novertexlighting
L_.str.19:                              ## @.str.19
	.asciz	"no vertex lighting = true\n"

L_.str.20:                              ## @.str.20
	.asciz	"-nogrid"

	.comm	_nogridlighting,8,3             ## @nogridlighting
L_.str.21:                              ## @.str.21
	.asciz	"no grid lighting = true\n"

L_.str.22:                              ## @.str.22
	.asciz	"-border"

	.comm	_lightmapBorder,8,3             ## @lightmapBorder
L_.str.23:                              ## @.str.23
	.asciz	"Adding debug border to lightmaps\n"

L_.str.24:                              ## @.str.24
	.asciz	"-nosurf"

	.comm	_noSurfaces,8,3                 ## @noSurfaces
L_.str.25:                              ## @.str.25
	.asciz	"Not tracing against surfaces\n"

L_.str.26:                              ## @.str.26
	.asciz	"-dump"

	.comm	_dump,8,3                       ## @dump
L_.str.27:                              ## @.str.27
	.asciz	"Dumping occlusion maps\n"

L_.str.28:                              ## @.str.28
	.asciz	"usage: q3map -light [-<switch> [-<switch> ...]] <mapname>\n\nSwitches:\n   v              = verbose output\n   threads <X>    = set number of threads to X\n   area <V>       = set the area light scale to V\n   point <W>      = set the point light scale to W\n   notrace        = don't cast any shadows\n   extra          = enable super sampling for anti-aliasing\n   extrawide      = same as extra but smoothen more\n   nogrid         = don't calculate light grid for dynamic model lighting\n   novertex       = don't calculate vertex lighting\n   samplesize <N> = set the lightmap pixel size to NxN units\n"

	.comm	_source,8,3                     ## @source
L_.str.29:                              ## @.str.29
	.asciz	".bsp"

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

	.comm	_entities,8,3                   ## @entities
L_.str.31:                              ## @.str.31
	.asciz	"gridsize"

L_.str.32:                              ## @.str.32
	.asciz	"%f %f %f"

	.comm	_gridSize,8,3                   ## @gridSize
L_.str.33:                              ## @.str.33
	.asciz	"grid size = {%1.1f, %1.1f, %1.1f}\n"

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

L_.str.35:                              ## @.str.35
	.asciz	"%5.0f seconds elapsed\n"

	.comm	_gamedir,4,2                    ## @gamedir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LightMain                      ; -- Begin function LightMain
	.p2align	2
_LightMain:                             ; @LightMain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	__printf
Lloh2:
	adrp	x8, _qfalse@GOTPAGE
Lloh3:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x25, _verbose@GOTPAGE
Lloh6:
	ldr	x25, [x25, _verbose@GOTPAGEOFF]
	str	x8, [x25]
	mov	w26, #1
	cmp	w20, #2
	b.lt	LBB0_35
; %bb.1:
Lloh7:
	adrp	x21, l_.str.1@PAGE
Lloh8:
	add	x21, x21, l_.str.1@PAGEOFF
Lloh9:
	adrp	x22, l_.str.2@PAGE
Lloh10:
	add	x22, x22, l_.str.2@PAGEOFF
Lloh11:
	adrp	x28, _qtrue@GOTPAGE
Lloh12:
	ldr	x28, [x28, _qtrue@GOTPAGEOFF]
Lloh13:
	adrp	x23, l_.str.3@PAGE
Lloh14:
	add	x23, x23, l_.str.3@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w26, w26, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w26, w26, #1
	cmp	w26, w20
	b.ge	LBB0_35
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x19, w26, sxtw #3]
	mov	x0, x27
	mov	x1, x21
	bl	_strcmp
	cbz	w0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
	mov	x1, x22
	bl	_strcmp
	cbz	w0, LBB0_20
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x24, w26
	mov	x0, x27
	mov	x1, x23
	bl	_strcmp
	cbz	w0, LBB0_21
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_22
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
Lloh17:
	adrp	x1, l_.str.6@PAGE
Lloh18:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_23
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
Lloh19:
	adrp	x1, l_.str.8@PAGE
Lloh20:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_25
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
Lloh21:
	adrp	x1, l_.str.10@PAGE
Lloh22:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_26
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
Lloh23:
	adrp	x1, l_.str.12@PAGE
Lloh24:
	add	x1, x1, l_.str.12@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_27
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
Lloh25:
	adrp	x1, l_.str.14@PAGE
Lloh26:
	add	x1, x1, l_.str.14@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_28
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
Lloh27:
	adrp	x1, l_.str.16@PAGE
Lloh28:
	add	x1, x1, l_.str.16@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_29
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
Lloh29:
	adrp	x1, l_.str.18@PAGE
Lloh30:
	add	x1, x1, l_.str.18@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_30
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
Lloh31:
	adrp	x1, l_.str.20@PAGE
Lloh32:
	add	x1, x1, l_.str.20@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_31
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
Lloh33:
	adrp	x1, l_.str.22@PAGE
Lloh34:
	add	x1, x1, l_.str.22@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_32
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
Lloh35:
	adrp	x1, l_.str.24@PAGE
Lloh36:
	add	x1, x1, l_.str.24@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_33
; %bb.18:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
Lloh37:
	adrp	x1, l_.str.26@PAGE
Lloh38:
	add	x1, x1, l_.str.26@PAGEOFF
	bl	_strcmp
	cbnz	w0, LBB0_35
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x28]
Lloh39:
	adrp	x9, _dump@GOTPAGE
Lloh40:
	ldr	x9, [x9, _dump@GOTPAGEOFF]
Lloh41:
	str	x8, [x9]
Lloh42:
	adrp	x0, l_.str.27@PAGE
Lloh43:
	add	x0, x0, l_.str.27@PAGEOFF
	b	LBB0_34
LBB0_20:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x28]
	str	x8, [x25]
	b	LBB0_3
LBB0_21:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x24, #1
	ldr	x0, [x19, x26, lsl #3]
	bl	_atoi
Lloh44:
	adrp	x8, _numthreads@GOTPAGE
Lloh45:
	ldr	x8, [x8, _numthreads@GOTPAGEOFF]
Lloh46:
	str	x0, [x8]
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
	b	LBB0_3
LBB0_22:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x24, #1
	ldr	x0, [x19, x26, lsl #3]
	bl	_atof
Lloh47:
	adrp	x8, _areaScale@GOTPAGE
Lloh48:
	ldr	x8, [x8, _areaScale@GOTPAGEOFF]
	ldr	d1, [x8]
	fmul	d0, d0, d1
	str	d0, [x8]
	str	d0, [sp]
Lloh49:
	adrp	x0, l_.str.5@PAGE
Lloh50:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x24, #1
	ldr	x0, [x19, x26, lsl #3]
	bl	_atof
Lloh51:
	adrp	x8, _pointScale@GOTPAGE
Lloh52:
	ldr	x8, [x8, _pointScale@GOTPAGEOFF]
	ldr	d1, [x8]
	fmul	d0, d0, d1
	str	d0, [x8]
	str	d0, [sp]
Lloh53:
	adrp	x0, l_.str.7@PAGE
Lloh54:
	add	x0, x0, l_.str.7@PAGEOFF
LBB0_24:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	__printf
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
	b	LBB0_3
LBB0_25:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x28]
Lloh55:
	adrp	x9, _notrace@GOTPAGE
Lloh56:
	ldr	x9, [x9, _notrace@GOTPAGEOFF]
Lloh57:
	str	x8, [x9]
Lloh58:
	adrp	x0, l_.str.9@PAGE
Lloh59:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_34
LBB0_26:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x28]
Lloh60:
	adrp	x9, _patchshadows@GOTPAGE
Lloh61:
	ldr	x9, [x9, _patchshadows@GOTPAGEOFF]
Lloh62:
	str	x8, [x9]
Lloh63:
	adrp	x0, l_.str.11@PAGE
Lloh64:
	add	x0, x0, l_.str.11@PAGEOFF
	b	LBB0_34
LBB0_27:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x28]
Lloh65:
	adrp	x9, _extra@GOTPAGE
Lloh66:
	ldr	x9, [x9, _extra@GOTPAGEOFF]
Lloh67:
	str	x8, [x9]
Lloh68:
	adrp	x0, l_.str.13@PAGE
Lloh69:
	add	x0, x0, l_.str.13@PAGEOFF
	b	LBB0_34
LBB0_28:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x28]
Lloh70:
	adrp	x9, _extra@GOTPAGE
Lloh71:
	ldr	x9, [x9, _extra@GOTPAGEOFF]
Lloh72:
	str	x8, [x9]
Lloh73:
	adrp	x9, _extraWide@GOTPAGE
Lloh74:
	ldr	x9, [x9, _extraWide@GOTPAGEOFF]
Lloh75:
	str	x8, [x9]
Lloh76:
	adrp	x0, l_.str.15@PAGE
Lloh77:
	add	x0, x0, l_.str.15@PAGEOFF
	b	LBB0_34
LBB0_29:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x24, #1
	ldr	x0, [x19, x26, lsl #3]
	bl	_atoi
	cmp	w0, #1
	csinc	w8, w0, wzr, gt
Lloh78:
	adrp	x9, _samplesize@GOTPAGE
Lloh79:
	ldr	x9, [x9, _samplesize@GOTPAGEOFF]
Lloh80:
	str	w8, [x9]
	stp	x8, x8, [sp]
Lloh81:
	adrp	x0, l_.str.17@PAGE
Lloh82:
	add	x0, x0, l_.str.17@PAGEOFF
	b	LBB0_24
LBB0_30:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x28]
Lloh83:
	adrp	x9, _novertexlighting@GOTPAGE
Lloh84:
	ldr	x9, [x9, _novertexlighting@GOTPAGEOFF]
Lloh85:
	str	x8, [x9]
Lloh86:
	adrp	x0, l_.str.19@PAGE
Lloh87:
	add	x0, x0, l_.str.19@PAGEOFF
	b	LBB0_34
LBB0_31:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x28]
Lloh88:
	adrp	x9, _nogridlighting@GOTPAGE
Lloh89:
	ldr	x9, [x9, _nogridlighting@GOTPAGEOFF]
Lloh90:
	str	x8, [x9]
Lloh91:
	adrp	x0, l_.str.21@PAGE
Lloh92:
	add	x0, x0, l_.str.21@PAGEOFF
	b	LBB0_34
LBB0_32:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x28]
Lloh93:
	adrp	x9, _lightmapBorder@GOTPAGE
Lloh94:
	ldr	x9, [x9, _lightmapBorder@GOTPAGEOFF]
Lloh95:
	str	x8, [x9]
Lloh96:
	adrp	x0, l_.str.23@PAGE
Lloh97:
	add	x0, x0, l_.str.23@PAGEOFF
	b	LBB0_34
LBB0_33:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x28]
Lloh98:
	adrp	x9, _noSurfaces@GOTPAGE
Lloh99:
	ldr	x9, [x9, _noSurfaces@GOTPAGEOFF]
Lloh100:
	str	x8, [x9]
Lloh101:
	adrp	x0, l_.str.25@PAGE
Lloh102:
	add	x0, x0, l_.str.25@PAGEOFF
LBB0_34:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	__printf
	b	LBB0_3
LBB0_35:
	bl	_ThreadSetDefault
	sub	w8, w20, #1
	cmp	w26, w8
	b.ne	LBB0_39
; %bb.36:
	bl	_I_FloatTime
	fmov	d8, d0
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
	sbfiz	x21, x26, #3, #32
	ldr	x0, [x19, x21]
	bl	_SetQdirFromPath
Lloh103:
	adrp	x20, _source@GOTPAGE
Lloh104:
	ldr	x20, [x20, _source@GOTPAGEOFF]
	ldr	d9, [x20]
	ldr	x0, [x19, x21]
	bl	_ExpandArg
	fmov	d0, d9
	bl	_strcpy
	ldr	d0, [x20]
	bl	_StripExtension
	ldr	d0, [x20]
Lloh105:
	adrp	x0, l_.str.29@PAGE
Lloh106:
	add	x0, x0, l_.str.29@PAGEOFF
	bl	_DefaultExtension
	bl	_LoadShaderInfo
	ldr	d0, [x20]
	str	d0, [sp]
Lloh107:
	adrp	x0, l_.str.30@PAGE
Lloh108:
	add	x0, x0, l_.str.30@PAGEOFF
	bl	__printf
	ldr	d0, [x20]
	bl	_LoadBSPFile
	bl	_FindSkyBrushes
	bl	_ParseEntities
Lloh109:
	adrp	x8, _entities@GOTPAGE
Lloh110:
	ldr	x8, [x8, _entities@GOTPAGEOFF]
Lloh111:
	ldr	x0, [x8]
Lloh112:
	adrp	x1, l_.str.31@PAGE
Lloh113:
	add	x1, x1, l_.str.31@PAGEOFF
	bl	_ValueForKey
	ldrb	w8, [x0]
	cbz	w8, LBB0_38
; %bb.37:
Lloh114:
	adrp	x19, _gridSize@GOTPAGE
Lloh115:
	ldr	x19, [x19, _gridSize@GOTPAGEOFF]
	ldr	x2, [x19]
	add	x3, x2, #4
	add	x4, x2, #8
Lloh116:
	adrp	x1, l_.str.32@PAGE
Lloh117:
	add	x1, x1, l_.str.32@PAGEOFF
	bl	_sscanf
	ldr	x8, [x19]
	ldp	w9, w10, [x8]
	ldr	w8, [x8, #8]
	stp	x10, x8, [sp, #8]
	str	x9, [sp]
Lloh118:
	adrp	x0, l_.str.33@PAGE
Lloh119:
	add	x0, x0, l_.str.33@PAGEOFF
	bl	__printf
LBB0_38:
	bl	_CreateFilters
	bl	_InitTrace
	bl	_SetEntityOrigins
	bl	_CountLightmaps
	bl	_CreateSurfaceLights
	bl	_LightWorld
	ldr	d0, [x20]
	str	d0, [sp]
Lloh120:
	adrp	x0, l_.str.34@PAGE
Lloh121:
	add	x0, x0, l_.str.34@PAGEOFF
	bl	__printf
	ldr	d0, [x20]
	bl	_WriteBSPFile
	bl	_I_FloatTime
	fsub	d0, d0, d8
	str	d0, [sp]
Lloh122:
	adrp	x0, l_.str.35@PAGE
Lloh123:
	add	x0, x0, l_.str.35@PAGEOFF
	bl	__printf
	mov	w0, #0
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_39:
Lloh124:
	adrp	x0, l_.str.28@PAGE
Lloh125:
	add	x0, x0, l_.str.28@PAGEOFF
	bl	__printf
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotStr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotStr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotStr	Lloh55, Lloh56, Lloh57
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpLdrGotStr	Lloh60, Lloh61, Lloh62
	.loh AdrpAdd	Lloh68, Lloh69
	.loh AdrpLdrGotStr	Lloh65, Lloh66, Lloh67
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpLdrGotStr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotStr	Lloh70, Lloh71, Lloh72
	.loh AdrpAdd	Lloh81, Lloh82
	.loh AdrpLdrGotStr	Lloh78, Lloh79, Lloh80
	.loh AdrpAdd	Lloh86, Lloh87
	.loh AdrpLdrGotStr	Lloh83, Lloh84, Lloh85
	.loh AdrpAdd	Lloh91, Lloh92
	.loh AdrpLdrGotStr	Lloh88, Lloh89, Lloh90
	.loh AdrpAdd	Lloh96, Lloh97
	.loh AdrpLdrGotStr	Lloh93, Lloh94, Lloh95
	.loh AdrpAdd	Lloh101, Lloh102
	.loh AdrpLdrGotStr	Lloh98, Lloh99, Lloh100
	.loh AdrpAdd	Lloh112, Lloh113
	.loh AdrpLdrGotLdr	Lloh109, Lloh110, Lloh111
	.loh AdrpAdd	Lloh107, Lloh108
	.loh AdrpAdd	Lloh105, Lloh106
	.loh AdrpLdrGot	Lloh103, Lloh104
	.loh AdrpAdd	Lloh118, Lloh119
	.loh AdrpAdd	Lloh116, Lloh117
	.loh AdrpLdrGot	Lloh114, Lloh115
	.loh AdrpAdd	Lloh122, Lloh123
	.loh AdrpAdd	Lloh120, Lloh121
	.loh AdrpAdd	Lloh124, Lloh125
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"----- Lighting ----\n"

	.comm	_qfalse,8,3                     ; @qfalse
	.comm	_verbose,8,3                    ; @verbose
l_.str.1:                               ; @.str.1
	.asciz	"-tempname"

l_.str.2:                               ; @.str.2
	.asciz	"-v"

	.comm	_qtrue,8,3                      ; @qtrue
l_.str.3:                               ; @.str.3
	.asciz	"-threads"

	.comm	_numthreads,8,3                 ; @numthreads
l_.str.4:                               ; @.str.4
	.asciz	"-area"

	.comm	_areaScale,8,3                  ; @areaScale
l_.str.5:                               ; @.str.5
	.asciz	"area light scaling at %f\n"

l_.str.6:                               ; @.str.6
	.asciz	"-point"

	.comm	_pointScale,8,3                 ; @pointScale
l_.str.7:                               ; @.str.7
	.asciz	"point light scaling at %f\n"

l_.str.8:                               ; @.str.8
	.asciz	"-notrace"

	.comm	_notrace,8,3                    ; @notrace
l_.str.9:                               ; @.str.9
	.asciz	"No occlusion tracing\n"

l_.str.10:                              ; @.str.10
	.asciz	"-patchshadows"

	.comm	_patchshadows,8,3               ; @patchshadows
l_.str.11:                              ; @.str.11
	.asciz	"Patch shadow casting enabled\n"

l_.str.12:                              ; @.str.12
	.asciz	"-extra"

	.comm	_extra,8,3                      ; @extra
l_.str.13:                              ; @.str.13
	.asciz	"Extra detail tracing\n"

l_.str.14:                              ; @.str.14
	.asciz	"-extrawide"

	.comm	_extraWide,8,3                  ; @extraWide
l_.str.15:                              ; @.str.15
	.asciz	"Extra wide detail tracing\n"

l_.str.16:                              ; @.str.16
	.asciz	"-samplesize"

	.comm	_samplesize,4,2                 ; @samplesize
l_.str.17:                              ; @.str.17
	.asciz	"lightmap sample size is %dx%d units\n"

l_.str.18:                              ; @.str.18
	.asciz	"-novertex"

	.comm	_novertexlighting,8,3           ; @novertexlighting
l_.str.19:                              ; @.str.19
	.asciz	"no vertex lighting = true\n"

l_.str.20:                              ; @.str.20
	.asciz	"-nogrid"

	.comm	_nogridlighting,8,3             ; @nogridlighting
l_.str.21:                              ; @.str.21
	.asciz	"no grid lighting = true\n"

l_.str.22:                              ; @.str.22
	.asciz	"-border"

	.comm	_lightmapBorder,8,3             ; @lightmapBorder
l_.str.23:                              ; @.str.23
	.asciz	"Adding debug border to lightmaps\n"

l_.str.24:                              ; @.str.24
	.asciz	"-nosurf"

	.comm	_noSurfaces,8,3                 ; @noSurfaces
l_.str.25:                              ; @.str.25
	.asciz	"Not tracing against surfaces\n"

l_.str.26:                              ; @.str.26
	.asciz	"-dump"

	.comm	_dump,8,3                       ; @dump
l_.str.27:                              ; @.str.27
	.asciz	"Dumping occlusion maps\n"

l_.str.28:                              ; @.str.28
	.asciz	"usage: q3map -light [-<switch> [-<switch> ...]] <mapname>\n\nSwitches:\n   v              = verbose output\n   threads <X>    = set number of threads to X\n   area <V>       = set the area light scale to V\n   point <W>      = set the point light scale to W\n   notrace        = don't cast any shadows\n   extra          = enable super sampling for anti-aliasing\n   extrawide      = same as extra but smoothen more\n   nogrid         = don't calculate light grid for dynamic model lighting\n   novertex       = don't calculate vertex lighting\n   samplesize <N> = set the lightmap pixel size to NxN units\n"

	.comm	_source,8,3                     ; @source
l_.str.29:                              ; @.str.29
	.asciz	".bsp"

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

	.comm	_entities,8,3                   ; @entities
l_.str.31:                              ; @.str.31
	.asciz	"gridsize"

l_.str.32:                              ; @.str.32
	.asciz	"%f %f %f"

	.comm	_gridSize,8,3                   ; @gridSize
l_.str.33:                              ; @.str.33
	.asciz	"grid size = {%1.1f, %1.1f, %1.1f}\n"

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

l_.str.35:                              ; @.str.35
	.asciz	"%5.0f seconds elapsed\n"

	.comm	_gamedir,4,2                    ; @gamedir
.subsections_via_symbols
