// File: /workspace/github_c_makefile_star2_O2/tditlu[P]shadetabler/src/shadetabler.c
// Function: main
int main(int argc, char *argv[]) {
	const struct option longopts[] = {
		{"output", required_argument, 0, 'o' },
		{"verbose", no_argument, 0, 'v' },
		{"force", no_argument, 0, 'f' },
		{"colors", optional_argument, 0, 'c' },
		{"shades", optional_argument, 0, 's' },
 		{"type", optional_argument, 0, 't' },
		{"hq", no_argument, 0, 'h' },
		{"reserve", no_argument, 0, 'r' },
		{"priority", optional_argument, 0, 'p' },
		{"light", optional_argument, 0, 'l' },
		{"dark", optional_argument, 0, 'd' },
		{0, 0, 0, 0}
	};

	const char *optstring = "o:vfc:s:t:hrp:l:d:";

	if (argc <= 1) {
		usage();
		exit(EXIT_FAILURE);
	}

	char *output = NULL;
	unsigned int verbose = 0;
	unsigned int force = 0;
	unsigned int colors = 256;
	unsigned int shades = 64;
	unsigned int type = TYPE_LIGHT;
	unsigned int hq = 0;
	unsigned int reserve = 0;
	unsigned int priority = 0;
	char *light_output = "shadetable_light.png";
	char *dark_output = "shadetable_dark.png";

	int opt = 0;
	while ((opt = getopt_long(argc, argv, optstring, longopts, 0)) != EOF) {
		switch (opt) {
			case 'o':
				output = optarg;
				break;
			case 'v':
				verbose = 1;
				break;
			case 'f':
				force = 1;
				break;
			case 'c':
				colors = atoi(optarg);
				break;
			case 's':
				shades = atoi(optarg);
				break;
			case 't':
				if (optarg[0] == 'd' || optarg[0] == 'D') {
					type = TYPE_DARK;
				} else if (optarg[0] == 'b' || optarg[0] == 'B') {
					type = TYPE_BOTH;
				}
				break;
			case 'h':
				hq = 1;
				break;
			case 'r':
				reserve = 1;
				break;
			case 'p':
				priority = atoi(optarg);
				break;
			case 'l':
				light_output = optarg;
				break;
			case 'd':
				dark_output = optarg;
				break;
			default:
				usage();
				exit(EXIT_FAILURE);
		}
	}

	if (output == NULL) {
		usage();
		fprintf(stderr, "No output directory specified.\n\n");
		exit(EXIT_FAILURE);
	}

	if ((argc - optind) == 0) {
		usage();
		fprintf(stderr, "No input file specified.\n\n");
		exit(EXIT_FAILURE);
	}

	if ((colors < 4 && reserve) || colors < 2 || colors > 256) {
		usage();
		fprintf(stderr, "Invalid number of colors%s.\n\n", reserve ? " (2 colors are reserved for black & white)." : "");
		exit(EXIT_FAILURE);
	}

	if (shades < 2 || shades > 256) {
		usage();
		fprintf(stderr, "Invalid number of shades.\n\n");
		exit(EXIT_FAILURE);
	}

	if (verbose) {
		printf(SHADETABLER_HEADER "\n");
	}

	exq_data *exq = exq_init();
	exq_no_transparency(exq);

	image_t *images = NULL;
	unsigned char *palette = NULL;
	char path[FILENAME_MAX];

	unsigned int number_of_images = (argc - optind);
	images = calloc(number_of_images, sizeof(image_t));
	if (images == NULL) {
		fprintf(stderr, "Unable to allocate memory for images.\n");
		goto error;
	}

	for (unsigned int i = 0; i < number_of_images; i++) {
		const char *infile = argv[optind + i];
		if (cwk_path_normalize(infile, path, sizeof(path)) == 0)  {
			fprintf(stderr, "Invalid input file path \"%s\".", infile);
			goto error;
		}

		const image_error_t image_error = image_load_rgba(&images[i], path);
		if (image_error) {
			fprintf(stderr, "Could not load input file \"%s\". %s.\n", path, image_error_text(image_error));
			goto error;
		}

		unsigned char *buffer = images[i].buffer;
		unsigned int width = images[i].width;
		unsigned int height = images[i].height;

		if (verbose) {
			printf("Generating priority colors for input file \"%s\".\n", path);
		}

		for (int j = 0; j < priority; j++) {
			exq_feed_extened(exq, buffer, width * height, 0, reserve);
		}

		if (type == TYPE_LIGHT || type == TYPE_BOTH) {
			if (verbose) {
				printf("Generating light shades for input file \"%s\".\n", path);
			}
			for (int j = 1; j < shades; j++) {
				int shade = (int)floor((((float)j) / ((float)(shades - 1)) * 255.0f) + 0.5);
				exq_feed_extened(exq, buffer, width * height, shade, reserve);
			}
		}

		if (type == TYPE_DARK || type == TYPE_BOTH) {
			if (verbose) {
				printf("Generating dark shades for input file \"%s\".\n", path);
			}
			for (int j = 0; j < (shades - 1); j++) {
				int shade = ((int)floor((((float)j) / ((float)(shades - 1)) * 255.0f) - 0.5)) - 255;
				exq_feed_extened(exq, buffer, width * height, shade, reserve);
			}
		}
	}

	if (verbose) {
		printf("Quantizing images%s.\n", hq ? ", high quality" : "");
	}

	exq_quantize_ex(exq, reserve ? colors - 2 : colors, hq);

	palette = malloc(colors * 4 * sizeof(unsigned char));
	if (palette == NULL) {
		fprintf(stderr, "Unable to allocate memory for palette.\n");
		goto error;
	}

	if (verbose) {
		printf("Generating & sorting palette.\n");
	}

	exq_get_palette(exq, palette, reserve ? colors - 2 : colors);

	if (reserve) {
		palette[((colors - 2) * 4) + 0] = 0; // Force black
		palette[((colors - 2) * 4) + 1] = 0;
		palette[((colors - 2) * 4) + 2] = 0;
		palette[((colors - 2) * 4) + 3] = 255;

		palette[((colors - 1) * 4) + 0] = 255; // Force white
		palette[((colors - 1) * 4) + 1] = 255;
		palette[((colors - 1) * 4) + 2] = 255;
		palette[((colors - 1) * 4) + 3] = 255;
	}

	qsort(palette, colors, sizeof(unsigned char) * 4, palette_qsort_compare); // Sort palette

	exq_set_palette(exq, palette, colors);

	for (unsigned int i = 0; i < number_of_images; i++) {
		const char *infile = argv[optind + i];
		path_get_output_filename(path, sizeof(path), output, infile);

		int write_image = 1;
		if (!force && path_file_exists(path)) {
			fprintf(stderr,"File '%s' already exists. Overwrite? [y/N] ", path);
			fflush(stderr);
			int c = getchar();
			write_image = (c == 'y' || c == 'Y') ? 1 : 0;
			while (c != '\n' && c != EOF) { c = getchar(); }
		}

		if (write_image) {
			unsigned int width = images[i].width;
			unsigned int height = images[i].height;
			unsigned char *buffer = malloc(width * height * sizeof(unsigned char));
			if (buffer == NULL) {
				fprintf(stderr, "Unable to allocate memory for image \"%s\".\n", path);
				goto error;
			}

			if (verbose) {
				printf("Saving image \"%s\"\n", path);
			}

			exq_map_image(exq, width * height, images[i].buffer, buffer);
			save_image(path, buffer, width, height, palette, colors);
			free(buffer);
		} else {
			if (verbose) {
				printf("Skipping image \"%s\"\n", path);
			}
		}
	}

	if (type == TYPE_LIGHT || type == TYPE_BOTH) {
		path_get_output_filename(path, sizeof(path), output, light_output);
		if (!allocate_generate_and_save_shadetable(exq, path, palette, colors, shades, 1, verbose, force)) {
			goto error;
		}
	}

	if (type == TYPE_DARK || type == TYPE_BOTH) {
		path_get_output_filename(path, sizeof(path), output, dark_output);
		if (!allocate_generate_and_save_shadetable(exq, path, palette, colors, shades, 0, verbose, force)) {
			goto error;
		}
	}

error:
	if (palette != NULL) {
		free(palette);
	}

	if (images != NULL) {
		for (unsigned int i = 0; i < number_of_images; i++) {
			image_free_rgba(&images[i]);
		}
		free(images);
	}

	exq_free(exq);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1208, %rsp           # imm = 0x1208
movq %rsi, 0x60(%rsp)
movl %edi, %ebx
leaq 0x8e15(%rip), %rsi      # 0x16c50
leaq 0x80(%rsp), %rdi
movl $0x180, %edx            # imm = 0x180
callq 0x1120
cmpl $0x2, %ebx
jl 0xe62b
movq %rbx, %r13
movl $0x100, %eax            # imm = 0x100
movq %rax, 0x18(%rsp)
pushq $0x40
popq %rax
movq %rax, 0x38(%rsp)
movq $0x0, 0x28(%rsp)
leaq 0x31a3(%rip), %rax      # 0x1101e
movq %rax, 0x68(%rsp)
leaq 0x31ac(%rip), %rax      # 0x11033
movq %rax, 0x70(%rsp)
leaq 0x80(%rsp), %r12
pushq $0x1
popq %rbx
leaq 0x30aa(%rip), %rbp      # 0x10f48
xorl %r14d, %r14d
movl $0x0, 0x14(%rsp)
xorl %eax, %eax
movq $0x0, 0x50(%rsp)
xorl %ecx, %ecx
movq $0x0, 0x48(%rsp)
movq %rcx, 0x8(%rsp)
movl %eax, %r15d
movl %r13d, %edi
movq 0x60(%rsp), %rsi
leaq 0x3135(%rip), %rdx      # 0x1100b
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x10b0
leal -0x63(%rax), %ecx
cmpl $0x13, %ecx
ja 0xdfd6
movslq (%rbp,%rcx,4), %rdx
addq %rbp, %rdx
movl %r15d, %eax
movl %ebx, %ecx
jmpq *%rdx
movq 0x90d5(%rip), %rax      # 0x16fd8
movq (%rax), %rdi
callq 0x11a0
movq %rax, 0x18(%rsp)
jmp 0xdfc9
movq 0x90bc(%rip), %rax      # 0x16fd8
movq (%rax), %rax
movzbl (%rax), %edx
cmpl $0x42, %edx
je 0xdf50
movl %ebx, %eax
movq 0x8(%rsp), %rcx
cmpl $0x44, %edx
je 0xdebf
movl %ebx, %eax
movq 0x8(%rsp), %rcx
cmpl $0x64, %edx
je 0xdebf
movl %r15d, %eax
movq 0x8(%rsp), %rcx
cmpl $0x62, %edx
jne 0xdebf
pushq $0x2
popq %rax
jmp 0xdfcc
movq 0x907c(%rip), %rax      # 0x16fd8
movq (%rax), %rdi
callq 0x11a0
movq %rax, 0x38(%rsp)
jmp 0xdfc9
movq 0x9066(%rip), %rax      # 0x16fd8
movq (%rax), %rax
movq %rax, 0x68(%rsp)
jmp 0xdfc9
movq 0x9055(%rip), %rax      # 0x16fd8
movq (%rax), %rax
movq %rax, 0x48(%rsp)
jmp 0xdfc9
movl %r15d, %eax
movl %ebx, %ecx
movq %rcx, 0x50(%rsp)
jmp 0xdfcc
movl %ebx, %r14d
jmp 0xdfc9
movl %ebx, 0x14(%rsp)
jmp 0xdfc9
movq 0x902d(%rip), %rax      # 0x16fd8
movq (%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xdfc9
movq 0x901c(%rip), %rax      # 0x16fd8
movq (%rax), %rdi
callq 0x11a0
movq %rax, 0x28(%rsp)
movl %r15d, %eax
movq 0x8(%rsp), %rcx
jmp 0xdebf
cmpl $-0x1, %eax
jne 0xe62b
cmpq $0x0, 0x48(%rsp)
je 0xe638
movq 0x8fde(%rip), %rax      # 0x16fd0
cmpl %r13d, (%rax)
movq 0x18(%rsp), %rdx
je 0xe652
cmpl $0x4, %edx
setb %al
testl %r14d, %r14d
setne %cl
testb %cl, %al
jne 0xe66c
leal -0x101(%rdx), %eax
cmpl $0xffffff00, %eax       # imm = 0xFFFFFF00
jbe 0xe66c
movq 0x38(%rsp), %rax
addl $0xfffffeff, %eax       # imm = 0xFFFFFEFF
cmpl $0xffffff00, %eax       # imm = 0xFFFFFF00
jbe 0xe6a0
cmpl $0x0, 0x8(%rsp)
je 0xe04d
leaq 0x32db(%rip), %rdi      # 0x11323
callq 0x1060
xorl %eax, %eax
callq 0x12fc
movq %rax, %r12
movq %rax, %rdi
callq 0x132c
movq 0x8f6a(%rip), %rax      # 0x16fd0
subl (%rax), %r13d
pushq $0x10
popq %rsi
movq %r13, 0x58(%rsp)
movq %r13, %rdi
callq 0x10e0
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0xe525
movq 0x38(%rsp), %rax
decl %eax
movl %eax, 0x24(%rsp)
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x40(%rsp)
leal -0x1(%r15), %eax
movl %eax, 0x20(%rsp)
leaq 0x200(%rsp), %rbp
xorl %edx, %edx
cmpq 0x58(%rsp), %rdx
movl 0x14(%rsp), %r13d
je 0xe244
movq 0x8f0b(%rip), %rax      # 0x16fd0
movl (%rax), %eax
addl %edx, %eax
movq 0x60(%rsp), %rcx
movq %rdx, %r13
movq (%rcx,%rax,8), %rbx
movl $0x1000, %edx           # imm = 0x1000
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xd6fe
testq %rax, %rax
je 0xe53a
movq %r13, 0x78(%rsp)
movq %r13, %rbx
shlq $0x4, %rbx
addq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xdc2b
testl %eax, %eax
jne 0xe55a
movq (%rbx), %r13
movl 0x8(%rbx), %ebp
movl 0xc(%rbx), %ebx
cmpl $0x0, 0x8(%rsp)
je 0xe138
leaq 0x302a(%rip), %rdi      # 0x11153
leaq 0x200(%rsp), %rsi
xorl %eax, %eax
callq 0x10c0
imull %ebp, %ebx
movq 0x28(%rsp), %rax
movl %eax, %ebp
subl $0x1, %ebp
jb 0xe15b
movq %r12, %rdi
movq %r13, %rsi
movl %ebx, %edx
xorl %ecx, %ecx
movl %r14d, %r8d
callq 0xe6c6
jmp 0xe142
testb $0x1, %r15b
jne 0xe1c2
cmpl $0x0, 0x8(%rsp)
je 0xe17e
leaq 0x3015(%rip), %rdi      # 0x11184
leaq 0x200(%rsp), %rsi
xorl %eax, %eax
callq 0x10c0
pushq $0x1
popq %rbp
cmpl 0x38(%rsp), %ebp
jae 0xe1c2
cvtsi2ss %ebp, %xmm0
divss 0x40(%rsp), %xmm0
mulss 0xf07(%rip), %xmm0      # 0xf0a0
cvtss2sd %xmm0, %xmm0
addsd 0x2d9b(%rip), %xmm0     # 0x10f40
callq 0x1190
cvttsd2si %xmm0, %ecx
movq %r12, %rdi
movq %r13, %rsi
movl %ebx, %edx
movl %r14d, %r8d
callq 0xe6c6
incl %ebp
jmp 0xe181
cmpl $0x1, 0x20(%rsp)
ja 0xe22f
cmpl $0x0, 0x8(%rsp)
je 0xe1e6
leaq 0x2fdb(%rip), %rdi      # 0x111b2
leaq 0x200(%rsp), %rsi
xorl %eax, %eax
callq 0x10c0
xorl %ebp, %ebp
cmpl %ebp, 0x24(%rsp)
je 0xe22f
cvtsi2ss %ebp, %xmm0
divss 0x40(%rsp), %xmm0
mulss 0xea0(%rip), %xmm0      # 0xf0a0
cvtss2sd %xmm0, %xmm0
addsd 0x2d2c(%rip), %xmm0     # 0x10f38
callq 0x1190
cvttsd2si %xmm0, %ecx
addl $0xffffff01, %ecx       # imm = 0xFFFFFF01
movq %r12, %rdi
movq %r13, %rsi
movl %ebx, %edx
movl %r14d, %r8d
callq 0xe6c6
incl %ebp
jmp 0xe1e8
movq 0x78(%rsp), %rdx
incq %rdx
leaq 0x200(%rsp), %rbp
jmp 0xe0ae
cmpl $0x0, 0x8(%rsp)
je 0xe26e
testl %r13d, %r13d
leaq 0x2e2d(%rip), %rax      # 0x11082
leaq 0x2f99(%rip), %rsi      # 0x111f5
cmoveq %rax, %rsi
leaq 0x2f78(%rip), %rdi      # 0x111df
xorl %eax, %eax
callq 0x10c0
movq 0x18(%rsp), %rbx
leal -0x2(%rbx), %ebp
testl %r14d, %r14d
movl %r13d, %edx
movl %ebx, %r13d
cmovnel %ebp, %r13d
movq %r12, %rdi
movl %r13d, %esi
callq 0x1543
movl %ebx, %eax
movq %rax, 0x40(%rsp)
leaq (,%rax,4), %rbx
movq %rbx, %rdi
callq 0x1130
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0xe58c
cmpl $0x0, 0x8(%rsp)
je 0xe2c6
leaq 0x3044(%rip), %rdi      # 0x11305
callq 0x1060
movq %r12, %rdi
movq 0x28(%rsp), %rsi
movl %r13d, %edx
movq %rsi, %r13
callq 0x1b5d
testl %r14d, %r14d
je 0xe2ef
movl %ebp, %eax
movl $0xff000000, (%r13,%rax,4) # imm = 0xFF000000
orl $-0x1, -0x4(%r13,%rbx)
leaq 0x64e(%rip), %rcx       # 0xe944
pushq $0x4
popq %rdx
movq %r13, %rdi
movq 0x40(%rsp), %rsi
callq 0x1070
movq %r12, %rdi
movq %r13, %rsi
movq 0x18(%rsp), %rdx
callq 0x1c90
leaq 0x200(%rsp), %r14
xorl %ebp, %ebp
cmpq 0x58(%rsp), %rbp
je 0xe46e
movq 0x8c9e(%rip), %rax      # 0x16fd0
movl (%rax), %eax
addl %ebp, %eax
movq 0x60(%rsp), %rcx
movq (%rcx,%rax,8), %rcx
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
movq 0x48(%rsp), %rdx
callq 0xdd93
cmpl $0x0, 0x50(%rsp)
jne 0xe368
movq %r14, %rdi
callq 0xdd70
testl %eax, %eax
jne 0xe40d
movq %r14, %r13
movq %rbp, 0x40(%rsp)
movq %rbp, %rbx
shlq $0x4, %rbx
movq 0x30(%rsp), %rax
movl 0x8(%rax,%rbx), %ecx
movl 0xc(%rax,%rbx), %eax
movl %eax, 0x14(%rsp)
movl %eax, %ebp
movl %ecx, 0x24(%rsp)
imull %ecx, %ebp
movq %rbp, %rdi
callq 0x1130
testq %rax, %rax
je 0xe5ad
movq %rax, %r14
cmpl $0x0, 0x8(%rsp)
je 0xe3bd
leaq 0x2ed0(%rip), %rdi      # 0x11283
movq %r13, %rsi
xorl %eax, %eax
callq 0x10c0
addq 0x30(%rsp), %rbx
movq (%rbx), %rdx
movq %r12, %rdi
movl %ebp, %esi
movq %r14, %rcx
callq 0x1e91
movq %r13, %rdi
movq %r14, %rsi
movl 0x24(%rsp), %edx
movl 0x14(%rsp), %ecx
movq %r13, %rbx
movq 0x28(%rsp), %r13
movq %r13, %r8
movq 0x18(%rsp), %r9
callq 0xe9db
movq %r14, %rdi
callq 0x1030
movq %rbx, %r14
movq 0x40(%rsp), %rbp
incq %rbp
jmp 0xe320
movq 0x8be4(%rip), %rbx      # 0x16ff8
movq (%rbx), %rdi
leaq 0x2e0e(%rip), %rsi      # 0x1122c
movq %r14, %rdx
xorl %eax, %eax
callq 0x1100
movq (%rbx), %rdi
callq 0x1140
callq 0x10f0
movl %eax, %ebx
andl $-0x21, %ebx
cmpl $-0x1, %eax
je 0xe44b
cmpl $0xa, %eax
je 0xe44b
callq 0x10f0
jmp 0xe43a
cmpl $0x59, %ebx
je 0xe368
cmpl $0x0, 0x8(%rsp)
je 0xe405
leaq 0x2e34(%rip), %rdi      # 0x11296
movq %r14, %rsi
xorl %eax, %eax
callq 0x10c0
jmp 0xe405
testb $0x1, %r15b
jne 0xe4d1
cmpl $0x2, 0x20(%rsp)
setb %bpl
leaq 0x200(%rsp), %rbx
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
movq 0x48(%rsp), %rdx
movq 0x68(%rsp), %rcx
callq 0xdd93
pushq $0x1
popq %r9
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq 0x18(%rsp), %rcx
movq 0x38(%rsp), %r8
pushq 0x50(%rsp)
pushq 0x10(%rsp)
callq 0xeb3e
popq %rcx
popq %rdx
testl %eax, %eax
setne %al
testb %bpl, %al
jne 0xe4dc
jmp 0xe5d2
cmpl $0x1, 0x20(%rsp)
ja 0xe5d2
leaq 0x200(%rsp), %rbx
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
movq 0x48(%rsp), %rdx
movq 0x70(%rsp), %rcx
callq 0xdd93
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq 0x18(%rsp), %rcx
movq 0x38(%rsp), %r8
xorl %r9d, %r9d
pushq 0x50(%rsp)
pushq 0x10(%rsp)
callq 0xeb3e
popq %rcx
popq %rdx
jmp 0xe5d2
movq 0x8acc(%rip), %rax      # 0x16ff8
movq (%rax), %rcx
leaq 0x2bb3(%rip), %rdi      # 0x110e9
pushq $0x26
jmp 0xe59f
movq 0x8ab7(%rip), %rax      # 0x16ff8
movq (%rax), %rdi
leaq 0x2bc5(%rip), %rsi      # 0x11110
xorl %r13d, %r13d
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1100
jmp 0xe5d2
movq 0x8a97(%rip), %rcx      # 0x16ff8
movq (%rcx), %rbx
movl %eax, %edi
callq 0xdd4b
leaq 0x2bbc(%rip), %rsi      # 0x1112e
xorl %r13d, %r13d
leaq 0x200(%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0x1100
jmp 0xe5d2
movq 0x8a65(%rip), %rax      # 0x16ff8
movq (%rax), %rcx
leaq 0x2c67(%rip), %rdi      # 0x11204
pushq $0x27
popq %rsi
pushq $0x1
popq %rdx
callq 0x11c0
xorl %r13d, %r13d
jmp 0xe5d2
movq 0x8a44(%rip), %rax      # 0x16ff8
movq (%rax), %rdi
leaq 0x2c9a(%rip), %rsi      # 0x11258
leaq 0x200(%rsp), %rdx
xorl %eax, %eax
callq 0x1100
movq 0x28(%rsp), %r13
movq %r13, %rdi
callq 0x1030
cmpq $0x0, 0x30(%rsp)
je 0xe60f
shlq $0x4, 0x58(%rsp)
xorl %ebx, %ebx
cmpq %rbx, 0x58(%rsp)
je 0xe605
movq 0x30(%rsp), %rax
leaq (%rax,%rbx), %rdi
callq 0xdc14
addq $0x10, %rbx
jmp 0xe5ea
movq 0x30(%rsp), %rdi
callq 0x1030
movq %r12, %rdi
callq 0x1334
xorl %eax, %eax
addq $0x1208, %rsp           # imm = 0x1208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xedb3
pushq $0x1
popq %rdi
callq 0x11b0
callq 0xedb3
movq 0x89b4(%rip), %rax      # 0x16ff8
movq (%rax), %rcx
leaq 0x29f9(%rip), %rdi      # 0x11047
pushq $0x20
jmp 0xe6b8
callq 0xedb3
movq 0x899a(%rip), %rax      # 0x16ff8
movq (%rax), %rcx
leaq 0x2a00(%rip), %rdi      # 0x11068
pushq $0x1a
jmp 0xe6b8
callq 0xedb3
testl %r14d, %r14d
movq 0x897d(%rip), %rax      # 0x16ff8
movq (%rax), %rdi
leaq 0x2a1c(%rip), %rax      # 0x110a1
leaq 0x29f6(%rip), %rdx      # 0x11082
cmovneq %rax, %rdx
leaq 0x29ec(%rip), %rsi      # 0x11083
xorl %eax, %eax
callq 0x1100
jmp 0xe630
callq 0xedb3
movq 0x894c(%rip), %rax      # 0x16ff8
movq (%rax), %rcx
leaq 0x2a17(%rip), %rdi      # 0x110cd
pushq $0x1b
popq %rsi
pushq $0x1
popq %rdx
callq 0x11c0
jmp 0xe630