// File: /workspace/github_cpp_makefile_star2_O1/iannisdezwart[P]forcefield-visualiser/./motion.hpp
// Function: motion::four_body()
void circular()
	{
		// The fixed mass in the middle

		masses.push_back(Mass(WIDTH / 2, HEIGHT / 2, 1));

		// The moving mass

		Mass moving_mass(300, 0, 1);
		masses.push_back(moving_mass);

		// Set the rotation

		double rotation = 0.01 * 2 * M_PI;

		Matrix<2, 2> rotation_matrix({
			{ cos(rotation), -sin(rotation) },
			{ sin(rotation), cos(rotation) },
		});

		// Render 100 frames

		for (int i = 0; i < 100; i++) {
			string frame_number = to_string(i);

			if (frame_number.length() != 4) {
				frame_number = string(4 - frame_number.length(), '0') + frame_number;
			}

			// Move the moving mass

			moving_mass.position = rotation_matrix * moving_mass.position;

			// Set the moving mass in the image

			masses[1].position = masses[0].position + moving_mass.position;

			render_image("output/" + frame_number + ".png", MULTI_THREADED);

			cout << "Rendered frame " << i << "/" << "100\n";
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movsd 0x2893(%rip), %xmm0     # 0x7058
movaps %xmm0, 0xa0(%rsp)
movl $0x4, 0xb0(%rsp)
movq 0x5ab1(%rip), %rsi      # 0xa290
cmpq 0x5ab2(%rip), %rsi      # 0xa298
je 0x4809
movq 0xb0(%rsp), %rax
movq %rax, 0x10(%rsi)
movaps 0xa0(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0x5a89(%rip)     # 0xa290
jmp 0x481d
leaq 0x5a78(%rip), %rdi      # 0xa288
leaq 0xa0(%rsp), %rdx
callq 0x5560
movaps 0x292c(%rip), %xmm0     # 0x7150
leaq 0x120(%rsp), %rax
movaps %xmm0, (%rax)
leaq 0x148(%rsp), %rsi
movq %rax, (%rsi)
movl $0x2, %eax
movq %rax, 0x8(%rsi)
movaps 0x2916(%rip), %xmm0     # 0x7160
leaq 0x100(%rsp), %rbx
movaps %xmm0, (%rbx)
movq %rbx, 0x10(%rsi)
movq %rax, 0x18(%rsi)
leaq 0x168(%rsp), %rdi
movl $0x2, %edx
callq 0x51fc
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movabsq $0x4072c00000000000, %rax # imm = 0x4072C00000000000
movq %rax, 0x68(%rsp)
movl $0x3, 0x70(%rsp)
movq 0x59fb(%rip), %rsi      # 0xa290
cmpq 0x59fc(%rip), %rsi      # 0xa298
je 0x48b9
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsi)
movaps 0x60(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0x59d9(%rip)     # 0xa290
jmp 0x48ca
leaq 0x59c8(%rip), %rdi      # 0xa288
leaq 0x60(%rsp), %rdx
callq 0x5560
movaps 0x289f(%rip), %xmm0     # 0x7170
movaps %xmm0, 0x100(%rsp)
leaq 0x120(%rsp), %rsi
movq %rbx, (%rsi)
movl $0x2, %eax
movq %rax, 0x8(%rsi)
movaps 0x288c(%rip), %xmm0     # 0x7180
leaq 0x20(%rsp), %rbx
movaps %xmm0, (%rbx)
movq %rbx, 0x10(%rsi)
movq %rax, 0x18(%rsi)
leaq 0x148(%rsp), %rdi
movl $0x2, %edx
callq 0x51fc
movsd 0x2752(%rip), %xmm0     # 0x7070
movaps %xmm0, 0x80(%rsp)
movl $0x2, 0x90(%rsp)
movq 0x5958(%rip), %rsi      # 0xa290
cmpq 0x5959(%rip), %rsi      # 0xa298
je 0x4962
movq 0x90(%rsp), %rax
movq %rax, 0x10(%rsi)
movaps 0x80(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0x5930(%rip)     # 0xa290
jmp 0x4976
leaq 0x591f(%rip), %rdi      # 0xa288
leaq 0x80(%rsp), %rdx
callq 0x5560
movaps 0x2813(%rip), %xmm0     # 0x7190
movaps %xmm0, 0x20(%rsp)
leaq 0x100(%rsp), %rsi
movq %rbx, (%rsi)
movl $0x2, %eax
movq %rax, 0x8(%rsi)
movaps 0x2803(%rip), %xmm0     # 0x71a0
movq %rsp, %rbx
movaps %xmm0, (%rbx)
movq %rbx, 0x10(%rsi)
movq %rax, 0x18(%rsi)
leaq 0x120(%rsp), %rdi
movl $0x2, %edx
callq 0x51fc
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movabsq $-0x3f80c00000000000, %rax # imm = 0xC07F400000000000
movq %rax, 0x48(%rsp)
movl $0x1, 0x50(%rsp)
movq 0x58ad(%rip), %rsi      # 0xa290
cmpq 0x58ae(%rip), %rsi      # 0xa298
je 0x4a07
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsi)
movaps 0x40(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0x588b(%rip)     # 0xa290
jmp 0x4a18
leaq 0x587a(%rip), %rdi      # 0xa288
leaq 0x40(%rsp), %rdx
callq 0x5560
movaps 0x2791(%rip), %xmm0     # 0x71b0
leaq 0x10(%rsp), %rax
movaps %xmm0, -0x10(%rax)
leaq 0x20(%rsp), %r14
movq %rbx, (%r14)
movl $0x2, %eax
movq %rax, 0x8(%r14)
movaps 0x2780(%rip), %xmm0     # 0x71c0
leaq 0xc0(%rsp), %rcx
movaps %xmm0, (%rcx)
movq %rcx, 0x10(%r14)
movq %rax, 0x18(%r14)
leaq 0x100(%rsp), %rdi
movl $0x2, %edx
movq %r14, %rsi
callq 0x51fc
leaq 0xf0(%rsp), %r12
xorl %ebp, %ebp
movq 0x5557(%rip), %r15      # 0x9fd0
movl $0x1, %r13d
cmpl $0xa, %ebp
jb 0x4a9f
movl $0x2, %r13d
cmpl $0x64, %ebp
jb 0x4a9f
cmpl $0x3e8, %ebp            # imm = 0x3E8
movl $0x4, %r13d
sbbl $0x0, %r13d
movl %r13d, %esi
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %r14, %rdi
movl $0x2d, %edx
callq 0x32f0
movq 0x20(%rsp), %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0x5462
movq 0x28(%rsp), %rax
cmpq $0x4, %rax
je 0x4ba2
movl $0x4, %esi
subq %rax, %rsi
leaq 0xd0(%rsp), %rax
movq %rax, 0xc0(%rsp)
leaq 0xc0(%rsp), %r13
movq %r13, %rdi
movl $0x30, %edx
callq 0x32f0
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %r13, %rdi
callq 0x30d0
leaq 0x10(%rsp), %r13
movq %r13, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4b3c
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x4b44
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3300
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x4b7d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x4ba2
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3290
movsd 0xa0(%rsp), %xmm0
movsd 0xa8(%rsp), %xmm1
leaq 0x168(%rsp), %rdi
callq 0x525a
movsd %xmm0, 0xa0(%rsp)
movsd %xmm1, 0xa8(%rsp)
leaq 0xa0(%rsp), %rdi
movsd 0x247d(%rip), %xmm0     # 0x7060
movsd 0x247d(%rip), %xmm1     # 0x7068
callq 0x52ce
movq 0x5691(%rip), %rax      # 0xa288
movsd %xmm0, (%rax)
movsd %xmm1, 0x8(%rax)
movsd 0x60(%rsp), %xmm0
movsd 0x68(%rsp), %xmm1
leaq 0x148(%rsp), %rdi
callq 0x525a
movsd %xmm0, 0x60(%rsp)
movsd %xmm1, 0x68(%rsp)
leaq 0x60(%rsp), %rdi
movsd 0x242e(%rip), %xmm0     # 0x7060
movsd 0x242e(%rip), %xmm1     # 0x7068
callq 0x52ce
movq 0x5642(%rip), %rax      # 0xa288
movsd %xmm0, 0x18(%rax)
movsd %xmm1, 0x20(%rax)
movsd 0x80(%rsp), %xmm0
movsd 0x88(%rsp), %xmm1
leaq 0x120(%rsp), %rdi
callq 0x525a
movsd %xmm0, 0x80(%rsp)
movsd %xmm1, 0x88(%rsp)
leaq 0x80(%rsp), %rdi
movsd 0x23cf(%rip), %xmm0     # 0x7060
movsd 0x23cf(%rip), %xmm1     # 0x7068
callq 0x52ce
movq 0x55e3(%rip), %rax      # 0xa288
movsd %xmm0, 0x30(%rax)
movsd %xmm1, 0x38(%rax)
movsd 0x40(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
leaq 0x100(%rsp), %rdi
callq 0x525a
movsd %xmm0, 0x40(%rsp)
movsd %xmm1, 0x48(%rsp)
leaq 0x40(%rsp), %rdi
movsd 0x237f(%rip), %xmm0     # 0x7060
movsd 0x237f(%rip), %xmm1     # 0x7068
callq 0x52ce
movq 0x5593(%rip), %rax      # 0xa288
movsd %xmm0, 0x48(%rax)
movsd %xmm1, 0x50(%rax)
movq %rbx, %rdi
leaq 0x24c7(%rip), %rsi      # 0x71d0
movq %r14, %rdx
callq 0x5311
movq %rbx, %rdi
leaq 0x24e5(%rip), %rsi      # 0x7200
callq 0x3490
movq %r12, 0xe0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4d4c
movq %rdx, 0xe0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf0(%rsp)
jmp 0x4d54
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0xe8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xe0(%rsp), %rdi
movl $0x1, %esi
callq 0x3c44
movq 0xe0(%rsp), %rdi
cmpq %r12, %rdi
je 0x4d9e
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x3290
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4db9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
movl $0xf, %edx
movq %r15, %rdi
leaq 0x2410(%rip), %rsi      # 0x71d8
callq 0x32e0
movq %r15, %rdi
movl %ebp, %esi
callq 0x3410
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x23ed(%rip), %rsi      # 0x71d6
callq 0x32e0
movl $0x5, %edx
movq %r13, %rdi
leaq 0x23f5(%rip), %rsi      # 0x71f2
callq 0x32e0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4e1e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3290
incl %ebp
cmpl $0x640, %ebp            # imm = 0x640
jne 0x4a79
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x4eb9
movq 0xd0(%rsp), %rsi
jmp 0x4eac
jmp 0x4eb6
jmp 0x4eb6
jmp 0x4eb6
jmp 0x4eb6
jmp 0x4eb6
jmp 0x4eb6
jmp 0x4eb6
jmp 0x4eb6
jmp 0x4eb6
jmp 0x4eb6
movq %rax, %rbx
jmp 0x4e99
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
cmpq %r12, %rdi
je 0x4e99
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x3290
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4eb9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x4eb9
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4ed5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x3430