// File: /workspace/github_cpp_makefile_star2_O3/Dts0[P]addCopyright/main.cpp
// Function: main
int main(int argc,char** argv){
	if(argc==0){
		showHelp();
		return 0;
	}

	int readCnt = 0;
	string copyrightFile;
	vector<string> files;
	while((++readCnt)<argc){
		string argStr(argv[readCnt]);
		if(argStr[0]=='-'){
			if(argStr=="-c"){
				if(argv[readCnt+1])
					copyrightFile=argv[++readCnt];
				else {
					optionLackVal(argStr);
					showHelp();
					return 0;
				}
			}
			else if(argStr=="-h"){
				showHelp();
				return 0;
			} else if(argStr=="-v"){
				showVersion();
				return 0;
			} else {
				unknownOption(argStr);
				showHelp();
				return 0;
			}
		}
		else {
			files.push_back(argv[readCnt]);
		}
	}

	if(files.empty()){
		noOutputFile();
		showHelp();
		return 0;
	}
	int sucessCnt=0,failCnt=0;
	for(auto it=files.begin();it!=files.end();++it){
		if(addCopyright(*it,copyrightFile,cout)>0)
			++sucessCnt;
		else ++failCnt;
		cout<<endl;
	}
	cout<<"全部完成。"
		<<"\t其中"<<sucessCnt<<"个成功，"
		<<"\t"<<failCnt<<"个失败。"
		<<endl;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
testl %edi, %edi
je 0x2a9e
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
xorl %r12d, %r12d
movq %r12, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x70(%rsp), %rax
movq %r12, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
leaq 0x10(%rsp), %r15
leal 0x1(%r12), %r14d
cmpl %ebp, %r14d
jge 0x2aa8
movslq %r14d, %r13
movq (%rbx,%r13,8), %rsi
movq %r15, %rdi
leaq 0xe8(%rsp), %rdx
callq 0x2ff2
movq 0x10(%rsp), %rax
cmpb $0x2d, (%rax)
jne 0x297d
movq %r15, %rdi
leaq 0x1833(%rip), %rsi      # 0x4129
callq 0x2080
testl %eax, %eax
je 0x29d0
movq %r15, %rdi
leaq 0x181f(%rip), %rsi      # 0x412c
callq 0x2080
testl %eax, %eax
je 0x2a69
movq %r15, %rdi
leaq 0x180b(%rip), %rsi      # 0x412f
callq 0x2080
testl %eax, %eax
je 0x2a08
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %rdi
callq 0x308e
leaq 0xa8(%rsp), %rdi
callq 0x2f37
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rcx
jmp 0x2a56
movq (%rbx,%r13,8), %rsi
leaq 0xe8(%rsp), %r12
movq %r12, %rdi
leaq 0xb(%rsp), %rdx
callq 0x2ff2
leaq 0x70(%rsp), %rdi
movq %r12, %rsi
callq 0x31ba
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x29c8
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x2170
movb $0x1, %r13b
jmp 0x2a71
movslq %r12d, %rax
movq 0x10(%rbx,%rax,8), %r13
testq %r13, %r13
je 0x2a0f
movq 0x38(%rsp), %r14
movq %r13, %rdi
callq 0x20b0
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %r13, %rcx
movq %rax, %r8
callq 0x2200
addl $0x2, %r12d
movb $0x1, %r13b
jmp 0x2a74
callq 0x2ea3
jmp 0x2a6e
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc8(%rsp), %rdi
callq 0x308e
leaq 0xc8(%rsp), %rdi
callq 0x2e2d
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rcx
movq %rcx, %rax
cmpq %rcx, %rdi
je 0x2a69
movq (%rax), %rsi
incq %rsi
callq 0x2170
callq 0x2dd4
xorl %r13d, %r13d
movl %r14d, %r12d
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x2a90
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2170
testb %r13b, %r13b
jne 0x28b9
jmp 0x2c81
callq 0x2dd4
jmp 0x2ca7
movq 0x70(%rsp), %r14
cmpq 0x78(%rsp), %r14
je 0x2c77
xorl %ebx, %ebx
xorl %ebp, %ebp
movl %ebx, 0xc(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x308e
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
callq 0x308e
leaq 0x50(%rsp), %rdi
movq %rbx, %rsi
movq 0x34be(%rip), %rdx      # 0x5fd8
callq 0x23ac
movl %eax, %r13d
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x2b47
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2170
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2b63
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2170
xorl %r15d, %r15d
xorl %r12d, %r12d
testl %r13d, %r13d
setle %r13b
setg %bl
movq 0x345e(%rip), %rcx      # 0x5fd8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq 0x3440(%rip), %rdi      # 0x5fd8
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movb %bl, %r12b
addl %r12d, %ebp
movb %r13b, %r15b
movl 0xc(%rsp), %ebx
addl %r15d, %ebx
addq $0x20, %r14
cmpq 0x78(%rsp), %r14
jne 0x2abc
movq 0x340d(%rip), %rdi      # 0x5fd8
leaq 0x1560(%rip), %rsi      # 0x4132
movl $0xf, %edx
callq 0x21a0
movq 0x33f5(%rip), %rdi      # 0x5fd8
leaq 0x1558(%rip), %rsi      # 0x4142
movl $0x7, %edx
callq 0x21a0
movq 0x33dd(%rip), %rdi      # 0x5fd8
movl %ebp, %esi
callq 0x2210
movq %rax, %r14
leaq 0x153e(%rip), %rsi      # 0x414a
movl $0xc, %edx
movq %rax, %rdi
callq 0x21a0
leaq 0x1537(%rip), %rsi      # 0x4157
movl $0x1, %edx
movq %r14, %rdi
callq 0x21a0
movq %r14, %rdi
movl %ebx, %esi
callq 0x2210
movq %rax, %rbx
leaq 0x1518(%rip), %rsi      # 0x4159
movl $0xc, %edx
movq %rax, %rdi
callq 0x21a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
jmp 0x2c81
callq 0x2fad
callq 0x2dd4
leaq 0x70(%rsp), %rdi
callq 0x3030
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2ca7
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2170
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2da3
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x2d83
movq 0xd8(%rsp), %rsi
jmp 0x2d33
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x2d83
movq 0xb8(%rsp), %rsi
jmp 0x2d33
jmp 0x2da3
jmp 0x2d80
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x2d83
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x2d83
movq %rax, %rbx
jmp 0x2d6a
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x2d6a
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2170
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2da6
movq 0x60(%rsp), %rsi
jmp 0x2d97
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x2da6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x2da6
jmp 0x2da3
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x3030
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2dcc
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2220