// File: /workspace/github_c_makefile_star2_O0/arkanis[P]process-map/map.c
// Function: main
int main(int argc, char** argv) {
	if (argc != 2) {
		fprintf(stderr, "usage: %s pid\n", argv[0]);
		return 0;
	}
	
	FILE* cmdLineFile = fopen(TextFormat("/proc/%s/cmdline", argv[1]), "rb");
	if (cmdLineFile == NULL) {
		fprintf(stderr, "Couldn't find process %s\n", argv[1]);
		return 0;
	}
	char* cmdLine = NULL;
	fscanf(cmdLineFile, "%m[^\n]", &cmdLine);
	fclose(cmdLineFile);
	
	int screenWidth = 800, screenHeight = 600;
	SetConfigFlags(FLAG_VSYNC_HINT | FLAG_WINDOW_RESIZABLE);
	InitWindow(screenWidth, screenHeight, TextFormat("Memory map of process %s: %s", argv[1], cmdLine));
	
	Font uiFont      = LoadFontEx("NotoSans-Regular.ttf", 16, NULL, 0);
	Font mapLabelSdfFont = LoadSdfFont("NotoSans-Regular.ttf");
	Shader sdfFontShader = LoadShader(NULL, "sdf-text.fs");
	
	GuiSetFont(uiFont);
	
	AddrRange* ranges = NULL;
	size_t rangeCount = 0;
	LoadAddrRanges(argv[1], &ranges, &rangeCount);
	size_t hilbertCurveOrder = 0;
	Texture2D mapTexture = PlotAddrRanges(ranges, rangeCount, mapLabelSdfFont, &hilbertCurveOrder);
	PlotRangeElfSymbols(ranges, rangeCount, hilbertCurveOrder, mapLabelSdfFont);
	
	Shader mapShader = LoadShader(NULL, "range-map2.fs");
	int selectedColorLoc = GetShaderLocation(mapShader, "selectedColor");
	Shader symbolMapShader = LoadShader(NULL, "symbol-map.fs");
	
	TaskTraces traces = LoadTaskTraces(argv[1]);
	
	Camera2D camera = (Camera2D){
		.target = (Vector2){ mapTexture.width / 2, mapTexture.height / 2 },
		.offset = (Vector2){ screenWidth / 2, screenHeight / 2 },
		.zoom = 1.0
	};
	
	bool wasWindowFocused = true, isPanning = false;
	Vector2 prevMousePos = { 0 };
	while ( !WindowShouldClose() ) {
		if ( IsWindowResized() ) {
			screenWidth = GetScreenWidth();
			screenHeight = GetScreenHeight();
		}
		
		// Reduce FPS when window isn't focused
		if ( IsWindowFocused() && !wasWindowFocused ) {
			wasWindowFocused = true;
			SetTargetFPS(0);
		} else if ( !IsWindowFocused() && wasWindowFocused ) {
			wasWindowFocused = false;
			SetTargetFPS(30);
		}
		
		// Mouse panning
		if ( IsMouseButtonPressed(MOUSE_LEFT_BUTTON) ) {
			isPanning = true;
			prevMousePos = GetMousePosition();
		} else if ( isPanning && IsMouseButtonReleased(MOUSE_LEFT_BUTTON) ) {
			isPanning = false;
		} else if ( isPanning ) {
			float dx = prevMousePos.x - GetMouseX(), dy = prevMousePos.y - GetMouseY();
			camera.target.x += dx / camera.zoom;
			camera.target.y += dy / camera.zoom;
			prevMousePos = GetMousePosition();
		}
		
		// Mousewheel zooming (world space position remains the same directly at the mouse pointer)
		const float factor = powf(0.9, -GetMouseWheelMove());  // 0.9^1 = 0.9, 0.9^-1 = 1/0.9
		Vector2 mousePosWs = GetScreenToWorld2D(GetMousePosition(), camera);
		float oldScale = camera.zoom, newScale = camera.zoom * factor;
		camera.target.x = mousePosWs.x + (camera.target.x - mousePosWs.x) * (oldScale / newScale);
		camera.target.y = mousePosWs.y + (camera.target.y - mousePosWs.y) * (oldScale / newScale);
		camera.zoom = newScale;
		
		// Handle keyboard input
		if (IsKeyPressed(KEY_R)) {
			mapShader = LoadShader(NULL, "range-map2.fs");
			symbolMapShader = LoadShader(NULL, "symbol-map.fs");
		}
		
		// Picking
		AddrRange* selectedRange = NULL;
		Color      selectedRangeColor = BLACK;
		if ( CheckCollisionPointRec(mousePosWs, (Rectangle){ .x = 0, .y = 0, .width = mapTexture.width, .height = mapTexture.height }) ) {
			uint64_t page = HilberCurvePosToDist(hilbertCurveOrder, mousePosWs.x, mousePosWs.y);
			for (size_t i = 0; i < rangeCount; i++) {
				if (page >= ranges[i].startPage && page < ranges[i].endPage) {
					selectedRange = &ranges[i];
					selectedRangeColor = selectedRange->color;
					break;
				}
			}
		}
		
		UpdateTaskTraces(&traces, ranges, rangeCount, hilbertCurveOrder);
		
		
		// Prepare view culling
		Vector2 viewTopLeft = GetScreenToWorld2D((Vector2){ 0, 0 }, camera);
		Vector2 viewBottomRight = GetScreenToWorld2D((Vector2){ screenWidth, screenHeight }, camera);
		Rectangle viewBoundingBox = (Rectangle){ .x = viewTopLeft.x, .y = viewTopLeft.y, .width = viewBottomRight.x - viewTopLeft.x, .height = viewBottomRight.y - viewTopLeft.y };
		
		BeginDrawing();
			ClearBackground(WHITE);
			
			BeginMode2D(camera);
				// Draw map legend
				int lx = -220, ly = 0;
				DrawRectangle(lx, ly, 16, 16, (Color){ 184, 224, 198, 255 });
				BeginShaderMode(sdfFontShader);
					DrawTextEx(mapLabelSdfFont, "File backed memory map",          (Vector2){ -200, ly }, 14, 0, BLACK); ly += 14;
					DrawTextEx(mapLabelSdfFont, "(different color for each name)", (Vector2){ -200, ly }, 14, 0, BLACK); ly += 14 + 6;
				EndShaderMode();
				DrawRectangle(lx, ly, 16, 16, (Color){ 229, 229, 229, 255 });
				BeginShaderMode(sdfFontShader);
					DrawTextEx(mapLabelSdfFont, "Anonymous memory map",            (Vector2){ -200, ly }, 14, 0, BLACK); ly += 14 + 6;
				EndShaderMode();
				DrawRectangle(lx, ly, 16, 16, (Color){ 250, 250, 250, 255 });
				BeginShaderMode(sdfFontShader);
					DrawTextEx(mapLabelSdfFont, "Unused address space",            (Vector2){ -200, ly }, 14, 0, BLACK); ly += 14 + 6;
					DrawTextEx(mapLabelSdfFont, "(not displayed to scale)",        (Vector2){ -200, ly }, 14, 0, BLACK); ly += (14 + 6) * 2;
				EndShaderMode();
				DrawRectangle(lx, ly, 16, 16, (Color){ 229, 229, 229, 255 });
				BeginShaderMode(sdfFontShader);
					DrawTextEx(mapLabelSdfFont, "1 MiByte to scale",               (Vector2){ -200, ly }, 14, 0, BLACK); ly += 14 + 6;
				EndShaderMode();
				DrawRectangle(lx - (64-16), ly, 64, 64, (Color){ 229, 229, 229, 255 });
				BeginShaderMode(sdfFontShader);
					DrawTextEx(mapLabelSdfFont, "16 MiByte to scale",              (Vector2){ -200, ly }, 14, 0, BLACK); ly += 14 + 6;
				EndShaderMode();
				
				// Draw map and highlight selected range
				BeginShaderMode(mapShader);
					Vector4 selectedColor = ColorNormalize(selectedRangeColor);
					SetShaderValue(mapShader, selectedColorLoc, &selectedColor, UNIFORM_VEC4);
					DrawTexture(mapTexture, 0, 0, BLANK);
				EndShaderMode();
				
				if (selectedRange && selectedRange->label.boundingBox.width < viewBoundingBox.width * mmapLabelMaxWindowFraction) {
					BeginShaderMode(sdfFontShader);
						DrawTextEx(mapLabelSdfFont, selectedRange->label.text, (Vector2){ selectedRange->label.boundingBox.x, selectedRange->label.boundingBox.y }, selectedRange->label.fontSize, 0, BLACK);
					EndShaderMode();
				}
				
				// Draw range lables, their symbol maps and the symbol lables if necessary
				for (size_t i = 0; i < rangeCount; i++) {
					AddrRange* range = &ranges[i];
					if ( CheckCollisionRecs(range->boundingBox, viewBoundingBox) ) {
						if (range->boundingBox.width < viewBoundingBox.width * mmapLabelMaxWindowFraction) {
							BeginShaderMode(sdfFontShader);
								DrawTextEx(mapLabelSdfFont, range->label.text, (Vector2){ range->label.boundingBox.x, range->label.boundingBox.y }, range->label.fontSize, 0, (Color){ 0, 0, 0, 128 });
							EndShaderMode();
						}
						
						if (range->boundingBox.width > viewBoundingBox.width * mmapDetailsMinWindowFraction) {
							BeginShaderMode(symbolMapShader);
								DrawTexturePro(range->symbolMap, (Rectangle){ 0, 0, range->symbolMap.width, range->symbolMap.height }, range->boundingBox, (Vector2){ 0, 0 }, 0, (Color){0, 0, 0, 32});
							EndShaderMode();
							
							BeginShaderMode(sdfFontShader);
								for (size_t s = 0; s < range->symbolCount; s++) {
									Label* label = &range->symbolLabels[s];
									if ( CheckCollisionRecs(label->boundingBox, viewBoundingBox) && label->boundingBox.height * camera.zoom > 2 )
										DrawTextEx(mapLabelSdfFont, label->text, (Vector2){ label->boundingBox.x, label->boundingBox.y }, label->fontSize, 0, (Color){ 0, 0, 0, 128 });
								}
							EndShaderMode();
						}
					}
				}
				
				rlglDraw();
				glUseProgram(traces.particleShader.id);
					// Have to set the model view projection matrix manually because raylib has not matrix uniform type
					Matrix mvp = MatrixMultiply(GetMatrixModelview(), GetMatrixProjection());
					glUniformMatrix4fv(traces.particleShader.locs[LOC_MATRIX_MVP], 1, false, MatrixToFloat(mvp));
					glUniform1ui(traces.shaderCurrentTimeLocation, traces.currentTime);
					
					for (size_t t = 0; t < traces.taskCount; t++) {
						if (traces.focusedTaskIndex == -1 || (ssize_t)t == traces.focusedTaskIndex) {
							Color transparentColor = traces.tasks[t].color;
							transparentColor.a = 64;
							Vector4 color = ColorNormalize(transparentColor);
							SetShaderValue(traces.particleShader, traces.shaderColorLocation, &color, UNIFORM_VEC4);
							glBindVertexArray(traces.tasks[t].particleVAO);
								glDrawArrays(GL_POINTS, 0, particleCount);
							glBindVertexArray(0);
						}
					}
				glUseProgram(0);
			EndMode2D();
			
			DrawRectangle(0, 0, screenWidth, 20, RAYWHITE);
			if (selectedRange) {
				const char* sizeUnit = NULL;
				double size = HumanReadableByteSize(selectedRange->endAddr - selectedRange->startAddr, &sizeUnit);
				DrawTextEx(uiFont, TextFormat("Size: %.2lf %s", size, sizeUnit), (Vector2){ 5, 3 }, uiFont.baseSize, 0, BLACK);
				DrawTextEx(uiFont, TextFormat("Address 0x%016lx - 0x%016lx", selectedRange->startAddr, selectedRange->endAddr), (Vector2){ 120, 3 }, uiFont.baseSize, 0, BLACK);
				
				if ( ! selectedRange->isGap ) {
					DrawTextEx(uiFont, selectedRange->perms,    (Vector2){ 410, 3 }, uiFont.baseSize, 0, BLACK);
					DrawTextEx(uiFont, selectedRange->filePath, (Vector2){ 450, 3 }, uiFont.baseSize, 0, BLACK);
				}
			}
			
			GuiEnable();
			Rectangle tasksPanel = (Rectangle){ screenWidth - 200, 20, 200, screenHeight };
			GuiPanel(tasksPanel);
			float x = 5, y = 5;
			for (ssize_t t = 0; t < (ssize_t)traces.taskCount; t++) {
				if (traces.focusedTaskIndex == -1 || t == traces.focusedTaskIndex) {
					GuiEnable();
					DrawCircle(tasksPanel.x + x + 3, tasksPanel.y + y + 16/2, 3, traces.tasks[t].color);
				} else {
					GuiDisable();
					DrawCircle(tasksPanel.x + x + 3, tasksPanel.y + y + 16/2, 3, LIGHTGRAY);
				}
				const char* text = TextFormat("Task %d%s", traces.tasks[t].pid, traces.tasks[t].dead ? " (dead)" : "");
				if ( GuiLabelButton((Rectangle){ tasksPanel.x + x + 10, tasksPanel.y + y, 200 - 2*5, 16 }, text) ) {
					if (t == traces.focusedTaskIndex)
						traces.focusedTaskIndex = -1;
					else
						traces.focusedTaskIndex = t;
				}
				GuiLabel((Rectangle){ tasksPanel.x + x + 10, tasksPanel.y + y + 16, 200 - 2*5, 16 }, traces.tasks[t].name);
				
				y += 20 + 16;
			}
			
		EndDrawing();
	}
	
	UnloadTaskTraces(&traces);
	UnloadShader(mapShader);
	UnloadTexture(mapTexture);
	UnloadAddrRanges(&ranges, &rangeCount);
	UnloadShader(sdfFontShader);
	UnloadFont(mapLabelSdfFont);
	UnloadShader(symbolMapShader);
	UnloadFont(uiFont);
	CloseWindow();
	free(cmdLine);
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x560, %rsp            # imm = 0x560
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
je 0x12aba
movq 0xb555a(%rip), %rax     # 0xc7ff0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x796c9(%rip), %rsi     # 0x8c170
movb $0x0, %al
callq 0x6720
movl $0x0, -0x4(%rbp)
jmp 0x146c2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x796b6(%rip), %rdi     # 0x8c17f
movb $0x0, %al
callq 0x65400
movq %rax, %rdi
leaq 0x79693(%rip), %rsi     # 0x8c16d
callq 0x61e0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x12b16
movq 0xb54ff(%rip), %rax     # 0xc7ff0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x7968d(%rip), %rsi     # 0x8c190
movb $0x0, %al
callq 0x6720
movl $0x0, -0x4(%rbp)
jmp 0x146c2
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x79837(%rip), %rsi     # 0x8c360
leaq -0x20(%rbp), %rdx
movb $0x0, %al
callq 0x60e0
movq -0x18(%rbp), %rdi
callq 0x65f0
movl $0x320, -0x24(%rbp)     # imm = 0x320
movl $0x258, -0x28(%rbp)     # imm = 0x258
movl $0x44, %edi
callq 0x33780
movl -0x24(%rbp), %eax
movl %eax, -0x4a8(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x4a4(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rdx
leaq 0x79630(%rip), %rdi     # 0x8c1aa
movb $0x0, %al
callq 0x65400
movl -0x4a8(%rbp), %edi
movl -0x4a4(%rbp), %esi
movq %rax, %rdx
callq 0x2fa60
leaq -0x58(%rbp), %rdi
leaq 0x79627(%rip), %rsi     # 0x8c1c7
movl $0x10, %edx
xorl %eax, %eax
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x62b10
leaq -0x88(%rbp), %rdi
leaq 0x79608(%rip), %rsi     # 0x8c1c7
callq 0x146d0
xorl %eax, %eax
movl %eax, %edi
leaq 0x7960d(%rip), %rsi     # 0x8c1dc
callq 0x28890
movl %eax, -0x98(%rbp)
movq %rdx, -0x90(%rbp)
movups -0x58(%rbp), %xmm0
movups -0x48(%rbp), %xmm1
movups -0x38(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x69c0
movq $0x0, -0xa0(%rbp)
movq $0x0, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0xa0(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x14820
movq $0x0, -0xb0(%rbp)
movq -0xa0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movups -0x88(%rbp), %xmm0
movups -0x78(%rbp), %xmm1
movups -0x68(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0xc8(%rbp), %rdi
leaq -0xb0(%rbp), %rcx
callq 0x14af0
movq -0xa0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
movups -0x88(%rbp), %xmm0
movups -0x78(%rbp), %xmm1
movups -0x68(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x154c0
xorl %eax, %eax
movl %eax, %edi
leaq 0x7952c(%rip), %rsi     # 0x8c1e8
callq 0x28890
movl %eax, -0xd8(%rbp)
movq %rdx, -0xd0(%rbp)
movl -0xd8(%rbp), %edi
movq -0xd0(%rbp), %rsi
leaq 0x79514(%rip), %rdx     # 0x8c1f6
callq 0x290d0
movl %eax, -0xdc(%rbp)
xorl %eax, %eax
movl %eax, %edi
leaq 0x7950c(%rip), %rsi     # 0x8c204
callq 0x28890
movl %eax, -0xf0(%rbp)
movq %rdx, -0xe8(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x128(%rbp), %rdi
callq 0x16000
movl -0x24(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x140(%rbp)
movl -0x28(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x13c(%rbp)
movl -0xc4(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x138(%rbp)
movl -0xc0(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x134(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x130(%rbp)
movss 0x79271(%rip), %xmm0    # 0x8c004
movss %xmm0, -0x12c(%rbp)
movb $0x1, -0x141(%rbp)
movb $0x0, -0x142(%rbp)
leaq -0x14c(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x6060
callq 0x306b0
xorb $-0x1, %al
testb $0x1, %al
jne 0x12dcc
jmp 0x145f4
callq 0x30800
testb $0x1, %al
jne 0x12dd7
jmp 0x12de7
callq 0x31210
movl %eax, -0x24(%rbp)
callq 0x31220
movl %eax, -0x28(%rbp)
callq 0x307e0
testb $0x1, %al
jne 0x12df2
jmp 0x12e0b
testb $0x1, -0x141(%rbp)
jne 0x12e0b
movb $0x1, -0x141(%rbp)
xorl %edi, %edi
callq 0x335e0
jmp 0x12e30
callq 0x307e0
testb $0x1, %al
jne 0x12e2e
testb $0x1, -0x141(%rbp)
je 0x12e2e
movb $0x0, -0x141(%rbp)
movl $0x1e, %edi
callq 0x335e0
jmp 0x12e30
xorl %edi, %edi
callq 0x34bb0
testb $0x1, %al
jne 0x12e3d
jmp 0x12e64
movb $0x1, -0x142(%rbp)
callq 0x2dd60
movlpd %xmm0, -0x154(%rbp)
movq -0x154(%rbp), %rax
movq %rax, -0x14c(%rbp)
jmp 0x12f5c
testb $0x1, -0x142(%rbp)
je 0x12e86
xorl %edi, %edi
callq 0x34c30
testb $0x1, %al
jne 0x12e7a
jmp 0x12e86
movb $0x0, -0x142(%rbp)
jmp 0x12f5a
testb $0x1, -0x142(%rbp)
je 0x12f58
movss -0x14c(%rbp), %xmm0
movss %xmm0, -0x4b0(%rbp)
callq 0x34cd0
movss -0x4b0(%rbp), %xmm0
cvtsi2ss %eax, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x158(%rbp)
movss -0x148(%rbp), %xmm0
movss %xmm0, -0x4ac(%rbp)
callq 0x34d00
movss -0x4ac(%rbp), %xmm0
cvtsi2ss %eax, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x15c(%rbp)
movss -0x158(%rbp), %xmm1
movss -0x138(%rbp), %xmm0
movss -0x12c(%rbp), %xmm2
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x138(%rbp)
movss -0x15c(%rbp), %xmm1
movss -0x134(%rbp), %xmm0
movss -0x12c(%rbp), %xmm2
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x134(%rbp)
callq 0x2dd60
movlpd %xmm0, -0x164(%rbp)
movq -0x164(%rbp), %rax
movq %rax, -0x14c(%rbp)
jmp 0x12f5a
jmp 0x12f5c
callq 0x2ddc0
movaps %xmm0, %xmm1
movaps 0x79125(%rip), %xmm0    # 0x8c090
pxor %xmm0, %xmm1
movss 0x790e9(%rip), %xmm0    # 0x8c060
callq 0x6040
movss %xmm0, -0x168(%rbp)
callq 0x2dd60
movlpd %xmm0, -0x178(%rbp)
movsd -0x178(%rbp), %xmm0
movq -0x130(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movups -0x140(%rbp), %xmm1
movups %xmm1, (%rax)
callq 0x334b0
movlpd %xmm0, -0x170(%rbp)
movss -0x12c(%rbp), %xmm0
movss %xmm0, -0x17c(%rbp)
movss -0x12c(%rbp), %xmm0
mulss -0x168(%rbp), %xmm0
movss %xmm0, -0x180(%rbp)
movss -0x170(%rbp), %xmm1
movss -0x138(%rbp), %xmm0
subss -0x170(%rbp), %xmm0
movss -0x17c(%rbp), %xmm2
divss -0x180(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x138(%rbp)
movss -0x16c(%rbp), %xmm1
movss -0x134(%rbp), %xmm0
subss -0x16c(%rbp), %xmm0
movss -0x17c(%rbp), %xmm2
divss -0x180(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x134(%rbp)
movss -0x180(%rbp), %xmm0
movss %xmm0, -0x12c(%rbp)
movl $0x52, %edi
callq 0x34500
testb $0x1, %al
jne 0x13076
jmp 0x130e8
xorl %eax, %eax
movl %eax, %edi
leaq 0x79167(%rip), %rsi     # 0x8c1e8
callq 0x28890
movl %eax, -0x190(%rbp)
movq %rdx, -0x188(%rbp)
movq -0x190(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x188(%rbp), %rax
movq %rax, -0xd0(%rbp)
xorl %eax, %eax
movl %eax, %edi
leaq 0x7914a(%rip), %rsi     # 0x8c204
callq 0x28890
movl %eax, -0x1a0(%rbp)
movq %rdx, -0x198(%rbp)
movq -0x1a0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq $0x0, -0x1a8(%rbp)
movl $0xff000000, -0x1ac(%rbp) # imm = 0xFF000000
movl $0x0, -0x1bc(%rbp)
movl $0x0, -0x1b8(%rbp)
cvtsi2ssl -0xc4(%rbp), %xmm0
movss %xmm0, -0x1b4(%rbp)
cvtsi2ssl -0xc0(%rbp), %xmm0
movss %xmm0, -0x1b0(%rbp)
movsd -0x170(%rbp), %xmm0
movsd -0x1bc(%rbp), %xmm1
movsd -0x1b4(%rbp), %xmm2
callq 0x3e640
testb $0x1, %al
jne 0x13157
jmp 0x13226
movq -0xb0(%rbp), %rdi
cvttss2si -0x170(%rbp), %esi
cvttss2si -0x16c(%rbp), %edx
callq 0x16450
movq %rax, -0x1c8(%rbp)
movq $0x0, -0x1d0(%rbp)
movq -0x1d0(%rbp), %rax
cmpq -0xa8(%rbp), %rax
jae 0x13224
movq -0x1c8(%rbp), %rax
movq -0xa0(%rbp), %rcx
imulq $0xa0, -0x1d0(%rbp), %rdx
addq %rdx, %rcx
cmpq 0x30(%rcx), %rax
jb 0x1320b
movq -0x1c8(%rbp), %rax
movq -0xa0(%rbp), %rcx
imulq $0xa0, -0x1d0(%rbp), %rdx
addq %rdx, %rcx
cmpq 0x38(%rcx), %rax
jae 0x1320b
movq -0xa0(%rbp), %rax
imulq $0xa0, -0x1d0(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, -0x1ac(%rbp)
jmp 0x13224
jmp 0x1320d
movq -0x1d0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1d0(%rbp)
jmp 0x13185
jmp 0x13226
movq -0xa0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq -0xb0(%rbp), %rcx
leaq -0x128(%rbp), %rdi
callq 0x16550
movl $0x0, -0x1e0(%rbp)
movl $0x0, -0x1dc(%rbp)
movsd -0x1e0(%rbp), %xmm0
movq -0x130(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movups -0x140(%rbp), %xmm1
movups %xmm1, (%rax)
callq 0x334b0
movlpd %xmm0, -0x1d8(%rbp)
cvtsi2ssl -0x24(%rbp), %xmm0
movss %xmm0, -0x1f0(%rbp)
cvtsi2ssl -0x28(%rbp), %xmm0
movss %xmm0, -0x1ec(%rbp)
movsd -0x1f0(%rbp), %xmm0
movq -0x130(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movups -0x140(%rbp), %xmm1
movups %xmm1, (%rax)
callq 0x334b0
movlpd %xmm0, -0x1e8(%rbp)
movss -0x1d8(%rbp), %xmm0
movss %xmm0, -0x200(%rbp)
movss -0x1d4(%rbp), %xmm0
movss %xmm0, -0x1fc(%rbp)
movss -0x1e8(%rbp), %xmm0
movss -0x1d8(%rbp), %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x1f8(%rbp)
movss -0x1e4(%rbp), %xmm0
movss -0x1d4(%rbp), %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x1f4(%rbp)
callq 0x31800
movb $-0x1, -0x204(%rbp)
movb $-0x1, -0x203(%rbp)
movb $-0x1, -0x202(%rbp)
movb $-0x1, -0x201(%rbp)
movl -0x204(%rbp), %edi
callq 0x317c0
movq -0x130(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movups -0x140(%rbp), %xmm0
movups %xmm0, (%rax)
callq 0x31ff0
movl $0xffffff24, -0x208(%rbp) # imm = 0xFFFFFF24
movl $0x0, -0x20c(%rbp)
movl -0x208(%rbp), %edi
movl -0x20c(%rbp), %esi
movb $-0x48, -0x210(%rbp)
movb $-0x20, -0x20f(%rbp)
movb $-0x3a, -0x20e(%rbp)
movb $-0x1, -0x20d(%rbp)
movl -0x210(%rbp), %r8d
movl $0x10, %ecx
movl %ecx, -0x4bc(%rbp)
movl %ecx, %edx
callq 0x38a90
movl -0x98(%rbp), %edi
movq -0x90(%rbp), %rsi
callq 0x29060
movl $0xc3480000, -0x218(%rbp) # imm = 0xC3480000
cvtsi2ssl -0x20c(%rbp), %xmm0
movss %xmm0, -0x214(%rbp)
movb $0x0, -0x21c(%rbp)
movb $0x0, -0x21b(%rbp)
movb $0x0, -0x21a(%rbp)
movb $-0x1, -0x219(%rbp)
movsd -0x218(%rbp), %xmm0
movl -0x21c(%rbp), %esi
movups -0x88(%rbp), %xmm1
movups -0x78(%rbp), %xmm2
movups -0x68(%rbp), %xmm3
movq %rsp, %rax
movups %xmm3, 0x20(%rax)
movups %xmm2, 0x10(%rax)
movups %xmm1, (%rax)
leaq 0x78dd3(%rip), %rdi     # 0x8c212
movss 0x78c1d(%rip), %xmm1    # 0x8c064
movss %xmm1, -0x4b8(%rbp)
xorps %xmm2, %xmm2
movss %xmm2, -0x4b4(%rbp)
callq 0x654f0
movss -0x4b8(%rbp), %xmm1
movss -0x4b4(%rbp), %xmm2
movl -0x20c(%rbp), %eax
addl $0xe, %eax
movl %eax, -0x20c(%rbp)
movl $0xc3480000, -0x224(%rbp) # imm = 0xC3480000
cvtsi2ssl -0x20c(%rbp), %xmm0
movss %xmm0, -0x220(%rbp)
movb $0x0, -0x228(%rbp)
movb $0x0, -0x227(%rbp)
movb $0x0, -0x226(%rbp)
movb $-0x1, -0x225(%rbp)
movsd -0x224(%rbp), %xmm0
movl -0x228(%rbp), %esi
movups -0x88(%rbp), %xmm3
movups -0x78(%rbp), %xmm4
movups -0x68(%rbp), %xmm5
movq %rsp, %rax
movups %xmm5, 0x20(%rax)
movups %xmm4, 0x10(%rax)
movups %xmm3, (%rax)
leaq 0x78d43(%rip), %rdi     # 0x8c229
callq 0x654f0
movl -0x20c(%rbp), %eax
addl $0x14, %eax
movl %eax, -0x20c(%rbp)
callq 0x290b0
movl -0x4bc(%rbp), %ecx
movl -0x208(%rbp), %edi
movl -0x20c(%rbp), %esi
movb $-0x1b, -0x22c(%rbp)
movb $-0x1b, -0x22b(%rbp)
movb $-0x1b, -0x22a(%rbp)
movb $-0x1, -0x229(%rbp)
movl -0x22c(%rbp), %r8d
movl %ecx, %edx
callq 0x38a90
movl -0x98(%rbp), %edi
movq -0x90(%rbp), %rsi
callq 0x29060
movss -0x4b8(%rbp), %xmm1
movss -0x4b4(%rbp), %xmm2
movl $0xc3480000, -0x234(%rbp) # imm = 0xC3480000
cvtsi2ssl -0x20c(%rbp), %xmm0
movss %xmm0, -0x230(%rbp)
movb $0x0, -0x238(%rbp)
movb $0x0, -0x237(%rbp)
movb $0x0, -0x236(%rbp)
movb $-0x1, -0x235(%rbp)
movsd -0x234(%rbp), %xmm0
movl -0x238(%rbp), %esi
movups -0x88(%rbp), %xmm3
movups -0x78(%rbp), %xmm4
movups -0x68(%rbp), %xmm5
movq %rsp, %rax
movups %xmm5, 0x20(%rax)
movups %xmm4, 0x10(%rax)
movups %xmm3, (%rax)
leaq 0x78c84(%rip), %rdi     # 0x8c249
callq 0x654f0
movl -0x20c(%rbp), %eax
addl $0x14, %eax
movl %eax, -0x20c(%rbp)
callq 0x290b0
movl -0x4bc(%rbp), %ecx
movl -0x208(%rbp), %edi
movl -0x20c(%rbp), %esi
movb $-0x6, -0x23c(%rbp)
movb $-0x6, -0x23b(%rbp)
movb $-0x6, -0x23a(%rbp)
movb $-0x1, -0x239(%rbp)
movl -0x23c(%rbp), %r8d
movl %ecx, %edx
callq 0x38a90
movl -0x98(%rbp), %edi
movq -0x90(%rbp), %rsi
callq 0x29060
movss -0x4b8(%rbp), %xmm1
movss -0x4b4(%rbp), %xmm2
movl $0xc3480000, -0x244(%rbp) # imm = 0xC3480000
cvtsi2ssl -0x20c(%rbp), %xmm0
movss %xmm0, -0x240(%rbp)
movb $0x0, -0x248(%rbp)
movb $0x0, -0x247(%rbp)
movb $0x0, -0x246(%rbp)
movb $-0x1, -0x245(%rbp)
movsd -0x244(%rbp), %xmm0
movl -0x248(%rbp), %esi
movups -0x88(%rbp), %xmm3
movups -0x78(%rbp), %xmm4
movups -0x68(%rbp), %xmm5
movq %rsp, %rax
movups %xmm5, 0x20(%rax)
movups %xmm4, 0x10(%rax)
movups %xmm3, (%rax)
leaq 0x78bba(%rip), %rdi     # 0x8c25e
callq 0x654f0
movss -0x4b8(%rbp), %xmm1
movss -0x4b4(%rbp), %xmm2
movl -0x20c(%rbp), %eax
addl $0x14, %eax
movl %eax, -0x20c(%rbp)
movl $0xc3480000, -0x250(%rbp) # imm = 0xC3480000
cvtsi2ssl -0x20c(%rbp), %xmm0
movss %xmm0, -0x24c(%rbp)
movb $0x0, -0x254(%rbp)
movb $0x0, -0x253(%rbp)
movb $0x0, -0x252(%rbp)
movb $-0x1, -0x251(%rbp)
movsd -0x250(%rbp), %xmm0
movl -0x254(%rbp), %esi
movups -0x88(%rbp), %xmm3
movups -0x78(%rbp), %xmm4
movups -0x68(%rbp), %xmm5
movq %rsp, %rax
movups %xmm5, 0x20(%rax)
movups %xmm4, 0x10(%rax)
movups %xmm3, (%rax)
leaq 0x78b43(%rip), %rdi     # 0x8c273
callq 0x654f0
movl -0x20c(%rbp), %eax
addl $0x28, %eax
movl %eax, -0x20c(%rbp)
callq 0x290b0
movl -0x4bc(%rbp), %ecx
movl -0x208(%rbp), %edi
movl -0x20c(%rbp), %esi
movb $-0x1b, -0x258(%rbp)
movb $-0x1b, -0x257(%rbp)
movb $-0x1b, -0x256(%rbp)
movb $-0x1, -0x255(%rbp)
movl -0x258(%rbp), %r8d
movl %ecx, %edx
callq 0x38a90
movl -0x98(%rbp), %edi
movq -0x90(%rbp), %rsi
callq 0x29060
movss -0x4b8(%rbp), %xmm1
movss -0x4b4(%rbp), %xmm2
movl $0xc3480000, -0x260(%rbp) # imm = 0xC3480000
cvtsi2ssl -0x20c(%rbp), %xmm0
movss %xmm0, -0x25c(%rbp)
movb $0x0, -0x264(%rbp)
movb $0x0, -0x263(%rbp)
movb $0x0, -0x262(%rbp)
movb $-0x1, -0x261(%rbp)
movsd -0x260(%rbp), %xmm0
movl -0x264(%rbp), %esi
movups -0x88(%rbp), %xmm3
movups -0x78(%rbp), %xmm4
movups -0x68(%rbp), %xmm5
movq %rsp, %rax
movups %xmm5, 0x20(%rax)
movups %xmm4, 0x10(%rax)
movups %xmm3, (%rax)
leaq 0x78a7d(%rip), %rdi     # 0x8c28c
callq 0x654f0
movl -0x20c(%rbp), %eax
addl $0x14, %eax
movl %eax, -0x20c(%rbp)
callq 0x290b0
movl -0x208(%rbp), %edi
addl $-0x30, %edi
movl -0x20c(%rbp), %esi
movb $-0x1b, -0x268(%rbp)
movb $-0x1b, -0x267(%rbp)
movb $-0x1b, -0x266(%rbp)
movb $-0x1, -0x265(%rbp)
movl -0x268(%rbp), %r8d
movl $0x40, %ecx
movl %ecx, %edx
callq 0x38a90
movl -0x98(%rbp), %edi
movq -0x90(%rbp), %rsi
callq 0x29060
movss -0x4b8(%rbp), %xmm1
movss -0x4b4(%rbp), %xmm2
movl $0xc3480000, -0x270(%rbp) # imm = 0xC3480000
cvtsi2ssl -0x20c(%rbp), %xmm0
movss %xmm0, -0x26c(%rbp)
movb $0x0, -0x274(%rbp)
movb $0x0, -0x273(%rbp)
movb $0x0, -0x272(%rbp)
movb $-0x1, -0x271(%rbp)
movsd -0x270(%rbp), %xmm0
movl -0x274(%rbp), %esi
movups -0x88(%rbp), %xmm3
movups -0x78(%rbp), %xmm4
movups -0x68(%rbp), %xmm5
movq %rsp, %rax
movups %xmm5, 0x20(%rax)
movups %xmm4, 0x10(%rax)
movups %xmm3, (%rax)
leaq 0x789ae(%rip), %rdi     # 0x8c29e
callq 0x654f0
movl -0x20c(%rbp), %eax
addl $0x14, %eax
movl %eax, -0x20c(%rbp)
callq 0x290b0
movl -0xd8(%rbp), %edi
movq -0xd0(%rbp), %rsi
callq 0x29060
movl -0x1ac(%rbp), %edi
callq 0x52040
movlpd %xmm0, -0x284(%rbp)
movlpd %xmm1, -0x27c(%rbp)
movl -0xdc(%rbp), %edx
movl -0xd8(%rbp), %edi
movq -0xd0(%rbp), %rsi
leaq -0x284(%rbp), %rcx
movl $0x3, %r8d
callq 0x291d0
movb $0x0, -0x288(%rbp)
movb $0x0, -0x287(%rbp)
movb $0x0, -0x286(%rbp)
movb $0x0, -0x285(%rbp)
movl -0x288(%rbp), %edx
leaq -0xc8(%rbp), %rax
xorl %esi, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl 0x10(%rax), %eax
movl %eax, 0x10(%rsp)
movl %esi, %edi
callq 0x504d0
callq 0x290b0
cmpq $0x0, -0x1a8(%rbp)
je 0x13a7a
movq -0x1a8(%rbp), %rax
movss 0x6c(%rax), %xmm1
movss 0x7869d(%rip), %xmm0    # 0x8c068
mulss -0x1f8(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x13a7a
movl -0x98(%rbp), %edi
movq -0x90(%rbp), %rsi
callq 0x29060
movq -0x1a8(%rbp), %rax
movq 0x58(%rax), %rdi
movss 0x64(%rax), %xmm0
movss %xmm0, -0x290(%rbp)
movq -0x1a8(%rbp), %rax
movss 0x68(%rax), %xmm0
movss %xmm0, -0x28c(%rbp)
movq -0x1a8(%rbp), %rax
movss 0x60(%rax), %xmm1
movb $0x0, -0x294(%rbp)
movb $0x0, -0x293(%rbp)
movb $0x0, -0x292(%rbp)
movb $-0x1, -0x291(%rbp)
movsd -0x290(%rbp), %xmm0
movl -0x294(%rbp), %esi
movups -0x88(%rbp), %xmm2
movups -0x78(%rbp), %xmm3
movups -0x68(%rbp), %xmm4
movq %rsp, %rax
movups %xmm4, 0x20(%rax)
movups %xmm3, 0x10(%rax)
movups %xmm2, (%rax)
xorps %xmm2, %xmm2
callq 0x654f0
callq 0x290b0
movq $0x0, -0x2a0(%rbp)
movq -0x2a0(%rbp), %rax
cmpq -0xa8(%rbp), %rax
jae 0x13e15
movq -0xa0(%rbp), %rax
movq -0x2a0(%rbp), %rcx
leaq (%rcx,%rcx,4), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x2a8(%rbp)
movq -0x2a8(%rbp), %rax
movsd 0x44(%rax), %xmm0
movsd 0x4c(%rax), %xmm1
movsd -0x200(%rbp), %xmm2
movsd -0x1f8(%rbp), %xmm3
callq 0x3e8d0
testb $0x1, %al
jne 0x13ae8
jmp 0x13dfc
movq -0x2a8(%rbp), %rax
movss 0x4c(%rax), %xmm1
movss 0x7856c(%rip), %xmm0    # 0x8c068
mulss -0x1f8(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x13bab
movl -0x98(%rbp), %edi
movq -0x90(%rbp), %rsi
callq 0x29060
movq -0x2a8(%rbp), %rax
movq 0x58(%rax), %rdi
movss 0x64(%rax), %xmm0
movss %xmm0, -0x2b0(%rbp)
movq -0x2a8(%rbp), %rax
movss 0x68(%rax), %xmm0
movss %xmm0, -0x2ac(%rbp)
movq -0x2a8(%rbp), %rax
movss 0x60(%rax), %xmm1
movb $0x0, -0x2b4(%rbp)
movb $0x0, -0x2b3(%rbp)
movb $0x0, -0x2b2(%rbp)
movb $-0x80, -0x2b1(%rbp)
movsd -0x2b0(%rbp), %xmm0
movl -0x2b4(%rbp), %esi
movups -0x88(%rbp), %xmm2
movups -0x78(%rbp), %xmm3
movups -0x68(%rbp), %xmm4
movq %rsp, %rax
movups %xmm4, 0x20(%rax)
movups %xmm3, 0x10(%rax)
movups %xmm2, (%rax)
xorps %xmm2, %xmm2
callq 0x654f0
callq 0x290b0
movq -0x2a8(%rbp), %rax
movss 0x4c(%rax), %xmm0
movss 0x784bd(%rip), %xmm1    # 0x8c07c
mulss -0x1f8(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x13dfa
movl -0xf0(%rbp), %edi
movq -0xe8(%rbp), %rsi
callq 0x29060
movq -0x2a8(%rbp), %rcx
addq $0x78, %rcx
movl $0x0, -0x2c4(%rbp)
movl $0x0, -0x2c0(%rbp)
movq -0x2a8(%rbp), %rax
cvtsi2ssl 0x7c(%rax), %xmm0
movss %xmm0, -0x2bc(%rbp)
movq -0x2a8(%rbp), %rax
cvtsi2ssl 0x80(%rax), %xmm0
movss %xmm0, -0x2b8(%rbp)
movq -0x2a8(%rbp), %rax
movl $0x0, -0x2cc(%rbp)
movl $0x0, -0x2c8(%rbp)
movb $0x0, -0x2d0(%rbp)
movb $0x0, -0x2cf(%rbp)
movb $0x0, -0x2ce(%rbp)
movb $0x20, -0x2cd(%rbp)
movsd -0x2c4(%rbp), %xmm0
movsd -0x2bc(%rbp), %xmm1
movsd 0x44(%rax), %xmm2
movsd 0x4c(%rax), %xmm3
movsd -0x2cc(%rbp), %xmm4
movl -0x2d0(%rbp), %edi
movl 0x10(%rcx), %edx
movq %rsp, %rax
movl %edx, 0x10(%rax)
movups (%rcx), %xmm5
movups %xmm5, (%rax)
xorps %xmm5, %xmm5
callq 0x50640
callq 0x290b0
movl -0x98(%rbp), %edi
movq -0x90(%rbp), %rsi
callq 0x29060
movq $0x0, -0x2d8(%rbp)
movq -0x2d8(%rbp), %rax
movq -0x2a8(%rbp), %rcx
cmpq 0x90(%rcx), %rax
jae 0x13df5
movq -0x2a8(%rbp), %rax
movq 0x98(%rax), %rax
movq -0x2d8(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x2e0(%rbp)
movq -0x2e0(%rbp), %rax
movsd 0xc(%rax), %xmm0
movsd 0x14(%rax), %xmm1
movsd -0x200(%rbp), %xmm2
movsd -0x1f8(%rbp), %xmm3
callq 0x3e8d0
testb $0x1, %al
jne 0x13d31
jmp 0x13ddc
movq -0x2e0(%rbp), %rax
movss 0x18(%rax), %xmm0
mulss -0x12c(%rbp), %xmm0
movss 0x782bb(%rip), %xmm1    # 0x8c008
ucomiss %xmm1, %xmm0
jbe 0x13ddc
movq -0x2e0(%rbp), %rax
movq (%rax), %rdi
movss 0xc(%rax), %xmm0
movss %xmm0, -0x2e8(%rbp)
movq -0x2e0(%rbp), %rax
movss 0x10(%rax), %xmm0
movss %xmm0, -0x2e4(%rbp)
movq -0x2e0(%rbp), %rax
movss 0x8(%rax), %xmm1
movb $0x0, -0x2ec(%rbp)
movb $0x0, -0x2eb(%rbp)
movb $0x0, -0x2ea(%rbp)
movb $-0x80, -0x2e9(%rbp)
movsd -0x2e8(%rbp), %xmm0
movl -0x2ec(%rbp), %esi
movups -0x88(%rbp), %xmm2
movups -0x78(%rbp), %xmm3
movups -0x68(%rbp), %xmm4
movq %rsp, %rax
movups %xmm4, 0x20(%rax)
movups %xmm3, 0x10(%rax)
movups %xmm2, (%rax)
xorps %xmm2, %xmm2
callq 0x654f0
jmp 0x13dde
movq -0x2d8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x2d8(%rbp)
jmp 0x13cc4
callq 0x290b0
jmp 0x13dfc
jmp 0x13dfe
movq -0x2a0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x2a0(%rbp)
jmp 0x13a85
callq 0x25700
leaq 0xb7c0f(%rip), %rax     # 0xcba30
movq (%rax), %rax
movl -0x110(%rbp), %edi
callq *%rax
leaq -0x370(%rbp), %rdi
callq 0x294b0
leaq -0x3b0(%rbp), %rdi
callq 0x29440
movups -0x3b0(%rbp), %xmm0
movups -0x3a0(%rbp), %xmm1
movups -0x390(%rbp), %xmm2
movups -0x380(%rbp), %xmm3
movq %rsp, %rax
movq %rax, -0x4d8(%rbp)
movups %xmm3, 0x70(%rax)
movups %xmm2, 0x60(%rax)
movups %xmm1, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups -0x370(%rbp), %xmm0
movups -0x360(%rbp), %xmm1
movups -0x350(%rbp), %xmm2
movups -0x340(%rbp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x330(%rbp), %rdi
callq 0x1a4d0
leaq 0xb7d28(%rip), %rax     # 0xcbbe0
movq (%rax), %rax
movq %rax, -0x4c8(%rbp)
movq -0x108(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x4cc(%rbp)
movups -0x330(%rbp), %xmm0
movups -0x320(%rbp), %xmm1
movups -0x310(%rbp), %xmm2
movups -0x300(%rbp), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x3f0(%rbp), %rdi
callq 0x1bb30
movl -0x4cc(%rbp), %edi
movq -0x4c8(%rbp), %rax
leaq -0x3f0(%rbp), %rcx
movl $0x1, %esi
xorl %edx, %edx
callq *%rax
leaq 0xbb808(%rip), %rax     # 0xcf738
movq (%rax), %rax
movl -0xfc(%rbp), %edi
movl -0xf8(%rbp), %esi
callq *%rax
movq $0x0, -0x3f8(%rbp)
movq -0x3f8(%rbp), %rax
cmpq -0x120(%rbp), %rax
jae 0x1403b
cmpq $-0x1, -0x118(%rbp)
je 0x13f7e
movq -0x3f8(%rbp), %rax
cmpq -0x118(%rbp), %rax
jne 0x14022
movq -0x128(%rbp), %rax
movq -0x3f8(%rbp), %rcx
shlq $0x5, %rcx
movl 0x10(%rax,%rcx), %eax
movl %eax, -0x3fc(%rbp)
movb $0x40, -0x3f9(%rbp)
movl -0x3fc(%rbp), %edi
callq 0x52040
movlpd %xmm0, -0x40c(%rbp)
movlpd %xmm1, -0x404(%rbp)
movl -0x100(%rbp), %edx
movl -0x110(%rbp), %edi
movq -0x108(%rbp), %rsi
leaq -0x40c(%rbp), %rcx
movl $0x3, %r8d
callq 0x291d0
leaq 0xb7b98(%rip), %rax     # 0xcbb80
movq (%rax), %rax
movq -0x128(%rbp), %rcx
movq -0x3f8(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movl 0x14(%rcx), %edi
callq *%rax
xorl %esi, %esi
movl $0x7d0, %edx            # imm = 0x7D0
leaq 0xb7bdd(%rip), %rax     # 0xcbbf0
movl %esi, %edi
callq *(%rax)
xorl %edi, %edi
leaq 0xb7b60(%rip), %rax     # 0xcbb80
callq *(%rax)
jmp 0x14024
movq -0x3f8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x3f8(%rbp)
jmp 0x13f4c
xorl %edi, %edi
leaq 0xb79ec(%rip), %rax     # 0xcba30
callq *(%rax)
callq 0x32320
movl -0x24(%rbp), %edx
movb $-0xb, -0x410(%rbp)
movb $-0xb, -0x40f(%rbp)
movb $-0xb, -0x40e(%rbp)
movb $-0x1, -0x40d(%rbp)
movl -0x410(%rbp), %r8d
xorl %esi, %esi
movl $0x14, %ecx
movl %esi, %edi
callq 0x38a90
cmpq $0x0, -0x1a8(%rbp)
je 0x142b9
movq $0x0, -0x418(%rbp)
movq -0x1a8(%rbp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdi
subq %rax, %rdi
leaq -0x418(%rbp), %rsi
callq 0x16880
movsd %xmm0, -0x420(%rbp)
movsd -0x420(%rbp), %xmm0
movq -0x418(%rbp), %rsi
leaq 0x781de(%rip), %rdi     # 0x8c2b1
movb $0x1, %al
callq 0x65400
movq %rax, %rdi
movl $0x40a00000, -0x428(%rbp) # imm = 0x40A00000
movl $0x40400000, -0x424(%rbp) # imm = 0x40400000
cvtsi2ssl -0x58(%rbp), %xmm1
movb $0x0, -0x42c(%rbp)
movb $0x0, -0x42b(%rbp)
movb $0x0, -0x42a(%rbp)
movb $-0x1, -0x429(%rbp)
movsd -0x428(%rbp), %xmm0
movl -0x42c(%rbp), %esi
movups -0x58(%rbp), %xmm2
movups -0x48(%rbp), %xmm3
movups -0x38(%rbp), %xmm4
movq %rsp, %rax
movups %xmm4, 0x20(%rax)
movups %xmm3, 0x10(%rax)
movups %xmm2, (%rax)
xorps %xmm2, %xmm2
callq 0x654f0
movq -0x1a8(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x78169(%rip), %rdi     # 0x8c2c0
xorl %eax, %eax
callq 0x65400
movq %rax, %rdi
movl $0x42f00000, -0x434(%rbp) # imm = 0x42F00000
movl $0x40400000, -0x430(%rbp) # imm = 0x40400000
cvtsi2ssl -0x58(%rbp), %xmm1
movb $0x0, -0x438(%rbp)
movb $0x0, -0x437(%rbp)
movb $0x0, -0x436(%rbp)
movb $-0x1, -0x435(%rbp)
movsd -0x434(%rbp), %xmm0
movl -0x438(%rbp), %esi
movups -0x58(%rbp), %xmm2
movups -0x48(%rbp), %xmm3
movups -0x38(%rbp), %xmm4
movq %rsp, %rax
movups %xmm4, 0x20(%rax)
movups %xmm3, 0x10(%rax)
movups %xmm2, (%rax)
xorps %xmm2, %xmm2
callq 0x654f0
movq -0x1a8(%rbp), %rax
testb $0x1, 0x10(%rax)
jne 0x142b7
movq -0x1a8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x43cd0000, -0x440(%rbp) # imm = 0x43CD0000
movl $0x40400000, -0x43c(%rbp) # imm = 0x40400000
cvtsi2ssl -0x58(%rbp), %xmm1
movb $0x0, -0x444(%rbp)
movb $0x0, -0x443(%rbp)
movb $0x0, -0x442(%rbp)
movb $-0x1, -0x441(%rbp)
movsd -0x440(%rbp), %xmm0
movl -0x444(%rbp), %esi
movups -0x58(%rbp), %xmm2
movups -0x48(%rbp), %xmm3
movups -0x38(%rbp), %xmm4
movq %rsp, %rax
movups %xmm4, 0x20(%rax)
movups %xmm3, 0x10(%rax)
movups %xmm2, (%rax)
xorps %xmm2, %xmm2
callq 0x654f0
movq -0x1a8(%rbp), %rax
movq 0x20(%rax), %rdi
movl $0x43e10000, -0x44c(%rbp) # imm = 0x43E10000
movl $0x40400000, -0x448(%rbp) # imm = 0x40400000
cvtsi2ssl -0x58(%rbp), %xmm1
movb $0x0, -0x450(%rbp)
movb $0x0, -0x44f(%rbp)
movb $0x0, -0x44e(%rbp)
movb $-0x1, -0x44d(%rbp)
movsd -0x44c(%rbp), %xmm0
movl -0x450(%rbp), %esi
movups -0x58(%rbp), %xmm2
movups -0x48(%rbp), %xmm3
movups -0x38(%rbp), %xmm4
movq %rsp, %rax
movups %xmm4, 0x20(%rax)
movups %xmm3, 0x10(%rax)
movups %xmm2, (%rax)
xorps %xmm2, %xmm2
callq 0x654f0
jmp 0x142b9
callq 0x6900
movl -0x24(%rbp), %eax
addl $0xffffff38, %eax       # imm = 0xFFFFFF38
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x460(%rbp)
movl $0x41a00000, -0x45c(%rbp) # imm = 0x41A00000
movl $0x43480000, -0x458(%rbp) # imm = 0x43480000
cvtsi2ssl -0x28(%rbp), %xmm0
movss %xmm0, -0x454(%rbp)
movsd -0x460(%rbp), %xmm0
movsd -0x458(%rbp), %xmm1
callq 0x7330
movss 0x77d1c(%rip), %xmm0    # 0x8c02c
movss %xmm0, -0x464(%rbp)
movss 0x77d0c(%rip), %xmm0    # 0x8c02c
movss %xmm0, -0x468(%rbp)
movq $0x0, -0x470(%rbp)
movq -0x470(%rbp), %rax
cmpq -0x120(%rbp), %rax
jge 0x145ea
cmpq $-0x1, -0x118(%rbp)
je 0x14361
movq -0x470(%rbp), %rax
cmpq -0x118(%rbp), %rax
jne 0x143cd
callq 0x6900
movss -0x460(%rbp), %xmm0
addss -0x464(%rbp), %xmm0
movss 0x77cee(%rip), %xmm1    # 0x8c06c
addss %xmm1, %xmm0
cvttss2si %xmm0, %edi
movss -0x45c(%rbp), %xmm0
addss -0x468(%rbp), %xmm0
movss 0x77cd2(%rip), %xmm1    # 0x8c070
addss %xmm1, %xmm0
cvttss2si %xmm0, %esi
movq -0x128(%rbp), %rax
movq -0x470(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x10(%rax), %edx
movss 0x77ca6(%rip), %xmm0    # 0x8c06c
callq 0x36680
jmp 0x14441
callq 0x6910
movss -0x460(%rbp), %xmm0
addss -0x464(%rbp), %xmm0
movss 0x77c82(%rip), %xmm1    # 0x8c06c
addss %xmm1, %xmm0
cvttss2si %xmm0, %edi
movss -0x45c(%rbp), %xmm0
addss -0x468(%rbp), %xmm0
movss 0x77c66(%rip), %xmm1    # 0x8c070
addss %xmm1, %xmm0
cvttss2si %xmm0, %esi
movb $-0x38, -0x474(%rbp)
movb $-0x38, -0x473(%rbp)
movb $-0x38, -0x472(%rbp)
movb $-0x1, -0x471(%rbp)
movl -0x474(%rbp), %edx
movss 0x77c30(%rip), %xmm0    # 0x8c06c
callq 0x36680
movq -0x128(%rbp), %rax
movq -0x470(%rbp), %rcx
shlq $0x5, %rcx
movl (%rax,%rcx), %esi
movb 0x1c(%rax,%rcx), %cl
leaq 0x77e85(%rip), %rax     # 0x8c2e6
leaq 0x7f8e9(%rip), %rdx     # 0x93d51
testb $0x1, %cl
cmovneq %rax, %rdx
leaq 0x77e66(%rip), %rdi     # 0x8c2dc
xorl %eax, %eax
callq 0x65400
movq %rax, -0x480(%rbp)
movss -0x460(%rbp), %xmm0
movss -0x464(%rbp), %xmm1
addss %xmm1, %xmm0
movss 0x77b7c(%rip), %xmm1    # 0x8c01c
addss %xmm1, %xmm0
movss %xmm0, -0x490(%rbp)
movss -0x45c(%rbp), %xmm0
movss -0x468(%rbp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x48c(%rbp)
movl $0x433e0000, -0x488(%rbp) # imm = 0x433E0000
movl $0x41800000, -0x484(%rbp) # imm = 0x41800000
movq -0x480(%rbp), %rdi
movsd -0x490(%rbp), %xmm0
movsd -0x488(%rbp), %xmm1
callq 0xa0f0
testb $0x1, %al
jne 0x144fe
jmp 0x1452b
movq -0x470(%rbp), %rax
cmpq -0x118(%rbp), %rax
jne 0x1451b
movq $-0x1, -0x118(%rbp)
jmp 0x14529
movq -0x470(%rbp), %rax
movq %rax, -0x118(%rbp)
jmp 0x1452b
movss -0x460(%rbp), %xmm0
movss -0x464(%rbp), %xmm1
addss %xmm1, %xmm0
movss 0x77ad5(%rip), %xmm1    # 0x8c01c
addss %xmm1, %xmm0
movss %xmm0, -0x4a0(%rbp)
movss -0x45c(%rbp), %xmm0
movss -0x468(%rbp), %xmm1
addss %xmm1, %xmm0
movss 0x77b09(%rip), %xmm1    # 0x8c078
addss %xmm1, %xmm0
movss %xmm0, -0x49c(%rbp)
movl $0x433e0000, -0x498(%rbp) # imm = 0x433E0000
movl $0x41800000, -0x494(%rbp) # imm = 0x41800000
movq -0x128(%rbp), %rax
movq -0x470(%rbp), %rcx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rdi
movsd -0x4a0(%rbp), %xmm0
movsd -0x498(%rbp), %xmm1
callq 0x7ba0
movss 0x77ab1(%rip), %xmm0    # 0x8c074
addss -0x468(%rbp), %xmm0
movss %xmm0, -0x468(%rbp)
movq -0x470(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x470(%rbp)
jmp 0x14333
callq 0x318b0
jmp 0x12dbc
leaq -0x128(%rbp), %rdi
callq 0x16980
movl -0xd8(%rbp), %edi
movq -0xd0(%rbp), %rsi
callq 0x29010
leaq -0xc8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl 0x10(%rax), %eax
movl %eax, 0x10(%rsp)
callq 0x4ff80
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x16a90
movl -0x98(%rbp), %edi
movq -0x90(%rbp), %rsi
callq 0x29010
movups -0x88(%rbp), %xmm0
movups -0x78(%rbp), %xmm1
movups -0x68(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x65270
movl -0xf0(%rbp), %edi
movq -0xe8(%rbp), %rsi
callq 0x29010
movups -0x58(%rbp), %xmm0
movups -0x48(%rbp), %xmm1
movups -0x38(%rbp), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x65270
callq 0x30620
movq -0x20(%rbp), %rdi
callq 0x62e0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x560, %rsp            # imm = 0x560
popq %rbp
retq
nop