	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function LoadAlphaMap
LCPI0_0:
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_LoadAlphaMap
	.p2align	4, 0x90
_LoadAlphaMap:                          ## @LoadAlphaMap
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, %rdi
	callq	_assert
	movq	%rbx, -200(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_assert
	movq	%r12, %rdi
	callq	_assert
	movq	_mapent@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_ValueForKey
	movq	%rax, %rdi
	callq	_atoi
	movl	%eax, %r13d
	testl	%eax, %eax
	jg	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_Error
LBB0_2:
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_ValueForKey
	movq	%rax, %rbx
	cmpb	$0, (%rax)
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_Error
LBB0_4:
	leaq	-176(%rbp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ExtractFileExtension
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_Q_stricmp
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_ExpandGamePath
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.15:
	leaq	-192(%rbp), %rsi
	leaq	-184(%rbp), %rcx
	leaq	-180(%rbp), %r8
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_Load256Image
	movl	-180(%rbp), %esi
	imull	-184(%rbp), %esi
	testl	%esi, %esi
	jle	LBB0_40
## %bb.16:
	movq	-192(%rbp), %rax
	leal	-1(%r13), %ecx
	movl	%esi, %edx
	cmpl	$8, %esi
	jae	LBB0_18
## %bb.17:
	xorl	%esi, %esi
	jmp	LBB0_37
LBB0_5:
	leaq	-208(%rbp), %rsi
	leaq	-184(%rbp), %rdx
	leaq	-180(%rbp), %rcx
	movl	%eax, %edi
	callq	_Load32BitImage
	movl	-180(%rbp), %ebx
	imull	-184(%rbp), %ebx
	movl	%ebx, %edi
	callq	_malloc
	movq	%rax, -192(%rbp)
	testl	%ebx, %ebx
	jle	LBB0_40
## %bb.6:
	movq	-208(%rbp), %rcx
	leal	-1(%r13), %edx
	movl	%ebx, %r10d
	xorl	%edi, %edi
	cmpl	$8, %ebx
	jb	LBB0_11
## %bb.7:
	movq	%rax, %rbx
	subq	%rcx, %rbx
	cmpq	$32, %rbx
	jb	LBB0_11
## %bb.8:
	movl	%r10d, %edi
	andl	$-8, %edi
	movd	%r13d, %xmm0
	pshufd	$0, %xmm0, %xmm2                ## xmm2 = xmm0[0,0,0,0]
	movd	%edx, %xmm0
	pshufd	$0, %xmm0, %xmm3                ## xmm3 = xmm0[0,0,0,0]
	xorl	%ebx, %ebx
	movdqa	LCPI0_0(%rip), %xmm4            ## xmm4 = [255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0]
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rcx,%rbx,4), %xmm0
	movdqu	16(%rcx,%rbx,4), %xmm1
	pand	%xmm4, %xmm0
	pand	%xmm4, %xmm1
	pmulld	%xmm2, %xmm0
	pmulld	%xmm2, %xmm1
	movdqa	%xmm0, %xmm5
	psrad	$31, %xmm5
	psrld	$24, %xmm5
	paddd	%xmm0, %xmm5
	psrad	$8, %xmm5
	movdqa	%xmm1, %xmm6
	psrad	$31, %xmm6
	psrld	$24, %xmm6
	paddd	%xmm1, %xmm6
	psrad	$8, %xmm6
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm5, %xmm0
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm6, %xmm1
	movdqa	%xmm3, %xmm7
	blendvps	%xmm0, %xmm5, %xmm7
	movdqa	%xmm3, %xmm5
	movdqa	%xmm1, %xmm0
	blendvps	%xmm0, %xmm6, %xmm5
	movups	%xmm7, (%rax,%rbx,4)
	movups	%xmm5, 16(%rax,%rbx,4)
	addq	$8, %rbx
	cmpq	%rbx, %rdi
	jne	LBB0_9
## %bb.10:
	cmpq	%r10, %rdi
	je	LBB0_40
LBB0_11:
	movq	%rdi, %r8
	notq	%r8
	testb	$1, %r10b
	je	LBB0_13
## %bb.12:
	movzbl	(%rcx,%rdi,4), %r9d
	imull	%r13d, %r9d
	leal	255(%r9), %ebx
	testl	%r9d, %r9d
	cmovnsl	%r9d, %ebx
	sarl	$8, %ebx
	cmpl	%r13d, %ebx
	cmovgel	%edx, %ebx
	movl	%ebx, (%rax,%rdi,4)
	orq	$1, %rdi
LBB0_13:
	addq	%r10, %r8
	je	LBB0_40
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rcx,%rdi,4), %ebx
	imull	%r13d, %ebx
	leal	255(%rbx), %esi
	testl	%ebx, %ebx
	cmovnsl	%ebx, %esi
	sarl	$8, %esi
	cmpl	%r13d, %esi
	cmovgel	%edx, %esi
	movl	%esi, (%rax,%rdi,4)
	movzbl	4(%rcx,%rdi,4), %esi
	imull	%r13d, %esi
	leal	255(%rsi), %ebx
	testl	%esi, %esi
	cmovnsl	%esi, %ebx
	sarl	$8, %ebx
	cmpl	%r13d, %ebx
	cmovgel	%edx, %ebx
	movl	%ebx, 4(%rax,%rdi,4)
	addq	$2, %rdi
	cmpq	%rdi, %r10
	jne	LBB0_14
	jmp	LBB0_40
LBB0_18:
	movl	%edx, %esi
	andl	$-8, %esi
	movd	%r13d, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	xorl	%edi, %edi
	pcmpeqd	%xmm1, %xmm1
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_35:                                ##   in Loop: Header=BB0_19 Depth=1
	addq	$8, %rdi
	cmpq	%rdi, %rsi
	je	LBB0_36
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rax,%rdi,4), %xmm3
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm3, %xmm2
	movd	%xmm2, %ebx
	notl	%ebx
	testb	$1, %bl
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%ecx, (%rax,%rdi,4)
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	pxor	%xmm1, %xmm2
	pextrb	$4, %xmm2, %ebx
	testb	$1, %bl
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%ecx, 4(%rax,%rdi,4)
LBB0_23:                                ##   in Loop: Header=BB0_19 Depth=1
	pextrb	$8, %xmm2, %ebx
	testb	$1, %bl
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%ecx, 8(%rax,%rdi,4)
LBB0_25:                                ##   in Loop: Header=BB0_19 Depth=1
	pextrb	$12, %xmm2, %ebx
	testb	$1, %bl
	je	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%ecx, 12(%rax,%rdi,4)
LBB0_27:                                ##   in Loop: Header=BB0_19 Depth=1
	movdqu	16(%rax,%rdi,4), %xmm3
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm3, %xmm2
	movd	%xmm2, %ebx
	notl	%ebx
	testb	$1, %bl
	je	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%ecx, 16(%rax,%rdi,4)
LBB0_29:                                ##   in Loop: Header=BB0_19 Depth=1
	pxor	%xmm1, %xmm2
	pextrb	$4, %xmm2, %ebx
	testb	$1, %bl
	je	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%ecx, 20(%rax,%rdi,4)
LBB0_31:                                ##   in Loop: Header=BB0_19 Depth=1
	pextrb	$8, %xmm2, %ebx
	testb	$1, %bl
	je	LBB0_33
## %bb.32:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%ecx, 24(%rax,%rdi,4)
LBB0_33:                                ##   in Loop: Header=BB0_19 Depth=1
	pextrb	$12, %xmm2, %ebx
	testb	$1, %bl
	je	LBB0_35
## %bb.34:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%ecx, 28(%rax,%rdi,4)
	jmp	LBB0_35
LBB0_36:
	cmpq	%rdx, %rsi
	jne	LBB0_37
LBB0_40:
	movl	-184(%rbp), %eax
	cmpl	$2, %eax
	jl	LBB0_42
## %bb.41:
	movl	-180(%rbp), %ecx
	cmpl	$1, %ecx
	jg	LBB0_43
LBB0_42:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_Error
	movl	-184(%rbp), %eax
	movl	-180(%rbp), %ecx
LBB0_43:
	movl	%r13d, (%r12)
	movl	%eax, (%r15)
	movq	-200(%rbp), %rax                ## 8-byte Reload
	movl	%ecx, (%rax)
	movq	-192(%rbp), %rax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_45
## %bb.44:
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_39:                                ##   in Loop: Header=BB0_37 Depth=1
	incq	%rsi
	cmpq	%rsi, %rdx
	je	LBB0_40
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%r13d, (%rax,%rsi,4)
	jl	LBB0_39
## %bb.38:                              ##   in Loop: Header=BB0_37 Depth=1
	movl	%ecx, (%rax,%rsi,4)
	jmp	LBB0_39
LBB0_45:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_mapent,4,2                     ## @mapent
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"layers"

L_.str.1:                               ## @.str.1
	.asciz	"SetTerrainTextures: invalid value for 'layers' (%d)"

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

L_.str.3:                               ## @.str.3
	.asciz	"LoadAlphaMap: No alphamap specified on terrain"

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

L_.str.5:                               ## @.str.5
	.asciz	"LoadAlphaMap: alphamap width/height must be at least 2x2."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LoadAlphaMap                   ; -- Begin function LoadAlphaMap
	.p2align	2
_LoadAlphaMap:                          ; @LoadAlphaMap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	mov	x0, x1
	bl	_assert
	mov	x0, x19
	bl	_assert
	mov	x0, x21
	bl	_assert
Lloh3:
	adrp	x23, _mapent@GOTPAGE
Lloh4:
	ldr	x23, [x23, _mapent@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ValueForKey
	bl	_atoi
	mov	x22, x0
	cmp	w0, #0
	b.gt	LBB0_2
; %bb.1:
	str	x22, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Error
LBB0_2:
	ldr	w0, [x23]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_ValueForKey
	mov	x23, x0
	ldrb	w8, [x0]
	cbnz	w8, LBB0_4
; %bb.3:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_Error
LBB0_4:
	add	x1, sp, #40
	mov	x0, x23
	bl	_ExtractFileExtension
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x0, sp, #40
	bl	_Q_stricmp
	mov	x24, x0
	mov	x0, x23
	bl	_ExpandGamePath
	cbz	w24, LBB0_8
; %bb.5:
	add	x1, sp, #24
	add	x3, sp, #20
	add	x4, sp, #16
	mov	x2, #0
	bl	_Load256Image
	ldp	w9, w8, [sp, #16]
	mul	w9, w9, w8
	cmp	w9, #1
	b.lt	LBB0_51
; %bb.6:
	ldr	x10, [sp, #24]
	sub	w8, w22, #1
	cmp	w9, #16
	b.hs	LBB0_16
; %bb.7:
	mov	x11, #0
	b	LBB0_55
LBB0_8:
	add	x1, sp, #32
	add	x2, sp, #20
	add	x3, sp, #16
	bl	_Load32BitImage
	ldp	w9, w8, [sp, #16]
	mul	w23, w9, w8
	mov	x0, x23
	bl	_malloc
	str	x0, [sp, #24]
	cmp	w23, #1
	b.lt	LBB0_51
; %bb.9:
	mov	x10, #0
	ldr	x9, [sp, #32]
	sub	w8, w22, #1
	cmp	w23, #4
	b.lo	LBB0_14
; %bb.10:
	sub	x11, x0, x9
	cmp	x11, #16
	b.lo	LBB0_14
; %bb.11:
	and	x10, x23, #0xfffffffc
	dup.4s	v0, w22
	dup.4s	v1, w8
	movi.2d	v2, #0x0000ff000000ff
	mov	x11, x10
	mov	x12, x0
	mov	x13, x9
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	q3, [x13], #16
	and.16b	v3, v3, v2
	mul.4s	v3, v3, v0
	cmlt.4s	v4, v3, #0
	usra.4s	v3, v4, #24
	sshr.4s	v3, v3, #8
	cmgt.4s	v4, v0, v3
	bif.16b	v3, v1, v4
	str	q3, [x12], #16
	subs	x11, x11, #4
	b.ne	LBB0_12
; %bb.13:
	cmp	x10, x23
	b.eq	LBB0_51
LBB0_14:
	lsl	x12, x10, #2
	add	x11, x0, x12
	add	x9, x9, x12
	sub	x10, x23, x10
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w12, [x9], #4
	mul	w12, w12, w22
	add	w13, w12, #255
	cmp	w12, #0
	csel	w12, w13, w12, lt
	asr	w12, w12, #8
	cmp	w12, w22
	csel	w12, w12, w8, lt
	str	w12, [x11], #4
	subs	x10, x10, #1
	b.ne	LBB0_15
	b	LBB0_51
LBB0_16:
	and	x11, x9, #0xfffffff0
	dup.4s	v0, w22
	add	x12, x10, #32
	mov	x13, x11
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x12, x12, #64
	subs	x13, x13, #16
	b.eq	LBB0_50
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldur	q1, [x12, #-32]
	cmge.4s	v1, v1, v0
	xtn.4h	v1, v1
	umov.h	w14, v1[0]
	tbnz	w14, #0, LBB0_40
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	umov.h	w14, v1[1]
	tbnz	w14, #0, LBB0_41
LBB0_20:                                ;   in Loop: Header=BB0_18 Depth=1
	umov.h	w14, v1[2]
	tbnz	w14, #0, LBB0_42
LBB0_21:                                ;   in Loop: Header=BB0_18 Depth=1
	umov.h	w14, v1[3]
	tbz	w14, #0, LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_18 Depth=1
	stur	w8, [x12, #-20]
LBB0_23:                                ;   in Loop: Header=BB0_18 Depth=1
	ldur	q1, [x12, #-16]
	cmge.4s	v1, v1, v0
	xtn.4h	v1, v1
	umov.h	w14, v1[0]
	tbnz	w14, #0, LBB0_43
; %bb.24:                               ;   in Loop: Header=BB0_18 Depth=1
	umov.h	w14, v1[1]
	tbnz	w14, #0, LBB0_44
LBB0_25:                                ;   in Loop: Header=BB0_18 Depth=1
	umov.h	w14, v1[2]
	tbnz	w14, #0, LBB0_45
LBB0_26:                                ;   in Loop: Header=BB0_18 Depth=1
	umov.h	w14, v1[3]
	tbz	w14, #0, LBB0_28
LBB0_27:                                ;   in Loop: Header=BB0_18 Depth=1
	stur	w8, [x12, #-4]
LBB0_28:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	q1, [x12]
	cmge.4s	v1, v1, v0
	xtn.4h	v1, v1
	umov.h	w14, v1[0]
	tbz	w14, #0, LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_18 Depth=1
	str	w8, [x12]
LBB0_30:                                ;   in Loop: Header=BB0_18 Depth=1
	umov.h	w14, v1[1]
	tbz	w14, #0, LBB0_32
; %bb.31:                               ;   in Loop: Header=BB0_18 Depth=1
	str	w8, [x12, #4]
LBB0_32:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	q2, [x12, #16]
	umov.h	w14, v1[2]
	tbz	w14, #0, LBB0_34
; %bb.33:                               ;   in Loop: Header=BB0_18 Depth=1
	str	w8, [x12, #8]
LBB0_34:                                ;   in Loop: Header=BB0_18 Depth=1
	umov.h	w14, v1[3]
	tbz	w14, #0, LBB0_36
; %bb.35:                               ;   in Loop: Header=BB0_18 Depth=1
	str	w8, [x12, #12]
LBB0_36:                                ;   in Loop: Header=BB0_18 Depth=1
	cmge.4s	v1, v2, v0
	xtn.4h	v1, v1
	umov.h	w14, v1[0]
	tbnz	w14, #0, LBB0_46
; %bb.37:                               ;   in Loop: Header=BB0_18 Depth=1
	umov.h	w14, v1[1]
	tbnz	w14, #0, LBB0_47
LBB0_38:                                ;   in Loop: Header=BB0_18 Depth=1
	umov.h	w14, v1[2]
	tbnz	w14, #0, LBB0_48
LBB0_39:                                ;   in Loop: Header=BB0_18 Depth=1
	umov.h	w14, v1[3]
	tbz	w14, #0, LBB0_17
	b	LBB0_49
LBB0_40:                                ;   in Loop: Header=BB0_18 Depth=1
	stur	w8, [x12, #-32]
	umov.h	w14, v1[1]
	tbz	w14, #0, LBB0_20
LBB0_41:                                ;   in Loop: Header=BB0_18 Depth=1
	stur	w8, [x12, #-28]
	umov.h	w14, v1[2]
	tbz	w14, #0, LBB0_21
LBB0_42:                                ;   in Loop: Header=BB0_18 Depth=1
	stur	w8, [x12, #-24]
	umov.h	w14, v1[3]
	tbnz	w14, #0, LBB0_22
	b	LBB0_23
LBB0_43:                                ;   in Loop: Header=BB0_18 Depth=1
	stur	w8, [x12, #-16]
	umov.h	w14, v1[1]
	tbz	w14, #0, LBB0_25
LBB0_44:                                ;   in Loop: Header=BB0_18 Depth=1
	stur	w8, [x12, #-12]
	umov.h	w14, v1[2]
	tbz	w14, #0, LBB0_26
LBB0_45:                                ;   in Loop: Header=BB0_18 Depth=1
	stur	w8, [x12, #-8]
	umov.h	w14, v1[3]
	tbnz	w14, #0, LBB0_27
	b	LBB0_28
LBB0_46:                                ;   in Loop: Header=BB0_18 Depth=1
	str	w8, [x12, #16]
	umov.h	w14, v1[1]
	tbz	w14, #0, LBB0_38
LBB0_47:                                ;   in Loop: Header=BB0_18 Depth=1
	str	w8, [x12, #20]
	umov.h	w14, v1[2]
	tbz	w14, #0, LBB0_39
LBB0_48:                                ;   in Loop: Header=BB0_18 Depth=1
	str	w8, [x12, #24]
	umov.h	w14, v1[3]
	tbz	w14, #0, LBB0_17
LBB0_49:                                ;   in Loop: Header=BB0_18 Depth=1
	str	w8, [x12, #28]
	b	LBB0_17
LBB0_50:
	cmp	x11, x9
	b.ne	LBB0_55
LBB0_51:
	ldp	w9, w8, [sp, #16]
	cmp	w8, #1
	ccmp	w9, #1, #4, gt
	b.gt	LBB0_53
; %bb.52:
Lloh15:
	adrp	x0, l_.str.5@PAGE
Lloh16:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_Error
	ldp	w9, w8, [sp, #16]
LBB0_53:
	str	w22, [x21]
	str	w8, [x20]
	str	w9, [x19]
	ldr	x0, [sp, #24]
	ldur	x8, [x29, #-56]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_59
; %bb.54:
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_55:
	add	x10, x10, x11, lsl #2
	sub	x9, x9, x11
	b	LBB0_57
LBB0_56:                                ;   in Loop: Header=BB0_57 Depth=1
	add	x10, x10, #4
	subs	x9, x9, #1
	b.eq	LBB0_51
LBB0_57:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	cmp	w11, w22
	b.lt	LBB0_56
; %bb.58:                               ;   in Loop: Header=BB0_57 Depth=1
	str	w8, [x10]
	b	LBB0_56
LBB0_59:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_mapent,4,2                     ; @mapent
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"layers"

l_.str.1:                               ; @.str.1
	.asciz	"SetTerrainTextures: invalid value for 'layers' (%d)"

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

l_.str.3:                               ; @.str.3
	.asciz	"LoadAlphaMap: No alphamap specified on terrain"

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

l_.str.5:                               ; @.str.5
	.asciz	"LoadAlphaMap: alphamap width/height must be at least 2x2."

.subsections_via_symbols
