// File: /workspace/github_c_makefile_star2_O1/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 0x68d4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6c62
movq %rax, %rdi
callq 0x6fa4
movq %r14, %rdi
movq %r15, %rsi
callq 0x7ce9
testq %rax, %rax
je 0x9d0d
movq %rax, 0xb0(%rsp)
movq 0x8(%rax), %rsi
testq %rsi, %rsi
je 0x8f82
movq %r12, %rdi
callq 0xa4b3
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testb %al, %al
je 0x9daf
movq %r12, 0x118(%rsp)
movq %r15, 0x120(%rsp)
leaq 0x190(%rsp), %rbx
movq %rbx, %rdi
callq 0x6c55
movq %rax, %rdi
movl $0x2, %esi
callq 0xaa82
movl %eax, %ebp
movq %rbx, %rdi
callq 0x6c55
movq %rax, %rdi
movl $0x10, %esi
callq 0xaa82
leaq 0x403e(%rip), %rcx      # 0xd00b
movq %rcx, 0xe8(%rsp)
xorl %r15d, %r15d
movq %r15, 0xf0(%rsp)
shll $0x8, %ebp
movl $0xffff, %r14d          # imm = 0xFFFF
andl %r14d, %ebp
movl %ebp, 0xf8(%rsp)
shll $0x8, %eax
andl %r14d, %eax
movl %eax, 0xfc(%rsp)
movq %r15, 0x100(%rsp)
movl %r15d, 0x108(%rsp)
movq %r15, 0x110(%rsp)
movq %rbx, %rdi
callq 0x6c55
movq %rax, %rdi
movl $0x1, %esi
callq 0xaa82
movl %eax, %ebp
movq %rbx, %rdi
callq 0x6c55
movq %rax, %rdi
movl $0x8, %esi
callq 0xaa82
leaq 0x3fc7(%rip), %rcx      # 0xd012
movq %rcx, 0xb8(%rsp)
movq %r15, 0xc0(%rsp)
shll $0x8, %ebp
andl %r14d, %ebp
movl %ebp, 0xc8(%rsp)
shll $0x8, %eax
andl %r14d, %eax
movl %eax, 0xcc(%rsp)
movq %r15, 0xd0(%rsp)
movl %r15d, 0xd8(%rsp)
movq %r15, 0xe0(%rsp)
movq %rbx, %rdi
callq 0x6c55
movq %rax, %rdi
callq 0xaab4
movq %rbx, %rdi
callq 0x6bdd
xorl %edi, %edi
callq 0x2540
movl %eax, %edi
callq 0x23b0
movq 0xb0(%rsp), %r12
movq 0x28(%r12), %rsi
addq %rsi, %rsi
leaq 0x78(%rsp), %rdi
callq 0x47f2
cmpq %r15, 0x28(%r12)
je 0x9126
xorl %r14d, %r14d
leaq 0x78(%rsp), %rbx
xorl %r15d, %r15d
movq 0x30(%r12), %rax
leaq (%rax,%r14), %rcx
movq 0x10(%rax,%r14), %rsi
movl 0x18(%rax,%r14), %edx
movq %rbx, %rdi
callq 0x4869
movq 0x30(%r12), %rcx
xorl %ebp, %ebp
cmpl $0x4, 0x18(%rcx,%r14)
sete %bpl
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4b48
movl %ebp, (%rax)
incq %r15
addq $0x28, %r14
cmpq 0x28(%r12), %r15
jb 0x90df
movq 0x10(%r12), %rax
movq %rax, 0x128(%rsp)
leaq 0x140(%rsp), %rdi
movq %r12, %rsi
callq 0x9dd0
movq 0x7e8e(%rip), %r14      # 0x10fd8
movq (%r14), %rdi
movl $0x1, %esi
callq 0x2140
movupd 0x2fa1(%rip), %xmm0     # 0xc100
leaq 0xa0(%rsp), %rax
movapd %xmm0, (%rax)
movq (%r14), %rdi
callq 0x2070
movb $0x1, %bpl
leaq 0x78(%rsp), %r15
movl $0x4, %eax
movl %eax, %eax
movq %rax, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movl $0x0, 0x10(%rsp)
movq $0x0, 0x68(%rsp)
movq $0x0, 0x98(%rsp)
movl $0x0, 0x14(%rsp)
xorl %r12d, %r12d
movq $0x0, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, (%rsp)
movq 0x138(%rsp), %rdi
callq 0xa9fe
movq (%r14), %rdi
callq 0x24f0
movl %eax, %r13d
movq (%r14), %rdi
callq 0x24f0
movl %eax, %ebx
callq 0x2450
cmpl $-0x1, %ebx
je 0x9204
movl %ebx, %edi
callq 0x2270
movl %r13d, %eax
cmpl $0xff, %r13d
ja 0x9218
movl %r13d, %edi
callq 0x2390
movl %eax, 0x24(%rsp)
movl %r13d, 0x74(%rsp)
cmpl $0x19a, %r13d           # imm = 0x19A
sete %al
testq %r12, %r12
sete %r13b
orb %al, %r13b
cmpb $0x1, %r13b
jne 0x935d
callq 0xaebc
movq 0x7d7d(%rip), %rax      # 0x10fc8
movl (%rax), %eax
movl %eax, 0xa8(%rsp)
movq 0x7d45(%rip), %rax      # 0x10fa0
movl (%rax), %eax
leal -0x1(%rax), %ecx
testl %eax, %eax
movl $0x0, %eax
cmovlel %eax, %ecx
movl %ecx, 0xac(%rsp)
movq %r12, %rdi
callq 0x28fb
movl 0xa8(%rsp), %edi
movl 0xac(%rsp), %esi
callq 0xae59
movq %rax, %r12
movl $0x0, 0x100(%rsp)
movl 0xa8(%rsp), %eax
movl 0xac(%rsp), %ecx
movl %ecx, 0x104(%rsp)
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
movl %edx, 0x108(%rsp)
movq (%r14), %rsi
movq %rsi, 0x110(%rsp)
movl %edx, 0xd0(%rsp)
movl %ecx, 0xd4(%rsp)
subl %edx, %eax
movl %eax, 0xd8(%rsp)
movq %rsi, 0xe0(%rsp)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x9305
callq 0x2250
leaq 0x3c62(%rip), %rdi      # 0xcf60
callq 0xac64
jmp 0x9307
xorl %eax, %eax
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
movq %rax, (%rsp)
je 0x9328
callq 0x2250
leaq 0x3c6f(%rip), %rdi      # 0xcf90
callq 0xac64
jmp 0x932a
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x9354
callq 0x2250
leaq 0x3c68(%rip), %rdi      # 0xcfb0
callq 0xac64
movq %rax, 0x8(%rsp)
jmp 0x935d
movq $0x0, 0x8(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0x9389
xorl %r14d, %r14d
xorl %ebx, %ebx
movq %r15, %rdi
movq %r14, %rsi
callq 0x4b48
addl (%rax), %ebx
incq %r14
cmpq 0x88(%rsp), %r14
jb 0x936d
jmp 0x938b
xorl %ebx, %ebx
testb $0x1, 0x14(%rsp)
movb $0x1, %al
movq 0x7c3f(%rip), %r14      # 0x10fd8
jne 0x93b2
testl %ebx, %ebx
jle 0x93a3
xorl %eax, %eax
jmp 0x93b2
leaq 0x140(%rsp), %rdi
callq 0x9f69
xorb $0x1, %al
movq %r12, 0x28(%rsp)
movl %eax, 0x14(%rsp)
testb %al, %al
je 0x93c4
xorl %r12d, %r12d
jmp 0x93d4
leaq 0x140(%rsp), %rdi
callq 0x9f69
movl %eax, %r12d
testb $0x1, %bpl
movq (%rsp), %rbp
je 0x9515
movsd 0x170(%rsp), %xmm0
movsd %xmm0, 0x130(%rsp)
movq %r15, %rdi
callq 0x4837
movq %rax, %r14
movq %r15, %rdi
callq 0x483c
movsd 0x140(%rsp), %xmm0
movsd 0x148(%rsp), %xmm1
movq 0x28(%rsp), %r15
movq %r15, %rdi
movsd 0x130(%rsp), %xmm2
movq 0x128(%rsp), %rsi
movq %r14, %rdx
movq 0x7b9c(%rip), %r14      # 0x10fd8
movq %rax, %rcx
callq 0x2a2e
leaq 0x190(%rsp), %rdi
callq 0x6c55
movq %r15, %rdi
leaq 0xa0(%rsp), %rsi
movq %rax, %rdx
callq 0xad88
leaq 0x140(%rsp), %r15
movq %r15, %rdi
callq 0x9e71
movsd %xmm0, 0xf0(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0xab30
movq %r15, %rdi
callq 0x9e92
movsd %xmm0, 0xc0(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0xab30
movq (%r14), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %edx, %edx
callq 0x2430
cmpb $0x0, 0x14(%rsp)
je 0x94e5
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2310
cmpl $-0x1, %eax
je 0x94f9
movq (%r14), %rdi
leaq 0x3b40(%rip), %rsi      # 0xd019
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2370
jmp 0x94f9
xorl %edi, %edi
xorl %esi, %esi
leaq 0x3b4d(%rip), %rdx      # 0xd03d
movl %ebx, %ecx
xorl %eax, %eax
callq 0x21e0
movq (%r14), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %edx, %edx
callq 0x20e0
movq (%r14), %rdi
callq 0x2220
leaq 0x78(%rsp), %r15
testq %rbp, %rbp
je 0x9539
movswl 0x4(%rbp), %edx
incl %edx
movq %rbp, %rdi
xorl %esi, %esi
movl $0x1, %ecx
callq 0x24a0
movq %rbp, %rdi
callq 0x2220
jmp 0x9542
testb %r12b, %r12b
je 0x95da
movl 0x24(%rsp), %edx
cmpl $0x79, %edx
sete %cl
movl $0x6, %eax
movb $0x1, %r13b
testb %cl, 0x14(%rsp)
je 0x9564
movq 0x28(%rsp), %r12
jmp 0x9bf2
testb %r12b, %r12b
je 0x9595
cmpl $0x79, %edx
movq 0x28(%rsp), %r12
je 0x9bf2
testq %rbp, %rbp
jne 0x9820
leaq 0x39d9(%rip), %rdi      # 0xcf60
callq 0xac64
movq %rax, (%rsp)
jmp 0x9820
cmpl $0x70, %edx
movq 0x28(%rsp), %r12
movl 0x74(%rsp), %edi
jne 0x9650
leaq 0x39e2(%rip), %rdi      # 0xcf90
callq 0xac64
movq %rax, 0x18(%rsp)
movb $0x1, %bpl
movq 0x38(%rsp), %rax
leaq 0x3979(%rip), %rcx      # 0xcf40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movb $0x1, %cl
movq %rcx, 0x98(%rsp)
jmpq *%rax
testb $0x1, 0x68(%rsp)
je 0x9697
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x9610
movswl 0x4(%rdi), %edx
incl %edx
xorl %esi, %esi
movl $0x1, %ecx
callq 0x24a0
movq 0x8(%rsp), %rdi
callq 0x2220
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %eax
cmpl $0x79, %eax
movq 0x28(%rsp), %r12
je 0x9757
cmpl $0x6e, %eax
jne 0x975e
testq %rdi, %rdi
je 0x97b3
callq 0x2250
movq (%r14), %rdi
testq %rdi, %rdi
je 0x9c5b
movswl 0x4(%rdi), %edx
incl %edx
jmp 0x9c60
cmpl $0x78, %edx
sete %al
cmpl $0x1b, %edi
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x971e
leaq 0x3942(%rip), %rdi      # 0xcfb0
callq 0xac64
movq %rax, 0x8(%rsp)
movb $0x1, %bpl
movq 0x38(%rsp), %rax
leaq 0x38b9(%rip), %rcx      # 0xcf40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movb $0x1, %cl
movq %rcx, 0x68(%rsp)
jmpq *%rax
testb %r12b, %r12b
jne 0x9542
testb $0x1, 0x98(%rsp)
je 0x9542
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
movq 0x28(%rsp), %r12
je 0x96de
movswl 0x4(%rdi), %edx
incl %edx
xorl %esi, %esi
movl $0x1, %ecx
callq 0x24a0
movq 0x18(%rsp), %rdi
callq 0x2220
movq 0x18(%rsp), %rdi
movl 0x24(%rsp), %ecx
cmpl $0x78, %ecx
je 0x9c23
movl $0x4, %eax
cmpl $0x70, %ecx
jne 0x97ca
testq %rdi, %rdi
je 0x9ca8
callq 0x2250
movq (%r14), %rdi
testq %rdi, %rdi
je 0x9cc2
movswl 0x4(%rdi), %edx
incl %edx
jmp 0x9cc7
cmpl $0xff, %edi
ja 0x977e
callq 0x2390
leal -0x61(%rax), %ecx
cmpl $0x16, %ecx
movl 0x34(%rsp), %ebx
movl 0x10(%rsp), %ebp
ja 0x9786
movl $0x440009, %edx         # imm = 0x440009
btl %ecx, %edx
jae 0x9c07
cmpl %eax, %ebx
movl $0x0, %ecx
cmovel %ecx, %eax
movl %eax, %ebx
jmp 0x9786
movl $0x6, %eax
jmp 0x97ca
movq 0x38(%rsp), %rax
leaq 0x37d6(%rip), %rcx      # 0xcf40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movl %r13d, %ebp
movq $0x0, (%rsp)
jmpq *%rax
movl 0x34(%rsp), %ebx
movl 0x10(%rsp), %ebp
cmpl $0x72, %ebx
jg 0x979f
cmpl $0x61, %ebx
je 0x97d7
cmpl $0x64, %ebx
jne 0x97f2
movsd 0x377b(%rip), %xmm0     # 0xcf18
jmp 0x97e5
cmpl $0x77, %ebx
je 0x97e1
cmpl $0x73, %ebx
jne 0x97f2
movsd 0x2897(%rip), %xmm0     # 0xc048
jmp 0x97e5
movl $0x4, %eax
movq $0x0, 0x68(%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
jmp 0x9bf2
movsd 0x3741(%rip), %xmm0     # 0xcf20
jmp 0x97e5
xorpd %xmm0, %xmm0
leaq 0x140(%rsp), %rdi
callq 0x9ee0
testl %ebp, %ebp
movl %ebx, 0x34(%rsp)
jle 0x980b
leaq 0x140(%rsp), %rdi
callq 0x9f49
decl %ebp
jmp 0x981c
jns 0x981c
leaq 0x140(%rsp), %rdi
callq 0x9f59
incl %ebp
movl %ebp, 0x10(%rsp)
movsd 0x150(%rsp), %xmm0
movq 0xb0(%rsp), %r13
movq %r13, %rdi
leaq 0x140(%rsp), %rsi
callq 0x77b0
cmpq $0x0, 0x88(%rsp)
je 0x99f3
xorl %r12d, %r12d
movq %r15, %rdi
movq %r12, %rsi
callq 0x4ae0
movq %rax, %rbp
movq %r15, %rdi
movq %r12, %rsi
callq 0x4aae
movq %rax, %r14
movq %r15, %rdi
movq %r12, %rsi
callq 0x4ad4
movq %rax, %rbx
movsd (%rax), %xmm0
addsd (%r14), %xmm0
movsd %xmm0, (%r14)
movsd 0x8(%rax), %xmm0
addsd 0x8(%r14), %xmm0
movsd %xmm0, 0x8(%r14)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x50(%rsp)
movl 0x44(%rbp), %r15d
callq 0x2490
cmpl %eax, %r15d
jbe 0x98f4
movsd (%r14), %xmm0
subsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x8(%r14), %xmm0
subsd 0x148(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x50(%rbp), %xmm0
xorpd 0x27a6(%rip), %xmm0     # 0xc090
leaq 0x50(%rsp), %rdi
callq 0xb15d
movupd (%r14), %xmm0
movapd %xmm0, 0x40(%rsp)
cmpb $0x1, 0x59(%rbp)
jne 0x9953
leaq 0x78(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x4ac1
movsd 0x10(%rax), %xmm0
movq %r13, %rdi
leaq 0x40(%rsp), %rsi
callq 0x77b0
movsd 0x40(%rsp), %xmm0
ucomisd (%r14), %xmm0
jne 0x9946
jp 0x9946
movsd 0x48(%rsp), %xmm0
ucomisd 0x8(%r14), %xmm0
jne 0x9946
jnp 0x99b5
movq %r15, %rdi
movq %r12, %rsi
callq 0x4b33
jmp 0x99b5
cmpb $0x1, 0x58(%rbp)
leaq 0x78(%rsp), %r15
jne 0x99b5
movq %r15, %rdi
movq %r12, %rsi
callq 0x4ac1
movsd 0x10(%rax), %xmm0
movq %r13, %rdi
leaq 0x40(%rsp), %rsi
callq 0x77b0
movsd 0x40(%rsp), %xmm0
subsd (%r14), %xmm0
movsd 0x48(%rsp), %xmm1
addsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
subsd 0x8(%r14), %xmm1
addsd 0x58(%rsp), %xmm1
movsd %xmm1, 0x58(%rsp)
movapd 0x40(%rsp), %xmm0
movupd %xmm0, (%r14)
movsd 0x50(%rsp), %xmm0
ucomisd 0x269d(%rip), %xmm0     # 0xc060
jne 0x99c7
jnp 0x99cb
movsd %xmm0, (%rbx)
movsd 0x58(%rsp), %xmm0
ucomisd 0x2687(%rip), %xmm0     # 0xc060
jne 0x99dd
jnp 0x99e2
movsd %xmm0, 0x8(%rbx)
incq %r12
cmpq 0x88(%rsp), %r12
jb 0x9853
leaq 0x140(%rsp), %rdi
movq %r15, %rsi
callq 0xa03f
cmpq $0x0, 0x88(%rsp)
je 0x9ab0
xorl %r13d, %r13d
movq %r13, %rbx
incq %r13
cmpq 0x88(%rsp), %r13
jae 0x9aa2
movq %r13, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4af1
movl %eax, %ebp
movq %r15, %rdi
movq %r14, %rsi
callq 0x4af1
movl %eax, %r12d
movl %ebp, %edi
movl %eax, %esi
callq 0xa9bc
testb %al, %al
je 0x9a95
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4ac1
movq %rax, %r15
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
callq 0x4ac1
movq %r15, %rdi
leaq 0x78(%rsp), %r15
movq %rax, %rsi
callq 0x266c
testb %al, %al
je 0x9a95
cmpl $0x3, %ebp
setne %al
cmpl $0x3, %r12d
setne %cl
testb %cl, %al
jne 0x9a95
callq 0x2170
incq %r14
cmpq 0x88(%rsp), %r14
jb 0x9a28
cmpq 0x88(%rsp), %r13
jb 0x9a15
movl 0x74(%rsp), %ecx
cmpl 0x24(%rsp), %ecx
sete %al
cmpl $0x20, %ecx
setne %cl
testb %al, %cl
jne 0x9ad5
leaq 0x140(%rsp), %rdi
movq %r15, %rsi
callq 0x9f76
cmpq $0x0, 0x88(%rsp)
movq 0x28(%rsp), %r12
je 0x9bc9
xorl %ebx, %ebx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4ae0
cmpq $0x0, 0x30(%rax)
je 0x9bb8
movq %rax, %r14
movl 0x48(%rax), %ebp
callq 0x2490
cmpl %eax, %ebp
jbe 0x9bb8
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4aae
movups (%rax), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0x30(%r14), %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4af1
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
leaq 0x50(%rsp), %rcx
callq 0x4869
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x4ad4
movq %rax, %r15
leaq 0x78(%rsp), %rdi
movq %rbx, %rsi
callq 0x4ad4
movups (%rax), %xmm0
movups %xmm0, (%r15)
movups (%rax), %xmm0
movaps %xmm0, 0x40(%rsp)
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
callq 0x4ae0
movsd 0x50(%rax), %xmm0
leaq 0x40(%rsp), %rdi
callq 0xb15d
movsd 0x40(%rsp), %xmm0
addsd (%r15), %xmm0
movsd %xmm0, (%r15)
movsd 0x48(%rsp), %xmm0
addsd 0x8(%r15), %xmm0
movsd %xmm0, 0x8(%r15)
leaq 0x78(%rsp), %r15
incq %rbx
cmpq 0x88(%rsp), %rbx
jb 0x9aeb
leaq 0x140(%rsp), %rdi
callq 0x9eb7
movq %r15, %rdi
callq 0x49ba
movq %r15, %rdi
callq 0x4b5b
xorl %eax, %eax
movq 0x73e9(%rip), %r14      # 0x10fd8
movb $0x1, %r13b
movl %eax, %eax
leaq 0x3345(%rip), %rcx      # 0xcf40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movl %r13d, %ebp
jmpq *%rax
cmpl $0x4, %ecx
je 0x9c9e
cmpl $0x10, %ecx
jne 0x9786
movl $0x5, %ebp
jmp 0x9786
leaq 0x3386(%rip), %rdi      # 0xcfb0
callq 0xac64
movq %rax, 0x8(%rsp)
movb $0x1, %al
movq %rax, 0x68(%rsp)
movq 0x38(%rsp), %rax
leaq 0x32f9(%rip), %rcx      # 0xcf40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movl %r13d, %ebp
movq $0x0, (%rsp)
jmpq *%rax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq $0x0, 0x68(%rsp)
xorl %esi, %esi
movl $0x1, %ecx
callq 0x24a0
movb $0x1, %bpl
movq 0x38(%rsp), %rax
leaq 0x32bc(%rip), %rcx      # 0xcf40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
jmpq *%rax
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
jmp 0x9786
movq $0x0, 0x98(%rsp)
movq $0x0, 0x18(%rsp)
jmp 0x97ca
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq $0x0, 0x98(%rsp)
xorl %esi, %esi
movl $0x1, %ecx
callq 0x24a0
movb $0x1, %bpl
movq 0x38(%rsp), %rax
leaq 0x3252(%rip), %rcx      # 0xcf40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq $0x0, 0x18(%rsp)
movq $0x0, (%rsp)
jmpq *%rax
jmp 0x9dbc
leaq 0x190(%rsp), %rdi
callq 0x6c5a
leaq 0x32d1(%rip), %rdx      # 0xcff2
movq %rax, %rdi
movl $0x4, %esi
movq %r15, %rcx
xorl %eax, %eax
callq 0x6e97
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x9daf
movq (%r14), %rdi
callq 0x2070
movq (%r14), %rdi
callq 0x2220
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x9d59
callq 0x2250
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
movq 0x120(%rsp), %rbx
movq 0x118(%rsp), %r14
movq (%rsp), %r15
je 0x9d7c
callq 0x2250
testq %r15, %r15
je 0x9d89
movq %r15, %rdi
callq 0x2250
movq %r12, %rdi
callq 0x28fb
cmpb $0x0, 0x14(%rsp)
je 0x9da3
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa479
leaq 0x78(%rsp), %rdi
callq 0x4bef
xorl %ebx, %ebx
leaq 0x190(%rsp), %rdi
callq 0x6c71
movl %ebx, %eax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq