// File: /workspace/github_c_makefile_star2_O3/TurkeyMcMac[P]ts3d/src/play-level.c
// Function: play_level
int play_level(const char *root_dir, struct save_state *save,
	const char *map_name, struct ticker *timer, struct logger *log)
{
	struct loader ldr;
	loader_init(&ldr, root_dir);
	logger_free(loader_set_logger(&ldr, log));
	struct map *map = load_map(&ldr, map_name);
	if (!map) {
		logger_printf(loader_logger(&ldr), LOGGER_ERROR,
			"Failed to load map \"%s\"\n", map_name);
		goto error_map;
	}
	if (map->prereq && !save_state_is_complete(save, map->prereq))
		goto error_map; // Map not unlocked.
	int health_meter_full_color = color_map_add_pair(
		loader_color_map(&ldr),
		pixel(HEALTH_METER_FG_COLOR, HEALTH_METER_BG_COLOR));
	int health_meter_empty_color = color_map_add_pair(
		loader_color_map(&ldr),
		pixel(HEALTH_METER_BG_COLOR, HEALTH_METER_FG_COLOR));
	struct meter health_meter = {
		.label = "HEALTH",
		.full_style = COLOR_PAIR(health_meter_full_color),
		.empty_style = COLOR_PAIR(health_meter_empty_color),
		// Position and size not initialized yet.
	};
	int reload_meter_full_color = color_map_add_pair(
		loader_color_map(&ldr),
		pixel(RELOAD_METER_FG_COLOR, RELOAD_METER_BG_COLOR));
	int reload_meter_empty_color = color_map_add_pair(
		loader_color_map(&ldr),
		pixel(RELOAD_METER_BG_COLOR, RELOAD_METER_FG_COLOR));
	struct meter reload_meter = {
		.label = "RELOAD",
		.full_style = COLOR_PAIR(reload_meter_full_color),
		.empty_style = COLOR_PAIR(reload_meter_empty_color),
		// Position and size not initialized yet.
	};
	color_map_apply(loader_color_map(&ldr));
	loader_print_summary(&ldr);
	srand(time(NULL)); // For random_start_frame
	struct ents ents;
	init_entities(&ents, map);
	d3d_board *board = map->board;
	WINDOW *dead_popup = NULL;
	WINDOW *pause_popup = NULL;
	WINDOW *quit_popup = NULL;
	d3d_camera *cam = NULL;
	struct player player;
	player_init(&player, map);
	keypad(stdscr, TRUE);
	int translation = '\0'; // No initial translation
	int turn_duration = 0; // No initial turning
	bool won = false;
	bool paused = false;
	bool quitting = false;
	bool do_redraw = true;
	struct screen_area area = { 0, 0, 1, 1 };
	clear();
	for (;;) {
		static const char dead_msg[] =
			"You died.\n"
			"Press Y to return to the menu.";
		static const char pause_msg[] =
			"Game paused.\n"
			"Press P to resume.";
		static const char quit_msg[] =
			"Are you sure you want to quit?\n"
			"Press Y to confirm or N to cancel.";
		tick(timer);
		// next_key is preserved after the input flush and put back into
		// the input buffer; only keeping one key in the buffer ensures
		// responsiveness, though keys could theoretically be dropped:
		int key = getch(), next_key = getch();
		flushinp();
		if (next_key != ERR) ungetch(next_key);
		int lowkey = key >= 0 && key <= UCHAR_MAX ? tolower(key) : key;
		bool resized = key == KEY_RESIZE || !cam;
		if (resized) {
			update_term_size();
			area.width = COLS;
			// LINES - 1 so that one is reserved for the health and
			// reload meters:
			area.height = LINES > 0 ? LINES - 1 : 0;
			d3d_free_camera(cam);
			cam = camera_with_dims(area.width, area.height);
			// Takes up the left half of the bottom:
			health_meter.x = 0;
			health_meter.y = area.height;
			health_meter.width = area.width / 2;
			health_meter.win = stdscr;
			// Takes up the right half of the bottom:
			reload_meter.x = health_meter.width;
			reload_meter.y = area.height;
			reload_meter.width = area.width - health_meter.width;
			reload_meter.win = stdscr;
			if (dead_popup) {
				delwin(dead_popup);
				dead_popup = popup_window(dead_msg);
			}
			if (pause_popup) {
				delwin(pause_popup);
				pause_popup = popup_window(pause_msg);
			}
			if (quit_popup) {
				delwin(quit_popup);
				quit_popup = popup_window(quit_msg);
			}
			do_redraw = true;
		}
		int remaining = get_remaining(&ents);
		// Player wins if all targets gone and they are not, or if they
		// won already:
		won = won || (remaining <= 0 && !player_is_dead(&player));
		bool lost = !won && player_is_dead(&player);
		if (do_redraw) {
			d3d_draw(cam, player.body.pos, player.facing, board,
				ents_num(&ents), ents_sprites(&ents));
			display_frame(cam, &area, loader_color_map(&ldr));
			health_meter.fraction = player_health_fraction(&player);
			meter_draw(&health_meter);
			reload_meter.fraction = player_reload_fraction(&player);
			meter_draw(&reload_meter);
			attron(A_BOLD);
			if (won) {
				mvaddstr(0, 0,
					"YOU WIN! Press Y to return to menu.");
			} else {
				mvprintw(0, 0, "TARGETS LEFT: %d", remaining);
			}
			attroff(A_BOLD);
			refresh();
		}
		do_redraw = resized;
		if (dead_popup) {
			// Display the death popup if possible.
			touchwin(dead_popup);
			wrefresh(dead_popup);
		} else if (!lost && quitting) {
			if (quit_popup) {
				// Display the quit popup if possible.
				touchwin(quit_popup);
				wrefresh(quit_popup);
			}
			switch (lowkey) {
			case 'y':
				goto quit;
			case 'n':
				if (quit_popup) {
					delwin(quit_popup);
					quit_popup = NULL;
					touchwin(stdscr);
					do_redraw = true;
				}
				quitting = false;
				break;
			}
			continue;
		} else if (!lost && paused) {
			if (pause_popup) {
				// Display the pause popup if possible.
				touchwin(pause_popup);
				wrefresh(pause_popup);
			}
			switch (lowkey) {
			case 'p':
				if (pause_popup) {
					delwin(pause_popup);
					pause_popup = NULL;
					touchwin(stdscr);
					do_redraw = true;
				}
				paused = false;
				break;
			case 'x':
				quit_popup = popup_window(quit_msg);
				quitting = true;
				break;
			}
			continue;
		}
		// After this point, a redraw is needed next time:
		do_redraw = true;
		if (won && lowkey == 'y') {
			// Player quits after winning.
			goto quit;
		} else if (lost) {
			// Player lost, entities still simulated. Y to quit.
			if (lowkey == 'y') goto quit;
			if (!dead_popup) dead_popup = popup_window(dead_msg);
		} else if (lowkey == 'p') {
			paused = true;
			pause_popup = popup_window(pause_msg);
			continue;
		} else if (lowkey == 'x' || key == ESC) {
			quitting = true;
			quit_popup = popup_window(quit_msg);
			continue;
		} else {
			// Otherwise, let the player be controlled.
			move_player(&player,
				&translation, &turn_duration, key);
		}
		move_ents(&ents, map, &player);
		player_collide(&player, &ents);
		hit_ents(&ents);
		// Let the player shoot. key != lowkey means the key is an
		// uppercase char. The shooting is blocked by player_try_shoot
		// if the player is dead:
		if (key != lowkey || key == ' ')
			player_try_shoot(&player, &ents);
		shoot_bullets(&ents);
		player_tick(&player);
		ents_tick(&ents);
		ents_clean_up_dead(&ents);
	}
quit:
	clear();
	refresh();
	if (pause_popup) delwin(pause_popup);
	if (quit_popup) delwin(quit_popup);
	if (dead_popup) delwin(dead_popup);
	d3d_free_camera(cam);
	// Record the player's winning:
	if (won) save_state_mark_complete(save, map_name);
	ents_destroy(&ents);
	loader_free(&ldr);
	return 0;

error_map:
	loader_free(&ldr);
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %r8, %rbx
movq %rcx, 0x138(%rsp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rsi
leaq 0x190(%rsp), %r14
movq %r14, %rdi
callq 0x68a4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6c32
movq %rax, %rdi
callq 0x6f5d
movq %r14, %rdi
movq %r15, %rsi
callq 0x7c95
testq %rax, %rax
je 0x9c1d
movq %rax, %r13
movq 0x8(%rax), %rsi
testq %rsi, %rsi
je 0x8eb5
movq %r12, %rdi
callq 0xa3c1
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testb %al, %al
je 0x9cd8
movq %r12, 0x120(%rsp)
movq %r15, 0x128(%rsp)
leaq 0x190(%rsp), %rbx
movq %rbx, %rdi
callq 0x6c25
movq %rax, %rdi
movl $0x2, %esi
callq 0xa96a
movl %eax, %ebp
movq %rbx, %rdi
callq 0x6c25
movq %rax, %rdi
movl $0x10, %esi
callq 0xa96a
leaq 0x40c9(%rip), %rcx      # 0xcfc9
movq %rcx, 0xf0(%rsp)
xorl %r15d, %r15d
movq %r15, 0xf8(%rsp)
shll $0x8, %ebp
movl $0xffff, %r14d          # imm = 0xFFFF
andl %r14d, %ebp
movl %ebp, 0x100(%rsp)
shll $0x8, %eax
andl %r14d, %eax
movl %eax, 0x104(%rsp)
movq %r15, 0x108(%rsp)
movl %r15d, 0x110(%rsp)
movq %r15, 0x118(%rsp)
movq %rbx, %rdi
callq 0x6c25
movq %rax, %rdi
movl $0x1, %esi
callq 0xa96a
movl %eax, %ebp
movq %rbx, %rdi
callq 0x6c25
movq %rax, %rdi
movl $0x8, %esi
callq 0xa96a
leaq 0x4052(%rip), %rcx      # 0xcfd0
movq %rcx, 0xc0(%rsp)
movq %r15, 0xc8(%rsp)
shll $0x8, %ebp
andl %r14d, %ebp
movl %ebp, 0xd0(%rsp)
shll $0x8, %eax
andl %r14d, %eax
movl %eax, 0xd4(%rsp)
movq %r15, 0xd8(%rsp)
movl %r15d, 0xe0(%rsp)
movq %r15, 0xe8(%rsp)
movq %rbx, %rdi
callq 0x6c25
movq %rax, %rdi
callq 0xa99b
movq %rbx, %rdi
callq 0x6bad
xorl %edi, %edi
callq 0x2540
movl %eax, %edi
callq 0x23b0
movq 0x28(%r13), %rsi
addq %rsi, %rsi
leaq 0x50(%rsp), %rdi
callq 0x4820
cmpq %r15, 0x28(%r13)
je 0x904c
xorl %r14d, %r14d
leaq 0x50(%rsp), %rbx
xorl %r15d, %r15d
movq 0x30(%r13), %rax
leaq (%rax,%r14), %rcx
movq 0x10(%rax,%r14), %rsi
movl 0x18(%rax,%r14), %edx
movq %rbx, %rdi
callq 0x4897
movq 0x30(%r13), %rcx
xorl %ebp, %ebp
cmpl $0x4, 0x18(%rcx,%r14)
sete %bpl
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4b6c
movl %ebp, (%rax)
incq %r15
addq $0x28, %r14
cmpq 0x28(%r13), %r15
jb 0x9008
movq 0x10(%r13), %rax
movq %rax, 0x130(%rsp)
leaq 0x140(%rsp), %rdi
movq %r13, 0x88(%rsp)
movq %r13, %rsi
callq 0x9cfc
movq 0x7f61(%rip), %rbx      # 0x10fd8
movq (%rbx), %rdi
movl $0x1, %esi
callq 0x2140
movupd 0x30e4(%rip), %xmm0     # 0xc170
leaq 0xa0(%rsp), %rax
movapd %xmm0, (%rax)
movq (%rbx), %rdi
callq 0x2070
movb $0x1, %cl
movl $0x0, 0x14(%rsp)
movl $0x0, 0xc(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x38(%rsp)
movl $0x0, 0x10(%rsp)
movq $0x0, 0x80(%rsp)
xorl %r13d, %r13d
xorl %r15d, %r15d
xorl %ebp, %ebp
movb %cl, 0x30(%rsp)
movq 0x138(%rsp), %rdi
callq 0xa8e6
movq 0x7ee0(%rip), %rbx      # 0x10fd8
movq (%rbx), %rdi
callq 0x24f0
movl %eax, %r12d
movq (%rbx), %rdi
callq 0x24f0
movl %eax, %r14d
callq 0x2450
cmpl $-0x1, %r14d
je 0x9121
movl %r14d, %edi
callq 0x2270
movl %r12d, 0x2c(%rsp)
cmpl $0xff, %r12d
ja 0x913b
movl %r12d, %edi
callq 0x2390
movl %eax, 0x2c(%rsp)
cmpl $0x19a, %r12d           # imm = 0x19A
sete %al
movq 0x80(%rsp), %rbx
testq %rbx, %rbx
sete %cl
orb %al, %cl
cmpb $0x1, %cl
movl %r12d, 0x4c(%rsp)
movb %cl, 0xb(%rsp)
jne 0x923b
callq 0xada6
movq 0x7e55(%rip), %rax      # 0x10fc8
movl (%rax), %eax
movl %eax, 0xa8(%rsp)
movq 0x7e1d(%rip), %rax      # 0x10fa0
movl (%rax), %eax
leal -0x1(%rax), %ecx
testl %eax, %eax
movl $0x0, %eax
cmovlel %eax, %ecx
movl %ecx, 0xac(%rsp)
movq %rbx, %rdi
callq 0x28e4
movl 0xa8(%rsp), %edi
movl 0xac(%rsp), %esi
callq 0xad43
movq %rax, 0x80(%rsp)
movl $0x0, 0x108(%rsp)
movl 0xa8(%rsp), %eax
movl 0xac(%rsp), %ecx
movl %ecx, 0x10c(%rsp)
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
movl %edx, 0x110(%rsp)
movq 0x7de5(%rip), %rsi      # 0x10fd8
movq (%rsi), %rsi
movq %rsi, 0x118(%rsp)
movl %edx, 0xd8(%rsp)
movl %ecx, 0xdc(%rsp)
subl %edx, %eax
movl %eax, 0xe0(%rsp)
movq %rsi, 0xe8(%rsp)
testq %rbp, %rbp
je 0x924e
movq %rbp, %rdi
callq 0x2250
leaq 0x3ddf(%rip), %rdi      # 0xd010
callq 0xab4e
movq %rax, %r14
jmp 0x9251
movq %r13, %r12
movq %rbp, %r14
movq 0x7d90(%rip), %rbx      # 0x10fd8
movl 0x10(%rsp), %ebp
jmp 0x92a3
xorl %r14d, %r14d
movl 0x10(%rsp), %ebp
testq %r15, %r15
movq 0x7d79(%rip), %rbx      # 0x10fd8
je 0x927a
movq %r15, %rdi
callq 0x2250
leaq 0x3dd0(%rip), %rdi      # 0xd040
callq 0xab4e
movq %rax, %r15
jmp 0x927d
xorl %r15d, %r15d
movb $0x1, 0x30(%rsp)
testq %r13, %r13
je 0x92a0
movq %r13, %rdi
callq 0x2250
leaq 0x3dca(%rip), %rdi      # 0xd060
callq 0xab4e
movq %rax, %r12
jmp 0x92a3
xorl %r12d, %r12d
movq %r15, 0x20(%rsp)
cmpq $0x0, 0x60(%rsp)
movq %r14, 0x40(%rsp)
je 0x92eb
xorl %r14d, %r14d
xorl %r13d, %r13d
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x4b6c
addl (%rax), %r13d
incq %r14
cmpq 0x60(%rsp), %r14
jb 0x92c0
testb $0x1, %bpl
je 0x92f6
movb $0x1, %bpl
xorl %r15d, %r15d
movq 0x40(%rsp), %r14
jmp 0x932b
xorl %r13d, %r13d
testb $0x1, %bpl
je 0x9300
jmp 0x9325
testl %r13d, %r13d
movq 0x40(%rsp), %r14
jg 0x9311
leaq 0x140(%rsp), %rdi
callq 0x9e88
testb %al, %al
je 0x9325
leaq 0x140(%rsp), %rdi
callq 0x9e88
movl %eax, %r15d
xorl %ebp, %ebp
jmp 0x932b
movb $0x1, %bpl
xorl %r15d, %r15d
movb 0x30(%rsp), %al
testb $0x1, %al
movq %r12, 0xb8(%rsp)
je 0x947a
movsd 0x170(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movl %ebp, %r12d
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
callq 0x4865
movq %rax, %r14
movq %rbp, %rdi
callq 0x486a
movsd 0x140(%rsp), %xmm0
movsd 0x148(%rsp), %xmm1
movq 0x80(%rsp), %rbp
movq %rbp, %rdi
movsd 0x30(%rsp), %xmm2
movq 0x130(%rsp), %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0x2aa6
leaq 0x190(%rsp), %rdi
callq 0x6c25
movq %rbp, %rdi
movl %r12d, %ebp
leaq 0xa0(%rsp), %rsi
movq %rax, %rdx
callq 0xac72
leaq 0x140(%rsp), %r14
movq %r14, %rdi
callq 0x9d8d
movsd %xmm0, 0xf8(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0xaa17
movq %r14, %rdi
callq 0x9dae
movsd %xmm0, 0xc8(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0xaa17
movq (%rbx), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %edx, %edx
callq 0x2430
testb %bpl, %bpl
je 0x9441
movq (%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2310
cmpl $-0x1, %eax
je 0x9456
movq (%rbx), %rdi
leaq 0x3ba2(%rip), %rsi      # 0xcfd7
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2370
jmp 0x9456
xorl %edi, %edi
xorl %esi, %esi
leaq 0x3baf(%rip), %rdx      # 0xcffb
movl %r13d, %ecx
xorl %eax, %eax
callq 0x21e0
movq (%rbx), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %edx, %edx
callq 0x20e0
movq (%rbx), %rdi
callq 0x2220
movq 0xb8(%rsp), %r12
movq 0x40(%rsp), %r14
testq %r14, %r14
movl %ebp, 0x10(%rsp)
je 0x94d2
movswl 0x4(%r14), %edx
incl %edx
movq %r14, %rdi
xorl %esi, %esi
movl $0x1, %ecx
callq 0x24a0
movq %r14, %rdi
callq 0x2220
movl 0x2c(%rsp), %r13d
cmpl $0x79, %r13d
sete %al
testb %al, %bpl
movq 0x88(%rsp), %rbx
jne 0x9c4d
testb %r15b, %r15b
je 0x99aa
cmpl $0x79, %r13d
jne 0x9503
jmp 0x9c53
testb %r15b, %r15b
movq 0x88(%rsp), %rbx
movl 0x2c(%rsp), %r13d
je 0x98a3
cmpl $0x79, %r13d
je 0x9c53
leaq 0x3b17(%rip), %rdi      # 0xd010
callq 0xab4e
movq %rax, 0x40(%rsp)
leaq 0x50(%rsp), %r12
movsd 0x150(%rsp), %xmm0
movq %rbx, %rdi
leaq 0x140(%rsp), %rsi
callq 0x775c
cmpq $0x0, 0x60(%rsp)
je 0x96b0
xorl %r15d, %r15d
movq %r12, %rdi
movq %r15, %rsi
callq 0x4b04
movq %rax, %r14
movq %r12, %rdi
movq %r15, %rsi
callq 0x4ad2
movq %rax, %rbp
movq %r12, %rdi
movq %r15, %rsi
callq 0x4af8
movq %rax, %r13
movupd (%rax), %xmm0
movupd (%rbp), %xmm1
addpd %xmm0, %xmm1
movupd %xmm1, (%rbp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x90(%rsp)
movl 0x44(%r14), %ebx
callq 0x2490
cmpl %eax, %ebx
jbe 0x95b8
movupd (%rbp), %xmm0
subpd 0x140(%rsp), %xmm0
movapd %xmm0, 0x90(%rsp)
movsd 0x50(%r14), %xmm0
xorpd 0x2ad5(%rip), %xmm0     # 0xc080
leaq 0x90(%rsp), %rdi
callq 0xb038
movupd (%rbp), %xmm0
movapd %xmm0, 0x70(%rsp)
cmpb $0x1, 0x59(%r14)
jne 0x9617
movq %r12, %rdi
movq %r15, %rsi
callq 0x4ae5
movsd 0x10(%rax), %xmm0
movq 0x88(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x775c
movsd 0x70(%rsp), %xmm0
ucomisd (%rbp), %xmm0
jne 0x960a
jp 0x960a
movsd 0x78(%rsp), %xmm0
ucomisd 0x8(%rbp), %xmm0
jne 0x960a
jnp 0x966c
movq %r12, %rdi
movq %r15, %rsi
callq 0x4b57
jmp 0x966c
cmpb $0x1, 0x58(%r14)
jne 0x966c
movq %r12, %rdi
movq %r15, %rsi
callq 0x4ae5
movsd 0x10(%rax), %xmm0
movq 0x88(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x775c
movapd 0x70(%rsp), %xmm0
movupd (%rbp), %xmm1
subpd %xmm1, %xmm0
addpd 0x90(%rsp), %xmm0
movapd %xmm0, 0x90(%rsp)
movapd 0x70(%rsp), %xmm0
movupd %xmm0, (%rbp)
movsd 0x90(%rsp), %xmm0
ucomisd 0x391b(%rip), %xmm0     # 0xcf98
jne 0x9681
jnp 0x9687
movsd %xmm0, (%r13)
movsd 0x98(%rsp), %xmm0
ucomisd 0x3900(%rip), %xmm0     # 0xcf98
jne 0x969c
jnp 0x96a2
movsd %xmm0, 0x8(%r13)
incq %r15
cmpq 0x60(%rsp), %r15
jb 0x9530
leaq 0x140(%rsp), %rdi
movq %r12, %rsi
callq 0x9f56
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x9763
xorl %ebx, %ebx
movq %rbx, %r15
incq %rbx
cmpq %rax, %rbx
jae 0x9758
movq %rbx, %r13
movq %r12, %rdi
movq %r15, %rsi
callq 0x4b15
movl %eax, %ebp
movq %r12, %rdi
movq %r13, %rsi
callq 0x4b15
movl %eax, %r14d
movl %ebp, %edi
movl %eax, %esi
callq 0xa8a4
testb %al, %al
je 0x974b
movq %r12, %rdi
movq %r15, %rsi
callq 0x4ae5
movq %rax, %r12
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x4ae5
movq %r12, %rdi
leaq 0x50(%rsp), %r12
movq %rax, %rsi
callq 0x266c
testb %al, %al
je 0x974b
cmpl $0x3, %ebp
setne %al
cmpl $0x3, %r14d
setne %cl
testb %cl, %al
jne 0x974b
callq 0x2170
incq %r13
movq 0x60(%rsp), %rax
cmpq %rax, %r13
jb 0x96de
cmpq %rax, %rbx
jb 0x96d0
jmp 0x9765
xorl %eax, %eax
movl 0x4c(%rsp), %edx
cmpl 0x2c(%rsp), %edx
sete %cl
cmpl $0x20, %edx
setne %dl
testb %cl, %dl
jne 0x978f
leaq 0x140(%rsp), %rdi
movq %r12, %rsi
callq 0x9e95
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x986d
xorl %r14d, %r14d
movq %r12, %rdi
movq %r14, %rsi
callq 0x4b04
cmpq $0x0, 0x30(%rax)
je 0x985f
movq %rax, %r15
movl 0x48(%rax), %ebx
callq 0x2490
cmpl %eax, %ebx
jbe 0x985f
movq %r12, %rdi
movq %r14, %rsi
callq 0x4ad2
movups (%rax), %xmm0
movaps %xmm0, 0x90(%rsp)
movq 0x30(%r15), %r15
movq %r12, %rdi
movq %r14, %rsi
callq 0x4b15
movq %r12, %rdi
movq %r15, %rsi
movl %eax, %edx
leaq 0x90(%rsp), %rcx
callq 0x4897
movq %rax, %r15
movq %r12, %rdi
movq %rax, %rsi
callq 0x4af8
movq %rax, %r12
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x4af8
movups (%rax), %xmm0
movups %xmm0, (%r12)
movups (%rax), %xmm0
movaps %xmm0, 0x70(%rsp)
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x4b04
movsd 0x50(%rax), %xmm0
leaq 0x70(%rsp), %rdi
callq 0xb038
movupd (%r12), %xmm0
addpd 0x70(%rsp), %xmm0
movupd %xmm0, (%r12)
leaq 0x50(%rsp), %r12
incq %r14
cmpq 0x60(%rsp), %r14
jb 0x979b
leaq 0x140(%rsp), %rdi
callq 0x9dd3
movq %r12, %rdi
callq 0x49e3
movq %r12, %rdi
callq 0x4b7f
movb $0x1, %cl
movq 0xb8(%rsp), %r13
movq 0x20(%rsp), %r15
movq 0x40(%rsp), %rbp
jmp 0x90e0
testb $0x1, 0x18(%rsp)
movq 0x20(%rsp), %r15
je 0x9904
testq %r12, %r12
je 0x98d3
movswl 0x4(%r12), %edx
incl %edx
movq %r12, %rdi
xorl %esi, %esi
movl $0x1, %ecx
callq 0x24a0
movq %r12, %rdi
callq 0x2220
cmpl $0x6e, %r13d
movb 0xb(%rsp), %cl
je 0x9a7c
movb $0x1, %al
movq %rax, 0x18(%rsp)
movl %r13d, %eax
movq %r12, %r13
movq %r15, %r14
movl $0x0, %ebp
cmpl $0x79, %eax
jne 0x90e0
jmp 0x9c58
testb $0x1, 0x38(%rsp)
je 0x999a
testq %r15, %r15
je 0x9932
movswl 0x4(%r15), %edx
incl %edx
movq %r15, %rdi
xorl %esi, %esi
movl $0x1, %ecx
callq 0x24a0
movq %r15, %rdi
callq 0x2220
cmpl $0x78, %r13d
movb 0xb(%rsp), %bl
je 0x9b87
movb $0x1, %al
movq %rax, 0x38(%rsp)
movq $0x0, 0x18(%rsp)
movl %ebx, %ecx
movl %r13d, %eax
movq %r12, %r13
movl $0x0, %ebp
cmpl $0x70, %eax
jne 0x90e0
movq %r15, %rdi
movq $0x0, 0x18(%rsp)
movl %ebx, %ecx
movl $0x0, %eax
movq %rax, 0x38(%rsp)
movq %r12, %r13
movl $0x0, %r15d
movl $0x0, %ebp
testq %rdi, %rdi
jne 0x9bd4
jmp 0x90e0
cmpl $0x79, %r13d
sete %al
testb %al, %bpl
jne 0x9c4d
cmpl $0x70, %r13d
jne 0x99d3
leaq 0x3689(%rip), %rdi      # 0xd040
callq 0xab4e
movq %rax, %r15
movb $0x1, %cl
movb $0x1, %al
movq %rax, 0x38(%rsp)
movq %r12, %r13
movq %r14, %rbp
jmp 0x90e0
cmpl $0x78, %r13d
sete %al
movl 0x4c(%rsp), %edi
cmpl $0x1b, %edi
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x9a10
leaq 0x366e(%rip), %rdi      # 0xd060
callq 0xab4e
movq %rax, %r13
movb $0x1, %cl
movb $0x1, %al
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %r15
movq %r14, %rbp
jmp 0x90e0
cmpl $0xff, %edi
ja 0x9a4d
callq 0x2390
movl %eax, %r15d
leal -0x61(%r15), %eax
cmpl $0x16, %eax
ja 0x9a4d
movl $0x440009, %ecx         # imm = 0x440009
btl %eax, %ecx
leaq 0x50(%rsp), %r12
jae 0x9ab7
cmpl %r15d, 0x14(%rsp)
movl $0x0, %ecx
movl 0xc(%rsp), %eax
jne 0x9a5d
jmp 0x9b03
movl 0x14(%rsp), %eax
movl %eax, %r15d
leaq 0x50(%rsp), %r12
movl 0xc(%rsp), %eax
cmpl $0x72, %r15d
jg 0x9a9e
cmpl $0x61, %r15d
je 0x9adc
cmpl $0x64, %r15d
jne 0x9ad7
movl %eax, %r14d
movsd 0x350e(%rip), %xmm0     # 0xcf88
jmp 0x9af0
movq $0x0, 0x18(%rsp)
movl $0x0, %r13d
movl $0x0, %ebp
testq %r12, %r12
jne 0x9b68
jmp 0x90e0
cmpl $0x77, %r15d
je 0x9ae9
cmpl $0x73, %r15d
jne 0x9ad7
movl %eax, %r14d
movsd 0x265b(%rip), %xmm0     # 0xc110
jmp 0x9af0
cmpl $0x4, %eax
movl 0x14(%rsp), %ecx
je 0x9b53
cmpl $0x10, %eax
jne 0x9b60
movl $0x5, %eax
jmp 0x9b58
movl %r15d, %ecx
jmp 0x9b03
movl %eax, %r14d
movsd 0x34a9(%rip), %xmm0     # 0xcf90
jmp 0x9af0
movl %eax, %r14d
xorpd %xmm0, %xmm0
leaq 0x140(%rsp), %rdi
callq 0x9dff
movl %r15d, %ecx
movl %r14d, %eax
testl %eax, %eax
movl %ecx, 0x14(%rsp)
jle 0x9b2a
movl %eax, 0xc(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x9e68
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addl %eax, 0xc(%rsp)
jmp 0x9508
testl %eax, %eax
js 0x9b3b
movl $0x0, 0xc(%rsp)
jmp 0x9508
movl %eax, 0xc(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x9e78
movl $0x1, %eax
jmp 0x9b21
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
movl %ecx, %r15d
jmp 0x9a5d
movl %ecx, %r15d
jmp 0x9a59
movq %r12, %rdi
callq 0x2250
movq 0x7461(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x9bab
movswl 0x4(%rdi), %edx
incl %edx
jmp 0x9bb0
leaq 0x34d2(%rip), %rdi      # 0xd060
callq 0xab4e
movq %rax, %r13
movb $0x1, %al
movq %rax, 0x18(%rsp)
movl %ebx, %ecx
movb $0x1, %al
movq %rax, 0x38(%rsp)
jmp 0x90de
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq 0x20(%rsp), %r15
movq $0x0, 0x18(%rsp)
xorl %esi, %esi
movl $0x1, %ecx
callq 0x24a0
movb $0x1, %cl
xorl %r13d, %r13d
jmp 0x90de
callq 0x2250
movq 0x73f8(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x9bf0
movswl 0x4(%rdi), %edx
incl %edx
jmp 0x9bf5
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq $0x0, 0x18(%rsp)
xorl %esi, %esi
movl $0x1, %ecx
callq 0x24a0
movb $0x1, %cl
movq $0x0, 0x38(%rsp)
movq %r12, %r13
jmp 0x90db
leaq 0x190(%rsp), %rdi
callq 0x6c2a
leaq 0x337f(%rip), %rdx      # 0xcfb0
movq %rax, %rdi
movl $0x4, %esi
movq %r15, %rcx
xorl %eax, %eax
callq 0x6e50
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x9cd8
movb $0x1, %al
movl %eax, 0x10(%rsp)
movq 0x20(%rsp), %r14
movq 0x7379(%rip), %rbx      # 0x10fd8
movq (%rbx), %rdi
callq 0x2070
movq (%rbx), %rdi
callq 0x2220
testq %r14, %r14
je 0x9c7c
movq %r14, %rdi
callq 0x2250
testq %r12, %r12
movq 0x128(%rsp), %rbx
movq 0x120(%rsp), %r14
movq 0x80(%rsp), %r15
movl 0x10(%rsp), %ebp
je 0x9ca5
movq %r12, %rdi
callq 0x2250
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x9cb4
callq 0x2250
movq %r15, %rdi
callq 0x28e4
testb %bpl, %bpl
je 0x9ccc
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa387
leaq 0x50(%rsp), %rdi
callq 0x4c13
xorl %ebx, %ebx
leaq 0x190(%rsp), %rdi
callq 0x6c41
movl %ebx, %eax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)