// File: /workspace/github_c_makefile_star2_O2/inflex[P]ripMIME/ripOLE/ripole.c
// Function: ROLE_parse_parameters
int ROLE_parse_parameters( struct ripOLE_object *role, int argc, char **argv )
{
	int i;
	int result = 0;

	role->outputdir = defaultdir;

	for (i = 1; i < argc; i++)
	{
		if (argv[i][0] == '-')
		{
			switch (argv[i][1])
			{
				case 'i':
					i++;
					role->inputfile = strdup(argv[i]);
					break;

				case 'd':
					i++;
					role->outputdir = strdup(argv[i]);
					break;

				case 'v':
					role->verbose = 1;
					break;

				case 'V':
					fprintf (stdout, "%s\n", version);
					exit (1);
					break;
				case 'h':
					fprintf (stdout, "%s\n", help);
					exit (1);
					break;

					// if we get ANOTHER - symbol, then we have an extended flag

				case '-':
					if (strncmp (&(argv[i][2]), "verbose", 7) == 0)
					{
						role->verbose=1;

					} else if (strncmp (&(argv[i][2]), "save-unknown-streams", 20) == 0) {
						role->save_unknown_streams = 1;

					} else if (strncmp (&(argv[i][2]), "debug", 5) == 0) {
						role->debug=1;

					} else if (strncmp (&(argv[i][2]), "version", 7) == 0) {
						fprintf (stdout, "%s\n", version);
						exit (1);

					} else if (strncmp(&(argv[i][2]),"help",4)==0) {
						fprintf(stdout,"%s\n",help);
						exit(1);

					} else {
						fprintf(stdout,"Cannot interpret option \"%s\"\n%s\n", argv[i], help);
						exit (1);
						break;
					}
					break;

					// else, just dump out the help message

				default:
					fprintf(stdout,"Cannot interpret option \"%s\"\n%s\n", argv[i], help);
					exit (1);
					break;

			}			// Switch argv[i][1]

		}			// if argv[i][0] == -

	}				// for

	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x5b13(%rip), %rax      # 0xa130
movq %rax, 0x18(%rdi)
pushq $0x1
popq %r12
cmpl %ebp, %r12d
jge 0x46f1
movslq %r12d, %rax
movq (%rbx,%rax,8), %r13
cmpb $0x2d, (%r13)
jne 0x46df
movzbl 0x1(%r13), %ecx
cmpl $0x2d, %ecx
je 0x465e
cmpl $0x64, %ecx
je 0x46bb
cmpl $0x69, %ecx
je 0x46ce
cmpl $0x76, %ecx
je 0x46b1
jmp 0x4702
leaq 0x2(%r13), %r15
movq %r15, %rdi
leaq 0x293d(%rip), %rsi      # 0x6fa9
pushq $0x7
popq %rdx
callq 0x1060
testl %eax, %eax
je 0x46b1
movq %r15, %rdi
leaq 0x292f(%rip), %rsi      # 0x6fb1
pushq $0x14
popq %rdx
callq 0x1060
testl %eax, %eax
je 0x46e7
movq %r15, %rdi
leaq 0x292e(%rip), %rsi      # 0x6fc6
pushq $0x5
popq %rdx
callq 0x1060
testl %eax, %eax
jne 0x4743
movl $0x1, (%r14)
jmp 0x46df
movl $0x1, 0x4(%r14)
jmp 0x46df
incl %r12d
movq 0x8(%rbx,%rax,8), %rdi
callq 0x11b0
movq %rax, 0x18(%r14)
jmp 0x46df
incl %r12d
movq 0x8(%rbx,%rax,8), %rdi
callq 0x11b0
movq %rax, 0x10(%r14)
incl %r12d
jmp 0x4625
movl $0x1, 0x8(%r14)
jmp 0x46df
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x56, %ecx
je 0x4759
movq 0x58c2(%rip), %rax      # 0x9fd0
cmpl $0x68, %ecx
jne 0x4726
movq (%rax), %rdi
leaq 0x28d9(%rip), %rsi      # 0x6ff6
leaq 0x5a6c(%rip), %rdx      # 0xa190
jmp 0x4771
movq (%rax), %rdi
leaq 0x28a9(%rip), %rsi      # 0x6fd9
leaq 0x5a59(%rip), %rcx      # 0xa190
movq %r13, %rdx
xorl %eax, %eax
callq 0x10d0
jmp 0x4778
leaq 0x2882(%rip), %rsi      # 0x6fcc
pushq $0x7
popq %rdx
movq %r15, %rdi
callq 0x1060
testl %eax, %eax
jne 0x4780
movq 0x5870(%rip), %rax      # 0x9fd0
movq (%rax), %rdi
leaq 0x288c(%rip), %rsi      # 0x6ff6
leaq 0x59cf(%rip), %rdx      # 0xa140
xorl %eax, %eax
callq 0x10d0
pushq $0x1
popq %rdi
callq 0x1190
leaq 0x284d(%rip), %rsi      # 0x6fd4
pushq $0x4
popq %rdx
movq %r15, %rdi
callq 0x1060
movq 0x5837(%rip), %rcx      # 0x9fd0
movq (%rcx), %rdi
testl %eax, %eax
je 0x4716
jmp 0x4729