// File: /workspace/github_cpp_makefile_star2_O3/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 0x329a
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 -0x260(%rbp), %rdi
leaq -0x160(%rbp), %rbx
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rsi
callq 0x2100
movsd 0x1bd3(%rip), %xmm2     # 0x4008
movsd 0x1bd3(%rip), %xmm1     # 0x4010
movsd 0x1bd3(%rip), %xmm3     # 0x4018
xorpd %xmm4, %xmm4
movsd 0x1bcf(%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 0x36ec
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 0x1b7e(%rip), %xmm0     # 0x4028
addsd %xmm3, %xmm3
addsd %xmm1, %xmm1
addsd %xmm2, %xmm2
mulsd %xmm0, %xmm5
decl %r14d
jne 0x2457
movsd %xmm4, -0x50(%rbp)
movsd 0x1b3c(%rip), %xmm2     # 0x4008
movsd 0x1b3c(%rip), %xmm1     # 0x4010
movsd 0x1b3c(%rip), %xmm0     # 0x4018
xorpd %xmm3, %xmm3
movsd 0x1b38(%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 0x36ec
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 0x1ad3(%rip), %xmm4     # 0x4028
decl %r14d
jne 0x24f5
movsd -0x50(%rbp), %xmm0
ucomisd %xmm3, %xmm0
jne 0x2be2
jp 0x2be2
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 0x2584
movq $0x270, -0x268(%rbp) # imm = 0x270
xorl %eax, %eax
movb %al, -0x160(%rbp,%rax)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x25b5
movl $0x2, %r14d
leaq -0x15e8(%rbp), %rbx
movq %rbx, %rdi
callq 0x3c52
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 0x25d4
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 0x2620
movq $0x270, -0x268(%rbp) # imm = 0x270
xorl %eax, %eax
movb %al, -0x260(%rbp,%rax)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x2651
movl $0x2, %r14d
leaq -0x15e8(%rbp), %rbx
movq %rbx, %rdi
callq 0x3c52
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 0x2670
movsd 0x1959(%rip), %xmm2     # 0x4008
movsd 0x1959(%rip), %xmm1     # 0x4010
movsd 0x1959(%rip), %xmm3     # 0x4018
xorpd %xmm4, %xmm4
movsd 0x1955(%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 0x36ec
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 0x18fd(%rip), %xmm0     # 0x4028
addsd %xmm3, %xmm3
addsd %xmm1, %xmm1
addsd %xmm2, %xmm2
mulsd %xmm0, %xmm5
decl %r14d
jne 0x26d8
movsd %xmm4, -0x50(%rbp)
movsd 0x18bb(%rip), %xmm2     # 0x4008
movsd 0x18bb(%rip), %xmm1     # 0x4010
movsd 0x18bb(%rip), %xmm0     # 0x4018
xorpd %xmm3, %xmm3
movsd 0x18b7(%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 0x36ec
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 0x1852(%rip), %xmm4     # 0x4028
decl %r14d
jne 0x2776
movsd -0x50(%rbp), %xmm0
ucomisd %xmm3, %xmm0
jne 0x2c01
jp 0x2c01
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 0x2805
movq $0x270, -0x268(%rbp) # imm = 0x270
xorl %eax, %eax
movb %al, -0x160(%rbp,%rax)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x2836
movl $0x2, %r14d
leaq -0x15e8(%rbp), %rbx
movq %rbx, %rdi
callq 0x3c52
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 0x2855
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 0x28a1
movq $0x270, -0x268(%rbp) # imm = 0x270
xorl %eax, %eax
movb %al, -0x260(%rbp,%rax)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x28d2
movl $0x2, %r14d
leaq -0x15e8(%rbp), %rbx
movq %rbx, %rdi
callq 0x3c52
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 0x28f1
movsd 0x16d8(%rip), %xmm2     # 0x4008
movsd 0x16d8(%rip), %xmm1     # 0x4010
movsd 0x16d8(%rip), %xmm3     # 0x4018
xorpd %xmm4, %xmm4
movsd 0x16d4(%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 0x36ec
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 0x167c(%rip), %xmm0     # 0x4028
addsd %xmm3, %xmm3
addsd %xmm1, %xmm1
addsd %xmm2, %xmm2
mulsd %xmm0, %xmm5
decl %r14d
jne 0x2959
movsd %xmm4, -0x50(%rbp)
movsd 0x163a(%rip), %xmm2     # 0x4008
movsd 0x163a(%rip), %xmm1     # 0x4010
movsd 0x163a(%rip), %xmm0     # 0x4018
xorpd %xmm3, %xmm3
movsd 0x1636(%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 0x36ec
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 0x15d1(%rip), %xmm4     # 0x4028
decl %r14d
jne 0x29f7
movsd -0x50(%rbp), %xmm0
ucomisd %xmm3, %xmm0
jne 0x2c20
jp 0x2c20
xorl %r12d, %r12d
xorpd %xmm0, %xmm0
movsd 0x15a0(%rip), %xmm1     # 0x4020
leaq -0x160(%rbp), %rbx
movq 0x3542(%rip), %r14      # 0x5fd0
movsd %xmm0, -0x60(%rbp)
mulsd 0x157d(%rip), %xmm0     # 0x4018
movsd %xmm0, -0x58(%rbp)
xorpd %xmm3, %xmm3
xorl %r13d, %r13d
movsd %xmm3, -0x40(%rbp)
mulsd 0x1564(%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 0x1546(%rip), %xmm2     # 0x4030
callq 0x36ec
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 0x150d(%rip), %xmm4     # 0x4028
decl %r15d
jne 0x2ac7
xorpd %xmm0, %xmm0
movsd 0x150c(%rip), %xmm1     # 0x4038
ucomisd %xmm2, %xmm1
jae 0x2b60
ucomisd 0x14e6(%rip), %xmm2     # 0x4020
movsd 0x14fe(%rip), %xmm0     # 0x4040
jae 0x2b60
movsd 0x14dc(%rip), %xmm0     # 0x4028
mulsd %xmm0, %xmm2
addsd %xmm0, %xmm2
mulsd 0x14e4(%rip), %xmm2     # 0x4040
movapd %xmm2, %xmm0
callq 0x21e0
addsd 0x14db(%rip), %xmm0     # 0x4048
cvttsd2si %xmm0, %esi
movq %r14, %rdi
callq 0x2200
movsd 0x149f(%rip), %xmm1     # 0x4020
movsd -0x40(%rbp), %xmm3
addsd %xmm1, %xmm3
incl %r13d
cmpl $0x14, %r13d
jne 0x2aa7
movb $0xa, -0x15e8(%rbp)
movl $0x1, %edx
movq %r14, %rdi
leaq -0x15e8(%rbp), %rsi
callq 0x2160
movsd 0x1466(%rip), %xmm1     # 0x4020
movsd -0x60(%rbp), %xmm0
addsd %xmm1, %xmm0
incl %r12d
cmpl $0x14, %r12d
jne 0x2a8e
addq $0x15c8, %rsp           # imm = 0x15C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1497(%rip), %rdi      # 0x4080
leaq 0x14d9(%rip), %rsi      # 0x40c9
leaq 0x14de(%rip), %rcx      # 0x40d5
movl $0x86, %edx
callq 0x20a0
leaq 0x1478(%rip), %rdi      # 0x4080
leaq 0x14ba(%rip), %rsi      # 0x40c9
leaq 0x14bf(%rip), %rcx      # 0x40d5
movl $0x8c, %edx
callq 0x20a0
leaq 0x1459(%rip), %rdi      # 0x4080
leaq 0x149b(%rip), %rsi      # 0x40c9
leaq 0x14a0(%rip), %rcx      # 0x40d5
movl $0x92, %edx
callq 0x20a0
jmp 0x2c58
movq %rax, %rbx
leaq -0x15e8(%rbp), %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2220
movq %rax, %rdi
callq 0x363c