// File: /workspace/github_c_makefile_star2_O1/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));
		seq_scaling_matrix_present_flag = get_u1(&dec->_gb);
		if (seq_scaling_matrix_present_flag) {
			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->dispTopFieldOrderCnt = max(dec->dispTopFieldOrderCnt, 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->PrevRefFrameNum[0] = dec->PrevRefFrameNum[1] = -1;
		dec->prevPicOrderCnt[0] = dec->prevPicOrderCnt[1] = 0;
		dec->reference_flags = dec->long_term_flags = dec->frame_flip_bits = dec->non_base_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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
movl %esi, 0x18(%rsp)
movq %rdi, %rbx
leaq 0x11bb0(%rip), %rsi     # 0x38040
leaq 0x20(%rsp), %rdi
movl $0x410, %edx            # imm = 0x410
callq 0x10c0
movq %rbx, %rdi
movl $0x8, %esi
callq 0x1875d
movl %eax, %r12d
movq %rbx, %rdi
movl $0x8, %esi
callq 0x1875d
movl %eax, %ebp
movq %rbx, %rdi
movl $0x8, %esi
callq 0x1875d
movl %eax, %r13d
movq %rbx, %rdi
movl $0x1f, %esi
callq 0x2536c
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
movq %r12, 0x8(%rsp)
ja 0x2659a
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %ecx           # imm = 0x2542
subl %eax, %ecx
movswq %cx, %rsi
movslq %r12d, %rax
leaq 0x11615(%rip), %rcx     # 0x37b28
movslq (%rcx,%rax,4), %r8
addq %rcx, %r8
movl %ebp, %r9d
shrl $0x7, %r9d
movl %ebp, %r10d
shrl $0x6, %r10d
andl $0x1, %r10d
movl %ebp, %r11d
shrl $0x5, %r11d
andl $0x1, %r11d
movl %ebp, %r14d
shrl $0x4, %r14d
andl $0x1, %r14d
movl %ebp, %r15d
shrl $0x3, %r15d
andl $0x1, %r15d
movl %ebp, %r12d
shrl $0x2, %r12d
andl $0x1, %r12d
vcvtsi2ss %r13d, %xmm0, %xmm0
vdivss 0x131eb(%rip), %xmm0, %xmm0 # 0x39750
vcvtss2sd %xmm0, %xmm0, %xmm0
subq $0x8, %rsp
leaq 0x139bf(%rip), %rdx     # 0x39f33
movq 0x10(%rsp), %rcx
movb $0x1, %al
pushq %r12
movq 0x18(%rsp), %r12
pushq %r15
pushq %r14
pushq %r11
pushq %r10
callq 0x1070
addq $0x30, %rsp
addw %ax, 0x7cb0(%rbx)
leal -0x42(%r12), %eax
cmpl $0x16, %eax
ja 0x265f1
movl $0x400801, %ecx         # imm = 0x400801
btl %eax, %ecx
jae 0x265f1
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x2683b
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %ecx           # imm = 0x2542
subl %eax, %ecx
movswq %cx, %rsi
leaq 0x13a58(%rip), %rdx     # 0x3a036
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
jmp 0x2683b
movq %rbx, %rdi
movl $0x3, %esi
callq 0x2536c
movb %al, 0x20(%rsp)
movb %al, 0x28(%rsp)
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x2666b
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
movsbl %al, %ecx
movsbq %al, %rax
leaq 0x118ee(%rip), %rdx     # 0x37f28
movslq (%rdx,%rax,4), %r8
addq %rdx, %r8
cmpb $0x1, %cl
leaq 0x14214(%rip), %rax     # 0x3a85f
leaq 0x10f38(%rip), %r9      # 0x3758a
cmoveq %rax, %r9
leaq 0x1392c(%rip), %rdx     # 0x39f89
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
cmpb $0x3, 0x20(%rsp)
jne 0x266c3
movq %rbx, %rdi
callq 0x2551d
leal (%rax,%rax,2), %ecx
negl %ecx
addb $0x3, %cl
movb %cl, 0x28(%rsp)
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x266c3
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
leaq 0x138f6(%rip), %rdx     # 0x39fa9
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
movl $0x6, %esi
callq 0x2536c
addb $0x8, %al
movb %al, 0x21(%rsp)
movq %rbx, %rdi
movl $0x6, %esi
callq 0x2536c
addb $0x8, %al
movb %al, 0x22(%rsp)
movq %rbx, %rdi
callq 0x2551d
movb %al, 0x29(%rsp)
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x26767
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
movsbl 0x21(%rsp), %ecx
cmpl $0x8, %ecx
movsbl 0x22(%rsp), %r8d
leaq 0x1412f(%rip), %rdx     # 0x3a85f
leaq 0x10e53(%rip), %r10     # 0x3758a
movq %r10, %r9
cmoveq %rdx, %r9
movsbl %al, %r11d
testb $-0x1, %r11b
cmoveq %rdx, %r10
leaq 0x1387a(%rip), %rdx     # 0x39fcb
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x1070
addq $0x10, %rsp
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
testl %eax, %eax
je 0x2683b
leaq 0x250(%rsp), %r14
vmovaps 0xcd09(%rip), %xmm0     # 0x33490
vmovaps %xmm0, (%r14)
vmovaps 0xcd0c(%rip), %xmm0     # 0x334a0
vmovaps %xmm0, 0x30(%r14)
vmovups 0x11cae(%rip), %ymm0    # 0x38450
vmovups %ymm0, 0x60(%r14)
vmovups 0x11cc0(%rip), %ymm0    # 0x38470
vmovups %ymm0, 0x80(%r14)
vmovups 0x11cef(%rip), %ymm0    # 0x384b0
vmovups %ymm0, 0xc0(%r14)
vmovups 0x11cbe(%rip), %ymm0    # 0x38490
vmovups %ymm0, 0xa0(%r14)
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x26818
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %ecx           # imm = 0x2542
subl %eax, %ecx
movswq %cx, %rsi
leaq 0x13818(%rip), %rdx     # 0x3a01f
xorl %eax, %eax
vzeroupper
callq 0x1070
addw %ax, 0x7cb0(%rbx)
leaq 0x2b0(%rsp), %rdx
movsbl -0x290(%rdx), %r8d
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %ecx
vzeroupper
callq 0x25fe3
movq %rbx, %rdi
movl $0xc, %esi
callq 0x2536c
addb $0x4, %al
movb %al, 0x2a(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x2536c
movb %al, 0x2b(%rsp)
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x268a3
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
movsbl 0x2a(%rsp), %ecx
movsbl %al, %r8d
leaq 0x137f3(%rip), %rdx     # 0x3a088
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movzbl 0x2b(%rsp), %eax
cmpl $0x1, %eax
movl %ebp, 0x1c(%rsp)
movl %r13d, 0x10(%rsp)
je 0x26911
testl %eax, %eax
jne 0x26a5e
movq %rbx, %rdi
movl $0xc, %esi
callq 0x2536c
addb $0x4, %al
movb %al, 0x2c(%rsp)
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x26a5e
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
movsbl %al, %ecx
leaq 0x137b6(%rip), %rdx     # 0x3a0bb
xorl %eax, %eax
callq 0x1070
jmp 0x26a57
movq %rbx, %rdi
callq 0x2551d
movb %al, 0x2d(%rsp)
movq %rbx, %rdi
movl $0xffff8000, %esi       # imm = 0xFFFF8000
movl $0x7fff, %edx           # imm = 0x7FFF
callq 0x2555d
movw %ax, 0x3c(%rsp)
movq %rbx, %rdi
movl $0xffff8000, %esi       # imm = 0xFFFF8000
movl $0x7fff, %edx           # imm = 0x7FFF
callq 0x2555d
movw %ax, 0x3e(%rsp)
movq %rbx, %rdi
movl $0xff, %esi
callq 0x2536c
movb %al, 0x2e(%rsp)
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x269a7
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %ecx           # imm = 0x2542
subl %eax, %ecx
movswq %cx, %rsi
movsbl 0x2d(%rsp), %ecx
movswl 0x3c(%rsp), %r8d
movswl 0x3e(%rsp), %r9d
leaq 0x13744(%rip), %rdx     # 0x3a0dd
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
cmpb $0x0, 0x2e(%rsp)
je 0x26a1f
leaq 0x7cb2(%rbx), %r14
leaq 0x137a6(%rip), %r13     # 0x3a162
xorl %r12d, %r12d
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0xffff0001, %esi       # imm = 0xFFFF0001
movl $0xffff, %edx           # imm = 0xFFFF
callq 0x2555d
movl %eax, %ebp
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x26a09
movq %rax, %rdi
addq %r14, %rdi
movl $0x2542, %ecx           # imm = 0x2542
subl %eax, %ecx
movswq %cx, %rsi
movq %r13, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
addl %ebp, %r15d
movw %r15w, 0x4a(%rsp,%r12,2)
movzbl 0x2e(%rsp), %eax
incq %r12
cmpq %rax, %r12
jb 0x269c2
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2542, %rax           # imm = 0x2542
movq 0x8(%rsp), %r12
jae 0x26a5e
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %ecx           # imm = 0x2542
subl %eax, %ecx
movswq %cx, %rsi
leaq 0x13e00(%rip), %rdx     # 0x3a850
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movl $0x10, %r13d
movq %rbx, %rdi
movl $0x10, %esi
callq 0x2536c
movb %al, 0x2f(%rsp)
movq %rbx, %rdi
callq 0x2551d
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3fe, %esi            # imm = 0x3FE
callq 0x2536c
incl %eax
movw %ax, 0x24(%rsp)
movb 0x30(%rsp), %al
movl $0x20f, %ecx            # imm = 0x20F
shlxl %eax, %ecx, %esi
movq %rbx, %rdi
callq 0x2536c
movl %eax, %r14d
movq %rbx, %rdi
callq 0x2551d
movl %eax, %r8d
movb %r8b, 0x30(%rsp)
leal 0x2(,%r14,2), %eax
sarxl %r8d, %eax, %ecx
movw %cx, 0x26(%rsp)
movl 0x10(%rsp), %edx
cmpl $0x3f, %edx
movl $0x3f, %eax
cmovll %edx, %eax
cltq
leaq 0x1145a(%rip), %rdx     # 0x37f40
movl (%rdx,%rax,4), %eax
movzwl 0x24(%rsp), %r9d
movswl %cx, %r10d
movl %r10d, %ecx
imull %r9d, %ecx
xorl %edx, %edx
divl %ecx
cmpl $0x10, %eax
cmovll %eax, %r13d
leal -0x56(%r12), %eax
cmpl $0x24, %eax
ja 0x26b2b
movabsq $0x1001004001, %rcx     # imm = 0x1001004001
btq %rax, %rcx
jae 0x26b2b
testb $0x10, 0x1c(%rsp)
je 0x26b3a
xorl %r13d, %r13d
jmp 0x26b3a
cmpl $0xf4, %r12d
je 0x26b1f
cmpl $0x2c, %r12d
je 0x26b1f
movb %r13b, 0x34(%rsp)
movsbl 0x2f(%rsp), %ecx
movzbl %r13b, %eax
cmpb %cl, %al
cmovlel %ecx, %eax
incb %al
movb %al, 0x33(%rsp)
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x26bb7
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %eax, %edx
movswq %dx, %rsi
movsbl %r8b, %r11d
testb %r8b, %r8b
leaq 0x10a04(%rip), %rax     # 0x3758a
leaq 0x13cd2(%rip), %r14     # 0x3a85f
cmoveq %rax, %r14
subq $0x8, %rsp
leaq 0x135ca(%rip), %rdx     # 0x3a166
movl %ebp, %r8d
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
callq 0x1070
addq $0x20, %rsp
addw %ax, 0x7cb0(%rbx)
cmpb $0x0, 0x30(%rsp)
jne 0x26c08
movq %rbx, %rdi
callq 0x2551d
movb %al, 0x31(%rsp)
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x26c08
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
movsbl %al, %ecx
leaq 0x135f8(%rip), %rdx     # 0x3a1f2
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
movb %al, 0x32(%rsp)
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x26c52
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
movsbl %al, %ecx
leaq 0x135d2(%rip), %rdx     # 0x3a216
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
testl %eax, %eax
je 0x26d75
movb 0x28(%rsp), %al
xorl %r15d, %r15d
cmpb $0x1, %al
sete %r15b
decb %al
cmpb $0x2, %al
setb %r12b
subl 0x30(%rsp), %r15d
movzwl 0x24(%rsp), %eax
shll $0x4, %eax
shrxl %r12d, %eax, %r14d
decl %r14d
movswl 0x26(%rsp), %eax
shll $0x4, %eax
incb %r15b
sarxl %r15d, %eax, %ebp
decl %ebp
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2536c
shlxl %r12d, %eax, %eax
movw %ax, 0x24e(%rsp)
cwtl
sarxl %r12d, %eax, %eax
subl %eax, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2536c
shlxl %r12d, %eax, %eax
movq 0x8(%rsp), %r12
movw %ax, 0x24a(%rsp)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2536c
shlxl %r15d, %eax, %eax
movw %ax, 0x248(%rsp)
cwtl
sarxl %r15d, %eax, %eax
subl %eax, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2536c
shlxl %r15d, %eax, %eax
movw %ax, 0x24c(%rsp)
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x26d75
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
movswl 0x24e(%rsp), %ecx
movswl 0x24a(%rsp), %r8d
movswl 0x248(%rsp), %r9d
movswl %ax, %r10d
subq $0x8, %rsp
leaq 0x134d6(%rip), %rdx     # 0x3a237
xorl %eax, %eax
pushq %r10
callq 0x1070
addq $0x10, %rsp
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
movswq 0x7cb0(%rbx), %rcx
testl %eax, %eax
je 0x26df0
movzwl %cx, %eax
cmpl $0x2541, %eax           # imm = 0x2541
ja 0x26dbb
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %esi           # imm = 0x2542
subq %rcx, %rsi
leaq 0x134cc(%rip), %rdx     # 0x3a279
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
testl %eax, %eax
je 0x26e84
movq %rbx, %rdi
movl $0x8, %esi
callq 0x1875d
movl %eax, %ebp
cmpl $0xff, %eax
jne 0x26e2e
movq %rbx, %rdi
movl $0x20, %esi
callq 0x1875d
jmp 0x26e3d
movzwl %cx, %eax
cmpl $0x2541, %eax           # imm = 0x2541
ja 0x27497
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %eax           # imm = 0x2542
subl %ecx, %eax
movswq %ax, %rsi
movsbl 0x34(%rsp), %ecx
movsbl 0x33(%rsp), %r8d
decl %r8d
leaq 0x13463(%rip), %rdx     # 0x3a28c
jmp 0x27489
movl %ebp, %eax
andl $0x1f, %eax
leaq 0x12796(%rip), %rcx     # 0x395d0
movl (%rcx,%rax,4), %eax
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x26e84
movzwl %ax, %r9d
shrl $0x10, %eax
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
leaq 0x14047(%rip), %rdx     # 0x3aeb8
movl %ebp, %ecx
movl %eax, %r8d
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
testl %eax, %eax
je 0x26e9a
movq %rbx, %rdi
callq 0x2551d
jmp 0x26e9f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x26edc
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
leaq 0x14020(%rip), %rdx     # 0x3aeec
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
testl %eax, %eax
je 0x27027
movq %rbx, %rdi
movl $0x3, %esi
callq 0x1875d
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2551d
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x26f54
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
movslq %ebp, %rcx
leaq 0x1271d(%rip), %rdx     # 0x39650
movslq (%rdx,%rcx,4), %r8
addq %rdx, %r8
leaq 0x13fce(%rip), %rdx     # 0x3af0f
movl %ebp, %ecx
movl %eax, %r9d
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
testl %eax, %eax
je 0x27027
movq %rbx, %rdi
movl $0x18, %esi
callq 0x1875d
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x27027
movl $0xff, %edx
movl %eax, %r10d
andl %edx, %r10d
movl %eax, %r9d
shrl $0x8, %r9d
andl %edx, %r9d
shrl $0x10, %eax
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
cmpl $0x17, %eax
movl $0x17, %ecx
cmovll %eax, %ecx
leaq 0x126ab(%rip), %rdx     # 0x39670
movslq (%rdx,%rcx,4), %r8
addq %rdx, %r8
cmpl $0x12, %r9d
movl $0x12, %ecx
cmovll %r9d, %ecx
leaq 0x126f0(%rip), %rdx     # 0x396d0
movslq (%rdx,%rcx,4), %r11
addq %rdx, %r11
cmpl $0xc, %r10d
movl $0xc, %ecx
cmovll %r10d, %ecx
leaq 0x12721(%rip), %rdx     # 0x3971c
movslq (%rdx,%rcx,4), %r14
addq %rdx, %r14
subq $0x8, %rsp
leaq 0x13f3b(%rip), %rdx     # 0x3af48
movl %eax, %ecx
xorl %eax, %eax
pushq %r14
pushq %r10
pushq %r11
callq 0x1070
addq $0x20, %rsp
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
testl %eax, %eax
je 0x2708f
movq %rbx, %rdi
movl $0x5, %esi
callq 0x2536c
movl %eax, %ebp
movq %rbx, %rdi
movl $0x5, %esi
callq 0x2536c
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x2708f
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
leaq 0x13f32(%rip), %rdx     # 0x3afae
movl %ebp, %ecx
movl %eax, %r8d
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
testl %eax, %eax
je 0x27118
movq %rbx, %rdi
movl $0x20, %esi
callq 0x1875d
cmpl $0x1, %eax
adcl $0x0, %eax
movl %eax, 0x40(%rsp)
movq %rbx, %rdi
movl $0x20, %esi
callq 0x1875d
cmpl $0x1, %eax
adcl $0x0, %eax
movl %eax, 0x44(%rsp)
movq %rbx, %rdi
callq 0x2551d
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x27118
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
movl 0x40(%rsp), %ecx
movl 0x44(%rsp), %r8d
leaq 0x13ed5(%rip), %rdx     # 0x3afdc
movl %eax, %r9d
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
movl %eax, %ebp
testl %eax, %eax
je 0x27179
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x27160
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %ecx           # imm = 0x2542
subl %eax, %ecx
movswq %cx, %rsi
leaq 0x13ed6(%rip), %rdx     # 0x3b028
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
leaq 0x35(%rsp), %rdx
leaq 0x14290(%rip), %rcx     # 0x3b3fc
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x31eae
movq %rbx, %rdi
callq 0x2551d
movl %eax, %r14d
testl %eax, %eax
je 0x271db
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x271c2
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %ecx           # imm = 0x2542
subl %eax, %ecx
movswq %cx, %rsi
leaq 0x13e8d(%rip), %rdx     # 0x3b041
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
leaq 0x36(%rsp), %rdx
leaq 0x1422e(%rip), %rcx     # 0x3b3fc
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x31eae
orl %ebp, %r14d
je 0x27225
movq %rbx, %rdi
callq 0x2551d
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x27225
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
leaq 0x14213(%rip), %rdx     # 0x3b428
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
movb %al, 0x3b(%rsp)
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x2726f
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
movsbl %al, %ecx
leaq 0x141e5(%rip), %rdx     # 0x3b446
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
testl %eax, %eax
je 0x2744f
movq %rbx, %rdi
callq 0x2551d
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x272c4
leaq (%rbx,%rcx), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
leaq 0x13da6(%rip), %rdx     # 0x3b05a
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movsbl 0x21(%rsp), %eax
shll $0x8, %eax
movb 0x20(%rsp), %cl
movl $0x40, %edx
shlxl %ecx, %edx, %ecx
andl $-0x80, %ecx
movsbl 0x22(%rsp), %ebp
imull %ecx, %ebp
addl %eax, %ebp
movq %rbx, %rdi
movl $0x10, %esi
callq 0x2536c
testl %eax, %eax
je 0x2734c
movl %eax, %ecx
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x2734c
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %eax, %edx
movswq %dx, %rsi
movzwl 0x24(%rsp), %edx
movswl 0x26(%rsp), %eax
imull %edx, %eax
imull %ebp, %eax
shll $0x3, %ecx
cltd
idivl %ecx
leaq 0x13d4f(%rip), %rdx     # 0x3b08b
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
movl $0x10, %esi
callq 0x2536c
testl %eax, %eax
je 0x273a3
movl %eax, %ecx
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x273a3
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %eax, %edx
movswq %dx, %rsi
subl $-0x80, %ebp
movl %ebp, %eax
cltd
idivl %ecx
leaq 0x13d13(%rip), %rdx     # 0x3b0a6
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
movl $0xf, %esi
callq 0x2536c
movl %eax, %ebp
movq %rbx, %rdi
movl $0xf, %esi
callq 0x2536c
movl %eax, %r15d
movq %rbx, %rdi
movl $0x10, %esi
callq 0x2536c
movb %al, 0x34(%rsp)
movq %rbx, %rdi
movl $0x10, %esi
callq 0x2536c
movzbl 0x2f(%rsp), %ecx
movsbl 0x34(%rsp), %r9d
cmpb %r9b, %cl
cmovlel %r9d, %ecx
movsbl %cl, %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
incb %cl
movb %cl, 0x33(%rsp)
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x27497
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %edx           # imm = 0x2542
subl %eax, %edx
movswq %dx, %rsi
movsbl %cl, %r10d
decl %r10d
subq $0x8, %rsp
leaq 0x13c84(%rip), %rdx     # 0x3b0bf
movl %ebp, %ecx
movl %r15d, %r8d
xorl %eax, %eax
pushq %r10
callq 0x1070
addq $0x10, %rsp
jmp 0x27490
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x27497
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %ecx           # imm = 0x2542
subl %eax, %ecx
movswq %cx, %rsi
movsbl 0x34(%rsp), %ecx
movsbl 0x33(%rsp), %r8d
decl %r8d
leaq 0x13cc0(%rip), %rdx     # 0x3b149
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
cmpb $0xf, 0x22(%rbx)
jne 0x27b43
movl $0x5f, %ebp
leal -0x76(%r12), %eax
cmpl $0x10, %eax
ja 0x27e60
movl $0x10401, %ecx          # imm = 0x10401
btl %eax, %ecx
jae 0x27e60
movq 0x20(%rsp), %rax
cmpq 0x530(%rbx), %rax
jne 0x27e60
movq %rbx, %rdi
callq 0x2551d
testl %eax, %eax
je 0x27e54
movq %rbx, %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x2536c
leal 0x1(%rax), %ebp
cmpl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
ja 0x27563
leaq 0x7cb2(%rbx), %r14
leaq 0x13d4f(%rip), %r15     # 0x3b258
leaq 0x135df(%rip), %r12     # 0x3aaef
xorl %r13d, %r13d
movq %rbx, %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x2536c
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x2755b
movq %rcx, %rdi
addq %r14, %rdi
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
testl %r13d, %r13d
movq %r12, %rdx
cmoveq %r15, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
incl %r13d
cmpl %r13d, %ebp
jne 0x27513
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x275b2
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %ecx           # imm = 0x2542
subl %eax, %ecx
movswq %cx, %rsi
cmpl $0x2, %ebp
leaq 0x132cd(%rip), %rax     # 0x3a85f
leaq 0xfff1(%rip), %rcx      # 0x3758a
cmoveq %rax, %rcx
leaq 0x13cc4(%rip), %rdx     # 0x3b268
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
cmpl $0x2, %ebp
jne 0x27e5b
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2536c
movl %eax, %ebp
testl %eax, %eax
je 0x275db
movq %rbx, %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x2536c
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2536c
movl %eax, %r12d
testl %eax, %eax
je 0x275fc
movq %rbx, %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x2536c
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2536c
movl %eax, %r13d
testl %eax, %eax
je 0x2761d
movq %rbx, %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x2536c
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2536c
movl %eax, %r14d
testl %eax, %eax
je 0x2763e
movq %rbx, %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x2536c
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x2768a
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %ecx           # imm = 0x2542
subl %eax, %ecx
movswq %cx, %rsi
subq $0x8, %rsp
leaq 0x13bff(%rip), %rdx     # 0x3b26d
movl %ebp, %ecx
movl %r12d, %r8d
movl %r13d, %r9d
xorl %eax, %eax
pushq %r14
callq 0x1070
addq $0x10, %rsp
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
movl $0x3f, %esi
callq 0x2536c
testl %eax, %eax
js 0x27846
leaq 0x7cb2(%rbx), %r15
leaq 0x13c73(%rip), %r12     # 0x3b320
leaq 0x1312b(%rip), %rbp     # 0x3a7df
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl $0x8, %esi
callq 0x1875d
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x2770c
movq %rcx, %rdi
addq %r15, %rdi
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
vcvtsi2ss %eax, %xmm1, %xmm0
vdivss 0x1205d(%rip), %xmm0, %xmm0 # 0x39750
vcvtss2sd %xmm0, %xmm0, %xmm0
leaq 0x13bd6(%rip), %rdx     # 0x3b2d4
movb $0x1, %al
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x2536c
movl %eax, %r13d
testl %eax, %eax
js 0x27836
movq %rbx, %rdi
movl $0x3, %esi
callq 0x1875d
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x27769
movq %rcx, %rdi
addq %r15, %rdi
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
leaq 0x13ba5(%rip), %rdx     # 0x3b2fe
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x2536c
testl %eax, %eax
js 0x277d1
movl %eax, %r14d
incl %r14d
movq %rbx, %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x2536c
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x277c9
movq %rcx, %rdi
addq %r15, %rdi
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
cmpl $0x1, %r14d
movq %rbp, %rdx
cmoveq %r12, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
decl %r14d
testl %r14d, %r14d
jg 0x27780
movq %rbx, %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x2536c
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2542, %rcx           # imm = 0x2542
jae 0x27826
incl %eax
movq %rcx, %rdi
addq %r15, %rdi
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
testl %r13d, %r13d
leaq 0x13b26(%rip), %rdx     # 0x3b331
leaq 0x13b24(%rip), %rcx     # 0x3b336
cmoveq %rcx, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
leal -0x1(%r13), %eax
testl %r13d, %r13d
movl %eax, %r13d
jg 0x27724
movq 0x10(%rsp), %rcx
leal -0x1(%rcx), %eax
testl %ecx, %ecx
jg 0x276b4
cmpl $0x86, 0x8(%rsp)
movl $0x5f, %ebp
je 0x27e60
movq %rbx, %rdi
callq 0x2551d
testl %eax, %eax
je 0x27b39
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x278a3
leaq (%rbx,%rax), %rdi
addq $0x7cb2, %rdi           # imm = 0x7CB2
movl $0x2542, %ecx           # imm = 0x2542
subl %eax, %ecx
movswq %cx, %rsi
leaq 0x13aa7(%rip), %rdx     # 0x3b33c
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x2536c
testl %eax, %eax
js 0x27b39
leaq 0x7cb2(%rbx), %r13
leaq 0x12ebf(%rip), %r15     # 0x3a785
leaq 0x12f12(%rip), %r14     # 0x3a7df
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x1875d
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x27917
movq %rcx, %rdi
addq %r13, %rdi
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
leaq 0x13a52(%rip), %rdx     # 0x3b359
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x2536c
testl %eax, %eax
js 0x2797a
movl %eax, %ebp
incl %ebp
movq %rbx, %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x2536c
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x27974
movq %rcx, %rdi
addq %r13, %rdi
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
cmpl $0x1, %ebp
movq %r14, %rdx
cmoveq %r15, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
decl %ebp
testl %ebp, %ebp
jg 0x2792c
movq %rbx, %rdi
callq 0x2551d
testl %eax, %eax
je 0x279eb
movq %rbx, %rdi
movl $0x20, %esi
callq 0x1875d
movl %eax, %ebp
movq %rbx, %rdi
movl $0x20, %esi
callq 0x1875d
movl %eax, %r12d
movq %rbx, %rdi
callq 0x2551d
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x279eb
movq %rcx, %rdi
addq %r13, %rdi
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
leaq 0x139b0(%rip), %rdx     # 0x3b385
movl %ebp, %ecx
movl %r12d, %r8d
movl %eax, %r9d
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
movl %eax, %ebp
testl %eax, %eax
je 0x27a47
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x27a2e
movq %rax, %rdi
addq %r13, %rdi
movl $0x2542, %ecx           # imm = 0x2542
subl %eax, %ecx
movswq %cx, %rsi
leaq 0x139b7(%rip), %rdx     # 0x3b3d7
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x35(%rsp), %rdx
leaq 0x139b8(%rip), %rcx     # 0x3b3fa
callq 0x31eae
movq %rbx, %rdi
callq 0x2551d
movl %eax, %r12d
testl %eax, %eax
je 0x27aa4
movzwl 0x7cb0(%rbx), %eax
cmpq $0x2541, %rax           # imm = 0x2541
ja 0x27a8b
movq %rax, %rdi
addq %r13, %rdi
movl $0x2542, %ecx           # imm = 0x2542
subl %eax, %ecx
movswq %cx, %rsi
leaq 0x13986(%rip), %rdx     # 0x3b403
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x36(%rsp), %rdx
leaq 0x1395b(%rip), %rcx     # 0x3b3fa
callq 0x31eae
orl %ebp, %r12d
je 0x27ae9
movq %rbx, %rdi
callq 0x2551d
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x27ae9
movq %rcx, %rdi
addq %r13, %rdi
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
leaq 0x1394d(%rip), %rdx     # 0x3b426
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq %rbx, %rdi
callq 0x2551d
movzwl 0x7cb0(%rbx), %ecx
cmpq $0x2541, %rcx           # imm = 0x2541
ja 0x27b29
movq %rcx, %rdi
addq %r13, %rdi
movl $0x2542, %edx           # imm = 0x2542
subl %ecx, %edx
movswq %dx, %rsi
leaq 0x1392b(%rip), %rdx     # 0x3b444
movl %eax, %ecx
xorl %eax, %eax
callq 0x1070
addw %ax, 0x7cb0(%rbx)
movq 0x8(%rsp), %rcx
leal -0x1(%rcx), %eax
testl %ecx, %ecx
jg 0x278cd
movq %rbx, %rdi
callq 0x2551d
jmp 0x27b87
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shlxq %rax, %rdx, %rdx
blsrq %rcx, %rsi
movl $0x4a, %ebp
orq %rdx, %rsi
jne 0x27e60
tzcntq %rcx, %rcx
movl (%rbx), %edx
subl 0x8(%rbx), %edx
addl %eax, %ecx
leal (%rcx,%rdx,8), %eax
addl $0xffffff78, %eax       # imm = 0xFFFFFF78
cmpl $-0x10, %eax
jb 0x27e60
cmpw $0x2541, 0x7cb0(%rbx)   # imm = 0x2541
movl $0x5f, %ebp
ja 0x27e60
cmpb $0x1, 0x28(%rsp)
jne 0x27e60
movsbl 0x21(%rsp), %eax
movsbl 0x22(%rsp), %ecx
addl %eax, %ecx
cmpl $0x10, %ecx
jne 0x27e60
cmpb $0x0, 0x29(%rsp)
jne 0x27e60
cmpb $0x0, 0x30(%rsp)
je 0x27e60
movq 0x20(%rsp), %rax
cmpq 0x530(%rbx), %rax
jne 0x27bf4
movq 0x248(%rsp), %rax
cmpq 0x758(%rbx), %rax
je 0x27e01
movl 0x64(%rbx), %eax
testl %eax, %eax
je 0x27c1a
movl 0x58(%rbx), %ecx
movl %ecx, %edx
tzcntl %eax, %ecx
movl 0x3d0(%rbx,%rcx,4), %ecx
cmpl %ecx, %edx
cmovgl %edx, %ecx
blsrl %eax, %eax
jne 0x27bfe
movl %ecx, 0x58(%rbx)
cmpw $0x0, 0x1648(%rbx)
je 0x27c61
movl $0xb, %ebp
cmpl $0x0, 0x18(%rsp)
jne 0x27e60
cmpw $0x0, 0x1648(%rbx)
je 0x27c61
leaq 0x1618(%rbx), %r14
leaq 0x1590(%rbx), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x1050
cmpw $0x0, 0x1648(%rbx)
jne 0x27c4c
movl 0x68(%rbx), %eax
movl $0x69, %ebp
orl 0x64(%rbx), %eax
jne 0x27e60
movq 0x248(%rsp), %rsi
movq %rsi, 0x520(%rbx)
movzwl 0x24(%rsp), %eax
movl %eax, %r8d
shll $0x4, %r8d
movswl 0x26(%rsp), %ecx
movl %ecx, %edx
shll $0x4, %edx
cmpb $0x9, 0x21(%rsp)
setge %r10b
setge 0x508(%rbx)
movzwl 0x526(%rbx), %edi
movzwl 0x522(%rbx), %r11d
addl %edi, %r11d
movl %r8d, %r9d
subl %r11d, %r9d
movw %r9w, 0x50a(%rbx)
addl 0x524(%rbx), %esi
movl %edx, %edi
subl %esi, %edi
movw %di, 0x50e(%rbx)
shlxl %r10d, %r8d, %esi
leal 0x10(%r8), %r11d
testl $0x7f0, %esi            # imm = 0x7F0
shlxl %r10d, %r11d, %r10d
cmovnel %esi, %r10d
movw %r10w, 0x512(%rbx)
movswl %r10w, %esi
imull %edx, %esi
movl %esi, 0x2c(%rbx)
movb 0x20(%rsp), %r10b
testb %r10b, %r10b
jle 0x27d9a
cmpb $0x9, 0x22(%rsp)
setge %r11b
setge 0x509(%rbx)
movl %eax, %r14d
shll $0x5, %r14d
xorl %r15d, %r15d
cmpb $0x3, %r10b
sete %r15b
setne %bpl
movswl %r9w, %r9d
sarxl %ebp, %r9d, %r9d
movw %r9w, 0x50c(%rbx)
cmovnel %r8d, %r14d
shlxl %r11d, %r14d, %r8d
testl $0xff0, %r8d            # imm = 0xFF0
leal 0x8(%r14,%r15,8), %r9d
shlxl %r11d, %r9d, %r9d
cmovnel %r8d, %r9d
movw %r9w, 0x514(%rbx)
leal (,%rcx,8), %r8d
cmpb $0x1, %r10b
sete %r10b
movswl %di, %edi
sarxl %r10d, %edi, %edi
movw %di, 0x510(%rbx)
cmovel %r8d, %edx
movswl %r9w, %edi
imull %edx, %edi
movl %edi, 0x30(%rbx)
incl %eax
movl 0x30(%rbx), %edx
imull %eax, %ecx
imull $0x130, %ecx, %eax      # imm = 0x130
addl %esi, %eax
addl %edx, %eax
addl $0xfffffed0, %eax       # imm = 0xFFFFFED0
movl %eax, 0x34(%rbx)
movb $-0x1, 0x24(%rbx)
movq $-0x1, 0x3c(%rbx)
xorl %r14d, %r14d
movq %r14, 0x48(%rbx)
movl %r14d, 0x78(%rbx)
movl %r14d, 0x6c(%rbx)
movq %r14, 0x5c(%rbx)
movq %r14, 0x940(%rbx)
movq 0x188(%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x27df8
callq 0x1030
movq $0x0, 0x188(%rbx,%r14,8)
incq %r14
cmpq $0x20, %r14
jne 0x27dda
leaq 0x530(%rbx), %rax
leaq 0x940(%rbx), %rdi
cmpb $0x7, 0x22(%rbx)
cmoveq %rax, %rdi
leaq 0x20(%rsp), %rsi
movl $0x410, %edx            # imm = 0x410
callq 0x10c0
movzwl 0x7cb0(%rbx), %eax
movw $0x0, 0x7cb0(%rbx)
xorl %ebp, %ebp
cmpw $0x2541, %ax            # imm = 0x2541
ja 0x27e60
leaq 0x7cb2(%rbx), %rdi
movq 0x7ca8(%rbx), %rsi
callq *0x7ca0(%rbx)
jmp 0x27e60
movl $0x4a, %ebp
jmp 0x27e60
movl $0x5f, %ebp
movl %ebp, %eax
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq