// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/main.c
// Function: main
extern int main(int argc, char *argv[], char *envp[]) {
	char *dollarzero, *null[1];
	int c;
	initprint();
	dashsee[0] = dashsee[1] = NULL;
	dollarzero = argv[0];
	rc_pid = getpid();
	dashell = (*argv[0] == '-'); /* Unix tradition */
	while ((c = rc_getopt(argc, argv, "c:deiIlnopsvx")) != -1)
		switch (c) {
		case 'c':
			dashsee[0] = rc_optarg;
			goto quitopts;
		case 'd':
			dashdee = TRUE;
			break;
		case 'e':
			dashee = TRUE;
			break;
		case 'I':
			dashEYE = TRUE;
			interactive = FALSE;
			break;
		case 'i':
			dasheye = interactive = TRUE;
			break;
		case 'l':
			dashell = TRUE;
			break;
		case 'n':
			dashen = TRUE;
			break;
		case 'o':
			dashoh = TRUE;
			break;
		case 'p':
			dashpee = TRUE;
			break;
		case 's':
			dashess = TRUE;
			break;
		case 'v':
			dashvee = TRUE;
			break;
		case 'x':
			dashex = TRUE;
			break;
		case '?':
			exit(1);
		}
quitopts:
	argv += rc_optind;
	/* use isatty() iff neither -i nor -I is set, and iff the input is not
	 * from a script or -c flags */
	if (!dasheye && !dashEYE && dashsee[0] == NULL &&
			(dashess || *argv == NULL))
		interactive = isatty(0);
	if (!dashoh) {
		checkfd(0, rFrom);
		checkfd(1, rCreate);
		checkfd(2, rCreate);
	}
	initsignal();
	inithash();
	initparse();
	assigndefault("ifs", " ", "\t", "\n", (void *)0);
	assigndefault("nl", "\n", (void *)0);
#ifdef DEFAULTPATH
	assigndefault("path", DEFAULTPATH, (void *)0);
#endif
	assigndefault("pid", nprint("%d", rc_pid), (void *)0);
	assigndefault("prompt", "; ", "", (void *)0);
	assigndefault("tab", "\t", (void *)0);
	assigndefault("version", VERSION, (void *)0);
	initenv(envp);
	initinput();
	null[0] = NULL;
	starassign(dollarzero, null, FALSE); /* assign $0 to $* */
	inithandler();

	if (dashell) {
		char *rcrc;
		int fd;

		rcrc = concat(varlookup("home"), word("/.rcrc", NULL))->w;
		fd = rc_open(rcrc, rFrom);
		if (fd == -1) {
			if (errno != ENOENT)
				uerror(rcrc);
		} else {
			bool push_interactive;

			pushfd(fd);
			push_interactive = interactive;
			interactive = FALSE;
			doit(TRUE);
			interactive = push_interactive;
			close(fd);
		}
	}
	environ = makeenv();
	setlocale(LC_CTYPE, "");

	if (dashsee[0] != NULL || dashess) {	/* input from  -c or -s? */
		if (*argv != NULL)
			starassign(dollarzero, argv, FALSE);
		if (dashess)
			pushfd(0);
		else
			pushstring(dashsee, TRUE);
	} else if (*argv != NULL) {	/* else from a file? */
		b_dot(--argv);
		rc_exit(getstatus());
	} else {			/* else stdin */
		pushfd(0);
	}
	dasheye = FALSE;
	doit(TRUE);
	rc_exit(getstatus());
	return 0; /* Never really reached. */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r14
movl %edi, %ebp
callq 0x521a
xorps %xmm0, %xmm0
movaps %xmm0, 0x1094b(%rip)    # 0x19bb0
movq (%r14), %rax
movq %rax, 0x8(%rsp)
callq 0x30d0
movl %eax, 0x10948(%rip)     # 0x19bc0
movq (%r14), %rax
xorl %ecx, %ecx
cmpb $0x2d, (%rax)
sete %cl
movl %ecx, 0x1093b(%rip)     # 0x19bc4
leaq 0x5b88(%rip), %r12      # 0xee18
leaq 0x5b29(%rip), %r13      # 0xedc0
pushq $0x1
popq %rbx
movl %ebp, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x5c00
leal -0x63(%rax), %ecx
cmpl $0x15, %ecx
ja 0x92c5
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movl $0x1, 0x10905(%rip)     # 0x19bc8
jmp 0x929a
cmpl $0x49, %eax
je 0x935e
cmpl $-0x1, %eax
je 0x9384
cmpl $0x3f, %eax
jne 0x929a
jmp 0x9648
movl $0x1, 0x108d9(%rip)     # 0x19bc4
jmp 0x929a
movl $0x1, 0x108f9(%rip)     # 0x19bf0
jmp 0x929a
movl $0x1, 0x108c9(%rip)     # 0x19bcc
jmp 0x929a
movl $0x1, 0x108cd(%rip)     # 0x19bdc
jmp 0x929a
movl %ebx, 0x108bd(%rip)     # 0x19bd4
movl %ebx, 0x108bb(%rip)     # 0x19bd8
jmp 0x929a
movl $0x1, 0x108bc(%rip)     # 0x19be8
jmp 0x929a
movl $0x1, 0x108a5(%rip)     # 0x19be0
jmp 0x929a
movl $0x1, 0x1089a(%rip)     # 0x19be4
jmp 0x929a
movl $0x1, 0x10893(%rip)     # 0x19bec
jmp 0x929a
movb $0x1, 0x1086b(%rip)     # 0x19bd0
andl $0x0, 0x10868(%rip)     # 0x19bd4
jmp 0x929a
leaq 0x10660(%rip), %rax     # 0x199d8
movq (%rax), %rax
movq %rax, 0x1082e(%rip)     # 0x19bb0
jmp 0x938b
movq 0x10825(%rip), %rax     # 0x19bb0
leaq 0xff66(%rip), %rcx      # 0x192f8
movslq (%rcx), %rcx
leaq (%r14,%rcx,8), %r14
cmpl $0x0, 0x10838(%rip)     # 0x19bd8
jne 0x93ce
testb $0x1, 0x10827(%rip)     # 0x19bd0
jne 0x93ce
testq %rax, %rax
jne 0x93ce
cmpl $0x0, 0x10831(%rip)     # 0x19be8
je 0x93c8
xorl %edi, %edi
callq 0x3090
movl %eax, 0x1080e(%rip)     # 0x19bd4
jmp 0x93ce
cmpq $0x0, (%r14)
je 0x93b9
cmpl $0x0, 0x1080b(%rip)     # 0x19be0
jne 0x93f6
xorl %edi, %edi
xorl %esi, %esi
callq 0x9650
pushq $0x1
popq %rbp
movl %ebp, %edi
movl %ebp, %esi
callq 0x9650
pushq $0x2
popq %rdi
movl %ebp, %esi
callq 0x9650
callq 0xb352
callq 0x6f64
callq 0x9be8
leaq 0x5255(%rip), %rdi      # 0xe661
leaq 0xa1ae(%rip), %rsi      # 0x135c1
leaq 0x5a0c(%rip), %r12      # 0xee26
leaq 0xa1a3(%rip), %r13      # 0x135c4
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x9678
leaq 0x59f0(%rip), %rdi      # 0xee28
movq %r13, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x9678
leaq 0x4c8c(%rip), %rdi      # 0xe0d7
leaq 0x59d9(%rip), %rsi      # 0xee2b
leaq 0x59e1(%rip), %rdx      # 0xee3a
leaq 0x59d5(%rip), %rcx      # 0xee35
leaq 0x4c47(%rip), %r8       # 0xe0ae
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x9678
movl 0x10749(%rip), %esi     # 0x19bc0
leaq 0x5317(%rip), %rdi      # 0xe795
xorl %eax, %eax
callq 0xaaee
leaq 0x531c(%rip), %rdi      # 0xe7a8
movq %rax, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x9678
leaq 0x52f9(%rip), %rdi      # 0xe798
leaq 0x599d(%rip), %rsi      # 0xee43
leaq 0x597a(%rip), %rdx      # 0xee27
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x9678
leaq 0x5989(%rip), %rdi      # 0xee46
movq %r12, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x9678
leaq 0x52cf(%rip), %rdi      # 0xe79f
leaq 0x5973(%rip), %rsi      # 0xee4a
xorl %edx, %edx
xorl %eax, %eax
callq 0x9678
movq %r15, %rdi
callq 0x7533
callq 0x7ebf
leaq 0x10(%rsp), %rsi
andq $0x0, (%rsi)
movq 0x8(%rsp), %r12
movq %r12, %rdi
xorl %edx, %edx
callq 0xc328
callq 0x49a0
cmpl $0x0, 0x106b3(%rip)     # 0x19bc4
je 0x958c
leaq 0x4bb4(%rip), %rdi      # 0xe0ce
callq 0xc16d
movq %rax, %r15
leaq 0x5935(%rip), %rdi      # 0xee5e
xorl %esi, %esi
callq 0x6400
movq %r15, %rdi
movq %rax, %rsi
callq 0x6492
movq (%rax), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x9afc
cmpl $-0x1, %eax
je 0x957a
movl %eax, %ebp
movl %eax, %edi
callq 0x7ef0
movl 0x10678(%rip), %ebx     # 0x19bd4
andl $0x0, 0x10671(%rip)     # 0x19bd4
pushq $0x1
popq %rdi
callq 0x80bf
movl %ebx, 0x10663(%rip)     # 0x19bd4
movl %ebp, %edi
callq 0x3170
jmp 0x958c
callq 0x3040
cmpl $0x2, (%rax)
je 0x958c
movq %r15, %rdi
callq 0xbe9d
callq 0x7629
movq 0xfa50(%rip), %rcx      # 0x18fe8
movq %rax, (%rcx)
leaq 0x5885(%rip), %rsi      # 0xee27
xorl %edi, %edi
callq 0x32b0
cmpq $0x0, 0x105ff(%rip)     # 0x19bb0
setne %cl
movl 0x1062e(%rip), %eax     # 0x19be8
testl %eax, %eax
setne %dl
orb %cl, %dl
movq (%r14), %rcx
cmpb $0x1, %dl
jne 0x95f6
testq %rcx, %rcx
je 0x95e1
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xc328
movl 0x10607(%rip), %eax     # 0x19be8
testl %eax, %eax
jne 0x9615
leaq 0x105c4(%rip), %rdi     # 0x19bb0
pushq $0x1
popq %rsi
callq 0x7f86
jmp 0x961c
testq %rcx, %rcx
je 0x9615
addq $-0x8, %r14
movq %r14, %rdi
callq 0x359b
callq 0xb3ff
movl %eax, %edi
callq 0x4d65
jmp 0x961c
xorl %edi, %edi
callq 0x7ef0
andl $0x0, 0x105b5(%rip)     # 0x19bd8
pushq $0x1
popq %rdi
callq 0x80bf
callq 0xb3ff
movl %eax, %edi
callq 0x4d65
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x3330