// File: /workspace/github_c_makefile_star2_O3/nimble-code[P]Modex/Src/modex.c
// Function: BldCmds
int
BldCmds(int argc, char **argv)
{	char *arg;

	argc--; 
	argv++;

	while(argc-- > 0)
	{	arg = *argv++;

		if (arg[0] == '-')
		{	if (strncmp(arg, "-dynamic", strlen("-dynamic")) == 0)
			{	if (isdigit((int) *(arg+strlen("-dynamic"))))
				{	dynamic = atoi(arg+(int)strlen("-dynamic"));
					if (dynamic > 250)
					{	dynamic = 250;
					} else if (dynamic < 1)
					{	dynamic = 1;
					}
				//	printf("modex: max nr of threads: %d\n", dynamic);
				} else
				{	dynamic = 250;
				}
				continue;
			} else if (strcmp(arg, "-parsetree") == 0) /* dot output of parsetree */
			{	predot = 1;
				do_dflow=1;
				continue;
			} else if (strcmp(arg, "-cfg") == 0)	/* dot output control flow graph */
			{	preview     = 2;
				do_dflow    = 1;
				sysoverride = 1;
				continue;
			} else if (strcmp(arg, "-fcg") == 0)	/* dot output fct call graph */
			{	preview     = 3;
				do_dflow    = 1;
				sysoverride = 1;
				continue;
			} else if (strcmp(arg, "-nopre") == 0)
			{	nopre = 1;
				continue;
			} else if (strcmp(arg, "-nostructs") == 0)
			{	nostructs = 1;
				continue;
			} else if (strcmp(arg, "-master") == 0)
			{	master_dfn = (char *) e_malloc(strlen(*argv)+1);
				strcpy(master_dfn, *argv);
				continue;
			} else if (strcmp(arg, "-defuse") == 0)
			{	do_dflow = 1;
				du_mode = 1;
				continue;
			} else if (strcmp(arg, "-heapsize") == 0)
			{	spin_heap_size = atoi(*argv);
				argc--; argv++;
				continue;
			} else if (strcmp(arg, "-run") == 0)
			{	tagrun = 1;
				continue;
			} else if (strcmp(arg, "-printf") == 0)
			{	add_printfs = 1;
				continue;
			}

			nrprocs = nrprocs_default;

			switch (arg[1]) {
			case 'x':
				want = "all";
				hasaction = 1;
				// fall thru
				if (isdigit((int) arg[strlen(arg)-1]))
				{	nrprocs = atoi(&arg[strlen(arg)-1]);
				} else
				{	nrprocs = nrprocs_default;
				}
			default:
				new_cmd(arg[1], arg, 1);
				break;

			/* commands with arguments */
			case 'a':
			case 'e':	/* -e or -eN or -ex */
			case 'N':
				if (isdigit((int) arg[2]))
				{	nrprocs = atoi(&arg[2]);
				} else
				{	nrprocs = 1;
				}
				if (arg[1] == 'N')
				{	nrprocs_default = nrprocs;
					break;
				}
				// fall thru
			case 'E':
			case 'f':
			case 'n':
			case 'i':
			case 'p':
				want = *argv;
				hasaction = 1;
				// fall thru
			case 'L':
			case 'M':
			case 'm':
			case 'b':
				if (!*argv)
				{	Usage("modex");
				}
				if (*argv != NULL && strchr(*argv, ',') != NULL)
				{	expand_cmd(arg[1], *argv, 20);
				} else
				{	new_cmd(arg[1], *argv, 2); // argv points to next arg
				}
				argc--; argv++;
				break;

			/* immediate commands */
			case 'C': show_code  = do_dflow = allprocs = 1; break;
			case 'X': show_deps  = do_dflow = allprocs = 1; break;
			case 'F': show_funcs = do_dflow = allprocs = 1; break;
			case 's': show_syms  = do_dflow = allprocs = 1; break;

			case 'q':
				if (arg[2] != '\0' && isdigit((int) arg[2]))
				{	quality = atoi(&arg[2]);
				} else
				{	if (isdigit((int) *argv[0]))
					{	quality = atoi(*argv);
					} else
					{	Usage("bad q flag parameter");
				}	}
				break;

			case 'O': /* -O "-DMEMLIM=8000 -O2" etc. compiler directives for pan.c */
				if (strlen(optimized) > 0)
				{	Usage("modex: multiple use of -O");
				}
				if (isdigit((int) arg[2]))	/* e.g., a plain -O3 */
				{	optimized = (char *) e_malloc(strlen(arg)+1);
					strcpy(optimized, arg);	/* older version */
					break;
				}
				/* new 2.6 */
				arg = *argv;	/* next argument */
				if (arg)
				{	while (*arg == ' ' || *arg == '\t')
					{	arg++;
					}
					optimized = (char *) e_malloc(strlen(arg)+1);
					strcpy(optimized, arg);
					argc--; argv++;
				} else
				{	Usage("modex");
				}
				break;

			case 'Q':	/* source compilation e.g.: -Q "-DDEBUG -I. -IPublic" */
				if (strlen(preproc_info) > 0)
				{	Usage("modex: multiple use of -Q");
				}
				arg = *argv;	/* next argument */
				if (arg)
				{	while (*arg == ' ' || *arg == '\t')
					{	arg++;
					}
					preproc_info = (char *) e_malloc(strlen(arg)+1);
					strcpy(preproc_info, arg);
					argc--; argv++;
				} else
				{	Usage("modex");
				}
				break;
			case 'R':	/* pan runtime flags, e.g.: -R "-E" */
				arg = *argv;
				if (arg)
				{	while (*arg == ' ' || *arg == '\t')
					{	arg++;
					}
					runtime = (char *) e_malloc(strlen(arg)+2);
					strcpy(runtime, arg);
					strcat(runtime, " ");
					argc--; argv++;
				} else
				{	Usage("modex");
				}
				break;
			case 'T':	/* e.g.: -T "s;replace;with;g" or %T sed "...." */
				arg = *argv;
				if (arg)
				{	char *tmp;
					while (*arg == ' ' || *arg == '\t')
					{	arg++;
					}
					tmp = (char *) e_malloc(strlen(sedproc_info) + strlen(arg)+1+6+3);
					// 6 = "sed '' 3=" | "
					sprintf(tmp, "%s | sed '%s'", sedproc_info, arg);
					sedproc_info = tmp;
					argc--; argv++;
				} else
				{	Usage("modex");
				}
				break;

			case 'U':	/* undefine symbol */
			case 'D':	/* define symbol */
			case 'I':	/* set include directory */
				if (strlen(preproc_info) == 0)
				{	preproc_info = (char *) e_malloc(strlen(arg)+1);
					strcpy(preproc_info, arg);
				} else
				{	char *pp = (char *) e_malloc(strlen(arg)+strlen(preproc_info)+1+1);
					strcpy(pp, preproc_info);
					strcat(pp, " ");
					strcat(pp, arg);
					preproc_info = pp;
				}
				/* printf("arg: <%s>\n", preproc_info); */
				break;

			case 'P':
				must_preprocess = 0;
				break;
			case 'Z':
				i_assert = 1 - i_assert;
				break;
			case 'z':
				sysoverride = 1 - sysoverride;
				break;
			case 'V':
				printf("%s\n", VERSION);
				exit(0);
			case 'Y':
				Verbose_cmds = 1;
				break;
			case 'v':
				Verbose = 1;	/* Verbose |= 2 or 4 for debugging verbosity */
				break;
			case 'w':
				Warnings = 1;
				break;
			case '?':
			case '-':
				Usage("modex");

			}
		} else if (arg)
		{	char *p;

			if (!preview
			||  ((p = strstr(arg, ".c")) != NULL
			&&   strcmp(p, ".c") == 0))
			{	if (Verbose_cmds)
				{	printf("-- setting file_name to %s\n", arg);
				}
				file_name = arg;
			}
			break;
		} else
			return 0;
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jl 0x86e0
movq %rsi, %r13
movl %edi, %ebp
leal -0x2(%rbp), %r14d
addq $0x8, %r13
decl %ebp
leaq 0x1b1ef(%rip), %rbx     # 0x231cb
movq (%r13), %r12
cmpb $0x2d, (%r12)
jne 0x8691
leaq 0x8(%r13), %r15
movl $0x8, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x40a0
testl %eax, %eax
je 0x8123
movq %r12, %rdi
leaq 0x1b1c3(%rip), %rsi     # 0x231d4
callq 0x41c0
testl %eax, %eax
je 0x815d
movq %r12, %rdi
leaq 0x1b1b7(%rip), %rsi     # 0x231df
callq 0x41c0
testl %eax, %eax
je 0x8170
movq %r12, %rdi
leaq 0x1b1a5(%rip), %rsi     # 0x231e4
callq 0x41c0
testl %eax, %eax
je 0x818c
movq %r12, %rdi
leaq 0x1b193(%rip), %rsi     # 0x231e9
callq 0x41c0
testl %eax, %eax
je 0x81be
movq %r12, %rdi
leaq 0x1b183(%rip), %rsi     # 0x231f0
callq 0x41c0
testl %eax, %eax
je 0x81ca
movq %r12, %rdi
leaq 0x1b177(%rip), %rsi     # 0x231fb
callq 0x41c0
testl %eax, %eax
je 0x81d6
movq %r12, %rdi
leaq 0x1b168(%rip), %rsi     # 0x23203
callq 0x41c0
testl %eax, %eax
je 0x81fa
movq %r12, %rdi
leaq 0x1b159(%rip), %rsi     # 0x2320b
callq 0x41c0
testl %eax, %eax
je 0x820d
movq %r12, %rdi
leaq 0x1b14c(%rip), %rsi     # 0x23215
callq 0x41c0
testl %eax, %eax
je 0x822e
movq %r12, %rdi
leaq 0x1b13a(%rip), %rsi     # 0x2321a
callq 0x41c0
testl %eax, %eax
je 0x823d
movl 0x2e111(%rip), %edx     # 0x36204
movl %edx, 0x2e107(%rip)     # 0x36200
movzbl 0x1(%r12), %eax
addl $-0x2d, %eax
cmpl $0x4d, %eax
ja 0x85b3
leaq 0x1a0fa(%rip), %rcx     # 0x2220c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r15), %r14
jmp 0x8302
callq 0x42e0
movq (%rax), %rax
movsbq 0x8(%r12), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x8151
addq $0x8, %r12
movq %r12, %rdi
callq 0x4280
movl %eax, 0x308e6(%rip)     # 0x38a30
cmpl $0xfb, %eax
jl 0x817c
movl $0xfa, 0x308d5(%rip)    # 0x38a30
jmp 0x81a7
movl $0x1, %eax
movl %eax, 0x308cc(%rip)     # 0x38a34
movl %eax, 0x308ca(%rip)     # 0x38a38
jmp 0x81a7
movl $0x2, 0x308c2(%rip)     # 0x38a3c
jmp 0x8196
testl %eax, %eax
jg 0x81a7
movl $0x1, 0x308a6(%rip)     # 0x38a30
jmp 0x81a7
movl $0x3, 0x308a6(%rip)     # 0x38a3c
movl $0x1, %eax
movl %eax, 0x30897(%rip)     # 0x38a38
movl %eax, 0x30899(%rip)     # 0x38a40
movl %r14d, %ebp
leal -0x1(%rbp), %r14d
movq %r15, %r13
testl %ebp, %ebp
jg 0x7fdc
jmp 0x86e0
movl $0x1, 0x3087c(%rip)     # 0x38a44
jmp 0x81a7
movl $0x1, 0x30874(%rip)     # 0x38a48
jmp 0x81a7
movq (%r15), %rdi
callq 0x4110
leal 0x1(%rax), %edi
callq 0x6321
movq %rax, 0x30863(%rip)     # 0x38a50
movq (%r15), %rsi
movq %rax, %rdi
callq 0x40b0
jmp 0x81a7
movl $0x1, %eax
movl %eax, 0x30833(%rip)     # 0x38a38
movl %eax, 0x3084d(%rip)     # 0x38a58
jmp 0x81a7
movq 0x8(%r13), %rdi
callq 0x4280
movl %eax, 0x2dfcc(%rip)     # 0x361e8
addl $-0x2, %ebp
addq $0x10, %r13
movq %r13, %r15
movl %ebp, %r14d
jmp 0x81a7
movl $0x1, 0x30824(%rip)     # 0x38a5c
jmp 0x81a7
movl $0x1, 0x30819(%rip)     # 0x38a60
jmp 0x81a7
movq 0x2df75(%rip), %rdi     # 0x361c8
callq 0x4110
movq %rax, %r13
movq %r12, %rdi
callq 0x4110
testq %r13, %r13
je 0x8344
leal (%rax,%r13), %edi
addl $0x2, %edi
callq 0x6321
movq %rax, %r13
movq 0x2df46(%rip), %rsi     # 0x361c8
movq %rax, %rdi
callq 0x40b0
movq %r13, %rdi
callq 0x4110
movw $0x20, (%r13,%rax)
movq %r13, %rdi
movq %r12, %rsi
callq 0x4290
movq %r13, 0x2df1c(%rip)     # 0x361c8
jmp 0x81a7
callq 0x42e0
movq (%rax), %rcx
movsbq 0x2(%r12), %rdx
movl $0x1, %eax
testb $0x8, 0x1(%rcx,%rdx,2)
je 0x82d5
leaq 0x2(%r12), %rdi
callq 0x4280
movl %eax, 0x2df25(%rip)     # 0x36200
cmpb $0x4e, 0x1(%r12)
jne 0x82ee
movl %eax, 0x2df1b(%rip)     # 0x36204
jmp 0x81a7
movq (%r15), %r14
movq %r14, 0x2deb0(%rip)     # 0x361a8
movl $0x1, 0x30762(%rip)     # 0x38a64
testq %r14, %r14
je 0x86f4
movq %r14, %rdi
movl $0x2c, %esi
callq 0x4130
movsbl 0x1(%r12), %edi
movq %r14, %rsi
testq %rax, %rax
je 0x8335
movl $0x14, %edx
callq 0x7f44
jmp 0x821c
movl $0x2, %edx
callq 0x7e6f
jmp 0x821c
incl %eax
movl %eax, %edi
callq 0x6321
movq %rax, 0x2de74(%rip)     # 0x361c8
jmp 0x8648
movl $0x1, %eax
subl 0x2de94(%rip), %eax     # 0x361f8
movl %eax, 0x2de8e(%rip)     # 0x361f8
jmp 0x81a7
movl $0x1, 0x306a3(%rip)     # 0x38a1c
jmp 0x81a7
movq (%r15), %r12
testq %r12, %r12
jne 0x838e
jmp 0x86f4
incq %r12
movzbl (%r12), %eax
cmpl $0x20, %eax
je 0x838b
cmpl $0x9, %eax
je 0x838b
movq %r12, %rdi
callq 0x4110
leal 0x2(%rax), %edi
callq 0x6321
movq %rax, 0x2de1c(%rip)     # 0x361d0
movq %rax, %rdi
movq %r12, %rsi
callq 0x40b0
movq 0x2de0a(%rip), %r12     # 0x361d0
movq %r12, %rdi
callq 0x4110
movw $0x20, (%r12,%rax)
jmp 0x821c
movq (%r15), %r12
testq %r12, %r12
je 0x86f4
movzbl (%r12), %eax
cmpl $0x20, %eax
je 0x83f9
cmpl $0x9, %eax
jne 0x85cb
incq %r12
jmp 0x83e6
movl $0x1, 0x30678(%rip)     # 0x38a80
jmp 0x81a7
movl $0x1, %eax
movl %eax, 0x30650(%rip)     # 0x38a68
movl %eax, 0x3061a(%rip)     # 0x38a38
movl %eax, 0x3064c(%rip)     # 0x38a70
jmp 0x81a7
movl $0x1, %eax
subl 0x3060c(%rip), %eax     # 0x38a40
jmp 0x81a1
movl $0x1, 0x30639(%rip)     # 0x38a7c
jmp 0x81a7
movl $0x0, 0x2ddaa(%rip)     # 0x361fc
jmp 0x81a7
movl $0x1, %eax
movl %eax, 0x30606(%rip)     # 0x38a68
movl %eax, 0x305d0(%rip)     # 0x38a38
movl %eax, 0x305fe(%rip)     # 0x38a6c
jmp 0x81a7
movl $0x1, %eax
movl %eax, 0x305ea(%rip)     # 0x38a68
movl %eax, 0x305b4(%rip)     # 0x38a38
movl %eax, 0x305ea(%rip)     # 0x38a74
jmp 0x81a7
movsbq 0x2(%r12), %r13
callq 0x42e0
testq %r13, %r13
je 0x84ae
movq (%rax), %rcx
testb $0x8, 0x1(%rcx,%r13,2)
jne 0x867a
movq (%rax), %rax
movq (%r15), %rdi
movsbq (%rdi), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0x8681
jmp 0x872b
movq 0x2dcf9(%rip), %rax     # 0x361c8
cmpb $0x0, (%rax)
jne 0x8713
movq (%r15), %r12
testq %r12, %r12
je 0x86f4
movzbl (%r12), %eax
cmpl $0x20, %eax
je 0x84f7
cmpl $0x9, %eax
jne 0x8618
incq %r12
jmp 0x84e4
movq 0x2dcdd(%rip), %rax     # 0x361e0
cmpb $0x0, (%rax)
jne 0x871f
callq 0x42e0
movq (%rax), %rax
movsbq 0x2(%r12), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0x8631
movq (%r15), %r12
testq %r12, %r12
je 0x86f4
movzbl (%r12), %eax
cmpl $0x20, %eax
je 0x8544
cmpl $0x9, %eax
jne 0x8653
incq %r12
jmp 0x8531
movl $0x1, %eax
movl %eax, 0x30514(%rip)     # 0x38a68
movl %eax, 0x304de(%rip)     # 0x38a38
movl %eax, 0x30518(%rip)     # 0x38a78
jmp 0x81a7
leaq 0x1c459(%rip), %rax     # 0x249c5
movq %rax, 0x2dc35(%rip)     # 0x361a8
movl $0x1, 0x304e7(%rip)     # 0x38a64
movl %edx, %ebp
callq 0x42e0
movq (%rax), %r13
movq %r12, %rdi
callq 0x4110
movl %ebp, %edx
movsbq -0x1(%r12,%rax), %rcx
testb $0x8, 0x1(%r13,%rcx,2)
je 0x85ad
leaq (%r12,%rax), %rdi
decq %rdi
callq 0x4280
movl %eax, %edx
movl %edx, 0x2dc4d(%rip)     # 0x36200
movsbl 0x1(%r12), %edi
movq %r12, %rsi
movl $0x1, %edx
callq 0x7e6f
jmp 0x81a7
movq 0x2dc06(%rip), %rdi     # 0x361d8
callq 0x4110
movq %rax, %r14
movq %r12, %rdi
callq 0x4110
leal (%rax,%r14), %edi
addl $0xa, %edi
callq 0x6321
movq %rax, %r14
movq 0x2dbe0(%rip), %rdx     # 0x361d8
movq %rax, %rdi
leaq 0x1ac69(%rip), %rsi     # 0x2326b
movq %r12, %rcx
xorl %eax, %eax
callq 0x42a0
movq %r14, 0x2dbc5(%rip)     # 0x361d8
jmp 0x821c
movq %r12, %rdi
callq 0x4110
leal 0x1(%rax), %edi
callq 0x6321
movq %rax, 0x2db99(%rip)     # 0x361c8
jmp 0x866a
movq %r12, %rdi
callq 0x4110
leal 0x1(%rax), %edi
callq 0x6321
movq %rax, 0x2db98(%rip)     # 0x361e0
movq %rax, %rdi
movq %r12, %rsi
jmp 0x81f3
movq %r12, %rdi
callq 0x4110
leal 0x1(%rax), %edi
callq 0x6321
movq %rax, 0x2db76(%rip)     # 0x361e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x40b0
jmp 0x821c
addq $0x2, %r12
movq %r12, %rdi
callq 0x4280
movl %eax, 0x2db7c(%rip)     # 0x36208
jmp 0x81a7
cmpl $0x0, 0x303a4(%rip)     # 0x38a3c
je 0x86bf
leaq 0x199c4(%rip), %rsi     # 0x22065
movq %r12, %rdi
callq 0x42d0
testq %rax, %rax
je 0x86e0
cmpb $0x2e, (%rax)
jne 0x86e0
cmpb $0x63, 0x1(%rax)
jne 0x86e0
cmpb $0x0, 0x2(%rax)
jne 0x86e0
cmpl $0x0, 0x30356(%rip)     # 0x38a1c
je 0x86d9
leaq 0x1abaa(%rip), %rdi     # 0x23279
movq %r12, %rsi
xorl %eax, %eax
callq 0x4140
movq %r12, 0x303a8(%rip)     # 0x38a88
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19dc7(%rip), %rdi     # 0x224c2
callq 0x7803
movq 0x2da89(%rip), %rdi     # 0x36190
callq 0x40d0
xorl %edi, %edi
callq 0x42b0
leaq 0x1ab37(%rip), %rdi     # 0x23251
callq 0x7803
leaq 0x1ab11(%rip), %rdi     # 0x23237
callq 0x7803
leaq 0x1aaf0(%rip), %rdi     # 0x23222
callq 0x7803