	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Sin_ParseBSPEntity             ## -- Begin function Sin_ParseBSPEntity
	.p2align	4, 0x90
_Sin_ParseBSPEntity:                    ## @Sin_ParseBSPEntity
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_entities@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movslq	%edi, %rax
	leaq	(%rax,%rax,4), %r15
	leaq	(%r14,%r15,8), %rbx
	movq	_nummapbrushes@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14,%r15,8)
	movq	$0, 24(%r14,%r15,8)
	movl	$-1, (%r14,%r15,8)
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_ValueForKey
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpb	$42, (%rax)
	jne	LBB0_3
## %bb.2:
	incq	%rax
	movq	%rax, %rdi
	callq	_atoi
	movl	%eax, (%rbx)
LBB0_3:
	movl	16(%r14,%r15,8), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_GetVectorForKey
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_ValueForKey
	leaq	L_.str.2(%rip), %rdi
	movq	%rax, %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	cmpl	$0, (%rbx)
	jns	LBB0_6
	jmp	LBB0_7
LBB0_4:
	movl	$0, (%rbx)
LBB0_6:
	movq	%rbx, %rdi
	callq	_Sin_ParseBSPBrushes
LBB0_7:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_ValueForKey
	leaq	L_.str.4(%rip), %rdi
	movq	%rax, %rsi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	_c_areaportals@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	incq	%rcx
	movq	%rcx, (%rax)
	movq	%rcx, 8(%r14,%r15,8)
LBB0_9:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_entities,8,3                   ## @entities
	.comm	_nummapbrushes,4,2              ## @nummapbrushes
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"model"

L_.str.1:                               ## @.str.1
	.asciz	"origin"

L_.str.2:                               ## @.str.2
	.asciz	"worldspawn"

L_.str.3:                               ## @.str.3
	.asciz	"classname"

L_.str.4:                               ## @.str.4
	.asciz	"func_areaportal"

	.comm	_c_areaportals,8,3              ## @c_areaportals
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Sin_ParseBSPEntity             ; -- Begin function Sin_ParseBSPEntity
	.p2align	2
_Sin_ParseBSPEntity:                    ; @Sin_ParseBSPEntity
	.cfi_startproc
; %bb.0:
	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
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _entities@GOTPAGE
Lloh1:
	ldr	x8, [x8, _entities@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
	sxtw	x21, w0
	mov	w8, #40
Lloh3:
	adrp	x9, _nummapbrushes@GOTPAGE
Lloh4:
	ldr	x9, [x9, _nummapbrushes@GOTPAGEOFF]
	smaddl	x19, w0, w8, x20
Lloh5:
	ldr	w8, [x9]
	str	w8, [x19, #32]
	str	xzr, [x19, #24]
	mov	w8, #-1
	str	w8, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ValueForKey
	cbz	x0, LBB0_3
; %bb.1:
	ldrb	w8, [x0]
	cmp	w8, #42
	b.ne	LBB0_3
; %bb.2:
	add	x0, x0, #1
	bl	_atoi
	str	w0, [x19]
LBB0_3:
	mov	w8, #40
	madd	x8, x21, x8, x20
	ldr	w2, [x8, #16]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_GetVectorForKey
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_ValueForKey
	mov	x1, x0
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_5
; %bb.4:
	ldr	w8, [x19]
	tbz	w8, #31, LBB0_6
	b	LBB0_7
LBB0_5:
	str	wzr, [x19]
LBB0_6:
	mov	x0, x19
	bl	_Sin_ParseBSPBrushes
LBB0_7:
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_ValueForKey
	mov	x1, x0
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_strcmp
	cbnz	w0, LBB0_9
; %bb.8:
Lloh18:
	adrp	x8, _c_areaportals@GOTPAGE
Lloh19:
	ldr	x8, [x8, _c_areaportals@GOTPAGEOFF]
	ldr	x9, [x8]
	add	x9, x9, #1
	str	x9, [x8]
	mov	w8, #40
	madd	x8, x21, x8, x20
	str	x9, [x8, #8]
LBB0_9:
	mov	w0, #1
	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
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_entities,8,3                   ; @entities
	.comm	_nummapbrushes,4,2              ; @nummapbrushes
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"model"

l_.str.1:                               ; @.str.1
	.asciz	"origin"

l_.str.2:                               ; @.str.2
	.asciz	"worldspawn"

l_.str.3:                               ; @.str.3
	.asciz	"classname"

l_.str.4:                               ; @.str.4
	.asciz	"func_areaportal"

	.comm	_c_areaportals,8,3              ; @c_areaportals
.subsections_via_symbols
