// File: /workspace/github_cpp_makefile_star2_O2/rpavlik[P]edid-decode/edid-decode.cpp
// Function: edid_state::print_timings(char const*, timings const*, char const*, char const*, bool, bool)
bool edid_state::print_timings(const char *prefix, const struct timings *t,
			       const char *type, const char *flags,
			       bool detailed, bool do_checks)
{
	if (!t) {
		// Should not happen
		if (do_checks)
			fail("Unknown video timings.\n");
		return false;
	}

	if (detailed && options[OptShortTimings])
		detailed = false;
	if (options[OptLongTimings])
		detailed = true;

	unsigned vact = t->vact;
	unsigned hbl = t->hfp + t->hsync + t->hbp + 2 * t->hborder;
	unsigned vbl = t->vfp + t->vsync + t->vbp + 2 * t->vborder;
	unsigned htotal = t->hact + hbl;
	double hor_freq_khz = htotal ? (double)t->pixclk_khz / htotal : 0;

	if (t->interlaced)
		vact /= 2;

	if (t->ycbcr420)
		hor_freq_khz /= 2;

	double vtotal = vact + vbl;

	bool ok = true;

	if (!t->hact || !hbl || !t->hfp || !t->hsync ||
	    !vact || !vbl || (!t->vfp && !t->interlaced && !t->even_vtotal) || !t->vsync) {
		if (do_checks)
			fail("0 values in the video timing:\n"
			     "    Horizontal Active/Blanking %u/%u\n"
			     "    Horizontal Frontporch/Sync Width %u/%u\n"
			     "    Vertical Active/Blanking %u/%u\n"
			     "    Vertical Frontporch/Sync Width %u/%u\n",
			     t->hact, hbl, t->hfp, t->hsync, vact, vbl, t->vfp, t->vsync);
		ok = false;
	}

	if (t->even_vtotal)
		vtotal = vact + t->vfp + t->vsync + t->vbp;
	else if (t->interlaced)
		vtotal = vact + t->vfp + t->vsync + t->vbp + 0.5;

	double refresh = (double)t->pixclk_khz * 1000.0 / (htotal * vtotal);

	std::string s;
	unsigned rb = t->rb & ~RB_ALT;
	if (rb) {
		bool alt = t->rb & RB_ALT;
		s = "RB";
		// Mark RB_CVT_V3 as preliminary since CVT 1.3 has not been
		// released yet.
		if (rb == RB_CVT_V2)
			s += std::string("v2") + (alt ? ",video-optimized" : "");
		else if (rb == RB_CVT_V3)
			s += std::string("v3-is-preliminary") + (alt ? ",h-blank-160" : "");
	}
	add_str(s, flags);
	if (t->hsize_mm || t->vsize_mm)
		add_str(s, std::to_string(t->hsize_mm) + " mm x " + std::to_string(t->vsize_mm) + " mm");
	if (t->hsize_mm > dtd_max_hsize_mm)
		dtd_max_hsize_mm = t->hsize_mm;
	if (t->vsize_mm > dtd_max_vsize_mm)
		dtd_max_vsize_mm = t->vsize_mm;
	if (!s.empty())
		s = " (" + s + ")";
	unsigned pixclk_khz = t->pixclk_khz / (t->ycbcr420 ? 2 : 1);

	char buf[10];

	sprintf(buf, "%u%s", t->vact, t->interlaced ? "i" : "");
	printf("%s%s: %5ux%-5s %7.3f Hz %3u:%-3u %7.3f kHz %8.3f MHz%s\n",
	       prefix, type,
	       t->hact, buf,
	       refresh,
	       t->hratio, t->vratio,
	       hor_freq_khz,
	       pixclk_khz / 1000.0,
	       s.c_str());

	unsigned len = strlen(prefix) + 2;

	if (!t->ycbcr420 && detailed && options[OptXModeLineTimings])
		print_modeline(len, t, refresh);
	else if (!t->ycbcr420 && detailed && options[OptFBModeTimings])
		print_fbmode(len, t, refresh, hor_freq_khz);
	else if (!t->ycbcr420 && detailed && options[OptV4L2Timings])
		print_v4l2_timing(t, refresh, type);
	else if (detailed)
		print_detailed_timing(len + strlen(type) + 6, t);

	if (!do_checks)
		return ok;

	if (!memcmp(type, "DTD", 3)) {
		unsigned vic, dmt;
		const timings *vic_t = cta_close_match_to_vic(*t, vic);

		if (vic_t)
			warn("DTD is similar but not identical to VIC %u.\n", vic);

		const timings *dmt_t = close_match_to_dmt(*t, dmt);
		if (!vic_t && dmt_t)
			warn("DTD is similar but not identical to DMT 0x%02x.\n", dmt);
	}

	if (refresh) {
		min_vert_freq_hz = min(min_vert_freq_hz, refresh);
		max_vert_freq_hz = max(max_vert_freq_hz, refresh);
	}
	if (hor_freq_khz) {
		min_hor_freq_hz = min(min_hor_freq_hz, hor_freq_khz * 1000.0);
		max_hor_freq_hz = max(max_hor_freq_hz, hor_freq_khz * 1000.0);
		max_pixclk_khz = max(max_pixclk_khz, pixclk_khz);
		if (t->pos_pol_hsync && !t->pos_pol_vsync && t->vsync == 3)
			base.max_pos_neg_hor_freq_khz = hor_freq_khz;
	}

	if (t->ycbcr420 && t->pixclk_khz < 590000)
		warn_once("Some YCbCr 4:2:0 timings are invalid for HDMI (which requires an RGB timings pixel rate >= 590 MHz).\n");
	if (t->hfp <= 0)
		fail("0 or negative horizontal front porch.\n");
	if (t->hbp <= 0)
		fail("0 or negative horizontal back porch.\n");
	if (t->vbp <= 0)
		fail("0 or negative vertical back porch.\n");
	if (!base.max_display_width_mm && !base.max_display_height_mm) {
		/* this is valid */
	} else if (!t->hsize_mm && !t->vsize_mm) {
		/* this is valid */
	} else if (t->hsize_mm > base.max_display_width_mm + 9 ||
		   t->vsize_mm > base.max_display_height_mm + 9) {
		fail("Mismatch of image size %ux%u mm vs display size %ux%u mm.\n",
		     t->hsize_mm, t->vsize_mm, base.max_display_width_mm, base.max_display_height_mm);
	} else if (t->hsize_mm < base.max_display_width_mm - 9 &&
		   t->vsize_mm < base.max_display_height_mm - 9) {
		fail("Mismatch of image size %ux%u mm vs display size %ux%u mm.\n",
		     t->hsize_mm, t->vsize_mm, base.max_display_width_mm, base.max_display_height_mm);
	}
	return ok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rcx, 0x50(%rsp)
movq %rdi, 0x28(%rsp)
testq %rdx, %rdx
je 0x3b8c
movl %r9d, %r13d
movq %r8, %rbp
movq %rdx, %rbx
movq %rsi, 0x68(%rsp)
cmpb $0x0, 0x355ee(%rip)     # 0x39113
sete 0x70(%rsp)
cmpb $0x0, 0x355db(%rip)     # 0x3910c
setne %r14b
movl (%rdx), %edx
movl 0x1c(%rbx), %r8d
movl 0x20(%rbx), %r9d
leal (%r9,%r8), %eax
addl 0x24(%rbx), %eax
movl 0x4(%rbx), %r15d
movl 0x3c(%rbx), %ecx
leal (%rax,%rcx,2), %eax
movl 0x2c(%rbx), %r10d
movl 0x30(%rbx), %r11d
leal (%r11,%r10), %esi
addl 0x34(%rbx), %esi
movl 0x40(%rbx), %edi
movl %edx, %ecx
addl %eax, %ecx
movl %ecx, %r12d
movq %r12, 0x88(%rsp)
je 0x3bb1
movl 0x10(%rbx), %ecx
cvtsi2sd %rcx, %xmm1
cvtsi2sd %r12, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, 0x60(%rsp)
jmp 0x3bbb
cmpb $0x0, 0x150(%rsp)
je 0x3c9c
leaq 0x165cc(%rip), %rsi     # 0x1a16d
xorl %ebp, %ebp
xorl %edi, %edi
xorl %eax, %eax
callq 0x362c
jmp 0x44ee
xorpd %xmm0, %xmm0
movsd %xmm0, 0x60(%rsp)
movb 0x18(%rbx), %cl
shrl %cl, %r15d
cmpb $0x0, 0x50(%rbx)
je 0x3bdb
movsd 0x60(%rsp), %xmm0
mulsd 0x1643b(%rip), %xmm0    # 0x1a010
movsd %xmm0, 0x60(%rsp)
leal (%rsi,%rdi,2), %r12d
testl %r8d, %r8d
je 0x3c2d
testl %eax, %eax
je 0x3c2d
testl %edx, %edx
je 0x3c2d
testl %r9d, %r9d
je 0x3c2d
testl %r15d, %r15d
je 0x3c2d
testl %r12d, %r12d
je 0x3c2d
testl %r10d, %r10d
setne %sil
orb %cl, %sil
testb $0x1, %sil
jne 0x3c11
cmpb $0x1, 0x44(%rbx)
jne 0x3c2d
testl %r11d, %r11d
setne %sil
movb 0x150(%rsp), %cl
xorb $0x1, %cl
movl %esi, 0x5c(%rsp)
orb %sil, %cl
je 0x3c37
jmp 0x3c67
cmpb $0x0, 0x150(%rsp)
je 0x3c5f
leaq 0x16547(%rip), %rsi     # 0x1a185
movl $0x0, 0x5c(%rsp)
xorl %edi, %edi
movl %eax, %ecx
xorl %eax, %eax
pushq %r11
pushq %r10
pushq %r12
pushq %r15
callq 0x362c
addq $0x20, %rsp
jmp 0x3c67
movl $0x0, 0x5c(%rsp)
cmpb $0x1, 0x44(%rbx)
jne 0x3c7b
addl 0x2c(%rbx), %r15d
addl 0x30(%rbx), %r15d
addl 0x34(%rbx), %r15d
jmp 0x3ca6
cmpb $0x1, 0x18(%rbx)
jne 0x3ca3
addl 0x2c(%rbx), %r15d
addl 0x30(%rbx), %r15d
addl 0x34(%rbx), %r15d
cvtsi2sd %r15, %xmm0
addsd 0x16376(%rip), %xmm0    # 0x1a010
jmp 0x3cab
xorl %ebp, %ebp
jmp 0x44ee
addl %r12d, %r15d
cvtsi2sd %r15, %xmm0
movsd %xmm0, 0x80(%rsp)
movl 0x10(%rbx), %eax
movq %rax, 0xf0(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl 0x14(%rbx), %r15d
movl %r15d, %r12d
andl $0xffffff7f, %r12d      # imm = 0xFFFFFF7F
je 0x3dbf
leaq 0x16552(%rip), %rsi     # 0x1a240
leaq 0xd0(%rsp), %rdi
callq 0x3460
cmpl $0x3, %r12d
je 0x3d5c
cmpl $0x2, %r12d
jne 0x3dbf
leaq 0x233c3(%rip), %rsi     # 0x270d5
leaq 0x8(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
callq 0x75c4
testb %r15b, %r15b
leaq 0x16f5b(%rip), %rax     # 0x1ac89
leaq 0x1650e(%rip), %rdx     # 0x1a243
cmovnsq %rax, %rdx
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x75a4
leaq 0xd0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3480
jmp 0x3dab
leaq 0x164f1(%rip), %rsi     # 0x1a254
leaq 0x8(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
callq 0x75c4
testb %r15b, %r15b
leaq 0x16f0a(%rip), %rax     # 0x1ac89
leaq 0x164e0(%rip), %rdx     # 0x1a266
cmovnsq %rax, %rdx
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x75a4
leaq 0xd0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3480
leaq 0x30(%rsp), %rdi
callq 0x3130
leaq 0x8(%rsp), %rdi
callq 0x3130
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rbp, %rsi
callq 0x75c4
leaq 0xd0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4cc5
leaq 0x30(%rsp), %rdi
callq 0x3130
movl 0x48(%rbx), %esi
testl %esi, %esi
jne 0x3dfe
cmpl $0x0, 0x4c(%rbx)
je 0x3ec9
leaq 0x90(%rsp), %rdi
callq 0x7675
leaq 0x16461(%rip), %rdx     # 0x1a273
leaq 0xf8(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x75a4
movl 0x4c(%rbx), %esi
leaq 0xb0(%rsp), %rdi
callq 0x7675
leaq 0x8(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0x76b4
leaq 0x16422(%rip), %rdx     # 0x1a27a
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x75a4
leaq 0xd0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4cc5
leaq 0x30(%rsp), %rdi
callq 0x3130
leaq 0x8(%rsp), %rdi
callq 0x3130
leaq 0xb0(%rsp), %rdi
callq 0x3130
leaq 0xf8(%rsp), %rdi
callq 0x3130
leaq 0x90(%rsp), %rdi
callq 0x3130
movl 0x48(%rbx), %eax
movq 0x28(%rsp), %rcx
cmpl 0x74(%rcx), %eax
jbe 0x3ec9
movq 0x28(%rsp), %rcx
movl %eax, 0x74(%rcx)
movl 0x4c(%rbx), %eax
movq 0x28(%rsp), %rcx
cmpl 0x78(%rcx), %eax
jbe 0x3ede
movq 0x28(%rsp), %rcx
movl %eax, 0x78(%rcx)
cmpq $0x0, 0xd8(%rsp)
je 0x3f3f
leaq 0x2366c(%rip), %rsi     # 0x2755c
leaq 0x8(%rsp), %rdi
leaq 0xd0(%rsp), %rdx
callq 0x75ff
leaq 0x229a4(%rip), %rdx     # 0x268ad
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x75a4
leaq 0xd0(%rsp), %rdi
leaq 0x30(%rsp), %r15
movq %r15, %rsi
callq 0x32f0
movq %r15, %rdi
callq 0x3130
leaq 0x8(%rsp), %rdi
callq 0x3130
cvtsi2sdq 0xf0(%rsp), %xmm2
cvtsi2sdq 0x88(%rsp), %xmm0
movsd 0x80(%rsp), %xmm1
mulsd %xmm0, %xmm1
andb 0x70(%rsp), %r13b
mulsd 0x160ab(%rip), %xmm2    # 0x1a018
orb %r13b, %r14b
divsd %xmm1, %xmm2
movapd %xmm2, 0x70(%rsp)
movl 0x10(%rbx), %r12d
movb 0x50(%rbx), %cl
shrl %cl, %r12d
movl 0x4(%rbx), %edx
leaq 0x162f5(%rip), %r15     # 0x1a283
cmpb $0x0, 0x18(%rbx)
leaq 0x16cf0(%rip), %rcx     # 0x1ac89
cmovneq %r15, %rcx
leaq 0x162da(%rip), %rsi     # 0x1a27e
leaq 0xf8(%rsp), %rbp
movq %rbp, %rdi
xorl %eax, %eax
callq 0x3070
movl (%rbx), %ecx
movl 0x8(%rbx), %r9d
movl 0xc(%rbx), %r10d
movq %r12, 0x88(%rsp)
cvtsi2sd %r12, %xmm2
divsd 0x16043(%rip), %xmm2    # 0x1a018
leaq 0x162a9(%rip), %rdi     # 0x1a285
movq 0x68(%rsp), %r12
movq %r12, %rsi
movq 0x50(%rsp), %r13
movq %r13, %rdx
movq %rbp, %r8
movapd 0x70(%rsp), %xmm0
movsd 0x60(%rsp), %xmm1
movb $0x3, %al
pushq 0xd0(%rsp)
pushq %r10
callq 0x3030
popq %rcx
popq %rdx
movq %r12, %rdi
callq 0x3110
movq %rax, %r12
cmpb $0x0, 0x50(%rbx)
je 0x4106
testb %r14b, %r14b
je 0x42c8
movq %r13, %rdi
callq 0x3110
leal (%r12,%rax), %ebp
addl $0x8, %ebp
movl 0x1c(%rbx), %ecx
movl 0x20(%rbx), %r8d
movl 0x24(%rbx), %r9d
leaq 0x23a67(%rip), %r14     # 0x27ab3
cmpb $0x0, 0x28(%rbx)
leaq 0x160b0(%rip), %r12     # 0x1a107
movq %r12, %r10
cmovneq %r14, %r10
subq $0x8, %rsp
leaq 0x16c25(%rip), %rdi     # 0x1ac8e
leaq 0x16c19(%rip), %rdx     # 0x1ac89
movl %ebp, %esi
xorl %eax, %eax
pushq %r10
callq 0x3030
popq %rcx
popq %rdx
movl 0x3c(%rbx), %esi
testl %esi, %esi
je 0x4092
leaq 0x16c2d(%rip), %rdi     # 0x1acb8
xorl %eax, %eax
callq 0x3030
pushq $0xa
popq %rdi
callq 0x3340
movl 0x2c(%rbx), %ecx
movl 0x30(%rbx), %r8d
movl 0x34(%rbx), %r9d
leaq 0x16c18(%rip), %rdi     # 0x1acc4
leaq 0x16bd6(%rip), %rdx     # 0x1ac89
movl %ebp, %esi
xorl %eax, %eax
callq 0x3030
cmpb $0x0, 0x45(%rbx)
jne 0x40db
cmpb $0x0, 0x38(%rbx)
movq %r12, %rsi
cmovneq %r14, %rsi
leaq 0x16c12(%rip), %rdi     # 0x1ace6
xorl %eax, %eax
callq 0x3030
movl 0x40(%rbx), %esi
testl %esi, %esi
je 0x40f0
leaq 0x16c06(%rip), %rdi     # 0x1acef
xorl %eax, %eax
callq 0x3030
cmpb $0x0, 0x44(%rbx)
je 0x4247
leaq 0x16bfa(%rip), %r15     # 0x1acfb
jmp 0x42b6
cmpb $0x0, 0x3500b(%rip)     # 0x39118
leal 0x2(%r12), %esi
setne %al
andb %r14b, %al
cmpb $0x1, %al
jne 0x420f
xorl %r14d, %r14d
cmpb $0x0, 0x44(%rbx)
movzbl 0x18(%rbx), %eax
cmovel %eax, %r14d
movl 0x3c(%rbx), %r11d
movl 0x1c(%rbx), %r10d
addl %r11d, %r10d
addl 0x24(%rbx), %r11d
movl 0x40(%rbx), %edi
movl 0x2c(%rbx), %r12d
addl %edi, %r12d
movl (%rbx), %ecx
testb $0x1, %al
leaq 0x16b36(%rip), %rdx     # 0x1ac89
cmoveq %rdx, %r15
movl 0x4(%rbx), %r8d
movl 0x10(%rbx), %eax
cvtsi2sd %rax, %xmm1
divsd 0x15ead(%rip), %xmm1    # 0x1a018
addl %ecx, %r10d
movl 0x20(%rbx), %ebp
addl %r10d, %ebp
addl %ebp, %r11d
addl %r8d, %r12d
movl 0x30(%rbx), %r13d
addl %r12d, %r13d
addl %edi, %r14d
addl 0x34(%rbx), %r14d
addl %r13d, %r14d
movzbl 0x28(%rbx), %eax
xorl $0x1, %eax
leal 0x2b(,%rax,2), %eax
movq %rax, 0x68(%rsp)
subq $0x8, %rsp
leaq 0x16816(%rip), %rdi     # 0x1a9bf
movapd 0x78(%rsp), %xmm0
movq %r15, %r9
movb $0x2, %al
pushq 0x70(%rsp)
pushq %r14
pushq %r13
pushq %r12
pushq %r8
pushq %r11
pushq %rbp
pushq %r10
pushq %rcx
callq 0x3030
addq $0x50, %rsp
cmpb $0x0, 0x45(%rbx)
jne 0x41f1
movzbl 0x38(%rbx), %eax
xorl $0x1, %eax
leal 0x2b(,%rax,2), %esi
leaq 0x16818(%rip), %rdi     # 0x1aa02
xorl %eax, %eax
callq 0x3030
cmpb $0x1, 0x18(%rbx)
movq 0x50(%rsp), %r13
jne 0x420a
leaq 0x16808(%rip), %rdi     # 0x1aa0b
xorl %eax, %eax
callq 0x3030
jmp 0x42c0
cmpb $0x0, 0x34ef0(%rip)     # 0x39106
setne %al
andb %r14b, %al
cmpb $0x1, %al
jne 0x4502
movl (%rbx), %ecx
movl 0x4(%rbx), %r8d
movsd 0x15dde(%rip), %xmm1    # 0x1a010
cmpb $0x0, 0x18(%rbx)
jne 0x489f
movapd 0x70(%rsp), %xmm0
jmp 0x48a9
cmpb $0x1, 0x18(%rbx)
jne 0x42c0
leaq 0x17066(%rip), %rdi     # 0x1b2ba
callq 0x33b0
movl 0x2c(%rbx), %ecx
movl 0x30(%rbx), %r8d
movl 0x34(%rbx), %r9d
leaq 0x16a9d(%rip), %rdi     # 0x1ad08
leaq 0x16a17(%rip), %rdx     # 0x1ac89
movl %ebp, %esi
xorl %eax, %eax
callq 0x3030
cmpb $0x0, 0x45(%rbx)
jne 0x429a
cmpb $0x0, 0x38(%rbx)
cmovneq %r14, %r12
leaq 0x16a56(%rip), %rdi     # 0x1ace6
movq %r12, %rsi
xorl %eax, %eax
callq 0x3030
movl 0x40(%rbx), %esi
leaq 0x16a86(%rip), %r15     # 0x1ad2a
testl %esi, %esi
je 0x42b6
leaq 0x16a40(%rip), %rdi     # 0x1acef
xorl %eax, %eax
callq 0x3030
movq %r15, %rdi
xorl %eax, %eax
callq 0x3030
pushq $0xa
popq %rdi
callq 0x3340
cmpb $0x0, 0x150(%rsp)
movl 0x5c(%rsp), %ebp
je 0x44e1
leaq 0x15fdc(%rip), %rsi     # 0x1a2bd
pushq $0x3
popq %rdx
movq %r13, %rdi
callq 0x3290
testl %eax, %eax
jne 0x4346
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0xbf8a
movq %rax, %r15
testq %rax, %rax
je 0x431a
movl 0x30(%rsp), %edx
leaq 0x15fb1(%rip), %rsi     # 0x1a2c1
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x362c
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x7f02
testq %r15, %r15
jne 0x4346
testq %rax, %rax
je 0x4346
movl 0x8(%rsp), %edx
leaq 0x15fb2(%rip), %rsi     # 0x1a2ee
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x362c
xorpd %xmm0, %xmm0
movapd 0x70(%rsp), %xmm4
ucomisd %xmm0, %xmm4
jne 0x4358
jnp 0x438c
movq 0x28(%rsp), %rax
movupd 0x60(%rax), %xmm1
movapd %xmm1, %xmm2
unpcklpd %xmm4, %xmm2            # xmm2 = xmm2[0],xmm4[0]
movapd %xmm1, %xmm3
movsd %xmm4, %xmm3            # xmm3 = xmm4[0],xmm3[1]
cmpltpd %xmm3, %xmm2
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
andpd %xmm2, %xmm1
andnpd %xmm4, %xmm2
orpd %xmm1, %xmm2
movupd %xmm2, 0x60(%rax)
movsd 0x60(%rsp), %xmm2
ucomisd %xmm0, %xmm2
jne 0x439a
jnp 0x4408
movq 0x28(%rsp), %rdx
movl 0x54(%rdx), %eax
movl 0x58(%rdx), %ecx
cvtsi2sd %rax, %xmm0
movsd 0x15c66(%rip), %xmm1    # 0x1a018
mulsd %xmm2, %xmm1
minsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0x54(%rdx)
cvtsi2sd %rcx, %xmm0
maxsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0x58(%rdx)
movl 0x70(%rdx), %eax
movq 0x88(%rsp), %rcx
cmpl %ecx, %eax
cmoval %eax, %ecx
movl %ecx, 0x70(%rdx)
cmpb $0x1, 0x28(%rbx)
jne 0x4408
cmpb $0x0, 0x38(%rbx)
jne 0x4408
cmpl $0x3, 0x30(%rbx)
jne 0x4408
cvttsd2si %xmm2, %rax
movq 0x28(%rsp), %rcx
movl %eax, 0x17c(%rcx)
cmpb $0x1, 0x50(%rbx)
jne 0x4438
cmpl $0x900af, 0x10(%rbx)    # imm = 0x900AF
ja 0x4438
cmpb $0x0, 0x34da2(%rip)     # 0x391c0
jne 0x4438
movb $0x1, 0x34d99(%rip)     # 0x391c0
leaq 0x15ef1(%rip), %rsi     # 0x1a31f
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x362c
cmpl $0x0, 0x1c(%rbx)
jg 0x444e
leaq 0x15f40(%rip), %rsi     # 0x1a385
xorl %edi, %edi
xorl %eax, %eax
callq 0x362c
cmpl $0x0, 0x24(%rbx)
jg 0x4464
leaq 0x15f51(%rip), %rsi     # 0x1a3ac
xorl %edi, %edi
xorl %eax, %eax
callq 0x362c
cmpl $0x0, 0x34(%rbx)
jg 0x447a
leaq 0x15f61(%rip), %rsi     # 0x1a3d2
xorl %edi, %edi
xorl %eax, %eax
callq 0x362c
movq 0x28(%rsp), %rax
movl 0x174(%rax), %r8d
movl 0x178(%rax), %r9d
movl %r8d, %eax
orl %r9d, %eax
je 0x44e1
movl 0x48(%rbx), %edx
movl 0x4c(%rbx), %ecx
movl %edx, %eax
orl %ecx, %eax
je 0x44e1
leal 0x9(%r8), %eax
cmpl %eax, %edx
seta %al
leal 0x9(%r9), %esi
cmpl %esi, %ecx
seta %sil
orb %al, %sil
jne 0x44d1
leal -0x9(%r8), %eax
cmpl %eax, %edx
setae %al
leal -0x9(%r9), %esi
cmpl %esi, %ecx
setae %sil
orb %al, %sil
jne 0x44e1
leaq 0x15f1e(%rip), %rsi     # 0x1a3f6
xorl %edi, %edi
xorl %eax, %eax
callq 0x362c
leaq 0xd0(%rsp), %rdi
callq 0x3130
movl %ebp, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x0, 0x34c0d(%rip)     # 0x39116
setne %al
andb %r14b, %al
cmpb $0x1, %al
jne 0x4022
movl (%rbx), %esi
cmpb $0x0, 0x18(%rbx)
pushq $0x49
popq %rax
pushq $0x50
popq %rcx
cmovnel %eax, %ecx
movapd 0x70(%rsp), %xmm1
cvttsd2si %xmm1, %r8
movl 0x4(%rbx), %edx
movl %r8d, %eax
cvtsi2sd %rax, %xmm0
subsd %xmm0, %xmm1
mulsd 0x15ad8(%rip), %xmm1    # 0x1a020
addsd 0x15ac0(%rip), %xmm1    # 0x1a010
cvttsd2si %xmm1, %r9
leaq 0x16579(%rip), %rdi     # 0x1aad5
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x3030
leaq 0x16cda(%rip), %rdi     # 0x1b247
callq 0x33b0
movl (%rbx), %esi
movl 0x4(%rbx), %edx
movzbl 0x18(%rbx), %ecx
leaq 0x1657b(%rip), %rdi     # 0x1aafd
xorl %eax, %eax
callq 0x3030
leaq 0x16d0e(%rip), %rax     # 0x1b29e
leaq 0x16ccc(%rip), %rcx     # 0x1b263
cmpb $0x0, 0x38(%rbx)
cmovneq %rax, %rcx
leaq 0x16cdb(%rip), %rax     # 0x1b281
leaq 0x16cbb(%rip), %rdi     # 0x1b268
cmovneq %rax, %rdi
cmpb $0x0, 0x28(%rbx)
cmoveq %rcx, %rdi
callq 0x33b0
movl 0x3c(%rbx), %r8d
movl 0x1c(%rbx), %edx
addl %r8d, %edx
addl 0x24(%rbx), %r8d
movl 0x40(%rbx), %r10d
movl 0x2c(%rbx), %r9d
addl %r10d, %r9d
addl 0x34(%rbx), %r10d
movl 0x10(%rbx), %eax
imulq $0x3e8, %rax, %rsi      # imm = 0x3E8
movl 0x20(%rbx), %ecx
movl 0x30(%rbx), %r11d
movb 0x18(%rbx), %al
testb %al, %al
movl $0x0, %r15d
cmovnel %r9d, %r15d
movl $0x0, %r13d
cmovnel %r11d, %r13d
cmpb $0x1, %al
jne 0x4615
movzbl 0x44(%rbx), %r14d
xorl $0x1, %r14d
addl %r10d, %r14d
subq $0x8, %rsp
leaq 0x16501(%rip), %rdi     # 0x1ab21
xorl %r12d, %r12d
xorl %eax, %eax
pushq %r14
pushq %r13
pushq %r15
pushq %r10
pushq %r11
callq 0x3030
addq $0x30, %rsp
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
andl $0x0, 0x90(%rsp)
movb $0x0, (%rax)
cmpb $0x1, 0x18(%rbx)
movq 0x50(%rsp), %r15
jne 0x469c
cmpb $0x0, 0x44(%rbx)
jne 0x469c
leaq 0x164eb(%rip), %rsi     # 0x1ab54
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x75c4
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x7108
leaq 0x8(%rsp), %rdi
callq 0x3130
leaq 0x23b16(%rip), %rsi     # 0x281b9
pushq $0x3
popq %rdx
movq %r15, %rdi
callq 0x3290
testl %eax, %eax
jne 0x473a
leaq 0x164ac(%rip), %rsi     # 0x1ab69
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x75c4
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x7108
leaq 0x8(%rsp), %rdi
callq 0x3130
leaq 0x1648c(%rip), %rsi     # 0x1ab83
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x75c4
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x7108
leaq 0x8(%rsp), %rdi
callq 0x3130
leaq 0x4(%r15), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x30c0
movq %rax, %r12
movabsq $0x43495620494d4448, %r14 # imm = 0x43495620494D4448
movl $0x0, %r13d
cmpq %r14, (%r15)
jne 0x4830
leaq 0x16449(%rip), %rsi     # 0x1aba3
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x75c4
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x7108
movq 0x50(%rsp), %r15
leaq 0x8(%rsp), %rdi
callq 0x3130
leaq 0x163ea(%rip), %rsi     # 0x1ab83
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x75c4
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x7108
leaq 0x8(%rsp), %rdi
callq 0x3130
leaq 0x9(%r15), %rdi
xorl %r12d, %r12d
xorl %esi, %esi
xorl %edx, %edx
callq 0x30c0
movq %rax, %r13
movzbl %r13b, %edi
callq 0xbf10
movl %eax, %ebp
testb %al, %al
je 0x4a56
leaq 0x16370(%rip), %rsi     # 0x1ab69
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x75c4
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x7108
movzbl %bpl, %r12d
leaq 0x8(%rsp), %rdi
callq 0x3130
testl %r12d, %r12d
je 0x4a53
movsd 0x157e7(%rip), %xmm1    # 0x1a028
movapd 0x70(%rsp), %xmm0
callq 0x3320
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4a56
jp 0x4a56
leaq 0x16354(%rip), %rsi     # 0x1abbb
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x75c4
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x7108
leaq 0x8(%rsp), %rdi
callq 0x3130
jmp 0x4a56
movapd 0x70(%rsp), %xmm0
mulsd %xmm1, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %r9
leaq 0x16173(%rip), %r10     # 0x1aa2c
leaq 0x163c9(%rip), %rbp     # 0x1ac89
cmoveq %rbp, %r10
addq $-0x8, %rsp
leaq 0x16147(%rip), %rdi     # 0x1aa16
xorl %r14d, %r14d
movl %esi, 0x70(%rsp)
movq %rbp, %rdx
xorl %eax, %eax
pushq %r10
callq 0x3030
popq %rcx
popq %rdx
addl $0xa, %r12d
movl 0x10(%rbx), %eax
cvtsi2sd %rax, %xmm0
divsd 0x15720(%rip), %xmm0    # 0x1a018
leaq 0x16133(%rip), %rdi     # 0x1aa32
movl %r12d, %esi
movq %rbp, %rdx
movsd 0x60(%rsp), %xmm1
movapd 0x70(%rsp), %xmm2
movb $0x3, %al
callq 0x3030
movl (%rbx), %ecx
movl 0x4(%rbx), %r8d
addq $-0x8, %rsp
leaq 0x16134(%rip), %rdi     # 0x1aa5d
movl %r12d, %esi
movq %rbp, %rdx
movl %ecx, %r9d
xorl %eax, %eax
pushq %r8
callq 0x3030
popq %rcx
popq %rdx
movzbl 0x18(%rbx), %ecx
cmpb $0x0, 0x44(%rbx)
movl %ecx, %edx
cmovnel %r14d, %edx
movl 0x3c(%rbx), %r8d
movl 0x1c(%rbx), %r9d
addl %r8d, %r9d
addl 0x24(%rbx), %r8d
movl 0x40(%rbx), %r10d
movl 0x2c(%rbx), %r11d
addl %r10d, %r11d
addl 0x34(%rbx), %r10d
movl 0x10(%rbx), %eax
cvtsi2sd %rax, %xmm0
movl 0x20(%rbx), %r14d
movsd 0x156b3(%rip), %xmm1    # 0x1a030
divsd %xmm0, %xmm1
addsd 0x15687(%rip), %xmm1    # 0x1a010
cvttsd2si %xmm1, %rsi
movq %rsi, %rdi
sarq $0x3f, %rdi
subsd 0x1569b(%rip), %xmm1    # 0x1a038
cvttsd2si %xmm1, %rax
shll %cl, %r10d
shll %cl, %r11d
andq %rdi, %rax
orq %rsi, %rax
addl %edx, %r11d
movl 0x30(%rbx), %r15d
shll %cl, %r15d
leaq 0x160ba(%rip), %rdi     # 0x1aa79
movl %r12d, %esi
movq %rbp, %rdx
movq %rax, %rcx
xorl %eax, %eax
pushq %r15
pushq %r14
pushq %r11
pushq %r10
callq 0x3030
addq $0x20, %rsp
cmpb $0x1, 0x18(%rbx)
jne 0x49f9
leaq 0x160b4(%rip), %rdi     # 0x1aa9c
leaq 0x1629a(%rip), %rdx     # 0x1ac89
movl %r12d, %esi
xorl %eax, %eax
callq 0x3030
cmpb $0x1, 0x28(%rbx)
jne 0x4a17
leaq 0x160a5(%rip), %rdi     # 0x1aaab
leaq 0x1627c(%rip), %rdx     # 0x1ac89
movl %r12d, %esi
xorl %eax, %eax
callq 0x3030
cmpb $0x1, 0x38(%rbx)
jne 0x4a35
leaq 0x16096(%rip), %rdi     # 0x1aaba
leaq 0x1625e(%rip), %rdx     # 0x1ac89
movl %r12d, %esi
xorl %eax, %eax
callq 0x3030
leaq 0x1608d(%rip), %rdi     # 0x1aac9
leaq 0x16246(%rip), %rdx     # 0x1ac89
movl 0x68(%rsp), %esi
xorl %eax, %eax
callq 0x3030
jmp 0x42c8
xorl %r12d, %r12d
cmpl $0x0, 0x14(%rbx)
je 0x4a96
leaq 0x16172(%rip), %rsi     # 0x1abd5
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x75c4
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x7108
leaq 0x8(%rsp), %rdi
callq 0x3130
cmpl $0x0, 0x8(%rbx)
je 0x4adc
cmpl $0x0, 0xc(%rbx)
je 0x4adc
leaq 0x16148(%rip), %rsi     # 0x1abf1
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x75c4
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x7108
leaq 0x8(%rsp), %rdi
callq 0x3130
leaq 0x236d6(%rip), %rsi     # 0x281b9
pushq $0x3
popq %rdx
movq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x3290
leaq 0x16115(%rip), %rsi     # 0x1ac0f
testl %eax, %eax
je 0x4b6c
cmpq %r14, (%r15)
je 0x4b6c
leaq 0x1612a(%rip), %rsi     # 0x1ac34
pushq $0x3
popq %rdx
movq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x3290
testl %eax, %eax
je 0x4b5c
leaq 0x262a9(%rip), %rsi     # 0x2adce
pushq $0x3
popq %rdx
movq %r14, %rdi
callq 0x3290
testl %eax, %eax
je 0x4b65
leaq 0x19eb6(%rip), %rsi     # 0x1e9f1
pushq $0x3
popq %rdx
movq %r14, %rdi
callq 0x3290
testl %eax, %eax
leaq 0x160fc(%rip), %rax     # 0x1ac4b
leaq 0x15e3d(%rip), %rsi     # 0x1a993
cmoveq %rax, %rsi
jmp 0x4b6c
leaq 0x160c2(%rip), %rsi     # 0x1ac25
jmp 0x4b6c
leaq 0x160cc(%rip), %rsi     # 0x1ac38
leaq 0x160eb(%rip), %r15     # 0x1ac5e
movq %r15, %rdi
xorl %eax, %eax
callq 0x3030
cmpq $0x0, 0x38(%rsp)
je 0x4b8c
movq 0x30(%rsp), %rsi
jmp 0x4b93
leaq 0x15e00(%rip), %rsi     # 0x1a993
movq %r15, %rdi
xorl %eax, %eax
callq 0x3030
movl 0x8(%rbx), %esi
movl 0xc(%rbx), %edx
leaq 0x160be(%rip), %rdi     # 0x1ac68
movl %r12d, %ecx
movl %r13d, %r8d
xorl %eax, %eax
callq 0x3030
leaq 0x166f9(%rip), %rdi     # 0x1b2b7
callq 0x33b0
leaq 0x30(%rsp), %rdi
callq 0x3130
movq 0x50(%rsp), %r13
jmp 0x42c8
jmp 0x4bf9
jmp 0x4c08
jmp 0x4bf9
jmp 0x4c08
jmp 0x4bf9
jmp 0x4c08
jmp 0x4c08
jmp 0x4bf9
jmp 0x4c08
jmp 0x4bf9
jmp 0x4bf9
jmp 0x4c08
jmp 0x4c08
jmp 0x4bf9
jmp 0x4c08
jmp 0x4bf9
jmp 0x4c08
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3130
jmp 0x4c0b
movq %rax, %rbx
jmp 0x4ca1
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3130
jmp 0x4c40
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3130
jmp 0x4c33
jmp 0x4c3d
movq %rax, %rbx
jmp 0x4c40
jmp 0x4cad
jmp 0x4cad
jmp 0x4cad
jmp 0x4cad
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x4ca6
jmp 0x4cad
jmp 0x4cad
jmp 0x4cad
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3130
jmp 0x4c5f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3130
jmp 0x4c6e
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x3130
jmp 0x4c80
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x3130
jmp 0x4c92
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
jmp 0x4ca6
jmp 0x4cad
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3130
jmp 0x4cb0
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x3430