// File: rpavlik[P]edid-decode/./edid-decode.h
// Function: edid_state::edid_state()
edid_state()
	{
		// Global state
		edid_size = num_blocks = block_nr = 0;
		max_hor_freq_hz = max_vert_freq_hz = max_pixclk_khz = 0;
		min_hor_freq_hz = 0xffffff;
		min_vert_freq_hz = 0xffffffff;
		dtd_max_vsize_mm = dtd_max_hsize_mm = 0;
		warnings = failures = 0;
		has_cta = has_dispid = false;
		hide_serial_numbers = false;

		// Base block state
		base.edid_minor = 0;
		base.has_name_descriptor = base.has_display_range_descriptor =
			base.has_serial_number = base.has_serial_string =
			base.supports_continuous_freq = base.supports_gtf =
			base.supports_cvt = base.seen_non_detailed_descriptor =
			base.has_640x480p60_est_timing = base.has_spwg =
			base.preferred_is_also_native = false;
		base.supports_sec_gtf = false;
		base.sec_gtf_start_freq = 0;
		base.C = base.M = base.K = base.J = 0;
		base.max_pos_neg_hor_freq_khz = 0;
		base.detailed_block_cnt = base.dtd_cnt = 0;

		base.min_display_hor_freq_hz = base.max_display_hor_freq_hz =
			base.min_display_vert_freq_hz = base.max_display_vert_freq_hz =
			base.max_display_pixclk_khz = base.max_display_width_mm =
			base.max_display_height_mm = 0;

		// CTA-861 block state
		cta.has_vic_1 = cta.first_svd_might_be_preferred = cta.has_sldb =
			cta.has_hdmi = cta.has_vcdb = cta.has_vfpdb = false;
		cta.last_block_was_hdmi_vsdb = cta.have_hf_vsdb = cta.have_hf_scdb = false;
		cta.first_block = cta.first_svd = true;
		cta.supported_hdmi_vic_codes = cta.supported_hdmi_vic_vsb_codes = 0;
		memset(cta.vics, 0, sizeof(cta.vics));
		memset(cta.preparsed_has_vic, 0, sizeof(cta.preparsed_has_vic));
		cta.preparsed_phys_addr = 0xffff;
		cta.preparsed_speaker_count = 0;
		cta.preparsed_sld = false;
		cta.preparsed_sld_has_coord = false;
		cta.preparsed_total_dtds = 0;
		cta.preparsed_total_vtdbs = 0;
		cta.preparsed_has_t8vtdb = false;

		// DisplayID block state
		dispid.version = 0;
		dispid.native_width = dispid.native_height = 0;
		dispid.preparsed_color_ids = dispid.preparsed_xfer_ids = 0;
		dispid.preparsed_displayid_blocks = 0;
		dispid.is_base_block = true;
		dispid.is_display = dispid.has_product_identification =
			dispid.has_display_parameters = dispid.has_type_1_7 =
			dispid.has_display_interface_features = false;

		// Block Map block state
		block_map.saw_block_1 = false;
		block_map.saw_block_128 = false;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
addq $0x10, %rdi
movq %rdi, -0x38(%rbp)
callq 0x4430
movq -0x28(%rbp), %rdi
addq $0x30, %rdi
movq %rdi, -0x30(%rbp)
callq 0x4430
movq -0x28(%rbp), %rdi
addq $0x88, %rdi
movq %rdi, -0x20(%rbp)
callq 0xba80
jmp 0xb148
movq -0x28(%rbp), %rdi
addq $0x180, %rdi            # imm = 0x180
callq 0xbaa0
jmp 0xb15a
movq -0x28(%rbp), %rdi
addq $0x910, %rdi            # imm = 0x910
callq 0xbb90
movq -0x28(%rbp), %rdi
movl $0x0, 0x8(%rdi)
movl $0x0, 0x4(%rdi)
movl $0x0, (%rdi)
movl $0x0, 0x70(%rdi)
xorps %xmm0, %xmm0
movsd %xmm0, 0x68(%rdi)
movl $0x0, 0x58(%rdi)
movl $0xffffff, 0x54(%rdi)   # imm = 0xFFFFFF
movsd 0x23e61(%rip), %xmm0    # 0x2f008
movsd %xmm0, 0x60(%rdi)
movl $0x0, 0x74(%rdi)
movl $0x0, 0x78(%rdi)
movl $0x0, 0x80(%rdi)
movl $0x0, 0x7c(%rdi)
movb $0x0, 0x51(%rdi)
movb $0x0, 0x50(%rdi)
movb $0x0, 0x52(%rdi)
movl $0x0, 0x88(%rdi)
movb $0x0, 0xc6(%rdi)
movb $0x0, 0xb9(%rdi)
movb $0x0, 0xc5(%rdi)
movb $0x0, 0xc4(%rdi)
movb $0x0, 0xb8(%rdi)
movb $0x0, 0x91(%rdi)
movb $0x0, 0x90(%rdi)
movb $0x0, 0x8f(%rdi)
movb $0x0, 0x8e(%rdi)
movb $0x0, 0x8d(%rdi)
movb $0x0, 0x8c(%rdi)
movb $0x0, 0x92(%rdi)
movl $0x0, 0x94(%rdi)
xorps %xmm0, %xmm0
movsd %xmm0, 0xb0(%rdi)
xorps %xmm0, %xmm0
movsd %xmm0, 0xa8(%rdi)
xorps %xmm0, %xmm0
movsd %xmm0, 0xa0(%rdi)
xorps %xmm0, %xmm0
movsd %xmm0, 0x98(%rdi)
movl $0x0, 0x17c(%rdi)
movl $0x0, 0xc0(%rdi)
movl $0x0, 0xbc(%rdi)
movl $0x0, 0x178(%rdi)
movl $0x0, 0x174(%rdi)
movl $0x0, 0x170(%rdi)
movl $0x0, 0x16c(%rdi)
movl $0x0, 0x168(%rdi)
movl $0x0, 0x164(%rdi)
movl $0x0, 0x160(%rdi)
movb $0x0, 0x2c5(%rdi)
movb $0x0, 0x2c4(%rdi)
movb $0x0, 0x2c3(%rdi)
movb $0x0, 0x2ce(%rdi)
movb $0x0, 0x2c1(%rdi)
movb $0x0, 0x2c0(%rdi)
movb $0x0, 0x2d4(%rdi)
movb $0x0, 0x2d3(%rdi)
movb $0x0, 0x2d2(%rdi)
movb $0x1, 0x2d6(%rdi)
movb $0x1, 0x2d5(%rdi)
movl $0x0, 0x2dc(%rdi)
movl $0x0, 0x2d8(%rdi)
addq $0x180, %rdi            # imm = 0x180
addq $0x160, %rdi            # imm = 0x160
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x41c0
movq -0x28(%rbp), %rdi
addq $0x180, %rdi            # imm = 0x180
addq $0x560, %rdi            # imm = 0x560
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x41c0
movq -0x28(%rbp), %rax
movw $0xffff, 0x2d0(%rax)    # imm = 0xFFFF
movl $0x0, 0x2c8(%rax)
movb $0x0, 0x2cd(%rax)
movb $0x0, 0x2cc(%rax)
movl $0x0, 0x180(%rax)
movl $0x0, 0x1a0(%rax)
movb $0x0, 0x1d8(%rax)
movb $0x0, 0x910(%rax)
movl $0x0, 0x944(%rax)
movl $0x0, 0x940(%rax)
movw $0x0, 0x914(%rax)
movw $0x0, 0x912(%rax)
movl $0x0, 0x918(%rax)
movb $0x1, 0x91c(%rax)
movb $0x0, 0x921(%rax)
movb $0x0, 0x920(%rax)
movb $0x0, 0x91f(%rax)
movb $0x0, 0x91e(%rax)
movb $0x0, 0x91d(%rax)
movb $0x0, 0x978(%rax)
movb $0x0, 0x979(%rax)
addq $0x40, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0xb440
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0xbbc0
movq -0x30(%rbp), %rdi
callq 0x41f0
movq -0x38(%rbp), %rdi
callq 0x41f0
movq -0x10(%rbp), %rdi
callq 0x4550
nopl (%rax,%rax)