	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function CalcTerrainSize
LCPI0_0:
	.quad	0x3fb999999999999a              ## double 0.10000000000000001
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_CalcTerrainSize
	.p2align	4, 0x90
_CalcTerrainSize:                       ## @CalcTerrainSize
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r13
	callq	_ClearBounds
	movq	_mapent@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rbx), %edi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_AddPointToBounds
	movl	(%rbx), %edi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_AddPointToBounds
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_1
## %bb.2:
	movq	(%r12), %rdi
LBB0_3:
	leaq	L_.str(%rip), %rsi
	callq	_ValueForKey
	cmpb	$0, (%rax)
	je	LBB0_5
## %bb.4:
	movq	(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdx
	callq	_GetVectorForKey
LBB0_5:
	movq	(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_ValueForKey
	cmpb	$0, (%rax)
	je	LBB0_7
## %bb.6:
	movq	(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdx
	callq	_GetVectorForKey
LBB0_7:
	cvtsi2sdq	(%r13), %xmm0
	addsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %rdi
	callq	_floor
	movq	%rax, (%r13)
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%r15), %xmm0
	addsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %rdi
	callq	_floor
	movq	%rax, (%r15)
	xorps	%xmm0, %xmm0
	cvtsi2sdq	8(%r13), %xmm0
	addsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %rdi
	callq	_floor
	movq	%rax, 8(%r13)
	xorps	%xmm0, %xmm0
	cvtsi2sdq	8(%r15), %xmm0
	addsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %rdi
	callq	_floor
	movq	%rax, 8(%r15)
	xorps	%xmm0, %xmm0
	cvtsi2sdq	16(%r13), %xmm0
	addsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %rdi
	callq	_floor
	movq	%rax, 16(%r13)
	xorps	%xmm0, %xmm0
	cvtsi2sdq	16(%r15), %xmm0
	addsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %rdi
	callq	_floor
	movq	%rax, 16(%r15)
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_VectorSubtract
	movq	(%r14), %rsi
	movq	8(%r14), %rdx
	testq	%rsi, %rsi
	jle	LBB0_10
## %bb.8:
	testq	%rdx, %rdx
	jle	LBB0_10
## %bb.9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Error                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mapent,8,3                     ## @mapent
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"min"

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

L_.str.2:                               ## @.str.2
	.asciz	"CalcTerrainSize: Invalid terrain size: %fx%f"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CalcTerrainSize                ; -- Begin function CalcTerrainSize
	.p2align	2
_CalcTerrainSize:                       ; @CalcTerrainSize
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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 b8, -72
	.cfi_offset b9, -80
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_ClearBounds
Lloh0:
	adrp	x22, _mapent@GOTPAGE
Lloh1:
	ldr	x22, [x22, _mapent@GOTPAGEOFF]
	ldr	x0, [x22]
	ldr	x23, [x0]
	cbz	x23, LBB0_3
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23, #4]
	mov	x1, x20
	mov	x2, x21
	bl	_AddPointToBounds
	ldr	w0, [x23]
	mov	x1, x20
	mov	x2, x21
	bl	_AddPointToBounds
	ldr	x23, [x23, #8]
	cbnz	x23, LBB0_1
; %bb.2:
	ldr	x0, [x22]
LBB0_3:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ValueForKey
	ldrb	w8, [x0]
	cbz	w8, LBB0_5
; %bb.4:
	ldr	x0, [x22]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_GetVectorForKey
LBB0_5:
	ldr	x0, [x22]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ValueForKey
	ldrb	w8, [x0]
	cbz	w8, LBB0_7
; %bb.6:
	ldr	x0, [x22]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_GetVectorForKey
LBB0_7:
	ldr	d0, [x20]
	scvtf	d0, d0
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #16313, lsl #48
	fmov	d8, x8
	fadd	d0, d0, d8
	fcvtzs	x0, d0
	bl	_floor
	str	x0, [x20]
	ldr	d0, [x21]
	scvtf	d0, d0
	fadd	d0, d0, d8
	fcvtzs	x0, d0
	bl	_floor
	str	x0, [x21]
	ldr	d0, [x20, #8]
	scvtf	d0, d0
	fadd	d0, d0, d8
	fcvtzs	x0, d0
	bl	_floor
	str	x0, [x20, #8]
	ldr	d0, [x21, #8]
	scvtf	d0, d0
	fadd	d0, d0, d8
	fcvtzs	x0, d0
	bl	_floor
	str	x0, [x21, #8]
	ldr	d0, [x20, #16]
	scvtf	d0, d0
	fadd	d0, d0, d8
	fcvtzs	x0, d0
	bl	_floor
	str	x0, [x20, #16]
	ldr	d0, [x21, #16]
	scvtf	d0, d0
	fadd	d0, d0, d8
	fcvtzs	x0, d0
	bl	_floor
	str	x0, [x21, #16]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_VectorSubtract
	ldp	x1, x2, [x19]
	cmp	x1, #1
	b.lt	LBB0_10
; %bb.8:
	cmp	x2, #0
	b.le	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	b	_Error
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_mapent,8,3                     ; @mapent
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"min"

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

l_.str.2:                               ; @.str.2
	.asciz	"CalcTerrainSize: Invalid terrain size: %fx%f"

.subsections_via_symbols
