// File: /workspace/github_cpp_makefile_star2_O1/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, 0x3f73(%rip)      # 0x7188
testq %rax, %rax
je 0x40cc
movq %rax, %rdi
callq 0x2120
movl %eax, %ebx
movq 0x3f59(%rip), %rdi      # 0x7188
movl %eax, %esi
callq 0x2250
movq %rax, %r15
movq 0x3f48(%rip), %rdi      # 0x7188
movl %ebx, %esi
callq 0x2260
movl %eax, 0x3f53(%rip)      # 0x71a0
movq 0x3f34(%rip), %rdi      # 0x7188
movl %ebx, %esi
callq 0x2040
movl %eax, 0x3f43(%rip)      # 0x71a4
movq 0x3f20(%rip), %rdi      # 0x7188
movl %ebx, %esi
callq 0x2240
movq %rax, %r12
movq 0x3f0f(%rip), %rdi      # 0x7188
movl %ebx, %esi
callq 0x21e0
movq %rax, %r14
movq 0x3efe(%rip), %rdi      # 0x7188
movl 0x3f0f(%rip), %r8d      # 0x71a0
movl 0x3f0c(%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, 0x3ed8(%rip)      # 0x7190
movq 0x3ec9(%rip), %rdi      # 0x7188
movl %ebx, %esi
callq 0x2070
movq 0x3ebb(%rip), %rdi      # 0x7188
movq 0x3ebc(%rip), %rsi      # 0x7190
movl 0x3ec6(%rip), %edx      # 0x71a0
movl 0x3ec4(%rip), %ecx      # 0x71a4
movl %eax, -0x2c(%rbp)
movl %eax, %r8d
callq 0x2050
movq %rax, 0x3ea6(%rip)      # 0x7198
leaq -0x1e0(%rbp), %r15
movq %r12, 0x10(%r15)
movq 0x3e84(%rip), %rdi      # 0x7188
movq 0x3e85(%rip), %rsi      # 0x7190
movl $0x4, %edx
movq %r15, %rcx
callq 0x20f0
movq %rax, 0x3e89(%rip)      # 0x71a8
movq 0x3e62(%rip), %rdi      # 0x7188
movq 0x3e6b(%rip), %rsi      # 0x7198
movl $0x4, %edx
movq %r15, %rcx
callq 0x20f0
movq %rax, 0x3e77(%rip)      # 0x71b8
movq %r14, 0x10(%r15)
movq 0x3e3c(%rip), %rdi      # 0x7188
movq 0x3e3d(%rip), %rsi      # 0x7190
movl $0x4, %edx
movq %r15, %rcx
callq 0x20f0
movq %rax, 0x3e49(%rip)      # 0x71b0
movq 0x3e1a(%rip), %rdi      # 0x7188
movq 0x3e23(%rip), %rsi      # 0x7198
movl $0x4, %edx
movq %r15, %rcx
callq 0x20f0
movq %rax, 0x3e37(%rip)      # 0x71c0
movq 0x3df8(%rip), %rdi      # 0x7188
movq 0x3df9(%rip), %rsi      # 0x7190
movl $0x2804d, %edx          # imm = 0x2804D
callq 0x2130
movq 0x3de0(%rip), %rdi      # 0x7188
movq 0x3de1(%rip), %rsi      # 0x7190
callq 0x21b0
leaq -0x160(%rbp), %r14
leaq 0x1d06(%rip), %r12      # 0x50c8
leaq 0x1cfa(%rip), %r15      # 0x50c3
leaq 0x1c80(%rip), %rbx      # 0x5050
movq 0x3db1(%rip), %rdi      # 0x7188
movq %r14, %rsi
callq 0x2210
movl $0x4, %r13d
movl -0x160(%rbp), %eax
leal -0x2(%rax), %ecx
cmpl $0xa, %ecx
ja 0x3435
movslq (%rbx,%rcx,4), %rax
addq %rbx, %rax
jmpq *%rax
movq %r14, %rdi
xorl %esi, %esi
callq 0x21d0
cmpq $0xff0d, %rax           # imm = 0xFF0D
jne 0x3db9
movq 0x3d6f(%rip), %rdi      # 0x7188
movq 0x3d70(%rip), %rsi      # 0x7190
movl $0x20001, %edx          # imm = 0x20001
callq 0x2130
movl $0x8, %r13d
jmp 0x3db9
cmpl $0x11, %eax
je 0x367f
cmpl $0x16, %eax
jne 0x3db9
movl -0x128(%rbp), %eax
movl -0x124(%rbp), %ecx
movl %eax, 0x3d47(%rip)      # 0x71a0
movl %ecx, 0x3d45(%rip)      # 0x71a4
movq 0x3d22(%rip), %rdi      # 0x7188
movq 0x3d2b(%rip), %rsi      # 0x7198
callq 0x2290
movq 0x3d0f(%rip), %rdi      # 0x7188
movq 0x3d10(%rip), %rsi      # 0x7190
movl 0x3d1a(%rip), %edx      # 0x71a0
movl 0x3d18(%rip), %ecx      # 0x71a4
movl -0x2c(%rbp), %r8d
callq 0x2050
movq %rax, 0x3cfc(%rip)      # 0x7198
jmp 0x3db1
movl -0x10c(%rbp), %eax
decl %eax
cmpl $0x4, %eax
ja 0x3db1
leaq 0x1bc3(%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), %r13
movq %r13, %rdi
callq 0x281d
movq 0x3cec(%rip), %rax      # 0x71e0
movq 0x3cd5(%rip), %rcx      # 0x71d0
subq 0x3cc6(%rip), %rcx      # 0x71c8
sarq $0x5, %rcx
cmpq %rcx, %rax
jne 0x3c35
movzwl -0x120(%rbp), %eax
movzwl -0x11c(%rbp), %ecx
movw %ax, -0xa0(%rbp)
movw %cx, -0x9e(%rbp)
movq %r13, %rdi
callq 0x2917
movq 0x3cbe(%rip), %rcx      # 0x71f8
subq 0x3caf(%rip), %rcx      # 0x71f0
movq 0x3cc0(%rip), %rax      # 0x7208
sarq $0x3, %rcx
movabsq $0x4ec4ec4ec4ec4ec5, %rdx # imm = 0x4EC4EC4EC4EC4EC5
imulq %rdx, %rcx
cmpq %rcx, %rax
jae 0x3db1
movq $-0x1, 0x3ca2(%rip) # 0x7210
movq %rax, 0x3ca3(%rip)      # 0x7218
movzwl -0x120(%rbp), %eax
movzwl -0x11c(%rbp), %ecx
movw %ax, -0xa0(%rbp)
movw %cx, -0x9e(%rbp)
leaq 0x3c88(%rip), %rdi      # 0x7220
leaq -0xa0(%rbp), %rsi
jmp 0x3c62
cmpb $0x1, 0x3c3d(%rip)      # 0x71e8
jne 0x36f5
movb $0x0, 0x3c30(%rip)      # 0x71e8
jmp 0x3db1
cmpb $0x1, 0x3c24(%rip)      # 0x71e8
jne 0x37ee
movswl 0x3c19(%rip), %eax      # 0x71ea
addl -0x120(%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl 0x3bb7(%rip), %xmm1 # 0x71a0
divsd %xmm1, %xmm0
movswl 0x3bf8(%rip), %eax      # 0x71ec
addl -0x11c(%rbp), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
xorps %xmm2, %xmm2
cvtsi2sdl 0x3b98(%rip), %xmm2 # 0x71a4
divsd %xmm2, %xmm1
movq 0x3bc9(%rip), %rax      # 0x71e0
movq 0x3baa(%rip), %rcx      # 0x71c8
shlq $0x5, %rax
movsd %xmm0, 0x10(%rcx,%rax)
movsd %xmm1, 0x18(%rcx,%rax)
jmp 0x3db1
movq 0x3b4e(%rip), %rdi      # 0x7188
movq 0x3b57(%rip), %rsi      # 0x7198
movq 0x3b48(%rip), %rdx      # 0x7190
movq 0x3b59(%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 0x3db9
movq 0x3b02(%rip), %rdi      # 0x7188
movq 0x3b1b(%rip), %rsi      # 0x71a8
callq 0x2110
movq 0x3aef(%rip), %rdi      # 0x7188
movq 0x3b10(%rip), %rsi      # 0x71b0
callq 0x2110
movq 0x3adc(%rip), %rdi      # 0x7188
movq 0x3b05(%rip), %rsi      # 0x71b8
callq 0x2110
movq 0x3ac9(%rip), %rdi      # 0x7188
movq 0x3afa(%rip), %rsi      # 0x71c0
callq 0x2110
movq 0x3ab6(%rip), %rdi      # 0x7188
movq 0x3abf(%rip), %rsi      # 0x7198
callq 0x2290
movq 0x3aa3(%rip), %rdi      # 0x7188
callq 0x22b0
movl $0x1, %r13d
jmp 0x3db9
movq 0x3b24(%rip), %rax      # 0x7220
cmpq 0x3b25(%rip), %rax      # 0x7228
je 0x3db1
movzwl -0x120(%rbp), %eax
movzwl -0x11c(%rbp), %ecx
movw %ax, -0xa0(%rbp)
movw %cx, -0x9e(%rbp)
leaq -0xa0(%rbp), %r13
movq %r13, %rdi
callq 0x281d
movq 0x3aa5(%rip), %rdx      # 0x71e0
movq 0x3a8e(%rip), %rcx      # 0x71d0
movq 0x3a7f(%rip), %rax      # 0x71c8
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rcx, %rdx
jne 0x39ce
movzwl -0x120(%rbp), %eax
movzwl -0x11c(%rbp), %ecx
movw %ax, -0xa0(%rbp)
movw %cx, -0x9e(%rbp)
movq %r13, %rdi
callq 0x2917
movq 0x3a84(%rip), %rcx      # 0x7208
movq 0x3a6d(%rip), %rdx      # 0x71f8
movq 0x3a5e(%rip), %rax      # 0x71f0
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $0x4ec4ec4ec4ec4ec5, %rsi # imm = 0x4EC4EC4EC4EC4EC5
imulq %rsi, %rdx
cmpq %rdx, %rcx
setb %sil
movq 0x3a5b(%rip), %rdx      # 0x7210
cmpq $-0x1, %rdx
setne %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x3d83
imulq $0x68, %rcx, %rcx
leaq (%rax,%rcx), %rdi
movq 0x8(%rax,%rcx), %rsi
cmpq 0x10(%rax,%rcx), %rsi
jne 0x3d48
leaq 0x3a27(%rip), %rdx      # 0x7210
jmp 0x3d7e
movq 0x3a33(%rip), %rax      # 0x7228
cmpq %rax, 0x3a24(%rip)      # 0x7220
je 0x3db1
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 0x39f2(%rip), %rdi      # 0x7220
leaq -0xa0(%rbp), %rsi
callq 0x43f6
movq 0x39ff(%rip), %rax      # 0x7240
cmpq %rax, 0x39f0(%rip)      # 0x7238
je 0x3b5e
movsd -0x8(%rax), %xmm0
jmp 0x3b61
movq 0x3981(%rip), %rax      # 0x71e0
movq 0x396a(%rip), %rdx      # 0x71d0
movq 0x395b(%rip), %rcx      # 0x71c8
subq %rcx, %rdx
sarq $0x5, %rdx
cmpq %rdx, %rax
jae 0x3be5
shlq $0x5, %rax
movsd (%rcx,%rax), %xmm0
addsd 0x17b2(%rip), %xmm0     # 0x5040
movsd %xmm0, (%rcx,%rax)
jmp 0x3db1
movzwl -0x120(%rbp), %eax
movzwl -0x11c(%rbp), %ecx
movw %ax, -0xa0(%rbp)
movw %cx, -0x9e(%rbp)
leaq -0xa0(%rbp), %r13
movq %r13, %rdi
callq 0x281d
movq 0x3916(%rip), %rax      # 0x71e0
movq 0x38ff(%rip), %rsi      # 0x71d0
movq 0x38f0(%rip), %rcx      # 0x71c8
movq %rsi, %rdx
subq %rcx, %rdx
sarq $0x5, %rdx
cmpq %rdx, %rax
jne 0x3c6c
xorps %xmm0, %xmm0
cvtsi2sdl -0x120(%rbp), %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl 0x389f(%rip), %xmm1 # 0x71a0
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl -0x11c(%rbp), %xmm1
xorps %xmm2, %xmm2
cvtsi2sdl 0x3889(%rip), %xmm2 # 0x71a4
divsd %xmm2, %xmm1
movabsq $0x3f50624dd2f1a9fc, %rax # imm = 0x3F50624DD2F1A9FC
movq %rax, -0xa0(%rbp)
movsd %xmm0, -0x90(%rbp)
movsd %xmm1, -0x88(%rbp)
cmpq 0x3891(%rip), %rsi      # 0x71d8
je 0x3d55
movupd -0xa0(%rbp), %xmm0
movupd -0x90(%rbp), %xmm1
movupd %xmm1, 0x10(%rsi)
movupd %xmm0, (%rsi)
addq $0x20, %rsi
movq %rsi, 0x385f(%rip)      # 0x71d0
jmp 0x3d64
movq 0x3863(%rip), %rax      # 0x71e0
movq 0x384c(%rip), %rdx      # 0x71d0
movq 0x383d(%rip), %rcx      # 0x71c8
subq %rcx, %rdx
sarq $0x5, %rdx
cmpq %rdx, %rax
jae 0x3cbb
shlq $0x5, %rax
movsd (%rcx,%rax), %xmm0
addsd 0x168c(%rip), %xmm0     # 0x5038
movsd %xmm0, (%rcx,%rax)
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x3db1
addq %rax, %rcx
movq $0x0, (%rcx)
jmp 0x3db1
movq 0x383b(%rip), %rsi      # 0x7210
cmpq $-0x1, %rsi
je 0x3d27
cmpq %rdx, %rsi
je 0x3d83
movq 0x3849(%rip), %rdi      # 0x7238
movq 0x384a(%rip), %r8       # 0x7240
movsd -0x8(%r8), %xmm0
mulsd 0x161c(%rip), %xmm0     # 0x5020
subq %rdi, %r8
sarq $0x3, %r8
movq %rdi, %rcx
testq %r8, %r8
jle 0x3a3a
movq %rdi, %rcx
movq %r8, %r9
shrq %r9
ucomisd (%rcx,%r9,8), %xmm0
jbe 0x3a32
leaq (%rcx,%r9,8), %rcx
addq $0x8, %rcx
notq %r9
addq %r8, %r9
movq %r9, %r8
testq %r9, %r9
jg 0x3a19
subq %rdi, %rcx
movq %rdx, %rdi
shlq $0x5, %rdi
movsd 0x10(%rax,%rdi), %xmm5
movsd 0x18(%rax,%rdi), %xmm6
movq %rsi, %rdi
shlq $0x5, %rdi
subsd 0x10(%rax,%rdi), %xmm5
subsd 0x18(%rax,%rdi), %xmm6
movsd 0x15bd(%rip), %xmm2     # 0x5028
mulsd %xmm2, %xmm5
movq 0x37aa(%rip), %rax      # 0x7220
sarq %rcx
movswl (%rax,%rcx), %edi
cvtsi2sd %edi, %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0x3714(%rip), %xmm0 # 0x71a0
mulsd %xmm2, %xmm6
movswl 0x2(%rax,%rcx), %eax
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0x36f9(%rip), %xmm0 # 0x71a4
divsd %xmm0, %xmm2
movq 0x3742(%rip), %rax      # 0x71f8
subq 0x3733(%rip), %rax      # 0x71f0
sarq $0x3, %rax
movabsq $0x4ec4ec4ec4ec4ec5, %rcx # imm = 0x4EC4EC4EC4EC4EC5
imulq %rcx, %rax
movq %rax, 0x3732(%rip)      # 0x7208
movapd %xmm1, %xmm3
subsd %xmm5, %xmm3
movapd %xmm2, %xmm4
subsd %xmm6, %xmm4
addsd %xmm1, %xmm5
addsd %xmm2, %xmm6
movq %r13, %rdi
movsd 0x1537(%rip), %xmm0     # 0x5030
callq 0x4218
leaq 0x36eb(%rip), %rdi      # 0x71f0
movq %r13, %rsi
callq 0x47de
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x3b25
movq -0x78(%rbp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq -0xa0(%rbp), %rdi
testq %rdi, %rdi
je 0x3b40
movq -0x90(%rbp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq 0x3689(%rip), %rax      # 0x71d0
subq 0x367a(%rip), %rax      # 0x71c8
sarq $0x5, %rax
movq %rax, 0x3687(%rip)      # 0x71e0
jmp 0x3d83
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 0x3694(%rip), %rsi      # 0x7240
cmpq 0x3695(%rip), %rsi      # 0x7248
je 0x3bc6
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x367c(%rip)      # 0x7240
jmp 0x3bd9
leaq 0x366b(%rip), %rdi      # 0x7238
leaq -0xa0(%rbp), %rdx
callq 0x4b3e
leaq 0x1470(%rip), %rbx      # 0x5050
jmp 0x3db1
movq 0x361c(%rip), %rcx      # 0x7208
movq 0x3605(%rip), %rdx      # 0x71f8
movq 0x35f6(%rip), %rax      # 0x71f0
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $0x4ec4ec4ec4ec4ec5, %rsi # imm = 0x4EC4EC4EC4EC4EC5
imulq %rsi, %rdx
cmpq %rdx, %rcx
jae 0x3db1
imulq $0x68, %rcx, %rcx
movsd 0x30(%rax,%rcx), %xmm0
addsd 0x1416(%rip), %xmm0     # 0x5040
movsd %xmm0, 0x30(%rax,%rcx)
jmp 0x3db1
movq %rax, 0x35d4(%rip)      # 0x7210
movzwl -0x120(%rbp), %eax
movzwl -0x11c(%rbp), %ecx
movw %ax, -0xa0(%rbp)
movw %cx, -0x9e(%rbp)
leaq 0x35c1(%rip), %rdi      # 0x7220
movq %r13, %rsi
callq 0x43f6
jmp 0x3db1
shlq $0x5, %rax
xorps %xmm0, %xmm0
cvtsi2sdl 0x3525(%rip), %xmm0 # 0x71a0
mulsd 0x10(%rcx,%rax), %xmm0
cvttsd2si %xmm0, %edx
xorps %xmm0, %xmm0
cvtsi2sdl 0x3514(%rip), %xmm0 # 0x71a4
mulsd 0x18(%rcx,%rax), %xmm0
cvttsd2si %xmm0, %eax
subw -0x120(%rbp), %dx
movw %dx, 0x3542(%rip)       # 0x71ea
subw -0x11c(%rbp), %ax
movw %ax, 0x3536(%rip)       # 0x71ec
jmp 0x3d6e
movq 0x3546(%rip), %rcx      # 0x7208
movq 0x352f(%rip), %rdx      # 0x71f8
movq 0x3520(%rip), %rax      # 0x71f0
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $0x4ec4ec4ec4ec4ec5, %rsi # imm = 0x4EC4EC4EC4EC4EC5
imulq %rsi, %rdx
cmpq %rdx, %rcx
jae 0x3db1
imulq $0x68, %rcx, %rcx
movsd 0x30(%rax,%rcx), %xmm0
addsd 0x1338(%rip), %xmm0     # 0x5038
movsd %xmm0, 0x30(%rax,%rcx)
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x3db1
addq %rcx, %rax
addq $0x30, %rax
movq $0x0, (%rax)
jmp 0x3db1
movq 0x34c2(%rip), %rax      # 0x71f0
imulq $0x68, 0x34e2(%rip), %rcx # 0x7218
leaq (%rax,%rcx), %rdi
addq $0x18, %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x3d77
movq %rdx, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x3d83
leaq 0x346c(%rip), %rdi      # 0x71c8
movq %r13, %rdx
callq 0x4550
movl $0x0, 0x347c(%rip)      # 0x71ea
movb $0x1, 0x3473(%rip)      # 0x71e8
jmp 0x3db1
leaq 0x3462(%rip), %rdx      # 0x71e0
callq 0x46bc
movq 0x3496(%rip), %rax      # 0x7220
cmpq %rax, 0x3497(%rip)      # 0x7228
je 0x3d9a
movq %rax, 0x348e(%rip)      # 0x7228
movq 0x3497(%rip), %rax      # 0x7238
cmpq %rax, 0x3498(%rip)      # 0x7240
je 0x3db1
movq %rax, 0x348f(%rip)      # 0x7240
callq 0x2b72
xorl %r13d, %r13d
testl %r13d, %r13d
je 0x33d0
cmpl $0x4, %r13d
je 0x33d0
cmpl $0x8, %r13d
jne 0x40b8
movq 0x33eb(%rip), %rax      # 0x71c8
movq 0x33ec(%rip), %rcx      # 0x71d0
cmpq %rcx, %rax
je 0x3df8
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rax)
addq $0x20, %rax
jmp 0x3de4
movq 0x3389(%rip), %rdi      # 0x7188
callq 0x2180
testl %eax, %eax
je 0x3ea7
movq 0x3375(%rip), %rdi      # 0x7188
movq %r14, %rsi
callq 0x2210
movl -0x160(%rbp), %eax
cmpl $0x2, %eax
je 0x3ff6
xorl %ebx, %ebx
cmpl $0x16, %eax
je 0x3fd9
cmpl $0x11, %eax
jne 0x40a0
movq 0x3343(%rip), %rdi      # 0x7188
movq 0x335c(%rip), %rsi      # 0x71a8
callq 0x2110
movq 0x3330(%rip), %rdi      # 0x7188
movq 0x3351(%rip), %rsi      # 0x71b0
callq 0x2110
movq 0x331d(%rip), %rdi      # 0x7188
movq 0x3346(%rip), %rsi      # 0x71b8
callq 0x2110
movq 0x330a(%rip), %rdi      # 0x7188
movq 0x333b(%rip), %rsi      # 0x71c0
callq 0x2110
movq 0x32f7(%rip), %rdi      # 0x7188
movq 0x3300(%rip), %rsi      # 0x7198
callq 0x2290
movl $0x1, %ebx
jmp 0x40a0
movq 0x3342(%rip), %rax      # 0x71f0
movq 0x3343(%rip), %rcx      # 0x71f8
cmpq %rcx, %rax
je 0x3f5c
movq 0x3303(%rip), %rdx      # 0x71c8
movsd 0x30(%rax), %xmm0
movsd 0x329e(%rip), %xmm1     # 0x7170
divsd %xmm1, %xmm0
movq (%rax), %rsi
movq 0x8(%rax), %rdi
movq %rsi, %r8
cmpq %rdi, %rsi
je 0x3f20
movq (%r8), %r9
shlq $0x5, %r9
movsd (%rdx,%r9), %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm2, %xmm0
addq $0x8, %r8
cmpq %rdi, %r8
jne 0x3ee5
jmp 0x3f20
movq (%rsi), %r8
shlq $0x5, %r8
movsd (%rdx,%r8), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, (%rdx,%r8)
addq $0x8, %rsi
cmpq %rdi, %rsi
jne 0x3f05
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdi
cmpq %rdi, %rsi
je 0x3f4f
movq (%rsi), %r8
shlq $0x5, %r8
movsd (%rdx,%r8), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rdx,%r8)
addq $0x8, %rsi
jmp 0x3f2d
addq $0x68, %rax
cmpq %rcx, %rax
jne 0x3ec5
movq 0x326d(%rip), %rax      # 0x71d0
movq 0x325e(%rip), %rcx      # 0x71c8
subq %rcx, %rax
je 0x3fb9
sarq $0x5, %rax
xorl %r13d, %r13d
xorl %ebx, %ebx
movsd (%rcx,%r13), %xmm0
decq %rax
xorl %ecx, %ecx
cmpq %rax, %rbx
sete %cl
movsbl (%rcx,%r12), %esi
movq %r15, %rdi
movb $0x1, %al
callq 0x2030
incq %rbx
movq 0x322e(%rip), %rax      # 0x71d0
movq 0x321f(%rip), %rcx      # 0x71c8
subq %rcx, %rax
sarq $0x5, %rax
addq $0x20, %r13
cmpq %rax, %rbx
jb 0x3f78
callq 0x2b72
movq 0x31c3(%rip), %rdi      # 0x7188
callq 0x2220
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x2200
jmp 0x3df8
movl -0x128(%rbp), %eax
movl -0x124(%rbp), %ecx
movl %eax, 0x31b5(%rip)      # 0x71a0
movl %ecx, 0x31b3(%rip)      # 0x71a4
jmp 0x40a0
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x21d0
cmpq $0xff0d, %rax           # imm = 0xFF0D
jne 0x40a0
movq 0x31b3(%rip), %rax      # 0x71c8
movq 0x31b4(%rip), %rcx      # 0x71d0
cmpq %rcx, %rax
je 0x4030
movsd 0x8(%rax), %xmm0
movsd %xmm0, (%rax)
addq $0x20, %rax
jmp 0x401c
movq 0x3151(%rip), %rdi      # 0x7188
movq 0x3152(%rip), %rsi      # 0x7190
movl $0x2804d, %edx          # imm = 0x2804D
callq 0x2130
movq 0x3139(%rip), %rdi      # 0x7188
movq 0x3142(%rip), %rsi      # 0x7198
movq 0x3133(%rip), %rdx      # 0x7190
movq 0x3144(%rip), %rcx      # 0x71a8
movl 0x3136(%rip), %eax      # 0x71a0
movl 0x3133(%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 0x2b72
movq 0x30f2(%rip), %rdi      # 0x7188
callq 0x2220
movl $0x2, %ebx
testl %ebx, %ebx
je 0x3df8
cmpl $0x2, %ebx
leaq 0xf9e(%rip), %rbx       # 0x5050
je 0x33d0
xorl %eax, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x22d0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x40ba
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x4322
movq %rbx, %rdi
callq 0x2280
nop