	.file	"810102.c"
	.intel_syntax noprefix
	.text
	.globl	HeightCube
	.bss
	.align 32
	.type	HeightCube, @object
	.size	HeightCube, 4718592
HeightCube:
	.zero	4718592
	.globl	BumpCube
	.align 32
	.type	BumpCube, @object
	.size	BumpCube, 4718592
BumpCube:
	.zero	4718592
	.globl	Pi
	.align 8
	.type	Pi, @object
	.size	Pi, 8
Pi:
	.zero	8
	.globl	TwoPi
	.align 8
	.type	TwoPi, @object
	.size	TwoPi, 8
TwoPi:
	.zero	8
	.globl	HalfPi
	.align 8
	.type	HalfPi, @object
	.size	HalfPi, 8
HalfPi:
	.zero	8
	.globl	Nh
	.align 8
	.type	Nh, @object
	.size	Nh, 8
Nh:
	.zero	8
	.globl	Nw
	.align 8
	.type	Nw, @object
	.size	Nw, 8
Nw:
	.zero	8
	.section	.rodata
.LC0:
	.string	"Error opening %s\n"
	.text
	.globl	OpenFile
	.type	OpenFile, @function
OpenFile:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	QWORD PTR -120[rbp], rdi
	mov	QWORD PTR -128[rbp], rsi
	mov	QWORD PTR -136[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -120[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rdx, QWORD PTR -128[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	mov	rdx, QWORD PTR -136[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -104[rbp], 0
	jne	.L2
	lea	rax, -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -104[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	OpenFile, .-OpenFile
	.globl	MAGV
	.type	MAGV, @function
MAGV:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	movsd	xmm1, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm1, xmm0
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	movsd	xmm2, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	movsd	xmm2, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	movq	rax, xmm1
	movq	xmm0, rax
	call	sqrt@PLT
	movq	rax, xmm0
	movq	xmm0, rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	MAGV, .-MAGV
	.section	.rodata
	.align 8
.LC2:
	.string	"Attempted divide by zero in UNITV"
	.text
	.globl	UNITV
	.type	UNITV, @function
UNITV:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	movsd	xmm1, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm1, xmm0
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	movsd	xmm2, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 16
	movsd	xmm2, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 16
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	movq	rax, xmm1
	movq	xmm0, rax
	call	sqrt@PLT
	movq	rax, xmm0
	mov	QWORD PTR -8[rbp], rax
	movsd	xmm0, QWORD PTR -8[rbp]
	pxor	xmm1, xmm1
	comisd	xmm0, xmm1
	jbe	.L13
	mov	rax, QWORD PTR -24[rbp]
	movsd	xmm0, QWORD PTR [rax]
	divsd	xmm0, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	movsd	QWORD PTR [rax], xmm0
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	divsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR [rax], xmm0
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 16
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 16
	divsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR [rax], xmm0
	jmp	.L10
.L13:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -24[rbp]
	pxor	xmm0, xmm0
	movsd	QWORD PTR [rax], xmm0
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	pxor	xmm0, xmm0
	movsd	QWORD PTR [rax], xmm0
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 16
	pxor	xmm0, xmm0
	movsd	QWORD PTR [rax], xmm0
.L10:
	movsd	xmm0, QWORD PTR -8[rbp]
	movq	rax, xmm0
	movq	xmm0, rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	UNITV, .-UNITV
	.globl	VxV
	.type	VxV, @function
VxV:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	movsd	xmm1, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 16
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm1
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	movsd	xmm2, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	movsd	xmm1, QWORD PTR [rax]
	mulsd	xmm1, xmm2
	subsd	xmm0, xmm1
	mov	rax, QWORD PTR -24[rbp]
	movsd	QWORD PTR [rax], xmm0
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	movsd	xmm1, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm1
	mov	rax, QWORD PTR -8[rbp]
	movsd	xmm2, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 16
	movsd	xmm1, QWORD PTR [rax]
	mulsd	xmm1, xmm2
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	subsd	xmm0, xmm1
	movsd	QWORD PTR [rax], xmm0
	mov	rax, QWORD PTR -8[rbp]
	movsd	xmm1, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm1
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	movsd	xmm2, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	movsd	xmm1, QWORD PTR [rax]
	mulsd	xmm1, xmm2
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 16
	subsd	xmm0, xmm1
	movsd	QWORD PTR [rax], xmm0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	VxV, .-VxV
	.globl	MTxV
	.type	MTxV, @function
MTxV:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	rax, QWORD PTR -8[rbp]
	movsd	xmm1, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm1, xmm0
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 24
	movsd	xmm2, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 48
	movsd	xmm2, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 16
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm2
	addsd	xmm0, xmm1
	mov	rax, QWORD PTR -24[rbp]
	movsd	QWORD PTR [rax], xmm0
	mov	rax, QWORD PTR -8[rbp]
	movsd	xmm1, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm1, xmm0
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 24
	movsd	xmm2, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 48
	movsd	xmm2, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 16
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm2
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	addsd	xmm0, xmm1
	movsd	QWORD PTR [rax], xmm0
	mov	rax, QWORD PTR -8[rbp]
	movsd	xmm1, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -16[rbp]
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm1, xmm0
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 24
	movsd	xmm2, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 48
	movsd	xmm2, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 16
	movsd	xmm0, QWORD PTR [rax]
	mulsd	xmm0, xmm2
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 16
	addsd	xmm0, xmm1
	movsd	QWORD PTR [rax], xmm0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	MTxV, .-MTxV
	.section	.rodata
.LC3:
	.string	"rb"
.LC4:
	.string	"P6\n%[^\n]\n%li %li\n%li\n"
	.align 8
.LC5:
	.string	"calloc returned null pointer in PpmToTex.  Bailing out!"
	.text
	.globl	PpmToMap
	.type	PpmToMap, @function
PpmToMap:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 176
	mov	QWORD PTR -152[rbp], rdi
	mov	QWORD PTR -160[rbp], rsi
	mov	QWORD PTR -168[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rcx, QWORD PTR -160[rbp]
	mov	rax, QWORD PTR -152[rbp]
	lea	rdx, .LC3[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	OpenFile
	mov	QWORD PTR -120[rbp], rax
	lea	rcx, -136[rbp]
	lea	rdx, -96[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	r9, rcx
	lea	r8, Nh[rip]
	lea	rcx, Nw[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	rdx, QWORD PTR Nw[rip]
	mov	rax, QWORD PTR Nh[rip]
	imul	rax, rdx
	mov	rdx, QWORD PTR -168[rbp]
	imul	rax, rdx
	mov	QWORD PTR -112[rbp], rax
	mov	rax, QWORD PTR -112[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -104[rbp], 0
	jne	.L17
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L17:
	mov	QWORD PTR -128[rbp], 0
	jmp	.L18
.L19:
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	edx, eax
	mov	rcx, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rcx
	mov	BYTE PTR [rax], dl
	add	QWORD PTR -128[rbp], 1
.L18:
	mov	rax, QWORD PTR -128[rbp]
	cmp	rax, QWORD PTR -112[rbp]
	jl	.L19
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	PpmToMap, .-PpmToMap
	.globl	VecToCube
	.type	VecToCube, @function
VecToCube:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	QWORD PTR -72[rbp], r8
	pxor	xmm0, xmm0
	movsd	QWORD PTR -24[rbp], xmm0
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -40[rbp]
	movsd	xmm2, QWORD PTR .LC6[rip]
	movapd	xmm1, xmm0
	subsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC7[rip]
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	mov	QWORD PTR -16[rbp], 0
	jmp	.L23
.L27:
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	movq	xmm1, QWORD PTR .LC8[rip]
	andpd	xmm0, xmm1
	comisd	xmm0, QWORD PTR -24[rbp]
	jbe	.L24
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	movq	xmm1, QWORD PTR .LC8[rip]
	andpd	xmm0, xmm1
	movsd	QWORD PTR -24[rbp], xmm0
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	movsd	xmm1, QWORD PTR [rax]
	pxor	xmm0, xmm0
	comisd	xmm0, xmm1
	jbe	.L24
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 3[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
.L24:
	add	QWORD PTR -16[rbp], 1
.L23:
	cmp	QWORD PTR -16[rbp], 2
	jle	.L27
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L28
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	movsd	xmm2, QWORD PTR [rax]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC6[rip]
	subsd	xmm0, xmm1
	mulsd	xmm0, QWORD PTR -8[rbp]
	cvttsd2si	rdx, xmm0
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	movsd	xmm2, QWORD PTR [rax]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC6[rip]
	subsd	xmm0, xmm1
	mulsd	xmm0, QWORD PTR -8[rbp]
	cvttsd2si	rdx, xmm0
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L36
.L28:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rax, 1
	jne	.L30
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	movsd	xmm2, QWORD PTR [rax]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC6[rip]
	addsd	xmm0, xmm1
	mulsd	xmm0, QWORD PTR -8[rbp]
	cvttsd2si	rdx, xmm0
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -48[rbp]
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	movsd	xmm2, QWORD PTR [rax]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC6[rip]
	addsd	xmm0, xmm1
	mulsd	xmm0, QWORD PTR -8[rbp]
	cvttsd2si	rdx, xmm0
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L36
.L30:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rax, 2
	jne	.L31
	mov	rax, QWORD PTR -48[rbp]
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	movsd	xmm2, QWORD PTR [rax]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC6[rip]
	subsd	xmm0, xmm1
	mulsd	xmm0, QWORD PTR -8[rbp]
	cvttsd2si	rdx, xmm0
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	movsd	xmm2, QWORD PTR [rax]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC6[rip]
	addsd	xmm0, xmm1
	mulsd	xmm0, QWORD PTR -8[rbp]
	cvttsd2si	rdx, xmm0
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L36
.L31:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rax, 3
	jne	.L32
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	movsd	xmm2, QWORD PTR [rax]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC6[rip]
	addsd	xmm0, xmm1
	mulsd	xmm0, QWORD PTR -8[rbp]
	cvttsd2si	rdx, xmm0
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	movsd	xmm2, QWORD PTR [rax]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC6[rip]
	subsd	xmm0, xmm1
	mulsd	xmm0, QWORD PTR -8[rbp]
	cvttsd2si	rdx, xmm0
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L36
.L32:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rax, 4
	jne	.L33
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	movsd	xmm2, QWORD PTR [rax]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC6[rip]
	addsd	xmm0, xmm1
	mulsd	xmm0, QWORD PTR -8[rbp]
	cvttsd2si	rdx, xmm0
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -48[rbp]
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	movsd	xmm2, QWORD PTR [rax]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC6[rip]
	addsd	xmm0, xmm1
	mulsd	xmm0, QWORD PTR -8[rbp]
	cvttsd2si	rdx, xmm0
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L36
.L33:
	mov	rax, QWORD PTR -48[rbp]
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	movsd	xmm2, QWORD PTR [rax]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC6[rip]
	addsd	xmm0, xmm1
	mulsd	xmm0, QWORD PTR -8[rbp]
	cvttsd2si	rdx, xmm0
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	movsd	xmm2, QWORD PTR [rax]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC6[rip]
	addsd	xmm0, xmm1
	mulsd	xmm0, QWORD PTR -8[rbp]
	cvttsd2si	rdx, xmm0
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR [rax], rdx
.L36:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	VecToCube, .-VecToCube
	.globl	CubeToVec
	.type	CubeToVec, @function
CubeToVec:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	QWORD PTR -56[rbp], r8
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -24[rbp]
	movsd	xmm2, QWORD PTR .LC6[rip]
	movapd	xmm1, xmm0
	subsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC7[rip]
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -16[rbp], xmm0
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, QWORD PTR -24[rbp]
	movsd	xmm0, QWORD PTR .LC7[rip]
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	cmp	QWORD PTR -32[rbp], 0
	jne	.L38
	mov	rax, QWORD PTR -56[rbp]
	movsd	xmm0, QWORD PTR .LC6[rip]
	movsd	QWORD PTR [rax], xmm0
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -40[rbp]
	subsd	xmm0, QWORD PTR -16[rbp]
	movq	xmm1, QWORD PTR .LC9[rip]
	xorpd	xmm0, xmm1
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	divsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR [rax], xmm0
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -48[rbp]
	subsd	xmm0, QWORD PTR -16[rbp]
	movq	xmm1, QWORD PTR .LC9[rip]
	xorpd	xmm0, xmm1
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 16
	divsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR [rax], xmm0
	jmp	.L39
.L38:
	cmp	QWORD PTR -32[rbp], 1
	jne	.L40
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR .LC6[rip]
	movsd	QWORD PTR [rax], xmm0
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -40[rbp]
	subsd	xmm0, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 16
	divsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR [rax], xmm0
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -48[rbp]
	subsd	xmm0, QWORD PTR -16[rbp]
	divsd	xmm0, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -56[rbp]
	movsd	QWORD PTR [rax], xmm0
	jmp	.L39
.L40:
	cmp	QWORD PTR -32[rbp], 2
	jne	.L41
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 16
	movsd	xmm0, QWORD PTR .LC6[rip]
	movsd	QWORD PTR [rax], xmm0
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -40[rbp]
	subsd	xmm0, QWORD PTR -16[rbp]
	movq	xmm1, QWORD PTR .LC9[rip]
	xorpd	xmm0, xmm1
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	divsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR [rax], xmm0
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -48[rbp]
	subsd	xmm0, QWORD PTR -16[rbp]
	divsd	xmm0, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -56[rbp]
	movsd	QWORD PTR [rax], xmm0
	jmp	.L39
.L41:
	cmp	QWORD PTR -32[rbp], 3
	jne	.L42
	mov	rax, QWORD PTR -56[rbp]
	movsd	xmm0, QWORD PTR .LC10[rip]
	movsd	QWORD PTR [rax], xmm0
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -40[rbp]
	subsd	xmm0, QWORD PTR -16[rbp]
	movq	xmm1, QWORD PTR .LC9[rip]
	xorpd	xmm0, xmm1
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	divsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR [rax], xmm0
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -48[rbp]
	subsd	xmm0, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 16
	divsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR [rax], xmm0
	jmp	.L39
.L42:
	cmp	QWORD PTR -32[rbp], 4
	jne	.L43
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR .LC10[rip]
	movsd	QWORD PTR [rax], xmm0
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -40[rbp]
	subsd	xmm0, QWORD PTR -16[rbp]
	movq	xmm1, QWORD PTR .LC9[rip]
	xorpd	xmm0, xmm1
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 16
	divsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR [rax], xmm0
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -48[rbp]
	subsd	xmm0, QWORD PTR -16[rbp]
	divsd	xmm0, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -56[rbp]
	movsd	QWORD PTR [rax], xmm0
	jmp	.L39
.L43:
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 16
	movsd	xmm0, QWORD PTR .LC10[rip]
	movsd	QWORD PTR [rax], xmm0
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -40[rbp]
	subsd	xmm0, QWORD PTR -16[rbp]
	movq	xmm1, QWORD PTR .LC9[rip]
	xorpd	xmm0, xmm1
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	divsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR [rax], xmm0
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -48[rbp]
	subsd	xmm0, QWORD PTR -16[rbp]
	movq	xmm1, QWORD PTR .LC9[rip]
	xorpd	xmm0, xmm1
	divsd	xmm0, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -56[rbp]
	movsd	QWORD PTR [rax], xmm0
.L39:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	UNITV
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	CubeToVec, .-CubeToVec
	.globl	FijToNeighbors
	.type	FijToNeighbors, @function
FijToNeighbors:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	QWORD PTR -56[rbp], r8
	mov	QWORD PTR -64[rbp], r9
	mov	rax, QWORD PTR -48[rbp]
	sub	rax, 1
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 16[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 24[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR 32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 40[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 48[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 56[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR 64[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 72[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 80[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR 88[rbp]
	mov	QWORD PTR [rax], rdx
	cmp	QWORD PTR -32[rbp], 0
	jne	.L45
	cmp	QWORD PTR -24[rbp], 0
	jne	.L46
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], 1
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L47
.L46:
	cmp	QWORD PTR -24[rbp], 1
	jne	.L48
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], 5
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR 16[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L47
.L48:
	cmp	QWORD PTR -24[rbp], 2
	jne	.L49
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], 5
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L47
.L49:
	cmp	QWORD PTR -24[rbp], 3
	jne	.L50
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], 1
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 16[rbp]
	mov	QWORD PTR [rax], 0
	jmp	.L47
.L50:
	cmp	QWORD PTR -24[rbp], 4
	jne	.L51
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], 2
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 16[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L47
.L51:
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], 1
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR 16[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L47
.L45:
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, QWORD PTR -8[rbp]
	jne	.L47
	cmp	QWORD PTR -24[rbp], 0
	jne	.L52
	mov	rax, QWORD PTR 24[rbp]
	mov	QWORD PTR [rax], 4
	mov	rax, QWORD PTR 32[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 40[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L47
.L52:
	cmp	QWORD PTR -24[rbp], 1
	jne	.L53
	mov	rax, QWORD PTR 24[rbp]
	mov	QWORD PTR [rax], 2
	mov	rax, QWORD PTR 32[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR 40[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L47
.L53:
	cmp	QWORD PTR -24[rbp], 2
	jne	.L54
	mov	rax, QWORD PTR 24[rbp]
	mov	QWORD PTR [rax], 4
	mov	rax, QWORD PTR 32[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR 40[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L47
.L54:
	cmp	QWORD PTR -24[rbp], 3
	jne	.L55
	mov	rax, QWORD PTR 24[rbp]
	mov	QWORD PTR [rax], 4
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR 32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 40[rbp]
	mov	QWORD PTR [rax], 0
	jmp	.L47
.L55:
	cmp	QWORD PTR -24[rbp], 4
	jne	.L56
	mov	rax, QWORD PTR 24[rbp]
	mov	QWORD PTR [rax], 5
	mov	rax, QWORD PTR 32[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR 40[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L47
.L56:
	mov	rax, QWORD PTR 24[rbp]
	mov	QWORD PTR [rax], 4
	mov	rax, QWORD PTR 32[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR 40[rbp]
	mov	QWORD PTR [rax], rdx
.L47:
	cmp	QWORD PTR -40[rbp], 0
	jne	.L57
	cmp	QWORD PTR -24[rbp], 0
	jne	.L58
	mov	rax, QWORD PTR 48[rbp]
	mov	QWORD PTR [rax], 2
	mov	rax, QWORD PTR 56[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 64[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L69
.L58:
	cmp	QWORD PTR -24[rbp], 1
	jne	.L60
	mov	rax, QWORD PTR 48[rbp]
	mov	QWORD PTR [rax], 3
	mov	rax, QWORD PTR 56[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR 64[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L69
.L60:
	cmp	QWORD PTR -24[rbp], 2
	jne	.L61
	mov	rax, QWORD PTR 48[rbp]
	mov	QWORD PTR [rax], 3
	mov	rax, QWORD PTR 56[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 64[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L69
.L61:
	cmp	QWORD PTR -24[rbp], 3
	jne	.L62
	mov	rax, QWORD PTR 48[rbp]
	mov	QWORD PTR [rax], 5
	mov	rax, QWORD PTR 56[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 64[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L69
.L62:
	cmp	QWORD PTR -24[rbp], 4
	jne	.L63
	mov	rax, QWORD PTR 48[rbp]
	mov	QWORD PTR [rax], 3
	mov	rax, QWORD PTR 56[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR -32[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR 64[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L69
.L63:
	mov	rax, QWORD PTR 48[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR 56[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 64[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L69
.L57:
	mov	rax, QWORD PTR -40[rbp]
	cmp	rax, QWORD PTR -8[rbp]
	jne	.L69
	cmp	QWORD PTR -24[rbp], 0
	jne	.L64
	mov	rax, QWORD PTR 72[rbp]
	mov	QWORD PTR [rax], 5
	mov	rax, QWORD PTR 80[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 88[rbp]
	mov	QWORD PTR [rax], 0
	jmp	.L69
.L64:
	cmp	QWORD PTR -24[rbp], 1
	jne	.L65
	mov	rax, QWORD PTR 72[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR 80[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR -32[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR 88[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L69
.L65:
	cmp	QWORD PTR -24[rbp], 2
	jne	.L66
	mov	rax, QWORD PTR 72[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR 80[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 88[rbp]
	mov	QWORD PTR [rax], 0
	jmp	.L69
.L66:
	cmp	QWORD PTR -24[rbp], 3
	jne	.L67
	mov	rax, QWORD PTR 72[rbp]
	mov	QWORD PTR [rax], 2
	mov	rax, QWORD PTR 80[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 88[rbp]
	mov	QWORD PTR [rax], 0
	jmp	.L69
.L67:
	cmp	QWORD PTR -24[rbp], 4
	jne	.L68
	mov	rax, QWORD PTR 72[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR 80[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 88[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L69
.L68:
	mov	rax, QWORD PTR 72[rbp]
	mov	QWORD PTR [rax], 3
	mov	rax, QWORD PTR 80[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR 88[rbp]
	mov	QWORD PTR [rax], 0
.L69:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	FijToNeighbors, .-FijToNeighbors
	.section	.rodata
.LC11:
	.string	"w"
.LC12:
	.string	"P6\n#.\n%li %li\n255\n"
.LC13:
	.string	"%c%c%c"
	.text
	.globl	CubeToPpm
	.type	CubeToPpm, @function
CubeToPpm:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 256
	mov	QWORD PTR -232[rbp], rdi
	mov	QWORD PTR -240[rbp], rsi
	mov	QWORD PTR -248[rbp], rdx
	mov	QWORD PTR -256[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 120329685850192
	mov	edx, 0
	mov	QWORD PTR -176[rbp], rax
	mov	QWORD PTR -168[rbp], rdx
	mov	DWORD PTR -160[rbp], 0
	movabs	rax, 120329685850448
	mov	edx, 0
	mov	QWORD PTR -156[rbp], rax
	mov	QWORD PTR -148[rbp], rdx
	mov	DWORD PTR -140[rbp], 0
	movabs	rax, 120329685850704
	mov	edx, 0
	mov	QWORD PTR -136[rbp], rax
	mov	QWORD PTR -128[rbp], rdx
	mov	DWORD PTR -120[rbp], 0
	movabs	rax, 120329685850189
	mov	edx, 0
	mov	QWORD PTR -116[rbp], rax
	mov	QWORD PTR -108[rbp], rdx
	mov	DWORD PTR -100[rbp], 0
	movabs	rax, 120329685850445
	mov	edx, 0
	mov	QWORD PTR -96[rbp], rax
	mov	QWORD PTR -88[rbp], rdx
	mov	DWORD PTR -80[rbp], 0
	movabs	rax, 120329685850701
	mov	edx, 0
	mov	QWORD PTR -76[rbp], rax
	mov	QWORD PTR -68[rbp], rdx
	mov	DWORD PTR -60[rbp], 0
	mov	QWORD PTR -208[rbp], 0
	jmp	.L71
.L76:
	mov	rdx, QWORD PTR -256[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rcx, -176[rbp]
	mov	rdx, QWORD PTR -208[rbp]
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	lea	rdx, [rcx+rax]
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	lea	rcx, -48[rbp]
	mov	rax, QWORD PTR -248[rbp]
	lea	rdx, .LC11[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	OpenFile
	mov	QWORD PTR -184[rbp], rax
	mov	rcx, QWORD PTR -240[rbp]
	mov	rdx, QWORD PTR -240[rbp]
	mov	rax, QWORD PTR -184[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	fflush@PLT
	mov	QWORD PTR -200[rbp], 0
	jmp	.L72
.L75:
	mov	QWORD PTR -192[rbp], 0
	jmp	.L73
.L74:
	mov	rax, QWORD PTR -208[rbp]
	sal	rax, 9
	mov	rdx, rax
	mov	rax, QWORD PTR -200[rbp]
	add	rax, rdx
	sal	rax, 9
	mov	rdx, rax
	mov	rax, QWORD PTR -192[rbp]
	add	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	mov	rax, QWORD PTR -232[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -211[rbp], al
	mov	rax, QWORD PTR -208[rbp]
	sal	rax, 9
	mov	rdx, rax
	mov	rax, QWORD PTR -200[rbp]
	add	rax, rdx
	sal	rax, 9
	mov	rdx, rax
	mov	rax, QWORD PTR -192[rbp]
	add	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -232[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -210[rbp], al
	mov	rax, QWORD PTR -208[rbp]
	sal	rax, 9
	mov	rdx, rax
	mov	rax, QWORD PTR -200[rbp]
	add	rax, rdx
	sal	rax, 9
	mov	rdx, rax
	mov	rax, QWORD PTR -192[rbp]
	add	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	lea	rdx, 2[rax]
	mov	rax, QWORD PTR -232[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -209[rbp], al
	movzx	esi, BYTE PTR -209[rbp]
	movzx	ecx, BYTE PTR -210[rbp]
	movzx	edx, BYTE PTR -211[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	r8d, esi
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	QWORD PTR -192[rbp], 1
.L73:
	mov	rax, QWORD PTR -192[rbp]
	cmp	rax, QWORD PTR -240[rbp]
	jl	.L74
	add	QWORD PTR -200[rbp], 1
.L72:
	mov	rax, QWORD PTR -200[rbp]
	cmp	rax, QWORD PTR -240[rbp]
	jl	.L75
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	fclose@PLT
	add	QWORD PTR -208[rbp], 1
.L71:
	cmp	QWORD PTR -208[rbp], 5
	jle	.L76
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L77
	call	__stack_chk_fail@PLT
.L77:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	CubeToPpm, .-CubeToPpm
	.globl	MapToCube1
	.type	MapToCube1, @function
MapToCube1:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	QWORD PTR -88[rbp], rdi
	mov	QWORD PTR -96[rbp], rsi
	mov	QWORD PTR -104[rbp], rdx
	mov	QWORD PTR -112[rbp], rcx
	mov	QWORD PTR -120[rbp], r8
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -72[rbp], 0
	jmp	.L79
.L88:
	mov	QWORD PTR -64[rbp], 0
	jmp	.L80
.L87:
	mov	QWORD PTR -56[rbp], 0
	jmp	.L81
.L86:
	lea	rdi, -32[rbp]
	mov	rcx, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -64[rbp]
	mov	rsi, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	r8, rdi
	mov	rdi, rax
	call	CubeToVec
	mov	rax, QWORD PTR -96[rbp]
	sub	rax, 1
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, rax
	movsd	QWORD PTR -128[rbp], xmm2
	movsd	xmm3, QWORD PTR HalfPi[rip]
	movsd	QWORD PTR -136[rbp], xmm3
	mov	rax, QWORD PTR -16[rbp]
	movq	xmm0, rax
	call	asin@PLT
	movsd	xmm1, QWORD PTR -136[rbp]
	subsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR -128[rbp]
	mulsd	xmm0, xmm1
	movsd	xmm1, QWORD PTR Pi[rip]
	divsd	xmm0, xmm1
	cvttsd2si	rax, xmm0
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	sub	rax, 1
	pxor	xmm4, xmm4
	cvtsi2sd	xmm4, rax
	movsd	QWORD PTR -128[rbp], xmm4
	movsd	xmm0, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	atan2@PLT
	movsd	xmm1, QWORD PTR Pi[rip]
	addsd	xmm0, xmm1
	mulsd	xmm0, QWORD PTR -128[rbp]
	movsd	xmm1, QWORD PTR TwoPi[rip]
	divsd	xmm0, xmm1
	cvttsd2si	rax, xmm0
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -48[rbp], 0
	jns	.L82
	mov	rax, QWORD PTR -96[rbp]
	add	QWORD PTR -48[rbp], rax
.L82:
	mov	rax, QWORD PTR -96[rbp]
	cmp	rax, QWORD PTR -48[rbp]
	jg	.L83
	mov	rax, QWORD PTR -96[rbp]
	sub	QWORD PTR -48[rbp], rax
.L83:
	cmp	QWORD PTR -40[rbp], 0
	jns	.L84
	mov	rax, QWORD PTR -104[rbp]
	add	QWORD PTR -40[rbp], rax
.L84:
	mov	rax, QWORD PTR -104[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	jg	.L85
	mov	rax, QWORD PTR -104[rbp]
	sub	QWORD PTR -40[rbp], rax
.L85:
	mov	rax, QWORD PTR -48[rbp]
	imul	rax, QWORD PTR -104[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -72[rbp]
	imul	rax, QWORD PTR -120[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	imul	rax, QWORD PTR -120[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, rax
	mov	rax, QWORD PTR -112[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR [rcx]
	mov	BYTE PTR [rdx], al
	add	QWORD PTR -56[rbp], 1
.L81:
	mov	rax, QWORD PTR -56[rbp]
	cmp	rax, QWORD PTR -120[rbp]
	jl	.L86
	add	QWORD PTR -64[rbp], 1
.L80:
	mov	rax, QWORD PTR -64[rbp]
	cmp	rax, QWORD PTR -120[rbp]
	jl	.L87
	add	QWORD PTR -72[rbp], 1
.L79:
	cmp	QWORD PTR -72[rbp], 5
	jle	.L88
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L89
	call	__stack_chk_fail@PLT
.L89:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	MapToCube1, .-MapToCube1
	.globl	PatchToNormal
	.type	PatchToNormal, @function
PatchToNormal:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 304
	mov	QWORD PTR -248[rbp], rdi
	mov	QWORD PTR -256[rbp], rsi
	mov	QWORD PTR -264[rbp], rdx
	mov	QWORD PTR -272[rbp], rcx
	mov	QWORD PTR -280[rbp], r8
	movsd	QWORD PTR -288[rbp], xmm0
	movsd	QWORD PTR -296[rbp], xmm1
	mov	QWORD PTR -304[rbp], r9
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -208[rbp], 0
	jmp	.L91
.L92:
	mov	rax, QWORD PTR -208[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -248[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 6
	movsd	QWORD PTR -80[rbp+rax*8], xmm0
	mov	rax, QWORD PTR -208[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -264[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -208[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -256[rbp]
	add	rax, rdx
	movsd	xmm1, QWORD PTR [rax]
	subsd	xmm0, xmm1
	mov	rax, QWORD PTR -208[rbp]
	movsd	QWORD PTR -176[rbp+rax*8], xmm0
	mov	rax, QWORD PTR -208[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -280[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	mov	rax, QWORD PTR -208[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -272[rbp]
	add	rax, rdx
	movsd	xmm1, QWORD PTR [rax]
	subsd	xmm0, xmm1
	mov	rax, QWORD PTR -208[rbp]
	movsd	QWORD PTR -144[rbp+rax*8], xmm0
	add	QWORD PTR -208[rbp], 1
.L91:
	cmp	QWORD PTR -208[rbp], 2
	jle	.L92
	lea	rax, -176[rbp]
	mov	rdi, rax
	call	MAGV
	movq	rax, xmm0
	mov	QWORD PTR -200[rbp], rax
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	MAGV
	movq	rax, xmm0
	mov	QWORD PTR -192[rbp], rax
	lea	rax, -80[rbp]
	lea	rdx, 24[rax]
	lea	rcx, -176[rbp]
	mov	rax, QWORD PTR -248[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	VxV
	lea	rax, -80[rbp]
	add	rax, 24
	mov	rdi, rax
	call	UNITV
	lea	rdx, -80[rbp]
	mov	rax, QWORD PTR -248[rbp]
	lea	rcx, -80[rbp]
	add	rcx, 24
	mov	rsi, rax
	mov	rdi, rcx
	call	VxV
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	UNITV
	movsd	xmm0, QWORD PTR -288[rbp]
	divsd	xmm0, QWORD PTR -200[rbp]
	movsd	QWORD PTR -232[rbp], xmm0
	movsd	xmm0, QWORD PTR -296[rbp]
	divsd	xmm0, QWORD PTR -192[rbp]
	movsd	QWORD PTR -224[rbp], xmm0
	movsd	xmm0, QWORD PTR -232[rbp]
	movapd	xmm1, xmm0
	mulsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR -224[rbp]
	mulsd	xmm0, xmm0
	addsd	xmm1, xmm0
	movq	rax, xmm1
	movq	xmm0, rax
	call	sqrt@PLT
	movq	rax, xmm0
	mov	QWORD PTR -216[rbp], rax
	movsd	xmm0, QWORD PTR -216[rbp]
	comisd	xmm0, QWORD PTR .LC7[rip]
	jbe	.L93
	movsd	xmm0, QWORD PTR .LC7[rip]
	divsd	xmm0, QWORD PTR -216[rbp]
	movsd	xmm1, QWORD PTR -232[rbp]
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -232[rbp], xmm0
	movsd	xmm0, QWORD PTR .LC7[rip]
	divsd	xmm0, QWORD PTR -216[rbp]
	movsd	xmm1, QWORD PTR -224[rbp]
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -224[rbp], xmm0
	movsd	xmm0, QWORD PTR .LC7[rip]
	movsd	QWORD PTR -216[rbp], xmm0
.L93:
	movsd	xmm0, QWORD PTR -216[rbp]
	movapd	xmm1, xmm0
	mulsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR .LC6[rip]
	subsd	xmm0, xmm1
	movq	rax, xmm0
	movq	xmm0, rax
	call	sqrt@PLT
	movq	rax, xmm0
	mov	QWORD PTR -184[rbp], rax
	movsd	xmm0, QWORD PTR -232[rbp]
	movq	xmm1, QWORD PTR .LC9[rip]
	xorpd	xmm0, xmm1
	movsd	QWORD PTR -112[rbp], xmm0
	movsd	xmm0, QWORD PTR -224[rbp]
	movq	xmm1, QWORD PTR .LC9[rip]
	xorpd	xmm0, xmm1
	movsd	QWORD PTR -104[rbp], xmm0
	movsd	xmm0, QWORD PTR -184[rbp]
	movsd	QWORD PTR -96[rbp], xmm0
	mov	rdx, QWORD PTR -304[rbp]
	lea	rcx, -112[rbp]
	lea	rax, -80[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	MTxV
	mov	rax, QWORD PTR -304[rbp]
	mov	rdi, rax
	call	UNITV
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L95
	call	__stack_chk_fail@PLT
.L95:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	PatchToNormal, .-PatchToNormal
	.section	.rodata
.LC16:
	.string	"MarsDEM4096.ppm"
.LC17:
	.string	"./"
.LC19:
	.string	"MarsBump"
	.text
	.globl	main
	.type	main, @function
main:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 496
	mov	DWORD PTR -484[rbp], edi
	mov	QWORD PTR -496[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movsd	xmm0, QWORD PTR .LC14[rip]
	movsd	QWORD PTR -352[rbp], xmm0
	movsd	xmm0, QWORD PTR .LC15[rip]
	movsd	QWORD PTR Pi[rip], xmm0
	movsd	xmm0, QWORD PTR Pi[rip]
	addsd	xmm0, xmm0
	movsd	QWORD PTR TwoPi[rip], xmm0
	movsd	xmm1, QWORD PTR Pi[rip]
	movsd	xmm0, QWORD PTR .LC7[rip]
	mulsd	xmm0, xmm1
	movsd	QWORD PTR HalfPi[rip], xmm0
	mov	edx, 3
	lea	rsi, .LC16[rip]
	lea	rdi, .LC17[rip]
	call	PpmToMap
	mov	QWORD PTR -344[rbp], rax
	mov	rdx, QWORD PTR Nw[rip]
	mov	rsi, QWORD PTR Nh[rip]
	mov	rax, QWORD PTR -344[rbp]
	mov	r8d, 512
	lea	rcx, HeightCube[rip]
	mov	rdi, rax
	call	MapToCube1
	mov	QWORD PTR -384[rbp], 0
	jmp	.L98
.L109:
	mov	QWORD PTR -376[rbp], 0
	jmp	.L99
.L108:
	mov	QWORD PTR -368[rbp], 0
	jmp	.L100
.L107:
	lea	r8, -448[rbp]
	lea	rdi, -480[rbp]
	mov	rdx, QWORD PTR -368[rbp]
	mov	rsi, QWORD PTR -376[rbp]
	mov	rax, QWORD PTR -384[rbp]
	lea	rcx, -392[rbp]
	push	rcx
	lea	rcx, -408[rbp]
	push	rcx
	lea	rcx, -456[rbp]
	push	rcx
	lea	rcx, -400[rbp]
	push	rcx
	lea	rcx, -416[rbp]
	push	rcx
	lea	rcx, -464[rbp]
	push	rcx
	lea	rcx, -424[rbp]
	push	rcx
	lea	rcx, -440[rbp]
	push	rcx
	lea	rcx, -472[rbp]
	push	rcx
	lea	rcx, -432[rbp]
	push	rcx
	mov	r9, r8
	mov	r8, rdi
	mov	ecx, 512
	mov	rdi, rax
	call	FijToNeighbors
	add	rsp, 80
	lea	rsi, -320[rbp]
	mov	rcx, QWORD PTR -368[rbp]
	mov	rdx, QWORD PTR -376[rbp]
	mov	rax, QWORD PTR -384[rbp]
	mov	r8, rsi
	mov	rsi, rax
	mov	edi, 512
	call	CubeToVec
	mov	rcx, QWORD PTR -400[rbp]
	mov	rdx, QWORD PTR -416[rbp]
	mov	rax, QWORD PTR -464[rbp]
	lea	rsi, -288[rbp]
	mov	r8, rsi
	mov	rsi, rax
	mov	edi, 512
	call	CubeToVec
	mov	rcx, QWORD PTR -392[rbp]
	mov	rdx, QWORD PTR -408[rbp]
	mov	rax, QWORD PTR -456[rbp]
	lea	rsi, -256[rbp]
	mov	r8, rsi
	mov	rsi, rax
	mov	edi, 512
	call	CubeToVec
	mov	rcx, QWORD PTR -432[rbp]
	mov	rdx, QWORD PTR -448[rbp]
	mov	rax, QWORD PTR -480[rbp]
	lea	rsi, -224[rbp]
	mov	r8, rsi
	mov	rsi, rax
	mov	edi, 512
	call	CubeToVec
	mov	rcx, QWORD PTR -424[rbp]
	mov	rdx, QWORD PTR -440[rbp]
	mov	rax, QWORD PTR -472[rbp]
	lea	rsi, -192[rbp]
	mov	r8, rsi
	mov	rsi, rax
	mov	edi, 512
	call	CubeToVec
	mov	rax, QWORD PTR -472[rbp]
	sal	rax, 9
	mov	rdx, rax
	mov	rax, QWORD PTR -440[rbp]
	add	rax, rdx
	sal	rax, 9
	mov	rdx, rax
	mov	rax, QWORD PTR -424[rbp]
	add	rdx, rax
	lea	rax, HeightCube[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	movzx	eax, al
	mov	rdx, QWORD PTR -480[rbp]
	mov	rcx, rdx
	sal	rcx, 9
	mov	rdx, QWORD PTR -448[rbp]
	add	rdx, rcx
	mov	rcx, rdx
	sal	rcx, 9
	mov	rdx, QWORD PTR -432[rbp]
	add	rcx, rdx
	lea	rdx, HeightCube[rip]
	movzx	edx, BYTE PTR [rcx+rdx]
	movzx	edx, dl
	sub	eax, edx
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	movsd	xmm1, QWORD PTR -352[rbp]
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -336[rbp], xmm0
	mov	rax, QWORD PTR -456[rbp]
	sal	rax, 9
	mov	rdx, rax
	mov	rax, QWORD PTR -408[rbp]
	add	rax, rdx
	sal	rax, 9
	mov	rdx, rax
	mov	rax, QWORD PTR -392[rbp]
	add	rdx, rax
	lea	rax, HeightCube[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	movzx	eax, al
	mov	rdx, QWORD PTR -464[rbp]
	mov	rcx, rdx
	sal	rcx, 9
	mov	rdx, QWORD PTR -416[rbp]
	add	rdx, rcx
	mov	rcx, rdx
	sal	rcx, 9
	mov	rdx, QWORD PTR -400[rbp]
	add	rcx, rdx
	lea	rdx, HeightCube[rip]
	movzx	edx, BYTE PTR [rcx+rdx]
	movzx	edx, dl
	sub	eax, edx
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	movsd	xmm1, QWORD PTR -352[rbp]
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -328[rbp], xmm0
	lea	r9, -128[rbp]
	movsd	xmm0, QWORD PTR -328[rbp]
	mov	rdi, QWORD PTR -336[rbp]
	lea	r8, -256[rbp]
	lea	rcx, -288[rbp]
	lea	rdx, -192[rbp]
	lea	rsi, -224[rbp]
	lea	rax, -320[rbp]
	movapd	xmm1, xmm0
	movq	xmm0, rdi
	mov	rdi, rax
	call	PatchToNormal
	lea	rax, -320[rbp]
	mov	rdi, rax
	call	UNITV
	mov	QWORD PTR -360[rbp], 0
	jmp	.L101
.L106:
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm0, QWORD PTR -128[rbp+rax*8]
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm1, QWORD PTR -320[rbp+rax*8]
	subsd	xmm0, xmm1
	mov	rax, QWORD PTR -360[rbp]
	movsd	QWORD PTR -160[rbp+rax*8], xmm0
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm1, QWORD PTR -160[rbp+rax*8]
	movsd	xmm0, QWORD PTR .LC10[rip]
	comisd	xmm0, xmm1
	jbe	.L102
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm0, QWORD PTR .LC10[rip]
	movsd	QWORD PTR -160[rbp+rax*8], xmm0
.L102:
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm0, QWORD PTR -160[rbp+rax*8]
	movsd	xmm1, QWORD PTR .LC6[rip]
	comisd	xmm0, xmm1
	jbe	.L104
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm0, QWORD PTR .LC6[rip]
	movsd	QWORD PTR -160[rbp+rax*8], xmm0
.L104:
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm1, QWORD PTR -160[rbp+rax*8]
	movsd	xmm0, QWORD PTR .LC6[rip]
	addsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR .LC18[rip]
	mulsd	xmm0, xmm1
	mov	rax, QWORD PTR -384[rbp]
	sal	rax, 9
	mov	rdx, rax
	mov	rax, QWORD PTR -376[rbp]
	add	rax, rdx
	sal	rax, 9
	mov	rdx, rax
	mov	rax, QWORD PTR -368[rbp]
	add	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -360[rbp]
	add	rdx, rax
	cvttsd2si	eax, xmm0
	mov	ecx, eax
	lea	rax, BumpCube[rip]
	mov	BYTE PTR [rdx+rax], cl
	add	QWORD PTR -360[rbp], 1
.L101:
	cmp	QWORD PTR -360[rbp], 2
	jle	.L106
	add	QWORD PTR -368[rbp], 1
.L100:
	cmp	QWORD PTR -368[rbp], 511
	jle	.L107
	add	QWORD PTR -376[rbp], 1
.L99:
	cmp	QWORD PTR -376[rbp], 511
	jle	.L108
	add	QWORD PTR -384[rbp], 1
.L98:
	cmp	QWORD PTR -384[rbp], 5
	jle	.L109
	lea	rcx, .LC19[rip]
	lea	rdx, .LC17[rip]
	mov	esi, 512
	lea	rdi, BumpCube[rip]
	call	CubeToPpm
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L111
	call	__stack_chk_fail@PLT
.L111:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC6:
	.long	0
	.long	1072693248
	.align 8
.LC7:
	.long	0
	.long	1071644672
	.align 16
.LC8:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.align 16
.LC9:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.align 8
.LC10:
	.long	0
	.long	-1074790400
	.align 8
.LC14:
	.long	-1201243402
	.long	1057263472
	.align 8
.LC15:
	.long	1413754136
	.long	1074340347
	.align 8
.LC18:
	.long	0
	.long	1080025088
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"810102.c"
	.text
	.comm	HeightCube,4718592,4
	.comm	BumpCube,4718592,4
	.comm	Pi,8,8
	.comm	TwoPi,8,8
	.comm	HalfPi,8,8
	.comm	Nh,4,4
	.comm	Nw,4,4
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Error opening %s\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	OpenFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	OpenFile, %function
OpenFile:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	str	r0, [fp, #-96]
	str	r1, [fp, #-100]
	str	r2, [fp, #-104]
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #88
	ldr	r1, [fp, #-96]
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #88
	ldr	r1, [fp, #-100]
	mov	r0, r3
	bl	strcat
	sub	r3, fp, #88
	ldr	r1, [fp, #-104]
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	bne	.L2
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, .L5+4
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-92]
	ldr	r2, .L5
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC2
	.word	.LC1
	.size	OpenFile, .-OpenFile
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.align	2
	.global	MAGV
	.syntax unified
	.arm
	.fpu softvfp
	.type	MAGV, %function
MAGV:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #8
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-16]
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, #16
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-16]
	add	r3, r3, #16
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sqrt
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
	.size	MAGV, .-MAGV
	.global	__aeabi_dcmpgt
	.global	__aeabi_ddiv
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Attempted divide by zero in UNITV\000"
	.text
	.align	2
	.global	UNITV
	.syntax unified
	.arm
	.fpu softvfp
	.type	UNITV, %function
UNITV:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-24]
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, #8
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-24]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, #16
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-24]
	add	r3, r3, #16
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sqrt
	str	r0, [fp, #-20]
	str	r1, [fp, #-16]
	mov	r2, #0
	mov	r3, #0
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmpgt
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-24]
	ldmia	r3, {r0-r1}
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-24]
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-24]
	add	r3, r3, #8
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-24]
	add	r4, r3, #8
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	ldr	r3, [fp, #-24]
	add	r3, r3, #16
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-24]
	add	r4, r3, #16
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	b	.L12
.L15:
	ldr	r0, .L16
	bl	puts
	ldr	r1, [fp, #-24]
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-24]
	add	r1, r3, #8
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-24]
	add	r1, r3, #16
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
.L12:
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC3
	.size	UNITV, .-UNITV
	.global	__aeabi_dsub
	.align	2
	.global	VxV
	.syntax unified
	.arm
	.fpu softvfp
	.type	VxV, %function
VxV:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #16
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	add	r3, r3, #8
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-28]
	add	r3, r3, #16
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, #16
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-32]
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-24]
	add	r3, r3, #16
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-28]
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r6, r2
	mov	r7, r3
	ldr	r3, [fp, #-24]
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-28]
	add	r3, r3, #16
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #-32]
	add	r4, r3, #8
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	ldr	r3, [fp, #-24]
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r6, r2
	mov	r7, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, #8
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-28]
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #-32]
	add	r4, r3, #16
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	nop
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
	.size	VxV, .-VxV
	.align	2
	.global	MTxV
	.syntax unified
	.arm
	.fpu softvfp
	.type	MTxV, %function
MTxV:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #16
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-28]
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, #24
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, #48
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-28]
	add	r3, r3, #16
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-32]
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-24]
	add	r1, r3, #8
	ldmia	r1, {r0-r1}
	ldr	r3, [fp, #-28]
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, #24
	add	r1, r3, #8
	ldmia	r1, {r0-r1}
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r6, r2
	mov	r7, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, #48
	add	r1, r3, #8
	ldmia	r1, {r0-r1}
	ldr	r3, [fp, #-28]
	add	r3, r3, #16
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #-32]
	add	r4, r3, #8
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	ldr	r3, [fp, #-24]
	add	r1, r3, #16
	ldmia	r1, {r0-r1}
	ldr	r3, [fp, #-28]
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, #24
	add	r1, r3, #16
	ldmia	r1, {r0-r1}
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r6, r2
	mov	r7, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, #48
	add	r1, r3, #16
	ldmia	r1, {r0-r1}
	ldr	r3, [fp, #-28]
	add	r3, r3, #16
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #-32]
	add	r4, r3, #16
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	nop
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
	.size	MTxV, .-MTxV
	.section	.rodata
	.align	2
.LC4:
	.ascii	"rb\000"
	.align	2
.LC5:
	.ascii	"P6\012%[^\012]\012%li %li\012%li\012\000"
	.align	2
.LC6:
	.ascii	"calloc returned null pointer in PpmToTex.  Bailing "
	.ascii	"out!\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	PpmToMap
	.syntax unified
	.arm
	.fpu softvfp
	.type	PpmToMap, %function
PpmToMap:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	str	r2, [fp, #-120]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L26+4
	ldr	r1, [fp, #-116]
	ldr	r0, [fp, #-112]
	bl	OpenFile
	str	r0, [fp, #-100]
	sub	r2, fp, #88
	sub	r3, fp, #108
	str	r3, [sp, #4]
	ldr	r3, .L26+8
	str	r3, [sp]
	ldr	r3, .L26+12
	ldr	r1, .L26+16
	ldr	r0, [fp, #-100]
	bl	__isoc99_fscanf
	ldr	r3, .L26+12
	ldr	r3, [r3]
	ldr	r2, .L26+8
	ldr	r2, [r2]
	mul	r2, r3, r2
	ldr	r3, [fp, #-120]
	mul	r3, r2, r3
	str	r3, [fp, #-96]
	ldr	r3, [fp, #-96]
	mov	r1, #1
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	bne	.L21
	ldr	r0, .L26+20
	bl	puts
	mov	r0, #1
	bl	exit
.L21:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L22
.L23:
	ldr	r0, [fp, #-100]
	bl	fgetc
	mov	r1, r0
	ldr	r3, [fp, #-104]
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	and	r2, r1, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L22:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	cmp	r2, r3
	blt	.L23
	ldr	r0, [fp, #-100]
	bl	fclose
	ldr	r3, [fp, #-92]
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC7
	.word	.LC4
	.word	Nh
	.word	Nw
	.word	.LC5
	.word	.LC6
	.size	PpmToMap, .-PpmToMap
	.global	__aeabi_i2d
	.global	__aeabi_dcmplt
	.global	__aeabi_d2iz
	.align	2
	.global	VecToCube
	.syntax unified
	.arm
	.fpu softvfp
	.type	VecToCube, %function
VecToCube:
	@ args = 4, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	str	r3, [fp, #-52]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-40]
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L43
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L43+4
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L29
.L33:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	mov	r4, r2
	bic	r5, r3, #-2147483648
	mov	r2, r4
	mov	r3, r5
	sub	r1, fp, #28
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	beq	.L30
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	mov	r1, r2
	str	r1, [fp, #-28]
	bic	r3, r3, #-2147483648
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	mov	r2, #0
	mov	r3, #0
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	beq	.L30
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	add	r2, r3, #3
	ldr	r3, [fp, #-48]
	str	r2, [r3]
.L30:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L29:
	ldr	r3, [fp, #-32]
	cmp	r3, #2
	ble	.L33
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L34
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-44]
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, #0
	ldr	r1, .L43
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r2, r0
	ldr	r3, [fp, #-52]
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-44]
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, #0
	ldr	r1, .L43
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r2, r0
	ldr	r3, [fp, #4]
	str	r2, [r3]
	b	.L42
.L34:
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L36
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L43
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r2, r0
	ldr	r3, [fp, #-52]
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L43
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r2, r0
	ldr	r3, [fp, #4]
	str	r2, [r3]
	b	.L42
.L36:
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L37
	ldr	r3, [fp, #-44]
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, #0
	ldr	r1, .L43
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r2, r0
	ldr	r3, [fp, #-52]
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L43
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r2, r0
	ldr	r3, [fp, #4]
	str	r2, [r3]
	b	.L42
.L37:
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L38
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-44]
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L43
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r2, r0
	ldr	r3, [fp, #-52]
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-44]
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, #0
	ldr	r1, .L43
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r2, r0
	ldr	r3, [fp, #4]
	str	r2, [r3]
	b	.L42
.L38:
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L39
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L43
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r2, r0
	ldr	r3, [fp, #-52]
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L43
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r2, r0
	ldr	r3, [fp, #4]
	str	r2, [r3]
	b	.L42
.L39:
	ldr	r3, [fp, #-44]
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L43
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r2, r0
	ldr	r3, [fp, #-52]
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L43
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r2, r0
	ldr	r3, [fp, #4]
	str	r2, [r3]
.L42:
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L44:
	.align	2
.L43:
	.word	1072693248
	.word	1071644672
	.size	VecToCube, .-VecToCube
	.align	2
	.global	CubeToVec
	.syntax unified
	.arm
	.fpu softvfp
	.type	CubeToVec, %function
CubeToVec:
	@ args = 4, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #76
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	str	r2, [fp, #-56]
	str	r3, [fp, #-60]
	ldr	r0, [fp, #-48]
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L52
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L52+4
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	ldr	r0, [fp, #-48]
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L52+4
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bne	.L46
	ldr	r1, [fp, #4]
	mov	r2, #0
	ldr	r3, .L52
	stm	r1, {r2-r3}
	ldr	r0, [fp, #-56]
	bl	__aeabi_i2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-68]
	eor	r3, r3, #-2147483648
	str	r3, [fp, #-64]
	ldr	r3, [fp, #4]
	add	r4, r3, #8
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	sub	r1, fp, #68
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	ldr	r0, [fp, #-60]
	bl	__aeabi_i2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-76]
	eor	r3, r3, #-2147483648
	str	r3, [fp, #-72]
	ldr	r3, [fp, #4]
	add	r4, r3, #16
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	b	.L47
.L46:
	ldr	r3, [fp, #-52]
	cmp	r3, #1
	bne	.L48
	ldr	r3, [fp, #4]
	add	r1, r3, #8
	mov	r2, #0
	ldr	r3, .L52
	stm	r1, {r2-r3}
	ldr	r0, [fp, #-56]
	bl	__aeabi_i2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #4]
	add	r4, r3, #16
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	ldr	r0, [fp, #-60]
	bl	__aeabi_i2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #4]
	stm	r1, {r2-r3}
	b	.L47
.L48:
	ldr	r3, [fp, #-52]
	cmp	r3, #2
	bne	.L49
	ldr	r3, [fp, #4]
	add	r1, r3, #16
	mov	r2, #0
	ldr	r3, .L52
	stm	r1, {r2-r3}
	ldr	r0, [fp, #-56]
	bl	__aeabi_i2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-84]
	eor	r3, r3, #-2147483648
	str	r3, [fp, #-80]
	ldr	r3, [fp, #4]
	add	r4, r3, #8
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	sub	r1, fp, #84
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	ldr	r0, [fp, #-60]
	bl	__aeabi_i2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #4]
	stm	r1, {r2-r3}
	b	.L47
.L49:
	ldr	r3, [fp, #-52]
	cmp	r3, #3
	bne	.L50
	ldr	r1, [fp, #4]
	mov	r2, #0
	ldr	r3, .L52+8
	stm	r1, {r2-r3}
	ldr	r0, [fp, #-56]
	bl	__aeabi_i2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-92]
	eor	r3, r3, #-2147483648
	str	r3, [fp, #-88]
	ldr	r3, [fp, #4]
	add	r4, r3, #8
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	sub	r1, fp, #92
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	ldr	r0, [fp, #-60]
	bl	__aeabi_i2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #4]
	add	r4, r3, #16
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	b	.L47
.L50:
	ldr	r3, [fp, #-52]
	cmp	r3, #4
	bne	.L51
	ldr	r3, [fp, #4]
	add	r1, r3, #8
	mov	r2, #0
	ldr	r3, .L52+8
	stm	r1, {r2-r3}
	ldr	r0, [fp, #-56]
	bl	__aeabi_i2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-100]
	eor	r3, r3, #-2147483648
	str	r3, [fp, #-96]
	ldr	r3, [fp, #4]
	add	r4, r3, #16
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	sub	r1, fp, #100
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	ldr	r0, [fp, #-60]
	bl	__aeabi_i2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #4]
	stm	r1, {r2-r3}
	b	.L47
.L51:
	ldr	r3, [fp, #4]
	add	r1, r3, #16
	mov	r2, #0
	ldr	r3, .L52+8
	stm	r1, {r2-r3}
	ldr	r0, [fp, #-56]
	bl	__aeabi_i2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r8, r2
	eor	r9, r3, #-2147483648
	ldr	r3, [fp, #4]
	add	r4, r3, #8
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mov	r0, r8
	mov	r1, r9
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	stm	r4, {r2-r3}
	ldr	r0, [fp, #-60]
	bl	__aeabi_i2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r6, r2
	eor	r7, r3, #-2147483648
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #4]
	stm	r1, {r2-r3}
.L47:
	ldr	r0, [fp, #4]
	bl	UNITV
	nop
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r6, r7, r8, r9, fp, pc}
.L53:
	.align	2
.L52:
	.word	1072693248
	.word	1071644672
	.word	-1074790400
	.size	CubeToVec, .-CubeToVec
	.align	2
	.global	FijToNeighbors
	.syntax unified
	.arm
	.fpu softvfp
	.type	FijToNeighbors, %function
FijToNeighbors:
	@ args = 48, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #4]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	sub	r2, r3, #1
	ldr	r3, [fp, #8]
	str	r2, [r3]
	ldr	r3, [fp, #12]
	ldr	r2, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #16]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r2, r3, #1
	ldr	r3, [fp, #20]
	str	r2, [r3]
	ldr	r3, [fp, #24]
	ldr	r2, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #28]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #32]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	sub	r2, r3, #1
	ldr	r3, [fp, #36]
	str	r2, [r3]
	ldr	r3, [fp, #40]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #44]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r2, r3, #1
	ldr	r3, [fp, #48]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L55
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L56
	ldr	r3, [fp, #4]
	mov	r2, #1
	str	r2, [r3]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	sub	r2, r2, r3
	ldr	r3, [fp, #8]
	str	r2, [r3]
	ldr	r3, [fp, #12]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	b	.L57
.L56:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L58
	ldr	r3, [fp, #4]
	mov	r2, #5
	str	r2, [r3]
	ldr	r3, [fp, #8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	sub	r2, r2, r3
	ldr	r3, [fp, #12]
	str	r2, [r3]
	b	.L57
.L58:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L59
	ldr	r3, [fp, #4]
	mov	r2, #5
	str	r2, [r3]
	ldr	r3, [fp, #8]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #12]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	b	.L57
.L59:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	bne	.L60
	ldr	r3, [fp, #4]
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #8]
	ldr	r2, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #12]
	mov	r2, #0
	str	r2, [r3]
	b	.L57
.L60:
	ldr	r3, [fp, #-16]
	cmp	r3, #4
	bne	.L61
	ldr	r3, [fp, #4]
	mov	r2, #2
	str	r2, [r3]
	ldr	r3, [fp, #8]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #12]
	ldr	r2, [fp, #-24]
	str	r2, [r3]
	b	.L57
.L61:
	ldr	r3, [fp, #4]
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	sub	r2, r2, r3
	ldr	r3, [fp, #12]
	str	r2, [r3]
	b	.L57
.L55:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bne	.L57
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L62
	ldr	r3, [fp, #16]
	mov	r2, #4
	str	r2, [r3]
	ldr	r3, [fp, #20]
	ldr	r2, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #24]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	b	.L57
.L62:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L63
	ldr	r3, [fp, #16]
	mov	r2, #2
	str	r2, [r3]
	ldr	r3, [fp, #20]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #24]
	ldr	r2, [fp, #-24]
	str	r2, [r3]
	b	.L57
.L63:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L64
	ldr	r3, [fp, #16]
	mov	r2, #4
	str	r2, [r3]
	ldr	r3, [fp, #20]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #24]
	ldr	r2, [fp, #-24]
	str	r2, [r3]
	b	.L57
.L64:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	bne	.L65
	ldr	r3, [fp, #16]
	mov	r2, #4
	str	r2, [r3]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	sub	r2, r2, r3
	ldr	r3, [fp, #20]
	str	r2, [r3]
	ldr	r3, [fp, #24]
	mov	r2, #0
	str	r2, [r3]
	b	.L57
.L65:
	ldr	r3, [fp, #-16]
	cmp	r3, #4
	bne	.L66
	ldr	r3, [fp, #16]
	mov	r2, #5
	str	r2, [r3]
	ldr	r3, [fp, #20]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	sub	r2, r2, r3
	ldr	r3, [fp, #24]
	str	r2, [r3]
	b	.L57
.L66:
	ldr	r3, [fp, #16]
	mov	r2, #4
	str	r2, [r3]
	ldr	r3, [fp, #20]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	sub	r2, r2, r3
	ldr	r3, [fp, #24]
	str	r2, [r3]
.L57:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L67
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L68
	ldr	r3, [fp, #28]
	mov	r2, #2
	str	r2, [r3]
	ldr	r3, [fp, #32]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #36]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	b	.L79
.L68:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L70
	ldr	r3, [fp, #28]
	mov	r2, #3
	str	r2, [r3]
	ldr	r3, [fp, #32]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #36]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	b	.L79
.L70:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L71
	ldr	r3, [fp, #28]
	mov	r2, #3
	str	r2, [r3]
	ldr	r3, [fp, #32]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #36]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	b	.L79
.L71:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	bne	.L72
	ldr	r3, [fp, #28]
	mov	r2, #5
	str	r2, [r3]
	ldr	r3, [fp, #32]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #36]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	b	.L79
.L72:
	ldr	r3, [fp, #-16]
	cmp	r3, #4
	bne	.L73
	ldr	r3, [fp, #28]
	mov	r2, #3
	str	r2, [r3]
	ldr	r3, [fp, #32]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	sub	r2, r2, r3
	ldr	r3, [fp, #36]
	str	r2, [r3]
	b	.L79
.L73:
	ldr	r3, [fp, #28]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #32]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #36]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	b	.L79
.L67:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bne	.L79
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L74
	ldr	r3, [fp, #40]
	mov	r2, #5
	str	r2, [r3]
	ldr	r3, [fp, #44]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #48]
	mov	r2, #0
	str	r2, [r3]
	b	.L79
.L74:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L75
	ldr	r3, [fp, #40]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #44]
	mov	r2, #0
	str	r2, [r3]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	sub	r2, r2, r3
	ldr	r3, [fp, #48]
	str	r2, [r3]
	b	.L79
.L75:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L76
	ldr	r3, [fp, #40]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #44]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #48]
	mov	r2, #0
	str	r2, [r3]
	b	.L79
.L76:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	bne	.L77
	ldr	r3, [fp, #40]
	mov	r2, #2
	str	r2, [r3]
	ldr	r3, [fp, #44]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #48]
	mov	r2, #0
	str	r2, [r3]
	b	.L79
.L77:
	ldr	r3, [fp, #-16]
	cmp	r3, #4
	bne	.L78
	ldr	r3, [fp, #40]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #44]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #48]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	b	.L79
.L78:
	ldr	r3, [fp, #40]
	mov	r2, #3
	str	r2, [r3]
	ldr	r3, [fp, #44]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #48]
	mov	r2, #0
	str	r2, [r3]
.L79:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	FijToNeighbors, .-FijToNeighbors
	.section	.rodata
	.align	2
.LC8:
	.ascii	"w\000"
	.align	2
.LC9:
	.ascii	"P6\012#.\012%li %li\012255\012\000"
	.align	2
.LC10:
	.ascii	"%c%c%c\000"
	.align	2
.LC0:
	.ascii	"PX.ppm\000"
	.space	13
	.ascii	"PY.ppm\000"
	.space	13
	.ascii	"PZ.ppm\000"
	.space	13
	.ascii	"MX.ppm\000"
	.space	13
	.ascii	"MY.ppm\000"
	.space	13
	.ascii	"MZ.ppm\000"
	.space	13
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	CubeToPpm
	.syntax unified
	.arm
	.fpu softvfp
	.type	CubeToPpm, %function
CubeToPpm:
	@ args = 0, pretend = 0, frame = 200
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #208
	str	r0, [fp, #-192]
	str	r1, [fp, #-196]
	str	r2, [fp, #-200]
	str	r3, [fp, #-204]
	ldr	r3, .L88
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L88+4
	sub	r3, fp, #168
	mov	r1, r2
	mov	r2, #120
	mov	r0, r3
	bl	memcpy
	mov	r3, #0
	str	r3, [fp, #-184]
	b	.L81
.L86:
	sub	r3, fp, #48
	ldr	r1, [fp, #-204]
	mov	r0, r3
	bl	strcpy
	sub	r1, fp, #168
	ldr	r2, [fp, #-184]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r2, r1, r3
	sub	r3, fp, #48
	mov	r1, r2
	mov	r0, r3
	bl	strcat
	sub	r3, fp, #48
	ldr	r2, .L88+8
	mov	r1, r3
	ldr	r0, [fp, #-200]
	bl	OpenFile
	str	r0, [fp, #-172]
	ldr	r3, [fp, #-196]
	ldr	r2, [fp, #-196]
	ldr	r1, .L88+12
	ldr	r0, [fp, #-172]
	bl	fprintf
	ldr	r0, [fp, #-172]
	bl	fflush
	mov	r3, #0
	str	r3, [fp, #-180]
	b	.L82
.L85:
	mov	r3, #0
	str	r3, [fp, #-176]
	b	.L83
.L84:
	ldr	r3, [fp, #-184]
	lsl	r2, r3, #9
	ldr	r3, [fp, #-180]
	add	r3, r2, r3
	lsl	r2, r3, #9
	ldr	r3, [fp, #-176]
	add	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	mov	r2, r3
	ldr	r3, [fp, #-192]
	add	r3, r3, r2
	ldrb	r3, [r3]
	strb	r3, [fp, #-187]
	ldr	r3, [fp, #-184]
	lsl	r2, r3, #9
	ldr	r3, [fp, #-180]
	add	r3, r2, r3
	lsl	r2, r3, #9
	ldr	r3, [fp, #-176]
	add	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, #1
	ldr	r2, [fp, #-192]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-186]
	ldr	r3, [fp, #-184]
	lsl	r2, r3, #9
	ldr	r3, [fp, #-180]
	add	r3, r2, r3
	lsl	r2, r3, #9
	ldr	r3, [fp, #-176]
	add	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, #2
	ldr	r2, [fp, #-192]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-185]
	ldrb	r2, [fp, #-187]	@ zero_extendqisi2
	ldrb	r1, [fp, #-186]	@ zero_extendqisi2
	ldrb	r3, [fp, #-185]	@ zero_extendqisi2
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L88+16
	ldr	r0, [fp, #-172]
	bl	fprintf
	ldr	r3, [fp, #-176]
	add	r3, r3, #1
	str	r3, [fp, #-176]
.L83:
	ldr	r2, [fp, #-176]
	ldr	r3, [fp, #-196]
	cmp	r2, r3
	blt	.L84
	ldr	r3, [fp, #-180]
	add	r3, r3, #1
	str	r3, [fp, #-180]
.L82:
	ldr	r2, [fp, #-180]
	ldr	r3, [fp, #-196]
	cmp	r2, r3
	blt	.L85
	ldr	r0, [fp, #-172]
	bl	fclose
	ldr	r3, [fp, #-184]
	add	r3, r3, #1
	str	r3, [fp, #-184]
.L81:
	ldr	r3, [fp, #-184]
	cmp	r3, #5
	ble	.L86
	nop
	ldr	r3, .L88
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L87
	bl	__stack_chk_fail
.L87:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L89:
	.align	2
.L88:
	.word	.LC11
	.word	.LC0
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	CubeToPpm, .-CubeToPpm
	.section	.rodata
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	MapToCube1
	.syntax unified
	.arm
	.fpu softvfp
	.type	MapToCube1, %function
MapToCube1:
	@ args = 4, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #80
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	str	r2, [fp, #-88]
	str	r3, [fp, #-92]
	ldr	r3, .L102
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L91
.L100:
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L92
.L99:
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L93
.L98:
	sub	r3, fp, #52
	str	r3, [sp]
	ldr	r3, [fp, #-64]
	ldr	r2, [fp, #-68]
	ldr	r1, [fp, #-72]
	ldr	r0, [fp, #4]
	bl	CubeToVec
	ldr	r3, [fp, #-84]
	sub	r3, r3, #1
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r6, r0
	mov	r7, r1
	ldr	r3, .L102+4
	ldmia	r3, {r4-r5}
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	asin
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, .L102+8
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-88]
	sub	r3, r3, #1
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	sub	r1, fp, #44
	ldmia	r1, {r0-r1}
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	bl	atan2
	ldr	r3, .L102+8
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, .L102+12
	ldmia	r3, {r2-r3}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bge	.L94
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-84]
	add	r3, r2, r3
	str	r3, [fp, #-60]
.L94:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-60]
	cmp	r2, r3
	bgt	.L95
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-84]
	sub	r3, r2, r3
	str	r3, [fp, #-60]
.L95:
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bge	.L96
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	str	r3, [fp, #-56]
.L96:
	ldr	r2, [fp, #-88]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	bgt	.L97
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	str	r3, [fp, #-56]
.L97:
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-88]
	mul	r2, r3, r2
	ldr	r3, [fp, #-56]
	add	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	mov	r2, r3
	ldr	r3, [fp, #-80]
	add	r2, r3, r2
	ldr	r3, [fp, #-72]
	ldr	r1, [fp, #4]
	mul	r1, r3, r1
	ldr	r3, [fp, #-68]
	add	r3, r1, r3
	ldr	r1, [fp, #4]
	mul	r1, r3, r1
	ldr	r3, [fp, #-64]
	add	r3, r1, r3
	mov	r1, r3
	ldr	r3, [fp, #-92]
	add	r3, r3, r1
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L93:
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #4]
	cmp	r2, r3
	blt	.L98
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L92:
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #4]
	cmp	r2, r3
	blt	.L99
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L91:
	ldr	r3, [fp, #-72]
	cmp	r3, #5
	ble	.L100
	nop
	ldr	r3, .L102
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L101
	bl	__stack_chk_fail
.L101:
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L103:
	.align	2
.L102:
	.word	.LC12
	.word	HalfPi
	.word	Pi
	.word	TwoPi
	.size	MapToCube1, .-MapToCube1
	.section	.rodata
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	PatchToNormal
	.syntax unified
	.arm
	.fpu softvfp
	.type	PatchToNormal, %function
PatchToNormal:
	@ args = 28, pretend = 0, frame = 232
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #232
	str	r0, [fp, #-240]
	str	r1, [fp, #-244]
	str	r2, [fp, #-248]
	str	r3, [fp, #-252]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-256]
	ldr	r3, [fp, #28]
	str	r3, [fp, #-260]
	ldr	r3, .L111
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-232]
	b	.L105
.L106:
	ldr	r3, [fp, #-232]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-240]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	ldr	r1, [fp, #-232]
	add	r1, r1, #6
	lsl	r1, r1, #3
	sub	r0, fp, #28
	add	r1, r0, r1
	sub	r1, r1, #80
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-232]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-248]
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-232]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-244]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-232]
	lsl	r1, r1, #3
	sub	r0, fp, #28
	add	r1, r0, r1
	sub	r1, r1, #152
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-232]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-256]
	add	r3, r2, r3
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-232]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-252]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-232]
	lsl	r1, r1, #3
	sub	r0, fp, #28
	add	r1, r0, r1
	sub	r1, r1, #128
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-232]
	add	r3, r3, #1
	str	r3, [fp, #-232]
.L105:
	ldr	r3, [fp, #-232]
	cmp	r3, #2
	ble	.L106
	sub	r3, fp, #180
	mov	r0, r3
	bl	MAGV
	str	r0, [fp, #-204]
	str	r1, [fp, #-200]
	sub	r3, fp, #156
	mov	r0, r3
	bl	MAGV
	str	r0, [fp, #-196]
	str	r1, [fp, #-192]
	sub	r3, fp, #108
	add	r2, r3, #24
	sub	r3, fp, #180
	mov	r1, r3
	ldr	r0, [fp, #-240]
	bl	VxV
	sub	r3, fp, #108
	add	r3, r3, #24
	mov	r0, r3
	bl	UNITV
	sub	r2, fp, #108
	sub	r3, fp, #108
	add	r3, r3, #24
	ldr	r1, [fp, #-240]
	mov	r0, r3
	bl	VxV
	sub	r3, fp, #108
	mov	r0, r3
	bl	UNITV
	sub	r3, fp, #204
	ldmia	r3, {r2-r3}
	add	r1, fp, #12
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-228]
	str	r3, [fp, #-224]
	sub	r3, fp, #196
	ldmia	r3, {r2-r3}
	add	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-220]
	str	r3, [fp, #-216]
	sub	r3, fp, #228
	ldmia	r3, {r2-r3}
	sub	r1, fp, #228
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r8, r2
	mov	r9, r3
	sub	r3, fp, #220
	ldmia	r3, {r2-r3}
	sub	r1, fp, #220
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r8
	mov	r1, r9
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sqrt
	str	r0, [fp, #-212]
	str	r1, [fp, #-208]
	mov	r2, #0
	ldr	r3, .L111+4
	sub	r1, fp, #212
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmpgt
	mov	r3, r0
	cmp	r3, #0
	beq	.L107
	sub	r3, fp, #212
	ldmia	r3, {r2-r3}
	mov	r0, #0
	ldr	r1, .L111+4
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #228
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-228]
	str	r3, [fp, #-224]
	sub	r3, fp, #212
	ldmia	r3, {r2-r3}
	mov	r0, #0
	ldr	r1, .L111+4
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #220
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-220]
	str	r3, [fp, #-216]
	mov	r2, #0
	ldr	r3, .L111+4
	str	r2, [fp, #-212]
	str	r3, [fp, #-208]
.L107:
	sub	r3, fp, #212
	ldmia	r3, {r2-r3}
	sub	r1, fp, #212
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, #0
	ldr	r1, .L111+8
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sqrt
	str	r0, [fp, #-188]
	str	r1, [fp, #-184]
	ldr	r6, [fp, #-228]
	ldr	r3, [fp, #-224]
	eor	r7, r3, #-2147483648
	str	r6, [fp, #-132]
	str	r7, [fp, #-128]
	ldr	r4, [fp, #-220]
	ldr	r3, [fp, #-216]
	eor	r5, r3, #-2147483648
	str	r4, [fp, #-124]
	str	r5, [fp, #-120]
	sub	r3, fp, #188
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-116]
	str	r3, [fp, #-112]
	sub	r1, fp, #132
	sub	r3, fp, #108
	ldr	r2, [fp, #-260]
	mov	r0, r3
	bl	MTxV
	ldr	r0, [fp, #-260]
	bl	UNITV
	nop
	ldr	r3, .L111
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L109
	bl	__stack_chk_fail
.L109:
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L112:
	.align	2
.L111:
	.word	.LC13
	.word	1071644672
	.word	1072693248
	.size	PatchToNormal, .-PatchToNormal
	.section	.rodata
	.align	2
.LC14:
	.ascii	"MarsDEM4096.ppm\000"
	.align	2
.LC15:
	.ascii	"./\000"
	.global	__aeabi_d2uiz
	.align	2
.LC16:
	.ascii	"MarsBump\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 360
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #412
	str	r0, [fp, #-368]
	str	r1, [fp, #-372]
	ldr	r3, .L130
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r2, .L130+4
	ldr	r3, .L130+8
	str	r2, [fp, #-292]
	str	r3, [fp, #-288]
	ldr	r1, .L130+12
	ldr	r2, .L130+16
	ldr	r3, .L130+20
	stm	r1, {r2-r3}
	ldr	r3, .L130+12
	ldmia	r3, {r0-r1}
	mov	r2, r0
	mov	r3, r1
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L130+24
	stm	r1, {r2-r3}
	ldr	r3, .L130+12
	ldmia	r3, {r0-r1}
	mov	r2, #0
	ldr	r3, .L130+28
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L130+32
	stm	r1, {r2-r3}
	mov	r2, #3
	ldr	r1, .L130+36
	ldr	r0, .L130+40
	bl	PpmToMap
	str	r0, [fp, #-296]
	ldr	r3, .L130+44
	ldr	r1, [r3]
	ldr	r3, .L130+48
	ldr	r2, [r3]
	mov	r3, #512
	str	r3, [sp]
	ldr	r3, .L130+52
	ldr	r0, [fp, #-296]
	bl	MapToCube1
	mov	r3, #0
	str	r3, [fp, #-312]
	b	.L114
.L125:
	mov	r3, #0
	str	r3, [fp, #-308]
	b	.L115
.L124:
	mov	r3, #0
	str	r3, [fp, #-304]
	b	.L116
.L123:
	sub	r3, fp, #316
	str	r3, [sp, #44]
	sub	r3, fp, #324
	str	r3, [sp, #40]
	sub	r3, fp, #348
	str	r3, [sp, #36]
	sub	r3, fp, #320
	str	r3, [sp, #32]
	sub	r3, fp, #328
	str	r3, [sp, #28]
	sub	r3, fp, #352
	str	r3, [sp, #24]
	sub	r3, fp, #332
	str	r3, [sp, #20]
	sub	r3, fp, #340
	str	r3, [sp, #16]
	sub	r3, fp, #356
	str	r3, [sp, #12]
	sub	r3, fp, #336
	str	r3, [sp, #8]
	sub	r3, fp, #344
	str	r3, [sp, #4]
	sub	r3, fp, #360
	str	r3, [sp]
	mov	r3, #512
	ldr	r2, [fp, #-304]
	ldr	r1, [fp, #-308]
	ldr	r0, [fp, #-312]
	bl	FijToNeighbors
	sub	r3, fp, #268
	str	r3, [sp]
	ldr	r3, [fp, #-304]
	ldr	r2, [fp, #-308]
	ldr	r1, [fp, #-312]
	mov	r0, #512
	bl	CubeToVec
	ldr	r1, [fp, #-352]
	ldr	r2, [fp, #-328]
	ldr	r0, [fp, #-320]
	sub	r3, fp, #244
	str	r3, [sp]
	mov	r3, r0
	mov	r0, #512
	bl	CubeToVec
	ldr	r1, [fp, #-348]
	ldr	r2, [fp, #-324]
	ldr	r0, [fp, #-316]
	sub	r3, fp, #220
	str	r3, [sp]
	mov	r3, r0
	mov	r0, #512
	bl	CubeToVec
	ldr	r1, [fp, #-360]
	ldr	r2, [fp, #-344]
	ldr	r0, [fp, #-336]
	sub	r3, fp, #196
	str	r3, [sp]
	mov	r3, r0
	mov	r0, #512
	bl	CubeToVec
	ldr	r1, [fp, #-356]
	ldr	r2, [fp, #-340]
	ldr	r0, [fp, #-332]
	sub	r3, fp, #172
	str	r3, [sp]
	mov	r3, r0
	mov	r0, #512
	bl	CubeToVec
	ldr	r3, [fp, #-356]
	lsl	r2, r3, #9
	ldr	r3, [fp, #-340]
	add	r3, r2, r3
	lsl	r2, r3, #9
	ldr	r3, [fp, #-332]
	add	r3, r2, r3
	ldr	r2, .L130+52
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-360]
	lsl	r2, r3, #9
	ldr	r3, [fp, #-344]
	add	r3, r2, r3
	lsl	r2, r3, #9
	ldr	r3, [fp, #-336]
	add	r3, r2, r3
	ldr	r2, .L130+52
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	sub	r3, r1, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #292
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-284]
	str	r3, [fp, #-280]
	ldr	r3, [fp, #-348]
	lsl	r2, r3, #9
	ldr	r3, [fp, #-324]
	add	r3, r2, r3
	lsl	r2, r3, #9
	ldr	r3, [fp, #-316]
	add	r3, r2, r3
	ldr	r2, .L130+52
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-352]
	lsl	r2, r3, #9
	ldr	r3, [fp, #-328]
	add	r3, r2, r3
	lsl	r2, r3, #9
	ldr	r3, [fp, #-320]
	add	r3, r2, r3
	ldr	r2, .L130+52
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	sub	r3, r1, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #292
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-276]
	str	r3, [fp, #-272]
	sub	lr, fp, #244
	sub	ip, fp, #172
	sub	r1, fp, #196
	sub	r0, fp, #268
	sub	r3, fp, #124
	str	r3, [sp, #24]
	sub	r3, fp, #276
	ldmia	r3, {r2-r3}
	str	r2, [sp, #16]
	str	r3, [sp, #20]
	sub	r3, fp, #284
	ldmia	r3, {r2-r3}
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	sub	r3, fp, #220
	str	r3, [sp]
	mov	r3, lr
	mov	r2, ip
	bl	PatchToNormal
	sub	r3, fp, #268
	mov	r0, r3
	bl	UNITV
	mov	r3, #0
	str	r3, [fp, #-300]
	b	.L117
.L122:
	ldr	r3, [fp, #-300]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #112
	ldmia	r3, {r0-r1}
	ldr	r3, [fp, #-300]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #256
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-300]
	lsl	r1, r1, #3
	sub	r0, fp, #12
	add	r1, r0, r1
	sub	r1, r1, #136
	stm	r1, {r2-r3}
	ldr	r3, [fp, #-300]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #136
	ldmia	r3, {r0-r1}
	mov	r2, #0
	ldr	r3, .L130+56
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	beq	.L118
	ldr	r3, [fp, #-300]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r1, r3, #136
	mov	r2, #0
	ldr	r3, .L130+56
	stm	r1, {r2-r3}
.L118:
	ldr	r3, [fp, #-300]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #136
	ldmia	r3, {r0-r1}
	mov	r2, #0
	ldr	r3, .L130+60
	bl	__aeabi_dcmpgt
	mov	r3, r0
	cmp	r3, #0
	beq	.L120
	ldr	r3, [fp, #-300]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r1, r3, #136
	mov	r2, #0
	ldr	r3, .L130+60
	stm	r1, {r2-r3}
.L120:
	ldr	r3, [fp, #-300]
	lsl	r3, r3, #3
	sub	r2, fp, #12
	add	r3, r2, r3
	sub	r3, r3, #136
	ldmia	r3, {r0-r1}
	mov	r2, #0
	ldr	r3, .L130+60
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L130+64
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #-312]
	lsl	r2, r3, #9
	ldr	r3, [fp, #-308]
	add	r3, r2, r3
	lsl	r2, r3, #9
	ldr	r3, [fp, #-304]
	add	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r2, r3, r2
	ldr	r3, [fp, #-300]
	add	r4, r2, r3
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, .L130+68
	strb	r2, [r3, r4]
	ldr	r3, [fp, #-300]
	add	r3, r3, #1
	str	r3, [fp, #-300]
.L117:
	ldr	r3, [fp, #-300]
	cmp	r3, #2
	ble	.L122
	ldr	r3, [fp, #-304]
	add	r3, r3, #1
	str	r3, [fp, #-304]
.L116:
	ldr	r3, [fp, #-304]
	cmp	r3, #512
	blt	.L123
	ldr	r3, [fp, #-308]
	add	r3, r3, #1
	str	r3, [fp, #-308]
.L115:
	ldr	r3, [fp, #-308]
	cmp	r3, #512
	blt	.L124
	ldr	r3, [fp, #-312]
	add	r3, r3, #1
	str	r3, [fp, #-312]
.L114:
	ldr	r3, [fp, #-312]
	cmp	r3, #5
	ble	.L125
	ldr	r3, .L130+72
	ldr	r2, .L130+40
	mov	r1, #512
	ldr	r0, .L130+68
	bl	CubeToPpm
	mov	r3, #0
	ldr	r2, .L130
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L127
	bl	__stack_chk_fail
.L127:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L131:
	.align	2
.L130:
	.word	.LC17
	.word	-1201243402
	.word	1057263472
	.word	Pi
	.word	1413754136
	.word	1074340347
	.word	TwoPi
	.word	1071644672
	.word	HalfPi
	.word	.LC14
	.word	.LC15
	.word	Nh
	.word	Nw
	.word	HeightCube
	.word	-1074790400
	.word	1072693248
	.word	1080025088
	.word	BumpCube
	.word	.LC16
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
