	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EV_Teleport                    ## -- Begin function EV_Teleport
	.p2align	4, 0x90
_EV_Teleport:                           ## @EV_Teleport
	.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
	xorl	%eax, %eax
	cmpl	$1, %esi
	je	LBB0_20
## %bb.1:
	movq	%rdx, %r13
	movq	_MF_MISSILE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rdx), %ecx
	jne	LBB0_20
## %bb.2:
	movq	_numsectors@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	testl	%r9d, %r9d
	jle	LBB0_20
## %bb.3:
	movl	(%rdi), %r8d
	movq	_sectors@GOTPCREL(%rip), %rax
	movq	(%rax), %r11
	movq	_thinkercap@GOTPCREL(%rip), %rsi
	movq	8(%rsi), %r10
	movq	_P_MobjThinker@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_MT_TELEPORTMAN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edi, %edi
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%rdi
	cmpq	%r9, %rdi
	je	LBB0_11
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	cmpl	%r8d, (%r11,%rdi,4)
	jne	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%rsi, %r10
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r10, %r14
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=2
	movq	8(%r14), %rbx
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=2
	movq	%rbx, %r14
	cmpq	%rsi, %rbx
	je	LBB0_10
LBB0_7:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rax, (%r14)
	jne	LBB0_8
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	8(%r14), %rbx
	cmpq	%rcx, %rbx
	jne	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	88(%r14), %rdx
	movq	(%rdx), %rdx
	subq	%r11, %rdx
	sarq	$2, %rdx
	cmpq	%rdi, %rdx
	jne	LBB0_9
## %bb.14:
	movq	72(%r13), %r15
	movq	56(%r13), %rbx
	movq	64(%r13), %r12
	movq	64(%r14), %rdx
	movq	72(%r14), %rsi
	movq	%r13, %rdi
	callq	_P_TeleportMove
	testl	%eax, %eax
	je	LBB0_11
## %bb.15:
	movq	48(%r13), %rax
	movq	80(%r13), %rcx
	movq	%rcx, 56(%r13)
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	addq	(%rax), %rcx
	movq	%rcx, 8(%rax)
LBB0_17:
	movq	_MT_TFOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_P_SpawnMobj
	movq	_sfx_telept@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%rax, %rdi
	callq	_S_StartSound
	movl	16(%r14), %eax
	movq	_ANGLETOFINESHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrq	%cl, %rax
	movq	_finecosine@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	(%rcx,%rax,4), %rcx
	leaq	(%rcx,%rcx,4), %rdi
	shlq	$2, %rdi
	addq	72(%r14), %rdi
	movq	_finesine@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	(%rcx,%rax,4), %rax
	leaq	(%rax,%rax,4), %rsi
	shlq	$2, %rsi
	addq	64(%r14), %rsi
	movq	56(%r13), %rdx
	movq	_MT_TFOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_P_SpawnMobj
	movl	(%rbx), %esi
	movq	%rax, %rdi
	callq	_S_StartSound
	cmpq	$0, 48(%r13)
	je	LBB0_19
## %bb.18:
	movl	$18, 20(%r13)
LBB0_19:
	movl	16(%r14), %eax
	movl	%eax, 16(%r13)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r13)
	movq	$0, 40(%r13)
	movl	$1, %eax
	jmp	LBB0_20
LBB0_11:
	xorl	%eax, %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MF_MISSILE,4,2                 ## @MF_MISSILE
	.comm	_numsectors,4,2                 ## @numsectors
	.comm	_sectors,8,3                    ## @sectors
	.comm	_thinkercap,16,3                ## @thinkercap
	.comm	_P_MobjThinker,8,3              ## @P_MobjThinker
	.comm	_MT_TELEPORTMAN,8,3             ## @MT_TELEPORTMAN
	.comm	_MT_TFOG,4,2                    ## @MT_TFOG
	.comm	_sfx_telept,4,2                 ## @sfx_telept
	.comm	_ANGLETOFINESHIFT,4,2           ## @ANGLETOFINESHIFT
	.comm	_finecosine,8,3                 ## @finecosine
	.comm	_finesine,8,3                   ## @finesine
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EV_Teleport                    ; -- Begin function EV_Teleport
	.p2align	2
_EV_Teleport:                           ; @EV_Teleport
	.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
	mov	x8, x0
	mov	w0, #0
	cmp	w1, #1
	b.eq	LBB0_19
; %bb.1:
	mov	x19, x2
	ldr	w9, [x2]
Lloh0:
	adrp	x10, _MF_MISSILE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _MF_MISSILE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	and	w9, w10, w9
	cbnz	w9, LBB0_19
; %bb.2:
Lloh3:
	adrp	x9, _numsectors@GOTPAGE
Lloh4:
	ldr	x9, [x9, _numsectors@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_18
; %bb.3:
	mov	x10, #0
	ldr	w8, [x8]
Lloh6:
	adrp	x11, _sectors@GOTPAGE
Lloh7:
	ldr	x11, [x11, _sectors@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
Lloh9:
	adrp	x12, _thinkercap@GOTPAGE
Lloh10:
	ldr	x12, [x12, _thinkercap@GOTPAGEOFF]
	ldr	x13, [x12, #8]
Lloh11:
	adrp	x14, _P_MobjThinker@GOTPAGE
Lloh12:
	ldr	x14, [x14, _P_MobjThinker@GOTPAGEOFF]
Lloh13:
	ldr	x14, [x14]
Lloh14:
	adrp	x15, _MT_TELEPORTMAN@GOTPAGE
Lloh15:
	ldr	x15, [x15, _MT_TELEPORTMAN@GOTPAGEOFF]
Lloh16:
	ldr	x15, [x15]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x10, x10, #1
	cmp	x10, x9
	b.eq	LBB0_18
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	w16, [x11, x10, lsl #2]
	cmp	w16, w8
	ccmp	x13, x12, #4, eq
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x13
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
	ldr	x16, [x23, #8]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	mov	x23, x16
	cmp	x16, x12
	b.eq	LBB0_4
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x16, [x23]
	cmp	x16, x14
	b.ne	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x16, [x23, #8]
	cmp	x16, x15
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x17, [x23, #88]
	ldr	x17, [x17]
	sub	x17, x17, x11
	cmp	x10, x17, asr #2
	b.ne	LBB0_8
; %bb.12:
	ldp	x21, x20, [x19, #64]
	ldr	x22, [x19, #56]
	ldp	x2, x1, [x23, #64]
	mov	x0, x19
	bl	_P_TeleportMove
	cbz	w0, LBB0_19
; %bb.13:
	ldr	x8, [x19, #80]
	str	x8, [x19, #56]
	ldr	x9, [x19, #48]
	cbz	x9, LBB0_15
; %bb.14:
	ldr	x10, [x9]
	add	x8, x10, x8
	str	x8, [x9, #8]
LBB0_15:
Lloh17:
	adrp	x24, _MT_TFOG@GOTPAGE
Lloh18:
	ldr	x24, [x24, _MT_TFOG@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_P_SpawnMobj
Lloh19:
	adrp	x20, _sfx_telept@GOTPAGE
Lloh20:
	ldr	x20, [x20, _sfx_telept@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_S_StartSound
	ldr	w8, [x23, #16]
Lloh21:
	adrp	x9, _ANGLETOFINESHIFT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ANGLETOFINESHIFT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	lsr	x8, x8, x9
Lloh24:
	adrp	x9, _finecosine@GOTPAGE
Lloh25:
	ldr	x9, [x9, _finecosine@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	lsl	x8, x8, #2
	ldrsw	x9, [x9, x8]
	mov	w10, #20
	ldp	x12, x11, [x23, #64]
	madd	x0, x9, x10, x11
Lloh27:
	adrp	x9, _finesine@GOTPAGE
Lloh28:
	ldr	x9, [x9, _finesine@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	ldrsw	x8, [x9, x8]
	madd	x1, x8, x10, x12
	ldr	x2, [x19, #56]
	ldr	w3, [x24]
	bl	_P_SpawnMobj
	ldr	w1, [x20]
	bl	_S_StartSound
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_17
; %bb.16:
	mov	w8, #18
	str	w8, [x19, #20]
LBB0_17:
	ldr	w8, [x23, #16]
	str	w8, [x19, #16]
	stp	xzr, xzr, [x19, #32]
	str	xzr, [x19, #24]
	mov	w0, #1
	b	LBB0_19
LBB0_18:
	mov	w0, #0
LBB0_19:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MF_MISSILE,4,2                 ; @MF_MISSILE
	.comm	_numsectors,4,2                 ; @numsectors
	.comm	_sectors,8,3                    ; @sectors
	.comm	_thinkercap,16,3                ; @thinkercap
	.comm	_P_MobjThinker,8,3              ; @P_MobjThinker
	.comm	_MT_TELEPORTMAN,8,3             ; @MT_TELEPORTMAN
	.comm	_MT_TFOG,4,2                    ; @MT_TFOG
	.comm	_sfx_telept,4,2                 ; @sfx_telept
	.comm	_ANGLETOFINESHIFT,4,2           ; @ANGLETOFINESHIFT
	.comm	_finecosine,8,3                 ; @finecosine
	.comm	_finesine,8,3                   ; @finesine
.subsections_via_symbols
