	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RE_RegisterSkin                ## -- Begin function RE_RegisterSkin
	.p2align	4, 0x90
_RE_RegisterSkin:                       ## @RE_RegisterSkin
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	%rsp, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_QPATH@GOTPCREL(%rip), %r12
	movl	(%r12), %r14d
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	testq	%r13, %r13
	je	LBB0_9
## %bb.1:
	cmpb	$0, (%r13)
	je	LBB0_9
## %bb.2:
	movq	%r13, %rdi
	callq	_strlen
	cmpl	(%r12), %eax
	jge	LBB0_10
## %bb.3:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	_tr@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	$1, %ebx
	cmpq	$2, %rax
	jb	LBB0_7
## %bb.4:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %r15
	movq	(%r15), %rdi
	movq	%r13, %rsi
	callq	_Q_stricmp
	testl	%eax, %eax
	je	LBB0_17
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movq	(%r12), %rax
	cmpq	%rax, %rbx
	jb	LBB0_5
LBB0_7:
	movq	_MAX_SKINS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.8:
	movq	_ri@GOTPCREL(%rip), %rax
	movq	_PRINT_WARNING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdx
	callq	*24(%rax)
	xorl	%ebx, %ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_9:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
LBB0_11:
	callq	_Com_Printf
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	movq	%r15, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.14:
	movq	%rbx, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	incq	%rax
	movq	%rax, (%r12)
	movq	_ri@GOTPCREL(%rip), %rax
	movq	_h_low@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	$32, %edi
	callq	*8(%rax)
	movq	%rax, %r15
	movq	8(%r12), %rax
	movq	%r15, (%rax,%rbx,8)
	movq	(%r15), %rdi
	movq	%r13, %rsi
	movl	$8, %edx
	callq	_Q_strncpyz
	movl	$0, 8(%r15)
	xorl	%eax, %eax
	callq	_R_SyncRenderThread
	movq	%r13, %rdi
	callq	_strlen
	cltq
	leaq	(%rax,%r13), %rdi
	addq	$-5, %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:
	movl	$1, 8(%r15)
	movq	_h_low@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	movq	_ri@GOTPCREL(%rip), %rax
	callq	*8(%rax)
	movq	24(%r15), %rcx
	movq	%rax, (%rcx)
	movq	_LIGHTMAP_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_R_FindShader
	movq	24(%r15), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 16(%rcx)
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_17:
	xorl	%eax, %eax
	cmpl	$0, 8(%r15)
	cmoveq	%rax, %rbx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_18:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	leaq	-88(%rbp), %rsi
	movq	%r13, %rdi
	movq	_ri@GOTPCREL(%rip), %r12
	callq	*16(%r12)
	movq	-88(%rbp), %rax
	testq	%rax, %rax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_12
## %bb.19:
	movq	%rax, -56(%rbp)
	jmp	LBB0_22
LBB0_20:                                ##   in Loop: Header=BB0_22 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_26
LBB0_21:                                ##   in Loop: Header=BB0_22 Depth=1
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_27
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$0, (%rax)
	je	LBB0_27
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	leaq	-56(%rbp), %rdi
	callq	_CommaParse
	movq	%rax, %r13
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	movl	%r14d, %edx
	callq	_Q_strncpyz
	cmpb	$0, (%r13)
	je	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_Q_strlwr
	movq	-56(%rbp), %rax
	cmpb	$44, (%rax)
	jne	LBB0_20
## %bb.25:                              ##   in Loop: Header=BB0_22 Depth=1
	incq	%rax
	movq	%rax, -56(%rbp)
	jmp	LBB0_20
LBB0_26:                                ##   in Loop: Header=BB0_22 Depth=1
	leaq	-56(%rbp), %rdi
	callq	_CommaParse
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	_h_low@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	*8(%r12)
	movq	%rax, %r13
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	24(%r12), %rax
	movslq	8(%r12), %rcx
	movq	%r13, (%rax,%rcx,8)
	movq	(%r13), %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	$8, %edx
	callq	_Q_strncpyz
	movq	_LIGHTMAP_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_R_FindShader
	movq	%rax, 16(%r13)
	incl	8(%r12)
	movq	_ri@GOTPCREL(%rip), %r12
	jmp	LBB0_21
LBB0_27:
	movq	-88(%rbp), %rdi
	callq	*(%r12)
	xorl	%eax, %eax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$0, 8(%rcx)
	cmoveq	%rax, %rbx
	jmp	LBB0_13
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_QPATH,4,2                  ## @MAX_QPATH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Empty name passed to RE_RegisterSkin\n"

L_.str.1:                               ## @.str.1
	.asciz	"Skin name exceeds MAX_QPATH\n"

	.comm	_tr,16,3                        ## @tr
	.comm	_MAX_SKINS,8,3                  ## @MAX_SKINS
	.comm	_ri,32,3                        ## @ri
	.comm	_PRINT_WARNING,4,2              ## @PRINT_WARNING
L_.str.2:                               ## @.str.2
	.asciz	"WARNING: RE_RegisterSkin( '%s' ) MAX_SKINS hit\n"

	.comm	_h_low,4,2                      ## @h_low
L_.str.3:                               ## @.str.3
	.asciz	".skin"

	.comm	_LIGHTMAP_NONE,4,2              ## @LIGHTMAP_NONE
	.comm	_qtrue,4,2                      ## @qtrue
L_.str.4:                               ## @.str.4
	.asciz	"tag_"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RE_RegisterSkin                ; -- Begin function RE_RegisterSkin
	.p2align	2
_RE_RegisterSkin:                       ; @RE_RegisterSkin
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #32
	mov	x23, x0
	mov	x26, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x19, _MAX_QPATH@GOTPAGE
Lloh4:
	ldr	x19, [x19, _MAX_QPATH@GOTPAGEOFF]
	ldr	w20, [x19]
	mov	x9, x20
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
	cbz	x0, LBB0_8
; %bb.1:
	ldrb	w8, [x23]
	cbz	w8, LBB0_8
; %bb.2:
	mov	x0, x23
	bl	_strlen
	ldr	w8, [x19]
	cmp	w0, w8
	b.ge	LBB0_9
; %bb.3:
Lloh7:
	adrp	x24, _tr@GOTPAGE
Lloh8:
	ldr	x24, [x24, _tr@GOTPAGEOFF]
	ldr	x8, [x24]
	mov	w19, #1
	cmp	x8, #2
	b.lo	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #8]
	ldr	x22, [x8, x19, lsl #3]
	ldr	x0, [x22]
	mov	x1, x23
	bl	_Q_stricmp
	cbz	w0, LBB0_26
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x19, x19, #1
	ldr	x8, [x24]
	cmp	x19, x8
	b.lo	LBB0_4
LBB0_6:
Lloh9:
	adrp	x9, _MAX_SKINS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MAX_SKINS@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.7:
Lloh12:
	adrp	x8, _ri@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8, #24]
Lloh15:
	adrp	x9, _PRINT_WARNING@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PRINT_WARNING@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x9]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x23
	blr	x8
	b	LBB0_11
LBB0_8:
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_10:
	bl	_Com_Printf
LBB0_11:
	mov	x19, #0
LBB0_12:
	mov	sp, x26
	ldur	x8, [x29, #-88]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.13:
	mov	x0, x19
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_14:
	add	x8, x8, #1
	str	x8, [x24]
Lloh27:
	adrp	x27, _ri@GOTPAGE
Lloh28:
	ldr	x27, [x27, _ri@GOTPAGEOFF]
	ldr	x8, [x27, #8]
Lloh29:
	adrp	x28, _h_low@GOTPAGE
Lloh30:
	ldr	x28, [x28, _h_low@GOTPAGEOFF]
	ldr	w1, [x28]
	mov	w0, #32
	blr	x8
	mov	x22, x0
	ldr	x8, [x24, #8]
	str	x0, [x8, x19, lsl #3]
	ldr	x0, [x0]
	mov	x1, x23
	mov	w2, #8
	bl	_Q_strncpyz
	str	wzr, [x22, #8]
	bl	_R_SyncRenderThread
	mov	x0, x23
	bl	_strlen
	add	x8, x23, w0, sxtw
	sub	x0, x8, #5
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_16
; %bb.15:
	mov	w8, #1
	str	w8, [x22, #8]
	ldr	x8, [x27, #8]
	ldr	w1, [x28]
	mov	w0, #8
	blr	x8
	ldr	x8, [x22, #24]
	str	x0, [x8]
Lloh33:
	adrp	x8, _LIGHTMAP_NONE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _LIGHTMAP_NONE@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
Lloh36:
	adrp	x8, _qtrue@GOTPAGE
Lloh37:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	mov	x0, x23
	bl	_R_FindShader
	ldr	x8, [x22, #24]
	ldr	x8, [x8]
	str	x0, [x8, #16]
	b	LBB0_12
LBB0_16:
	ldr	x8, [x27, #16]
	sub	x1, x29, #96
	mov	x0, x23
	blr	x8
	ldur	x8, [x29, #-96]
	cbz	x8, LBB0_11
; %bb.17:
	stur	x8, [x29, #-104]
Lloh39:
	adrp	x23, l_.str.4@PAGE
Lloh40:
	add	x23, x23, l_.str.4@PAGEOFF
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_20 Depth=1
	mov	x0, x24
	mov	x1, x23
	bl	_strstr
	cbz	x0, LBB0_24
; %bb.19:                               ;   in Loop: Header=BB0_20 Depth=1
	ldur	x8, [x29, #-104]
	cbz	x8, LBB0_25
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x8]
	cbz	w8, LBB0_25
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	sub	x0, x29, #104
	bl	_CommaParse
	mov	x24, x0
	mov	x0, x21
	mov	x1, x24
	mov	x2, x20
	bl	_Q_strncpyz
	ldrb	w8, [x24]
	cbz	w8, LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	x0, x21
	bl	_Q_strlwr
	ldur	x8, [x29, #-104]
	ldrb	w9, [x8]
	cmp	w9, #44
	b.ne	LBB0_18
; %bb.23:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x8, x8, #1
	stur	x8, [x29, #-104]
	b	LBB0_18
LBB0_24:                                ;   in Loop: Header=BB0_20 Depth=1
	sub	x0, x29, #104
	bl	_CommaParse
	mov	x24, x0
	ldr	x8, [x27, #8]
	ldr	w1, [x28]
	mov	w0, #32
	blr	x8
	mov	x25, x0
	ldr	x8, [x22, #24]
	ldrsw	x9, [x22, #8]
	str	x0, [x8, x9, lsl #3]
	ldr	x0, [x0]
	mov	x1, x21
	mov	w2, #8
	bl	_Q_strncpyz
Lloh41:
	adrp	x8, _LIGHTMAP_NONE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _LIGHTMAP_NONE@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
Lloh44:
	adrp	x8, _qtrue@GOTPAGE
Lloh45:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh46:
	ldr	w2, [x8]
	mov	x0, x24
	bl	_R_FindShader
	str	x0, [x25, #16]
	ldr	w8, [x22, #8]
	add	w8, w8, #1
	str	w8, [x22, #8]
	ldur	x8, [x29, #-104]
	cbnz	x8, LBB0_20
LBB0_25:
	ldr	x8, [x27]
	ldur	x0, [x29, #-96]
	blr	x8
LBB0_26:
	ldr	w8, [x22, #8]
	cmp	w8, #0
	csel	x19, xzr, x19, eq
	b	LBB0_12
LBB0_27:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_QPATH,4,2                  ; @MAX_QPATH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Empty name passed to RE_RegisterSkin\n"

l_.str.1:                               ; @.str.1
	.asciz	"Skin name exceeds MAX_QPATH\n"

	.comm	_tr,16,3                        ; @tr
	.comm	_MAX_SKINS,8,3                  ; @MAX_SKINS
	.comm	_ri,32,3                        ; @ri
	.comm	_PRINT_WARNING,4,2              ; @PRINT_WARNING
l_.str.2:                               ; @.str.2
	.asciz	"WARNING: RE_RegisterSkin( '%s' ) MAX_SKINS hit\n"

	.comm	_h_low,4,2                      ; @h_low
l_.str.3:                               ; @.str.3
	.asciz	".skin"

	.comm	_LIGHTMAP_NONE,4,2              ; @LIGHTMAP_NONE
	.comm	_qtrue,4,2                      ; @qtrue
l_.str.4:                               ; @.str.4
	.asciz	"tag_"

.subsections_via_symbols
