// File: TheStanian[P]Args/main.cpp
// Function: main
int main(int argc, char *argv[]) {
	/* It's as simple as creating an instance of ArgsHandler! */
	ArgsHandler args(argc, argv, true);

	/* Printing all args could be useful for debugging purposes. */
	std::cout << args << std::endl;

	// Checking for flag "flag" (-flag)
	if (args.hasFlag("flag")) {
		std::cout << "We have a flag called flag!" << std::endl;
	}

	/* Checking for a flag's value (-flag=value) */
	if (args.hasFlag("flag")) {
		std::cout << "It even has a value of \"" << args.getFlagValueString("flag") << "\"!" << std::endl;
	}

	/* No need to ensure the flag actually has been set, as you can easily provide a default! */
	if (!args.hasFlag("flag")) {
		std::cout << "There is no flag called flag, but we can still get the default value of \""
				<< args.getFlagValueString("flag", "_defaultValue") << "\"."<< std::endl;
	}
	/*
	 * (I have also provided methods for doubles, ints and bools.
	 *  I decided not to go with templates here, as implementation for every case is different, and templates are messy.)
	 */

	/* You can get the arguments after a specific flag (-flag in this case) like so: */
	std::vector<std::string> argsAfterFlag = args.getFlagArguments("flag");
	std::cout << "arguments after flag \"flag\": ";
	for (std::string &s:argsAfterFlag) {
		std::cout << s << "; ";
	}
	std::cout << std::endl;

	/* In some cases it can be useful to check which flags you've checked for so far.
	 * You can get them as a std::set<std::string> or printed to cout.
	 */
	args.printCheckedFlags();

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x340, %rsp            # imm = 0x340
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
movl $0x1, %ecx
callq 0x3db0
movq -0x2a0(%rbp), %rsi
movq 0x10a9a(%rip), %rdi     # 0x12fd0
callq 0x5370
movq %rax, -0x298(%rbp)
jmp 0x2544
movq -0x298(%rbp), %rdi
movq 0x10a66(%rip), %rsi     # 0x12fb8
callq 0x2210
jmp 0x2559
leaq -0xf9(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x2320
movq -0x2a8(%rbp), %rdx
leaq 0x9a8a(%rip), %rsi      # 0xc004
leaq -0xf8(%rbp), %rdi
callq 0x2d30
jmp 0x2588
leaq -0xc8(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x4540
movb %al, -0x2a9(%rbp)
jmp 0x25a3
leaq -0xf8(%rbp), %rdi
callq 0x2130
leaq -0xf9(%rbp), %rdi
callq 0x2230
movb -0x2a9(%rbp), %al
testb $0x1, %al
jne 0x25ca
jmp 0x2657
movq 0x109ff(%rip), %rdi     # 0x12fd0
leaq 0x9a31(%rip), %rsi      # 0xc009
callq 0x21c0
movq %rax, -0x2b8(%rbp)
jmp 0x25e6
movq -0x2b8(%rbp), %rdi
movq 0x109c4(%rip), %rsi     # 0x12fb8
callq 0x2210
jmp 0x25fb
jmp 0x2657
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2d0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2646
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x2130
leaq -0xf9(%rbp), %rdi
callq 0x2230
jmp 0x2d0b
leaq -0x121(%rbp), %rdi
movq %rdi, -0x2c0(%rbp)
callq 0x2320
movq -0x2c0(%rbp), %rdx
leaq 0x998c(%rip), %rsi      # 0xc004
leaq -0x120(%rbp), %rdi
callq 0x2d30
jmp 0x2686
leaq -0xc8(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x4540
movb %al, -0x2c1(%rbp)
jmp 0x26a1
leaq -0x120(%rbp), %rdi
callq 0x2130
leaq -0x121(%rbp), %rdi
callq 0x2230
movb -0x2c1(%rbp), %al
testb $0x1, %al
jne 0x26c8
jmp 0x28c5
movq 0x10901(%rip), %rdi     # 0x12fd0
leaq 0x994f(%rip), %rsi      # 0xc025
callq 0x21c0
movq %rax, -0x2d0(%rbp)
jmp 0x26e4
leaq -0x169(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x2320
movq -0x2d8(%rbp), %rdx
leaq 0x98ff(%rip), %rsi      # 0xc004
leaq -0x168(%rbp), %rdi
callq 0x2d30
jmp 0x2713
leaq -0x191(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x2320
movq -0x2e0(%rbp), %rdx
leaq 0x99de(%rip), %rsi      # 0xc112
leaq -0x190(%rbp), %rdi
callq 0x2d30
jmp 0x2742
leaq -0x148(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0x168(%rbp), %rdx
leaq -0x190(%rbp), %rcx
callq 0x45c0
jmp 0x2765
movq -0x2d0(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x21b0
movq %rax, -0x2e8(%rbp)
jmp 0x2781
movq -0x2e8(%rbp), %rdi
leaq 0x98af(%rip), %rsi      # 0xc03e
callq 0x21c0
movq %rax, -0x2f0(%rbp)
jmp 0x279d
movq -0x2f0(%rbp), %rdi
movq 0x1080d(%rip), %rsi     # 0x12fb8
callq 0x2210
jmp 0x27b2
leaq -0x148(%rbp), %rdi
callq 0x2130
leaq -0x190(%rbp), %rdi
callq 0x2130
leaq -0x191(%rbp), %rdi
callq 0x2230
leaq -0x168(%rbp), %rdi
callq 0x2130
leaq -0x169(%rbp), %rdi
callq 0x2230
jmp 0x28c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2825
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x2130
leaq -0x121(%rbp), %rdi
callq 0x2230
jmp 0x2d0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x28b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x289c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2890
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x2130
leaq -0x190(%rbp), %rdi
callq 0x2130
leaq -0x191(%rbp), %rdi
callq 0x2230
leaq -0x168(%rbp), %rdi
callq 0x2130
leaq -0x169(%rbp), %rdi
callq 0x2230
jmp 0x2d0b
leaq -0x1b9(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x2320
movq -0x2f8(%rbp), %rdx
leaq 0x971e(%rip), %rsi      # 0xc004
leaq -0x1b8(%rbp), %rdi
callq 0x2d30
jmp 0x28f4
leaq -0xc8(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x4540
movb %al, -0x2f9(%rbp)
jmp 0x290f
movb -0x2f9(%rbp), %al
xorb $-0x1, %al
movb %al, -0x2fa(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x2130
leaq -0x1b9(%rbp), %rdi
callq 0x2230
movb -0x2fa(%rbp), %al
testb $0x1, %al
jne 0x2944
jmp 0x2b41
movq 0x10685(%rip), %rdi     # 0x12fd0
leaq 0x96ef(%rip), %rsi      # 0xc041
callq 0x21c0
movq %rax, -0x308(%rbp)
jmp 0x2960
leaq -0x201(%rbp), %rdi
movq %rdi, -0x310(%rbp)
callq 0x2320
movq -0x310(%rbp), %rdx
leaq 0x9683(%rip), %rsi      # 0xc004
leaq -0x200(%rbp), %rdi
callq 0x2d30
jmp 0x298f
leaq -0x229(%rbp), %rdi
movq %rdi, -0x318(%rbp)
callq 0x2320
movq -0x318(%rbp), %rdx
leaq 0x96db(%rip), %rsi      # 0xc08b
leaq -0x228(%rbp), %rdi
callq 0x2d30
jmp 0x29be
leaq -0x1e0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0x200(%rbp), %rdx
leaq -0x228(%rbp), %rcx
callq 0x45c0
jmp 0x29e1
movq -0x308(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x21b0
movq %rax, -0x320(%rbp)
jmp 0x29fd
movq -0x320(%rbp), %rdi
leaq 0x968e(%rip), %rsi      # 0xc099
callq 0x21c0
movq %rax, -0x328(%rbp)
jmp 0x2a19
movq -0x328(%rbp), %rdi
movq 0x10591(%rip), %rsi     # 0x12fb8
callq 0x2210
jmp 0x2a2e
leaq -0x1e0(%rbp), %rdi
callq 0x2130
leaq -0x228(%rbp), %rdi
callq 0x2130
leaq -0x229(%rbp), %rdi
callq 0x2230
leaq -0x200(%rbp), %rdi
callq 0x2130
leaq -0x201(%rbp), %rdi
callq 0x2230
jmp 0x2b41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2aa1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x2130
leaq -0x1b9(%rbp), %rdi
callq 0x2230
jmp 0x2d0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2b30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2b18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2b0c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x2130
leaq -0x228(%rbp), %rdi
callq 0x2130
leaq -0x229(%rbp), %rdi
callq 0x2230
leaq -0x200(%rbp), %rdi
callq 0x2130
leaq -0x201(%rbp), %rdi
callq 0x2230
jmp 0x2d0b
leaq -0x269(%rbp), %rdi
movq %rdi, -0x330(%rbp)
callq 0x2320
movq -0x330(%rbp), %rdx
leaq 0x94a2(%rip), %rsi      # 0xc004
leaq -0x268(%rbp), %rdi
callq 0x2d30
jmp 0x2b70
leaq -0x248(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0x268(%rbp), %rdx
callq 0x4b20
jmp 0x2b8c
leaq -0x268(%rbp), %rdi
callq 0x2130
leaq -0x269(%rbp), %rdi
callq 0x2230
movq 0x10425(%rip), %rdi     # 0x12fd0
leaq 0x94ea(%rip), %rsi      # 0xc09c
callq 0x21c0
jmp 0x2bb9
leaq -0x248(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x278(%rbp), %rdi
callq 0x2de0
movq %rax, -0x280(%rbp)
movq -0x278(%rbp), %rdi
callq 0x2e10
movq %rax, -0x288(%rbp)
leaq -0x280(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x2e40
testb $0x1, %al
jne 0x2c09
jmp 0x2cbd
leaq -0x280(%rbp), %rdi
callq 0x2e80
movq %rax, -0x290(%rbp)
movq -0x290(%rbp), %rsi
movq 0x103a6(%rip), %rdi     # 0x12fd0
callq 0x21b0
movq %rax, -0x338(%rbp)
jmp 0x2c38
movq -0x338(%rbp), %rdi
leaq 0x9474(%rip), %rsi      # 0xc0ba
callq 0x21c0
jmp 0x2c4d
jmp 0x2c4f
leaq -0x280(%rbp), %rdi
callq 0x2ea0
jmp 0x2bed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2c8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x2130
leaq -0x269(%rbp), %rdi
callq 0x2230
jmp 0x2d0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x2ec0
jmp 0x2d0b
movq 0x1030c(%rip), %rdi     # 0x12fd0
movq 0x102ed(%rip), %rsi     # 0x12fb8
callq 0x2210
jmp 0x2cd2
leaq -0xc8(%rbp), %rdi
callq 0x5220
jmp 0x2ce0
movl $0x0, -0x4(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x2ec0
leaq -0xc8(%rbp), %rdi
callq 0x2f20
movl -0x4(%rbp), %eax
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
leaq -0xc8(%rbp), %rdi
callq 0x2f20
movq -0xd0(%rbp), %rdi
callq 0x2310
nopw %cs:(%rax,%rax)
nopl (%rax)