	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function RE_AddPolyToScene
LCPI0_0:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_RE_AddPolyToScene
	.p2align	4, 0x90
_RE_AddPolyToScene:                     ## @RE_AddPolyToScene
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_tr@GOTPCREL(%rip), %rax
	cmpl	$0, 8(%rax)
	je	LBB0_19
## %bb.1:
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.4:
	testl	%ecx, %ecx
	jle	LBB0_19
## %bb.5:
	movl	%esi, %r13d
	leal	(,%r13,4), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movslq	%esi, %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	%ecx, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	_r_numpolyverts@GOTPCREL(%rip), %r15
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 4(%rcx,%r14)
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	incq	%rbx
	cmpq	-88(%rbp), %rbx                 ## 8-byte Folded Reload
	je	LBB0_19
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_16 Depth 2
	movl	(%r15), %eax
	addl	%r13d, %eax
	movq	_max_polyverts@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_r_numpolys@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_max_polys@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jae	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_backEndData@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rsi
	movq	_SF_POLY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shlq	$5, %r14
	movl	%ecx, 24(%rsi,%r14)
	movq	%rdi, 16(%rsi,%r14)
	movl	%r13d, (%rsi,%r14)
	movslq	(%r15), %rdi
	shlq	$4, %rdi
	addq	(%rax), %rdi
	leaq	(%rsi,%r14), %r12
	addq	$8, %r12
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, 8(%rsi,%r14)
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, %rax
	imulq	-96(%rbp), %rax                 ## 8-byte Folded Reload
	movq	%rdx, %rbx
	leaq	(%rdx,%rax,4), %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_Com_Memcpy
	movq	_glConfig@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_GLHW_RAGEPRO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r12), %rax
	movq	(%rax), %rax
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [255,255,255,255]
	movups	%xmm0, (%rax)
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_r_numpolys@GOTPCREL(%rip), %rax
	incq	(%rax)
	addl	%r13d, (%r15)
	movq	_tr@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$1, (%rcx)
	movq	%rbx, %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14), %rbx
	movq	(%r12), %rax
	movl	8(%rax), %edi
	callq	_VectorCopy
	movq	(%r12), %rax
	movl	8(%rax), %edi
	callq	_VectorCopy
	cmpl	$2, (%rbx)
	jl	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, %r13d
	movl	$24, %r15d
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12), %rax
	movl	(%rax,%r15), %edi
	callq	_AddPointToBounds
	incq	%r13
	movslq	(%rbx), %rax
	addq	$16, %r15
	cmpq	%rax, %r13
	jl	LBB0_16
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_tr@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	xorl	%eax, %eax
	cmpl	$1, (%rcx)
	setne	%al
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	_r_numpolyverts@GOTPCREL(%rip), %r15
	jmp	LBB0_18
LBB0_19:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	_PRINT_WARNING@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movq	_PRINT_DEVELOPER@GOTPCREL(%rip), %rcx
LBB0_3:
	movq	_ri@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rcx), %edi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_tr,16,3                        ## @tr
	.comm	_ri,8,3                         ## @ri
	.comm	_PRINT_WARNING,4,2              ## @PRINT_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WARNING: RE_AddPolyToScene: NULL poly shader\n"

	.comm	_r_numpolyverts,4,2             ## @r_numpolyverts
	.comm	_max_polyverts,4,2              ## @max_polyverts
	.comm	_r_numpolys,8,3                 ## @r_numpolys
	.comm	_max_polys,8,3                  ## @max_polys
	.comm	_PRINT_DEVELOPER,4,2            ## @PRINT_DEVELOPER
L_.str.1:                               ## @.str.1
	.asciz	"WARNING: RE_AddPolyToScene: r_max_polys or r_max_polyverts reached\n"

	.comm	_backEndData,8,3                ## @backEndData
	.comm	_SF_POLY,4,2                    ## @SF_POLY
	.comm	_glConfig,8,3                   ## @glConfig
	.comm	_GLHW_RAGEPRO,8,3               ## @GLHW_RAGEPRO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RE_AddPolyToScene              ; -- Begin function RE_AddPolyToScene
	.p2align	2
_RE_AddPolyToScene:                     ; @RE_AddPolyToScene
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	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
Lloh0:
	adrp	x8, _tr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tr@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8, #8]
	cbz	w8, LBB0_16
; %bb.1:
	mov	x22, x0
	cbz	x0, LBB0_17
; %bb.2:
	cmp	w3, #1
	b.lt	LBB0_16
; %bb.3:
	mov	x19, x2
	mov	x21, x1
	mov	x26, #0
	lsl	w8, w1, #2
	str	w8, [sp, #44]                   ; 4-byte Folded Spill
	sxtw	x8, w21
	str	x8, [sp, #32]                   ; 8-byte Folded Spill
Lloh3:
	adrp	x28, _r_numpolyverts@GOTPAGE
Lloh4:
	ldr	x28, [x28, _r_numpolyverts@GOTPAGEOFF]
Lloh5:
	adrp	x25, _r_numpolys@GOTPAGE
Lloh6:
	ldr	x25, [x25, _r_numpolys@GOTPAGEOFF]
	mov	w8, w3
	stp	x2, x8, [sp, #16]               ; 16-byte Folded Spill
	str	x22, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
Lloh7:
	adrp	x8, _tr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _tr@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	w8, [x8]
	cmp	w8, #1
	cset	w8, ne
	ldp	x22, x19, [sp, #8]              ; 16-byte Folded Reload
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x9, x23, x24, lsl #5
	str	w8, [x9, #4]
	add	x26, x26, #1
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	cmp	x26, x8
	b.eq	LBB0_16
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	ldr	w8, [x28]
Lloh10:
	adrp	x9, _max_polyverts@GOTPAGE
Lloh11:
	ldr	x9, [x9, _max_polyverts@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	add	w8, w8, w21
	cmp	w8, w9
	b.gt	LBB0_18
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x24, [x25]
Lloh13:
	adrp	x8, _max_polys@GOTPAGE
Lloh14:
	ldr	x8, [x8, _max_polys@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x24, x8
	b.hs	LBB0_18
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh16:
	adrp	x8, _backEndData@GOTPAGE
Lloh17:
	ldr	x8, [x8, _backEndData@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _SF_POLY@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SF_POLY@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	ldp	x8, x23, [x8]
	add	x27, x23, x24, lsl #5
	str	w9, [x27, #24]
	str	x22, [x27, #16]
	str	w21, [x27]
	ldrsw	x9, [x28]
	add	x0, x8, x9, lsl #4
	mov	x20, x27
	str	x0, [x20, #8]!
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	mul	x8, x26, x8
	add	x1, x19, x8, lsl #2
	ldr	w2, [sp, #44]                   ; 4-byte Folded Reload
	bl	_Com_Memcpy
Lloh22:
	adrp	x8, _glConfig@GOTPAGE
Lloh23:
	ldr	x8, [x8, _glConfig@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
Lloh25:
	adrp	x9, _GLHW_RAGEPRO@GOTPAGE
Lloh26:
	ldr	x9, [x9, _GLHW_RAGEPRO@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8]
	movi.2d	v0, #0x0000ff000000ff
	str	q0, [x8]
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x25]
	add	x8, x8, #1
	str	x8, [x25]
	ldr	w8, [x28]
	add	w8, w8, w21
	str	w8, [x28]
Lloh28:
	adrp	x8, _tr@GOTPAGE
Lloh29:
	ldr	x8, [x8, _tr@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w8, #0
	b	LBB0_5
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20]
	ldr	w0, [x8, #8]
	bl	_VectorCopy
	ldr	x8, [x20]
	ldr	w0, [x8, #8]
	bl	_VectorCopy
	ldr	w8, [x27]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w19, #24
	mov	w22, #1
LBB0_15:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x20]
	ldr	w0, [x8, x19]
	bl	_AddPointToBounds
	add	x22, x22, #1
	ldrsw	x8, [x27]
	add	x19, x19, #16
	cmp	x22, x8
	b.lt	LBB0_15
	b	LBB0_4
LBB0_16:
	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
	add	sp, sp, #144
	ret
LBB0_17:
Lloh31:
	adrp	x1, l_.str@PAGE
Lloh32:
	add	x1, x1, l_.str@PAGEOFF
Lloh33:
	adrp	x9, _PRINT_WARNING@GOTPAGE
Lloh34:
	ldr	x9, [x9, _PRINT_WARNING@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:
Lloh35:
	adrp	x1, l_.str.1@PAGE
Lloh36:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh37:
	adrp	x9, _PRINT_DEVELOPER@GOTPAGE
Lloh38:
	ldr	x9, [x9, _PRINT_DEVELOPER@GOTPAGEOFF]
LBB0_19:
Lloh39:
	adrp	x8, _ri@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh41:
	ldr	x2, [x8]
	ldr	w0, [x9]
	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
	add	sp, sp, #144
	br	x2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_tr,16,3                        ; @tr
	.comm	_ri,8,3                         ; @ri
	.comm	_PRINT_WARNING,4,2              ; @PRINT_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WARNING: RE_AddPolyToScene: NULL poly shader\n"

	.comm	_r_numpolyverts,4,2             ; @r_numpolyverts
	.comm	_max_polyverts,4,2              ; @max_polyverts
	.comm	_r_numpolys,8,3                 ; @r_numpolys
	.comm	_max_polys,8,3                  ; @max_polys
	.comm	_PRINT_DEVELOPER,4,2            ; @PRINT_DEVELOPER
l_.str.1:                               ; @.str.1
	.asciz	"WARNING: RE_AddPolyToScene: r_max_polys or r_max_polyverts reached\n"

	.comm	_backEndData,8,3                ; @backEndData
	.comm	_SF_POLY,4,2                    ; @SF_POLY
	.comm	_glConfig,8,3                   ; @glConfig
	.comm	_GLHW_RAGEPRO,8,3               ; @GLHW_RAGEPRO
.subsections_via_symbols
