// File: /workspace/github_cpp_makefile_star2_O3/rvthak[P]Makefile-Maker/input.cpp
// Function: HandleParameter(int&, int&, char const**, Makefile&)
int HandleParameter(int &count, int &argc, char const **argv, Makefile &mk){
	string param=argv[count];

	if(param.at(0)!='-'){
		cout << " \n(!) User Input Error: illegal argument. Exiting..." << endl;
		printInputFormat();
		return 1;
	}

	if(!param.compare(HELP_A)){
		printInputFormat();
		return 1;
	}
	else if(!param.compare(VERS_A)){
		printVersion();
		return 1;
	}
	else if(!param.compare(NAME_A)){
		if( count == argc || argv[count+1][0]=='-' ){
			cout << " \n(!) User Input Error: name missing. Exiting..." << endl;
			printInputFormat();
			return 1;
		}
		string tmp=argv[count+1];
		mk.setName(tmp);
		count+=2;
	}
	else if(!param.compare(FRMT_A)){
		if( count == argc || argv[count+1][0]=='-'){
			cout << " \n(!) User Input Error: source format missing. Exiting..." << endl;
			printInputFormat();
			return 1;
		}
		string tmp=argv[count+1];
		mk.setFormat(tmp);
		count+=2;
	}
	else if(!param.compare(HEAD_A)){
		if( count == argc || argv[count+1][0]=='-'){
			cout << " \n(!) User Input Error: header format missing. Exiting..." << endl;
			printInputFormat();
			return 1;
		}
		string tmp=argv[count+1];
		mk.setHeader(tmp);
		count+=2;
	}
	else if(!param.compare(COMP_A)){
		if( count == argc || argv[count+1][0]=='-'){
			cout << " \n(!) User Input Error: compiler missing. Exiting..." << endl;
			printInputFormat();
			return 1;
		}
		string tmp=argv[count+1];
		mk.setCompiler(tmp);
		count+=2;
	}
	else if(!param.compare(DEBG_A)){
		if(mk.getDebug()){
			mk.setDebug(0);
		}
		else{
			mk.setDebug(1);
		}
		count++;
	}
	else if(!param.compare(VALG_A)){
		if(mk.getValgrind()){
			mk.setValgrind(0);
		}
		else{
			mk.setValgrind(1);
		}
		count++;
	}

	else if(!param.compare(INST_A)){
		if(mk.getInstall()){
			mk.setInstall(0);
		}
		else{
			mk.setInstall(1);
		}
		count++;
	}

	else if(!param.compare(PARM_A)){
		if(mk.getCompParam()){
			mk.setCompParam(0);
		}
		else{
			mk.setCompParam(1);
		}
		count++;
	}
	else if(!param.compare(EXEC_A)){
		if(mk.getExecParam()){
			mk.setExecParam(0);
		}
		else{
			mk.setExecParam(1);
		}
		count++;
	}
	else if(!param.compare(ORGN_A)){
		if(mk.getOrganize()){
			mk.setOrganize(0);
		}
		else{
			mk.setOrganize(1);
		}
		count++;
	}
	else{
		cout << " \n(!) User Input Error: given argument does not exist. Exiting..." << endl;
		printInputFormat();
		return 1;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movslq (%rdi), %rax
movq (%rdx,%rax,8), %rsi
leaq 0x30(%rsp), %r13
leaq 0x10(%rsp), %rdx
movq %r13, %rdi
callq 0x34ec
cmpq $0x0, 0x8(%r13)
je 0x2ae0
movq 0x30(%rsp), %rax
cmpb $0x2d, (%rax)
jne 0x2734
leaq 0x2f95(%rip), %rsi      # 0x557e
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x277a
leaq 0x2a6d(%rip), %rsi      # 0x506f
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x27af
leaq 0x2a5e(%rip), %rsi      # 0x5079
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x27bb
leaq 0x2a79(%rip), %rsi      # 0x50ad
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x281d
leaq 0x2a9d(%rip), %rsi      # 0x50ea
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x287f
leaq 0x2ac1(%rip), %rsi      # 0x5127
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2902
leaq 0x2ae0(%rip), %rsi      # 0x515f
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2963
leaq 0x2acb(%rip), %rsi      # 0x5163
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x29a2
leaq 0x2ab6(%rip), %rsi      # 0x5167
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2a1a
leaq 0x2aa0(%rip), %rsi      # 0x516a
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2a4b
leaq 0x2a8a(%rip), %rsi      # 0x516d
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2a76
leaq 0x2a74(%rip), %rsi      # 0x5170
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2aa1
movq 0x58bb(%rip), %rdi      # 0x7fd0
leaq 0x2a59(%rip), %rsi      # 0x5175
movl $0x41, %edx
callq 0x21b0
movq 0x58a3(%rip), %rdi      # 0x7fd0
callq 0x20e0
jmp 0x277a
movq 0x5895(%rip), %rbx      # 0x7fd0
leaq 0x28f8(%rip), %rsi      # 0x503a
movl $0x34, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq 0x5863(%rip), %rdi      # 0x7fd0
callq 0x2030
movq %rax, %rdi
callq 0x2120
callq 0x2b5e
movl $0x1, %ebx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x279f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2190
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x1, %ebx
callq 0x2c08
jmp 0x2784
movslq (%rbx), %rax
cmpl (%r12), %eax
je 0x27d2
movq 0x8(%r15,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x28e1
movq 0x57f7(%rip), %rbx      # 0x7fd0
leaq 0x289c(%rip), %rsi      # 0x507c
movl $0x30, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq 0x57c5(%rip), %rdi      # 0x7fd0
callq 0x2030
movq %rax, %rdi
callq 0x2120
jmp 0x277a
movslq (%rbx), %rax
cmpl (%r12), %eax
je 0x2834
movq 0x8(%r15,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x2942
movq 0x5795(%rip), %rbx      # 0x7fd0
leaq 0x286e(%rip), %rsi      # 0x50b0
movl $0x39, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq 0x5763(%rip), %rdi      # 0x7fd0
callq 0x2030
movq %rax, %rdi
callq 0x2120
jmp 0x277a
movslq (%rbx), %rax
cmpl (%r12), %eax
je 0x2896
movq 0x8(%r15,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x2984
movq 0x5733(%rip), %rbx      # 0x7fd0
leaq 0x2849(%rip), %rsi      # 0x50ed
movl $0x39, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq 0x5701(%rip), %rdi      # 0x7fd0
callq 0x2030
movq %rax, %rdi
callq 0x2120
jmp 0x277a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x34ec
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3cc4
jmp 0x29f3
movslq (%rbx), %rax
cmpl (%r12), %eax
je 0x2919
movq 0x8(%r15,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x29d7
movq 0x56b0(%rip), %rdi      # 0x7fd0
leaq 0x2803(%rip), %rsi      # 0x512a
movl $0x34, %edx
callq 0x21b0
movq 0x5698(%rip), %rdi      # 0x7fd0
callq 0x20e0
jmp 0x277a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x34ec
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3cd4
jmp 0x29f3
movq %r14, %rdi
callq 0x3c16
leaq 0x10(%rsp), %rsi
testb %al, %al
je 0x29c7
movb $0x0, (%rsi)
movq %r14, %rdi
callq 0x3ce8
jmp 0x2ad7
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x34ec
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3cde
jmp 0x29f3
movq %r14, %rdi
callq 0x3c1e
leaq 0x10(%rsp), %rsi
testb %al, %al
je 0x2a3b
movb $0x0, (%rsi)
movq %r14, %rdi
callq 0x3cf2
jmp 0x2ad7
movb $0x1, (%rsi)
movq %r14, %rdi
callq 0x3ce8
jmp 0x2ad7
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x34ec
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3cca
addl $0x2, (%rbx)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ad9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x2ad9
movq %r14, %rdi
callq 0x3c26
leaq 0x10(%rsp), %rsi
testb %al, %al
je 0x2a69
movb $0x0, (%rsi)
movq %r14, %rdi
callq 0x3cfc
jmp 0x2ad7
movb $0x1, (%rsi)
movq %r14, %rdi
callq 0x3cf2
jmp 0x2ad7
movq %r14, %rdi
callq 0x3c2e
leaq 0x10(%rsp), %rsi
testb %al, %al
je 0x2a94
movb $0x0, (%rsi)
movq %r14, %rdi
callq 0x3d06
jmp 0x2ad7
movb $0x1, (%rsi)
movq %r14, %rdi
callq 0x3cfc
jmp 0x2ad7
movq %r14, %rdi
callq 0x3c36
leaq 0x10(%rsp), %rsi
testb %al, %al
je 0x2abf
movb $0x0, (%rsi)
movq %r14, %rdi
callq 0x3d10
jmp 0x2ad7
movb $0x1, (%rsi)
movq %r14, %rdi
callq 0x3d06
jmp 0x2ad7
movq %r14, %rdi
callq 0x3c3e
leaq 0x10(%rsp), %rsi
testb %al, %al
je 0x2acc
movb $0x0, (%rsi)
movq %r14, %rdi
callq 0x3d1a
jmp 0x2ad7
movb $0x1, (%rsi)
movq %r14, %rdi
callq 0x3d10
jmp 0x2ad7
movb $0x1, (%rsi)
movq %r14, %rdi
callq 0x3d1a
incl (%rbx)
xorl %ebx, %ebx
jmp 0x2784
leaq 0x27fb(%rip), %rdi      # 0x52e2
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2220
jmp 0x2b38
jmp 0x2b38
jmp 0x2b38
jmp 0x2b38
jmp 0x2b38
jmp 0x2b38
jmp 0x2b38
jmp 0x2b38
jmp 0x2b38
jmp 0x2b38
jmp 0x2b16
jmp 0x2b38
jmp 0x2b38
jmp 0x2b38
jmp 0x2b16
jmp 0x2b38
jmp 0x2b16
jmp 0x2b38
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b3b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x2b3b
jmp 0x2b38
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b56
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2190
movq %rbx, %rdi
callq 0x2290