// File: /workspace/github_c_makefile_star2_O0/tvlabs[P]edge264/edge264_headers.c
// Function: parse_seq_parameter_set_log
int ADD_VARIANT(parse_seq_parameter_set)(Edge264Decoder *dec, int non_blocking, void(*free_cb)(void*,int), void *free_arg)
{
	static const char * const profile_idc_names[256] = {
		[0 ... 255] = "Unknown",
		[44] = "CAVLC 4:4:4 Intra",
		[66] = "Baseline",
		[77] = "Main",
		[83] = "Scalable Baseline",
		[86] = "Scalable High",
		[88] = "Extended",
		[100] = "High",
		[110] = "High 10",
		[118] = "Multiview High",
		[122] = "High 4:2:2",
		[128] = "Stereo High",
		[134] = "MFC High",
		[135] = "MFC Depth High",
		[138] = "Multiview Depth High",
		[139] = "Enhanced Multiview Depth High",
		[244] = "High 4:4:4 Predictive",
	};
	static const char * const chroma_format_idc_names[4] = {"4:0:0", "4:2:0", "4:2:2", "4:4:4"};
	static const uint32_t MaxDpbMbs[64] = {
		396, 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, // level 1
		900, // levels 1b and 1.1
		2376, 2376, 2376, 2376, 2376, 2376, 2376, 2376, 2376, // levels 1.2, 1.3 and 2
		4752, // level 2.1
		8100, 8100, 8100, 8100, 8100, 8100, 8100, 8100, 8100, // levels 2.2 and 3
		18000, // level 3.1
		20480, // level 3.2
		32768, 32768, 32768, 32768, 32768, 32768, 32768, 32768, 32768, // levels 4 and 4.1
		34816, // level 4.2
		110400, 110400, 110400, 110400, 110400, 110400, 110400, 110400, // level 5
		184320, 184320, // levels 5.1 and 5.2
		696320, 696320, 696320, 696320, 696320, 696320, 696320, 696320, 696320, 696320, // levels 6, 6.1 and 6.2
		UINT_MAX // no limit beyond
	};
	
	// temp storage, committed if entire NAL is correct
	Edge264SeqParameterSet sps = {
		.chroma_format_idc = 1,
		.ChromaArrayType = 1,
		.BitDepth_Y = 8,
		.BitDepth_C = 8,
		.log2_max_pic_order_cnt_lsb = 16,
		.initial_cpb_removal_delay_length = 24,
		.cpb_removal_delay_length = 24,
		.dpb_output_delay_length = 24,
		.time_offset_length = 24,
		.weightScale4x4_v = {[0 ... 5] = {16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16}},
		.weightScale8x8_v = {[0 ... 23] = {16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16}},
	};
	
	// Profiles are only useful to initialize max_num_reorder_frames/num_frame_buffers.
	int profile_idc = get_uv(&dec->_gb, 8);
	unsigned constraint_set_flags = get_uv(&dec->_gb, 8);
	int level_idc = get_uv(&dec->_gb, 8);
	get_ue16(&dec->_gb, 31); // seq_parameter_set_id is ignored until useful cases arise
	log_dec(dec, "  profile_idc: %u # %s\n"
		"  constraint_set_flags: [%u,%u,%u,%u,%u,%u]\n"
		"  level_idc: %.1f\n",
		profile_idc, profile_idc_names[profile_idc],
		constraint_set_flags >> 7, (constraint_set_flags >> 6) & 1, (constraint_set_flags >> 5) & 1, (constraint_set_flags >> 4) & 1, (constraint_set_flags >> 3) & 1, (constraint_set_flags >> 2) & 1,
		(float)level_idc / 10);
	
	int seq_scaling_matrix_present_flag = 0;
	if (profile_idc != 66 && profile_idc != 77 && profile_idc != 88) {
		sps.ChromaArrayType = sps.chroma_format_idc = get_ue16(&dec->_gb, 3);
		log_dec(dec, "  chroma_format_idc: %u # %s%s\n",
			sps.chroma_format_idc, chroma_format_idc_names[sps.chroma_format_idc], unsup_if(sps.ChromaArrayType != 1));
		if (sps.chroma_format_idc == 3) {
			int separate_colour_plane_flag = get_u1(&dec->_gb);
			sps.ChromaArrayType = 3 - separate_colour_plane_flag * 3;
			log_dec(dec, "  separate_colour_plane_flag: %u\n",
				separate_colour_plane_flag);
		}
		sps.BitDepth_Y = 8 + get_ue16(&dec->_gb, 6);
		sps.BitDepth_C = 8 + get_ue16(&dec->_gb, 6);
		sps.qpprime_y_zero_transform_bypass_flag = get_u1(&dec->_gb);
		log_dec(dec, "  bit_depth: {luma: %u, chroma: %u}%s\n"
			"  qpprime_y_zero_transform_bypass_flag: %u%s\n",
			sps.BitDepth_Y, sps.BitDepth_C, unsup_if(sps.BitDepth_Y + sps.BitDepth_Y != 16),
			sps.qpprime_y_zero_transform_bypass_flag, unsup_if(sps.qpprime_y_zero_transform_bypass_flag));
		if (seq_scaling_matrix_present_flag = get_u1(&dec->_gb)) {
			sps.weightScale4x4_v[0] = Default_4x4_Intra;
			sps.weightScale4x4_v[3] = Default_4x4_Inter;
			for (int i = 0; i < 4; i++) {
				sps.weightScale8x8_v[i] = Default_8x8_Intra[i]; // scaling list 6
				sps.weightScale8x8_v[4 + i] = Default_8x8_Inter[i]; // scaling list 7
			}
			log_dec(dec, "  seq_scaling_matrix:\n");
			parse_scaling_lists(dec, sps.weightScale4x4_v, sps.weightScale8x8_v, 1, sps.chroma_format_idc);
		}
	} else {
		log_dec(dec, "  default_chroma_format_idc: 0 # 4:2:0\n"
			"  default_bit_depth: {luma: 8, chroma: 8}\n");
	}
	
	sps.log2_max_frame_num = get_ue16(&dec->_gb, 12) + 4;
	sps.pic_order_cnt_type = get_ue16(&dec->_gb, 2);
	log_dec(dec, "  log2_max_frame_num: %u\n"
		"  pic_order_cnt_type: %u\n",
		sps.log2_max_frame_num,
		sps.pic_order_cnt_type);
	
	if (sps.pic_order_cnt_type == 0) {
		sps.log2_max_pic_order_cnt_lsb = get_ue16(&dec->_gb, 12) + 4;
		log_dec(dec, "  log2_max_pic_order_cnt_lsb: %u\n",
			sps.log2_max_pic_order_cnt_lsb);
	
	// clearly one of the spec's useless bits (and a waste of time to implement)
	} else if (sps.pic_order_cnt_type == 1) {
		sps.delta_pic_order_always_zero_flag = get_u1(&dec->_gb);
		sps.offset_for_non_ref_pic = get_se32(&dec->_gb, -32768, 32767); // tighter than spec thanks to condition on DiffPicOrderCnt
		sps.offset_for_top_to_bottom_field = get_se32(&dec->_gb, -32768, 32767);
		sps.num_ref_frames_in_pic_order_cnt_cycle = get_ue16(&dec->_gb, 255);
		log_dec(dec, "  delta_pic_order_always_zero_flag: %u\n"
			"  offset_for_non_ref_pic: %d\n"
			"  offset_for_top_to_bottom_field: %d\n"
			"  offsets_for_ref_frames: [",
			sps.delta_pic_order_always_zero_flag,
			sps.offset_for_non_ref_pic,
			sps.offset_for_top_to_bottom_field);
		for (int i = 1, delta = 0; i <= sps.num_ref_frames_in_pic_order_cnt_cycle; i++) {
			int offset_for_ref_frame = get_se32(&dec->_gb, -65535, 65535);
			log_dec(dec, "%d,", offset_for_ref_frame);
			sps.PicOrderCntDeltas[i] = delta += offset_for_ref_frame;
		}
		log_dec(dec, "]\n");
	}
	
	// Max width is imposed by some int16 storage, wait for actual needs to push it.
	sps.max_num_ref_frames = get_ue16(&dec->_gb, 16);
	int gaps_in_frame_num_value_allowed_flag = get_u1(&dec->_gb);
	sps.pic_width_in_mbs = get_ue16(&dec->_gb, 1022) + 1;
	int pic_height_in_map_units = get_ue16(&dec->_gb, 527 << sps.frame_mbs_only_flag) + 1;
	sps.frame_mbs_only_flag = get_u1(&dec->_gb);
	sps.pic_height_in_mbs = pic_height_in_map_units << 1 >> sps.frame_mbs_only_flag;
	int MaxDpbFrames = min(MaxDpbMbs[min(level_idc, 63)] / (unsigned)(sps.pic_width_in_mbs * sps.pic_height_in_mbs), 16);
	sps.max_num_reorder_frames = ((profile_idc == 44 || profile_idc == 86 ||
		profile_idc == 100 || profile_idc == 110 || profile_idc == 122 ||
		profile_idc == 244) && (constraint_set_flags & 1 << 4)) ? 0 : MaxDpbFrames;
	sps.num_frame_buffers = max(sps.max_num_reorder_frames, sps.max_num_ref_frames) + 1;
	log_dec(dec, "  max_num_ref_frames: %u\n"
		"  gaps_in_frame_num_value_allowed_flag: %u\n"
		"  pic_size_in_mbs: {width: %u, height: %u}\n"
		"  frame_mbs_only_flag: %u%s\n",
		sps.max_num_ref_frames,
		gaps_in_frame_num_value_allowed_flag,
		sps.pic_width_in_mbs,
		sps.pic_height_in_mbs,
		sps.frame_mbs_only_flag, unsup_if(!sps.frame_mbs_only_flag));
	if (sps.frame_mbs_only_flag == 0) {
		sps.mb_adaptive_frame_field_flag = get_u1(&dec->_gb);
		log_dec(dec, "  mb_adaptive_frame_field_flag: %u\n",
			sps.mb_adaptive_frame_field_flag);
	}
	sps.direct_8x8_inference_flag = get_u1(&dec->_gb);
	log_dec(dec, "  direct_8x8_inference_flag: %u\n",
		sps.direct_8x8_inference_flag);
	
	// frame_cropping_flag
	if (get_u1(&dec->_gb)) {
		unsigned shiftX = ((sps.ChromaArrayType == 1) | (sps.ChromaArrayType == 2));
		unsigned shiftY = (sps.ChromaArrayType == 1) + 1 - sps.frame_mbs_only_flag;
		int limX = (sps.pic_width_in_mbs << 4 >> shiftX) - 1;
		int limY = (sps.pic_height_in_mbs << 4 >> shiftY) - 1;
		sps.frame_crop_offsets[3] = get_ue16(&dec->_gb, limX) << shiftX;
		sps.frame_crop_offsets[1] = get_ue16(&dec->_gb, limX - (sps.frame_crop_offsets[3] >> shiftX)) << shiftX;
		sps.frame_crop_offsets[0] = get_ue16(&dec->_gb, limY) << shiftY;
		sps.frame_crop_offsets[2] = get_ue16(&dec->_gb, limY - (sps.frame_crop_offsets[0] >> shiftY)) << shiftY;
		log_dec(dec, "  frame_crop_offsets: {left: %u, right: %u, top: %u, bottom: %u}\n",
			sps.frame_crop_offsets[3], sps.frame_crop_offsets[1], sps.frame_crop_offsets[0], sps.frame_crop_offsets[2]);
	}
	
	if (get_u1(&dec->_gb)) {
		log_dec(dec, "  vui_parameters:\n");
		parse_vui_parameters(dec, &sps);
	} else {
		log_dec(dec, "  default_max_num_reorder_frames: %u\n"
			"  default_max_dec_frame_buffering: %u\n",
			sps.max_num_reorder_frames,
			sps.num_frame_buffers - 1);
	}
	
	// additional stuff for subset_seq_parameter_set
	if (dec->nal_unit_type == 15) {
		if ((profile_idc != 118 && profile_idc != 128 && profile_idc != 134) ||
			sps.DPB_format != dec->sps.DPB_format)
			return ENOTSUP;
		if (!get_u1(&dec->_gb))
			return EBADMSG;
		if (parse_seq_parameter_set_mvc_extension(dec, profile_idc))
			return ENOTSUP;
		if (get_u1(&dec->_gb))
			parse_mvc_vui_parameters_extension(dec, &sps);
		get_u1(&dec->_gb);
		// rbsp_trailing_bits are ignored at the moment since some streams seem to get it wrong
	} else {
		if (!rbsp_end(&dec->_gb))
			return EBADMSG;
	}
	
	// check for unsupported features
	if (dec->log_pos >= sizeof(dec->log_buf) || sps.ChromaArrayType != 1 ||
		sps.BitDepth_Y + sps.BitDepth_C != 16 ||
		sps.qpprime_y_zero_transform_bypass_flag || !sps.frame_mbs_only_flag)
		return ENOTSUP;
	
	// apply the changes on the dependent variables if the frame format changed
	if (sps.DPB_format != dec->sps.DPB_format || sps.frame_crop_offsets_l != dec->sps.frame_crop_offsets_l) {
		for (unsigned o = dec->output_flags; o; o &= o - 1)
			dec->dispPicOrderCnt = max(dec->dispPicOrderCnt, dec->FieldOrderCnt[0][__builtin_ctz(o)]);
		if (dec->busy_tasks) {
			if (non_blocking)
				return EWOULDBLOCK;
			while (dec->busy_tasks)
				pthread_cond_wait(&dec->task_complete, &dec->lock);
		}
		if (dec->output_flags | dec->borrow_flags)
			return ENOBUFS;
		memcpy(dec->out.frame_crop_offsets, &sps.frame_crop_offsets_l, 8);
		int width = sps.pic_width_in_mbs << 4;
		int height = sps.pic_height_in_mbs << 4;
		dec->out.pixel_depth_Y = sps.BitDepth_Y > 8;
		dec->out.width_Y = width - dec->out.frame_crop_offsets[3] - dec->out.frame_crop_offsets[1];
		dec->out.height_Y = height - dec->out.frame_crop_offsets[0] - dec->out.frame_crop_offsets[2];
		dec->out.stride_Y = width << dec->out.pixel_depth_Y;
		if (!(dec->out.stride_Y & 2047)) // add an offset to stride if it is a multiple of 2048
			dec->out.stride_Y += 16 << dec->out.pixel_depth_Y;
		dec->plane_size_Y = dec->out.stride_Y * height;
		if (sps.chroma_format_idc > 0) {
			dec->out.pixel_depth_C = sps.BitDepth_C > 8;
			dec->out.width_C = sps.chroma_format_idc == 3 ? dec->out.width_Y : dec->out.width_Y >> 1;
			dec->out.stride_C = (sps.chroma_format_idc == 3 ? width << 1 : width) << dec->out.pixel_depth_C;
			if (!(dec->out.stride_C & 4095)) // add an offset to stride if it is a multiple of 4096
				dec->out.stride_C += (sps.chroma_format_idc == 3 ? 16 : 8) << dec->out.pixel_depth_C;
			dec->out.height_C = sps.chroma_format_idc == 1 ? dec->out.height_Y >> 1 : dec->out.height_Y;
			dec->plane_size_C = (sps.chroma_format_idc == 1 ? height >> 1 : height) * dec->out.stride_C;
		}
		int mbs = (sps.pic_width_in_mbs + 1) * sps.pic_height_in_mbs - 1;
		dec->frame_size = dec->plane_size_Y + dec->plane_size_C + mbs * sizeof(Edge264Macroblock);
		dec->currPic = -1;
		dec->reference_flags = dec->long_term_flags = dec->frame_flip_bits = dec->second_views = 0;
		dec->ssps.DPB_format = 0;
		for (int i = 0; i < 32; i++) {
			if (dec->frame_buffers[i] != NULL) {
				free(dec->frame_buffers[i]);
				dec->frame_buffers[i] = NULL;
			}
		}
	}
	*(dec->nal_unit_type == 7 ? &dec->sps : &dec->ssps) = sps;
	print_dec(dec);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x530, %rsp            # imm = 0x530
movq %rdi, -0x60(%rbp)
movl %esi, -0x64(%rbp)
movq %rdx, -0x70(%rbp)
movq %rcx, -0x78(%rbp)
leaq -0x490(%rbp), %rdi
leaq 0x53535(%rip), %rsi     # 0xce060
movl $0x410, %edx            # imm = 0x410
callq 0x70c0
movq -0x60(%rbp), %rdi
movl $0x8, %esi
callq 0x65e90
movl %eax, -0x494(%rbp)
movq -0x60(%rbp), %rdi
movl $0x8, %esi
callq 0x65e90
movl %eax, -0x498(%rbp)
movq -0x60(%rbp), %rdi
movl $0x8, %esi
callq 0x65e90
movl %eax, -0x49c(%rbp)
movq -0x60(%rbp), %rdi
movl $0x1f, %esi
callq 0x76d10
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7ac80
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movl -0x494(%rbp), %ecx
movslq -0x494(%rbp), %rdx
leaq 0x5b6b6(%rip), %rax     # 0xd6290
movq (%rax,%rdx,8), %r8
movl -0x498(%rbp), %r9d
shrl $0x7, %r9d
movl -0x498(%rbp), %r14d
shrl $0x6, %r14d
andl $0x1, %r14d
movl -0x498(%rbp), %ebx
shrl $0x5, %ebx
andl $0x1, %ebx
movl -0x498(%rbp), %r11d
shrl $0x4, %r11d
andl $0x1, %r11d
movl -0x498(%rbp), %r10d
shrl $0x3, %r10d
andl $0x1, %r10d
movl -0x498(%rbp), %eax
shrl $0x2, %eax
andl $0x1, %eax
vcvtsi2ssl -0x49c(%rbp), %xmm0, %xmm0
vmovss 0x5315a(%rip), %xmm1    # 0xcdd98
vdivss %xmm1, %xmm0, %xmm1
vcvtss2sd %xmm1, %xmm0, %xmm0
leaq 0x55652(%rip), %rdx     # 0xd029f
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x1, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movl $0x0, -0x4a0(%rbp)
cmpl $0x42, -0x494(%rbp)
je 0x7b0b4
cmpl $0x4d, -0x494(%rbp)
je 0x7b0b4
cmpl $0x58, -0x494(%rbp)
je 0x7b0b4
movq -0x60(%rbp), %rdi
movl $0x3, %esi
callq 0x76d10
movb %al, -0x490(%rbp)
movb %al, -0x488(%rbp)
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7ad7d
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movsbl -0x490(%rbp), %ecx
movsbq -0x490(%rbp), %rdx
leaq 0x5bd68(%rip), %rax     # 0xd6a90
movq (%rax,%rdx,8), %r8
movsbl -0x488(%rbp), %eax
cmpl $0x1, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edx
leaq 0x55ae7(%rip), %r9      # 0xd0832
leaq 0x5302e(%rip), %rax     # 0xcdd80
cmpl $0x0, %edx
cmovneq %rax, %r9
leaq 0x55595(%rip), %rdx     # 0xd02f5
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movsbl -0x490(%rbp), %eax
cmpl $0x3, %eax
jne 0x7ae1f
movq -0x60(%rbp), %rdi
callq 0x77060
movl %eax, -0x4a4(%rbp)
imull $0x3, -0x4a4(%rbp), %ecx
movl $0x3, %eax
subl %ecx, %eax
movb %al, -0x488(%rbp)
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7ae1d
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movl -0x4a4(%rbp), %ecx
leaq 0x55515(%rip), %rdx     # 0xd0315
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7ae1f
movq -0x60(%rbp), %rdi
movl $0x6, %esi
callq 0x76d10
addl $0x8, %eax
movb %al, -0x48f(%rbp)
movq -0x60(%rbp), %rdi
movl $0x6, %esi
callq 0x76d10
addl $0x8, %eax
movb %al, -0x48e(%rbp)
movq -0x60(%rbp), %rdi
callq 0x77060
movb %al, -0x487(%rbp)
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7af41
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movsbl -0x48f(%rbp), %ecx
movsbl -0x48e(%rbp), %r8d
movsbl -0x48f(%rbp), %eax
movsbl -0x48f(%rbp), %edx
addl %edx, %eax
cmpl $0x10, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %edx
leaq 0x55958(%rip), %r9      # 0xd0832
leaq 0x52e9f(%rip), %rax     # 0xcdd80
cmpl $0x0, %edx
cmovneq %rax, %r9
movsbl -0x487(%rbp), %r10d
movsbl -0x487(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %r11d
leaq 0x5592d(%rip), %rax     # 0xd0832
leaq 0x52e74(%rip), %rdx     # 0xcdd80
cmpl $0x0, %r11d
cmovneq %rdx, %rax
leaq 0x5541c(%rip), %rdx     # 0xd0337
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movq -0x60(%rbp), %rdi
callq 0x77060
movl %eax, -0x4a0(%rbp)
cmpl $0x0, %eax
je 0x7b0b2
vmovdqa 0x4e2ef(%rip), %xmm0    # 0xc9250
vmovdqa %xmm0, -0x260(%rbp)
vmovdqa 0x4e2ef(%rip), %xmm0    # 0xc9260
vmovdqa %xmm0, -0x230(%rbp)
movl $0x0, -0x4a8(%rbp)
cmpl $0x4, -0x4a8(%rbp)
jge 0x7b019
movslq -0x4a8(%rbp), %rcx
leaq 0x534d2(%rip), %rax     # 0xce470
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa (%rax), %xmm0
leaq -0x490(%rbp), %rax
addq $0x290, %rax            # imm = 0x290
movslq -0x4a8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa %xmm0, (%rax)
movslq -0x4a8(%rbp), %rcx
leaq 0x534da(%rip), %rax     # 0xce4b0
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa (%rax), %xmm0
leaq -0x490(%rbp), %rax
addq $0x290, %rax            # imm = 0x290
movl -0x4a8(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa %xmm0, (%rax)
movl -0x4a8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4a8(%rbp)
jmp 0x7af83
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7b080
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
leaq 0x55328(%rip), %rdx     # 0xd038b
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movq -0x60(%rbp), %rdi
leaq -0x490(%rbp), %rsi
addq $0x230, %rsi            # imm = 0x230
leaq -0x490(%rbp), %rdx
addq $0x290, %rdx            # imm = 0x290
movsbl -0x490(%rbp), %r8d
movl $0x1, %ecx
callq 0x7a460
jmp 0x7b11d
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7b11b
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
leaq 0x552a4(%rip), %rdx     # 0xd03a2
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7b11d
movq -0x60(%rbp), %rdi
movl $0xc, %esi
callq 0x76d10
addl $0x4, %eax
movb %al, -0x486(%rbp)
movq -0x60(%rbp), %rdi
movl $0x2, %esi
callq 0x76d10
movb %al, -0x485(%rbp)
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7b1be
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movsbl -0x486(%rbp), %ecx
movsbl -0x485(%rbp), %r8d
leaq 0x55253(%rip), %rdx     # 0xd03f4
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movsbl -0x485(%rbp), %eax
cmpl $0x0, %eax
jne 0x7b258
movq -0x60(%rbp), %rdi
movl $0xc, %esi
callq 0x76d10
addl $0x4, %eax
movb %al, -0x484(%rbp)
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7b253
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movsbl -0x484(%rbp), %ecx
leaq 0x551f1(%rip), %rdx     # 0xd0427
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7b48f
movsbl -0x485(%rbp), %eax
cmpl $0x1, %eax
jne 0x7b48d
movq -0x60(%rbp), %rdi
callq 0x77060
movb %al, -0x483(%rbp)
movq -0x60(%rbp), %rdi
movl $0xffff8000, %esi       # imm = 0xFFFF8000
movl $0x7fff, %edx           # imm = 0x7FFF
callq 0x770f0
movw %ax, -0x474(%rbp)
movq -0x60(%rbp), %rdi
movl $0xffff8000, %esi       # imm = 0xFFFF8000
movl $0x7fff, %edx           # imm = 0x7FFF
callq 0x770f0
movw %ax, -0x472(%rbp)
movq -0x60(%rbp), %rdi
movl $0xff, %esi
callq 0x76d10
movb %al, -0x482(%rbp)
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7b33d
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movsbl -0x483(%rbp), %ecx
movswl -0x474(%rbp), %r8d
movswl -0x472(%rbp), %r9d
leaq 0x55129(%rip), %rdx     # 0xd0449
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movl $0x1, -0x4ac(%rbp)
movl $0x0, -0x4b0(%rbp)
movl -0x4ac(%rbp), %eax
movzbl -0x482(%rbp), %ecx
cmpl %ecx, %eax
jg 0x7b424
movq -0x60(%rbp), %rdi
movl $0xffff0001, %esi       # imm = 0xFFFF0001
movl $0xffff, %edx           # imm = 0xFFFF
callq 0x770f0
movl %eax, -0x4b4(%rbp)
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7b3ec
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movl -0x4b4(%rbp), %ecx
leaq 0x550ff(%rip), %rdx     # 0xd04ce
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movl -0x4b4(%rbp), %eax
addl -0x4b0(%rbp), %eax
movl %eax, -0x4b0(%rbp)
movw %ax, %cx
movslq -0x4ac(%rbp), %rax
movw %cx, -0x468(%rbp,%rax,2)
movl -0x4ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4ac(%rbp)
jmp 0x7b351
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7b48b
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
leaq 0x5574a(%rip), %rdx     # 0xd0bb8
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7b48d
jmp 0x7b48f
movq -0x60(%rbp), %rdi
movl $0x10, %esi
callq 0x76d10
movb %al, -0x481(%rbp)
movq -0x60(%rbp), %rdi
callq 0x77060
movl %eax, -0x4b8(%rbp)
movq -0x60(%rbp), %rdi
movl $0x3fe, %esi            # imm = 0x3FE
callq 0x76d10
addl $0x1, %eax
movw %ax, -0x48c(%rbp)
movq -0x60(%rbp), %rdi
movsbl -0x480(%rbp), %ecx
movl $0x20f, %esi            # imm = 0x20F
shll %cl, %esi
callq 0x76d10
addl $0x1, %eax
movl %eax, -0x4bc(%rbp)
movq -0x60(%rbp), %rdi
callq 0x77060
movb %al, -0x480(%rbp)
movl -0x4bc(%rbp), %eax
shll %eax
movsbl -0x480(%rbp), %ecx
sarl %cl, %eax
movw %ax, -0x48a(%rbp)
movl -0x49c(%rbp), %eax
movl %eax, -0x14(%rbp)
movl $0x3f, -0x18(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x7b534
movl -0x14(%rbp), %eax
movl %eax, -0x4e8(%rbp)
jmp 0x7b53d
movl -0x18(%rbp), %eax
movl %eax, -0x4e8(%rbp)
movl -0x4e8(%rbp), %eax
movslq %eax, %rcx
leaq 0x52a13(%rip), %rax     # 0xcdf60
movl (%rax,%rcx,4), %eax
movzwl -0x48c(%rbp), %ecx
movswl -0x48a(%rbp), %edx
imull %edx, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x1c(%rbp)
movl $0x10, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x7b582
movl -0x1c(%rbp), %eax
movl %eax, -0x4ec(%rbp)
jmp 0x7b58b
movl -0x20(%rbp), %eax
movl %eax, -0x4ec(%rbp)
movl -0x4ec(%rbp), %eax
movl %eax, -0x4c0(%rbp)
cmpl $0x2c, -0x494(%rbp)
je 0x7b5d0
cmpl $0x56, -0x494(%rbp)
je 0x7b5d0
cmpl $0x64, -0x494(%rbp)
je 0x7b5d0
cmpl $0x6e, -0x494(%rbp)
je 0x7b5d0
cmpl $0x7a, -0x494(%rbp)
je 0x7b5d0
cmpl $0xf4, -0x494(%rbp)
jne 0x7b5e8
movl -0x498(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x7b5e8
xorl %eax, %eax
movl %eax, -0x4f0(%rbp)
jmp 0x7b5f4
movl -0x4c0(%rbp), %eax
movl %eax, -0x4f0(%rbp)
movl -0x4f0(%rbp), %eax
movb %al, -0x47c(%rbp)
movsbl -0x47c(%rbp), %ecx
movsbl -0x481(%rbp), %eax
movl %ecx, -0x34(%rbp)
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jle 0x7b627
movl -0x34(%rbp), %eax
movl %eax, -0x4f4(%rbp)
jmp 0x7b630
movl -0x38(%rbp), %eax
movl %eax, -0x4f4(%rbp)
movl -0x4f4(%rbp), %eax
addl $0x1, %eax
movb %al, -0x47d(%rbp)
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7b70a
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movsbl -0x481(%rbp), %ecx
movl -0x4b8(%rbp), %r8d
movzwl -0x48c(%rbp), %r9d
movswl -0x48a(%rbp), %r11d
movsbl -0x480(%rbp), %r10d
cmpb $0x0, -0x480(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %ebx
leaq 0x55168(%rip), %rax     # 0xd0832
leaq 0x526af(%rip), %rdx     # 0xcdd80
cmpl $0x0, %ebx
cmovneq %rdx, %rax
leaq 0x54df3(%rip), %rdx     # 0xd04d2
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movsbl -0x480(%rbp), %eax
cmpl $0x0, %eax
jne 0x7b795
movq -0x60(%rbp), %rdi
callq 0x77060
movb %al, -0x47f(%rbp)
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7b793
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movsbl -0x47f(%rbp), %ecx
leaq 0x54de8(%rip), %rdx     # 0xd055e
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7b795
movq -0x60(%rbp), %rdi
callq 0x77060
movb %al, -0x47e(%rbp)
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7b812
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movsbl -0x47e(%rbp), %ecx
leaq 0x54d8d(%rip), %rdx     # 0xd0582
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movq -0x60(%rbp), %rdi
callq 0x77060
cmpl $0x0, %eax
je 0x7b9cf
movsbl -0x488(%rbp), %eax
cmpl $0x1, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movsbl -0x488(%rbp), %ecx
cmpl $0x2, %ecx
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
orl %ecx, %eax
movl %eax, -0x4c4(%rbp)
movsbl -0x488(%rbp), %eax
cmpl $0x1, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
addl $0x1, %eax
movsbl -0x480(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x4c8(%rbp)
movzwl -0x48c(%rbp), %eax
shll $0x4, %eax
movl -0x4c4(%rbp), %ecx
sarl %cl, %eax
subl $0x1, %eax
movl %eax, -0x4cc(%rbp)
movswl -0x48a(%rbp), %eax
shll $0x4, %eax
movl -0x4c8(%rbp), %ecx
sarl %cl, %eax
subl $0x1, %eax
movl %eax, -0x4d0(%rbp)
movq -0x60(%rbp), %rdi
movl -0x4cc(%rbp), %esi
callq 0x76d10
movl -0x4c4(%rbp), %ecx
shll %cl, %eax
movw %ax, -0x262(%rbp)
movq -0x60(%rbp), %rdi
movl -0x4cc(%rbp), %esi
movswl -0x262(%rbp), %eax
movl -0x4c4(%rbp), %ecx
sarl %cl, %eax
subl %eax, %esi
callq 0x76d10
movl -0x4c4(%rbp), %ecx
shll %cl, %eax
movw %ax, -0x266(%rbp)
movq -0x60(%rbp), %rdi
movl -0x4d0(%rbp), %esi
callq 0x76d10
movl -0x4c8(%rbp), %ecx
shll %cl, %eax
movw %ax, -0x268(%rbp)
movq -0x60(%rbp), %rdi
movl -0x4d0(%rbp), %esi
movswl -0x268(%rbp), %eax
movl -0x4c8(%rbp), %ecx
sarl %cl, %eax
subl %eax, %esi
callq 0x76d10
movl -0x4c8(%rbp), %ecx
shll %cl, %eax
movw %ax, -0x264(%rbp)
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7b9cd
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movswl -0x262(%rbp), %ecx
movswl -0x266(%rbp), %r8d
movswl -0x268(%rbp), %r9d
movswl -0x264(%rbp), %eax
leaq 0x54bf6(%rip), %rdx     # 0xd05a3
movl %eax, (%rsp)
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7b9cf
movq -0x60(%rbp), %rdi
callq 0x77060
cmpl $0x0, %eax
je 0x7ba56
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7ba44
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
leaq 0x54bbe(%rip), %rdx     # 0xd05e5
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movq -0x60(%rbp), %rdi
leaq -0x490(%rbp), %rsi
callq 0x7c1d0
jmp 0x7bad2
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7bad0
movq -0x60(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movsbl -0x47c(%rbp), %ecx
movsbl -0x47d(%rbp), %r8d
subl $0x1, %r8d
leaq 0x54b45(%rip), %rdx     # 0xd05f8
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x60(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7bad2
movq -0x60(%rbp), %rax
movsbl 0x22(%rax), %eax
cmpl $0xf, %eax
jne 0x7bb8a
cmpl $0x76, -0x494(%rbp)
je 0x7bb04
cmpl $0x80, -0x494(%rbp)
je 0x7bb04
cmpl $0x86, -0x494(%rbp)
jne 0x7bb18
movq -0x490(%rbp), %rax
movq -0x60(%rbp), %rcx
cmpq 0x520(%rcx), %rax
je 0x7bb24
movl $0x5f, -0x54(%rbp)
jmp 0x7c1b8
movq -0x60(%rbp), %rdi
callq 0x77060
cmpl $0x0, %eax
jne 0x7bb3e
movl $0x4a, -0x54(%rbp)
jmp 0x7c1b8
movq -0x60(%rbp), %rdi
movl -0x494(%rbp), %esi
callq 0x7cde0
cmpl $0x0, %eax
je 0x7bb5e
movl $0x5f, -0x54(%rbp)
jmp 0x7c1b8
movq -0x60(%rbp), %rdi
callq 0x77060
cmpl $0x0, %eax
je 0x7bb7c
movq -0x60(%rbp), %rdi
leaq -0x490(%rbp), %rsi
callq 0x7d330
movq -0x60(%rbp), %rdi
callq 0x77060
jmp 0x7bc49
movq -0x60(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x3f, %rax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
tzcntq %rax, %rax
movl %eax, %ecx
movl $0x7f, %eax
subl %ecx, %eax
subl -0x4c(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x4c(%rbp), %ecx
shlq %cl, %rax
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x4f5(%rbp)
jne 0x7bc2b
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
subq $0x1, %rax
andq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x4f5(%rbp)
jne 0x7bc2b
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movl -0x50(%rbp), %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
addq %rcx, %rax
cmpq $0x0, %rax
sete %al
movb %al, -0x4f5(%rbp)
movb -0x4f5(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x7bc47
movl $0x4a, -0x54(%rbp)
jmp 0x7c1b8
jmp 0x7bc49
movq -0x60(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7bc93
movsbl -0x488(%rbp), %eax
cmpl $0x1, %eax
jne 0x7bc93
movsbl -0x48f(%rbp), %eax
movsbl -0x48e(%rbp), %ecx
addl %ecx, %eax
cmpl $0x10, %eax
jne 0x7bc93
movsbl -0x487(%rbp), %eax
cmpl $0x0, %eax
jne 0x7bc93
cmpb $0x0, -0x480(%rbp)
jne 0x7bc9f
movl $0x5f, -0x54(%rbp)
jmp 0x7c1b8
movq -0x490(%rbp), %rax
movq -0x60(%rbp), %rcx
cmpq 0x520(%rcx), %rax
jne 0x7bccb
movq -0x268(%rbp), %rax
movq -0x60(%rbp), %rcx
cmpq 0x748(%rcx), %rax
je 0x7c15f
movq -0x60(%rbp), %rax
movl 0x54(%rax), %eax
movl %eax, -0x4d4(%rbp)
cmpl $0x0, -0x4d4(%rbp)
je 0x7bd46
movq -0x60(%rbp), %rax
movl 0x48(%rax), %ecx
movq -0x60(%rbp), %rax
movl -0x4d4(%rbp), %edx
tzcntl %edx, %edx
movslq %edx, %rdx
movl 0x3c0(%rax,%rdx,4), %eax
movl %ecx, -0x3c(%rbp)
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jle 0x7bd19
movl -0x3c(%rbp), %eax
movl %eax, -0x4fc(%rbp)
jmp 0x7bd22
movl -0x40(%rbp), %eax
movl %eax, -0x4fc(%rbp)
movl -0x4fc(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x48(%rax)
movl -0x4d4(%rbp), %eax
subl $0x1, %eax
andl -0x4d4(%rbp), %eax
movl %eax, -0x4d4(%rbp)
jmp 0x7bcd8
movq -0x60(%rbp), %rax
cmpw $0x0, 0x1638(%rax)
je 0x7bd95
cmpl $0x0, -0x64(%rbp)
je 0x7bd66
movl $0xb, -0x54(%rbp)
jmp 0x7c1b8
jmp 0x7bd68
movq -0x60(%rbp), %rax
cmpw $0x0, 0x1638(%rax)
je 0x7bd93
movq -0x60(%rbp), %rdi
addq $0x1608, %rdi           # imm = 0x1608
movq -0x60(%rbp), %rsi
addq $0x1580, %rsi           # imm = 0x1580
callq 0x7050
jmp 0x7bd68
jmp 0x7bd95
movq -0x60(%rbp), %rax
movl 0x54(%rax), %eax
movq -0x60(%rbp), %rcx
orl 0x58(%rcx), %eax
cmpl $0x0, %eax
je 0x7bdb4
movl $0x69, -0x54(%rbp)
jmp 0x7c1b8
movq -0x60(%rbp), %rax
movq -0x268(%rbp), %rcx
movq %rcx, 0x510(%rax)
movzwl -0x48c(%rbp), %eax
shll $0x4, %eax
movl %eax, -0x4d8(%rbp)
movswl -0x48a(%rbp), %eax
shll $0x4, %eax
movl %eax, -0x4dc(%rbp)
movsbl -0x48f(%rbp), %eax
cmpl $0x8, %eax
setg %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x60(%rbp), %rax
movb %cl, 0x4f8(%rax)
movl -0x4d8(%rbp), %eax
movq -0x60(%rbp), %rcx
movswl 0x516(%rcx), %ecx
subl %ecx, %eax
movq -0x60(%rbp), %rcx
movswl 0x512(%rcx), %ecx
subl %ecx, %eax
movw %ax, %cx
movq -0x60(%rbp), %rax
movw %cx, 0x4fa(%rax)
movl -0x4dc(%rbp), %eax
movq -0x60(%rbp), %rcx
movswl 0x510(%rcx), %ecx
subl %ecx, %eax
movq -0x60(%rbp), %rcx
movswl 0x514(%rcx), %ecx
subl %ecx, %eax
movw %ax, %cx
movq -0x60(%rbp), %rax
movw %cx, 0x4fe(%rax)
movl -0x4d8(%rbp), %eax
movq -0x60(%rbp), %rcx
movsbl 0x4f8(%rcx), %ecx
shll %cl, %eax
movw %ax, %cx
movq -0x60(%rbp), %rax
movw %cx, 0x502(%rax)
movq -0x60(%rbp), %rax
movswl 0x502(%rax), %eax
andl $0x7ff, %eax            # imm = 0x7FF
cmpl $0x0, %eax
jne 0x7bebc
movq -0x60(%rbp), %rax
movsbl 0x4f8(%rax), %ecx
movl $0x10, %edx
shll %cl, %edx
movq -0x60(%rbp), %rax
movswl 0x502(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x502(%rax)
movq -0x60(%rbp), %rax
movswl 0x502(%rax), %ecx
imull -0x4dc(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x2c(%rax)
movsbl -0x490(%rbp), %eax
cmpl $0x0, %eax
jle 0x7c068
movsbl -0x48e(%rbp), %eax
cmpl $0x8, %eax
setg %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x60(%rbp), %rax
movb %cl, 0x4f9(%rax)
movsbl -0x490(%rbp), %eax
cmpl $0x3, %eax
jne 0x7bf22
movq -0x60(%rbp), %rax
movswl 0x4fa(%rax), %eax
movl %eax, -0x500(%rbp)
jmp 0x7bf35
movq -0x60(%rbp), %rax
movswl 0x4fa(%rax), %eax
sarl %eax
movl %eax, -0x500(%rbp)
movl -0x500(%rbp), %eax
movw %ax, %cx
movq -0x60(%rbp), %rax
movw %cx, 0x4fc(%rax)
movsbl -0x490(%rbp), %eax
cmpl $0x3, %eax
jne 0x7bf65
movl -0x4d8(%rbp), %eax
shll %eax
movl %eax, -0x504(%rbp)
jmp 0x7bf71
movl -0x4d8(%rbp), %eax
movl %eax, -0x504(%rbp)
movl -0x504(%rbp), %eax
movq -0x60(%rbp), %rcx
movsbl 0x4f9(%rcx), %ecx
shll %cl, %eax
movw %ax, %cx
movq -0x60(%rbp), %rax
movw %cx, 0x504(%rax)
movq -0x60(%rbp), %rax
movswl 0x504(%rax), %eax
andl $0xfff, %eax            # imm = 0xFFF
cmpl $0x0, %eax
jne 0x7bfdf
movsbl -0x490(%rbp), %ecx
movl $0x8, %edx
movl $0x10, %eax
cmpl $0x3, %ecx
cmovel %eax, %edx
movq -0x60(%rbp), %rax
movsbl 0x4f9(%rax), %ecx
shll %cl, %edx
movq -0x60(%rbp), %rax
movswl 0x504(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x504(%rax)
movsbl -0x490(%rbp), %eax
cmpl $0x1, %eax
jne 0x7c000
movq -0x60(%rbp), %rax
movswl 0x4fe(%rax), %eax
sarl %eax
movl %eax, -0x508(%rbp)
jmp 0x7c011
movq -0x60(%rbp), %rax
movswl 0x4fe(%rax), %eax
movl %eax, -0x508(%rbp)
movl -0x508(%rbp), %eax
movw %ax, %cx
movq -0x60(%rbp), %rax
movw %cx, 0x500(%rax)
movsbl -0x490(%rbp), %eax
cmpl $0x1, %eax
jne 0x7c041
movl -0x4dc(%rbp), %eax
sarl %eax
movl %eax, -0x50c(%rbp)
jmp 0x7c04d
movl -0x4dc(%rbp), %eax
movl %eax, -0x50c(%rbp)
movl -0x50c(%rbp), %ecx
movq -0x60(%rbp), %rax
movswl 0x504(%rax), %eax
imull %eax, %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x30(%rax)
movzwl -0x48c(%rbp), %eax
addl $0x1, %eax
movswl -0x48a(%rbp), %ecx
imull %ecx, %eax
subl $0x1, %eax
movl %eax, -0x4e0(%rbp)
movq -0x60(%rbp), %rax
movl 0x2c(%rax), %eax
movq -0x60(%rbp), %rcx
addl 0x30(%rcx), %eax
cltq
movslq -0x4e0(%rbp), %rcx
imulq $0x130, %rcx, %rcx      # imm = 0x130
addq %rcx, %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x34(%rax)
movq -0x60(%rbp), %rax
movb $-0x1, 0x24(%rax)
movq -0x60(%rbp), %rax
movl $0x0, 0x68(%rax)
movq -0x60(%rbp), %rax
movl $0x0, 0x5c(%rax)
movq -0x60(%rbp), %rax
movl $0x0, 0x50(%rax)
movq -0x60(%rbp), %rax
movl $0x0, 0x4c(%rax)
movq -0x60(%rbp), %rax
movq $0x0, 0x930(%rax)
movl $0x0, -0x4e4(%rbp)
cmpl $0x20, -0x4e4(%rbp)
jge 0x7c15d
movq -0x60(%rbp), %rax
movslq -0x4e4(%rbp), %rcx
cmpq $0x0, 0x178(%rax,%rcx,8)
je 0x7c14a
movq -0x60(%rbp), %rax
movslq -0x4e4(%rbp), %rcx
movq 0x178(%rax,%rcx,8), %rdi
callq 0x7030
movq -0x60(%rbp), %rax
movslq -0x4e4(%rbp), %rcx
movq $0x0, 0x178(%rax,%rcx,8)
jmp 0x7c14c
movl -0x4e4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4e4(%rbp)
jmp 0x7c0fc
jmp 0x7c15f
movq -0x60(%rbp), %rax
movsbl 0x22(%rax), %eax
cmpl $0x7, %eax
jne 0x7c17f
movq -0x60(%rbp), %rax
addq $0x520, %rax            # imm = 0x520
movq %rax, -0x518(%rbp)
jmp 0x7c190
movq -0x60(%rbp), %rax
addq $0x930, %rax            # imm = 0x930
movq %rax, -0x518(%rbp)
movq -0x518(%rbp), %rdi
leaq -0x490(%rbp), %rsi
movl $0x410, %edx            # imm = 0x410
callq 0x70c0
movq -0x60(%rbp), %rdi
callq 0x65e20
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
addq $0x530, %rsp            # imm = 0x530
popq %rbx
popq %r14
popq %rbp
retq
nopw (%rax,%rax)