// File: /workspace/github_c_makefile_star2_O3/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
leaq 0x591c(%rip), %rax      # 0xa130
movq %rax, 0x18(%rdi)
cmpl $0x2, %esi
jl 0x490c
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x1, %r15d
movslq %r15d, %rax
movq (%rbx,%rax,8), %r13
cmpb $0x2d, (%r13)
jne 0x48f4
movzbl 0x1(%r13), %ecx
cmpl $0x67, %ecx
jg 0x4870
cmpl $0x2d, %ecx
je 0x487f
cmpl $0x64, %ecx
jne 0x493c
leal 0x1(%rax), %r15d
movq 0x8(%rbx,%rax,8), %rdi
callq 0x11a0
movq %rax, 0x18(%r14)
jmp 0x48f4
cmpl $0x69, %ecx
je 0x48e2
cmpl $0x76, %ecx
je 0x48d8
jmp 0x491d
leaq 0x2(%r13), %r12
movl $0x7, %edx
movq %r12, %rdi
leaq 0x2717(%rip), %rsi      # 0x6fa9
callq 0x1060
testl %eax, %eax
je 0x48d8
movl $0x14, %edx
movq %r12, %rdi
leaq 0x2707(%rip), %rsi      # 0x6fb1
callq 0x1060
testl %eax, %eax
je 0x4902
movl $0x5, %edx
movq %r12, %rdi
leaq 0x2704(%rip), %rsi      # 0x6fc6
callq 0x1060
testl %eax, %eax
jne 0x498e
movl $0x1, (%r14)
jmp 0x48f4
movl $0x1, 0x4(%r14)
jmp 0x48f4
leal 0x1(%rax), %r15d
movq 0x8(%rbx,%rax,8), %rdi
callq 0x11a0
movq %rax, 0x10(%r14)
incl %r15d
cmpl %ebp, %r15d
jl 0x482f
jmp 0x490c
movl $0x1, 0x8(%r14)
jmp 0x48f4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x68, %ecx
jne 0x4962
movq 0x56a7(%rip), %rax      # 0x9fd0
movq (%rax), %rdi
leaq 0x26c3(%rip), %rsi      # 0x6ff6
leaq 0x5856(%rip), %rdx      # 0xa190
jmp 0x4959
cmpl $0x56, %ecx
jne 0x4962
movq 0x5688(%rip), %rax      # 0x9fd0
movq (%rax), %rdi
leaq 0x26a4(%rip), %rsi      # 0x6ff6
leaq 0x57e7(%rip), %rdx      # 0xa140
xorl %eax, %eax
callq 0x10d0
jmp 0x4984
movq 0x5667(%rip), %rax      # 0x9fd0
movq (%rax), %rdi
leaq 0x2666(%rip), %rsi      # 0x6fd9
leaq 0x5816(%rip), %rcx      # 0xa190
movq %r13, %rdx
xorl %eax, %eax
callq 0x10d0
movl $0x1, %edi
callq 0x1180
leaq 0x2637(%rip), %rsi      # 0x6fcc
movl $0x7, %edx
movq %r12, %rdi
callq 0x1060
testl %eax, %eax
je 0x4941
leaq 0x2627(%rip), %rsi      # 0x6fd4
movl $0x4, %edx
movq %r12, %rdi
callq 0x1060
movq 0x560f(%rip), %rcx      # 0x9fd0
movq (%rcx), %rdi
testl %eax, %eax
je 0x492c
jmp 0x496c