// File: /workspace/github_cpp_makefile_star2_O1/Reputeless[P]PerlinNoise/example.cpp
// Function: Test()
void Test()
{
	siv::PerlinNoise perlinA{ std::random_device{} };
	siv::PerlinNoise perlinB;

	perlinB.deserialize(perlinA.serialize());

	assert(perlinA.octave3D(0.1, 0.2, 0.3, 4)
		== perlinB.octave3D(0.1, 0.2, 0.3, 4));

	perlinA.reseed(12345u);
	perlinB.reseed(12345u);

	assert(perlinA.octave3D(0.1, 0.2, 0.3, 4)
		== perlinB.octave3D(0.1, 0.2, 0.3, 4));

	perlinA.reseed(std::mt19937{ 67890u });
	perlinB.reseed(std::mt19937{ 67890u });

	assert(perlinA.octave3D(0.1, 0.2, 0.3, 4)
		== perlinB.octave3D(0.1, 0.2, 0.3, 4));

	for (std::int32_t y = 0; y < 20; ++y)
	{
		for (std::int32_t x = 0; x < 20; ++x)
		{
			const double noise = perlinA.octave2D_01(x * 0.1, y * 0.1, 6);
			std::cout << static_cast<int>(std::floor(noise * 10) - 0.5);
		}
		std::cout << '\n';
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x15c8, %rsp           # imm = 0x15C8
leaq -0x15e8(%rbp), %rdi
callq 0x32ce
xorl %eax, %eax
movb %al, -0x160(%rbp,%rax)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x23ae
movl $0x2, %r14d
leaq -0x15e8(%rbp), %rbx
movq %rbx, %rdi
callq 0x2190
movl %eax, %eax
xorl %edx, %edx
divq %r14
movb -0x161(%rbp,%r14), %al
movb -0x160(%rbp,%rdx), %cl
movb %cl, -0x161(%rbp,%r14)
movb %al, -0x160(%rbp,%rdx)
incq %r14
cmpq $0x101, %r14            # imm = 0x101
jne 0x23cd
leaq -0x15e8(%rbp), %rdi
callq 0x2130
leaq 0x1e23(%rip), %rsi      # 0x423c
leaq -0x260(%rbp), %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
callq 0x2100
leaq -0x160(%rbp), %rbx
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
movsd 0x1bbc(%rip), %xmm2     # 0x4008
movsd 0x1bbc(%rip), %xmm1     # 0x4010
movsd 0x1bbc(%rip), %xmm3     # 0x4018
xorpd %xmm4, %xmm4
movsd 0x1bb8(%rip), %xmm5     # 0x4020
movl $0x4, %r14d
movsd %xmm5, -0x40(%rbp)
movsd %xmm4, -0x50(%rbp)
movsd %xmm3, -0x48(%rbp)
movsd %xmm1, -0x38(%rbp)
movsd %xmm2, -0x30(%rbp)
movq %rbx, %rdi
movapd %xmm3, %xmm0
movsd -0x30(%rbp), %xmm2
callq 0x371c
movsd -0x40(%rbp), %xmm5
movsd -0x50(%rbp), %xmm4
movsd -0x48(%rbp), %xmm3
movsd -0x38(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
mulsd %xmm5, %xmm0
addsd %xmm0, %xmm4
movsd 0x1b67(%rip), %xmm0     # 0x4028
addsd %xmm3, %xmm3
addsd %xmm1, %xmm1
addsd %xmm2, %xmm2
mulsd %xmm0, %xmm5
decl %r14d
jne 0x246e
movsd %xmm4, -0x50(%rbp)
movsd 0x1b25(%rip), %xmm2     # 0x4008
movsd 0x1b25(%rip), %xmm1     # 0x4010
movsd 0x1b25(%rip), %xmm0     # 0x4018
xorpd %xmm3, %xmm3
movsd 0x1b21(%rip), %xmm4     # 0x4020
movl $0x4, %r14d
leaq -0x260(%rbp), %rbx
movsd %xmm4, -0x58(%rbp)
movsd %xmm0, -0x38(%rbp)
movsd %xmm3, -0x40(%rbp)
movsd %xmm1, -0x48(%rbp)
movsd %xmm2, -0x30(%rbp)
movq %rbx, %rdi
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm2
callq 0x371c
movsd -0x58(%rbp), %xmm4
movsd -0x40(%rbp), %xmm3
movsd -0x48(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
mulsd %xmm4, %xmm0
addsd %xmm0, %xmm3
movsd -0x38(%rbp), %xmm0
addsd %xmm0, %xmm0
addsd %xmm1, %xmm1
addsd %xmm2, %xmm2
mulsd 0x1abc(%rip), %xmm4     # 0x4028
decl %r14d
jne 0x250c
movsd -0x50(%rbp), %xmm0
ucomisd %xmm3, %xmm0
jne 0x2bf9
jp 0x2bf9
movq $0x3039, -0x15e8(%rbp) # imm = 0x3039
movl $0x1, %eax
movl $0x3039, %ecx           # imm = 0x3039
movq %rcx, %rdx
shrq $0x1e, %rdx
xorl %ecx, %edx
imull $0x6c078965, %edx, %ecx # imm = 0x6C078965
addl %eax, %ecx
movq %rcx, -0x15e8(%rbp,%rax,8)
incq %rax
cmpq $0x270, %rax            # imm = 0x270
jne 0x259b
movq $0x270, -0x268(%rbp) # imm = 0x270
xorl %eax, %eax
movb %al, -0x160(%rbp,%rax)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x25cc
movl $0x2, %r14d
leaq -0x15e8(%rbp), %rbx
movq %rbx, %rdi
callq 0x3c82
xorl %edx, %edx
divq %r14
movb -0x161(%rbp,%r14), %al
movb -0x160(%rbp,%rdx), %cl
movb %cl, -0x161(%rbp,%r14)
movb %al, -0x160(%rbp,%rdx)
incq %r14
cmpq $0x101, %r14            # imm = 0x101
jne 0x25eb
movq $0x3039, -0x15e8(%rbp) # imm = 0x3039
movl $0x1, %eax
movl $0x3039, %ecx           # imm = 0x3039
movq %rcx, %rdx
shrq $0x1e, %rdx
xorl %ecx, %edx
imull $0x6c078965, %edx, %ecx # imm = 0x6C078965
addl %eax, %ecx
movq %rcx, -0x15e8(%rbp,%rax,8)
incq %rax
cmpq $0x270, %rax            # imm = 0x270
jne 0x2637
movq $0x270, -0x268(%rbp) # imm = 0x270
xorl %eax, %eax
movb %al, -0x260(%rbp,%rax)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x2668
movl $0x2, %r14d
leaq -0x15e8(%rbp), %rbx
movq %rbx, %rdi
callq 0x3c82
xorl %edx, %edx
divq %r14
movb -0x261(%rbp,%r14), %al
movb -0x260(%rbp,%rdx), %cl
movb %cl, -0x261(%rbp,%r14)
movb %al, -0x260(%rbp,%rdx)
incq %r14
cmpq $0x101, %r14            # imm = 0x101
jne 0x2687
movsd 0x1942(%rip), %xmm2     # 0x4008
movsd 0x1942(%rip), %xmm1     # 0x4010
movsd 0x1942(%rip), %xmm3     # 0x4018
xorpd %xmm4, %xmm4
movsd 0x193e(%rip), %xmm5     # 0x4020
movl $0x4, %r14d
leaq -0x160(%rbp), %rbx
movsd %xmm5, -0x40(%rbp)
movsd %xmm4, -0x50(%rbp)
movsd %xmm3, -0x48(%rbp)
movsd %xmm1, -0x38(%rbp)
movsd %xmm2, -0x30(%rbp)
movq %rbx, %rdi
movapd %xmm3, %xmm0
movsd -0x30(%rbp), %xmm2
callq 0x371c
movsd -0x40(%rbp), %xmm5
movsd -0x50(%rbp), %xmm4
movsd -0x48(%rbp), %xmm3
movsd -0x38(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
mulsd %xmm5, %xmm0
addsd %xmm0, %xmm4
movsd 0x18e6(%rip), %xmm0     # 0x4028
addsd %xmm3, %xmm3
addsd %xmm1, %xmm1
addsd %xmm2, %xmm2
mulsd %xmm0, %xmm5
decl %r14d
jne 0x26ef
movsd %xmm4, -0x50(%rbp)
movsd 0x18a4(%rip), %xmm2     # 0x4008
movsd 0x18a4(%rip), %xmm1     # 0x4010
movsd 0x18a4(%rip), %xmm0     # 0x4018
xorpd %xmm3, %xmm3
movsd 0x18a0(%rip), %xmm4     # 0x4020
movl $0x4, %r14d
leaq -0x260(%rbp), %rbx
movsd %xmm4, -0x58(%rbp)
movsd %xmm0, -0x38(%rbp)
movsd %xmm3, -0x40(%rbp)
movsd %xmm1, -0x48(%rbp)
movsd %xmm2, -0x30(%rbp)
movq %rbx, %rdi
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm2
callq 0x371c
movsd -0x58(%rbp), %xmm4
movsd -0x40(%rbp), %xmm3
movsd -0x48(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
mulsd %xmm4, %xmm0
addsd %xmm0, %xmm3
movsd -0x38(%rbp), %xmm0
addsd %xmm0, %xmm0
addsd %xmm1, %xmm1
addsd %xmm2, %xmm2
mulsd 0x183b(%rip), %xmm4     # 0x4028
decl %r14d
jne 0x278d
movsd -0x50(%rbp), %xmm0
ucomisd %xmm3, %xmm0
jne 0x2c18
jp 0x2c18
movq $0x10932, -0x15e8(%rbp) # imm = 0x10932
movl $0x1, %eax
movl $0x10932, %ecx          # imm = 0x10932
movq %rcx, %rdx
shrq $0x1e, %rdx
xorl %ecx, %edx
imull $0x6c078965, %edx, %ecx # imm = 0x6C078965
addl %eax, %ecx
movq %rcx, -0x15e8(%rbp,%rax,8)
incq %rax
cmpq $0x270, %rax            # imm = 0x270
jne 0x281c
movq $0x270, -0x268(%rbp) # imm = 0x270
xorl %eax, %eax
movb %al, -0x160(%rbp,%rax)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x284d
movl $0x2, %r14d
leaq -0x15e8(%rbp), %rbx
movq %rbx, %rdi
callq 0x3c82
xorl %edx, %edx
divq %r14
movb -0x161(%rbp,%r14), %al
movb -0x160(%rbp,%rdx), %cl
movb %cl, -0x161(%rbp,%r14)
movb %al, -0x160(%rbp,%rdx)
incq %r14
cmpq $0x101, %r14            # imm = 0x101
jne 0x286c
movq $0x10932, -0x15e8(%rbp) # imm = 0x10932
movl $0x1, %eax
movl $0x10932, %ecx          # imm = 0x10932
movq %rcx, %rdx
shrq $0x1e, %rdx
xorl %ecx, %edx
imull $0x6c078965, %edx, %ecx # imm = 0x6C078965
addl %eax, %ecx
movq %rcx, -0x15e8(%rbp,%rax,8)
incq %rax
cmpq $0x270, %rax            # imm = 0x270
jne 0x28b8
movq $0x270, -0x268(%rbp) # imm = 0x270
xorl %eax, %eax
movb %al, -0x260(%rbp,%rax)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x28e9
movl $0x2, %r14d
leaq -0x15e8(%rbp), %rbx
movq %rbx, %rdi
callq 0x3c82
xorl %edx, %edx
divq %r14
movb -0x261(%rbp,%r14), %al
movb -0x260(%rbp,%rdx), %cl
movb %cl, -0x261(%rbp,%r14)
movb %al, -0x260(%rbp,%rdx)
incq %r14
cmpq $0x101, %r14            # imm = 0x101
jne 0x2908
movsd 0x16c1(%rip), %xmm2     # 0x4008
movsd 0x16c1(%rip), %xmm1     # 0x4010
movsd 0x16c1(%rip), %xmm3     # 0x4018
xorpd %xmm4, %xmm4
movsd 0x16bd(%rip), %xmm5     # 0x4020
movl $0x4, %r14d
leaq -0x160(%rbp), %rbx
movsd %xmm5, -0x40(%rbp)
movsd %xmm4, -0x50(%rbp)
movsd %xmm3, -0x48(%rbp)
movsd %xmm1, -0x38(%rbp)
movsd %xmm2, -0x30(%rbp)
movq %rbx, %rdi
movapd %xmm3, %xmm0
movsd -0x30(%rbp), %xmm2
callq 0x371c
movsd -0x40(%rbp), %xmm5
movsd -0x50(%rbp), %xmm4
movsd -0x48(%rbp), %xmm3
movsd -0x38(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
mulsd %xmm5, %xmm0
addsd %xmm0, %xmm4
movsd 0x1665(%rip), %xmm0     # 0x4028
addsd %xmm3, %xmm3
addsd %xmm1, %xmm1
addsd %xmm2, %xmm2
mulsd %xmm0, %xmm5
decl %r14d
jne 0x2970
movsd %xmm4, -0x50(%rbp)
movsd 0x1623(%rip), %xmm2     # 0x4008
movsd 0x1623(%rip), %xmm1     # 0x4010
movsd 0x1623(%rip), %xmm0     # 0x4018
xorpd %xmm3, %xmm3
movsd 0x161f(%rip), %xmm4     # 0x4020
movl $0x4, %r14d
leaq -0x260(%rbp), %rbx
movsd %xmm4, -0x58(%rbp)
movsd %xmm0, -0x38(%rbp)
movsd %xmm3, -0x40(%rbp)
movsd %xmm1, -0x48(%rbp)
movsd %xmm2, -0x30(%rbp)
movq %rbx, %rdi
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm2
callq 0x371c
movsd -0x58(%rbp), %xmm4
movsd -0x40(%rbp), %xmm3
movsd -0x48(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
mulsd %xmm4, %xmm0
addsd %xmm0, %xmm3
movsd -0x38(%rbp), %xmm0
addsd %xmm0, %xmm0
addsd %xmm1, %xmm1
addsd %xmm2, %xmm2
mulsd 0x15ba(%rip), %xmm4     # 0x4028
decl %r14d
jne 0x2a0e
movsd -0x50(%rbp), %xmm0
ucomisd %xmm3, %xmm0
jne 0x2c37
jp 0x2c37
xorl %r12d, %r12d
xorpd %xmm0, %xmm0
movsd 0x1589(%rip), %xmm1     # 0x4020
leaq -0x160(%rbp), %rbx
movq 0x352b(%rip), %r14      # 0x5fd0
movsd %xmm0, -0x60(%rbp)
mulsd 0x1566(%rip), %xmm0     # 0x4018
movsd %xmm0, -0x58(%rbp)
xorpd %xmm3, %xmm3
xorl %r13d, %r13d
movsd %xmm3, -0x40(%rbp)
mulsd 0x154d(%rip), %xmm3     # 0x4018
xorpd %xmm2, %xmm2
movl $0x6, %r15d
movapd %xmm1, %xmm4
movsd -0x58(%rbp), %xmm1
movsd %xmm1, -0x48(%rbp)
movsd %xmm4, -0x50(%rbp)
movsd %xmm3, -0x38(%rbp)
movsd %xmm2, -0x30(%rbp)
movq %rbx, %rdi
movapd %xmm3, %xmm0
movsd 0x152f(%rip), %xmm2     # 0x4030
callq 0x371c
movsd -0x48(%rbp), %xmm1
movsd -0x50(%rbp), %xmm4
movsd -0x38(%rbp), %xmm3
movsd -0x30(%rbp), %xmm2
mulsd %xmm4, %xmm0
addsd %xmm0, %xmm2
addsd %xmm3, %xmm3
addsd %xmm1, %xmm1
mulsd 0x14f6(%rip), %xmm4     # 0x4028
decl %r15d
jne 0x2ade
xorpd %xmm0, %xmm0
movsd 0x14f5(%rip), %xmm1     # 0x4038
ucomisd %xmm2, %xmm1
jae 0x2b77
ucomisd 0x14cf(%rip), %xmm2     # 0x4020
movsd 0x14e7(%rip), %xmm0     # 0x4040
jae 0x2b77
movsd 0x14c5(%rip), %xmm0     # 0x4028
mulsd %xmm0, %xmm2
addsd %xmm0, %xmm2
mulsd 0x14cd(%rip), %xmm2     # 0x4040
movapd %xmm2, %xmm0
callq 0x21e0
addsd 0x14c4(%rip), %xmm0     # 0x4048
cvttsd2si %xmm0, %esi
movq %r14, %rdi
callq 0x2200
movsd 0x1488(%rip), %xmm1     # 0x4020
movsd -0x40(%rbp), %xmm3
addsd %xmm1, %xmm3
incl %r13d
cmpl $0x14, %r13d
jne 0x2abe
movb $0xa, -0x15e8(%rbp)
movl $0x1, %edx
movq %r14, %rdi
leaq -0x15e8(%rbp), %rsi
callq 0x2160
movsd 0x144f(%rip), %xmm1     # 0x4020
movsd -0x60(%rbp), %xmm0
addsd %xmm1, %xmm0
incl %r12d
cmpl $0x14, %r12d
jne 0x2aa5
addq $0x15c8, %rsp           # imm = 0x15C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1480(%rip), %rdi      # 0x4080
leaq 0x14c2(%rip), %rsi      # 0x40c9
leaq 0x14c7(%rip), %rcx      # 0x40d5
movl $0x86, %edx
callq 0x20a0
leaq 0x1461(%rip), %rdi      # 0x4080
leaq 0x14a3(%rip), %rsi      # 0x40c9
leaq 0x14a8(%rip), %rcx      # 0x40d5
movl $0x8c, %edx
callq 0x20a0
leaq 0x1442(%rip), %rdi      # 0x4080
leaq 0x1484(%rip), %rsi      # 0x40c9
leaq 0x1489(%rip), %rcx      # 0x40d5
movl $0x92, %edx
callq 0x20a0
jmp 0x2c6f
movq %rax, %rbx
leaq -0x15e8(%rbp), %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2220
movq %rax, %rdi
callq 0x366b