// File: /workspace/github_cpp_makefile_star2_O3/fiveseven-lambda[P]michaelis-menten/a.cpp
// Function: main
int main(){
	display = XOpenDisplay(NULL);
	if(display == NULL){
		fputs("error: cannot connect to X server\n", stderr);
		return -1;
	}
	int screen = XDefaultScreen(display);
	Window root = XRootWindow(display, screen);
	width = XDisplayWidth(display, screen);
	height = XDisplayHeight(display, screen);
	unsigned long black = XBlackPixel(display, screen), white = XWhitePixel(display, screen);

	window = XCreateSimpleWindow(display, root, 0, 0, width, height, 1, black, white);

	int depth = XDefaultDepth(display, screen);
	buffer = XCreatePixmap(display, window, width, height, depth);

	XGCValues gcValues;
	gcValues.foreground = black;
	winBlackGC = XCreateGC(display, window, GCForeground, &gcValues);
	bufBlackGC = XCreateGC(display, buffer, GCForeground, &gcValues);
	gcValues.foreground = white;
	winWhiteGC = XCreateGC(display, window, GCForeground, &gcValues);
	bufWhiteGC = XCreateGC(display, buffer, GCForeground, &gcValues);

	constexpr long set_mask = ExposureMask | StructureNotifyMask | KeyPressMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask;
	constexpr long run_mask = StructureNotifyMask | KeyPressMask;

	XSelectInput(display, window, set_mask);
	XMapWindow(display, window);

set:
	for(;;){
		XEvent event;
		XNextEvent(display, &event);
		switch(event.type){
			case Expose:
				XCopyArea(
					display, buffer, window, winBlackGC,
					event.xexpose.x, event.xexpose.y, event.xexpose.width, event.xexpose.height, event.xexpose.x, event.xexpose.y
				);
				continue;
			case ConfigureNotify:
				width = event.xconfigure.width;
				height = event.xconfigure.height;
				XFreePixmap(display, buffer);
				buffer = XCreatePixmap(display, window, width, height, depth);
				break;
			case DestroyNotify:
				XFreeGC(display, winBlackGC);
				XFreeGC(display, winWhiteGC);
				XFreeGC(display, bufBlackGC);
				XFreeGC(display, bufWhiteGC);
				XFreePixmap(display, buffer);
				XCloseDisplay(display);
				return 0;
			case ButtonPress:
				switch(event.xbutton.button){
					case Button1:
						object::node::find(Vector<short>(event.xbutton.x, event.xbutton.y));
						if(object::node::focused == object::node::nodes.size()){
							object::edge::find(Vector<short>(event.xbutton.x, event.xbutton.y));
							if(object::edge::focused < object::edge::edges.size()){
								object::edge::drawing::from = -1;
								object::edge::drawing::from_edge = object::edge::focused;
								object::edge::drawing::points.push_back(XPoint(event.xbutton.x, event.xbutton.y));
							}
						}else{
							object::edge::drawing::from = object::node::focused;
							object::edge::drawing::points.push_back(XPoint(event.xbutton.x, event.xbutton.y));
						}
						break;
					case Button3:
						object::node::find(Vector<short>(event.xbutton.x, event.xbutton.y));
						if(object::node::focused == object::node::nodes.size()){
							object::node::nodes.push_back(object::node::Node(
								.001,
								Vector<double>(
									static_cast<double>(event.xbutton.x) / width,
									static_cast<double>(event.xbutton.y) / height
								)
							));
							object::node::origin.x = object::node::origin.y = 0;
						}else{
							Arc arc = object::node::nodes[object::node::focused].arc();
							object::node::origin.x = arc.x - event.xbutton.x;
							object::node::origin.y = arc.y - event.xbutton.y;
						}
						object::node::moving = true;
						break;
					case Button4:
						if(object::node::focused < object::node::nodes.size()){
							object::node::nodes[object::node::focused].am += .0001;
						}else if(object::edge::focused < object::edge::edges.size()){
							object::edge::edges[object::edge::focused].k += .0001;
						}
						break;
					case Button5:
						if(object::node::focused < object::node::nodes.size()){
							object::node::nodes[object::node::focused].am -= .0001;
							if(object::node::nodes[object::node::focused].am < 0){
								object::node::nodes[object::node::focused].am = 0;
							}
						}else if(object::edge::focused < object::edge::edges.size()){
							object::edge::edges[object::edge::focused].k -= .0001;
							if(object::edge::edges[object::edge::focused].k < 0){
								object::edge::edges[object::edge::focused].k = 0;
							}
						}
				}
				break;
			case ButtonRelease:
				if(object::node::moving){
					object::node::moving = false;
				}else if(!object::edge::drawing::points.empty()){
					object::node::find(Vector<short>(event.xbutton.x, event.xbutton.y));
					if(object::node::focused == object::node::nodes.size()){
						object::edge::find(Vector<short>(event.xbutton.x, event.xbutton.y));
						if(object::edge::focused < object::edge::edges.size()){
							if(object::edge::drawing::from != -1){
								object::edge::edges[object::edge::focused].from.push_back(object::edge::drawing::from);
							}
						}
					}else{
						if(object::edge::drawing::from == -1){
							object::edge::edges[object::edge::drawing::from_edge].to.push_back(object::node::focused);
						}else if(object::edge::drawing::from != object::node::focused){
							std::size_t i = std::distance(
								object::edge::drawing::len.begin(),
								std::lower_bound(object::edge::drawing::len.begin(), object::edge::drawing::len.end(),
								object::edge::drawing::len.back() / 2)
							);
							Vector<double> line =
								object::node::nodes[object::node::focused].p - object::node::nodes[object::edge::drawing::from].p;
							line *= .2;
							Vector<double> mid(
								static_cast<double>(object::edge::drawing::points[i].x) / width,
								static_cast<double>(object::edge::drawing::points[i].y) / height
							);
							object::edge::focused = object::edge::edges.size();
							object::edge::edges.push_back(
								object::edge::Edge(
									object::edge::drawing::from, object::node::focused, .001, mid, mid - line, mid + line
								)
							);
							object::node::focused = object::node::nodes.size();
						}
					}
					object::edge::drawing::points.clear();
					object::edge::drawing::len.clear();
				}
				break;
			case MotionNotify:
				if(object::node::moving){
					object::node::nodes[object::node::focused].p = Vector<double>(
						static_cast<double>(object::node::origin.x + event.xmotion.x) / width,
						static_cast<double>(object::node::origin.y + event.xmotion.y) / height
					);
				}else if(!object::edge::drawing::points.empty()){
					double x = object::edge::drawing::points.back().x;
					double y = object::edge::drawing::points.back().y;
					object::edge::drawing::points.push_back(XPoint{static_cast<short>(event.xmotion.x), static_cast<short>(event.xmotion.y)});
					double prev = object::edge::drawing::len.empty() ? 0 : object::edge::drawing::len.back();
					object::edge::drawing::len.push_back(prev + hypot(x - event.xmotion.x, y - event.xmotion.y));
				}
				break;
			case KeyPress:
				switch(XLookupKeysym(&event.xkey, 0)){
					case XK_Return:
						XSelectInput(display, window, run_mask);
						goto run;
				}
			default:
				continue;
		}
		object::draw_all();
	}
run:
	for(object::node::Node &i : object::node::nodes) i.am_set = i.am;
	for(;;){
		if(XPending(display)){
			XEvent event;
			XNextEvent(display, &event);
			switch(event.type){
				case DestroyNotify:
					XFreeGC(display, winBlackGC);
					XFreeGC(display, winWhiteGC);
					XFreeGC(display, bufBlackGC);
					XFreeGC(display, bufWhiteGC);
					XFreePixmap(display, buffer);
					return 0;
				case ConfigureNotify:
					width = event.xconfigure.width;
					height = event.xconfigure.height;
					break;
				case KeyPress:
					switch(XLookupKeysym(&event.xkey, 0)){
						case XK_Return:
							for(object::node::Node &i : object::node::nodes) i.am = i.am_set;
							XSelectInput(display, window, set_mask);
							XCopyArea(display, buffer, window, winBlackGC, 0, 0, width, height, 0, 0);
							object::draw_all();
							XFlush(display);
							goto set;
					}
			}
		}else{
			for(object::edge::Edge &i : object::edge::edges){
				double tmp = i.k / object::scale;
				for(std::size_t j : i.from) tmp *= object::node::nodes[j].am * object::scale;
				for(std::size_t j : i.from) object::node::nodes[j].am -= tmp;
				for(std::size_t j : i.to) object::node::nodes[j].am += tmp;
			}
			for(std::size_t i = 0; i < object::node::nodes.size(); ++i){
				printf("%f%c", object::node::nodes[i].am, ",\n"[i == object::node::nodes.size() - 1]);
			}
			object::draw_all();
			XFlush(display);
			usleep(1000);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
xorl %edi, %edi
callq 0x21f0
movq %rax, 0x3f60(%rip)      # 0x7188
testq %rax, %rax
je 0x4096
movq %rax, %rdi
callq 0x2120
movl %eax, %ebx
movq 0x3f46(%rip), %rdi      # 0x7188
movl %eax, %esi
callq 0x2250
movq %rax, %r15
movq 0x3f35(%rip), %rdi      # 0x7188
movl %ebx, %esi
callq 0x2260
movl %eax, 0x3f40(%rip)      # 0x71a0
movq 0x3f21(%rip), %rdi      # 0x7188
movl %ebx, %esi
callq 0x2040
movl %eax, 0x3f30(%rip)      # 0x71a4
movq 0x3f0d(%rip), %rdi      # 0x7188
movl %ebx, %esi
callq 0x2240
movq %rax, %r12
movq 0x3efc(%rip), %rdi      # 0x7188
movl %ebx, %esi
callq 0x21e0
movq %rax, %r14
movq 0x3eeb(%rip), %rdi      # 0x7188
movl 0x3efc(%rip), %r8d      # 0x71a0
movl 0x3ef9(%rip), %r9d      # 0x71a4
subq $0x8, %rsp
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
pushq %rax
pushq %r12
pushq $0x1
callq 0x2090
addq $0x20, %rsp
movq %rax, 0x3ec5(%rip)      # 0x7190
movq 0x3eb6(%rip), %rdi      # 0x7188
movl %ebx, %esi
callq 0x2070
movq 0x3ea8(%rip), %rdi      # 0x7188
movq 0x3ea9(%rip), %rsi      # 0x7190
movl 0x3eb3(%rip), %edx      # 0x71a0
movl 0x3eb1(%rip), %ecx      # 0x71a4
movl %eax, -0x2c(%rbp)
movl %eax, %r8d
callq 0x2050
movq %rax, 0x3e93(%rip)      # 0x7198
leaq -0x1e0(%rbp), %r15
movq %r12, 0x10(%r15)
movq 0x3e71(%rip), %rdi      # 0x7188
movq 0x3e72(%rip), %rsi      # 0x7190
movl $0x4, %edx
movq %r15, %rcx
callq 0x20f0
movq %rax, 0x3e76(%rip)      # 0x71a8
movq 0x3e4f(%rip), %rdi      # 0x7188
movq 0x3e58(%rip), %rsi      # 0x7198
movl $0x4, %edx
movq %r15, %rcx
callq 0x20f0
movq %rax, 0x3e64(%rip)      # 0x71b8
movq %r14, 0x10(%r15)
movq 0x3e29(%rip), %rdi      # 0x7188
movq 0x3e2a(%rip), %rsi      # 0x7190
movl $0x4, %edx
movq %r15, %rcx
callq 0x20f0
movq %rax, 0x3e36(%rip)      # 0x71b0
movq 0x3e07(%rip), %rdi      # 0x7188
movq 0x3e10(%rip), %rsi      # 0x7198
movl $0x4, %edx
movq %r15, %rcx
callq 0x20f0
movq %rax, 0x3e24(%rip)      # 0x71c0
movq 0x3de5(%rip), %rdi      # 0x7188
movq 0x3de6(%rip), %rsi      # 0x7190
movl $0x2804d, %edx          # imm = 0x2804D
callq 0x2130
movq 0x3dcd(%rip), %rdi      # 0x7188
movq 0x3dce(%rip), %rsi      # 0x7190
callq 0x21b0
leaq -0x160(%rbp), %r14
leaq 0x1cf3(%rip), %r12      # 0x50c8
leaq 0x1ce7(%rip), %r15      # 0x50c3
movq 0x3da5(%rip), %rdi      # 0x7188
movq %r14, %rsi
callq 0x2210
movl -0x160(%rbp), %eax
leal -0x2(%rax), %ecx
cmpl $0xa, %ecx
ja 0x3624
leaq 0x1c4c(%rip), %rdx      # 0x5050
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq %r14, %rdi
xorl %esi, %esi
callq 0x21d0
cmpq $0xff0d, %rax           # imm = 0xFF0D
jne 0x33dc
movq 0x3d62(%rip), %rdi      # 0x7188
movq 0x3d63(%rip), %rsi      # 0x7190
movl $0x20001, %edx          # imm = 0x20001
callq 0x2130
movq 0x3d8a(%rip), %rax      # 0x71c8
movq 0x3d8b(%rip), %rcx      # 0x71d0
cmpq %rcx, %rax
je 0x3459
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rax)
addq $0x20, %rax
jmp 0x3445
movq 0x3d28(%rip), %rdi      # 0x7188
callq 0x2180
testl %eax, %eax
je 0x349a
movq 0x3d18(%rip), %rdi      # 0x7188
movq %r14, %rsi
callq 0x2210
movl -0x160(%rbp), %eax
cmpl $0x2, %eax
je 0x35e8
cmpl $0x16, %eax
je 0x35cb
cmpl $0x11, %eax
jne 0x3459
jmp 0x3fb3
movq 0x3d4f(%rip), %rcx      # 0x71f0
movq 0x3d50(%rip), %rdx      # 0x71f8
movq 0x3d19(%rip), %rax      # 0x71c8
cmpq %rdx, %rcx
je 0x3556
movsd 0x30(%rcx), %xmm0
movsd 0x3cab(%rip), %xmm1     # 0x7170
divsd %xmm1, %xmm0
movq (%rcx), %rsi
movq 0x8(%rcx), %rdi
movq %rsi, %r8
cmpq %rdi, %rsi
je 0x3518
movq (%r8), %r9
shlq $0x5, %r9
movsd (%rax,%r9), %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm2, %xmm0
addq $0x8, %r8
cmpq %rdi, %r8
jne 0x34d8
jmp 0x3513
movq (%rsi), %r8
shlq $0x5, %r8
movsd (%rax,%r8), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, (%rax,%r8)
addq $0x8, %rsi
cmpq %rdi, %rsi
jne 0x34f8
movq 0x18(%rcx), %rsi
movq 0x20(%rcx), %rdi
cmpq %rdi, %rsi
je 0x3542
movq (%rsi), %r8
shlq $0x5, %r8
movsd (%rax,%r8), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rax,%r8)
addq $0x8, %rsi
jmp 0x3520
addq $0x68, %rcx
cmpq %rdx, %rcx
jne 0x34b8
movq 0x3c72(%rip), %rax      # 0x71c8
movq 0x3c73(%rip), %rcx      # 0x71d0
subq %rax, %rcx
je 0x35ab
sarq $0x5, %rcx
xorl %ebx, %ebx
xorl %r13d, %r13d
movsd (%rax,%rbx), %xmm0
decq %rcx
xorl %eax, %eax
cmpq %rcx, %r13
sete %al
movsbl (%rax,%r12), %esi
movq %r15, %rdi
movb $0x1, %al
callq 0x2030
incq %r13
movq 0x3c3c(%rip), %rcx      # 0x71d0
movq 0x3c2d(%rip), %rax      # 0x71c8
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %rbx
cmpq %rcx, %r13
jb 0x356b
callq 0x2b7e
movq 0x3bd1(%rip), %rdi      # 0x7188
callq 0x2220
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x2200
jmp 0x3459
movl -0x128(%rbp), %eax
movl -0x124(%rbp), %ecx
movl %eax, 0x3bc3(%rip)      # 0x71a0
movl %ecx, 0x3bc1(%rip)      # 0x71a4
jmp 0x3459
movq %r14, %rdi
xorl %esi, %esi
callq 0x21d0
cmpq $0xff0d, %rax           # imm = 0xFF0D
jne 0x3459
movq 0x3bc3(%rip), %rax      # 0x71c8
movq 0x3bc4(%rip), %rcx      # 0x71d0
cmpq %rcx, %rax
je 0x39d6
movsd 0x8(%rax), %xmm0
movsd %xmm0, (%rax)
addq $0x20, %rax
jmp 0x360c
cmpl $0x16, %eax
je 0x3819
cmpl $0x11, %eax
jne 0x33dc
jmp 0x4026
movq 0x3b46(%rip), %rdi      # 0x7188
movq 0x3b4f(%rip), %rsi      # 0x7198
movq 0x3b40(%rip), %rdx      # 0x7190
movq 0x3b51(%rip), %rcx      # 0x71a8
movl -0x138(%rbp), %r8d
movl -0x134(%rbp), %r9d
movl -0x130(%rbp), %eax
movl -0x12c(%rbp), %r10d
pushq %r9
pushq %r8
pushq %r10
pushq %rax
callq 0x20c0
addq $0x20, %rsp
jmp 0x33dc
cmpb $0x1, 0x3b5a(%rip)      # 0x71e8
jne 0x3873
movb $0x0, 0x3b4d(%rip)      # 0x71e8
jmp 0x3fa9
cmpb $0x1, 0x3b41(%rip)      # 0x71e8
jne 0x396c
movswl 0x3b36(%rip), %eax      # 0x71ea
addl -0x120(%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl 0x3ad4(%rip), %xmm1 # 0x71a0
divsd %xmm1, %xmm0
movswl 0x3b15(%rip), %eax      # 0x71ec
addl -0x11c(%rbp), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
xorps %xmm2, %xmm2
cvtsi2sdl 0x3ab5(%rip), %xmm2 # 0x71a4
divsd %xmm2, %xmm1
movq 0x3ae6(%rip), %rax      # 0x71e0
movq 0x3ac7(%rip), %rcx      # 0x71c8
shlq $0x5, %rax
movsd %xmm0, 0x10(%rcx,%rax)
movsd %xmm1, 0x18(%rcx,%rax)
jmp 0x3fa9
movl -0x10c(%rbp), %eax
decl %eax
cmpl $0x4, %eax
ja 0x3fa9
leaq 0x194e(%rip), %rcx      # 0x507c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzwl -0x120(%rbp), %eax
movzwl -0x11c(%rbp), %ecx
movw %ax, -0xa0(%rbp)
movw %cx, -0x9e(%rbp)
leaq -0xa0(%rbp), %rbx
movq %rbx, %rdi
callq 0x2841
movq 0x3a77(%rip), %rax      # 0x71e0
movq 0x3a60(%rip), %rcx      # 0x71d0
subq 0x3a51(%rip), %rcx      # 0x71c8
sarq $0x5, %rcx
cmpq %rcx, %rax
jne 0x3e29
movzwl -0x120(%rbp), %eax
movzwl -0x11c(%rbp), %ecx
movw %ax, -0xa0(%rbp)
movw %cx, -0x9e(%rbp)
movq %rbx, %rdi
callq 0x293b
movq 0x3a49(%rip), %rcx      # 0x71f8
subq 0x3a3a(%rip), %rcx      # 0x71f0
movq 0x3a4b(%rip), %rax      # 0x7208
sarq $0x3, %rcx
movabsq $0x4ec4ec4ec4ec4ec5, %rdx # imm = 0x4EC4EC4EC4EC4EC5
imulq %rdx, %rcx
cmpq %rcx, %rax
jae 0x3fa9
movq $-0x1, 0x3a2d(%rip) # 0x7210
movq %rax, 0x3a2e(%rip)      # 0x7218
movzwl -0x120(%rbp), %eax
movzwl -0x11c(%rbp), %ecx
movw %ax, -0xa0(%rbp)
movw %cx, -0x9e(%rbp)
leaq 0x3a13(%rip), %rdi      # 0x7220
leaq -0xa0(%rbp), %rsi
jmp 0x3e56
movl -0x128(%rbp), %eax
movl -0x124(%rbp), %ecx
movl %eax, 0x3975(%rip)      # 0x71a0
movl %ecx, 0x3973(%rip)      # 0x71a4
movq 0x3950(%rip), %rdi      # 0x7188
movq 0x3959(%rip), %rsi      # 0x7198
callq 0x2290
movq 0x393d(%rip), %rdi      # 0x7188
movq 0x393e(%rip), %rsi      # 0x7190
movl 0x3948(%rip), %edx      # 0x71a0
movl 0x3946(%rip), %ecx      # 0x71a4
movl -0x2c(%rbp), %r8d
callq 0x2050
movq %rax, 0x392a(%rip)      # 0x7198
jmp 0x3fa9
movq 0x39a6(%rip), %rax      # 0x7220
cmpq 0x39a7(%rip), %rax      # 0x7228
je 0x3fa9
movzwl -0x120(%rbp), %eax
movzwl -0x11c(%rbp), %ecx
movw %ax, -0xa0(%rbp)
movw %cx, -0x9e(%rbp)
leaq -0xa0(%rbp), %rbx
movq %rbx, %rdi
callq 0x2841
movq 0x3927(%rip), %rdx      # 0x71e0
movq 0x3910(%rip), %rcx      # 0x71d0
movq 0x3901(%rip), %rax      # 0x71c8
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rcx, %rdx
jne 0x3bb9
movzwl -0x120(%rbp), %eax
movzwl -0x11c(%rbp), %ecx
movw %ax, -0xa0(%rbp)
movw %cx, -0x9e(%rbp)
movq %rbx, %rdi
callq 0x293b
movq 0x3906(%rip), %rcx      # 0x7208
movq 0x38ef(%rip), %rdx      # 0x71f8
movq 0x38e0(%rip), %rax      # 0x71f0
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $0x4ec4ec4ec4ec4ec5, %rsi # imm = 0x4EC4EC4EC4EC4EC5
imulq %rsi, %rdx
cmpq %rdx, %rcx
setb %sil
movq 0x38dd(%rip), %rdx      # 0x7210
cmpq $-0x1, %rdx
setne %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x3f7b
imulq $0x68, %rcx, %rcx
leaq (%rax,%rcx), %rdi
movq 0x8(%rax,%rcx), %rsi
cmpq 0x10(%rax,%rcx), %rsi
jne 0x3f3c
leaq 0x38a9(%rip), %rdx      # 0x7210
jmp 0x3f76
movq 0x38b5(%rip), %rax      # 0x7228
cmpq %rax, 0x38a6(%rip)      # 0x7220
je 0x3fa9
movswl -0x4(%rax), %ebx
movswl -0x2(%rax), %r13d
movzwl -0x120(%rbp), %eax
movzwl -0x11c(%rbp), %ecx
movw %ax, -0xa0(%rbp)
movw %cx, -0x9e(%rbp)
leaq 0x3874(%rip), %rdi      # 0x7220
leaq -0xa0(%rbp), %rsi
callq 0x43cc
movq 0x3881(%rip), %rax      # 0x7240
cmpq %rax, 0x3872(%rip)      # 0x7238
je 0x3d56
movsd -0x8(%rax), %xmm0
jmp 0x3d59
movq 0x37ab(%rip), %rdi      # 0x7188
movq 0x37ac(%rip), %rsi      # 0x7190
movl $0x2804d, %edx          # imm = 0x2804D
callq 0x2130
movq 0x3793(%rip), %rdi      # 0x7188
movq 0x379c(%rip), %rsi      # 0x7198
movq 0x378d(%rip), %rdx      # 0x7190
movq 0x379e(%rip), %rcx      # 0x71a8
movl 0x3790(%rip), %eax      # 0x71a0
movl 0x378d(%rip), %r10d     # 0x71a4
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %r11d, %r11d
pushq %r11
pushq %r11
pushq %r10
pushq %rax
callq 0x20c0
addq $0x20, %rsp
callq 0x2b7e
movq 0x374c(%rip), %rdi      # 0x7188
callq 0x2220
jmp 0x33dc
movq 0x3793(%rip), %rax      # 0x71e0
movq 0x377c(%rip), %rdx      # 0x71d0
movq 0x376d(%rip), %rcx      # 0x71c8
subq %rcx, %rdx
sarq $0x5, %rdx
cmpq %rdx, %rax
jae 0x3dd9
shlq $0x5, %rax
movsd (%rcx,%rax), %xmm0
addsd 0x15c4(%rip), %xmm0     # 0x5040
movsd %xmm0, (%rcx,%rax)
jmp 0x3fa9
movzwl -0x120(%rbp), %eax
movzwl -0x11c(%rbp), %ecx
movw %ax, -0xa0(%rbp)
movw %cx, -0x9e(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x2841
movq 0x372b(%rip), %rax      # 0x71e0
movq 0x3714(%rip), %rsi      # 0x71d0
movq 0x3705(%rip), %rcx      # 0x71c8
movq %rsi, %rdx
subq %rcx, %rdx
sarq $0x5, %rdx
cmpq %rdx, %rax
jne 0x3e60
xorps %xmm0, %xmm0
cvtsi2sdl -0x120(%rbp), %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl 0x36b4(%rip), %xmm1 # 0x71a0
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl -0x11c(%rbp), %xmm1
xorps %xmm2, %xmm2
cvtsi2sdl 0x369e(%rip), %xmm2 # 0x71a4
divsd %xmm2, %xmm1
movabsq $0x3f50624dd2f1a9fc, %rax # imm = 0x3F50624DD2F1A9FC
movq %rax, -0xa0(%rbp)
movsd %xmm0, -0x90(%rbp)
movsd %xmm1, -0x88(%rbp)
cmpq 0x36a6(%rip), %rsi      # 0x71d8
je 0x3f49
movupd -0xa0(%rbp), %xmm0
movupd -0x90(%rbp), %xmm1
movupd %xmm1, 0x10(%rsi)
movupd %xmm0, (%rsi)
addq $0x20, %rsi
movq %rsi, 0x3674(%rip)      # 0x71d0
jmp 0x3f5c
movq 0x3678(%rip), %rax      # 0x71e0
movq 0x3661(%rip), %rdx      # 0x71d0
movq 0x3652(%rip), %rcx      # 0x71c8
subq %rcx, %rdx
sarq $0x5, %rdx
cmpq %rdx, %rax
jae 0x3eaf
shlq $0x5, %rax
movsd (%rcx,%rax), %xmm0
addsd 0x14a1(%rip), %xmm0     # 0x5038
movsd %xmm0, (%rcx,%rax)
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x3fa9
addq %rax, %rcx
movq $0x0, (%rcx)
jmp 0x3fa9
movq 0x3650(%rip), %rsi      # 0x7210
cmpq $-0x1, %rsi
je 0x3f1b
cmpq %rdx, %rsi
je 0x3f7b
movq 0x365e(%rip), %r10      # 0x7238
movq 0x365f(%rip), %r8       # 0x7240
movsd -0x8(%r8), %xmm0
mulsd 0x1431(%rip), %xmm0     # 0x5020
subq %r10, %r8
sarq $0x3, %r8
movq %r10, %rcx
testq %r8, %r8
leaq -0xa0(%rbp), %rdi
jle 0x3c2c
movq %r10, %rcx
movq %r8, %r9
shrq %r9
ucomisd (%rcx,%r9,8), %xmm0
jbe 0x3c24
leaq (%rcx,%r9,8), %rcx
addq $0x8, %rcx
notq %r9
addq %r8, %r9
movq %r9, %r8
testq %r9, %r9
jg 0x3c0b
subq %r10, %rcx
movq %rdx, %r8
shlq $0x5, %r8
movsd 0x10(%rax,%r8), %xmm5
movsd 0x18(%rax,%r8), %xmm6
movq %rsi, %r8
shlq $0x5, %r8
subsd 0x10(%rax,%r8), %xmm5
subsd 0x18(%rax,%r8), %xmm6
movsd 0x13c7(%rip), %xmm2     # 0x5028
mulsd %xmm2, %xmm5
movq 0x35b4(%rip), %rax      # 0x7220
sarq %rcx
movswl (%rax,%rcx), %r8d
cvtsi2sd %r8d, %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0x351c(%rip), %xmm0 # 0x71a0
mulsd %xmm2, %xmm6
movswl 0x2(%rax,%rcx), %eax
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0x3501(%rip), %xmm0 # 0x71a4
divsd %xmm0, %xmm2
movq 0x354a(%rip), %rax      # 0x71f8
subq 0x353b(%rip), %rax      # 0x71f0
sarq $0x3, %rax
movabsq $0x4ec4ec4ec4ec4ec5, %rcx # imm = 0x4EC4EC4EC4EC4EC5
imulq %rcx, %rax
movq %rax, 0x353a(%rip)      # 0x7208
movapd %xmm1, %xmm3
subsd %xmm5, %xmm3
movapd %xmm2, %xmm4
subsd %xmm6, %xmm4
addsd %xmm1, %xmm5
addsd %xmm2, %xmm6
movsd 0x1342(%rip), %xmm0     # 0x5030
movq %rdi, %rbx
callq 0x41f6
leaq 0x34f3(%rip), %rdi      # 0x71f0
movq %rbx, %rsi
callq 0x47bc
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x3d1d
movq -0x78(%rbp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq -0xa0(%rbp), %rdi
testq %rdi, %rdi
je 0x3d38
movq -0x90(%rbp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq 0x3491(%rip), %rax      # 0x71d0
subq 0x3482(%rip), %rax      # 0x71c8
sarq $0x5, %rax
movq %rax, 0x348f(%rip)      # 0x71e0
jmp 0x3f7b
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r13d, %xmm1
xorps %xmm2, %xmm2
cvtsi2sdl -0x120(%rbp), %xmm2
subsd %xmm2, %xmm0
xorps %xmm2, %xmm2
cvtsi2sdl -0x11c(%rbp), %xmm2
subsd %xmm2, %xmm1
callq 0x2080
addsd -0x38(%rbp), %xmm0
movsd %xmm0, -0xa0(%rbp)
movq 0x349c(%rip), %rsi      # 0x7240
cmpq 0x349d(%rip), %rsi      # 0x7248
je 0x3dc1
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x3484(%rip)      # 0x7240
jmp 0x3fa9
leaq 0x3470(%rip), %rdi      # 0x7238
leaq -0xa0(%rbp), %rdx
callq 0x4b24
jmp 0x3fa9
movq 0x3428(%rip), %rcx      # 0x7208
movq 0x3411(%rip), %rdx      # 0x71f8
movq 0x3402(%rip), %rax      # 0x71f0
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $0x4ec4ec4ec4ec4ec5, %rsi # imm = 0x4EC4EC4EC4EC4EC5
imulq %rsi, %rdx
cmpq %rdx, %rcx
jae 0x3fa9
imulq $0x68, %rcx, %rcx
movsd 0x30(%rax,%rcx), %xmm0
addsd 0x1222(%rip), %xmm0     # 0x5040
movsd %xmm0, 0x30(%rax,%rcx)
jmp 0x3fa9
movq %rax, 0x33e0(%rip)      # 0x7210
movzwl -0x120(%rbp), %eax
movzwl -0x11c(%rbp), %ecx
movw %ax, -0xa0(%rbp)
movw %cx, -0x9e(%rbp)
leaq 0x33cd(%rip), %rdi      # 0x7220
movq %rbx, %rsi
callq 0x43cc
jmp 0x3fa9
shlq $0x5, %rax
xorps %xmm0, %xmm0
cvtsi2sdl 0x3331(%rip), %xmm0 # 0x71a0
mulsd 0x10(%rcx,%rax), %xmm0
cvttsd2si %xmm0, %edx
xorps %xmm0, %xmm0
cvtsi2sdl 0x3320(%rip), %xmm0 # 0x71a4
mulsd 0x18(%rcx,%rax), %xmm0
cvttsd2si %xmm0, %eax
subw -0x120(%rbp), %dx
movw %dx, 0x334e(%rip)       # 0x71ea
subw -0x11c(%rbp), %ax
movw %ax, 0x3342(%rip)       # 0x71ec
jmp 0x3f66
movq 0x3352(%rip), %rcx      # 0x7208
movq 0x333b(%rip), %rdx      # 0x71f8
movq 0x332c(%rip), %rax      # 0x71f0
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $0x4ec4ec4ec4ec4ec5, %rsi # imm = 0x4EC4EC4EC4EC4EC5
imulq %rsi, %rdx
cmpq %rdx, %rcx
jae 0x3fa9
imulq $0x68, %rcx, %rcx
movsd 0x30(%rax,%rcx), %xmm0
addsd 0x1144(%rip), %xmm0     # 0x5038
movsd %xmm0, 0x30(%rax,%rcx)
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x3fa9
addq %rcx, %rax
addq $0x30, %rax
movq $0x0, (%rax)
jmp 0x3fa9
movq 0x32ce(%rip), %rax      # 0x71f0
imulq $0x68, 0x32ee(%rip), %rcx # 0x7218
leaq (%rax,%rcx), %rdi
addq $0x18, %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x3f6f
movq %rdx, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x3f7b
leaq 0x3278(%rip), %rdi      # 0x71c8
leaq -0xa0(%rbp), %rdx
callq 0x452e
movl $0x0, 0x3284(%rip)      # 0x71ea
movb $0x1, 0x327b(%rip)      # 0x71e8
jmp 0x3fa9
leaq 0x326a(%rip), %rdx      # 0x71e0
callq 0x469a
movq 0x329e(%rip), %rax      # 0x7220
cmpq %rax, 0x329f(%rip)      # 0x7228
je 0x3f92
movq %rax, 0x3296(%rip)      # 0x7228
movq 0x329f(%rip), %rax      # 0x7238
cmpq %rax, 0x32a0(%rip)      # 0x7240
je 0x3fa9
movq %rax, 0x3297(%rip)      # 0x7240
callq 0x2b7e
jmp 0x33dc
movq 0x31ce(%rip), %rdi      # 0x7188
movq 0x31e7(%rip), %rsi      # 0x71a8
callq 0x2110
movq 0x31bb(%rip), %rdi      # 0x7188
movq 0x31dc(%rip), %rsi      # 0x71b0
callq 0x2110
movq 0x31a8(%rip), %rdi      # 0x7188
movq 0x31d1(%rip), %rsi      # 0x71b8
callq 0x2110
movq 0x3195(%rip), %rdi      # 0x7188
movq 0x31c6(%rip), %rsi      # 0x71c0
callq 0x2110
movq 0x3182(%rip), %rdi      # 0x7188
movq 0x318b(%rip), %rsi      # 0x7198
callq 0x2290
xorl %eax, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x315b(%rip), %rdi      # 0x7188
movq 0x3174(%rip), %rsi      # 0x71a8
callq 0x2110
movq 0x3148(%rip), %rdi      # 0x7188
movq 0x3169(%rip), %rsi      # 0x71b0
callq 0x2110
movq 0x3135(%rip), %rdi      # 0x7188
movq 0x315e(%rip), %rsi      # 0x71b8
callq 0x2110
movq 0x3122(%rip), %rdi      # 0x7188
movq 0x3153(%rip), %rsi      # 0x71c0
callq 0x2110
movq 0x310f(%rip), %rdi      # 0x7188
movq 0x3118(%rip), %rsi      # 0x7198
callq 0x2290
movq 0x30fc(%rip), %rdi      # 0x7188
callq 0x22b0
jmp 0x4012
callq 0x22d0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x4014
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x42f8
movq %rbx, %rdi
callq 0x2280