	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_P_WorldEffects                 ## -- Begin function P_WorldEffects
	.p2align	4, 0x90
_P_WorldEffects:                        ## @P_WorldEffects
	.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	32(%rdi), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_3
## %bb.1:
	movq	_level@GOTPCREL(%rip), %rcx
	movl	$12000, %edx                    ## imm = 0x2EE0
	addq	(%rcx), %rdx
	movq	%rdx, (%rax)
LBB0_2:
	addq	$8, %rsp
LBB0_21:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rdi, %rbx
	movl	(%rdi), %r15d
	movq	8(%rax), %rcx
	movq	_PW_BATTLESUIT@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %r12
	movq	_level@GOTPCREL(%rip), %rdi
	movq	(%rdi), %r13
	cmpl	$3, %r15d
	jne	LBB0_12
## %bb.4:
	cmpq	%r13, %r12
	jle	LBB0_6
## %bb.5:
	leaq	10000(%r13), %rcx
	movq	%rcx, (%rax)
	jmp	LBB0_13
LBB0_12:
	leaq	12000(%r13), %rcx
	movq	%rcx, (%rax)
	movl	$2, 8(%rbx)
	testl	%r15d, %r15d
	jne	LBB0_13
	jmp	LBB0_2
LBB0_6:
	movq	(%rax), %rcx
	cmpq	%r13, %rcx
	jge	LBB0_13
## %bb.7:
	addq	$1000, %rcx                     ## imm = 0x3E8
	movq	%rcx, (%rax)
	movl	4(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.8:
	movq	%rdi, %r14
	movl	8(%rbx), %ecx
	leal	2(%rcx), %edx
	cmpl	$14, %ecx
	movl	$15, %ecx
	cmovll	%edx, %ecx
	movl	%ecx, 8(%rbx)
	cmpl	%ecx, %eax
	jle	LBB0_9
## %bb.10:
	xorl	%eax, %eax
	callq	_rand
	testb	$1, %al
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdi
	cmoveq	%rax, %rdi
	jmp	LBB0_11
LBB0_9:
	leaq	L_.str(%rip), %rdi
LBB0_11:
	movq	_CHAN_VOICE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	callq	_G_SoundIndex
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_G_Sound
	movl	$200, %eax
	addq	(%r14), %rax
	movq	%rax, 16(%rbx)
	movl	8(%rbx), %r9d
	movq	_DAMAGE_NO_ARMOR@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_MOD_WATER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	%rax
	pushq	%r10
	callq	_G_Damage
	movq	%r14, %rdi
	addq	$16, %rsp
LBB0_13:
	movl	24(%rbx), %eax
	movq	_CONTENTS_LAVA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_CONTENTS_SLIME@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movl	%ecx, %esi
	orl	%edx, %esi
	testl	%eax, %esi
	je	LBB0_2
## %bb.14:
	cmpl	$0, 4(%rbx)
	jle	LBB0_2
## %bb.15:
	movq	16(%rbx), %rsi
	cmpq	(%rdi), %rsi
	jg	LBB0_2
## %bb.16:
	cmpq	%r13, %r12
	jle	LBB0_17
## %bb.22:
	movq	_EV_POWERUP_BATTLESUIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_G_AddEvent                     ## TAILCALL
LBB0_17:
	testl	%eax, %edx
	je	LBB0_19
## %bb.18:
	movl	%r15d, %r9d
	shll	$5, %r9d
	subl	%r15d, %r9d
	subl	%r15d, %r9d
	movq	_MOD_LAVA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	%rax
	pushq	$0
	callq	_G_Damage
	addq	$16, %rsp
	movl	24(%rbx), %eax
	movl	(%r14), %ecx
LBB0_19:
	testl	%eax, %ecx
	je	LBB0_2
## %bb.20:
	addl	%r15d, %r15d
	leal	(%r15,%r15,4), %r9d
	movq	_MOD_SLIME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	%rax
	pushq	$0
	callq	_G_Damage
	addq	$24, %rsp
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_level,8,3                      ## @level
	.comm	_PW_BATTLESUIT,8,3              ## @PW_BATTLESUIT
	.comm	_CHAN_VOICE,4,2                 ## @CHAN_VOICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"*drown.wav"

L_.str.1:                               ## @.str.1
	.asciz	"sound/player/gurp1.wav"

L_.str.2:                               ## @.str.2
	.asciz	"sound/player/gurp2.wav"

	.comm	_DAMAGE_NO_ARMOR,4,2            ## @DAMAGE_NO_ARMOR
	.comm	_MOD_WATER,4,2                  ## @MOD_WATER
	.comm	_CONTENTS_LAVA,4,2              ## @CONTENTS_LAVA
	.comm	_CONTENTS_SLIME,4,2             ## @CONTENTS_SLIME
	.comm	_EV_POWERUP_BATTLESUIT,4,2      ## @EV_POWERUP_BATTLESUIT
	.comm	_MOD_LAVA,4,2                   ## @MOD_LAVA
	.comm	_MOD_SLIME,4,2                  ## @MOD_SLIME
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_P_WorldEffects                 ; -- Begin function P_WorldEffects
	.p2align	2
_P_WorldEffects:                        ; @P_WorldEffects
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x0, #32]
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, _level@GOTPAGE
Lloh1:
	ldr	x9, [x9, _level@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	mov	w10, #12000
	add	x9, x9, x10
	str	x9, [x8]
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x19, x0
	ldr	w21, [x0]
	ldr	x9, [x8, #8]
Lloh3:
	adrp	x10, _PW_BATTLESUIT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PW_BATTLESUIT@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	ldr	x22, [x9, x10, lsl #3]
Lloh6:
	adrp	x24, _level@GOTPAGE
Lloh7:
	ldr	x24, [x24, _level@GOTPAGEOFF]
	ldr	x23, [x24]
	cmp	w21, #3
	b.ne	LBB0_6
; %bb.4:
	cmp	x22, x23
	b.le	LBB0_7
; %bb.5:
	mov	w9, #10000
	add	x9, x23, x9
	str	x9, [x8]
	b	LBB0_13
LBB0_6:
	mov	w9, #12000
	add	x9, x23, x9
	str	x9, [x8]
	mov	w8, #2
	str	w8, [x19, #8]
	cbnz	w21, LBB0_13
	b	LBB0_2
LBB0_7:
	ldr	x9, [x8]
	cmp	x9, x23
	b.ge	LBB0_13
; %bb.8:
	add	x9, x9, #1000
	str	x9, [x8]
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.9:
	ldr	w9, [x19, #8]
	add	w10, w9, #2
	mov	w11, #15
	cmp	w9, #13
	csel	w9, w11, w10, gt
	str	w9, [x19, #8]
	cmp	w8, w9
	b.le	LBB0_11
; %bb.10:
	bl	_rand
Lloh8:
	adrp	x8, l_.str.1@PAGE
Lloh9:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh10:
	adrp	x9, l_.str.2@PAGE
Lloh11:
	add	x9, x9, l_.str.2@PAGEOFF
	tst	w0, #0x1
	csel	x0, x9, x8, eq
	b	LBB0_12
LBB0_11:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
LBB0_12:
Lloh14:
	adrp	x8, _CHAN_VOICE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CHAN_VOICE@GOTPAGEOFF]
Lloh16:
	ldr	w20, [x8]
	bl	_G_SoundIndex
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_G_Sound
	ldr	x8, [x24]
	add	x8, x8, #200
	str	x8, [x19, #16]
	ldr	w5, [x19, #8]
Lloh17:
	adrp	x8, _DAMAGE_NO_ARMOR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DAMAGE_NO_ARMOR@GOTPAGEOFF]
Lloh19:
	ldr	w6, [x8]
Lloh20:
	adrp	x8, _MOD_WATER@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MOD_WATER@GOTPAGEOFF]
Lloh22:
	ldr	w7, [x8]
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	bl	_G_Damage
LBB0_13:
	ldr	w8, [x19, #24]
Lloh23:
	adrp	x9, _CONTENTS_LAVA@GOTPAGE
Lloh24:
	ldr	x9, [x9, _CONTENTS_LAVA@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x9]
Lloh26:
	adrp	x20, _CONTENTS_SLIME@GOTPAGE
Lloh27:
	ldr	x20, [x20, _CONTENTS_SLIME@GOTPAGEOFF]
	ldr	w9, [x20]
	orr	w11, w9, w10
	tst	w11, w8
	b.eq	LBB0_2
; %bb.14:
	ldr	w11, [x19, #4]
	cmp	w11, #1
	b.lt	LBB0_2
; %bb.15:
	ldr	x11, [x19, #16]
	ldr	x12, [x24]
	cmp	x11, x12
	b.gt	LBB0_2
; %bb.16:
	cmp	x22, x23
	b.le	LBB0_18
; %bb.17:
Lloh28:
	adrp	x8, _EV_POWERUP_BATTLESUIT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EV_POWERUP_BATTLESUIT@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_G_AddEvent
LBB0_18:
	tst	w10, w8
	b.eq	LBB0_20
; %bb.19:
	mov	w8, #30
	mul	w5, w21, w8
Lloh31:
	adrp	x8, _MOD_LAVA@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MOD_LAVA@GOTPAGEOFF]
Lloh33:
	ldr	w7, [x8]
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	mov	w6, #0
	bl	_G_Damage
	ldr	w8, [x19, #24]
	ldr	w9, [x20]
LBB0_20:
	tst	w9, w8
	b.eq	LBB0_2
; %bb.21:
	add	w8, w21, w21, lsl #2
	lsl	w5, w8, #1
Lloh34:
	adrp	x8, _MOD_SLIME@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MOD_SLIME@GOTPAGEOFF]
Lloh36:
	ldr	w7, [x8]
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	mov	w6, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_G_Damage
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_level,8,3                      ; @level
	.comm	_PW_BATTLESUIT,8,3              ; @PW_BATTLESUIT
	.comm	_CHAN_VOICE,4,2                 ; @CHAN_VOICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"*drown.wav"

l_.str.1:                               ; @.str.1
	.asciz	"sound/player/gurp1.wav"

l_.str.2:                               ; @.str.2
	.asciz	"sound/player/gurp2.wav"

	.comm	_DAMAGE_NO_ARMOR,4,2            ; @DAMAGE_NO_ARMOR
	.comm	_MOD_WATER,4,2                  ; @MOD_WATER
	.comm	_CONTENTS_LAVA,4,2              ; @CONTENTS_LAVA
	.comm	_CONTENTS_SLIME,4,2             ; @CONTENTS_SLIME
	.comm	_EV_POWERUP_BATTLESUIT,4,2      ; @EV_POWERUP_BATTLESUIT
	.comm	_MOD_LAVA,4,2                   ; @MOD_LAVA
	.comm	_MOD_SLIME,4,2                  ; @MOD_SLIME
.subsections_via_symbols
