// File: /workspace/github_cpp_makefile_star2_O2/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 0x58c4(%rip), %rbx      # 0x8180
leaq 0x277f(%rip), %rsi      # 0x5042
movq %rbx, %rdi
callq 0x2b12
leaq 0x2782(%rip), %rsi      # 0x5054
movq %rbx, %rdi
callq 0x2b64
leaq 0x2788(%rip), %rsi      # 0x5069
movq %rbx, %rdi
callq 0x2be0
leaq 0x2790(%rip), %rsi      # 0x5080
movq %rbx, %rdi
callq 0x2c5c
leaq 0x2798(%rip), %rsi      # 0x5097
movq %rbx, %rdi
callq 0x2cd8
movq %rbx, %rdi
callq 0x2d24
movq 0x56da(%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 0x2770(%rip), %rsi      # 0x50c2
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2d68
andq $0x0, (%r14)
leaq 0x2764(%rip), %rsi      # 0x50cc
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
callq 0x2dc0
movabsq $0x200000001, %rax      # imm = 0x200000001
leaq -0x44(%rbp), %rsi
movq %rax, (%rsi)
movl $0x3, 0x8(%rsi)
leaq -0x38(%rbp), %rdi
pushq $0x3
popq %rdx
leaq -0x11(%rbp), %rcx
callq 0x2e70
leaq 0x57dd(%rip), %rdi      # 0x8180
leaq 0x272b(%rip), %rsi      # 0x50d5
leaq -0x38(%rbp), %rdx
callq 0x2e18
leaq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x4114
movabsq $0x300000002, %rax      # imm = 0x300000002
movq %rax, (%rbx)
leaq 0x57ad(%rip), %rdi      # 0x8180
leaq 0x2704(%rip), %rsi      # 0x50de
leaq -0x38(%rbp), %rdx
callq 0x2ea6
leaq 0x26fe(%rip), %rsi      # 0x50e8
leaq -0x38(%rbp), %rdi
leaq -0x44(%rbp), %rdx
callq 0x2080
leaq 0x5782(%rip), %rdi      # 0x8180
leaq -0x38(%rbp), %rsi
callq 0x2efe
leaq -0x38(%rbp), %rdi
callq 0x20d0
movl $0x1e240, %edi          # imm = 0x1E240
callq 0x21e0
leaq 0x26c7(%rip), %rsi      # 0x50e8
leaq -0x38(%rbp), %rdi
leaq -0x44(%rbp), %rdx
callq 0x2080
leaq 0x574b(%rip), %rdi      # 0x8180
leaq -0x38(%rbp), %rsi
callq 0x2fd4
leaq -0x38(%rbp), %rdi
callq 0x20d0
leaq 0x26a0(%rip), %rsi      # 0x50ee
leaq -0x38(%rbp), %rdi
leaq -0x44(%rbp), %rdx
callq 0x2080
leaq 0x571e(%rip), %rdi      # 0x8180
leaq -0x38(%rbp), %rsi
callq 0x3158
leaq -0x38(%rbp), %rdi
callq 0x20d0
leaq 0x2673(%rip), %rsi      # 0x50ee
leaq -0x38(%rbp), %rdi
leaq -0x44(%rbp), %rdx
callq 0x2080
leaq 0x56f1(%rip), %rdi      # 0x8180
leaq -0x38(%rbp), %rsi
callq 0x3158
leaq -0x38(%rbp), %rdi
callq 0x20d0
leaq 0x2646(%rip), %rsi      # 0x50ee
leaq -0x38(%rbp), %rdi
leaq -0x44(%rbp), %rdx
callq 0x2080
leaq 0x56c4(%rip), %rdi      # 0x8180
leaq -0x38(%rbp), %rsi
callq 0x323a
leaq -0x38(%rbp), %rdi
callq 0x20d0
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x2ae9
jmp 0x2b07
jmp 0x2ae9
jmp 0x2b07
jmp 0x2ae9
jmp 0x2b07
jmp 0x2ae9
jmp 0x2b07
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x20d0
jmp 0x2b0a
jmp 0x2b07
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x4114
jmp 0x2b0a
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2280