// File: /workspace/github_c_makefile_star2_O0/michaelforney[P]cproc/driver.c
// Function: main
int
main(int argc, char *argv[])
{
	enum stage last = LINK;
	enum filetype filetype = 0;
	char *arg, *end, *output = NULL, *arch, *qbearch;
	struct array inputs = {0}, *cmd;
	struct input *input;
	size_t i;

	argv0 = progname(argv[0], "cproc");

	arrayaddbuf(&stages[PREPROCESS].cmd, preprocesscmd, sizeof(preprocesscmd));
	arrayaddptr(&stages[COMPILE].cmd, compilecommand(argv[0]));
	arrayaddbuf(&stages[CODEGEN].cmd, codegencmd, sizeof(codegencmd));
	arrayaddbuf(&stages[ASSEMBLE].cmd, assemblecmd, sizeof(assemblecmd));
	arrayaddbuf(&stages[LINK].cmd, linkcmd, sizeof(linkcmd));

	if (hasprefix(target, "x86_64-") || hasprefix(target, "amd64-")) {
		arch = "x86_64-sysv";
		qbearch = "amd64_sysv";
	} else if (hasprefix(target, "aarch64-")) {
		arch = "aarch64";
		qbearch = "arm64";
	} else if (hasprefix(target, "riscv64-")) {
		arch = "riscv64";
		qbearch = "rv64";
	} else {
		fatal("unsupported target '%s'", target);
		return 1;  /* unreachable */
	}
	arrayaddptr(&stages[COMPILE].cmd, "-t");
	arrayaddptr(&stages[COMPILE].cmd, arch);
	arrayaddptr(&stages[CODEGEN].cmd, "-t");
	arrayaddptr(&stages[CODEGEN].cmd, qbearch);

	for (;;) {
		++argv, --argc;
		arg = *argv;
		if (!arg)
			break;
		if (arg[0] != '-' || arg[1] == '\0') {
			input = arrayadd(&inputs, sizeof(*input));
			input->name = arg;
			input->lib = false;
			input->filetype = filetype == NONE && arg[1] ? detectfiletype(arg) : filetype;
			switch (input->filetype) {
			case ASM:    input->stages =                                     1<<ASSEMBLE|1<<LINK; break;
			case ASMPP:  input->stages = 1<<PREPROCESS|                      1<<ASSEMBLE|1<<LINK; break;
			case C:      input->stages = 1<<PREPROCESS|1<<COMPILE|1<<CODEGEN|1<<ASSEMBLE|1<<LINK; break;
			case CHDR:   input->stages = 1<<PREPROCESS                                          ; break;
			case CPPOUT: input->stages =               1<<COMPILE|1<<CODEGEN|1<<ASSEMBLE|1<<LINK; break;
			case QBE:    input->stages =                          1<<CODEGEN|1<<ASSEMBLE|1<<LINK; break;
			case OBJ:    input->stages =                                                 1<<LINK; break;
			default:     usage("reading from standard input requires -x");
			}
			continue;
		}
		/* TODO: use a binary search for these long parameters */
		if (strcmp(arg, "-nostdlib") == 0) {
			flags.nostdlib = true;
		} else if (strcmp(arg, "-nostdinc") == 0) {
			arrayaddptr(&stages[PREPROCESS].cmd, arg);
		} else if (strcmp(arg, "-static") == 0) {
			arrayaddptr(&stages[LINK].cmd, arg);
		} else if (strcmp(arg, "-emit-qbe") == 0) {
			last = COMPILE;
		} else if (strcmp(arg, "-include") == 0 || strcmp(arg, "-idirafter") == 0 || strcmp(arg, "-isystem") == 0 || strcmp(arg, "-iquote") == 0) {
			if (!--argc)
				usage(NULL);
			arrayaddptr(&stages[PREPROCESS].cmd, arg);
			arrayaddptr(&stages[PREPROCESS].cmd, *++argv);
		} else if (strcmp(arg, "-pipe") == 0) {
			/* ignore */
		} else if (strncmp(arg, "-std=", 5) == 0) {
			/* pass through to the preprocessor, it may
			 * affect its default definitions */
			arrayaddptr(&stages[PREPROCESS].cmd, arg);
		} else if (strcmp(arg, "-pedantic") == 0) {
			/* ignore */
		} else if (strcmp(arg, "-pthread") == 0) {
			arrayaddptr(&stages[LINK].cmd, "-l");
			arrayaddptr(&stages[LINK].cmd, "pthread");
		} else if (strcmp(arg, "-dumpmachine") == 0) {
			/* print target and exit */
			puts(target);
			return 0;
		} else {
			if (arg[2] != '\0' && strchr("cESsv", arg[1]))
				usage(NULL);
			switch (arg[1]) {
			case 'c':
				last = ASSEMBLE;
				break;
			case 'D':
				arrayaddptr(&stages[PREPROCESS].cmd, "-D");
				arrayaddptr(&stages[PREPROCESS].cmd, nextarg(&argv));
				break;
			case 'E':
				last = PREPROCESS;
				break;
			case 'g':
				/* ignore */
				break;
			case 'I':
				arrayaddptr(&stages[PREPROCESS].cmd, "-I");
				arrayaddptr(&stages[PREPROCESS].cmd, nextarg(&argv));
				break;
			case 'L':
				arrayaddptr(&stages[LINK].cmd, "-L");
				arrayaddptr(&stages[LINK].cmd, nextarg(&argv));
				break;
			case 'l':
				input = arrayadd(&inputs, sizeof(*input));
				input->name = nextarg(&argv);
				input->lib = true;
				input->filetype = OBJ;
				input->stages = 1<<LINK;
				break;
			case 'M':
				if (strcmp(arg, "-M") == 0 || strcmp(arg, "-MM") == 0) {
					arrayaddptr(&stages[PREPROCESS].cmd, arg);
					last = PREPROCESS;
				} else if (strcmp(arg, "-MD") == 0 || strcmp(arg, "-MMD") == 0) {
					arrayaddptr(&stages[PREPROCESS].cmd, arg);
				} else if (strcmp(arg, "-MT") == 0 || strcmp(arg, "-MF") == 0) {
					if (!--argc)
						usage(NULL);
					arrayaddptr(&stages[PREPROCESS].cmd, arg);
					arrayaddptr(&stages[PREPROCESS].cmd, *++argv);
				} else {
					usage(NULL);
				}
				break;
			case 'O':
				/* ignore */
				break;
			case 'o':
				output = nextarg(&argv);
				break;
			case 'P':
				arrayaddptr(&stages[PREPROCESS].cmd, "-P");
				break;
			case 'S':
				last = CODEGEN;
				break;
			case 's':
				arrayaddptr(&stages[LINK].cmd, "-s");
				break;
			case 'U':
				arrayaddptr(&stages[PREPROCESS].cmd, "-U");
				arrayaddptr(&stages[PREPROCESS].cmd, nextarg(&argv));
				break;
			case 'v':
				flags.verbose = true;
				break;
			case 'W':
				if (arg[2] && arg[3] == ',') {
					switch (arg[2]) {
					case 'p': cmd = &stages[PREPROCESS].cmd; break;
					case 'a': cmd = &stages[ASSEMBLE].cmd; break;
					case 'l': cmd = &stages[LINK].cmd; break;
					default: usage(NULL);
					}
					for (arg += 4; arg; arg = end ? end + 1 : NULL) {
						end = strchr(arg, ',');
						if (end)
							*end = '\0';
						arrayaddptr(cmd, arg);
					}
				} else {
					/* ignore warning flag */
				}
				break;
			case 'x':
				arg = nextarg(&argv);
				if (strcmp(arg, "none") == 0)
					filetype = NONE;
				else if (strcmp(arg, "c") == 0)
					filetype = C;
				else if (strcmp(arg, "c-header") == 0)
					filetype = CHDR;
				else if (strcmp(arg, "cpp-output") == 0)
					filetype = CPPOUT;
				else if (strcmp(arg, "qbe") == 0)
					filetype = QBE;
				else if (strcmp(arg, "assembler") == 0)
					filetype = ASM;
				else if (strcmp(arg, "assembler-with-cpp") == 0)
					filetype = ASMPP;
				else
					usage("unknown language '%s'", arg);
				break;
			default:
				usage("unknown option '%s'", arg);
			}
		}
	}

	for (i = 0; i < LEN(stages); ++i)
		stages[i].cmdbase = stages[i].cmd.len;
	if (inputs.len == 0)
		usage(NULL);
	if (output) {
		if (strcmp(output, "-") == 0) {
			if (last >= ASSEMBLE)
				usage("cannot write object to stdout");
		} else if (last != LINK && inputs.len > sizeof(*input)) {
			usage("cannot specify -o with multiple input files without linking");
		}
	}
	arrayforeach (&inputs, input) {
		/* ignore the input if it doesn't participate in the last stage */
		if (!(input->stages & 1 << last))
			continue;
		/* only run up through the last stage */
		input->stages &= (1 << last + 1) - 1;
		buildobj(input, output);
	}
	if (last == LINK) {
		if (!output)
			output = "a.out";
		buildexe(inputs.val, inputs.len / sizeof(*input), output);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x4, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq $0x0, -0x30(%rbp)
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x2100
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x2d6c(%rip), %rsi      # 0x5119
callq 0x4110
movq %rax, %rcx
leaq 0x4e7c(%rip), %rax      # 0x7238
movq %rcx, (%rax)
leaq 0x4d7a(%rip), %rdi      # 0x7140
addq $0x8, %rdi
leaq 0x48ef(%rip), %rsi      # 0x6cc0
movl $0x78, %edx
callq 0x42a0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2ff0
movq %rax, %rsi
leaq 0x4d4f(%rip), %rdi      # 0x7140
addq $0x30, %rdi
addq $0x8, %rdi
callq 0x4260
leaq 0x4d3b(%rip), %rdi      # 0x7140
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x4924(%rip), %rsi      # 0x6d38
movl $0x8, %edx
callq 0x42a0
leaq 0x4d1b(%rip), %rdi      # 0x7140
addq $0x90, %rdi
addq $0x8, %rdi
leaq 0x4909(%rip), %rsi      # 0x6d40
movl $0x8, %edx
callq 0x42a0
leaq 0x4cf8(%rip), %rdi      # 0x7140
addq $0xc0, %rdi
addq $0x8, %rdi
leaq 0x48f6(%rip), %rsi      # 0x6d50
movl $0x28, %edx
callq 0x42a0
leaq 0x2c95(%rip), %rdi      # 0x5100
leaq 0x2cad(%rip), %rsi      # 0x511f
callq 0x30e0
cmpl $0x0, %eax
jne 0x2494
leaq 0x2c7d(%rip), %rdi      # 0x5100
leaq 0x2c9d(%rip), %rsi      # 0x5127
callq 0x30e0
cmpl $0x0, %eax
je 0x24af
leaq 0x2c93(%rip), %rax      # 0x512e
movq %rax, -0x38(%rbp)
leaq 0x2c94(%rip), %rax      # 0x513a
movq %rax, -0x40(%rbp)
jmp 0x2534
leaq 0x2c4a(%rip), %rdi      # 0x5100
leaq 0x2c88(%rip), %rsi      # 0x5145
callq 0x30e0
cmpl $0x0, %eax
je 0x24df
leaq 0x2c80(%rip), %rax      # 0x514e
movq %rax, -0x38(%rbp)
leaq 0x2c7d(%rip), %rax      # 0x5156
movq %rax, -0x40(%rbp)
jmp 0x2532
leaq 0x2c1a(%rip), %rdi      # 0x5100
leaq 0x2c6f(%rip), %rsi      # 0x515c
callq 0x30e0
cmpl $0x0, %eax
je 0x250f
leaq 0x2c67(%rip), %rax      # 0x5165
movq %rax, -0x38(%rbp)
leaq 0x2c64(%rip), %rax      # 0x516d
movq %rax, -0x40(%rbp)
jmp 0x2530
leaq 0x2c5c(%rip), %rdi      # 0x5172
leaq 0x2be3(%rip), %rsi      # 0x5100
movb $0x0, %al
callq 0x3f60
movl $0x1, -0x4(%rbp)
jmp 0x2fe1
jmp 0x2532
jmp 0x2534
leaq 0x4c05(%rip), %rdi      # 0x7140
addq $0x30, %rdi
addq $0x8, %rdi
leaq 0x2c40(%rip), %rsi      # 0x518a
callq 0x4260
movq -0x38(%rbp), %rsi
leaq 0x4be6(%rip), %rdi      # 0x7140
addq $0x30, %rdi
addq $0x8, %rdi
callq 0x4260
leaq 0x4bd2(%rip), %rdi      # 0x7140
addq $0x60, %rdi
addq $0x8, %rdi
leaq 0x2c0d(%rip), %rsi      # 0x518a
callq 0x4260
movq -0x40(%rbp), %rsi
leaq 0x4bb3(%rip), %rdi      # 0x7140
addq $0x60, %rdi
addq $0x8, %rdi
callq 0x4260
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x25c6
jmp 0x2e92
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x25e3
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x26cf
leaq -0x58(%rbp), %rdi
movl $0x18, %esi
callq 0x4180
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, (%rax)
movq -0x68(%rbp), %rax
movb $0x0, 0x10(%rax)
cmpl $0x0, -0x18(%rbp)
jne 0x2629
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x2629
movq -0x20(%rbp), %rdi
callq 0x3130
movl %eax, -0x74(%rbp)
jmp 0x262f
movl -0x18(%rbp), %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %ecx
movq -0x68(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x68(%rbp), %rax
movl 0xc(%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x80(%rbp)
subl $0x6, %eax
ja 0x26bc
movq -0x80(%rbp), %rax
leaq 0x2a8c(%rip), %rcx      # 0x50e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x68(%rbp), %rax
movl $0x18, 0x8(%rax)
jmp 0x26ca
movq -0x68(%rbp), %rax
movl $0x19, 0x8(%rax)
jmp 0x26ca
movq -0x68(%rbp), %rax
movl $0x1f, 0x8(%rax)
jmp 0x26ca
movq -0x68(%rbp), %rax
movl $0x1, 0x8(%rax)
jmp 0x26ca
movq -0x68(%rbp), %rax
movl $0x1e, 0x8(%rax)
jmp 0x26ca
movq -0x68(%rbp), %rax
movl $0x1c, 0x8(%rax)
jmp 0x26ca
movq -0x68(%rbp), %rax
movl $0x10, 0x8(%rax)
jmp 0x26ca
leaq 0x2aca(%rip), %rdi      # 0x518d
movb $0x0, %al
callq 0x3240
jmp 0x259a
movq -0x20(%rbp), %rdi
leaq 0x2adb(%rip), %rsi      # 0x51b5
callq 0x2150
cmpl $0x0, %eax
jne 0x26f0
movb $0x1, 0x4b46(%rip)      # 0x7231
jmp 0x2e8d
movq -0x20(%rbp), %rdi
leaq 0x2ac4(%rip), %rsi      # 0x51bf
callq 0x2150
cmpl $0x0, %eax
jne 0x271e
movq -0x20(%rbp), %rsi
leaq 0x4a30(%rip), %rdi      # 0x7140
addq $0x8, %rdi
callq 0x4260
jmp 0x2e8b
movq -0x20(%rbp), %rdi
leaq 0x2aa0(%rip), %rsi      # 0x51c9
callq 0x2150
cmpl $0x0, %eax
jne 0x2753
movq -0x20(%rbp), %rsi
leaq 0x4a02(%rip), %rdi      # 0x7140
addq $0xc0, %rdi
addq $0x8, %rdi
callq 0x4260
jmp 0x2e89
movq -0x20(%rbp), %rdi
leaq 0x2a73(%rip), %rsi      # 0x51d1
callq 0x2150
cmpl $0x0, %eax
jne 0x2774
movl $0x1, -0x14(%rbp)
jmp 0x2e87
movq -0x20(%rbp), %rdi
leaq 0x2a5c(%rip), %rsi      # 0x51db
callq 0x2150
cmpl $0x0, %eax
je 0x27c8
movq -0x20(%rbp), %rdi
leaq 0x2a50(%rip), %rsi      # 0x51e4
callq 0x2150
cmpl $0x0, %eax
je 0x27c8
movq -0x20(%rbp), %rdi
leaq 0x2a46(%rip), %rsi      # 0x51ef
callq 0x2150
cmpl $0x0, %eax
je 0x27c8
movq -0x20(%rbp), %rdi
leaq 0x2a3a(%rip), %rsi      # 0x51f8
callq 0x2150
cmpl $0x0, %eax
jne 0x281d
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, %eax
jne 0x27e1
xorl %eax, %eax
movl %eax, %edi
movb $0x0, %al
callq 0x3240
movq -0x20(%rbp), %rsi
leaq 0x4954(%rip), %rdi      # 0x7140
addq $0x8, %rdi
callq 0x4260
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rsi
leaq 0x4931(%rip), %rdi      # 0x7140
addq $0x8, %rdi
callq 0x4260
jmp 0x2e85
movq -0x20(%rbp), %rdi
leaq 0x29d8(%rip), %rsi      # 0x5200
callq 0x2150
cmpl $0x0, %eax
jne 0x2837
jmp 0x2e83
movq -0x20(%rbp), %rdi
leaq 0x29c4(%rip), %rsi      # 0x5206
movl $0x5, %edx
callq 0x2060
cmpl $0x0, %eax
jne 0x286a
movq -0x20(%rbp), %rsi
leaq 0x48e4(%rip), %rdi      # 0x7140
addq $0x8, %rdi
callq 0x4260
jmp 0x2e81
movq -0x20(%rbp), %rdi
leaq 0x2997(%rip), %rsi      # 0x520c
callq 0x2150
cmpl $0x0, %eax
jne 0x2884
jmp 0x2e7f
movq -0x20(%rbp), %rdi
leaq 0x2987(%rip), %rsi      # 0x5216
callq 0x2150
cmpl $0x0, %eax
jne 0x28da
leaq 0x48a0(%rip), %rdi      # 0x7140
addq $0xc0, %rdi
addq $0x8, %rdi
leaq 0x296d(%rip), %rsi      # 0x521f
callq 0x4260
leaq 0x4882(%rip), %rdi      # 0x7140
addq $0xc0, %rdi
addq $0x8, %rdi
leaq 0x2947(%rip), %rsi      # 0x5217
callq 0x4260
jmp 0x2e7d
movq -0x20(%rbp), %rdi
leaq 0x293d(%rip), %rsi      # 0x5222
callq 0x2150
cmpl $0x0, %eax
jne 0x2907
leaq 0x280a(%rip), %rdi      # 0x5100
callq 0x2080
movl $0x0, -0x4(%rbp)
jmp 0x2fe1
movq -0x20(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x2939
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %esi
leaq 0x290c(%rip), %rdi      # 0x522f
callq 0x20d0
cmpq $0x0, %rax
je 0x2939
xorl %eax, %eax
movl %eax, %edi
movb $0x0, %al
callq 0x3240
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %eax
addl $-0x44, %eax
movl %eax, %ecx
movq %rcx, -0x88(%rbp)
subl $0x34, %eax
ja 0x2e67
movq -0x88(%rbp), %rax
leaq 0x26ac(%rip), %rcx      # 0x5010
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x3, -0x14(%rbp)
jmp 0x2e79
leaq 0x47c0(%rip), %rdi      # 0x7140
addq $0x8, %rdi
leaq 0x28aa(%rip), %rsi      # 0x5235
callq 0x4260
leaq -0x10(%rbp), %rdi
callq 0x3350
movq %rax, %rsi
leaq 0x479d(%rip), %rdi      # 0x7140
addq $0x8, %rdi
callq 0x4260
jmp 0x2e79
movl $0x0, -0x14(%rbp)
jmp 0x2e79
jmp 0x2e79
leaq 0x4777(%rip), %rdi      # 0x7140
addq $0x8, %rdi
leaq 0x2864(%rip), %rsi      # 0x5238
callq 0x4260
leaq -0x10(%rbp), %rdi
callq 0x3350
movq %rax, %rsi
leaq 0x4754(%rip), %rdi      # 0x7140
addq $0x8, %rdi
callq 0x4260
jmp 0x2e79
leaq 0x473f(%rip), %rdi      # 0x7140
addq $0xc0, %rdi
addq $0x8, %rdi
leaq 0x2828(%rip), %rsi      # 0x523b
callq 0x4260
leaq -0x10(%rbp), %rdi
callq 0x3350
movq %rax, %rsi
leaq 0x4715(%rip), %rdi      # 0x7140
addq $0xc0, %rdi
addq $0x8, %rdi
callq 0x4260
jmp 0x2e79
leaq -0x58(%rbp), %rdi
movl $0x18, %esi
callq 0x4180
movq %rax, -0x68(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3350
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, (%rax)
movq -0x68(%rbp), %rax
movb $0x1, 0x10(%rax)
movq -0x68(%rbp), %rax
movl $0x6, 0xc(%rax)
movq -0x68(%rbp), %rax
movl $0x10, 0x8(%rax)
jmp 0x2e79
movq -0x20(%rbp), %rdi
leaq 0x27ab(%rip), %rsi      # 0x523e
callq 0x2150
cmpl $0x0, %eax
je 0x2ab2
movq -0x20(%rbp), %rdi
leaq 0x2799(%rip), %rsi      # 0x5241
callq 0x2150
cmpl $0x0, %eax
jne 0x2ad2
movq -0x20(%rbp), %rsi
leaq 0x4683(%rip), %rdi      # 0x7140
addq $0x8, %rdi
callq 0x4260
movl $0x0, -0x14(%rbp)
jmp 0x2ba0
movq -0x20(%rbp), %rdi
leaq 0x2768(%rip), %rsi      # 0x5245
callq 0x2150
cmpl $0x0, %eax
je 0x2afc
movq -0x20(%rbp), %rdi
leaq 0x2757(%rip), %rsi      # 0x5249
callq 0x2150
cmpl $0x0, %eax
jne 0x2b15
movq -0x20(%rbp), %rsi
leaq 0x4639(%rip), %rdi      # 0x7140
addq $0x8, %rdi
callq 0x4260
jmp 0x2b9e
movq -0x20(%rbp), %rdi
leaq 0x272e(%rip), %rsi      # 0x524e
callq 0x2150
cmpl $0x0, %eax
je 0x2b3f
movq -0x20(%rbp), %rdi
leaq 0x271d(%rip), %rsi      # 0x5252
callq 0x2150
cmpl $0x0, %eax
jne 0x2b91
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, %eax
jne 0x2b58
xorl %eax, %eax
movl %eax, %edi
movb $0x0, %al
callq 0x3240
movq -0x20(%rbp), %rsi
leaq 0x45dd(%rip), %rdi      # 0x7140
addq $0x8, %rdi
callq 0x4260
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rsi
leaq 0x45ba(%rip), %rdi      # 0x7140
addq $0x8, %rdi
callq 0x4260
jmp 0x2b9c
xorl %eax, %eax
movl %eax, %edi
movb $0x0, %al
callq 0x3240
jmp 0x2b9e
jmp 0x2ba0
jmp 0x2e79
jmp 0x2e79
leaq -0x10(%rbp), %rdi
callq 0x3350
movq %rax, -0x30(%rbp)
jmp 0x2e79
leaq 0x457d(%rip), %rdi      # 0x7140
addq $0x8, %rdi
leaq 0x2688(%rip), %rsi      # 0x5256
callq 0x4260
jmp 0x2e79
movl $0x2, -0x14(%rbp)
jmp 0x2e79
leaq 0x4555(%rip), %rdi      # 0x7140
addq $0xc0, %rdi
addq $0x8, %rdi
leaq 0x265c(%rip), %rsi      # 0x5259
callq 0x4260
jmp 0x2e79
leaq 0x4532(%rip), %rdi      # 0x7140
addq $0x8, %rdi
leaq 0x2643(%rip), %rsi      # 0x525c
callq 0x4260
leaq -0x10(%rbp), %rdi
callq 0x3350
movq %rax, %rsi
leaq 0x450f(%rip), %rdi      # 0x7140
addq $0x8, %rdi
callq 0x4260
jmp 0x2e79
movb $0x1, 0x45ec(%rip)      # 0x7232
jmp 0x2e79
movq -0x20(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
je 0x2d58
movq -0x20(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x2c, %eax
jne 0x2d58
movq -0x20(%rbp), %rax
movsbl 0x2(%rax), %eax
movl %eax, -0x8c(%rbp)
subl $0x61, %eax
je 0x2cad
jmp 0x2c82
movl -0x8c(%rbp), %eax
subl $0x6c, %eax
je 0x2cc4
jmp 0x2c8f
movl -0x8c(%rbp), %eax
subl $0x70, %eax
jne 0x2cdb
jmp 0x2c9c
leaq 0x449d(%rip), %rax      # 0x7140
addq $0x8, %rax
movq %rax, -0x60(%rbp)
jmp 0x2ce6
leaq 0x448c(%rip), %rax      # 0x7140
addq $0x90, %rax
addq $0x8, %rax
movq %rax, -0x60(%rbp)
jmp 0x2ce6
leaq 0x4475(%rip), %rax      # 0x7140
addq $0xc0, %rax
addq $0x8, %rax
movq %rax, -0x60(%rbp)
jmp 0x2ce6
xorl %eax, %eax
movl %eax, %edi
movb $0x0, %al
callq 0x3240
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2d56
movq -0x20(%rbp), %rdi
movl $0x2c, %esi
callq 0x20d0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2d19
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x60(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4260
cmpq $0x0, -0x28(%rbp)
je 0x2d3e
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x2d49
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0x2d49
movq -0x98(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x2cf2
jmp 0x2d5a
jmp 0x2d5a
jmp 0x2e79
leaq -0x10(%rbp), %rdi
callq 0x3350
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x24e8(%rip), %rsi      # 0x525f
callq 0x2150
cmpl $0x0, %eax
jne 0x2d8d
movl $0x0, -0x18(%rbp)
jmp 0x2e65
movq -0x20(%rbp), %rdi
leaq 0x281e(%rip), %rsi      # 0x55b6
callq 0x2150
cmpl $0x0, %eax
jne 0x2dae
movl $0x3, -0x18(%rbp)
jmp 0x2e63
movq -0x20(%rbp), %rdi
leaq 0x24ab(%rip), %rsi      # 0x5264
callq 0x2150
cmpl $0x0, %eax
jne 0x2dcf
movl $0x4, -0x18(%rbp)
jmp 0x2e61
movq -0x20(%rbp), %rdi
leaq 0x2493(%rip), %rsi      # 0x526d
callq 0x2150
cmpl $0x0, %eax
jne 0x2ded
movl $0x5, -0x18(%rbp)
jmp 0x2e5f
movq -0x20(%rbp), %rdi
leaq 0x23df(%rip), %rsi      # 0x51d7
callq 0x2150
cmpl $0x0, %eax
jne 0x2e0b
movl $0x7, -0x18(%rbp)
jmp 0x2e5d
movq -0x20(%rbp), %rdi
leaq 0x2462(%rip), %rsi      # 0x5278
callq 0x2150
cmpl $0x0, %eax
jne 0x2e29
movl $0x1, -0x18(%rbp)
jmp 0x2e5b
movq -0x20(%rbp), %rdi
leaq 0x244e(%rip), %rsi      # 0x5282
callq 0x2150
cmpl $0x0, %eax
jne 0x2e47
movl $0x2, -0x18(%rbp)
jmp 0x2e59
movq -0x20(%rbp), %rsi
leaq 0x2443(%rip), %rdi      # 0x5295
movb $0x0, %al
callq 0x3240
jmp 0x2e5b
jmp 0x2e5d
jmp 0x2e5f
jmp 0x2e61
jmp 0x2e63
jmp 0x2e65
jmp 0x2e79
movq -0x20(%rbp), %rsi
leaq 0x2439(%rip), %rdi      # 0x52ab
movb $0x0, %al
callq 0x3240
jmp 0x2e7b
jmp 0x2e7d
jmp 0x2e7f
jmp 0x2e81
jmp 0x2e83
jmp 0x2e85
jmp 0x2e87
jmp 0x2e89
jmp 0x2e8b
jmp 0x2e8d
jmp 0x259a
movq $0x0, -0x70(%rbp)
cmpq $0x5, -0x70(%rbp)
jae 0x2ed5
leaq 0x4298(%rip), %rax      # 0x7140
imulq $0x30, -0x70(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rcx
leaq 0x4285(%rip), %rax      # 0x7140
imulq $0x30, -0x70(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x20(%rax)
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x2e9a
cmpq $0x0, -0x50(%rbp)
jne 0x2ee7
xorl %eax, %eax
movl %eax, %edi
movb $0x0, %al
callq 0x3240
cmpq $0x0, -0x30(%rbp)
je 0x2f38
movq -0x30(%rbp), %rdi
leaq 0x222c(%rip), %rsi      # 0x5125
callq 0x2150
cmpl $0x0, %eax
jne 0x2f19
cmpl $0x3, -0x14(%rbp)
jb 0x2f17
leaq 0x23af(%rip), %rdi      # 0x52bf
movb $0x0, %al
callq 0x3240
jmp 0x2f36
cmpl $0x4, -0x14(%rbp)
je 0x2f34
cmpq $0x18, -0x50(%rbp)
jbe 0x2f34
leaq 0x23b0(%rip), %rdi      # 0x52dd
movb $0x0, %al
callq 0x3240
jmp 0x2f36
jmp 0x2f38
movq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq -0x58(%rbp), %rcx
addq -0x50(%rbp), %rcx
cmpq %rcx, %rax
je 0x2fa4
movq -0x68(%rbp), %rax
movl 0x8(%rax), %eax
movl -0x14(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x2f6d
jmp 0x2f96
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
subl $0x1, %ecx
movq -0x68(%rbp), %rax
andl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x68(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x33d0
movq -0x68(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x68(%rbp)
jmp 0x2f40
cmpl $0x4, -0x14(%rbp)
jne 0x2fda
cmpq $0x0, -0x30(%rbp)
jne 0x2fbc
leaq 0x2361(%rip), %rax      # 0x5319
movq %rax, -0x30(%rbp)
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rax
movl $0x18, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rsi
movq -0x30(%rbp), %rdx
callq 0x37a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)