// File: /workspace/github_c_makefile_star2_O1/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 0x57d0(%rip), %rax      # 0xa130
movq %rax, 0x18(%rdi)
cmpl $0x2, %esi
jl 0x4a58
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x1, %r15d
movslq %r15d, %rax
movq (%rbx,%rax,8), %r13
cmpb $0x2d, (%r13)
jne 0x4a40
movzbl 0x1(%r13), %ecx
cmpl $0x67, %ecx
jg 0x49bc
cmpl $0x2d, %ecx
je 0x49cb
cmpl $0x64, %ecx
jne 0x4a88
leal 0x1(%rax), %r15d
movq 0x8(%rbx,%rax,8), %rdi
callq 0x11a0
movq %rax, 0x18(%r14)
jmp 0x4a40
cmpl $0x69, %ecx
je 0x4a2e
cmpl $0x76, %ecx
je 0x4a24
jmp 0x4a69
leaq 0x2(%r13), %r12
movl $0x7, %edx
movq %r12, %rdi
leaq 0x25cb(%rip), %rsi      # 0x6fa9
callq 0x1060
testl %eax, %eax
je 0x4a24
movl $0x14, %edx
movq %r12, %rdi
leaq 0x25bb(%rip), %rsi      # 0x6fb1
callq 0x1060
testl %eax, %eax
je 0x4a4e
movl $0x5, %edx
movq %r12, %rdi
leaq 0x25b8(%rip), %rsi      # 0x6fc6
callq 0x1060
testl %eax, %eax
jne 0x4ada
movl $0x1, (%r14)
jmp 0x4a40
movl $0x1, 0x4(%r14)
jmp 0x4a40
leal 0x1(%rax), %r15d
movq 0x8(%rbx,%rax,8), %rdi
callq 0x11a0
movq %rax, 0x10(%r14)
incl %r15d
cmpl %ebp, %r15d
jl 0x497b
jmp 0x4a58
movl $0x1, 0x8(%r14)
jmp 0x4a40
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x68, %ecx
jne 0x4aae
movq 0x555b(%rip), %rax      # 0x9fd0
movq (%rax), %rdi
leaq 0x2577(%rip), %rsi      # 0x6ff6
leaq 0x570a(%rip), %rdx      # 0xa190
jmp 0x4aa5
cmpl $0x56, %ecx
jne 0x4aae
movq 0x553c(%rip), %rax      # 0x9fd0
movq (%rax), %rdi
leaq 0x2558(%rip), %rsi      # 0x6ff6
leaq 0x569b(%rip), %rdx      # 0xa140
xorl %eax, %eax
callq 0x10d0
jmp 0x4ad0
movq 0x551b(%rip), %rax      # 0x9fd0
movq (%rax), %rdi
leaq 0x251a(%rip), %rsi      # 0x6fd9
leaq 0x56ca(%rip), %rcx      # 0xa190
movq %r13, %rdx
xorl %eax, %eax
callq 0x10d0
movl $0x1, %edi
callq 0x1180
leaq 0x24eb(%rip), %rsi      # 0x6fcc
movl $0x7, %edx
movq %r12, %rdi
callq 0x1060
testl %eax, %eax
je 0x4a8d
leaq 0x24db(%rip), %rsi      # 0x6fd4
movl $0x4, %edx
movq %r12, %rdi
callq 0x1060
movq 0x54c3(%rip), %rcx      # 0x9fd0
movq (%rcx), %rdi
testl %eax, %eax
je 0x4a78
jmp 0x4ab8