	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CM_AdjustAreaPortalState       ## -- Begin function CM_AdjustAreaPortalState
	.p2align	4, 0x90
_CM_AdjustAreaPortalState:              ## @CM_AdjustAreaPortalState
	.cfi_startproc
## %bb.0:
	movl	%esi, %eax
	orl	%edi, %eax
	js	LBB0_9
## %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	_cm@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	cmpl	%edi, %eax
	jle	LBB0_3
## %bb.2:
	cmpl	%r14d, %eax
	jg	LBB0_4
LBB0_3:
	movq	_ERR_DROP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_Com_Error
LBB0_4:
	movl	(%r12), %eax
	movl	%eax, %edx
	imull	%ebx, %edx
	addl	%r14d, %edx
	movq	8(%r12), %rcx
	movslq	%edx, %rdx
	movq	(%rcx,%rdx,8), %rsi
	testq	%r15, %r15
	je	LBB0_6
## %bb.5:
	incq	%rsi
	movq	%rsi, (%rcx,%rdx,8)
	imull	%r14d, %eax
	addl	%ebx, %eax
	cltq
	incq	(%rcx,%rax,8)
	jmp	LBB0_8
LBB0_9:
	retq
LBB0_6:
	decq	%rsi
	movq	%rsi, (%rcx,%rdx,8)
	imull	%r14d, %eax
	addl	%ebx, %eax
	cltq
	movq	(%rcx,%rax,8), %rdx
	leaq	-1(%rdx), %rsi
	movq	%rsi, (%rcx,%rax,8)
	testq	%rdx, %rdx
	jg	LBB0_8
## %bb.7:
	movq	_ERR_DROP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_Com_Error
LBB0_8:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CM_FloodAreaConnections        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cm,16,3                        ## @cm
	.comm	_ERR_DROP,4,2                   ## @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CM_ChangeAreaPortalState: bad area number"

L_.str.1:                               ## @.str.1
	.asciz	"CM_AdjustAreaPortalState: negative reference count"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CM_AdjustAreaPortalState       ; -- Begin function CM_AdjustAreaPortalState
	.p2align	2
_CM_AdjustAreaPortalState:              ; @CM_AdjustAreaPortalState
	.cfi_startproc
; %bb.0:
	orr	w8, w1, w0
	tbnz	w8, #31, LBB0_5
; %bb.1:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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_remember_state
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _cm@GOTPAGE
Lloh1:
	ldr	x22, [x22, _cm@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, w0
	ccmp	w8, w1, #4, gt
	b.gt	LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _ERR_DROP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERR_DROP@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_Com_Error
LBB0_3:
	ldr	x8, [x22, #8]
	ldr	w9, [x22]
	madd	w11, w9, w20, w19
	sxtw	x10, w11
	ldr	x11, [x8, w11, sxtw #3]
	cbz	x21, LBB0_6
; %bb.4:
	add	x11, x11, #1
	str	x11, [x8, x10, lsl #3]
	madd	w9, w9, w19, w20
	sbfiz	x9, x9, #3, #32
	ldr	x10, [x8, x9]
	add	x10, x10, #1
	str	x10, [x8, x9]
	b	LBB0_8
LBB0_5:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	ret
LBB0_6:
	.cfi_restore_state
	sub	x11, x11, #1
	str	x11, [x8, x10, lsl #3]
	madd	w9, w9, w19, w20
	sbfiz	x9, x9, #3, #32
	ldr	x10, [x8, x9]
	sub	x11, x10, #1
	str	x11, [x8, x9]
	cmp	x10, #0
	b.gt	LBB0_8
; %bb.7:
Lloh7:
	adrp	x8, _ERR_DROP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERR_DROP@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_Com_Error
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_CM_FloodAreaConnections
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_cm,16,3                        ; @cm
	.comm	_ERR_DROP,4,2                   ; @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CM_ChangeAreaPortalState: bad area number"

l_.str.1:                               ; @.str.1
	.asciz	"CM_AdjustAreaPortalState: negative reference count"

.subsections_via_symbols
