// File: /workspace/github_cpp_makefile_star2_O2/shirookad[P]propcpp/main.cpp
// Function: main
int main(int argc, char *argv[]) {
	test1 t1;
	auto test1nanos = measure_block([&t1]() {
		for (unsigned long long i = 0; i < 1000000; ++i) {
			t1.count = 5;
		}
	});
	
	test2 t2;
	auto test2nanos = measure_block([&t2]() {
		for (unsigned long long i = 0; i < 1000000; ++i) {
			t2.setCount(5);
		}
	});

	test3 t3;
	auto test3nanos = measure_block([&t3]() {
		for (unsigned long long i = 0; i < 1000000; ++i) {
			t3.count.set(5);
		}
	});

	observerTest t4;
	auto test4nanos = measure_block([&t4]() {
		for (unsigned long long i = 0; i < 1000000; ++i) {
			t4.someOtherVal.set(5);
		}
	});
	
	t4.strVal.set("Hello");
	t4.strVal.set(t4.strVal.get() + ", World");
	
	int a = (int)t4.intVal;
	
	std::cout << "test1: " << test1nanos << std::endl;
	std::cout << "test2: " << test2nanos << std::endl;
	std::cout << "test3: " << test3nanos << std::endl;
	std::cout << "test4: " << test4nanos << std::endl;
	
	return 0;	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
leaq -0x130(%rbp), %rdi
andq $0x0, 0x8(%rdi)
leaq -0x5c(%rbp), %rax
movq %rax, (%rdi)
leaq 0x232(%rip), %rax       # 0x14dc
movq %rax, 0x18(%rdi)
leaq 0x237(%rip), %rax       # 0x14ec
movq %rax, 0x10(%rdi)
callq 0x15ea
movq %rax, %r12
leaq -0x130(%rbp), %rbx
movq %rbx, %rdi
callq 0x1912
andq $0x0, 0x8(%rbx)
leaq -0x58(%rbp), %rax
movq %rax, (%rbx)
leaq 0x233(%rip), %rax       # 0x1516
movq %rax, 0x18(%rbx)
leaq 0x238(%rip), %rax       # 0x1526
movq %rax, 0x10(%rbx)
leaq -0x130(%rbp), %rdi
callq 0x15ea
movq %rax, %r15
movq %rbx, %rdi
callq 0x1912
andq $0x0, 0x8(%rbx)
leaq -0x54(%rbp), %rax
movq %rax, (%rbx)
leaq 0x234(%rip), %rax       # 0x1550
movq %rax, 0x18(%rbx)
leaq 0x239(%rip), %rax       # 0x1560
movq %rax, 0x10(%rbx)
leaq -0x130(%rbp), %rdi
callq 0x15ea
movq %rax, %r14
movq %rbx, %rdi
callq 0x1912
movq %rbx, %rdi
callq 0x1612
leaq -0x50(%rbp), %rdi
andq $0x0, 0x8(%rdi)
movq %rbx, (%rdi)
leaq 0x22d(%rip), %rax       # 0x158a
movq %rax, 0x18(%rdi)
leaq 0x258(%rip), %rax       # 0x15c0
movq %rax, 0x10(%rdi)
callq 0x15ea
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x1912
leaq 0xc80(%rip), %rsi       # 0x2004
leaq -0x50(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x1060
leaq -0xc8(%rbp), %r13
leaq -0x50(%rbp), %rsi
movq %r13, %rdi
callq 0x1778
leaq -0x50(%rbp), %rdi
callq 0x1080
leaq 0xc56(%rip), %rdx       # 0x200a
leaq -0x50(%rbp), %rdi
movq %r13, %rsi
callq 0x17df
leaq -0x50(%rbp), %rsi
movq %r13, %rdi
callq 0x1778
leaq -0x50(%rbp), %rdi
callq 0x1080
movq 0x2bfc(%rip), %rdi      # 0x3fd8
leaq 0xc2f(%rip), %rsi       # 0x2012
callq 0x10e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x10d0
movq %rax, %rdi
callq 0x1090
movq 0x2bd6(%rip), %rdi      # 0x3fd8
leaq 0xc11(%rip), %rsi       # 0x201a
callq 0x10e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x10d0
movq %rax, %rdi
callq 0x1090
movq 0x2bb0(%rip), %rdi      # 0x3fd8
leaq 0xbf3(%rip), %rsi       # 0x2022
callq 0x10e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x10d0
movq %rax, %rdi
callq 0x1090
movq 0x2b8a(%rip), %rdi      # 0x3fd8
leaq 0xbd5(%rip), %rsi       # 0x202a
callq 0x10e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x10d0
movq %rax, %rdi
callq 0x1090
leaq -0x130(%rbp), %rdi
callq 0x1818
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1491
jmp 0x14c4
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x1080
jmp 0x14c7
jmp 0x14c4
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x1912
jmp 0x14c7
jmp 0x14b3
jmp 0x14b3
movq %rax, %rbx
leaq -0x130(%rbp), %rdi
callq 0x1912
jmp 0x14d3
movq %rax, %rbx
leaq -0x130(%rbp), %rdi
callq 0x1818
movq %rbx, %rdi
callq 0x1120
nop