	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EV_DoCeiling                   ## -- Begin function EV_DoCeiling
	.p2align	4, 0x90
_EV_DoCeiling:                          ## @EV_DoCeiling
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %r15
	movq	%rsi, %rax
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	leal	-128(%rsi), %ecx
	movq	%rcx, %rax
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	cmpl	$5, %ecx
	ja	LBB0_3
## %bb.1:
	movl	$49, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	btl	%ecx, %eax
	jae	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_P_ActivateInStasisCeiling
LBB0_3:
	movl	$-1, %ebx
	xorl	%r12d, %r12d
	movq	_sectors@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_P_FindSectorFromLineTag
	testl	%eax, %eax
	js	LBB0_17
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %ebx
	movq	(%r14), %r13
	movl	%eax, %eax
	leaq	(%rax,%rax,2), %rcx
	cmpq	$0, 16(%r13,%rcx,8)
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	16(,%rcx,8), %rcx
	addq	%r13, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rax,2), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r13,%rax,8), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	_PU_LEVSPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	xorl	%edx, %edx
	callq	_Z_Malloc
	movq	%rax, %r12
	leaq	40(%rax), %rdi
	callq	_P_AddThinker
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, (%rax)
	movq	_T_MoveCeiling@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r12)
	movq	%rdi, 32(%r12)
	movl	$0, (%r12)
	cmpl	$5, -48(%rbp)                   ## 4-byte Folded Reload
	ja	LBB0_16
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, (%r12)
	movl	8(%r13,%rdx,8), %eax
	movl	%eax, 24(%r12)
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	(%rdi), %eax
	movl	%eax, 4(%r12)
	cmpl	$130, -64(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_FRACUNIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	(%rax,%rcx,8), %eax
	movl	%eax, 4(%r12)
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	$-1, 8(%r12)
	jmp	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	callq	_P_FindHighestCeilingSurrounding
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, 24(%r12)
	movl	$1, 8(%r12)
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_CEILSPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, 12(%r12)
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%r13,%rdx,8), %eax
	movl	%eax, 20(%r12)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, 16(%r12)
	movq	%r12, %rdi
	callq	_P_AddActiveCeiling
	movl	$1, %r12d
	jmp	LBB0_4
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, (%r12)
	movl	8(%r13,%rdx,8), %eax
	movl	%eax, 24(%r12)
	movq	_FRACUNIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$3, %eax
	addl	(%rdi), %eax
	movl	%eax, 4(%r12)
	movl	$-1, 8(%r12)
	movq	_CEILSPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	jmp	LBB0_15
LBB0_17:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_13
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_8
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.comm	_sectors,8,3                    ## @sectors
	.comm	_PU_LEVSPEC,4,2                 ## @PU_LEVSPEC
	.comm	_T_MoveCeiling,8,3              ## @T_MoveCeiling
	.comm	_FRACUNIT,4,2                   ## @FRACUNIT
	.comm	_CEILSPEED,4,2                  ## @CEILSPEED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EV_DoCeiling                   ; -- Begin function EV_DoCeiling
	.p2align	2
_EV_DoCeiling:                          ; @EV_DoCeiling
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	str	w1, [sp, #12]                   ; 4-byte Folded Spill
	sub	w24, w1, #128
	cmp	w24, #5
	b.hi	LBB0_3
; %bb.1:
	mov	w8, #1
	lsl	w8, w8, w24
	mov	w9, #49
	tst	w8, w9
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_P_ActivateInStasisCeiling
LBB0_3:
	mov	w22, #0
Lloh0:
	adrp	x26, _sectors@GOTPAGE
Lloh1:
	ldr	x26, [x26, _sectors@GOTPAGEOFF]
	mov	w27, #24
	mov	w21, #-1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_P_FindSectorFromLineTag
	tbnz	w0, #31, LBB0_17
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x0
	ldr	x28, [x26]
	umaddl	x19, w0, w27, x28
	mov	x23, x19
	ldr	x8, [x23, #16]!
	cbnz	x8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w25, w21
Lloh2:
	adrp	x8, _PU_LEVSPEC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PU_LEVSPEC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #48
	mov	w2, #0
	bl	_Z_Malloc
	mov	x22, x0
	add	x0, x0, #40
	bl	_P_AddThinker
	str	x22, [x23]
Lloh5:
	adrp	x8, _T_MoveCeiling@GOTPAGE
Lloh6:
	ldr	x8, [x8, _T_MoveCeiling@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	stp	x19, x8, [x22, #32]
	str	wzr, [x22]
	cmp	w24, #5
	b.hi	LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh8:
	adrp	x10, lJTI0_0@PAGE
Lloh9:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x8, LBB0_8
	ldrb	w9, [x10, x24]
	add	x8, x8, x9, lsl #2
	br	x8
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #1
	str	w8, [x22]
	madd	x8, x25, x27, x28
	ldr	w8, [x8, #8]
	str	w8, [x22, #24]
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	str	w8, [x22, #4]
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w9, #130
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh10:
	adrp	x9, _FRACUNIT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _FRACUNIT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	add	w8, w8, w9, lsl #3
	str	w8, [x22, #4]
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #-1
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_P_FindHighestCeilingSurrounding
	str	w0, [x22, #24]
	mov	w8, #1
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w8, [x22, #8]
Lloh13:
	adrp	x8, _CEILSPEED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CEILSPEED@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w8, [x22, #12]
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	madd	x8, x25, x27, x28
	ldr	w9, [x8, #4]
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	stp	w8, w9, [x22, #16]
	mov	x0, x22
	bl	_P_AddActiveCeiling
	mov	w22, #1
	b	LBB0_4
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #1
	str	w8, [x22]
	madd	x8, x25, x27, x28
	ldr	w8, [x8, #8]
	str	w8, [x22, #24]
	ldr	w8, [x19]
Lloh16:
	adrp	x9, _FRACUNIT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _FRACUNIT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	add	w10, w8, w9, lsl #3
	mov	w8, #-1
	stp	w10, w8, [x22, #4]
Lloh19:
	adrp	x8, _CEILSPEED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CEILSPEED@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	lsl	w8, w8, #1
	b	LBB0_14
LBB0_17:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_12-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_16-LBB0_8)>>2
	.byte	(LBB0_8-LBB0_8)>>2
                                        ; -- End function
	.comm	_sectors,8,3                    ; @sectors
	.comm	_PU_LEVSPEC,4,2                 ; @PU_LEVSPEC
	.comm	_T_MoveCeiling,8,3              ; @T_MoveCeiling
	.comm	_FRACUNIT,4,2                   ; @FRACUNIT
	.comm	_CEILSPEED,4,2                  ; @CEILSPEED
.subsections_via_symbols
