	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function CG_Portal
LCPI0_0:
	.quad	0x3f70000000000000              ## double 0.00390625
LCPI0_1:
	.quad	0x4076800000000000              ## double 360
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_CG_Portal:                             ## @CG_Portal
	.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
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	-56(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	(%rbx), %edi
	movl	-20(%rbp), %esi
	callq	_VectorCopy
	movl	28(%rbx), %edi
	movl	-24(%rbp), %esi
	callq	_VectorCopy
	movl	24(%rbx), %edi
	movq	-32(%rbp), %rax
	movl	(%rax), %esi
	callq	_ByteToDir
	movq	-32(%rbp), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edi
	callq	_PerpendicularVector
	movq	_vec3_origin@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-32(%rbp), %rax
	movl	4(%rax), %edx
	movl	%edx, %esi
	callq	_VectorSubtract
	movq	-32(%rbp), %rax
	movl	(%rax), %edi
	movl	4(%rax), %esi
	movl	8(%rax), %edx
	callq	_CrossProduct
	movq	_RT_PORTALSURFACE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movl	20(%rbx), %eax
	movl	%eax, -44(%rbp)
	movl	16(%rbx), %eax
	movl	%eax, -48(%rbp)
	movsd	8(%rbx), %xmm0                  ## xmm0 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm0
	mulsd	LCPI0_1(%rip), %xmm0
	movsd	%xmm0, -56(%rbp)
	movq	%r14, %rdi
	callq	_trap_R_AddRefEntityToScene
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vec3_origin,4,2                ## @vec3_origin
	.comm	_RT_PORTALSURFACE,4,2           ## @RT_PORTALSURFACE
	.no_dead_strip	_CG_Portal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_Portal
_CG_Portal:                             ; @CG_Portal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	ldr	w0, [x19]
	ldr	w1, [sp, #44]
	bl	_VectorCopy
	ldr	w0, [x19, #28]
	ldr	w1, [sp, #40]
	bl	_VectorCopy
	ldr	w0, [x19, #24]
	ldr	x8, [sp, #32]
	ldr	w1, [x8]
	bl	_ByteToDir
	ldr	x8, [sp, #32]
	ldp	w1, w0, [x8]
	bl	_PerpendicularVector
Lloh0:
	adrp	x8, _vec3_origin@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vec3_origin@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x8, [sp, #32]
	ldr	w1, [x8, #4]
	mov	x2, x1
	bl	_VectorSubtract
	ldr	x8, [sp, #32]
	ldp	w0, w1, [x8]
	ldr	w2, [x8, #8]
	bl	_CrossProduct
Lloh3:
	adrp	x8, _RT_PORTALSURFACE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RT_PORTALSURFACE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	ldp	d1, d0, [x19, #8]
	mov	x8, #4571153621781053440
	fmov	d2, x8
	fmul	d1, d1, d2
	mov	x8, #140737488355328
	movk	x8, #16502, lsl #48
	fmov	d2, x8
	fmul	d1, d1, d2
	stp	d1, d0, [sp, #8]
	add	x0, sp, #8
	bl	_trap_R_AddRefEntityToScene
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_vec3_origin,4,2                ; @vec3_origin
	.comm	_RT_PORTALSURFACE,4,2           ; @RT_PORTALSURFACE
	.no_dead_strip	_CG_Portal
.subsections_via_symbols
