	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_ScaleFromGlobalAngle         ## -- Begin function R_ScaleFromGlobalAngle
	.p2align	4, 0x90
_R_ScaleFromGlobalAngle:                ## @R_ScaleFromGlobalAngle
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_ANG90@GOTPCREL(%rip), %rax
	movq	_viewangle@GOTPCREL(%rip), %rcx
	addl	(%rax), %edi
	movl	%edi, %eax
	subl	(%rcx), %eax
	movq	_rw_normalangle@GOTPCREL(%rip), %rcx
	subl	(%rcx), %edi
	movq	_finesine@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_ANGLETOFINESHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	cltq
	movl	(%rdx,%rax,4), %r14d
	sarl	%cl, %edi
	movslq	%edi, %rax
	movl	(%rdx,%rax,4), %esi
	movq	_projection@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FixedMul
	movl	%eax, %ebx
	movq	_detailshift@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movq	_rw_distance@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_FixedMul
	movl	%ebx, %ecx
	sarl	$16, %ecx
	cmpl	%ecx, %eax
	jle	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_FixedDiv
	movl	%eax, %ecx
	movq	_FRACUNIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$6, %edx
	cmpl	$257, %ecx                      ## imm = 0x101
	movl	$256, %eax                      ## imm = 0x100
	cmovgel	%ecx, %eax
	cmpl	%edx, %ecx
	cmovgl	%edx, %eax
	jmp	LBB0_3
LBB0_2:
	movq	_FRACUNIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$6, %eax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ANG90,8,3                      ## @ANG90
	.comm	_viewangle,8,3                  ## @viewangle
	.comm	_rw_normalangle,8,3             ## @rw_normalangle
	.comm	_finesine,8,3                   ## @finesine
	.comm	_ANGLETOFINESHIFT,8,3           ## @ANGLETOFINESHIFT
	.comm	_projection,4,2                 ## @projection
	.comm	_detailshift,4,2                ## @detailshift
	.comm	_rw_distance,4,2                ## @rw_distance
	.comm	_FRACUNIT,4,2                   ## @FRACUNIT
	.comm	_finecosine,8,3                 ## @finecosine
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_ScaleFromGlobalAngle         ; -- Begin function R_ScaleFromGlobalAngle
	.p2align	2
_R_ScaleFromGlobalAngle:                ; @R_ScaleFromGlobalAngle
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _ANG90@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ANG90@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _viewangle@GOTPAGE
Lloh4:
	ldr	x9, [x9, _viewangle@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _rw_normalangle@GOTPAGE
Lloh7:
	ldr	x10, [x10, _rw_normalangle@GOTPAGEOFF]
	add	w8, w8, w0
	sub	w9, w8, w9
Lloh8:
	ldr	w10, [x10]
	sub	w8, w8, w10
Lloh9:
	adrp	x10, _finesine@GOTPAGE
Lloh10:
	ldr	x10, [x10, _finesine@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
Lloh12:
	adrp	x11, _ANGLETOFINESHIFT@GOTPAGE
Lloh13:
	ldr	x11, [x11, _ANGLETOFINESHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	asr	w9, w9, w11
	ldr	w20, [x10, w9, sxtw #2]
	asr	w8, w8, w11
	ldr	w1, [x10, w8, sxtw #2]
Lloh15:
	adrp	x8, _projection@GOTPAGE
Lloh16:
	ldr	x8, [x8, _projection@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_FixedMul
Lloh18:
	adrp	x8, _detailshift@GOTPAGE
Lloh19:
	ldr	x8, [x8, _detailshift@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	lsl	w19, w0, w8
Lloh21:
	adrp	x8, _rw_distance@GOTPAGE
Lloh22:
	ldr	x8, [x8, _rw_distance@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FixedMul
	cmp	w0, w19, asr #16
	b.le	LBB0_2
; %bb.1:
	mov	x1, x0
	mov	x0, x19
	bl	_FixedDiv
Lloh24:
	adrp	x8, _FRACUNIT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _FRACUNIT@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	lsl	w8, w8, #6
	mov	w9, #256
	cmp	w0, #256
	csel	w9, w0, w9, gt
	cmp	w0, w8
	csel	w0, w8, w9, gt
	b	LBB0_3
LBB0_2:
Lloh27:
	adrp	x8, _FRACUNIT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _FRACUNIT@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	lsl	w0, w8, #6
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_ANG90,8,3                      ; @ANG90
	.comm	_viewangle,8,3                  ; @viewangle
	.comm	_rw_normalangle,8,3             ; @rw_normalangle
	.comm	_finesine,8,3                   ; @finesine
	.comm	_ANGLETOFINESHIFT,8,3           ; @ANGLETOFINESHIFT
	.comm	_projection,4,2                 ; @projection
	.comm	_detailshift,4,2                ; @detailshift
	.comm	_rw_distance,4,2                ; @rw_distance
	.comm	_FRACUNIT,4,2                   ; @FRACUNIT
	.comm	_finecosine,8,3                 ; @finecosine
.subsections_via_symbols
