	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_P_CheckSight                   ## -- Begin function P_CheckSight
	.p2align	4, 0x90
_P_CheckSight:                          ## @P_CheckSight
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	32(%rdi), %rax
	movl	(%rax), %eax
	movq	_sectors@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	subl	%ecx, %eax
	movq	_numsectors@GOTPCREL(%rip), %rdx
	imull	(%rdx), %eax
	movq	32(%rsi), %rdx
	movl	(%rdx), %edx
	subl	%ecx, %edx
	addl	%edx, %eax
	movl	%eax, %ecx
	sarl	$3, %ecx
	andb	$7, %al
	movq	_rejectmatrix@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movslq	%ecx, %rcx
	movl	(%rdx,%rcx,4), %ecx
	movzbl	%al, %eax
	btl	%eax, %ecx
	movq	_sightcounts@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jae	LBB0_2
## %bb.1:
	incl	(%rax)
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_2:
	incl	4(%rax)
	movq	_validcount@GOTPCREL(%rip), %rax
	incl	(%rax)
	movslq	8(%rdi), %rax
	movq	%rax, %rcx
	addq	(%rdi), %rcx
	sarl	$2, %eax
	negl	%eax
	cltq
	addq	%rcx, %rax
	movq	_sightzstart@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movslq	8(%rsi), %rcx
	addq	(%rsi), %rcx
	subq	%rax, %rcx
	movq	_topslope@GOTPCREL(%rip), %rdx
	movq	%rcx, (%rdx)
	movq	(%rsi), %rcx
	subq	%rax, %rcx
	movq	_bottomslope@GOTPCREL(%rip), %rax
	movq	%rcx, (%rax)
	movq	24(%rdi), %rax
	movq	_strace@GOTPCREL(%rip), %r8
	movq	%rax, 24(%r8)
	movq	16(%rdi), %rdx
	movq	%rdx, 16(%r8)
	movq	24(%rsi), %rdi
	movq	_t2x@GOTPCREL(%rip), %rcx
	movq	%rdi, (%rcx)
	movq	16(%rsi), %rcx
	movq	_t2y@GOTPCREL(%rip), %rsi
	movq	%rcx, (%rsi)
	subq	%rax, %rdi
	movq	%rdi, 8(%r8)
	subq	%rdx, %rcx
	movq	%rcx, (%r8)
	movq	_numnodes@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	decq	%rdi
	popq	%rbp
	jmp	_P_CrossBSPNode                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_sectors,4,2                    ## @sectors
	.comm	_numsectors,4,2                 ## @numsectors
	.comm	_rejectmatrix,8,3               ## @rejectmatrix
	.comm	_sightcounts,8,3                ## @sightcounts
	.comm	_validcount,4,2                 ## @validcount
	.comm	_sightzstart,8,3                ## @sightzstart
	.comm	_topslope,8,3                   ## @topslope
	.comm	_bottomslope,8,3                ## @bottomslope
	.comm	_strace,32,3                    ## @strace
	.comm	_t2x,8,3                        ## @t2x
	.comm	_t2y,8,3                        ## @t2y
	.comm	_numnodes,8,3                   ## @numnodes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_P_CheckSight                   ; -- Begin function P_CheckSight
	.p2align	2
_P_CheckSight:                          ; @P_CheckSight
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0, #32]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _sectors@GOTPAGE
Lloh1:
	ldr	x9, [x9, _sectors@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sub	w8, w8, w9
	ldr	x10, [x1, #32]
	ldr	w10, [x10]
	sub	w9, w10, w9
Lloh3:
	adrp	x10, _numsectors@GOTPAGE
Lloh4:
	ldr	x10, [x10, _numsectors@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	madd	w8, w10, w8, w9
	asr	w9, w8, #3
	and	w10, w8, #0x7
Lloh6:
	adrp	x8, _rejectmatrix@GOTPAGE
Lloh7:
	ldr	x8, [x8, _rejectmatrix@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w9, [x8, w9, sxtw #2]
Lloh9:
	adrp	x8, _sightcounts@GOTPAGE
Lloh10:
	ldr	x8, [x8, _sightcounts@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	lsr	w9, w9, w10
	tbz	w9, #0, LBB0_2
; %bb.1:
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	mov	w0, #0
	ret
LBB0_2:
	ldr	w9, [x8, #4]
	add	w9, w9, #1
	str	w9, [x8, #4]
Lloh12:
	adrp	x8, _validcount@GOTPAGE
Lloh13:
	ldr	x8, [x8, _validcount@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldr	x8, [x0]
	ldrsw	x9, [x0, #8]
	add	x8, x8, x9
	neg	w9, w9, asr #2
	add	x8, x8, w9, sxtw
Lloh14:
	adrp	x9, _sightzstart@GOTPAGE
Lloh15:
	ldr	x9, [x9, _sightzstart@GOTPAGEOFF]
Lloh16:
	str	x8, [x9]
	ldr	x9, [x1]
	ldrsw	x10, [x1, #8]
Lloh17:
	adrp	x11, _topslope@GOTPAGE
Lloh18:
	ldr	x11, [x11, _topslope@GOTPAGEOFF]
	add	x9, x9, x10
	sub	x9, x9, x8
Lloh19:
	str	x9, [x11]
	ldr	x9, [x1]
	sub	x8, x9, x8
Lloh20:
	adrp	x9, _bottomslope@GOTPAGE
Lloh21:
	ldr	x9, [x9, _bottomslope@GOTPAGEOFF]
Lloh22:
	str	x8, [x9]
Lloh23:
	adrp	x8, _strace@GOTPAGE
Lloh24:
	ldr	x8, [x8, _strace@GOTPAGEOFF]
	ldp	x10, x9, [x0, #16]
	stp	x10, x9, [x8, #16]
Lloh25:
	adrp	x11, _t2x@GOTPAGE
Lloh26:
	ldr	x11, [x11, _t2x@GOTPAGEOFF]
	ldp	x13, x12, [x1, #16]
Lloh27:
	str	x12, [x11]
Lloh28:
	adrp	x11, _t2y@GOTPAGE
Lloh29:
	ldr	x11, [x11, _t2y@GOTPAGEOFF]
Lloh30:
	str	x13, [x11]
	sub	x9, x12, x9
	sub	x10, x13, x10
	stp	x10, x9, [x8]
Lloh31:
	adrp	x8, _numnodes@GOTPAGE
Lloh32:
	ldr	x8, [x8, _numnodes@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	sub	x0, x8, #1
	b	_P_CrossBSPNode
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotStr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotStr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_sectors,4,2                    ; @sectors
	.comm	_numsectors,4,2                 ; @numsectors
	.comm	_rejectmatrix,8,3               ; @rejectmatrix
	.comm	_sightcounts,8,3                ; @sightcounts
	.comm	_validcount,4,2                 ; @validcount
	.comm	_sightzstart,8,3                ; @sightzstart
	.comm	_topslope,8,3                   ; @topslope
	.comm	_bottomslope,8,3                ; @bottomslope
	.comm	_strace,32,3                    ; @strace
	.comm	_t2x,8,3                        ; @t2x
	.comm	_t2y,8,3                        ; @t2y
	.comm	_numnodes,8,3                   ; @numnodes
.subsections_via_symbols
