// File: statgen[P]statgen/lib/tclap-1.2.0/examples/test1.cpp
// Function: main
int main(int argc, char** argv)
{
	// Wrap everything in a try block.  Do this every time, 
	// because exceptions will be thrown for problems. 
	try {  

	// Define the command line object.
	CmdLine cmd("Command description message", ' ', "0.9");

	// Define a value argument and add it to the command line.
	ValueArg<string> nameArg("n","name","Name to print",true,"homer","string");
	cmd.add( nameArg );

	// Define a switch and add it to the command line.
	SwitchArg reverseSwitch("r","reverse","Print name backwards", false);
	cmd.add( reverseSwitch );

	// Parse the args.
	cmd.parse( argc, argv );

	// Get the value parsed by each arg. 
	string name = nameArg.getValue();
	bool reverseName = reverseSwitch.getValue();

	// Do what you intend too...
	if ( reverseName )
	{
		reverse(name.begin(),name.end());
		cout << "My name (spelled backwards) is: " << name << endl;
	}
	else
		cout << "My name is: " << name << endl;


	} catch (ArgException &e)  // catch any exceptions
	{ cerr << "error: " << e.error() << " for arg " << e.argId() << endl; }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x580, %rsp            # imm = 0x580
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x111(%rbp), %rdi
movq %rdi, -0x4d0(%rbp)
callq 0x4410
movq -0x4d0(%rbp), %rdx
leaq 0xea18(%rip), %rsi      # 0x13032
leaq -0x110(%rbp), %rdi
callq 0x54e0
jmp 0x4628
leaq -0x149(%rbp), %rdi
movq %rdi, -0x4d8(%rbp)
callq 0x4410
movq -0x4d8(%rbp), %rdx
leaq 0xea05(%rip), %rsi      # 0x1304e
leaq -0x148(%rbp), %rdi
callq 0x54e0
jmp 0x4657
leaq -0xf0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
movl $0x20, %edx
leaq -0x148(%rbp), %rcx
movl $0x1, %r8d
callq 0x6a90
jmp 0x467e
leaq -0x148(%rbp), %rdi
callq 0x44a8
leaq -0x149(%rbp), %rdi
callq 0x42a0
leaq -0x110(%rbp), %rdi
callq 0x44a8
leaq -0x111(%rbp), %rdi
callq 0x42a0
leaq -0x281(%rbp), %rdi
movq %rdi, -0x4e0(%rbp)
callq 0x4410
movq -0x4e0(%rbp), %rdx
leaq 0xeac0(%rip), %rsi      # 0x1318f
leaq -0x280(%rbp), %rdi
callq 0x54e0
jmp 0x46dd
leaq -0x2a9(%rbp), %rdi
movq %rdi, -0x4e8(%rbp)
callq 0x4410
movq -0x4e8(%rbp), %rdx
leaq 0xe954(%rip), %rsi      # 0x13052
leaq -0x2a8(%rbp), %rdi
callq 0x54e0
jmp 0x470c
leaq -0x2d1(%rbp), %rdi
movq %rdi, -0x4f0(%rbp)
callq 0x4410
movq -0x4f0(%rbp), %rdx
leaq 0xe92a(%rip), %rsi      # 0x13057
leaq -0x2d0(%rbp), %rdi
callq 0x54e0
jmp 0x473b
leaq -0x2f9(%rbp), %rdi
movq %rdi, -0x4f8(%rbp)
callq 0x4410
movq -0x4f8(%rbp), %rdx
leaq 0xe909(%rip), %rsi      # 0x13065
leaq -0x2f8(%rbp), %rdi
callq 0x54e0
jmp 0x476a
leaq -0x321(%rbp), %rdi
movq %rdi, -0x500(%rbp)
callq 0x4410
movq -0x500(%rbp), %rdx
leaq 0xe8e0(%rip), %rsi      # 0x1306b
leaq -0x320(%rbp), %rdi
callq 0x54e0
jmp 0x4799
movq %rsp, %rax
leaq -0x320(%rbp), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
leaq -0x260(%rbp), %rdi
leaq -0x280(%rbp), %rsi
leaq -0x2a8(%rbp), %rdx
leaq -0x2d0(%rbp), %rcx
movl $0x1, %r8d
leaq -0x2f8(%rbp), %r9
callq 0x6c60
jmp 0x47de
leaq -0x320(%rbp), %rdi
callq 0x44a8
leaq -0x321(%rbp), %rdi
callq 0x42a0
leaq -0x2f8(%rbp), %rdi
callq 0x44a8
leaq -0x2f9(%rbp), %rdi
callq 0x42a0
leaq -0x2d0(%rbp), %rdi
callq 0x44a8
leaq -0x2d1(%rbp), %rdi
callq 0x42a0
leaq -0x2a8(%rbp), %rdi
callq 0x44a8
leaq -0x2a9(%rbp), %rdi
callq 0x42a0
leaq -0x280(%rbp), %rdi
callq 0x44a8
leaq -0x281(%rbp), %rdi
callq 0x42a0
leaq -0xf0(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x6d80
jmp 0x486b
leaq -0x3f1(%rbp), %rdi
movq %rdi, -0x508(%rbp)
callq 0x4410
movq -0x508(%rbp), %rdx
leaq 0xe7dd(%rip), %rsi      # 0x13069
leaq -0x3f0(%rbp), %rdi
callq 0x54e0
jmp 0x489a
leaq -0x419(%rbp), %rdi
movq %rdi, -0x510(%rbp)
callq 0x4410
movq -0x510(%rbp), %rdx
leaq 0xe7b7(%rip), %rsi      # 0x13072
leaq -0x418(%rbp), %rdi
callq 0x54e0
jmp 0x48c9
leaq -0x441(%rbp), %rdi
movq %rdi, -0x518(%rbp)
callq 0x4410
movq -0x518(%rbp), %rdx
leaq 0xe790(%rip), %rsi      # 0x1307a
leaq -0x440(%rbp), %rdi
callq 0x54e0
jmp 0x48f8
xorl %r8d, %r8d
movl %r8d, %r9d
leaq -0x3d0(%rbp), %rdi
leaq -0x3f0(%rbp), %rsi
leaq -0x418(%rbp), %rdx
leaq -0x440(%rbp), %rcx
callq 0x6db0
jmp 0x4921
leaq -0x440(%rbp), %rdi
callq 0x44a8
leaq -0x441(%rbp), %rdi
callq 0x42a0
leaq -0x418(%rbp), %rdi
callq 0x44a8
leaq -0x419(%rbp), %rdi
callq 0x42a0
leaq -0x3f0(%rbp), %rdi
callq 0x44a8
leaq -0x3f1(%rbp), %rdi
callq 0x42a0
leaq -0xf0(%rbp), %rdi
leaq -0x3d0(%rbp), %rsi
callq 0x6d80
jmp 0x497e
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0xf0(%rbp), %rdi
callq 0x6e30
jmp 0x4993
leaq -0x260(%rbp), %rdi
callq 0x6f40
movq %rax, -0x520(%rbp)
jmp 0x49a8
movq -0x520(%rbp), %rsi
leaq -0x468(%rbp), %rdi
callq 0x40f0
jmp 0x49bd
leaq -0x3d0(%rbp), %rdi
callq 0x6f60
movb %al, -0x521(%rbp)
jmp 0x49d1
movb -0x521(%rbp), %al
andb $0x1, %al
movb %al, -0x469(%rbp)
testb $0x1, -0x469(%rbp)
je 0x4cd4
leaq -0x468(%rbp), %rdi
movq %rdi, -0x530(%rbp)
callq 0x4200
movq -0x530(%rbp), %rdi
movq %rax, -0x478(%rbp)
callq 0x4150
movq %rax, -0x480(%rbp)
movq -0x478(%rbp), %rdi
movq -0x480(%rbp), %rsi
callq 0x6f80
jmp 0x4a2e
movq 0x1659b(%rip), %rdi     # 0x1afd0
leaq 0xe653(%rip), %rsi      # 0x1308f
callq 0x4240
movq %rax, -0x538(%rbp)
jmp 0x4a4a
movq -0x538(%rbp), %rdi
leaq -0x468(%rbp), %rsi
callq 0x4220
movq %rax, -0x540(%rbp)
jmp 0x4a66
movq -0x540(%rbp), %rdi
movq 0x1653c(%rip), %rsi     # 0x1afb0
callq 0x4280
jmp 0x4a7b
jmp 0x4d23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x4ade
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x4ac6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x44a8
leaq -0x149(%rbp), %rdi
callq 0x42a0
leaq -0x110(%rbp), %rdi
callq 0x44a8
leaq -0x111(%rbp), %rdi
callq 0x42a0
jmp 0x4d7c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x4bd7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x4bbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x4ba7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x4b8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x4b77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x44a8
leaq -0x321(%rbp), %rdi
callq 0x42a0
leaq -0x2f8(%rbp), %rdi
callq 0x44a8
leaq -0x2f9(%rbp), %rdi
callq 0x42a0
leaq -0x2d0(%rbp), %rdi
callq 0x44a8
leaq -0x2d1(%rbp), %rdi
callq 0x42a0
leaq -0x2a8(%rbp), %rdi
callq 0x44a8
leaq -0x2a9(%rbp), %rdi
callq 0x42a0
leaq -0x280(%rbp), %rdi
callq 0x44a8
leaq -0x281(%rbp), %rdi
callq 0x42a0
jmp 0x4d70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x4d64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x4c89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x4c71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x4c59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x440(%rbp), %rdi
callq 0x44a8
leaq -0x441(%rbp), %rdi
callq 0x42a0
leaq -0x418(%rbp), %rdi
callq 0x44a8
leaq -0x419(%rbp), %rdi
callq 0x42a0
leaq -0x3f0(%rbp), %rdi
callq 0x44a8
leaq -0x3f1(%rbp), %rdi
callq 0x42a0
jmp 0x4d64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x4d58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x468(%rbp), %rdi
callq 0x44a8
jmp 0x4d58
movq 0x162f5(%rip), %rdi     # 0x1afd0
leaq 0xe3ce(%rip), %rsi      # 0x130b0
callq 0x4240
movq %rax, -0x548(%rbp)
jmp 0x4cf0
movq -0x548(%rbp), %rdi
leaq -0x468(%rbp), %rsi
callq 0x4220
movq %rax, -0x550(%rbp)
jmp 0x4d0c
movq -0x550(%rbp), %rdi
movq 0x16296(%rip), %rsi     # 0x1afb0
callq 0x4280
jmp 0x4d21
jmp 0x4d23
leaq -0x468(%rbp), %rdi
callq 0x44a8
leaq -0x3d0(%rbp), %rdi
callq 0x6fc0
leaq -0x260(%rbp), %rdi
callq 0x6fe0
leaq -0xf0(%rbp), %rdi
callq 0x6990
jmp 0x4e6e
leaq -0x3d0(%rbp), %rdi
callq 0x6fc0
leaq -0x260(%rbp), %rdi
callq 0x6fe0
leaq -0xf0(%rbp), %rdi
callq 0x6990
movl -0x124(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x4ed5
movq -0x120(%rbp), %rdi
callq 0x40d0
movq %rax, -0x488(%rbp)
movq 0x16247(%rip), %rdi     # 0x1aff0
leaq 0xe30d(%rip), %rsi      # 0x130bd
callq 0x4240
movq %rax, -0x558(%rbp)
jmp 0x4dbe
movq -0x488(%rbp), %rsi
leaq -0x4a8(%rbp), %rdi
callq 0x7040
jmp 0x4dd3
movq -0x558(%rbp), %rdi
leaq -0x4a8(%rbp), %rsi
callq 0x4220
movq %rax, -0x560(%rbp)
jmp 0x4def
movq -0x560(%rbp), %rdi
leaq 0xe2c8(%rip), %rsi      # 0x130c5
callq 0x4240
movq %rax, -0x568(%rbp)
jmp 0x4e0b
movq -0x488(%rbp), %rsi
leaq -0x4c8(%rbp), %rdi
callq 0x7070
jmp 0x4e20
movq -0x568(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
callq 0x4220
movq %rax, -0x570(%rbp)
jmp 0x4e3c
movq -0x570(%rbp), %rdi
movq 0x16166(%rip), %rsi     # 0x1afb0
callq 0x4280
jmp 0x4e51
leaq -0x4c8(%rbp), %rdi
callq 0x44a8
leaq -0x4a8(%rbp), %rdi
callq 0x44a8
callq 0x43d0
movl -0x4(%rbp), %eax
addq $0x580, %rsp            # imm = 0x580
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x4ecc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x4ec0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x4c8(%rbp), %rdi
callq 0x44a8
leaq -0x4a8(%rbp), %rdi
callq 0x44a8
callq 0x43d0
jmp 0x4ed3
jmp 0x4ed5
movq -0x120(%rbp), %rdi
callq 0x4400
movq %rax, %rdi
callq 0x68a0
nopl (%rax)