// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
leaq 0x5c0b(%rip), %rcx      # 0xc130
movq %rcx, 0x18(%rax)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x6826
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x6816
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
movl %eax, -0x24(%rbp)
subl $0x2d, %eax
je 0x6665
jmp 0x6572
movl -0x24(%rbp), %eax
subl $0x56, %eax
je 0x6613
jmp 0x6580
movl -0x24(%rbp), %eax
subl $0x64, %eax
je 0x65d9
jmp 0x658a
movl -0x24(%rbp), %eax
subl $0x68, %eax
je 0x663c
jmp 0x6598
movl -0x24(%rbp), %eax
subl $0x69, %eax
je 0x65af
jmp 0x65a2
movl -0x24(%rbp), %eax
subl $0x76, %eax
je 0x6603
jmp 0x67df
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x11b0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x6814
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x11b0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x6814
movq -0x8(%rbp), %rax
movl $0x1, 0x4(%rax)
jmp 0x6814
movq 0x59b6(%rip), %rax      # 0xbfd0
movq (%rax), %rdi
leaq 0x29d6(%rip), %rsi      # 0x8ffa
leaq 0x5b15(%rip), %rdx      # 0xc140
movb $0x0, %al
callq 0x10e0
movl $0x1, %edi
callq 0x1190
movq 0x598d(%rip), %rax      # 0xbfd0
movq (%rax), %rdi
leaq 0x29ad(%rip), %rsi      # 0x8ffa
leaq 0x5b3c(%rip), %rdx      # 0xc190
movb $0x0, %al
callq 0x10e0
movl $0x1, %edi
callq 0x1190
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x2, %rdi
leaq 0x2931(%rip), %rsi      # 0x8fad
movl $0x7, %edx
callq 0x1050
cmpl $0x0, %eax
jne 0x669b
movq -0x8(%rbp), %rax
movl $0x1, 0x4(%rax)
jmp 0x67dd
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x2, %rdi
leaq 0x2903(%rip), %rsi      # 0x8fb5
movl $0x14, %edx
callq 0x1050
cmpl $0x0, %eax
jne 0x66d1
movq -0x8(%rbp), %rax
movl $0x1, 0x8(%rax)
jmp 0x67db
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x2, %rdi
leaq 0x28e2(%rip), %rsi      # 0x8fca
movl $0x5, %edx
callq 0x1050
cmpl $0x0, %eax
jne 0x6706
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
jmp 0x67d9
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x2, %rdi
leaq 0x28b3(%rip), %rsi      # 0x8fd0
movl $0x7, %edx
callq 0x1050
cmpl $0x0, %eax
jne 0x6755
movq 0x589d(%rip), %rax      # 0xbfd0
movq (%rax), %rdi
leaq 0x28bd(%rip), %rsi      # 0x8ffa
leaq 0x59fc(%rip), %rdx      # 0xc140
movb $0x0, %al
callq 0x10e0
movl $0x1, %edi
callq 0x1190
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x2, %rdi
leaq 0x286c(%rip), %rsi      # 0x8fd8
movl $0x4, %edx
callq 0x1050
cmpl $0x0, %eax
jne 0x67a4
movq 0x584e(%rip), %rax      # 0xbfd0
movq (%rax), %rdi
leaq 0x286e(%rip), %rsi      # 0x8ffa
leaq 0x59fd(%rip), %rdx      # 0xc190
movb $0x0, %al
callq 0x10e0
movl $0x1, %edi
callq 0x1190
movq 0x5825(%rip), %rax      # 0xbfd0
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x281c(%rip), %rsi      # 0x8fdd
leaq 0x59c8(%rip), %rcx      # 0xc190
movb $0x0, %al
callq 0x10e0
movl $0x1, %edi
callq 0x1190
jmp 0x67db
jmp 0x67dd
jmp 0x6814
movq 0x57ea(%rip), %rax      # 0xbfd0
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x27e1(%rip), %rsi      # 0x8fdd
leaq 0x598d(%rip), %rcx      # 0xc190
movb $0x0, %al
callq 0x10e0
movl $0x1, %edi
callq 0x1190
jmp 0x6816
jmp 0x6818
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6530
movl -0x20(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop