	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_CopyMapBrush               ## -- Begin function AAS_CopyMapBrush
	.p2align	4, 0x90
_AAS_CopyMapBrush:                      ## @AAS_CopyMapBrush
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_nummapbrushes@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movq	_MAX_MAPFILE_BRUSHES@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jb	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movq	(%r15), %rcx
LBB0_2:
	movq	_mapbrushes@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	(%rcx,%rcx,4), %rsi
	movq	_brushsides@GOTPCREL(%rip), %rdi
	movq	_nummapbrushsides@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	leaq	(%rax,%rax,4), %rax
	shlq	$3, %rax
	addq	(%rdi), %rax
	movq	%rax, 8(%rdx,%rsi,8)
	movl	32(%rbx), %edi
	movl	%edi, 32(%rdx,%rsi,8)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	subq	8(%r14), %rcx
	leaq	(%rdx,%rsi,8), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rcx, 24(%rdx,%rsi,8)
	movl	(%rbx), %ecx
	movl	%ecx, (%rdx,%rsi,8)
	movl	16(%rbx), %ecx
	movl	%ecx, 16(%rdx,%rsi,8)
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.3:
	leaq	(%rdx,%rsi,8), %rdx
	addq	$8, %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rdx
	movl	$16, %r14d
	xorl	%r12d, %r12d
	movq	_MAX_MAPFILE_BRUSHSIDES@GOTPCREL(%rip), %r15
	xorps	%xmm1, %xmm1
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rbx), %rsi
	movups	%xmm1, 8(%rax,%r14)
	movl	(%rsi,%r14), %edi
	movl	%edi, (%rax,%r14)
	movups	-16(%rsi,%r14), %xmm0
	movups	%xmm0, -16(%rax,%r14)
	incq	%rdx
	movq	%rdx, (%r13)
	incq	%r12
	movslq	%ecx, %rsi
	addq	$40, %r14
	cmpq	%rsi, %r12
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%r15), %rdx
	jb	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	_Error
	xorps	%xmm1, %xmm1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%r13), %rdx
	movl	(%rbx), %ecx
	jmp	LBB0_6
LBB0_7:
	movq	_nummapbrushes@GOTPCREL(%rip), %rax
	incq	(%rax)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incl	(%rax)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nummapbrushes,8,3              ## @nummapbrushes
	.comm	_MAX_MAPFILE_BRUSHES,8,3        ## @MAX_MAPFILE_BRUSHES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAX_MAPFILE_BRUSHES"

	.comm	_mapbrushes,8,3                 ## @mapbrushes
	.comm	_brushsides,8,3                 ## @brushsides
	.comm	_nummapbrushsides,8,3           ## @nummapbrushsides
	.comm	_MAX_MAPFILE_BRUSHSIDES,8,3     ## @MAX_MAPFILE_BRUSHSIDES
L_.str.1:                               ## @.str.1
	.asciz	"MAX_MAPFILE_BRUSHSIDES"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_CopyMapBrush               ; -- Begin function AAS_CopyMapBrush
	.p2align	2
_AAS_CopyMapBrush:                      ; @AAS_CopyMapBrush
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _nummapbrushes@GOTPAGE
Lloh1:
	ldr	x23, [x23, _nummapbrushes@GOTPAGEOFF]
	ldr	x9, [x23]
Lloh2:
	adrp	x8, _MAX_MAPFILE_BRUSHES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_MAPFILE_BRUSHES@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x9, x8
	b.lo	LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	x9, [x23]
LBB0_2:
Lloh7:
	adrp	x8, _mapbrushes@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mapbrushes@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	mov	w10, #40
	madd	x21, x9, x10, x8
Lloh10:
	adrp	x8, _brushsides@GOTPAGE
Lloh11:
	ldr	x8, [x8, _brushsides@GOTPAGEOFF]
Lloh12:
	adrp	x24, _nummapbrushsides@GOTPAGE
Lloh13:
	ldr	x24, [x24, _nummapbrushsides@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	x11, [x24]
	madd	x8, x11, x10, x8
	mov	x25, x21
	str	x8, [x25, #8]!
	ldr	w10, [x20, #32]
	str	w10, [x21, #32]
	ldr	x10, [x19, #8]
	sub	x9, x9, x10
	str	x9, [x21, #24]
	ldr	w9, [x20]
	str	w9, [x21]
	ldr	w9, [x20, #16]
	str	w9, [x21, #16]
	ldr	w9, [x20]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x26, #0
	mov	x27, #0
	ldr	x10, [x24]
Lloh15:
	adrp	x28, _MAX_MAPFILE_BRUSHSIDES@GOTPAGE
Lloh16:
	ldr	x28, [x28, _MAX_MAPFILE_BRUSHSIDES@GOTPAGEOFF]
Lloh17:
	adrp	x22, l_.str.1@PAGE
Lloh18:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x11, [x20, #8]
	add	x11, x11, x26
	add	x12, x8, x26
	stp	xzr, xzr, [x12, #24]
	ldr	w13, [x11, #16]
	str	w13, [x12, #16]
	ldr	q0, [x11]
	str	q0, [x12]
	add	x10, x10, #1
	str	x10, [x24]
	add	x27, x27, #1
	add	x26, x26, #40
	cmp	x27, w9, sxtw
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x28]
	cmp	x10, x11
	b.lo	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_Error
	ldr	x8, [x25]
	ldr	x10, [x24]
	ldr	w9, [x20]
	b	LBB0_4
LBB0_7:
	ldr	x8, [x23]
	add	x8, x8, #1
	str	x8, [x23]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_nummapbrushes,8,3              ; @nummapbrushes
	.comm	_MAX_MAPFILE_BRUSHES,8,3        ; @MAX_MAPFILE_BRUSHES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAX_MAPFILE_BRUSHES"

	.comm	_mapbrushes,8,3                 ; @mapbrushes
	.comm	_brushsides,8,3                 ; @brushsides
	.comm	_nummapbrushsides,8,3           ; @nummapbrushsides
	.comm	_MAX_MAPFILE_BRUSHSIDES,8,3     ; @MAX_MAPFILE_BRUSHSIDES
l_.str.1:                               ; @.str.1
	.asciz	"MAX_MAPFILE_BRUSHSIDES"

.subsections_via_symbols
