// File: /workspace/github_cpp_makefile_star2_O1/111116[P]console/example_advanced.cpp
// Function: main
int main()
{
	// console.loglevel = 3; // error only
	// console.loglevel = 2; // warning & above
	// console.loglevel = 1; // info & above
	// console.loglevel = 0; // logs, timers, counters & above (default)
	console.log("Here prints a log");
	console.info("Here prints an info.");
	console.warn("Here prints a warning!");
	console.error("Here prints an error!!");
	// debugs are not affected by loglevel
	console.debug("This won't be visible if NDEBUG is defined");
	console.log();

	// it's just a wrapper of std::cerr, so you can use iomanip
	std::cerr << std::fixed << std::setprecision(2);
	console.log("PI approx", acos(-1));
	// custom data structures can be used when operator<< is defined
	console.log("a struct", A());
	console.log("a vector", std::vector<int>({1,2,3}));
	console.log("std::pair", std::pair<int,int>(2,3));

	// timer label can be omitted
	console.time("total");
	usleep(123456);
	// use console.timeLog if you don't want to stop the timer
	console.timeEnd("total");

	// counter label can be omitted
	console.count("test");
	// it returns the corresponding count value
	int t = console.count("test");
	console.countReset("test");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
leaq 0x575c(%rip), %rbx      # 0x8178
leaq 0x261f(%rip), %rsi      # 0x5042
movq %rbx, %rdi
callq 0x2cba
leaq 0x2622(%rip), %rsi      # 0x5054
movq %rbx, %rdi
callq 0x2d26
leaq 0x2628(%rip), %rsi      # 0x5069
movq %rbx, %rdi
callq 0x2dc4
leaq 0x2630(%rip), %rsi      # 0x5080
movq %rbx, %rdi
callq 0x2e62
leaq 0x2638(%rip), %rsi      # 0x5097
movq %rbx, %rdi
callq 0x2f00
movq %rbx, %rdi
callq 0x2f5c
movq 0x557a(%rip), %rax      # 0x7ff0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl $0xfffffefb, %esi       # imm = 0xFFFFFEFB
andl 0x18(%rax,%rdx), %esi
orl $0x4, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x2, 0x8(%rax,%rcx)
movabsq $0x400921fb54442d18, %rax # imm = 0x400921FB54442D18
leaq -0x38(%rbp), %r14
movq %rax, (%r14)
leaq 0x2610(%rip), %rsi      # 0x50c2
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2fd6
movq $0x0, (%r14)
leaq 0x2601(%rip), %rsi      # 0x50cc
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
callq 0x3046
movabsq $0x200000001, %rax      # imm = 0x200000001
leaq -0x44(%rbp), %rsi
movq %rax, (%rsi)
movl $0x3, 0x8(%rsi)
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rcx
movl $0x3, %edx
callq 0x3126
leaq 0x5670(%rip), %rdi      # 0x8178
leaq 0x25c6(%rip), %rsi      # 0x50d5
leaq -0x38(%rbp), %rdx
callq 0x30b6
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x2b26
callq 0x2160
movabsq $0x300000002, %rax      # imm = 0x300000002
leaq -0x38(%rbp), %rdx
movq %rax, (%rdx)
leaq 0x563a(%rip), %rdi      # 0x8178
leaq 0x2599(%rip), %rsi      # 0x50de
callq 0x3164
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x258f(%rip), %rsi      # 0x50e8
leaq 0x258d(%rip), %rdx      # 0x50ed
leaq -0x38(%rbp), %rdi
callq 0x456e
leaq 0x5608(%rip), %rdi      # 0x8178
leaq -0x38(%rbp), %rsi
callq 0x31d4
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x2b87
callq 0x2160
movl $0x1e240, %edi          # imm = 0x1E240
callq 0x21d0
leaq -0x38(%rbp), %rdi
movq %r14, (%rdi)
leaq 0x2549(%rip), %rsi      # 0x50e8
leaq 0x2547(%rip), %rdx      # 0x50ed
callq 0x456e
leaq 0x55c6(%rip), %rdi      # 0x8178
leaq -0x38(%rbp), %rsi
callq 0x3312
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x2bc9
callq 0x2160
leaq -0x38(%rbp), %rdi
movq %r14, (%rdi)
leaq 0x2517(%rip), %rsi      # 0x50ee
leaq 0x2514(%rip), %rdx      # 0x50f2
callq 0x456e
leaq 0x558e(%rip), %rdi      # 0x8178
leaq -0x38(%rbp), %rsi
callq 0x359e
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x2c01
callq 0x2160
leaq -0x38(%rbp), %rdi
movq %r14, (%rdi)
leaq 0x24df(%rip), %rsi      # 0x50ee
leaq 0x24dc(%rip), %rdx      # 0x50f2
callq 0x456e
leaq 0x5556(%rip), %rdi      # 0x8178
leaq -0x38(%rbp), %rsi
callq 0x359e
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x2c39
callq 0x2160
leaq -0x38(%rbp), %rdi
movq %r14, (%rdi)
leaq 0x24a7(%rip), %rsi      # 0x50ee
leaq 0x24a4(%rip), %rdx      # 0x50f2
callq 0x456e
leaq 0x551e(%rip), %rdi      # 0x8178
leaq -0x38(%rbp), %rsi
callq 0x3712
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x2c71
callq 0x2160
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x2c8c
jmp 0x2caf
jmp 0x2c8c
jmp 0x2caf
jmp 0x2c8c
jmp 0x2caf
jmp 0x2c8c
jmp 0x2caf
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x2cb2
callq 0x2160
jmp 0x2cb2
jmp 0x2caf
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
jne 0x2c98
jmp 0x2cb2
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2270