// File: /workspace/github_c_makefile_star2_O0/tvlabs[P]edge264/edge264_headers.c
// Function: parse_vui_parameters
static void parse_vui_parameters(Edge264Decoder *dec, Edge264SeqParameterSet *sps)
{
	static const unsigned ratio2sar[32] = {0, 0x00010001, 0x000c000b,
		0x000a000b, 0x0010000b, 0x00280021, 0x0018000b, 0x0014000b, 0x0020000b,
		0x00500021, 0x0012000b, 0x000f000b, 0x00400021, 0x00a00063, 0x00040003,
		0x00030002, 0x00020001};
	static const char * const video_format_names[8] = {"Component", "PAL",
		"NTSC", "SECAM", "MAC", [5 ... 7] = "Unknown"};
	static const char * const colour_primaries_names[] = {
		[0 ... 23] = "Unknown",
		[1] = "ITU-R BT.709-5",
		[4] = "ITU-R BT.470-6 System M",
		[5] = "ITU-R BT.470-6 System B, G",
		[6 ... 7] = "ITU-R BT.601-6 525",
		[8] = "Generic film",
		[9] = "ITU-R BT.2020-2",
		[10] = "CIE 1931 XYZ",
		[11] = "Society of Motion Picture and Television Engineers RP 431-2",
		[12] = "Society of Motion Picture and Television Engineers EG 432-1",
		[22] = "EBU Tech. 3213-E",
	};
	static const char * const transfer_characteristics_names[] = {
		[0 ... 18] = "Unknown",
		[1] = "ITU-R BT.709-5",
		[4] = "ITU-R BT.470-6 System M",
		[5] = "ITU-R BT.470-6 System B, G",
		[6] = "ITU-R BT.601-6 525 or 625",
		[7] = "Society of Motion Picture and Television Engineers 240M",
		[8] = "Linear transfer characteristics",
		[9] = "Logarithmic transfer characteristic (100:1 range)",
		[10] = "Logarithmic transfer characteristic (100 * Sqrt( 10 ) : 1 range)",
		[11] = "IEC 61966-2-4",
		[12] = "ITU-R BT.1361-0",
		[13] = "IEC 61966-2-1 sRGB or sYCC",
		[14] = "ITU-R BT.2020-2 (10 bit system)",
		[15] = "ITU-R BT.2020-2 (12 bit system)",
		[16] = "Society of Motion Picture and Television Engineers ST 2084",
		[17] = "Society of Motion Picture and Television Engineers ST 428-1",
	};
	static const char * const matrix_coefficients_names[] = {
		[0 ... 12] = "Unknown",
		[1] = "Kr = 0.2126; Kb = 0.0722",
		[4] = "Kr = 0.30; Kb = 0.11",
		[5 ... 6] = "Kr = 0.299; Kb = 0.114",
		[7] = "Kr = 0.212; Kb = 0.087",
		[8] = "YCgCo",
		[9] = "Kr = 0.2627; Kb = 0.0593 (non-constant luminance)",
		[10] = "Kr = 0.2627; Kb = 0.0593 (constant luminance)",
		[11] = "Y'D'zD'x",
	};
	
	if (get_u1(&dec->_gb)) {
		int aspect_ratio_idc = get_uv(&dec->_gb, 8);
		unsigned sar = (aspect_ratio_idc == 255) ? get_uv(&dec->_gb, 32) : ratio2sar[aspect_ratio_idc & 31];
		int sar_width = sar >> 16;
		int sar_height = sar & 0xffff;
		log_dec(dec, "    aspect_ratio: {idc: %u, width: %u, height: %u}\n",
			aspect_ratio_idc, sar_width, sar_height);
	}
	int overscan_appropriate_flag = -1;
	if (get_u1(&dec->_gb))
		overscan_appropriate_flag = get_u1(&dec->_gb);
	log_dec(dec, "    overscan_appropriate_flag: %d\n",
		overscan_appropriate_flag);
	if (get_u1(&dec->_gb)) {
		int video_format = get_uv(&dec->_gb, 3);
		int video_full_range_flag = get_u1(&dec->_gb);
		log_dec(dec, "    video_format: %u # %s\n"
			"    video_full_range_flag: %u\n",
			video_format, video_format_names[video_format],
			video_full_range_flag);
		if (get_u1(&dec->_gb)) {
			unsigned desc = get_uv(&dec->_gb, 24);
			int colour_primaries = desc >> 16;
			int transfer_characteristics = (desc >> 8) & 0xff;
			int matrix_coefficients = desc & 0xff;
			log_dec(dec, "    colour_primaries: %u # %s\n"
				"    transfer_characteristics: %u # %s\n"
				"    matrix_coefficients: %u # %s\n",
				colour_primaries, colour_primaries_names[min(colour_primaries, 23)],
				transfer_characteristics, transfer_characteristics_names[min(transfer_characteristics, 18)],
				matrix_coefficients, matrix_coefficients_names[min(matrix_coefficients, 12)]);
		}
	}
	if (get_u1(&dec->_gb)) {
		int chroma_sample_loc_type_top_field = get_ue16(&dec->_gb, 5);
		int chroma_sample_loc_type_bottom_field = get_ue16(&dec->_gb, 5);
		log_dec(dec, "    chroma_sample_loc: {top: %u, bottom: %u}\n",
			chroma_sample_loc_type_top_field, chroma_sample_loc_type_bottom_field);
	}
	if (get_u1(&dec->_gb)) {
		sps->num_units_in_tick = maxu(get_uv(&dec->_gb, 32), 1);
		sps->time_scale = maxu(get_uv(&dec->_gb, 32), 1);
		int fixed_frame_rate_flag = get_u1(&dec->_gb);
		log_dec(dec, "    num_units_in_tick: %u\n"
			"    time_scale: %u\n"
			"    fixed_frame_rate_flag: %u\n",
			sps->num_units_in_tick,
			sps->time_scale,
			fixed_frame_rate_flag);
	}
	int nal_hrd_parameters_present_flag = get_u1(&dec->_gb);
	if (nal_hrd_parameters_present_flag) {
		log_dec(dec, "    nal_hrd_parameters:\n");
		parse_hrd_parameters(dec, sps, &sps->nal_hrd_cpb_cnt, "      ");
	}
	int vcl_hrd_parameters_present_flag = get_u1(&dec->_gb);
	if (vcl_hrd_parameters_present_flag) {
		log_dec(dec, "    vcl_hrd_parameters:\n");
		parse_hrd_parameters(dec, sps, &sps->vcl_hrd_cpb_cnt, "      ");
	}
	if (nal_hrd_parameters_present_flag | vcl_hrd_parameters_present_flag) {
		int low_delay_hrd_flag = get_u1(&dec->_gb);
		log_dec(dec, "    low_delay_hrd_flag: %u\n",
			low_delay_hrd_flag);
	}
	sps->pic_struct_present_flag = get_u1(&dec->_gb);
	log_dec(dec, "    pic_struct_present_flag: %u\n",
		sps->pic_struct_present_flag);
	if (get_u1(&dec->_gb)) {
		int motion_vectors_over_pic_boundaries_flag = get_u1(&dec->_gb);
		log_dec(dec, "    motion_vectors_over_pic_boundaries_flag: %u\n",
			motion_vectors_over_pic_boundaries_flag);
		int RawMbBits = 256 * sps->BitDepth_Y + (64 << sps->chroma_format_idc & ~64) * sps->BitDepth_C;
		int max_bytes_per_pic_denom = get_ue16(&dec->_gb, 16);
		if (max_bytes_per_pic_denom)
			log_dec(dec, "    max_bytes_per_pic: %u\n", (sps->pic_width_in_mbs * sps->pic_height_in_mbs * RawMbBits) / (8 * max_bytes_per_pic_denom));
		int max_bits_per_mb_denom = get_ue16(&dec->_gb, 16);
		if (max_bits_per_mb_denom)
			log_dec(dec, "    max_bits_per_mb: %u\n", (128 + RawMbBits) / max_bits_per_mb_denom);
		int log2_max_mv_length_horizontal = get_ue16(&dec->_gb, 15);
		int log2_max_mv_length_vertical = get_ue16(&dec->_gb, 15);
		// we don't enforce MaxDpbFrames here since violating the level is harmless
		sps->max_num_reorder_frames = get_ue16(&dec->_gb, 16);
		sps->num_frame_buffers = max(get_ue16(&dec->_gb, 16), max(sps->max_num_ref_frames, sps->max_num_reorder_frames)) + 1;
		log_dec(dec, "    log2_max_mv_length_horizontal: %u\n"
			"    log2_max_mv_length_vertical: %u\n"
			"    max_num_reorder_frames: %u\n"
			"    max_dec_frame_buffering: %u\n", // in units of view components (Annex C p.311)
			log2_max_mv_length_horizontal,
			log2_max_mv_length_vertical,
			sps->max_num_reorder_frames,
			sps->num_frame_buffers - 1);
	} else {
		log_dec(dec, "    max_num_reorder_frames: %u # inferred\n"
			"    max_dec_frame_buffering: %u # inferred\n",
			sps->max_num_reorder_frames,
			sps->num_frame_buffers - 1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x40(%rbp)
movq %rsi, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x77060
cmpl $0x0, %eax
je 0x7c2cf
movq -0x40(%rbp), %rdi
movl $0x8, %esi
callq 0x65e90
movl %eax, -0x4c(%rbp)
cmpl $0xff, -0x4c(%rbp)
jne 0x7c225
movq -0x40(%rbp), %rdi
movl $0x20, %esi
callq 0x65e90
movl %eax, -0xa8(%rbp)
jmp 0x7c23e
movl -0x4c(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rcx
leaq 0x5391b(%rip), %rax     # 0xcfb50
movl (%rax,%rcx,4), %eax
movl %eax, -0xa8(%rbp)
movl -0xa8(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
shrl $0x10, %eax
movl %eax, -0x54(%rbp)
movl -0x50(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0x58(%rbp)
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7c2cd
movq -0x40(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movl -0x4c(%rbp), %ecx
movl -0x54(%rbp), %r8d
movl -0x58(%rbp), %r9d
leaq 0x54a97(%rip), %rdx     # 0xd0d47
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7c2cf
movl $0xffffffff, -0x5c(%rbp) # imm = 0xFFFFFFFF
movq -0x40(%rbp), %rdi
callq 0x77060
cmpl $0x0, %eax
je 0x7c2f0
movq -0x40(%rbp), %rdi
callq 0x77060
movl %eax, -0x5c(%rbp)
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7c35a
movq -0x40(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movl -0x5c(%rbp), %ecx
leaq 0x54a3e(%rip), %rdx     # 0xd0d7b
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movq -0x40(%rbp), %rdi
callq 0x77060
cmpl $0x0, %eax
je 0x7c5e6
movq -0x40(%rbp), %rdi
movl $0x3, %esi
callq 0x65e90
movl %eax, -0x60(%rbp)
movq -0x40(%rbp), %rdi
callq 0x77060
movl %eax, -0x64(%rbp)
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7c406
movq -0x40(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movl -0x60(%rbp), %ecx
movslq -0x60(%rbp), %rdx
leaq 0x5a7a6(%rip), %rax     # 0xd6b80
movq (%rax,%rdx,8), %r8
movl -0x64(%rbp), %r9d
leaq 0x549b5(%rip), %rdx     # 0xd0d9e
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movq -0x40(%rbp), %rdi
callq 0x77060
cmpl $0x0, %eax
je 0x7c5e4
movq -0x40(%rbp), %rdi
movl $0x18, %esi
callq 0x65e90
movl %eax, -0x68(%rbp)
movl -0x68(%rbp), %eax
shrl $0x10, %eax
movl %eax, -0x6c(%rbp)
movl -0x68(%rbp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movl %eax, -0x70(%rbp)
movl -0x68(%rbp), %eax
andl $0xff, %eax
movl %eax, -0x74(%rbp)
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7c5e2
movq -0x40(%rbp), %rax
addq $0x7ca2, %rax           # imm = 0x7CA2
movq -0x40(%rbp), %rcx
movswl 0x7ca0(%rcx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rcx
movl $0x2542, %eax           # imm = 0x2542
subq %rcx, %rax
movq %rax, -0xb8(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x14(%rbp)
movl $0x17, -0x18(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x7c4c9
movl -0x14(%rbp), %eax
movl %eax, -0xc4(%rbp)
jmp 0x7c4d2
movl -0x18(%rbp), %eax
movl %eax, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
movslq %eax, %rcx
leaq 0x5a6de(%rip), %rax     # 0xd6bc0
movq (%rax,%rcx,8), %rax
movq %rax, -0xd0(%rbp)
movl -0x70(%rbp), %eax
movl %eax, -0xc8(%rbp)
movl -0x70(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl $0x12, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x7c516
movl -0x1c(%rbp), %eax
movl %eax, -0xd4(%rbp)
jmp 0x7c51f
movl -0x20(%rbp), %eax
movl %eax, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
movslq %eax, %rcx
leaq 0x5a751(%rip), %rax     # 0xd6c80
movq (%rax,%rcx,8), %rax
movq %rax, -0xe0(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0xd8(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x24(%rbp)
movl $0xc, -0x28(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x7c563
movl -0x24(%rbp), %eax
movl %eax, -0xe4(%rbp)
jmp 0x7c56c
movl -0x28(%rbp), %eax
movl %eax, -0xe4(%rbp)
movl -0xd8(%rbp), %r10d
movq -0xe0(%rbp), %r11
movl -0xc8(%rbp), %r9d
movq -0xd0(%rbp), %r8
movl -0xac(%rbp), %ecx
movq -0xb8(%rbp), %rsi
movq -0xc0(%rbp), %rdi
movl -0xe4(%rbp), %eax
movslq %eax, %rdx
leaq 0x5a774(%rip), %rax     # 0xd6d20
movq (%rax,%rdx,8), %rax
leaq 0x54820(%rip), %rdx     # 0xd0dd7
movq %r11, (%rsp)
movl %r10d, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7c5e4
jmp 0x7c5e6
movq -0x40(%rbp), %rdi
callq 0x77060
cmpl $0x0, %eax
je 0x7c68a
movq -0x40(%rbp), %rdi
movl $0x5, %esi
callq 0x76d10
movl %eax, -0x78(%rbp)
movq -0x40(%rbp), %rdi
movl $0x5, %esi
callq 0x76d10
movl %eax, -0x7c(%rbp)
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7c688
movq -0x40(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movl -0x78(%rbp), %ecx
movl -0x7c(%rbp), %r8d
leaq 0x547d2(%rip), %rdx     # 0xd0e3d
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7c68a
movq -0x40(%rbp), %rdi
callq 0x77060
cmpl $0x0, %eax
je 0x7c7a6
movq -0x40(%rbp), %rdi
movl $0x20, %esi
callq 0x65e90
movl %eax, -0x4(%rbp)
movl $0x1, -0x8(%rbp)
movl -0x4(%rbp), %eax
cmpl -0x8(%rbp), %eax
jbe 0x7c6c7
movl -0x4(%rbp), %eax
movl %eax, -0xe8(%rbp)
jmp 0x7c6d0
movl -0x8(%rbp), %eax
movl %eax, -0xe8(%rbp)
movl -0xe8(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x40(%rbp), %rdi
movl $0x20, %esi
callq 0x65e90
movl %eax, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jbe 0x7c708
movl -0xc(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0x7c711
movl -0x10(%rbp), %eax
movl %eax, -0xec(%rbp)
movl -0xec(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x40(%rbp), %rdi
callq 0x77060
movl %eax, -0x80(%rbp)
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7c7a4
movq -0x40(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movq -0x48(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x48(%rbp), %rax
movl 0x24(%rax), %r8d
movl -0x80(%rbp), %r9d
leaq 0x546e4(%rip), %rdx     # 0xd0e6b
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7c7a6
movq -0x40(%rbp), %rdi
callq 0x77060
movl %eax, -0x84(%rbp)
cmpl $0x0, -0x84(%rbp)
je 0x7c845
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7c829
movq -0x40(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
leaq 0x53e38(%rip), %rdx     # 0xd0644
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq $0x15, %rdx
leaq 0x51539(%rip), %rcx     # 0xcdd79
callq 0xc89e0
movq -0x40(%rbp), %rdi
callq 0x77060
movl %eax, -0x88(%rbp)
cmpl $0x0, -0x88(%rbp)
je 0x7c8e4
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7c8c8
movq -0x40(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
leaq 0x53e06(%rip), %rdx     # 0xd06b1
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq $0x16, %rdx
leaq 0x5149a(%rip), %rcx     # 0xcdd79
callq 0xc89e0
movl -0x84(%rbp), %eax
orl -0x88(%rbp), %eax
cmpl $0x0, %eax
je 0x7c973
movq -0x40(%rbp), %rdi
callq 0x77060
movl %eax, -0x8c(%rbp)
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7c971
movq -0x40(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movl -0x8c(%rbp), %ecx
leaq 0x54928(%rip), %rdx     # 0xd127c
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7c973
movq -0x40(%rbp), %rdi
callq 0x77060
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x1b(%rax)
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7c9f4
movq -0x40(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movq -0x48(%rbp), %rax
movsbl 0x1b(%rax), %ecx
leaq 0x548c3(%rip), %rdx     # 0xd129a
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movq -0x40(%rbp), %rdi
callq 0x77060
cmpl $0x0, %eax
je 0x7cd51
movq -0x40(%rbp), %rdi
callq 0x77060
movl %eax, -0x90(%rbp)
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7ca82
movq -0x40(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movl -0x90(%rbp), %ecx
leaq 0x54452(%rip), %rdx     # 0xd0eb7
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
movq -0x48(%rbp), %rax
movsbl 0x1(%rax), %eax
shll $0x8, %eax
movq -0x48(%rbp), %rcx
movsbl (%rcx), %ecx
movl $0x40, %edx
shll %cl, %edx
movl %edx, %ecx
andl $-0x41, %ecx
movq -0x48(%rbp), %rdx
movsbl 0x2(%rdx), %edx
imull %edx, %ecx
addl %ecx, %eax
movl %eax, -0x94(%rbp)
movq -0x40(%rbp), %rdi
movl $0x10, %esi
callq 0x76d10
movl %eax, -0x98(%rbp)
cmpl $0x0, -0x98(%rbp)
je 0x7cb65
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7cb63
movq -0x40(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movq -0x48(%rbp), %rax
movzwl 0x4(%rax), %eax
movq -0x48(%rbp), %rcx
movswl 0x6(%rcx), %ecx
imull %ecx, %eax
imull -0x94(%rbp), %eax
movl -0x98(%rbp), %ecx
shll $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
leaq 0x543a2(%rip), %rdx     # 0xd0ee8
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7cb65
movq -0x40(%rbp), %rdi
movl $0x10, %esi
callq 0x76d10
movl %eax, -0x9c(%rbp)
cmpl $0x0, -0x9c(%rbp)
je 0x7cbff
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7cbfd
movq -0x40(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movl -0x94(%rbp), %eax
addl $0x80, %eax
cltd
idivl -0x9c(%rbp)
movl %eax, %ecx
leaq 0x54323(%rip), %rdx     # 0xd0f03
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7cbff
movq -0x40(%rbp), %rdi
movl $0xf, %esi
callq 0x76d10
movl %eax, -0xa0(%rbp)
movq -0x40(%rbp), %rdi
movl $0xf, %esi
callq 0x76d10
movl %eax, -0xa4(%rbp)
movq -0x40(%rbp), %rdi
movl $0x10, %esi
callq 0x76d10
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x14(%rax)
movq -0x40(%rbp), %rdi
movl $0x10, %esi
callq 0x76d10
movl %eax, -0xf0(%rbp)
movq -0x48(%rbp), %rax
movsbl 0xf(%rax), %ecx
movq -0x48(%rbp), %rax
movsbl 0x14(%rax), %eax
movl %ecx, -0x2c(%rbp)
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jle 0x7cc7b
movl -0x2c(%rbp), %eax
movl %eax, -0xf4(%rbp)
jmp 0x7cc84
movl -0x30(%rbp), %eax
movl %eax, -0xf4(%rbp)
movl -0xf0(%rbp), %ecx
movl -0xf4(%rbp), %eax
movl %ecx, -0x34(%rbp)
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jle 0x7cca9
movl -0x34(%rbp), %eax
movl %eax, -0xf8(%rbp)
jmp 0x7ccb2
movl -0x38(%rbp), %eax
movl %eax, -0xf8(%rbp)
movl -0xf8(%rbp), %eax
addl $0x1, %eax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x13(%rax)
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7cd4f
movq -0x40(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movl -0xa0(%rbp), %ecx
movl -0xa4(%rbp), %r8d
movq -0x48(%rbp), %rax
movsbl 0x14(%rax), %r9d
movq -0x48(%rbp), %rax
movsbl 0x13(%rax), %eax
subl $0x1, %eax
leaq 0x541ed(%rip), %rdx     # 0xd0f1c
movl %eax, (%rsp)
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7cdcf
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
cmpq $0x2542, %rax           # imm = 0x2542
jae 0x7cdcd
movq -0x40(%rbp), %rdi
addq $0x7ca2, %rdi           # imm = 0x7CA2
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x40(%rbp), %rax
movswq 0x7ca0(%rax), %rax
movl $0x2542, %esi           # imm = 0x2542
subq %rax, %rsi
movq -0x48(%rbp), %rax
movsbl 0x14(%rax), %ecx
movq -0x48(%rbp), %rax
movsbl 0x13(%rax), %r8d
subl $0x1, %r8d
leaq 0x541f6(%rip), %rdx     # 0xd0fa6
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x40(%rbp), %rax
movswl 0x7ca0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x7ca0(%rax)
jmp 0x7cdcf
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopl (%rax,%rax)