// File: /workspace/github_cpp_makefile_star2_O1/rpavlik[P]edid-decode/parse-base-block.cpp
// Function: edid_state::detailed_timings(char const*, unsigned char const*, bool)
void edid_state::detailed_timings(const char *prefix, const unsigned char *x,
				  bool base_or_cta)
{
	struct timings t = {};
	unsigned hbl, vbl;
	std::string s_sync, s_flags;

	// Only count DTDs in base block 0 or CTA-861 extension blocks
	if (base_or_cta)
		base.dtd_cnt++;
	data_block = "Detailed Timing Descriptor #" + std::to_string(base.dtd_cnt);
	t.pixclk_khz = (x[0] + (x[1] << 8)) * 10;
	if (t.pixclk_khz < 10000) {
		printf("%sDetailed mode: ", prefix);
		hex_block("", x, 18, true, 18);
		if (!t.pixclk_khz)
			fail("First two bytes are 0, invalid data.\n");
		else
			fail("Pixelclock < 10 MHz, assuming invalid data 0x%02x 0x%02x.\n",
			     x[0], x[1]);
		return;
	}

	/*
	 * If the borders are non-zero, then it is unclear how to interpret
	 * the DTD blanking parameters.
	 *
	 * According to EDID 1.3 (3.12) the Hor/Vert Blanking includes the
	 * borders, and so does the Hor/Vert Sync Offset.
	 *
	 * According to EDID 1.4 (3.12) the Hor/Vert Blanking excludes the
	 * borders, and they are also excluded from the Hor/Vert Front Porch.
	 *
	 * But looking at what is really done in EDIDs is that the Hor/Vert
	 * Blanking follows EDID 1.3, but the Hor/Vert Front Porch does not
	 * include the border.
	 *
	 * So hbl/vbl includes the borders, so those need to be subtracted,
	 * but hfp/vfp is used as-is.
	 *
	 * In practice you really shouldn't use non-zero borders in DTDs
	 * since clearly nobody knows how to interpret the timing.
	 */
	t.hact = (x[2] + ((x[4] & 0xf0) << 4));
	t.hborder = x[15];
	hbl = (x[3] + ((x[4] & 0x0f) << 8)) - t.hborder * 2;
	t.hfp = (x[8] + ((x[11] & 0xc0) << 2));
	t.hsync = (x[9] + ((x[11] & 0x30) << 4));
	t.hbp = hbl - t.hsync - t.hfp;
	t.vact = (x[5] + ((x[7] & 0xf0) << 4));
	t.vborder = x[16];
	vbl = (x[6] + ((x[7] & 0x0f) << 8)) - t.vborder * 2;
	t.vfp = ((x[10] >> 4) + ((x[11] & 0x0c) << 2));
	t.vsync = ((x[10] & 0x0f) + ((x[11] & 0x03) << 4));
	t.vbp = vbl - t.vsync - t.vfp;

	unsigned char flags = x[17];

	if (base.has_spwg && base.detailed_block_cnt == 2)
		flags = *(x - 1);

	switch ((flags & 0x18) >> 3) {
	case 0x00:
		s_flags = "analog composite";
		/* fall-through */
	case 0x01:
		if (s_flags.empty())
			s_flags = "bipolar analog composite";
		switch ((flags & 0x06) >> 1) {
		case 0x00:
			add_str(s_flags, "sync-on-green");
			break;
		case 0x01:
			break;
		case 0x02:
			add_str(s_flags, "serrate, sync-on-green");
			break;
		case 0x03:
			add_str(s_flags, "serrate");
			break;
		}
		break;
	case 0x02:
		if (flags & (1 << 1))
			t.pos_pol_hsync = true;
		t.no_pol_vsync = true;
		s_flags = "digital composite";
		if (flags & (1 << 2))
		    add_str(s_flags, "serrate");
		break;
	case 0x03:
		if (flags & (1 << 1))
			t.pos_pol_hsync = true;
		if (flags & (1 << 2))
			t.pos_pol_vsync = true;
		s_sync = t.pos_pol_hsync ? "+hsync " : "-hsync ";
		s_sync += t.pos_pol_vsync ? "+vsync " : "-vsync ";
		if (base.has_spwg && (flags & 0x01))
			s_flags = "DE timing only";
		break;
	}
	if (flags & 0x80) {
		t.interlaced = true;
		t.vact *= 2;
		/*
		 * Check if this DTD matches VIC code 39 with special
		 * interlaced timings.
		 */
		if (t.hact == 1920 && t.vact == 1080 && t.pixclk_khz == 72000 &&
		    t.hfp == 32 && t.hsync == 168 && t.hbp == 184 && !t.hborder &&
		    t.vfp == 23 && t.vsync == 5 && t.vbp == 57 && !t.vborder &&
		    !base.has_spwg && cta.preparsed_has_vic[0][39] && (flags & 0x1e) == 0x1a)
			t.even_vtotal = true;
	}
	switch (flags & 0x61) {
	case 0x20:
		add_str(s_flags, "field sequential L/R");
		break;
	case 0x40:
		add_str(s_flags, "field sequential R/L");
		break;
	case 0x21:
		add_str(s_flags, "interleaved right even");
		break;
	case 0x41:
		add_str(s_flags, "interleaved left even");
		break;
	case 0x60:
		add_str(s_flags, "four way interleaved");
		break;
	case 0x61:
		add_str(s_flags, "side by side interleaved");
		break;
	default:
		break;
	}

	t.hsize_mm = x[12] + ((x[14] & 0xf0) << 4);
	t.vsize_mm = x[13] + ((x[14] & 0x0f) << 8);

	calc_ratio(&t);

	std::string s_type = base_or_cta ? dtd_type() : "DTD";
	bool ok = print_timings(prefix, &t, s_type.c_str(), s_flags.c_str(), true);
	timings_ext te(t, s_type, s_flags);

	if (block_nr == 0 && base.dtd_cnt == 1) {
		te.type = "DTD   1";
		base.preferred_timing = te;
		if (has_cta) {
			cta.preferred_timings.push_back(te);
			cta.native_timings.push_back(te);
		}
	}
	if (base_or_cta)
		cta.vec_dtds.push_back(te);

	if (t.hborder || t.vborder)
		warn("The use of non-zero borders in a DTD is not recommended.\n");
	if ((base.max_display_width_mm && !t.hsize_mm) ||
	    (base.max_display_height_mm && !t.vsize_mm)) {
		fail("Mismatch of image size vs display size: image size is not set, but display size is.\n");
	}
	if (base.has_spwg && base.detailed_block_cnt == 2)
		printf("%sSPWG Module Revision: %hhu\n", prefix, x[17]);
	if (!ok) {
		std::string s = prefix;

		s += "               ";
		hex_block(s.c_str(), x, 18, true, 18);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movl $0x0, 0xa0(%rsp)
leaq 0x158(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x20(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
testl %ebp, %ebp
je 0xb3eb
incl 0xc0(%r15)
movl 0xc0(%r15), %r12d
movl $0x1, %eax
cmpl $0xa, %r12d
jb 0xb442
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %r12d, %edx
cmpl $0x63, %edx
jbe 0xb43b
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0xb440
cmpl $0x2710, %edx           # imm = 0x2710
jb 0xb442
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0xb40a
addl $-0x3, %eax
jmp 0xb442
addl $-0x2, %eax
jmp 0xb442
decl %eax
movl %eax, %esi
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x30(%rsp), %rdi
xorl %edx, %edx
callq 0x32a0
leaq 0x30(%rsp), %r13
movq (%r13), %rdi
movl 0x8(%r13), %esi
movl %r12d, %edx
callq 0x8c91
leaq 0x19d84(%rip), %rcx     # 0x251f9
movl $0x1c, %r8d
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3290
leaq 0xc0(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xb4b7
movq %rdx, 0xb0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xc0(%rsp)
jmp 0xb4bf
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0xb0(%rsp), %r12
movq %rdx, 0x8(%r12)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x30(%r15), %rdi
movq %r12, %rsi
callq 0x32d0
movq (%r12), %rdi
cmpq %r13, %rdi
je 0xb504
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xb520
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3260
movzwl (%rbx), %eax
leal (%rax,%rax), %ecx
leal (%rcx,%rcx,4), %ecx
movl %ecx, 0x60(%rsp)
cmpl $0x3e7, %eax            # imm = 0x3E7
ja 0xb58b
leaq 0x19cdb(%rip), %rdi     # 0x25216
movq %r14, %rsi
xorl %eax, %eax
callq 0x3030
leaq 0x1572d(%rip), %rdi     # 0x20c79
movq %rbx, %rsi
movl $0x12, %edx
movl $0x1, %ecx
movl $0x12, %r8d
callq 0x5bbb
cmpl $0x0, 0x60(%rsp)
je 0xb728
movzbl (%rbx), %edx
movzbl 0x1(%rbx), %ecx
leaq 0x19cd1(%rip), %rsi     # 0x2524e
xorl %edi, %edi
xorl %eax, %eax
callq 0x37ec
jmp 0xbe16
movzbl 0x2(%rbx), %eax
movzbl 0x4(%rbx), %ecx
movl %ecx, %edx
andl $-0x10, %edx
shll $0x4, %edx
orl %eax, %edx
movl %edx, 0x50(%rsp)
movzbl 0xf(%rbx), %edx
movl %edx, 0x8c(%rsp)
movzbl 0x3(%rbx), %eax
andl $0xf, %ecx
shll $0x8, %ecx
orl %eax, %ecx
movzbl 0x8(%rbx), %esi
movzbl 0xb(%rbx), %eax
movl %eax, %edi
andl $-0x40, %edi
leal (%rsi,%rdi,4), %esi
movl %esi, 0x6c(%rsp)
movzbl 0x9(%rbx), %edi
movl %eax, %r8d
andl $0x30, %r8d
shll $0x4, %r8d
orl %edi, %r8d
movl %r8d, 0x70(%rsp)
leal (%r8,%rdx,2), %edx
addl %esi, %edx
subl %edx, %ecx
movl %ecx, 0x74(%rsp)
movzbl 0x5(%rbx), %edx
movzbl 0x7(%rbx), %ecx
movl %ecx, %esi
andl $-0x10, %esi
shll $0x4, %esi
orl %edx, %esi
movl %esi, 0x54(%rsp)
movzbl 0x10(%rbx), %edx
movl %edx, 0x90(%rsp)
movzbl 0x6(%rbx), %esi
andl $0xf, %ecx
shll $0x8, %ecx
orl %esi, %ecx
movb 0xa(%rbx), %sil
movl %esi, %edi
shrb $0x4, %dil
leal (,%rax,4), %r8d
andb $0x30, %r8b
orb %dil, %r8b
movzbl %r8b, %edi
movl %edi, 0x7c(%rsp)
andb $0xf, %sil
shlb $0x4, %al
andb $0x30, %al
orb %sil, %al
movzbl %al, %eax
movl %eax, 0x80(%rsp)
leal (%rax,%rdx,2), %eax
addl %edi, %eax
subl %eax, %ecx
movl %ecx, 0x84(%rsp)
cmpl $0x2, 0xbc(%r15)
sete %al
andb 0xb9(%r15), %al
movzbl %al, %eax
negq %rax
orq $0x11, %rax
movzbl (%rbx,%rax), %r12d
movl %r12d, %eax
shrl $0x3, %eax
andl $0x3, %eax
leaq 0x16e5a(%rip), %rcx     # 0x224ec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x19be6(%rip), %rcx     # 0x25291
movl $0x10, %r8d
xorl %esi, %esi
callq 0x3390
movq 0x18(%rsp), %rdx
testq %rdx, %rdx
jne 0xb6db
leaq 0x19bc0(%rip), %rcx     # 0x25289
leaq 0x10(%rsp), %rdi
movl $0x18, %r8d
xorl %esi, %esi
callq 0x3390
movl %r12d, %eax
shrl %eax
andl $0x3, %eax
leaq 0x16e12(%rip), %rcx     # 0x224fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xb0(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x19ba6(%rip), %rsi     # 0x252ab
leaq 0x19bac(%rip), %rdx     # 0x252b8
callq 0x8f6e
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x9cfc
jmp 0xb8b5
leaq 0x19af9(%rip), %rsi     # 0x25228
xorl %edi, %edi
xorl %eax, %eax
callq 0x37ec
jmp 0xbe16
testb $0x2, %r12b
je 0xb748
movb $0x1, 0x78(%rsp)
movb $0x1, 0x95(%rsp)
leaq 0x10(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x19b61(%rip), %rcx     # 0x252c1
movl $0x11, %r8d
xorl %esi, %esi
callq 0x3390
testb $0x4, %r12b
je 0xb8d2
leaq 0xb0(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x19b30(%rip), %rsi     # 0x252b9
leaq 0x19b30(%rip), %rdx     # 0x252c0
callq 0x8f6e
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x9cfc
jmp 0xb8b5
testb $0x2, %r12b
je 0xb7b7
movb $0x1, 0x78(%rsp)
testb $0x4, %r12b
je 0xb7c5
movb $0x1, 0x88(%rsp)
leaq 0x19b07(%rip), %rax     # 0x252d3
leaq 0x19b08(%rip), %rcx     # 0x252db
cmpb $0x0, 0x78(%rsp)
cmovneq %rax, %rcx
leaq 0x148(%rsp), %rdi
movq 0x8(%rdi), %rdx
movl $0x7, %r8d
xorl %esi, %esi
callq 0x3390
leaq 0x19ae7(%rip), %rax     # 0x252e3
leaq 0x19ae8(%rip), %rsi     # 0x252eb
cmpb $0x0, 0x88(%rsp)
cmovneq %rax, %rsi
leaq 0x148(%rsp), %rdi
callq 0x3420
testb $0x1, %r12b
je 0xb8d2
cmpb $0x0, 0xb9(%r15)
je 0xb8d2
leaq 0x10(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x19aaf(%rip), %rcx     # 0x252f3
movl $0xe, %r8d
xorl %esi, %esi
callq 0x3390
jmp 0xb8d2
leaq 0xb0(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x19a3d(%rip), %rsi     # 0x252a2
leaq 0x19a4c(%rip), %rdx     # 0x252b8
callq 0x8f6e
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x9cfc
jmp 0xb8b5
leaq 0xb0(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x19a22(%rip), %rsi     # 0x252b9
leaq 0x19a22(%rip), %rdx     # 0x252c0
callq 0x8f6e
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x9cfc
movq 0xb0(%rsp), %rdi
cmpq %r13, %rdi
je 0xb8d2
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x3260
testb %r12b, %r12b
js 0xb98b
andl $0x61, %r12d
cmpl $0x40, %r12d
jg 0xb938
cmpl $0x20, %r12d
je 0xba65
cmpl $0x21, %r12d
je 0xbacc
cmpl $0x40, %r12d
jne 0xbb4b
leaq 0xb0(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x19a02(%rip), %rsi     # 0x25317
leaq 0x19a0f(%rip), %rdx     # 0x2532b
callq 0x8f6e
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x9cfc
jmp 0xbb2e
cmpl $0x41, %r12d
je 0xba9a
cmpl $0x60, %r12d
je 0xbafe
cmpl $0x61, %r12d
jne 0xbb4b
leaq 0xb0(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x19a06(%rip), %rsi     # 0x2536e
leaq 0x19a17(%rip), %rdx     # 0x25386
callq 0x8f6e
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x9cfc
jmp 0xbb2e
movb $0x1, 0x68(%rsp)
movl 0x50(%rsp), %ecx
movl 0x54(%rsp), %eax
addl %eax, %eax
movl %eax, 0x54(%rsp)
cmpl $0x780, %ecx            # imm = 0x780
jne 0xb8db
cmpl $0x438, %eax            # imm = 0x438
jne 0xb8db
cmpl $0x11940, 0x60(%rsp)    # imm = 0x11940
jne 0xb8db
cmpl $0x20, 0x6c(%rsp)
jne 0xb8db
cmpl $0xa8, 0x70(%rsp)
jne 0xb8db
cmpl $0xb8, 0x74(%rsp)
jne 0xb8db
cmpl $0x0, 0x8c(%rsp)
jne 0xb8db
cmpl $0x17, 0x7c(%rsp)
jne 0xb8db
cmpl $0x5, 0x80(%rsp)
jne 0xb8db
cmpl $0x39, 0x84(%rsp)
jne 0xb8db
cmpl $0x0, 0x90(%rsp)
jne 0xb8db
cmpb $0x0, 0xb9(%r15)
jne 0xb8db
movl %r12d, %eax
andl $0x1e, %eax
cmpl $0x1a, %eax
jne 0xb8db
cmpb $0x0, 0x707(%r15)
je 0xb8db
movb $0x1, 0x94(%rsp)
jmp 0xb8db
leaq 0xb0(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x1988b(%rip), %rsi     # 0x25302
leaq 0x19898(%rip), %rdx     # 0x25316
callq 0x8f6e
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x9cfc
jmp 0xbb2e
leaq 0xb0(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x19897(%rip), %rsi     # 0x25343
leaq 0x198a5(%rip), %rdx     # 0x25358
callq 0x8f6e
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x9cfc
jmp 0xbb2e
leaq 0xb0(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x1984e(%rip), %rsi     # 0x2532c
leaq 0x1985d(%rip), %rdx     # 0x25342
callq 0x8f6e
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x9cfc
jmp 0xbb2e
leaq 0xb0(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x19849(%rip), %rsi     # 0x25359
leaq 0x19856(%rip), %rdx     # 0x2536d
callq 0x8f6e
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x9cfc
movq 0xb0(%rsp), %rdi
cmpq %r13, %rdi
je 0xbb4b
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x3260
movzbl 0xc(%rbx), %eax
movzbl 0xe(%rbx), %ecx
movl %ecx, %edx
andl $-0x10, %edx
shll $0x4, %edx
orl %eax, %edx
leaq 0x50(%rsp), %rdi
movl %edx, 0x48(%rdi)
movzbl 0xd(%rbx), %eax
andl $0xf, %ecx
shll $0x8, %ecx
orl %eax, %ecx
movl %ecx, 0x4c(%rdi)
callq 0x3c2c
testb %bpl, %bpl
je 0xbb94
movl 0xc0(%r15), %edx
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x3c7a
jmp 0xbbb4
leaq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
movq %rax, (%rdi)
leaq 0x14705(%rip), %rsi     # 0x202ad
leaq 0x14701(%rip), %rdx     # 0x202b0
callq 0x8f6e
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %r8
movl $0x1, (%rsp)
leaq 0x50(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %r9d
callq 0x3ebe
movl %eax, %r12d
leaq 0xb0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0xdce2
cmpl $0x0, 0x8(%r15)
jne 0xbcac
cmpl $0x1, 0xc0(%r15)
jne 0xbcac
leaq 0x108(%rsp), %r13
movq 0x8(%r13), %rdx
leaq 0x19761(%rip), %rcx     # 0x25387
movl $0x7, %r8d
movq %r13, %rdi
xorl %esi, %esi
callq 0x3390
leaq 0xc8(%r15), %rdi
leaq 0xb0(%rsp), %rax
movl $0xa, %ecx
movq %rax, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl 0x50(%rax), %eax
movl %eax, 0x118(%r15)
leaq 0x120(%r15), %rdi
movq %r13, %rsi
callq 0x3140
leaq 0x140(%r15), %rdi
leaq 0x128(%rsp), %rsi
callq 0x3140
cmpb $0x1, 0x50(%r15)
jne 0xbcac
leaq 0x1c0(%r15), %rdi
leaq 0xb0(%rsp), %rsi
callq 0xdd72
leaq 0x2a8(%r15), %rdi
leaq 0xb0(%rsp), %rsi
callq 0xdd72
testb %bpl, %bpl
je 0xbcc5
leaq 0x188(%r15), %rdi
leaq 0xb0(%rsp), %rsi
callq 0xdd72
movl 0x90(%rsp), %eax
orl 0x8c(%rsp), %eax
je 0xbce8
leaq 0x196b3(%rip), %rsi     # 0x2538f
movl $0x1, %edi
xorl %eax, %eax
callq 0x37ec
cmpl $0x0, 0x174(%r15)
je 0xbcfc
cmpl $0x0, 0x98(%rsp)
je 0xbd10
cmpl $0x0, 0x178(%r15)
je 0xbd20
cmpl $0x0, 0x9c(%rsp)
jne 0xbd20
leaq 0x196b2(%rip), %rsi     # 0x253c9
xorl %edi, %edi
xorl %eax, %eax
callq 0x37ec
cmpb $0x1, 0xb9(%r15)
jne 0xbd49
cmpl $0x2, 0xbc(%r15)
jne 0xbd49
movzbl 0x11(%rbx), %edx
leaq 0x196df(%rip), %rdi     # 0x2541e
movq %r14, %rsi
xorl %eax, %eax
callq 0x3030
testb %r12b, %r12b
jne 0xbdb8
leaq 0x168(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r14, %rsi
callq 0x8a3c
leaq 0x196d2(%rip), %rsi     # 0x2543c
leaq 0x168(%rsp), %rdi
callq 0x3420
movq 0x168(%rsp), %rdi
movq %rbx, %rsi
movl $0x12, %edx
movl $0x1, %ecx
movl $0x12, %r8d
callq 0x5bbb
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbdb8
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x138(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbdd9
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbdfa
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xbe16
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xbe32
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
cmpq %rax, %rdi
je 0xbe57
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x3260
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbe83
jmp 0xbe83
jmp 0xbe83
jmp 0xbe83
jmp 0xbee6
jmp 0xbee6
jmp 0xbee6
jmp 0xbee6
jmp 0xbe83
jmp 0xbe83
jmp 0xbe83
jmp 0xbe83
jmp 0xbe83
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
cmpq %r13, %rdi
je 0xbf17
movq 0xc0(%rsp), %rsi
jmp 0xbf0f
jmp 0xbee6
jmp 0xbee6
jmp 0xbee6
jmp 0xbee6
jmp 0xbee6
jmp 0xbee6
jmp 0xbeeb
jmp 0xbee6
jmp 0xbee6
movq %rax, %rbx
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbeee
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0xbeee
jmp 0xbedf
jmp 0xbedf
jmp 0xbee6
movq %rax, %rbx
jmp 0xbefb
jmp 0xbee6
movq %rax, %rbx
jmp 0xbf17
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0xdd9e
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xbf17
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xbf33
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
cmpq %rax, %rdi
je 0xbf58
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x3260
movq %rbx, %rdi
callq 0x3400