	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function CG_CalculateWeaponPosition
LCPI0_0:
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_1:
	.quad	0x3f747ae147ae147b              ## double 0.0050000000000000001
LCPI0_2:
	.quad	0x3f847ae147ae147b              ## double 0.01
LCPI0_3:
	.quad	0x3fd0000000000000              ## double 0.25
LCPI0_5:
	.quad	0x3f50624dd2f1a9fc              ## double 0.001
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2
LCPI0_4:
	.long	0x42200000                      ## float 40
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_CG_CalculateWeaponPosition:            ## @CG_CalculateWeaponPosition
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_cg@GOTPCREL(%rip), %r15
	movl	60(%r15), %edi
	movq	%r14, %rsi
	callq	_VectorCopy
	movl	56(%r15), %edi
	movq	%rbx, %rsi
	callq	_VectorCopy
	testb	$1, (%r15)
	movss	4(%r15), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	je	LBB0_2
## %bb.1:
	xorps	LCPI0_0(%rip), %xmm0
LBB0_2:
	movss	8(%r15), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	cvtss2sd	%xmm1, %xmm1
	movq	_ROLL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movss	(%rbx,%rax,4), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	cvtss2sd	%xmm2, %xmm2
	movsd	LCPI0_1(%rip), %xmm3            ## xmm3 = mem[0],zero
	mulsd	%xmm3, %xmm1
	addsd	%xmm2, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, (%rbx,%rax,4)
	mulss	8(%r15), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movq	_YAW@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movss	(%rbx,%rax,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	cvtss2sd	%xmm1, %xmm1
	mulsd	LCPI0_2(%rip), %xmm0
	addsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%rbx,%rax,4)
	movss	4(%r15), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	mulss	8(%r15), %xmm0
	cvtss2sd	%xmm0, %xmm0
	movq	_PITCH@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movss	(%rbx,%rax,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	cvtss2sd	%xmm1, %xmm1
	mulsd	%xmm3, %xmm0
	addsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%rbx,%rax,4)
	xorps	%xmm1, %xmm1
	cvtsi2sdl	24(%r15), %xmm1
	movsd	16(%r15), %xmm0                 ## xmm0 = mem[0],zero
	movapd	%xmm0, %xmm2
	subsd	%xmm1, %xmm2
	cvttsd2si	%xmm2, %edx
	movq	_LAND_DEFLECT_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%edx, %esi
	jle	LBB0_4
## %bb.3:
	movl	%edx, %ecx
	movl	%esi, %eax
	jmp	LBB0_5
LBB0_4:
	movq	_LAND_RETURN_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %esi
	movl	%esi, %ecx
	subl	%edx, %ecx
	jle	LBB0_6
LBB0_5:
	movsd	32(%r15), %xmm1                 ## xmm1 = mem[0],zero
	mulsd	LCPI0_3(%rip), %xmm1
	xorps	%xmm2, %xmm2
	cvtsi2sd	%ecx, %xmm2
	xorps	%xmm3, %xmm3
	cvtsi2sd	%eax, %xmm3
	mulsd	%xmm1, %xmm2
	divsd	%xmm3, %xmm2
	movss	8(%r14), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm2, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, 8(%r14)
LBB0_6:
	movss	4(%r15), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	addss	LCPI0_4(%rip), %xmm1
	movss	%xmm1, -44(%rbp)                ## 4-byte Spill
	mulsd	LCPI0_5(%rip), %xmm0
	callq	_sin
	mulss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	cvtss2sd	%xmm0, %xmm0
	movq	_ROLL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movss	(%rbx,%rax,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	mulsd	LCPI0_2(%rip), %xmm0
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, (%rbx,%rax,4)
	movq	(%r13), %rax
	movss	(%rbx,%rax,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, (%rbx,%rax,4)
	movq	(%r12), %rax
	movss	(%rbx,%rax,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	movss	%xmm0, (%rbx,%rax,4)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,64,3                        ## @cg
	.comm	_ROLL,8,3                       ## @ROLL
	.comm	_YAW,8,3                        ## @YAW
	.comm	_PITCH,8,3                      ## @PITCH
	.comm	_LAND_DEFLECT_TIME,4,2          ## @LAND_DEFLECT_TIME
	.comm	_LAND_RETURN_TIME,4,2           ## @LAND_RETURN_TIME
	.comm	_STEP_TIME,4,2                  ## @STEP_TIME
	.no_dead_strip	_CG_CalculateWeaponPosition
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_CalculateWeaponPosition
_CG_CalculateWeaponPosition:            ; @CG_CalculateWeaponPosition
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset b8, -72
	.cfi_offset b9, -80
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _cg@GOTPAGE
Lloh1:
	ldr	x21, [x21, _cg@GOTPAGEOFF]
	ldr	w0, [x21, #60]
	mov	x1, x20
	bl	_VectorCopy
	ldr	w0, [x21, #56]
	mov	x1, x19
	bl	_VectorCopy
	ldr	w8, [x21]
	ldp	s0, s1, [x21, #4]
	fneg	s2, s0
	tst	w8, #0x1
	fcsel	s0, s0, s2, eq
	fmul	s1, s1, s0
	fcvt	d1, s1
Lloh2:
	adrp	x22, _ROLL@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ROLL@GOTPAGEOFF]
	ldr	x8, [x22]
	lsl	x8, x8, #2
	ldr	s2, [x19, x8]
	fcvt	d2, s2
	mov	x9, #5243
	movk	x9, #18350, lsl #16
	movk	x9, #31457, lsl #32
	movk	x9, #16244, lsl #48
	fmov	d3, x9
	fmadd	d1, d1, d3, d2
	fcvt	s1, d1
	str	s1, [x19, x8]
	ldr	s1, [x21, #8]
	fmul	s0, s0, s1
	fcvt	d0, s0
Lloh4:
	adrp	x23, _YAW@GOTPAGE
Lloh5:
	ldr	x23, [x23, _YAW@GOTPAGEOFF]
	ldr	x8, [x23]
	lsl	x8, x8, #2
	ldr	s1, [x19, x8]
	fcvt	d1, s1
	mov	x9, #5243
	movk	x9, #18350, lsl #16
	movk	x9, #31457, lsl #32
	movk	x9, #16260, lsl #48
	fmov	d2, x9
	fmadd	d0, d0, d2, d1
	fcvt	s0, d0
	str	s0, [x19, x8]
	ldp	s0, s1, [x21, #4]
	fmul	s0, s0, s1
Lloh6:
	adrp	x24, _PITCH@GOTPAGE
Lloh7:
	ldr	x24, [x24, _PITCH@GOTPAGEOFF]
	ldr	x8, [x24]
	lsl	x8, x8, #2
	ldr	s1, [x19, x8]
	fcvt	d0, s0
	fcvt	d1, s1
	fmadd	d0, d0, d3, d1
	fcvt	s0, d0
	str	s0, [x19, x8]
	ldr	d0, [x21, #16]
	ldr	s1, [x21, #24]
	sshll.2d	v1, v1, #0
	scvtf	d1, d1
	fsub	d1, d0, d1
	fcvtzs	w8, d1
Lloh8:
	adrp	x9, _LAND_DEFLECT_TIME@GOTPAGE
Lloh9:
	ldr	x9, [x9, _LAND_DEFLECT_TIME@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w9, w8
	b.gt	LBB0_3
; %bb.1:
Lloh11:
	adrp	x10, _LAND_RETURN_TIME@GOTPAGE
Lloh12:
	ldr	x10, [x10, _LAND_RETURN_TIME@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	add	w9, w10, w9
	subs	w8, w9, w8
	b.le	LBB0_4
; %bb.2:
	mov	x9, x10
LBB0_3:
	ldr	d1, [x21, #32]
	fmov	d2, #0.25000000
	fmul	d1, d1, d2
	scvtf	d2, w8
	fmul	d1, d1, d2
	scvtf	d2, w9
	fdiv	d1, d1, d2
	ldr	s2, [x20, #8]
	fcvt	d2, s2
	fadd	d1, d1, d2
	fcvt	s1, d1
	str	s1, [x20, #8]
LBB0_4:
	ldr	s1, [x21, #4]
	mov	w8, #1109393408
	fmov	s2, w8
	fadd	s8, s1, s2
	mov	x8, #43516
	movk	x8, #54001, lsl #16
	movk	x8, #25165, lsl #32
	movk	x8, #16208, lsl #48
	fmov	d1, x8
	fmul	d0, d0, d1
	bl	_sin
	fmul	s0, s8, s0
	fcvt	d0, s0
	ldr	x8, [x22]
	lsl	x8, x8, #2
	ldr	s1, [x19, x8]
	fcvt	d1, s1
	mov	x9, #5243
	movk	x9, #18350, lsl #16
	movk	x9, #31457, lsl #32
	movk	x9, #16260, lsl #48
	fmov	d2, x9
	fmadd	d1, d0, d2, d1
	fcvt	s1, d1
	str	s1, [x19, x8]
	ldr	x8, [x23]
	lsl	x8, x8, #2
	ldr	s1, [x19, x8]
	fcvt	d1, s1
	fmadd	d1, d0, d2, d1
	fcvt	s1, d1
	str	s1, [x19, x8]
	ldr	x8, [x24]
	lsl	x8, x8, #2
	ldr	s1, [x19, x8]
	fcvt	d1, s1
	fmadd	d0, d0, d2, d1
	fcvt	s0, d0
	str	s0, [x19, x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,64,3                        ; @cg
	.comm	_ROLL,8,3                       ; @ROLL
	.comm	_YAW,8,3                        ; @YAW
	.comm	_PITCH,8,3                      ; @PITCH
	.comm	_LAND_DEFLECT_TIME,4,2          ; @LAND_DEFLECT_TIME
	.comm	_LAND_RETURN_TIME,4,2           ; @LAND_RETURN_TIME
	.comm	_STEP_TIME,4,2                  ; @STEP_TIME
	.no_dead_strip	_CG_CalculateWeaponPosition
.subsections_via_symbols
