	.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_AddPlayerWeapon
LCPI0_0:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2
LCPI0_1:
	.long	0xc4bb8000                      ## float -1500
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_2:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_3:
	.quad	0x406fe00000000000              ## double 255
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_CG_AddPlayerWeapon
	.p2align	4, 0x90
_CG_AddPlayerWeapon:                    ## @CG_AddPlayerWeapon
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	8(%rdx), %r15
	movq	%r15, %rdi
	callq	_CG_RegisterWeapon
	movq	_cg_weapons@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	leaq	-80(%rbp), %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	32(%r12), %edi
	movl	-48(%rbp), %esi
	callq	_VectorCopy
	movl	28(%r12), %eax
	movl	%eax, -52(%rbp)
	movl	24(%r12), %eax
	movl	%eax, -56(%rbp)
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.1:
	movq	_cg@GOTPCREL(%rip), %rax
	movq	8(%rax), %rcx
	movq	_WP_RAILGUN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.2:
	movq	16(%rax), %rcx
	movq	_WEAPON_FIRING@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.3:
	cvtsi2ssq	32(%rax), %xmm0
	divss	LCPI0_1(%rip), %xmm0
	movq	-80(%rbp), %rax
	movl	$0, 4(%rax)
	cvtss2sd	%xmm0, %xmm0
	addsd	LCPI0_2(%rip), %xmm0
	mulsd	LCPI0_3(%rip), %xmm0
	cvttsd2si	%xmm0, %ecx
	movl	%ecx, 8(%rax)
	movl	%ecx, (%rax)
	jmp	LBB0_5
LBB0_4:
	movq	-80(%rbp), %rax
	movapd	LCPI0_0(%rip), %xmm0            ## xmm0 = [255,255,255,255]
	movupd	%xmm0, (%rax)
LBB0_5:
	leaq	(%r15,%r15,2), %rax
	shlq	$4, %rax
	movq	8(%r13,%rax), %rax
	movq	%rax, -64(%rbp)
	testq	%rax, %rax
	je	LBB0_21
LBB0_12:
	movq	16(%r12), %rdx
	leaq	L_.str(%rip), %rcx
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_CG_PositionEntityOnTag
	movl	40(%r14), %esi
	movq	%rbx, %rdi
	callq	_CG_AddWeaponWithPowerups
	leaq	(%r15,%r15,2), %rax
	shlq	$4, %rax
	cmpq	$0, 24(%r13,%rax)
	jne	LBB0_13
## %bb.14:
	movq	_WP_LIGHTNING@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_17
## %bb.15:
	movq	_WP_GAUNTLET@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_17
## %bb.16:
	movq	_WP_GRAPPLING_HOOK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_18
LBB0_17:
	movq	_cg_entities@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	32(%r14), %rcx
	shlq	$6, %rcx
	movq	_EF_FIRING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 16(%rax,%rcx)
	jne	LBB0_20
LBB0_18:
	movq	_cg@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subq	(%r14), %rax
	movq	_MUZZLE_FLASH_TIME@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_20
## %bb.19:
	cmpl	$0, 48(%r14)
	je	LBB0_21
LBB0_20:
	leaq	-120(%rbp), %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	32(%r12), %edi
	movl	-88(%rbp), %esi
	callq	_VectorCopy
	movl	28(%r12), %eax
	movl	%eax, -92(%rbp)
	movl	24(%r12), %eax
	movl	%eax, -96(%rbp)
	jmp	LBB0_21
LBB0_6:
	leaq	(%r15,%r15,2), %rax
	shlq	$4, %rax
	movq	8(%r13,%rax), %rcx
	movq	%rcx, -64(%rbp)
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.7:
	movq	_qfalse@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 52(%r14)
	movq	_EF_FIRING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 16(%r14)
	je	LBB0_10
## %bb.8:
	movq	40(%r13,%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:
	movq	24(%r14), %rdi
	movl	56(%r14), %esi
	movq	_vec3_origin@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_trap_S_AddLoopingSound
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r14)
	jmp	LBB0_12
LBB0_10:
	movq	32(%r13,%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.11:
	movq	24(%r14), %rdi
	movl	56(%r14), %esi
	movq	_vec3_origin@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_trap_S_AddLoopingSound
	jmp	LBB0_12
LBB0_13:
	addq	$32, %r12
	leaq	-120(%rbp), %rdi
	movq	%r12, %rsi
	callq	_CG_AddPlayerWeapon.cold.1
LBB0_21:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function CG_AddPlayerWeapon.cold.1
_CG_AddPlayerWeapon.cold.1:             ## @CG_AddPlayerWeapon.cold.1
	.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	%rsi, %r14
	movq	%rdi, %rbx
	pushq	$40
	popq	%rdx
	xorl	%esi, %esi
	callq	_memset
	movl	(%r14), %edi
	movl	32(%rbx), %esi
	callq	_VectorCopy
	ud2
	.cfi_endproc
                                        ## -- End function
	.comm	_cg_weapons,8,3                 ## @cg_weapons
	.comm	_cg,48,3                        ## @cg
	.comm	_WP_RAILGUN,8,3                 ## @WP_RAILGUN
	.comm	_WEAPON_FIRING,8,3              ## @WEAPON_FIRING
	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_EF_FIRING,4,2                  ## @EF_FIRING
	.comm	_vec3_origin,4,2                ## @vec3_origin
	.comm	_qtrue,4,2                      ## @qtrue
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tag_weapon"

	.comm	_YAW,8,3                        ## @YAW
	.comm	_PITCH,8,3                      ## @PITCH
	.comm	_ROLL,8,3                       ## @ROLL
	.comm	_cg_entities,8,3                ## @cg_entities
	.comm	_WP_LIGHTNING,8,3               ## @WP_LIGHTNING
	.comm	_WP_GAUNTLET,8,3                ## @WP_GAUNTLET
	.comm	_WP_GRAPPLING_HOOK,8,3          ## @WP_GRAPPLING_HOOK
	.comm	_MUZZLE_FLASH_TIME,8,3          ## @MUZZLE_FLASH_TIME
	.comm	_cgs,8,3                        ## @cgs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_AddPlayerWeapon             ; -- Begin function CG_AddPlayerWeapon
	.p2align	2
_CG_AddPlayerWeapon:                    ; @CG_AddPlayerWeapon
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x20, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x21, [x2, #8]
	mov	x0, x21
	bl	_CG_RegisterWeapon
Lloh0:
	adrp	x8, _cg_weapons@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cg_weapons@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8]
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	mov	x22, x19
	ldr	w0, [x22, #32]!
	ldr	w1, [sp, #72]
	bl	_VectorCopy
	ldur	d0, [x22, #-8]
	str	d0, [sp, #64]
Lloh3:
	adrp	x24, _cg@GOTPAGE
Lloh4:
	ldr	x24, [x24, _cg@GOTPAGEOFF]
	cbz	x23, LBB0_14
; %bb.1:
	ldr	x8, [x24, #8]
Lloh5:
	adrp	x9, _WP_RAILGUN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _WP_RAILGUN@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x24, #16]
Lloh8:
	adrp	x9, _WEAPON_FIRING@GOTPAGE
Lloh9:
	ldr	x9, [x9, _WEAPON_FIRING@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x24, #32]
	scvtf	s0, x8
	mov	w8, #32768
	movk	w8, #50363, lsl #16
	fmov	s1, w8
	fdiv	s0, s0, s1
	ldr	x8, [sp, #40]
	fcvt	d0, s0
	fmov	d1, #1.00000000
	fadd	d0, d0, d1
	mov	x9, #246290604621824
	movk	x9, #16495, lsl #48
	fmov	d1, x9
	fmul	d0, d0, d1
	fcvtzs	w9, d0
	stp	wzr, w9, [x8, #4]
	str	w9, [x8]
	b	LBB0_5
LBB0_4:
	ldr	x8, [sp, #40]
	movi.2d	v0, #0x0000ff000000ff
	str	q0, [x8]
LBB0_5:
	mov	w8, #48
	madd	x8, x21, x8, x25
	ldr	x8, [x8, #8]
	str	x8, [sp, #56]
	cbz	x8, LBB0_18
LBB0_6:
	ldr	x2, [x19, #16]
Lloh11:
	adrp	x3, l_.str@PAGE
Lloh12:
	add	x3, x3, l_.str@PAGEOFF
	add	x0, sp, #40
	mov	x1, x19
	bl	_CG_PositionEntityOnTag
	ldr	w1, [x20, #40]
	add	x0, sp, #40
	bl	_CG_AddWeaponWithPowerups
	mov	w8, #48
	madd	x8, x21, x8, x25
	ldr	x8, [x8, #24]
	cbnz	x8, LBB0_21
; %bb.7:
Lloh13:
	adrp	x8, _WP_LIGHTNING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WP_LIGHTNING@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x21, x8
	b.eq	LBB0_10
; %bb.8:
Lloh16:
	adrp	x8, _WP_GAUNTLET@GOTPAGE
Lloh17:
	ldr	x8, [x8, _WP_GAUNTLET@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cmp	x21, x8
	b.eq	LBB0_10
; %bb.9:
Lloh19:
	adrp	x8, _WP_GRAPPLING_HOOK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _WP_GRAPPLING_HOOK@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x21, x8
	b.ne	LBB0_11
LBB0_10:
Lloh22:
	adrp	x8, _cg_entities@GOTPAGE
Lloh23:
	ldr	x8, [x8, _cg_entities@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	ldr	x9, [x20, #32]
	add	x8, x8, x9, lsl #6
	ldr	w8, [x8, #16]
Lloh25:
	adrp	x9, _EF_FIRING@GOTPAGE
Lloh26:
	ldr	x9, [x9, _EF_FIRING@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_13
LBB0_11:
	ldr	x8, [x24]
	ldr	x9, [x20]
Lloh28:
	adrp	x10, _MUZZLE_FLASH_TIME@GOTPAGE
Lloh29:
	ldr	x10, [x10, _MUZZLE_FLASH_TIME@GOTPAGEOFF]
Lloh30:
	ldr	x10, [x10]
	sub	x8, x8, x9
	cmp	x8, x10
	b.le	LBB0_13
; %bb.12:
	ldr	w8, [x20, #48]
	cbz	w8, LBB0_18
LBB0_13:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	ldr	w0, [x19, #32]
	ldr	w1, [sp, #32]
	bl	_VectorCopy
	ldr	d0, [x19, #24]
	str	d0, [sp, #24]
	b	LBB0_18
LBB0_14:
	mov	w8, #48
	madd	x8, x21, x8, x25
	ldr	x8, [x8, #8]
	str	x8, [sp, #56]
	cbz	x8, LBB0_18
; %bb.15:
Lloh31:
	adrp	x8, _qfalse@GOTPAGE
Lloh32:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	str	w8, [x20, #52]
	ldr	w8, [x20, #16]
Lloh34:
	adrp	x9, _EF_FIRING@GOTPAGE
Lloh35:
	ldr	x9, [x9, _EF_FIRING@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.16:
	mov	w8, #48
	madd	x8, x21, x8, x25
	ldr	x3, [x8, #40]
	cbz	x3, LBB0_19
; %bb.17:
	ldr	x0, [x20, #24]
	ldr	w1, [x20, #56]
Lloh37:
	adrp	x8, _vec3_origin@GOTPAGE
Lloh38:
	ldr	x8, [x8, _vec3_origin@GOTPAGEOFF]
Lloh39:
	ldr	w2, [x8]
	bl	_trap_S_AddLoopingSound
Lloh40:
	adrp	x8, _qtrue@GOTPAGE
Lloh41:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	str	w8, [x20, #52]
	b	LBB0_6
LBB0_18:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_19:
	mov	w8, #48
	madd	x8, x21, x8, x25
	ldr	x3, [x8, #32]
	cbz	x3, LBB0_6
; %bb.20:
	ldr	x0, [x20, #24]
	ldr	w1, [x20, #56]
Lloh43:
	adrp	x8, _vec3_origin@GOTPAGE
Lloh44:
	ldr	x8, [x8, _vec3_origin@GOTPAGEOFF]
Lloh45:
	ldr	w2, [x8]
	bl	_trap_S_AddLoopingSound
	b	LBB0_6
LBB0_21:
	mov	x0, sp
	mov	x1, x22
	bl	_CG_AddPlayerWeapon.cold.1
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function CG_AddPlayerWeapon.cold.1
_CG_AddPlayerWeapon.cold.1:             ; @CG_AddPlayerWeapon.cold.1
	.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
	mov	x19, x1
	mov	x20, x0
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	ldr	w0, [x19]
	ldr	w1, [x20, #32]
	bl	_VectorCopy
	brk	#0x1
	.cfi_endproc
                                        ; -- End function
	.comm	_cg_weapons,8,3                 ; @cg_weapons
	.comm	_cg,48,3                        ; @cg
	.comm	_WP_RAILGUN,8,3                 ; @WP_RAILGUN
	.comm	_WEAPON_FIRING,8,3              ; @WEAPON_FIRING
	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_EF_FIRING,4,2                  ; @EF_FIRING
	.comm	_vec3_origin,4,2                ; @vec3_origin
	.comm	_qtrue,4,2                      ; @qtrue
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tag_weapon"

	.comm	_YAW,8,3                        ; @YAW
	.comm	_PITCH,8,3                      ; @PITCH
	.comm	_ROLL,8,3                       ; @ROLL
	.comm	_cg_entities,8,3                ; @cg_entities
	.comm	_WP_LIGHTNING,8,3               ; @WP_LIGHTNING
	.comm	_WP_GAUNTLET,8,3                ; @WP_GAUNTLET
	.comm	_WP_GRAPPLING_HOOK,8,3          ; @WP_GRAPPLING_HOOK
	.comm	_MUZZLE_FLASH_TIME,8,3          ; @MUZZLE_FLASH_TIME
	.comm	_cgs,8,3                        ; @cgs
.subsections_via_symbols
