// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
callq 0x6480
movq $0x0, 0x1315e(%rip) # 0x1fc48
movq $0x0, 0x1314b(%rip) # 0x1fc40
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
callq 0x30d0
movl %eax, 0x13145(%rip)     # 0x1fc50
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x1312e(%rip)     # 0x1fc54
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x9534(%rip), %rdx      # 0x16068
callq 0x7610
movl %eax, -0x2c(%rbp)
cmpl $-0x1, %eax
je 0xcc31
movl -0x2c(%rbp), %eax
addl $-0x3f, %eax
movl %eax, %ecx
movq %rcx, -0x48(%rbp)
subl $0x39, %eax
ja 0xcc2c
movq -0x48(%rbp), %rax
leaq 0x941b(%rip), %rcx      # 0x15f80
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x12ef3(%rip), %rax     # 0x1fa68
movq (%rax), %rax
movq %rax, 0x130c1(%rip)     # 0x1fc40
jmp 0xcc33
movl $0x1, 0x130ca(%rip)     # 0x1fc58
jmp 0xcc2c
movl $0x1, 0x130bf(%rip)     # 0x1fc5c
jmp 0xcc2c
movl $0x1, 0x130b4(%rip)     # 0x1fc60
movl $0x0, 0x130ae(%rip)     # 0x1fc64
jmp 0xcc2c
movl $0x1, 0x130a2(%rip)     # 0x1fc64
movl $0x1, 0x1309c(%rip)     # 0x1fc68
jmp 0xcc2c
movl $0x1, 0x1307c(%rip)     # 0x1fc54
jmp 0xcc2c
movl $0x1, 0x13088(%rip)     # 0x1fc6c
jmp 0xcc2c
movl $0x1, 0x13080(%rip)     # 0x1fc70
jmp 0xcc2c
movl $0x1, 0x13078(%rip)     # 0x1fc74
jmp 0xcc2c
movl $0x1, 0x13070(%rip)     # 0x1fc78
jmp 0xcc2c
movl $0x1, 0x13068(%rip)     # 0x1fc7c
jmp 0xcc2c
movl $0x1, 0x13060(%rip)     # 0x1fc80
jmp 0xcc2c
movl $0x1, %edi
callq 0x3320
jmp 0xcb26
jmp 0xcc33
leaq 0x126be(%rip), %rax     # 0x1f2f8
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, 0x13013(%rip)     # 0x1fc68
jne 0xcc8a
cmpl $0x0, 0x13002(%rip)     # 0x1fc60
jne 0xcc8a
cmpq $0x0, 0x12fd8(%rip)     # 0x1fc40
jne 0xcc8a
cmpl $0x0, 0x13007(%rip)     # 0x1fc78
jne 0xcc7d
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0xcc8a
xorl %edi, %edi
callq 0x3090
movl %eax, 0x12fda(%rip)     # 0x1fc64
cmpl $0x0, 0x12fdf(%rip)     # 0x1fc70
jne 0xccb7
xorl %esi, %esi
movl %esi, %edi
callq 0xcf50
movl $0x1, %esi
movl %esi, %edi
callq 0xcf50
movl $0x2, %edi
movl $0x1, %esi
callq 0xcf50
callq 0x10610
callq 0x9450
callq 0xda50
leaq 0x89f2(%rip), %rdi      # 0x156bf
leaq 0xdb85(%rip), %rsi      # 0x1a859
leaq 0x939b(%rip), %rdx      # 0x16076
leaq 0xdb7a(%rip), %rcx      # 0x1a85c
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0xcf90
leaq 0x9383(%rip), %rdi      # 0x16078
leaq 0xdb60(%rip), %rsi      # 0x1a85c
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xcf90
leaq 0x8421(%rip), %rdi      # 0x1512f
leaq 0x9366(%rip), %rsi      # 0x1607b
leaq 0x936e(%rip), %rdx      # 0x1608a
leaq 0x9362(%rip), %rcx      # 0x16085
leaq 0x8401(%rip), %r8       # 0x1512b
xorl %eax, %eax
movl %eax, %r9d
movb $0x0, %al
callq 0xcf90
movl 0x12f14(%rip), %esi     # 0x1fc50
leaq 0x8b7e(%rip), %rdi      # 0x158c1
movb $0x0, %al
callq 0xf6d0
movq %rax, %rsi
leaq 0x8b84(%rip), %rdi      # 0x158d8
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xcf90
leaq 0x8b62(%rip), %rdi      # 0x158c8
leaq 0x9326(%rip), %rsi      # 0x16093
leaq 0x9303(%rip), %rdx      # 0x16077
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0xcf90
leaq 0x9310(%rip), %rdi      # 0x16096
leaq 0x92e9(%rip), %rsi      # 0x16076
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xcf90
leaq 0x8b30(%rip), %rdi      # 0x158cf
leaq 0x92f4(%rip), %rsi      # 0x1609a
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xcf90
movq -0x18(%rbp), %rdi
callq 0x9e40
callq 0xaf00
movq $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x12420
callq 0x5680
cmpl $0x0, 0x12e72(%rip)     # 0x1fc54
je 0xce7c
leaq 0x8334(%rip), %rdi      # 0x15123
callq 0x12110
movq %rax, -0x50(%rbp)
leaq 0x92af(%rip), %rdi      # 0x160ae
xorl %eax, %eax
movl %eax, %esi
callq 0x8350
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x8470
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0xd900
movl %eax, -0x3c(%rbp)
cmpl $-0x1, -0x3c(%rbp)
jne 0xce44
callq 0x3040
cmpl $0x2, (%rax)
je 0xce42
movq -0x38(%rbp), %rdi
callq 0x11c10
jmp 0xce7a
movl -0x3c(%rbp), %edi
callq 0xaf50
movl 0x12e12(%rip), %eax     # 0x1fc64
movl %eax, -0x40(%rbp)
movl $0x0, 0x12e05(%rip)     # 0x1fc64
movl $0x1, %edi
callq 0xb210
movl -0x40(%rbp), %eax
movl %eax, 0x12df2(%rip)     # 0x1fc64
movl -0x3c(%rbp), %edi
callq 0x3170
jmp 0xce7c
callq 0x9ff0
movq %rax, %rcx
movq 0x1215d(%rip), %rax     # 0x1efe8
movq %rcx, (%rax)
xorl %edi, %edi
leaq 0x91e0(%rip), %rsi      # 0x16077
callq 0x32a0
cmpq $0x0, 0x12d9c(%rip)     # 0x1fc40
jne 0xceaf
cmpl $0x0, 0x12dcb(%rip)     # 0x1fc78
je 0xceed
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0xcec8
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x12420
cmpl $0x0, 0x12da9(%rip)     # 0x1fc78
je 0xceda
xorl %edi, %edi
callq 0xaf50
jmp 0xceeb
leaq 0x12d5f(%rip), %rdi     # 0x1fc40
movl $0x1, %esi
callq 0xb020
jmp 0xcf1f
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0xcf16
movq -0x10(%rbp), %rdi
addq $-0x8, %rdi
movq %rdi, -0x10(%rbp)
callq 0x3640
callq 0x10730
movl %eax, %edi
callq 0x5c00
jmp 0xcf1d
xorl %edi, %edi
callq 0xaf50
jmp 0xcf1f
movl $0x0, 0x12d3f(%rip)     # 0x1fc68
movl $0x1, %edi
callq 0xb210
callq 0x10730
movl %eax, %edi
callq 0x5c00
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)