	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EmitShader                     ## -- Begin function EmitShader
	.p2align	4, 0x90
_EmitShader:                            ## @EmitShader
	.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
	testq	%rdi, %rdi
	leaq	L_.str(%rip), %r14
	cmovneq	%rdi, %r14
	movq	_numShaders@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movl	$8, %ebx
	xorl	%r12d, %r12d
	movq	_dshaders@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	(%rax,%rbx), %esi
	movq	%r14, %rdi
	callq	_Q_stricmp
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movslq	(%r15), %rax
	addq	$12, %rbx
	cmpq	%rax, %r12
	jl	LBB0_3
	jmp	LBB0_5
LBB0_1:
	xorl	%r12d, %r12d
LBB0_5:
	movq	_MAX_MAP_SHADERS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r12d
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	callq	_Error
	movl	(%r15), %eax
LBB0_7:
	incl	%eax
	movl	%eax, (%r15)
	movq	_dshaders@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	%r12d, %ecx
	shlq	$2, %rcx
	leaq	(%rcx,%rcx,2), %rbx
	movl	8(%rax,%rbx), %edi
	movq	%r14, %rsi
	callq	_strcpy
	movq	%r14, %rdi
	callq	_ShaderInfoForShader
	movl	4(%rax), %ecx
	movq	(%r15), %rdx
	movl	%ecx, 4(%rdx,%rbx)
	movl	(%rax), %eax
	movl	%eax, (%rdx,%rbx)
LBB0_8:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"noshader"

	.comm	_numShaders,4,2                 ## @numShaders
	.comm	_dshaders,8,3                   ## @dshaders
	.comm	_MAX_MAP_SHADERS,4,2            ## @MAX_MAP_SHADERS
L_.str.1:                               ## @.str.1
	.asciz	"MAX_MAP_SHADERS"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EmitShader                     ; -- Begin function EmitShader
	.p2align	2
_EmitShader:                            ; @EmitShader
	.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
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	cmp	x0, #0
	csel	x20, x8, x0, eq
Lloh2:
	adrp	x22, _numShaders@GOTPAGE
Lloh3:
	ldr	x22, [x22, _numShaders@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh4:
	adrp	x21, _dshaders@GOTPAGE
Lloh5:
	ldr	x21, [x21, _dshaders@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, #0
	mov	w23, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	w1, [x8, x23]
	mov	x0, x20
	bl	_Q_stricmp
	cbz	w0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x19, x19, #1
	ldrsw	x8, [x22]
	add	x23, x23, #12
	cmp	x19, x8
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w19, #0
LBB0_5:
Lloh6:
	adrp	x9, _MAX_MAP_SHADERS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAX_MAP_SHADERS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w19, w9
	b.ne	LBB0_7
; %bb.6:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Error
	ldr	w8, [x22]
LBB0_7:
	add	w8, w8, #1
	str	w8, [x22]
	ldr	x8, [x21]
	mov	w9, #12
	umaddl	x8, w19, w9, x8
	umull	x22, w19, w9
	ldr	w0, [x8, #8]
	mov	x1, x20
	bl	_strcpy
	mov	x0, x20
	bl	_ShaderInfoForShader
	ldr	x8, [x21]
	ldr	d0, [x0]
	str	d0, [x8, x22]
LBB0_8:
	mov	x0, x19
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"noshader"

	.comm	_numShaders,4,2                 ; @numShaders
	.comm	_dshaders,8,3                   ; @dshaders
	.comm	_MAX_MAP_SHADERS,4,2            ; @MAX_MAP_SHADERS
l_.str.1:                               ; @.str.1
	.asciz	"MAX_MAP_SHADERS"

.subsections_via_symbols
