	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Weapon_LightningFire           ## -- Begin function Weapon_LightningFire
	.p2align	4, 0x90
_Weapon_LightningFire:                  ## @Weapon_LightningFire
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_s_quadFactor@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	(%rdi), %ebx
	movq	_muzzle@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_LIGHTNING_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_forward@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_VectorMA
	movl	(%r15), %esi
	movq	_MASK_SHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	leaq	-56(%rbp), %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	%ebx, %r9d
	pushq	%rax
	callq	_trap_Trace
	addq	$16, %rsp
	movslq	-56(%rbp), %rax
	movq	_ENTITYNUM_NONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_9
## %bb.1:
	movq	_g_entities@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	leaq	(%rax,%rax,4), %r13
	cmpq	$0, 32(%rbx,%r13,8)
	je	LBB0_7
## %bb.2:
	shll	$3, %r14d
	leaq	(%rbx,%r13,8), %r15
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_LogAccuracyHit
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	24(%r12), %rax
	incl	8(%rax)
LBB0_4:
	movq	_forward@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	-44(%rbp), %r8d
	movq	_MOD_LIGHTNING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r12, %rdx
	movl	%r14d, %r9d
	pushq	%rax
	pushq	$0
	callq	_G_Damage
	addq	$16, %rsp
	cmpq	$0, 32(%r15)
	je	LBB0_7
## %bb.5:
	cmpq	$0, 24(%rbx,%r13,8)
	je	LBB0_7
## %bb.6:
	movl	-44(%rbp), %edi
	movq	_EV_MISSILE_HIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_G_TempEntity
	movq	%rax, %rbx
	movl	(%r15), %eax
	movl	%eax, 4(%rbx)
	movl	-48(%rbp), %edi
	callq	_DirToByte
	movq	%rax, 8(%rbx)
	movl	16(%r12), %eax
	movl	%eax, 16(%rbx)
	jmp	LBB0_9
LBB0_7:
	movq	_SURF_NOIMPACT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -52(%rbp)
	jne	LBB0_9
## %bb.8:
	movl	-44(%rbp), %edi
	movq	_EV_MISSILE_MISS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_G_TempEntity
	movq	%rax, %rbx
	movl	-48(%rbp), %edi
	callq	_DirToByte
	movq	%rax, 8(%rbx)
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_s_quadFactor,4,2               ## @s_quadFactor
	.comm	_muzzle,4,2                     ## @muzzle
	.comm	_LIGHTNING_RANGE,4,2            ## @LIGHTNING_RANGE
	.comm	_forward,4,2                    ## @forward
	.comm	_MASK_SHOT,4,2                  ## @MASK_SHOT
	.comm	_ENTITYNUM_NONE,4,2             ## @ENTITYNUM_NONE
	.comm	_g_entities,8,3                 ## @g_entities
	.comm	_MOD_LIGHTNING,4,2              ## @MOD_LIGHTNING
	.comm	_EV_MISSILE_HIT,4,2             ## @EV_MISSILE_HIT
	.comm	_SURF_NOIMPACT,4,2              ## @SURF_NOIMPACT
	.comm	_EV_MISSILE_MISS,4,2            ## @EV_MISSILE_MISS
	.comm	_EV_LIGHTNINGBOLT,4,2           ## @EV_LIGHTNINGBOLT
	.comm	_level,8,3                      ## @level
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Weapon_LightningFire           ; -- Begin function Weapon_LightningFire
	.p2align	2
_Weapon_LightningFire:                  ; @Weapon_LightningFire
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
Lloh0:
	adrp	x8, _s_quadFactor@GOTPAGE
Lloh1:
	ldr	x8, [x8, _s_quadFactor@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldr	w20, [x0]
Lloh3:
	adrp	x23, _muzzle@GOTPAGE
Lloh4:
	ldr	x23, [x23, _muzzle@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh5:
	adrp	x8, _LIGHTNING_RANGE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LIGHTNING_RANGE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x22, _forward@GOTPAGE
Lloh9:
	ldr	x22, [x22, _forward@GOTPAGEOFF]
	ldr	w2, [x22]
	bl	_VectorMA
	ldr	w1, [x23]
Lloh10:
	adrp	x8, _MASK_SHOT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MASK_SHOT@GOTPAGEOFF]
Lloh12:
	ldr	w6, [x8]
	mov	x0, sp
	mov	x2, #0
	mov	x3, #0
	mov	x5, x20
	bl	_trap_Trace
	ldrsw	x23, [sp]
Lloh13:
	adrp	x8, _ENTITYNUM_NONE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENTITYNUM_NONE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w23, w8
	b.eq	LBB0_9
; %bb.1:
Lloh16:
	adrp	x8, _g_entities@GOTPAGE
Lloh17:
	ldr	x8, [x8, _g_entities@GOTPAGEOFF]
Lloh18:
	ldr	x24, [x8]
	mov	w8, #40
	madd	x20, x23, x8, x24
	mov	x25, x20
	ldr	x8, [x25, #32]!
	cbz	x8, LBB0_7
; %bb.2:
	lsl	w21, w21, #3
	mov	x0, x20
	mov	x1, x19
	bl	_LogAccuracyHit
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x19, #24]
	ldr	w9, [x8, #8]
	add	w9, w9, #1
	str	w9, [x8, #8]
LBB0_4:
	ldr	w3, [x22]
	ldr	w4, [sp, #12]
Lloh19:
	adrp	x8, _MOD_LIGHTNING@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MOD_LIGHTNING@GOTPAGEOFF]
Lloh21:
	ldr	w7, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x19
	mov	x5, x21
	mov	w6, #0
	bl	_G_Damage
	ldr	x8, [x25]
	cbz	x8, LBB0_7
; %bb.5:
	mov	w8, #40
	madd	x8, x23, x8, x24
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w0, [sp, #12]
Lloh22:
	adrp	x8, _EV_MISSILE_HIT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EV_MISSILE_HIT@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_G_TempEntity
	mov	x21, x0
	ldr	w8, [x20]
	str	w8, [x0, #4]
	ldr	w0, [sp, #8]
	bl	_DirToByte
	str	x0, [x21, #8]
	ldr	w8, [x19, #16]
	str	w8, [x21, #16]
	b	LBB0_9
LBB0_7:
	ldr	w8, [sp, #4]
Lloh25:
	adrp	x9, _SURF_NOIMPACT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _SURF_NOIMPACT@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_9
; %bb.8:
	ldr	w0, [sp, #12]
Lloh28:
	adrp	x8, _EV_MISSILE_MISS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EV_MISSILE_MISS@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	bl	_G_TempEntity
	mov	x19, x0
	ldr	w0, [sp, #8]
	bl	_DirToByte
	str	x0, [x19, #8]
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_s_quadFactor,4,2               ; @s_quadFactor
	.comm	_muzzle,4,2                     ; @muzzle
	.comm	_LIGHTNING_RANGE,4,2            ; @LIGHTNING_RANGE
	.comm	_forward,4,2                    ; @forward
	.comm	_MASK_SHOT,4,2                  ; @MASK_SHOT
	.comm	_ENTITYNUM_NONE,4,2             ; @ENTITYNUM_NONE
	.comm	_g_entities,8,3                 ; @g_entities
	.comm	_MOD_LIGHTNING,4,2              ; @MOD_LIGHTNING
	.comm	_EV_MISSILE_HIT,4,2             ; @EV_MISSILE_HIT
	.comm	_SURF_NOIMPACT,4,2              ; @SURF_NOIMPACT
	.comm	_EV_MISSILE_MISS,4,2            ; @EV_MISSILE_MISS
	.comm	_EV_LIGHTNINGBOLT,4,2           ; @EV_LIGHTNINGBOLT
	.comm	_level,8,3                      ; @level
.subsections_via_symbols
