// File: /workspace/github_cpp_makefile_star2_O1/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 0x34f0
movq 0x8(%r13), %rdx
testq %rdx, %rdx
je 0x2ae6
movq 0x30(%rsp), %rax
cmpb $0x2d, (%rax)
jne 0x273a
leaq 0x2f8f(%rip), %rsi      # 0x557e
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2780
leaq 0x2a67(%rip), %rsi      # 0x506f
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x27b5
leaq 0x2a58(%rip), %rsi      # 0x5079
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x27c1
leaq 0x2a73(%rip), %rsi      # 0x50ad
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2823
leaq 0x2a97(%rip), %rsi      # 0x50ea
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2885
leaq 0x2abb(%rip), %rsi      # 0x5127
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2908
leaq 0x2ada(%rip), %rsi      # 0x515f
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2969
leaq 0x2ac5(%rip), %rsi      # 0x5163
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x29a8
leaq 0x2ab0(%rip), %rsi      # 0x5167
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2a20
leaq 0x2a9a(%rip), %rsi      # 0x516a
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2a51
leaq 0x2a84(%rip), %rsi      # 0x516d
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2a7c
leaq 0x2a6e(%rip), %rsi      # 0x5170
leaq 0x30(%rsp), %rdi
callq 0x20a0
testl %eax, %eax
je 0x2aa7
movq 0x58b5(%rip), %rdi      # 0x7fd0
leaq 0x2a53(%rip), %rsi      # 0x5175
movl $0x41, %edx
callq 0x21b0
movq 0x589d(%rip), %rdi      # 0x7fd0
callq 0x20e0
jmp 0x2780
movq 0x588f(%rip), %rbx      # 0x7fd0
leaq 0x28f2(%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 0x585d(%rip), %rdi      # 0x7fd0
callq 0x2030
movq %rax, %rdi
callq 0x2120
callq 0x2b62
movl $0x1, %ebx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27a5
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 0x2c0c
jmp 0x278a
movslq (%rbx), %rax
cmpl (%r12), %eax
je 0x27d8
movq 0x8(%r15,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x28e7
movq 0x57f1(%rip), %rbx      # 0x7fd0
leaq 0x2896(%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 0x57bf(%rip), %rdi      # 0x7fd0
callq 0x2030
movq %rax, %rdi
callq 0x2120
jmp 0x2780
movslq (%rbx), %rax
cmpl (%r12), %eax
je 0x283a
movq 0x8(%r15,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x2948
movq 0x578f(%rip), %rbx      # 0x7fd0
leaq 0x2868(%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 0x575d(%rip), %rdi      # 0x7fd0
callq 0x2030
movq %rax, %rdi
callq 0x2120
jmp 0x2780
movslq (%rbx), %rax
cmpl (%r12), %eax
je 0x289c
movq 0x8(%r15,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x298a
movq 0x572d(%rip), %rbx      # 0x7fd0
leaq 0x2843(%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 0x56fb(%rip), %rdi      # 0x7fd0
callq 0x2030
movq %rax, %rdi
callq 0x2120
jmp 0x2780
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x34f0
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3cec
jmp 0x29f9
movslq (%rbx), %rax
cmpl (%r12), %eax
je 0x291f
movq 0x8(%r15,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x29dd
movq 0x56aa(%rip), %rdi      # 0x7fd0
leaq 0x27fd(%rip), %rsi      # 0x512a
movl $0x34, %edx
callq 0x21b0
movq 0x5692(%rip), %rdi      # 0x7fd0
callq 0x20e0
jmp 0x2780
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x34f0
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3cfc
jmp 0x29f9
movq %r14, %rdi
callq 0x3c3e
leaq 0x10(%rsp), %rsi
testb %al, %al
je 0x29cd
movb $0x0, (%rsi)
movq %r14, %rdi
callq 0x3d10
jmp 0x2add
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x34f0
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3d06
jmp 0x29f9
movq %r14, %rdi
callq 0x3c46
leaq 0x10(%rsp), %rsi
testb %al, %al
je 0x2a41
movb $0x0, (%rsi)
movq %r14, %rdi
callq 0x3d1a
jmp 0x2add
movb $0x1, (%rsi)
movq %r14, %rdi
callq 0x3d10
jmp 0x2add
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x34f0
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3cf2
addl $0x2, (%rbx)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2adf
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x2adf
movq %r14, %rdi
callq 0x3c4e
leaq 0x10(%rsp), %rsi
testb %al, %al
je 0x2a6f
movb $0x0, (%rsi)
movq %r14, %rdi
callq 0x3d24
jmp 0x2add
movb $0x1, (%rsi)
movq %r14, %rdi
callq 0x3d1a
jmp 0x2add
movq %r14, %rdi
callq 0x3c56
leaq 0x10(%rsp), %rsi
testb %al, %al
je 0x2a9a
movb $0x0, (%rsi)
movq %r14, %rdi
callq 0x3d2e
jmp 0x2add
movb $0x1, (%rsi)
movq %r14, %rdi
callq 0x3d24
jmp 0x2add
movq %r14, %rdi
callq 0x3c5e
leaq 0x10(%rsp), %rsi
testb %al, %al
je 0x2ac5
movb $0x0, (%rsi)
movq %r14, %rdi
callq 0x3d38
jmp 0x2add
movb $0x1, (%rsi)
movq %r14, %rdi
callq 0x3d2e
jmp 0x2add
movq %r14, %rdi
callq 0x3c66
leaq 0x10(%rsp), %rsi
testb %al, %al
je 0x2ad2
movb $0x0, (%rsi)
movq %r14, %rdi
callq 0x3d42
jmp 0x2add
movb $0x1, (%rsi)
movq %r14, %rdi
callq 0x3d38
jmp 0x2add
movb $0x1, (%rsi)
movq %r14, %rdi
callq 0x3d42
incl (%rbx)
xorl %ebx, %ebx
jmp 0x278a
leaq 0x27f5(%rip), %rdi      # 0x52e2
xorl %esi, %esi
xorl %eax, %eax
callq 0x2220
jmp 0x2b3c
jmp 0x2b3c
jmp 0x2b3c
jmp 0x2b3c
jmp 0x2b3c
jmp 0x2b3c
jmp 0x2b3c
jmp 0x2b3c
jmp 0x2b3c
jmp 0x2b3c
jmp 0x2b1a
jmp 0x2b3c
jmp 0x2b3c
jmp 0x2b3c
jmp 0x2b1a
jmp 0x2b3c
jmp 0x2b1a
jmp 0x2b3c
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b3f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x2b3f
jmp 0x2b3c
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b5a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2190
movq %rbx, %rdi
callq 0x2290