	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_SetupFrame                   ## -- Begin function R_SetupFrame
	.p2align	4, 0x90
_R_SetupFrame:                          ## @R_SetupFrame
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_viewplayer@GOTPCREL(%rip), %rax
	movq	%rdi, (%rax)
	movq	16(%rdi), %rax
	movl	12(%rax), %ecx
	movq	_viewx@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	movl	8(%rax), %ecx
	movq	_viewy@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	movq	_viewangleoffset@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	addq	(%rax), %rdx
	movq	_viewangle@GOTPCREL(%rip), %rax
	movq	%rdx, (%rax)
	movl	8(%rdi), %eax
	movq	_extralight@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	4(%rdi), %eax
	movq	_viewz@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_finesine@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ANGLETOFINESHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrq	%cl, %rdx
	movl	(%rax,%rdx,4), %eax
	movq	_viewsin@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_finecosine@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rdx,4), %eax
	movq	_viewcos@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_sscount@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movslq	(%rdi), %rdx
	testq	%rdx, %rdx
	je	LBB0_18
## %bb.1:
	movq	_colormaps@GOTPCREL(%rip), %rax
	shlq	$10, %rdx
	addq	(%rax), %rdx
	movq	_fixedcolormap@GOTPCREL(%rip), %rax
	movq	%rdx, (%rax)
	movq	_scalelightfixed@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_walllights@GOTPCREL(%rip), %rsi
	movq	%rcx, (%rsi)
	movq	_MAXLIGHTSCALE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r10d
	testl	%r10d, %r10d
	jle	LBB0_19
## %bb.2:
	movq	%rdx, (%rcx)
	cmpl	$1, %r10d
	je	LBB0_19
## %bb.3:
	leaq	-1(%r10), %r9
	movl	$1, %esi
	cmpq	$4, %r9
	jb	LBB0_14
## %bb.4:
	cmpq	_fixedcolormap@GOTPCREL(%rip), %rcx
	jae	LBB0_6
## %bb.5:
	leaq	(%rcx,%r10,8), %rdx
	cmpq	_fixedcolormap@GOTPCREL(%rip), %rdx
	ja	LBB0_14
LBB0_6:
	movq	%r9, %rsi
	andq	$-4, %rsi
	leaq	-4(%rsi), %rdx
	movq	%rdx, %r8
	shrq	$2, %r8
	incq	%r8
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.8:
	movq	%r8, %rdx
	andq	$-2, %rdx
	movq	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	movl	$1, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, (%rcx,%rdi,8)
	movdqu	%xmm0, 16(%rcx,%rdi,8)
	movdqu	%xmm0, 32(%rcx,%rdi,8)
	movdqu	%xmm0, 48(%rcx,%rdi,8)
	addq	$8, %rdi
	addq	$-2, %rdx
	jne	LBB0_9
## %bb.10:
	testb	$1, %r8b
	je	LBB0_12
LBB0_11:
	movq	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	movdqu	%xmm0, (%rcx,%rdi,8)
	movdqu	%xmm0, 16(%rcx,%rdi,8)
LBB0_12:
	cmpq	%rsi, %r9
	je	LBB0_19
## %bb.13:
	orq	$1, %rsi
LBB0_14:
	movl	%r10d, %edx
	subl	%esi, %edx
	movq	%rsi, %r8
	notq	%r8
	addq	%r10, %r8
	andq	$3, %rdx
	je	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rdi
	movq	%rdi, (%rcx,%rsi,8)
	incq	%rsi
	decq	%rdx
	jne	LBB0_15
LBB0_16:
	cmpq	$3, %r8
	jb	LBB0_19
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rdx
	movq	%rdx, (%rcx,%rsi,8)
	movq	(%rax), %rdx
	movq	%rdx, 8(%rcx,%rsi,8)
	movq	(%rax), %rdx
	movq	%rdx, 16(%rcx,%rsi,8)
	movq	(%rax), %rdx
	movq	%rdx, 24(%rcx,%rsi,8)
	addq	$4, %rsi
	cmpq	%rsi, %r10
	jne	LBB0_17
	jmp	LBB0_19
LBB0_18:
	movq	_fixedcolormap@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_19:
	movq	_framecount@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	_validcount@GOTPCREL(%rip), %rax
	incl	(%rax)
	popq	%rbp
	retq
LBB0_7:
	movl	$1, %edi
	testb	$1, %r8b
	jne	LBB0_11
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_viewplayer,8,3                 ## @viewplayer
	.comm	_viewx,4,2                      ## @viewx
	.comm	_viewy,4,2                      ## @viewy
	.comm	_viewangleoffset,8,3            ## @viewangleoffset
	.comm	_viewangle,8,3                  ## @viewangle
	.comm	_extralight,4,2                 ## @extralight
	.comm	_viewz,4,2                      ## @viewz
	.comm	_finesine,8,3                   ## @finesine
	.comm	_ANGLETOFINESHIFT,8,3           ## @ANGLETOFINESHIFT
	.comm	_viewsin,4,2                    ## @viewsin
	.comm	_finecosine,8,3                 ## @finecosine
	.comm	_viewcos,4,2                    ## @viewcos
	.comm	_sscount,8,3                    ## @sscount
	.comm	_colormaps,8,3                  ## @colormaps
	.comm	_fixedcolormap,8,3              ## @fixedcolormap
	.comm	_scalelightfixed,8,3            ## @scalelightfixed
	.comm	_walllights,8,3                 ## @walllights
	.comm	_MAXLIGHTSCALE,4,2              ## @MAXLIGHTSCALE
	.comm	_framecount,4,2                 ## @framecount
	.comm	_validcount,4,2                 ## @validcount
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_SetupFrame                   ; -- Begin function R_SetupFrame
	.p2align	2
_R_SetupFrame:                          ; @R_SetupFrame
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _viewplayer@GOTPAGE
Lloh1:
	ldr	x8, [x8, _viewplayer@GOTPAGEOFF]
	ldr	x9, [x0, #16]
Lloh2:
	adrp	x10, _viewx@GOTPAGE
Lloh3:
	ldr	x10, [x10, _viewx@GOTPAGEOFF]
	ldp	w12, w11, [x9, #8]
Lloh4:
	str	w11, [x10]
Lloh5:
	adrp	x10, _viewy@GOTPAGE
Lloh6:
	ldr	x10, [x10, _viewy@GOTPAGEOFF]
Lloh7:
	str	w12, [x10]
	ldr	x9, [x9]
Lloh8:
	adrp	x10, _viewangleoffset@GOTPAGE
Lloh9:
	ldr	x10, [x10, _viewangleoffset@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
Lloh11:
	adrp	x11, _viewangle@GOTPAGE
Lloh12:
	ldr	x11, [x11, _viewangle@GOTPAGEOFF]
	add	x9, x10, x9
Lloh13:
	str	x9, [x11]
Lloh14:
	adrp	x10, _extralight@GOTPAGE
Lloh15:
	ldr	x10, [x10, _extralight@GOTPAGEOFF]
	ldp	w12, w11, [x0, #4]
Lloh16:
	str	w11, [x10]
Lloh17:
	adrp	x10, _viewz@GOTPAGE
Lloh18:
	ldr	x10, [x10, _viewz@GOTPAGEOFF]
Lloh19:
	str	w12, [x10]
Lloh20:
	adrp	x10, _finesine@GOTPAGE
Lloh21:
	ldr	x10, [x10, _finesine@GOTPAGEOFF]
Lloh22:
	ldr	x10, [x10]
Lloh23:
	adrp	x11, _ANGLETOFINESHIFT@GOTPAGE
Lloh24:
	ldr	x11, [x11, _ANGLETOFINESHIFT@GOTPAGEOFF]
Lloh25:
	ldr	x11, [x11]
	lsr	x9, x9, x11
	lsl	x9, x9, #2
	ldr	w10, [x10, x9]
Lloh26:
	adrp	x11, _viewsin@GOTPAGE
Lloh27:
	ldr	x11, [x11, _viewsin@GOTPAGEOFF]
Lloh28:
	adrp	x12, _finecosine@GOTPAGE
Lloh29:
	ldr	x12, [x12, _finecosine@GOTPAGEOFF]
Lloh30:
	str	w10, [x11]
Lloh31:
	ldr	x10, [x12]
	ldr	w9, [x10, x9]
Lloh32:
	adrp	x10, _viewcos@GOTPAGE
Lloh33:
	ldr	x10, [x10, _viewcos@GOTPAGEOFF]
Lloh34:
	str	x0, [x8]
Lloh35:
	str	w9, [x10]
Lloh36:
	adrp	x8, _sscount@GOTPAGE
Lloh37:
	ldr	x8, [x8, _sscount@GOTPAGEOFF]
Lloh38:
	str	xzr, [x8]
	ldrsw	x9, [x0]
	cbz	w9, LBB0_9
; %bb.1:
Lloh39:
	adrp	x8, _colormaps@GOTPAGE
Lloh40:
	ldr	x8, [x8, _colormaps@GOTPAGEOFF]
Lloh41:
	ldr	x10, [x8]
Lloh42:
	adrp	x8, _fixedcolormap@GOTPAGE
Lloh43:
	ldr	x8, [x8, _fixedcolormap@GOTPAGEOFF]
	add	x11, x10, x9, lsl #10
	str	x11, [x8]
Lloh44:
	adrp	x9, _scalelightfixed@GOTPAGE
Lloh45:
	ldr	x9, [x9, _scalelightfixed@GOTPAGEOFF]
Lloh46:
	adrp	x10, _walllights@GOTPAGE
Lloh47:
	ldr	x10, [x10, _walllights@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
Lloh49:
	str	x9, [x10]
Lloh50:
	adrp	x10, _MAXLIGHTSCALE@GOTPAGE
Lloh51:
	ldr	x10, [x10, _MAXLIGHTSCALE@GOTPAGEOFF]
Lloh52:
	ldr	w10, [x10]
	cmp	w10, #1
	b.lt	LBB0_10
; %bb.2:
	str	x11, [x9]
	cmp	w10, #1
	b.eq	LBB0_10
; %bb.3:
	sub	x12, x10, #1
	cmp	x12, #8
	b.lo	LBB0_6
; %bb.4:
	cmp	x9, x8
	b.hs	LBB0_11
; %bb.5:
	add	x11, x9, x10, lsl #3
	cmp	x11, x8
	b.ls	LBB0_11
LBB0_6:
	mov	w11, #1
LBB0_7:
	sub	x10, x10, x11
	add	x9, x9, x11, lsl #3
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x8]
	str	x11, [x9], #8
	subs	x10, x10, #1
	b.ne	LBB0_8
	b	LBB0_10
LBB0_9:
Lloh53:
	adrp	x8, _fixedcolormap@GOTPAGE
Lloh54:
	ldr	x8, [x8, _fixedcolormap@GOTPAGEOFF]
Lloh55:
	str	xzr, [x8]
LBB0_10:
Lloh56:
	adrp	x8, _framecount@GOTPAGE
Lloh57:
	ldr	x8, [x8, _framecount@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
Lloh58:
	adrp	x8, _validcount@GOTPAGE
Lloh59:
	ldr	x8, [x8, _validcount@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ret
LBB0_11:
	and	x13, x12, #0xfffffffffffffff8
	orr	x11, x13, #0x1
	ld1r.2d	{ v0 }, [x8]
	add	x14, x9, #40
	mov	x15, x13
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	d1, [x8]
	dup.2d	v1, v1[0]
	stp	q0, q0, [x14, #-32]
	stp	q0, q1, [x14], #64
	subs	x15, x15, #8
	b.ne	LBB0_12
; %bb.13:
	cmp	x12, x13
	b.eq	LBB0_10
	b	LBB0_7
	.loh AdrpLdrGotStr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotStr	Lloh32, Lloh33, Lloh35
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh31
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh30
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh34
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotStr	Lloh46, Lloh47, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh48
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotStr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGot	Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.comm	_viewplayer,8,3                 ; @viewplayer
	.comm	_viewx,4,2                      ; @viewx
	.comm	_viewy,4,2                      ; @viewy
	.comm	_viewangleoffset,8,3            ; @viewangleoffset
	.comm	_viewangle,8,3                  ; @viewangle
	.comm	_extralight,4,2                 ; @extralight
	.comm	_viewz,4,2                      ; @viewz
	.comm	_finesine,8,3                   ; @finesine
	.comm	_ANGLETOFINESHIFT,8,3           ; @ANGLETOFINESHIFT
	.comm	_viewsin,4,2                    ; @viewsin
	.comm	_finecosine,8,3                 ; @finecosine
	.comm	_viewcos,4,2                    ; @viewcos
	.comm	_sscount,8,3                    ; @sscount
	.comm	_colormaps,8,3                  ; @colormaps
	.comm	_fixedcolormap,8,3              ; @fixedcolormap
	.comm	_scalelightfixed,8,3            ; @scalelightfixed
	.comm	_walllights,8,3                 ; @walllights
	.comm	_MAXLIGHTSCALE,4,2              ; @MAXLIGHTSCALE
	.comm	_framecount,4,2                 ; @framecount
	.comm	_validcount,4,2                 ; @validcount
.subsections_via_symbols
