// File: 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 %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x118(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x2370
movq -0x118(%rbp), %rsi
movq -0x110(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x3ba0
jmp 0x279a
leaq -0x49(%rbp), %rdi
callq 0x2210
xorl %eax, %eax
movl %eax, %esi
leaq -0x48(%rbp), %rdi
callq 0x23b0
movq %rax, -0x120(%rbp)
jmp 0x27b9
movq -0x120(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x283e
movq 0x6801(%rip), %rdi      # 0x8fd0
leaq 0x3890(%rip), %rsi      # 0x6066
callq 0x21e0
movq %rax, -0x128(%rbp)
jmp 0x27e4
movq -0x128(%rbp), %rdi
movq 0x67ce(%rip), %rsi      # 0x8fc0
callq 0x21f0
jmp 0x27f9
callq 0x3110
jmp 0x2800
movl $0x1, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x30e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x49(%rbp), %rdi
callq 0x2210
jmp 0x3107
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x30fe
leaq -0x48(%rbp), %rdi
leaq 0x3852(%rip), %rsi      # 0x609b
callq 0x20c0
cmpl $0x0, %eax
jne 0x286d
callq 0x3110
jmp 0x285a
movl $0x1, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x30e9
leaq -0x48(%rbp), %rdi
leaq 0x382a(%rip), %rsi      # 0x60a2
callq 0x20c0
cmpl $0x0, %eax
jne 0x289c
callq 0x31e0
jmp 0x2889
movl $0x1, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x30e9
leaq -0x48(%rbp), %rdi
leaq 0x3805(%rip), %rsi      # 0x60ac
callq 0x20c0
cmpl $0x0, %eax
jne 0x29d8
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
je 0x28df
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x292a
movq 0x66ea(%rip), %rdi      # 0x8fd0
leaq 0x37c2(%rip), %rsi      # 0x60af
callq 0x21e0
movq %rax, -0x130(%rbp)
jmp 0x28fb
movq -0x130(%rbp), %rdi
movq 0x66b7(%rip), %rsi      # 0x8fc0
callq 0x21f0
jmp 0x2910
callq 0x3110
jmp 0x2917
movl $0x1, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x30e9
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x140(%rbp)
leaq -0x81(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x2370
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x3ba0
jmp 0x296d
leaq -0x81(%rbp), %rdi
callq 0x2210
movq -0x28(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x4620
jmp 0x2988
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x2, %ecx
movl %ecx, (%rax)
leaq -0x80(%rbp), %rdi
callq 0x2110
jmp 0x30d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x81(%rbp), %rdi
callq 0x2210
jmp 0x30fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x2110
jmp 0x30fe
leaq -0x48(%rbp), %rdi
leaq 0x36fd(%rip), %rsi      # 0x60e0
callq 0x20c0
cmpl $0x0, %eax
jne 0x2b20
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
je 0x2a1b
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x2a66
movq 0x65ae(%rip), %rdi      # 0x8fd0
leaq 0x36ba(%rip), %rsi      # 0x60e3
callq 0x21e0
movq %rax, -0x148(%rbp)
jmp 0x2a37
movq -0x148(%rbp), %rdi
movq 0x657b(%rip), %rsi      # 0x8fc0
callq 0x21f0
jmp 0x2a4c
callq 0x3110
jmp 0x2a53
movl $0x1, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x30e9
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x158(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x2370
movq -0x158(%rbp), %rsi
movq -0x150(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
callq 0x3ba0
jmp 0x2aac
leaq -0xa9(%rbp), %rdi
callq 0x2210
movq -0x28(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x4680
jmp 0x2aca
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x2, %ecx
movl %ecx, (%rax)
leaq -0xa8(%rbp), %rdi
callq 0x2110
jmp 0x30d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa9(%rbp), %rdi
callq 0x2210
jmp 0x30fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x2110
jmp 0x30fe
leaq -0x48(%rbp), %rdi
leaq 0x35f2(%rip), %rsi      # 0x611d
callq 0x20c0
cmpl $0x0, %eax
jne 0x2c68
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
je 0x2b63
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x2bae
movq 0x6466(%rip), %rdi      # 0x8fd0
leaq 0x35af(%rip), %rsi      # 0x6120
callq 0x21e0
movq %rax, -0x160(%rbp)
jmp 0x2b7f
movq -0x160(%rbp), %rdi
movq 0x6433(%rip), %rsi      # 0x8fc0
callq 0x21f0
jmp 0x2b94
callq 0x3110
jmp 0x2b9b
movl $0x1, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x30e9
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x170(%rbp)
leaq -0xd1(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x2370
movq -0x170(%rbp), %rsi
movq -0x168(%rbp), %rdx
leaq -0xd0(%rbp), %rdi
callq 0x3ba0
jmp 0x2bf4
leaq -0xd1(%rbp), %rdi
callq 0x2210
movq -0x28(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x46b0
jmp 0x2c12
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x2, %ecx
movl %ecx, (%rax)
leaq -0xd0(%rbp), %rdi
callq 0x2110
jmp 0x30d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xd1(%rbp), %rdi
callq 0x2210
jmp 0x30fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x2110
jmp 0x30fe
leaq -0x48(%rbp), %rdi
leaq 0x34e7(%rip), %rsi      # 0x615a
callq 0x20c0
cmpl $0x0, %eax
jne 0x2db0
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
je 0x2cab
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x2cf6
movq 0x631e(%rip), %rdi      # 0x8fd0
leaq 0x34a4(%rip), %rsi      # 0x615d
callq 0x21e0
movq %rax, -0x178(%rbp)
jmp 0x2cc7
movq -0x178(%rbp), %rdi
movq 0x62eb(%rip), %rsi      # 0x8fc0
callq 0x21f0
jmp 0x2cdc
callq 0x3110
jmp 0x2ce3
movl $0x1, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x30e9
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x188(%rbp)
leaq -0xf9(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x2370
movq -0x188(%rbp), %rsi
movq -0x180(%rbp), %rdx
leaq -0xf8(%rbp), %rdi
callq 0x3ba0
jmp 0x2d3c
leaq -0xf9(%rbp), %rdi
callq 0x2210
movq -0x28(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x4650
jmp 0x2d5a
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x2, %ecx
movl %ecx, (%rax)
leaq -0xf8(%rbp), %rdi
callq 0x2110
jmp 0x30d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xf9(%rbp), %rdi
callq 0x2210
jmp 0x30fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x2110
jmp 0x30fe
leaq -0x48(%rbp), %rdi
leaq 0x33d7(%rip), %rsi      # 0x6192
callq 0x20c0
cmpl $0x0, %eax
jne 0x2e28
movq -0x28(%rbp), %rdi
callq 0x44a0
movb %al, -0x189(%rbp)
jmp 0x2dd6
movb -0x189(%rbp), %al
testb $0x1, %al
jne 0x2de2
jmp 0x2dfd
movq -0x28(%rbp), %rdi
movb $0x0, -0xfa(%rbp)
leaq -0xfa(%rbp), %rsi
callq 0x46e0
jmp 0x2dfb
jmp 0x2e18
movq -0x28(%rbp), %rdi
movb $0x1, -0xfb(%rbp)
leaq -0xfb(%rbp), %rsi
callq 0x46e0
jmp 0x2e16
jmp 0x2e18
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x30cf
leaq -0x48(%rbp), %rdi
leaq 0x3363(%rip), %rsi      # 0x6196
callq 0x20c0
cmpl $0x0, %eax
jne 0x2ea0
movq -0x28(%rbp), %rdi
callq 0x44c0
movb %al, -0x18a(%rbp)
jmp 0x2e4e
movb -0x18a(%rbp), %al
testb $0x1, %al
jne 0x2e5a
jmp 0x2e75
movq -0x28(%rbp), %rdi
movb $0x0, -0xfc(%rbp)
leaq -0xfc(%rbp), %rsi
callq 0x4710
jmp 0x2e73
jmp 0x2e90
movq -0x28(%rbp), %rdi
movb $0x1, -0xfd(%rbp)
leaq -0xfd(%rbp), %rsi
callq 0x4710
jmp 0x2e8e
jmp 0x2e90
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x30cd
leaq -0x48(%rbp), %rdi
leaq 0x32ef(%rip), %rsi      # 0x619a
callq 0x20c0
cmpl $0x0, %eax
jne 0x2f18
movq -0x28(%rbp), %rdi
callq 0x44e0
movb %al, -0x18b(%rbp)
jmp 0x2ec6
movb -0x18b(%rbp), %al
testb $0x1, %al
jne 0x2ed2
jmp 0x2eed
movq -0x28(%rbp), %rdi
movb $0x0, -0xfe(%rbp)
leaq -0xfe(%rbp), %rsi
callq 0x4740
jmp 0x2eeb
jmp 0x2f08
movq -0x28(%rbp), %rdi
movb $0x1, -0xff(%rbp)
leaq -0xff(%rbp), %rsi
callq 0x4740
jmp 0x2f06
jmp 0x2f08
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x30cb
leaq -0x48(%rbp), %rdi
leaq 0x327a(%rip), %rsi      # 0x619d
callq 0x20c0
cmpl $0x0, %eax
jne 0x2f90
movq -0x28(%rbp), %rdi
callq 0x4500
movb %al, -0x18c(%rbp)
jmp 0x2f3e
movb -0x18c(%rbp), %al
testb $0x1, %al
jne 0x2f4a
jmp 0x2f65
movq -0x28(%rbp), %rdi
movb $0x0, -0x100(%rbp)
leaq -0x100(%rbp), %rsi
callq 0x4770
jmp 0x2f63
jmp 0x2f80
movq -0x28(%rbp), %rdi
movb $0x1, -0x101(%rbp)
leaq -0x101(%rbp), %rsi
callq 0x4770
jmp 0x2f7e
jmp 0x2f80
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x30c9
leaq -0x48(%rbp), %rdi
leaq 0x3205(%rip), %rsi      # 0x61a0
callq 0x20c0
cmpl $0x0, %eax
jne 0x3008
movq -0x28(%rbp), %rdi
callq 0x4520
movb %al, -0x18d(%rbp)
jmp 0x2fb6
movb -0x18d(%rbp), %al
testb $0x1, %al
jne 0x2fc2
jmp 0x2fdd
movq -0x28(%rbp), %rdi
movb $0x0, -0x102(%rbp)
leaq -0x102(%rbp), %rsi
callq 0x47a0
jmp 0x2fdb
jmp 0x2ff8
movq -0x28(%rbp), %rdi
movb $0x1, -0x103(%rbp)
leaq -0x103(%rbp), %rsi
callq 0x47a0
jmp 0x2ff6
jmp 0x2ff8
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x30c7
leaq -0x48(%rbp), %rdi
leaq 0x3190(%rip), %rsi      # 0x61a3
callq 0x20c0
cmpl $0x0, %eax
jne 0x307d
movq -0x28(%rbp), %rdi
callq 0x4540
movb %al, -0x18e(%rbp)
jmp 0x302e
movb -0x18e(%rbp), %al
testb $0x1, %al
jne 0x303a
jmp 0x3055
movq -0x28(%rbp), %rdi
movb $0x0, -0x104(%rbp)
leaq -0x104(%rbp), %rsi
callq 0x47d0
jmp 0x3053
jmp 0x3070
movq -0x28(%rbp), %rdi
movb $0x1, -0x105(%rbp)
leaq -0x105(%rbp), %rsi
callq 0x47d0
jmp 0x306e
jmp 0x3070
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x30c5
movq 0x5f4c(%rip), %rdi      # 0x8fd0
leaq 0x311d(%rip), %rsi      # 0x61a8
callq 0x21e0
movq %rax, -0x198(%rbp)
jmp 0x3099
movq -0x198(%rbp), %rdi
movq 0x5f19(%rip), %rsi      # 0x8fc0
callq 0x21f0
jmp 0x30ae
callq 0x3110
jmp 0x30b5
movl $0x1, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x30e9
jmp 0x30c7
jmp 0x30c9
jmp 0x30cb
jmp 0x30cd
jmp 0x30cf
jmp 0x30d1
jmp 0x30d3
jmp 0x30d5
jmp 0x30d7
jmp 0x30d9
jmp 0x30db
movl $0x0, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x2110
movl -0x4(%rbp), %eax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0x2110
movq -0x58(%rbp), %rdi
callq 0x2360