	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_LoadCubemaps                 ## -- Begin function R_LoadCubemaps
	.p2align	4, 0x90
_R_LoadCubemaps:                        ## @R_LoadCubemaps
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_tr@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_3
## %bb.1:
	movq	_IMGFLAG_CLAMPTOEDGE@GOTPCREL(%rip), %rax
	movq	_IMGFLAG_MIPMAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_IMGFLAG_NOLIGHTSCALE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_IMGFLAG_CUBEMAP@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	_MAX_QPATH@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	8(%r14), %rax
	movq	16(%r14), %r15
	movl	(%r13), %esi
	movl	(%rax), %ecx
	movq	%r12, %rdi
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %r8d
	callq	_Com_sprintf
	movq	_IMGTYPE_COLORALPHA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_R_FindImageFile
	movl	%eax, (%r15,%rbx,4)
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IMGFLAG_CLAMPTOEDGE,4,2        ## @IMGFLAG_CLAMPTOEDGE
	.comm	_IMGFLAG_MIPMAP,4,2             ## @IMGFLAG_MIPMAP
	.comm	_IMGFLAG_NOLIGHTSCALE,4,2       ## @IMGFLAG_NOLIGHTSCALE
	.comm	_IMGFLAG_CUBEMAP,4,2            ## @IMGFLAG_CUBEMAP
	.comm	_tr,24,3                        ## @tr
	.comm	_MAX_QPATH,4,2                  ## @MAX_QPATH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cubemaps/%s/%03d.dds"

	.comm	_IMGTYPE_COLORALPHA,4,2         ## @IMGTYPE_COLORALPHA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_LoadCubemaps                 ; -- Begin function R_LoadCubemaps
	.p2align	2
_R_LoadCubemaps:                        ; @R_LoadCubemaps
	.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, #16
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	x23, _tr@GOTPAGE
Lloh4:
	ldr	x23, [x23, _tr@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x19, #0
Lloh5:
	adrp	x8, _IMGFLAG_CLAMPTOEDGE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IMGFLAG_CLAMPTOEDGE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _IMGFLAG_MIPMAP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IMGFLAG_MIPMAP@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _IMGFLAG_NOLIGHTSCALE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IMGFLAG_NOLIGHTSCALE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh14:
	adrp	x9, _IMGFLAG_CUBEMAP@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IMGFLAG_CUBEMAP@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w20, w8, w9
Lloh17:
	adrp	x24, _MAX_QPATH@GOTPAGE
Lloh18:
	ldr	x24, [x24, _MAX_QPATH@GOTPAGEOFF]
Lloh19:
	adrp	x21, l_.str@PAGE
Lloh20:
	add	x21, x21, l_.str@PAGEOFF
Lloh21:
	adrp	x25, _IMGTYPE_COLORALPHA@GOTPAGE
Lloh22:
	ldr	x25, [x25, _IMGTYPE_COLORALPHA@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x26, sp
	ldr	w8, [x24]
	mov	x9, x8
Lloh23:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh24:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	w1, [x24]
	ldp	x8, x27, [x23, #8]
	ldr	w3, [x8]
	mov	x0, x22
	mov	x2, x21
	mov	x4, x19
	bl	_Com_sprintf
	ldr	w1, [x25]
	mov	x0, x22
	mov	x2, x20
	bl	_R_FindImageFile
	str	w0, [x27, x19, lsl #2]
	mov	sp, x26
	add	x19, x19, #1
	ldrsw	x8, [x23]
	cmp	x19, x8
	b.lt	LBB0_2
LBB0_3:
	ldur	x8, [x29, #-88]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	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_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_IMGFLAG_CLAMPTOEDGE,4,2        ; @IMGFLAG_CLAMPTOEDGE
	.comm	_IMGFLAG_MIPMAP,4,2             ; @IMGFLAG_MIPMAP
	.comm	_IMGFLAG_NOLIGHTSCALE,4,2       ; @IMGFLAG_NOLIGHTSCALE
	.comm	_IMGFLAG_CUBEMAP,4,2            ; @IMGFLAG_CUBEMAP
	.comm	_tr,24,3                        ; @tr
	.comm	_MAX_QPATH,4,2                  ; @MAX_QPATH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cubemaps/%s/%03d.dds"

	.comm	_IMGTYPE_COLORALPHA,4,2         ; @IMGTYPE_COLORALPHA
.subsections_via_symbols
