// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-user.c
// Function: de_run
int de_run(deark *c)
{
	dbuf *orig_ifile = NULL;
	dbuf *subfile = NULL;
	i64 subfile_size;
	struct deark_module_info *module_to_use = NULL;
	int module_was_autodetected = 0;
	int moddisp;
	int subdirs_opt;
	int keepdirentries_opt;
	int tmp_opt;
	de_module_params *mparams = NULL;
	de_ucstring *friendly_infn = NULL;

	if(c->serious_error_flag) goto done;

	if(c->modhelp_req && c->input_format_req) {
		do_modhelp(c);
		goto done;
	}

	if(c->extrlist_filename) {
		open_extrlist(c);
		if(c->serious_error_flag) goto done;
	}

	friendly_infn = ucstring_create(c);

	if(c->input_style==DE_INPUTSTYLE_STDIN) {
		ucstring_append_sz(friendly_infn, "[stdin]", DE_ENCODING_LATIN1);
	}
	else if(c->input_filename) {
		ucstring_append_sz(friendly_infn, c->input_filename, DE_ENCODING_UTF8);
	}
	else {
		de_internal_err_nonfatal(c, "Input file not set");
		c->serious_error_flag = 1;
		goto done;
	}

	de_register_modules(c);

	if(c->input_format_req) {
		module_to_use = de_get_module_by_id(c, c->input_format_req);
		if(!module_to_use) {
			de_err(c, "Unknown module \"%s\"", c->input_format_req);
			c->serious_error_flag = 1;
			goto done;
		}
	}

	if(c->slice_start_req_special!=0) {
		ucstring_append_sz(friendly_infn, "[special]", DE_ENCODING_LATIN1);
	}
	else if(c->slice_size_req_valid) {
		ucstring_printf(friendly_infn, DE_ENCODING_LATIN1, "[%"I64_FMT",%"I64_FMT"]",
			c->slice_start_req, c->slice_size_req);
	}
	else if(c->slice_start_req) {
		ucstring_printf(friendly_infn, DE_ENCODING_LATIN1, "[%"I64_FMT"]", c->slice_start_req);
	}
	if(c->mp_data && c->mp_data->count>0) {
		ucstring_printf(friendly_infn, DE_ENCODING_LATIN1, " (+%d more file%s)",
			c->mp_data->count, (c->mp_data->count==1 ? "" : "s"));
	}
	de_dbg(c, "Input file: %s", ucstring_getpsz_d(friendly_infn));

	if(c->input_style==DE_INPUTSTYLE_STDIN) {
		orig_ifile = dbuf_open_input_stdin(c);
	}
	else {
		orig_ifile = dbuf_open_input_file(c, c->input_filename);

		if(orig_ifile && orig_ifile->btype==DBUF_TYPE_FIFO) {
			// Only now do we know that the input "file" is a named pipe.
			// Set a flag to remember that the input filename does not
			// reflect the file format.
			c->suppress_detection_by_filename = 1;
		}
	}
	if(!orig_ifile) {
		goto done;
	}

	c->infile = orig_ifile;

	if(c->slice_start_req_special==1) {
		if(!do_special_overlay_startpos(c)) {
			de_err(c, "File not compatible with \"-start overlay\"");
			goto done;
		}
	}

	// If we are only supposed to look at a segment of the original file,
	// do that by creating a child dbuf, using dbuf_open_input_subfile().
	if(c->slice_start_req!=0 || c->slice_size_req_valid) {
		if(c->slice_start_req<0 || c->slice_size_req<0 ||
			(c->slice_start_req+c->slice_size_req > c->infile->len))
		{
			de_err(c, "File not compatible with given -start/-size options");
			goto done;
		}

		if(c->slice_size_req_valid)
			subfile_size = c->slice_size_req;
		else
			subfile_size = c->infile->len - c->slice_start_req;
		subfile = dbuf_open_input_subfile(c->infile, c->slice_start_req, subfile_size);
		c->infile = subfile;
	}

	if(!module_to_use) {
		int errflag;

		module_to_use = detect_module_for_file(c, &errflag);
		if(errflag) goto done;
		module_was_autodetected = 1;
	}

	if(!module_to_use) {
		if(c->infile->len==0)
			de_err(c, "Unknown or unsupported file format (empty file)");
		else
			de_err(c, "Unknown or unsupported file format");
		goto done;
	}

	if(c->modhelp_req && module_was_autodetected &&
		module_to_use->unique_id!=1) // id 1 == "unsupported"
	{
		do_modhelp_internal(c, module_to_use);
		goto done;
	}

	de_info(c, "Module: %s", module_to_use->id);

	if(c->mp_data && c->mp_data->count &&
		!(module_to_use->flags&DE_MODFLAG_MULTIPART))
	{
		de_err(c, "The %s module does not support multiple input files",
			module_to_use->id);
		c->serious_error_flag = 1;
		goto done;
	}

	if(module_was_autodetected && (module_to_use->flags&DE_MODFLAG_SECURITYWARNING)) {
		de_err(c, "The %s module has not been audited for security. There is a "
			"greater than average chance that it is unsafe to use with untrusted "
			"input files. Use \"-m %s\" to confirm that you want to use it.",
			module_to_use->id, module_to_use->id);
		c->serious_error_flag = 1;
		goto done;
	}

	if(module_was_autodetected && (module_to_use->flags&DE_MODFLAG_WARNPARSEONLY)) {
		de_warn(c, "The %s module can parse files, but does not generally support "
			"extracting data.", module_to_use->id);
	}
	if(module_to_use->flags&DE_MODFLAG_NONWORKING) {
		de_warn(c, "The %s module is considered to be incomplete, and may "
			"not work properly. Caveat emptor.",
			module_to_use->id);
	}

	if(c->identify_only) {
		// Stop here, unless we're using the "unsupported" module.
		if(module_to_use->unique_id!=1) {
			goto done;
		}
	}

	de_dbg2(c, "file size: %" I64_FMT "", c->infile->len);

	if(c->output_style==DE_OUTPUTSTYLE_ARCHIVE) {
		subdirs_opt = de_get_ext_option_bool(c, "archive:subdirs", -1);
		if(subdirs_opt<0) {
			// By default, for archive output, enable subdirs unless -o was used.
			if(!c->base_output_filename) {
				c->allow_subdirs = 1;
			}
		}
		else {
			c->allow_subdirs = subdirs_opt?1:0;
		}
	}

	keepdirentries_opt = de_get_ext_option_bool(c, "keepdirentries", -1);
	if(keepdirentries_opt<0) {
		// By default, only keep dir entries if there is some way that
		// files can be present in such a subdir.
		c->keep_dir_entries = (u8)(
			(c->output_style==DE_OUTPUTSTYLE_ARCHIVE) &&
			c->allow_subdirs &&
			(!c->base_output_filename));
	}
	else {
		c->keep_dir_entries = keepdirentries_opt?1:0;
	}

	if(c->output_style==DE_OUTPUTSTYLE_ARCHIVE) {
		const char *s_opt;

		s_opt = de_get_ext_option(c, "archive:timestamp");
		if(s_opt) {
			c->reproducible_output = 1;
			de_unix_time_to_timestamp(de_atoi64(s_opt), &c->reproducible_timestamp, 0x1);
			if(!c->reproducible_timestamp.is_valid) {
				// Timestamp out of range? Note: Supported range is
				//  -11644473599 ( 1601-01-01 00:00:01) through
				//  910692730085 (30828-09-14 02:48:05)
				c->reproducible_output = 0;
			}
		}
		else {
			if(de_get_ext_option(c, "archive:repro")) {
				c->reproducible_output = 1;
			}
		}
	}

	if(c->output_style==DE_OUTPUTSTYLE_DIRECT &&
		c->max_output_files > DE_DEFAULT_MAX_OUTPUT_FILES &&
		!c->list_mode && !c->user_set_max_output_files)
	{
		c->max_output_files = DE_DEFAULT_MAX_OUTPUT_FILES;
	}

	if(de_get_ext_option_bool(c, "oinfo", 0)) {
		c->enable_oinfo = 1;
	}

	tmp_opt = de_get_ext_option_bool(c, "wbuffer", -1);
	if(tmp_opt>0) {
		// For testing(?), enable wbuffer feature automatically in some cases.
		c->enable_wbuffer_test = 1;
	}
	else if(tmp_opt==0) {
		// Always disable wbuffer, even if a module wants to use it.
		c->disable_wbuffer = 1;
	}

	// If we're writing to a zip file, we normally defer creating that zip file
	// until we find a file to extract, so that we never create a zip file with
	// no member files.
	// But if the zip "file" is going to stdout, we'll make sure we produce zip
	// output, even if it has no member files.
	if(c->output_style==DE_OUTPUTSTYLE_ARCHIVE && c->archive_to_stdout) {
		if(!de_archive_initialize(c)) {
			goto done;
		}
	}

	if(c->list_mode) {
		if(de_get_ext_option_bool(c, "list:fileid", 0)) {
			c->list_mode_include_file_id = 1;
		}
	}

	if(c->modcodes_req) {
		if(!mparams)
			mparams = de_malloc(c, sizeof(de_module_params));
		// This is a hack, mainly for developer use. It lets the user set the
		// "module codes" string from the command line, so that some modules
		// can be run in special modes. For example, you can run the psd module
		// in its "tagged blocks" mode. (If that turns out to be useful, though,
		// it would be better to make it available via an "-opt" option, or
		// even a new module.)
		mparams->in_params.codes = c->modcodes_req;
	}

	if(module_was_autodetected)
		moddisp = DE_MODDISP_AUTODETECT;
	else
		moddisp = DE_MODDISP_EXPLICIT;

	if(!de_run_module(c, module_to_use, mparams, moddisp)) {
		goto done;
	}

	// The DE_MODFLAG_NOEXTRACT flag means the module is not expected to extract
	// any files.
	if(c->num_files_extracted==0 && c->error_count==0 &&
		!(module_to_use->flags&DE_MODFLAG_NOEXTRACT))
	{
		de_info(c, "No files found to extract!");
	}

done:
	if(c->extrlist_dbuf) { dbuf_close(c->extrlist_dbuf); c->extrlist_dbuf=NULL; }
	ucstring_destroy(friendly_infn);
	if(subfile) dbuf_close(subfile);
	if(orig_ifile) dbuf_close(orig_ifile);
	c->infile = NULL;
	de_free(c, mparams);
	return c->serious_error_flag ? 0 : 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0x4c(%rax)
je 0x18d98a
jmp 0x18e1f4
movq -0x8(%rbp), %rax
movzbl 0xf9(%rax), %eax
cmpl $0x0, %eax
je 0x18d9b3
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x18d9b3
movq -0x8(%rbp), %rdi
callq 0x18e280
jmp 0x18e1f4
movq -0x8(%rbp), %rax
cmpq $0x0, 0x168(%rax)
je 0x18d9db
movq -0x8(%rbp), %rdi
callq 0x18e330
movq -0x8(%rbp), %rax
cmpb $0x0, 0x4c(%rax)
je 0x18d9d9
jmp 0x18e1f4
jmp 0x18d9db
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x84(%rax)
jne 0x18da0c
movq -0x50(%rbp), %rdi
leaq 0x4a3f9(%rip), %rsi     # 0x1d7df9
movl $0x5, %edx
callq 0x1715e0
jmp 0x18da50
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x18da2f
movq -0x50(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rsi
movl $0x2, %edx
callq 0x1715e0
jmp 0x18da4e
movq -0x8(%rbp), %rdi
leaq 0x4a3c7(%rip), %rsi     # 0x1d7e01
movb $0x0, %al
callq 0x15c380
movq -0x8(%rbp), %rax
movb $0x1, 0x4c(%rax)
jmp 0x18e1f4
jmp 0x18da50
movq -0x8(%rbp), %rdi
callq 0x18d880
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x18daa9
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rsi
callq 0x15c790
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x18daa7
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdx
leaq 0x4a381(%rip), %rsi     # 0x1d7e14
movb $0x0, %al
callq 0x15bfb0
movq -0x8(%rbp), %rax
movb $0x1, 0x4c(%rax)
jmp 0x18e1f4
jmp 0x18daa9
movq -0x8(%rbp), %rax
movzbl 0x78(%rax), %eax
cmpl $0x0, %eax
je 0x18dacd
movq -0x50(%rbp), %rdi
leaq 0x4a367(%rip), %rsi     # 0x1d7e28
movl $0x5, %edx
callq 0x1715e0
jmp 0x18db2e
movq -0x8(%rbp), %rax
cmpb $0x0, 0x79(%rax)
je 0x18db00
movq -0x50(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x70(%rax), %r8
movl $0x5, %esi
leaq 0x4a33b(%rip), %rdx     # 0x1d7e32
movb $0x0, %al
callq 0x171660
jmp 0x18db2c
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x18db2a
movq -0x50(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rcx
movl $0x5, %esi
leaq 0x18279(%rip), %rdx     # 0x1a5d9c
movb $0x0, %al
callq 0x171660
jmp 0x18db2c
jmp 0x18db2e
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x18db86
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $0x0, (%rax)
jle 0x18db86
movq -0x50(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl (%rax), %edx
leaq 0x12fcb(%rip), %r8      # 0x1a0b30
leaq 0x43064(%rip), %rax     # 0x1d0bd0
cmpl $0x1, %edx
cmoveq %rax, %r8
movl $0x5, %esi
leaq 0x4a2bd(%rip), %rdx     # 0x1d7e3c
movb $0x0, %al
callq 0x171660
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rdi
callq 0x172650
movq -0x68(%rbp), %rdi
movq %rax, %rdx
leaq 0x4a2aa(%rip), %rsi     # 0x1d7e4f
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
cmpl $0x1, 0x84(%rax)
jne 0x18dbc8
movq -0x8(%rbp), %rdi
callq 0x169160
movq %rax, -0x10(%rbp)
jmp 0x18dbf7
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rsi
callq 0x168de0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x18dbf5
movq -0x10(%rbp), %rax
cmpl $0x7, (%rax)
jne 0x18dbf5
movq -0x8(%rbp), %rax
movb $0x1, 0x7a(%rax)
jmp 0x18dbf7
cmpq $0x0, -0x10(%rbp)
jne 0x18dc03
jmp 0x18e1f4
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movzbl 0x78(%rax), %eax
cmpl $0x1, %eax
jne 0x18dc43
movq -0x8(%rbp), %rdi
callq 0x18e3b0
cmpl $0x0, %eax
jne 0x18dc41
movq -0x8(%rbp), %rdi
leaq 0x4a229(%rip), %rsi     # 0x1d7e5e
movb $0x0, %al
callq 0x15bfb0
jmp 0x18e1f4
jmp 0x18dc43
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x18dc5f
movq -0x8(%rbp), %rax
movzbl 0x79(%rax), %eax
cmpl $0x0, %eax
je 0x18dd03
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jl 0x18dc93
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jl 0x18dc93
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x8(%rbp), %rcx
addq 0x70(%rcx), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jle 0x18dcaa
movq -0x8(%rbp), %rdi
leaq 0x4a1ea(%rip), %rsi     # 0x1d7e88
movb $0x0, %al
callq 0x15bfb0
jmp 0x18e1f4
movq -0x8(%rbp), %rax
cmpb $0x0, 0x79(%rax)
je 0x18dcc2
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x18dcda
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
subq 0x68(%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x1691b0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
cmpq $0x0, -0x28(%rbp)
jne 0x18dd2d
movq -0x8(%rbp), %rdi
leaq -0x54(%rbp), %rsi
callq 0x18e4e0
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x18dd26
jmp 0x18e1f4
movl $0x1, -0x2c(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x18dd6e
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0x18(%rax)
jne 0x18dd57
movq -0x8(%rbp), %rdi
leaq 0x4a16e(%rip), %rsi     # 0x1d7ebc
movb $0x0, %al
callq 0x15bfb0
jmp 0x18dd69
movq -0x8(%rbp), %rdi
leaq 0x4a18a(%rip), %rsi     # 0x1d7eec
movb $0x0, %al
callq 0x15bfb0
jmp 0x18e1f4
movq -0x8(%rbp), %rax
movzbl 0xf9(%rax), %eax
cmpl $0x0, %eax
je 0x18dda0
cmpl $0x0, -0x2c(%rbp)
je 0x18dda0
movq -0x28(%rbp), %rax
cmpl $0x1, 0x34(%rax)
je 0x18dda0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x18e6a0
jmp 0x18e1f4
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x4a15d(%rip), %rsi     # 0x1d7f0f
movb $0x0, %al
callq 0x15c0c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x18de06
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $0x0, (%rax)
je 0x18de06
movq -0x28(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x18de06
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x4a128(%rip), %rsi     # 0x1d7f1a
movb $0x0, %al
callq 0x15bfb0
movq -0x8(%rbp), %rax
movb $0x1, 0x4c(%rax)
jmp 0x18e1f4
cmpl $0x0, -0x2c(%rbp)
je 0x18de48
movq -0x28(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x18de48
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
movq -0x28(%rbp), %rax
movq (%rax), %rcx
leaq 0x4a11a(%rip), %rsi     # 0x1d7f4e
movb $0x0, %al
callq 0x15bfb0
movq -0x8(%rbp), %rax
movb $0x1, 0x4c(%rax)
jmp 0x18e1f4
cmpl $0x0, -0x2c(%rbp)
je 0x18de76
movq -0x28(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x18de76
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x4a19c(%rip), %rsi     # 0x1d800b
movb $0x0, %al
callq 0x15bc10
movq -0x28(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x18de9e
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x4a1c3(%rip), %rsi     # 0x1d805a
movb $0x0, %al
callq 0x15bc10
movq -0x8(%rbp), %rax
cmpb $0x0, 0xf8(%rax)
je 0x18debc
movq -0x28(%rbp), %rax
cmpl $0x1, 0x34(%rax)
je 0x18deba
jmp 0x18e1f4
jmp 0x18debc
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
leaq 0x14647(%rip), %rsi     # 0x1a251a
movb $0x0, %al
callq 0x15b350
movq -0x8(%rbp), %rax
cmpl $0x1, 0x7c(%rax)
jne 0x18df3b
movq -0x8(%rbp), %rdi
leaq 0x4a1c3(%rip), %rsi     # 0x1d80b2
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x15cbc0
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0x18df1d
movq -0x8(%rbp), %rax
cmpq $0x0, 0x150(%rax)
jne 0x18df1b
movq -0x8(%rbp), %rax
movb $0x1, 0x89(%rax)
jmp 0x18df39
movl -0x34(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x89(%rax)
jmp 0x18df3b
movq -0x8(%rbp), %rdi
leaq 0x4a17c(%rip), %rsi     # 0x1d80c2
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x15cbc0
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
jge 0x18dfa7
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x1, 0x7c(%rcx)
movb %al, -0x69(%rbp)
jne 0x18df91
movq -0x8(%rbp), %rax
movzbl 0x89(%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x69(%rbp)
je 0x18df91
movq -0x8(%rbp), %rax
cmpq $0x0, 0x150(%rax)
setne %al
xorb $-0x1, %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0xcf(%rax)
jmp 0x18dfc3
movl -0x38(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0xcf(%rax)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x7c(%rax)
jne 0x18e057
movq -0x8(%rbp), %rdi
leaq 0x4a0f5(%rip), %rsi     # 0x1d80d1
callq 0x15cb30
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x18e032
movq -0x8(%rbp), %rax
movb $0x1, 0xdf(%rax)
movq -0x60(%rbp), %rdi
callq 0x15ccc0
movq %rax, %rdi
movq -0x8(%rbp), %rsi
addq $0xe0, %rsi
movl $0x1, %edx
callq 0x15d530
movq -0x8(%rbp), %rax
cmpb $0x0, 0xe0(%rax)
jne 0x18e030
movq -0x8(%rbp), %rax
movb $0x0, 0xdf(%rax)
jmp 0x18e055
movq -0x8(%rbp), %rdi
leaq 0x4a0a6(%rip), %rsi     # 0x1d80e3
callq 0x15cb30
cmpq $0x0, %rax
je 0x18e053
movq -0x8(%rbp), %rax
movb $0x1, 0xdf(%rax)
jmp 0x18e055
jmp 0x18e057
movq -0x8(%rbp), %rax
cmpl $0x0, 0x7c(%rax)
jne 0x18e099
movq -0x8(%rbp), %rax
cmpl $0x3e8, 0x9c(%rax)      # imm = 0x3E8
jle 0x18e099
movq -0x8(%rbp), %rax
cmpb $0x0, 0x94(%rax)
jne 0x18e099
movq -0x8(%rbp), %rax
cmpb $0x0, 0xa0(%rax)
jne 0x18e099
movq -0x8(%rbp), %rax
movl $0x3e8, 0x9c(%rax)      # imm = 0x3E8
movq -0x8(%rbp), %rdi
leaq 0xe523(%rip), %rsi      # 0x19c5c7
xorl %edx, %edx
callq 0x15cbc0
cmpl $0x0, %eax
je 0x18e0bb
movq -0x8(%rbp), %rax
movb $0x1, 0x96(%rax)
movq -0x8(%rbp), %rdi
leaq 0x4a02b(%rip), %rsi     # 0x1d80f1
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x15cbc0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jle 0x18e0e6
movq -0x8(%rbp), %rax
movb $0x1, 0x12b(%rax)
jmp 0x18e0f9
cmpl $0x0, -0x3c(%rbp)
jne 0x18e0f7
movq -0x8(%rbp), %rax
movb $0x1, 0x12c(%rax)
jmp 0x18e0f9
movq -0x8(%rbp), %rax
cmpl $0x1, 0x7c(%rax)
jne 0x18e128
movq -0x8(%rbp), %rax
movzbl 0x88(%rax), %eax
cmpl $0x0, %eax
je 0x18e128
movq -0x8(%rbp), %rdi
callq 0x15f640
cmpl $0x0, %eax
jne 0x18e126
jmp 0x18e1f4
jmp 0x18e128
movq -0x8(%rbp), %rax
cmpb $0x0, 0x94(%rax)
je 0x18e159
movq -0x8(%rbp), %rdi
leaq 0x49fb9(%rip), %rsi     # 0x1d80f9
xorl %edx, %edx
callq 0x15cbc0
cmpl $0x0, %eax
je 0x18e157
movq -0x8(%rbp), %rax
movb $0x1, 0x95(%rax)
jmp 0x18e159
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x18e18c
cmpq $0x0, -0x48(%rbp)
jne 0x18e17d
movq -0x8(%rbp), %rdi
movl $0x70, %esi
callq 0x15b780
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x0, -0x2c(%rbp)
je 0x18e19b
movl $0x1, -0x30(%rbp)
jmp 0x18e1a2
movl $0x2, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x48(%rbp), %rdx
movl -0x30(%rbp), %ecx
callq 0x15c7f0
cmpl $0x0, %eax
jne 0x18e1bd
jmp 0x18e1f4
movq -0x8(%rbp), %rax
cmpl $0x0, 0x3c(%rax)
jne 0x18e1f2
movq -0x8(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jne 0x18e1f2
movq -0x28(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x18e1f2
movq -0x8(%rbp), %rdi
leaq 0x49f1a(%rip), %rsi     # 0x1d8105
movb $0x0, %al
callq 0x15c0c0
jmp 0x18e1f4
movq -0x8(%rbp), %rax
cmpq $0x0, 0x148(%rax)
je 0x18e221
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rdi
callq 0x1676a0
movq -0x8(%rbp), %rax
movq $0x0, 0x148(%rax)
movq -0x50(%rbp), %rdi
callq 0x171750
cmpq $0x0, -0x18(%rbp)
je 0x18e23a
movq -0x18(%rbp), %rdi
callq 0x1676a0
cmpq $0x0, -0x10(%rbp)
je 0x18e24a
movq -0x10(%rbp), %rdi
callq 0x1676a0
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x15b820
movq -0x8(%rbp), %rax
movzbl 0x4c(%rax), %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
addq $0x70, %rsp
popq %rbp
retq
nop