LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/system/backends/xlib/eventxlib.cpp
// Function: smooth::System::EventXLib::EventXLib()
S::System::EventXLib::EventXLib()
{
	type = EVENT_XLIB;

	display	= Backends::BackendXLib::GetDisplay();

	/* Deny timer interrupts outside of any event loops
	 * to prevent interruption of sensitive code.
	 */
	if (!nested++) EventProcessor::denyTimerInterrupts.Call();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xad884
leaq 0xa3419(%rip), %rax     # 0x15fc98
movq %rax, (%rbx)
movw $0x2, 0x8(%rbx)
callq 0xb7110
movq %rax, 0x10(%rbx)
movl 0xb08bd(%rip), %eax     # 0x16d154
leal 0x1(%rax), %ecx
movl %ecx, 0xb08b4(%rip)     # 0x16d154
testl %eax, %eax
jne 0xbc8b0
movq 0xa53bd(%rip), %rdi     # 0x161c68
callq 0xbca78
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xad894
movq %r14, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/system/backends/xlib/eventxlib.cpp
// Function: smooth::System::EventXLib::ProcessNextEvent()
S::Bool S::System::EventXLib::ProcessNextEvent()
{
	if (display == NIL) return False;

	/* Process events on main thread only.
	 */
	if (Threads::Thread::GetCurrentThreadID() != Threads::MainThreadID)
	{
		S::System::System::Sleep(1);

		return True;
	}

	/* Emulate a timeout of ~100ms by trying to find a message
	 * 10 times while sleeping for 10ms between trying.
	 */
	for (Int i = 0; i < 10; i++)
	{
		/* XEventsQueued with QueuedAfterFlush sometimes hanged,
		 * so we flush manually and use QueuedAfterReading then.
		 */
		XFlush(display);

		if (XEventsQueued(display, QueuedAfterReading))
		{
			XEvent		 e;

			XNextEvent(display, &e);

			if (XFilterEvent(&e, None)) break;

			/* Process only the most recent MotionNotify and ConfigureNotify events.
			 */
			if (e.type == MotionNotify)    while (XCheckIfEvent(display, &e, FindMotionEvent,    (XPointer) e.xany.window)) { }
			if (e.type == ConfigureNotify) while (XCheckIfEvent(display, &e, FindConfigureEvent, (XPointer) e.xany.window)) { }

			/* Find window and dispatch event.
			 */
			GUI::WindowXLib	*window = GUI::WindowXLib::GetWindowBackend(e.xany.window);

			if (window != NIL) window->ProcessSystemMessages(&e);

			break;
		}

		/* Allow timeouts to be processed.
		 */
		EventProcessor::allowTimerInterrupts.Call();

		/* Now sleep for 10ms.
		 */
		System::System::Sleep(10);

		/* Prevent timeouts from being processed.
		 */
		EventProcessor::denyTimerInterrupts.Call();
	}

	return True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq 0x10(%rdi), %rax
movq %rax, (%rsp)
testq %rax, %rax
je 0xbc96a
movq %rdi, %rbx
callq 0x56330
testl %eax, %eax
je 0xbc984
pushq $0x1
popq %rdi
callq 0x58b10
cmpq $0x0, (%rsp)
setne %al
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0xa
popq %r13
pushq $0x1
popq %r14
movq 0xa51dd(%rip), %r15     # 0x161b70
movq 0xa52ce(%rip), %r12     # 0x161c68
movl %r13d, %ebp
subl $0x1, %ebp
jb 0xbc96a
movq 0x10(%rbx), %rdi
callq 0x56ed0
movq 0x10(%rbx), %rdi
movl %r14d, %esi
callq 0x56c90
testl %eax, %eax
jne 0xbc9d5
movq %r15, %rdi
callq 0xbca78
movl %r13d, %edi
callq 0x58b10
movq %r12, %rdi
callq 0xbca78
jmp 0xbc99d
movq 0x10(%rbx), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x59170
movq %r14, %rdi
xorl %esi, %esi
callq 0x56080
testl %eax, %eax
jne 0xbc96a
movl 0x8(%rsp), %eax
cmpl $0x6, %eax
jne 0xbca29
leaq -0xf3(%rip), %r14       # 0xbc915
leaq 0x8(%rsp), %r15
movq 0x10(%rbx), %rdi
movq 0x28(%rsp), %rcx
movq %r15, %rsi
movq %r14, %rdx
callq 0x57dc0
testl %eax, %eax
jne 0xbca0d
movl 0x8(%rsp), %eax
cmpl $0x16, %eax
jne 0xbca52
leaq -0x10f(%rip), %r14      # 0xbc926
leaq 0x8(%rsp), %r15
movq 0x10(%rbx), %rdi
movq 0x28(%rsp), %rcx
movq %r15, %rsi
movq %r14, %rdx
callq 0x57dc0
testl %eax, %eax
jne 0xbca3a
movq 0x28(%rsp), %rdi
callq 0xb8c8e
testq %rax, %rax
je 0xbc96a
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0xb8e6e
jmp 0xbc96a
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/system/backends/xlib/screenxlib.cpp
// Function: smooth::System::ScreenXLib::Initialize()
S::Int S::System::ScreenXLib::Initialize()
{
	libXrandr = dlopen("libXrandr.so", RTLD_NOW | RTLD_LOCAL);

	if (libXrandr != NIL)
	{
		XRRGetMonitors	= (xrrgetmonitors_t) dlsym(libXrandr, "XRRGetMonitors");
		XRRFreeMonitors	= (xrrfreemonitors_t) dlsym(libXrandr, "XRRFreeMonitors");
	}

	return Success();
}

// Assembly:
pushq %rax
leaq 0x46988(%rip), %rdi     # 0x1034c0
pushq $0x2
popq %rsi
callq 0x58f70
movq %rax, 0xb0631(%rip)     # 0x16d178
testq %rax, %rax
je 0xbcb7c
leaq 0x4697a(%rip), %rsi     # 0x1034cd
movq %rax, %rdi
callq 0x56810
movq %rax, 0xb0606(%rip)     # 0x16d168
movq 0xb060f(%rip), %rdi     # 0x16d178
leaq 0x4696c(%rip), %rsi     # 0x1034dc
callq 0x56810
movq %rax, 0xb05f4(%rip)     # 0x16d170
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/system/backends/xlib/screenxlib.cpp
// Function: smooth::MonitorRectFromPoint(X11::_XDisplay*, smooth::GUI::Point const&)
GUI::Rect MonitorRectFromPoint(Display *display, const GUI::Point &point)
	{
		if (XRRGetMonitors == NIL) return GUI::Rect();

		GUI::Rect	 metrics;

		int		 monitorCount = 0;
		XRRMonitorInfo	*monitors     = XRRGetMonitors(display, DefaultRootWindow(display), True, &monitorCount);

		for (Int i = 0; i < monitorCount; i++)
		{
			if (point.x >= monitors[i].x			 &&
			    point.x <  monitors[i].x + monitors[i].width &&
			    point.y >= monitors[i].y			 &&
			    point.y <  monitors[i].y + monitors[i].height) metrics = GUI::Rect(GUI::Point(monitors[i].x, monitors[i].y), GUI::Size(monitors[i].width, monitors[i].height));
		}

		XRRFreeMonitors(monitors);

		return metrics;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0xb05c1(%rip), %rax     # 0x16d168
xorl %ebx, %ebx
testq %rax, %rax
je 0xbcc57
movq %rsi, %r14
leaq 0x4(%rsp), %r15
andl $0x0, (%r15)
movq 0xe8(%rdi), %rcx
movslq 0xe0(%rdi), %rdx
shlq $0x7, %rdx
movq 0x10(%rcx,%rdx), %rsi
pushq $0x1
popq %rdx
movq %r15, %rcx
callq *%rax
movl (%r15), %esi
movl (%r14), %ecx
movl 0x4(%r14), %edx
testl %esi, %esi
cmovlel %ebx, %esi
imulq $0x38, %rsi, %rsi
xorl %edi, %edi
xorl %r14d, %r14d
xorl %ebp, %ebp
cmpq %rdi, %rsi
je 0xbcc43
movl 0x14(%rax,%rdi), %r8d
cmpl %r8d, %ecx
jl 0xbcc3d
movl 0x1c(%rax,%rdi), %r10d
addl %r8d, %r10d
cmpl %r10d, %ecx
jge 0xbcc3d
movl 0x18(%rax,%rdi), %r9d
cmpl %r9d, %edx
jl 0xbcc3d
movl 0x20(%rax,%rdi), %r11d
addl %r9d, %r11d
cmpl %r11d, %edx
jge 0xbcc3d
movl %r10d, %r10d
shlq $0x20, %r11
orq %r10, %r11
movq %r11, %r14
movl %r9d, %ebx
movl %r8d, %ebp
addq $0x38, %rdi
jmp 0xbcbf7
movq %rax, %rdi
callq *0xb0524(%rip)          # 0x16d170
shlq $0x20, %rbx
movl %ebp, %eax
orq %rax, %rbx
jmp 0xbcc5a
xorl %r14d, %r14d
movq %rbx, %rax
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/system/backends/xlib/screenxlib.cpp
// Function: smooth::System::ScreenXLib::GetActiveScreenMetrics()
S::GUI::Rect S::System::ScreenXLib::GetActiveScreenMetrics()
{
	if (display == NIL) return GUI::Rect();

	if (XRRGetMonitors != NIL)
	{
		GUI::Rect	 metrics = MonitorRectFromPoint(display, Input::Pointer::GetPosition());

		if (metrics != GUI::Rect()) return metrics;
	}

	return GUI::Rect(GUI::Point(0, 0), GUI::Size(XWidthOfScreen(XDefaultScreenOfDisplay(display)), XHeightOfScreen(XDefaultScreenOfDisplay(display))));
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0xbcd3c
movq %rdi, %rbx
cmpq $0x0, 0xb0488(%rip)     # 0x16d168
je 0xbcd0c
callq 0x56610
movq %r14, %rdi
movq %rax, %rsi
callq 0xbcb99
movq %rax, %rcx
shrq $0x20, %rcx
testl %eax, %eax
jne 0xbcd42
shrq $0x20, %rax
jne 0xbcd40
testq %rdx, %rdx
jne 0xbcd3e
movq 0x10(%rbx), %r14
movq %r14, %rdi
callq 0x58210
movq %rax, %rdi
callq 0x573b0
movl %eax, %ebp
movq 0x10(%rbx), %rdi
callq 0x58210
movq %rax, %rdi
callq 0x59630
movl %eax, %edx
movl %ebp, %eax
shlq $0x20, %rdx
orq %rax, %rdx
jmp 0xbcd3e
xorl %edx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
shlq $0x20, %rcx
movl %eax, %eax
orq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/system/backends/xlib/screenxlib.cpp
// Function: smooth::System::ScreenXLib::GetActiveScreenWorkArea()
S::GUI::Rect S::System::ScreenXLib::GetActiveScreenWorkArea()
{
	if (display == NIL) return GUI::Rect();

	if (XRRGetMonitors != NIL)
	{
		GUI::Rect	 metrics = MonitorRectFromPoint(display, Input::Pointer::GetPosition());

		if (metrics != GUI::Rect()) return metrics;
	}

	return GUI::Rect(GUI::Point(0, 0), GUI::Size(XWidthOfScreen(XDefaultScreenOfDisplay(display)), XHeightOfScreen(XDefaultScreenOfDisplay(display))));
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0xbcdc4
movq %rdi, %rbx
cmpq $0x0, 0xb0400(%rip)     # 0x16d168
je 0xbcd94
callq 0x56610
movq %r14, %rdi
movq %rax, %rsi
callq 0xbcb99
movq %rax, %rcx
shrq $0x20, %rcx
testl %eax, %eax
jne 0xbcdca
shrq $0x20, %rax
jne 0xbcdc8
testq %rdx, %rdx
jne 0xbcdc6
movq 0x10(%rbx), %r14
movq %r14, %rdi
callq 0x58210
movq %rax, %rdi
callq 0x573b0
movl %eax, %ebp
movq 0x10(%rbx), %rdi
callq 0x58210
movq %rax, %rdi
callq 0x59630
movl %eax, %edx
movl %ebp, %eax
shlq $0x20, %rdx
orq %rax, %rdx
jmp 0xbcdc6
xorl %edx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
shlq $0x20, %rcx
movl %eax, %eax
orq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/system/backends/xlib/screenxlib.cpp
// Function: smooth::System::ScreenXLib::GetVirtualScreenMetrics()
S::GUI::Rect S::System::ScreenXLib::GetVirtualScreenMetrics()
{
	if (display == NIL) return GUI::Rect();

	if (XRRGetMonitors != NIL)
	{
		GUI::Rect	 metrics;

		int		 monitorCount = 0;
		XRRMonitorInfo	*monitors     = XRRGetMonitors(display, DefaultRootWindow(display), True, &monitorCount);

		for (Int i = 0; i < monitorCount; i++)
		{
			metrics.left   = Math::Min(metrics.left, monitors[i].x);
			metrics.top    = Math::Min(metrics.top, monitors[i].y);
			metrics.right  = Math::Max(metrics.right, monitors[i].x + monitors[i].width);
			metrics.bottom = Math::Max(metrics.bottom, monitors[i].y + monitors[i].height);
		}

		XRRFreeMonitors(monitors);

		if (monitorCount > 0) return metrics;
	}

	return GUI::Rect(GUI::Point(0, 0), GUI::Size(XWidthOfScreen(XDefaultScreenOfDisplay(display)), XHeightOfScreen(XDefaultScreenOfDisplay(display))));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
xorl %r15d, %r15d
testq %rdi, %rdi
je 0xbcec8
movq 0xb036f(%rip), %rax     # 0x16d168
testq %rax, %rax
je 0xbce97
leaq 0x4(%rsp), %r14
andl $0x0, (%r14)
movq 0xe8(%rdi), %rcx
movslq 0xe0(%rdi), %rdx
shlq $0x7, %rdx
movq 0x10(%rcx,%rdx), %rsi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq *%rax
movl (%r14), %edx
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %edx
imulq $0x38, %rdx, %rdx
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %ebp, %ebp
cmpq %rcx, %rdx
je 0xbce83
movl 0x14(%rax,%rcx), %esi
cmpl %esi, %ebp
cmovgel %esi, %ebp
movl 0x18(%rax,%rcx), %edi
cmpl %edi, %r15d
cmovgel %edi, %r15d
addl 0x1c(%rax,%rcx), %esi
cmpl %esi, %r14d
cmovgl %r14d, %esi
addl 0x20(%rax,%rcx), %edi
shrq $0x20, %r14
cmpl %edi, %r14d
cmovgl %r14d, %edi
shlq $0x20, %rdi
orq %rsi, %rdi
addq $0x38, %rcx
movq %rdi, %r14
jmp 0xbce40
movq %rax, %rdi
callq *0xb02e4(%rip)          # 0x16d170
cmpl $0x0, 0x4(%rsp)
jg 0xbcecd
movq 0x10(%rbx), %rdi
callq 0x58210
movq %rax, %rdi
callq 0x573b0
movl %eax, %ebp
movq 0x10(%rbx), %rdi
callq 0x58210
movq %rax, %rdi
callq 0x59630
movl %eax, %r14d
movl %ebp, %eax
shlq $0x20, %r14
orq %rax, %r14
xorl %r15d, %r15d
jmp 0xbcecb
xorl %r14d, %r14d
xorl %ebp, %ebp
shlq $0x20, %r15
movl %ebp, %eax
orq %r15, %rax
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/graphics/backends/cairo/surfacecairo.cpp
// Function: smooth::GUI::SurfaceCairo::~SurfaceCairo()
S::GUI::SurfaceCairo::~SurfaceCairo()
{
	if (window != NIL)
	{
		cairo_destroy(paintContextCairo);
		cairo_surface_destroy(paintSurfaceCairo);

		XFreePixmap(display, paintBitmap);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xa261b(%rip), %rax     # 0x15fd68
movq %rax, (%rdi)
cmpq $0x0, 0x50(%rdi)
je 0xbd77c
movq 0xd0(%rbx), %rdi
callq 0x59ec0
movq 0xc8(%rbx), %rdi
callq 0x58850
movq 0x40(%rbx), %rdi
movq 0x58(%rbx), %rsi
callq 0x57450
leaq 0x60(%rbx), %rdi
callq 0xbfe0a
movq %rbx, %rdi
popq %rbx
jmp 0x61958
movq %rax, %rdi
callq 0x5bffa
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/graphics/backends/cairo/surfacecairo.cpp
// Function: smooth::GUI::SurfaceCairo::SetSize(smooth::GUI::Size const&)
S::Int S::GUI::SurfaceCairo::SetSize(const Size &nSize)
{
	size = nSize;

	rightToLeft.SetSurfaceSize(size);

	if (allocSize.cx >= nSize.cx && allocSize.cy >= nSize.cy) return Success();

	if (window != NIL && !painting)
	{
		cairo_destroy(paintContextCairo);
		cairo_surface_destroy(paintSurfaceCairo);

		XFreePixmap(display, paintBitmap);

		paintRects.RemoveAll();

		XWindowAttributes	 windowAttributes;

		XGetWindowAttributes(display, window, &windowAttributes);

		paintBitmap	  = XCreatePixmap(display, DefaultRootWindow(display), size.cx, size.cy, windowAttributes.depth);
		paintSurfaceCairo = cairo_xlib_surface_create(display, paintBitmap, visual, size.cx, size.cy);
		paintContextCairo = cairo_create(paintSurfaceCairo);

		paintRects.Add(Rect(Point(0, 0), size));

		cairo_set_antialias(paintContextCairo, CAIRO_ANTIALIAS_NONE);
	}

	allocSize = nSize;

	return Success();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc(%rdi), %rsi
movq (%r14), %rax
movq %rax, 0xc(%rdi)
addq $0x28, %rdi
callq 0x63e50
movl 0x34(%rbx), %eax
cmpl (%r14), %eax
jl 0xbd7eb
movl 0x38(%rbx), %eax
cmpl 0x4(%r14), %eax
jge 0xbd8d0
cmpq $0x0, 0x50(%rbx)
je 0xbd8c9
cmpw $0x0, 0xa(%rbx)
jne 0xbd8c9
movq 0xd0(%rbx), %rdi
callq 0x59ec0
movq 0xc8(%rbx), %rdi
callq 0x58850
movq 0x40(%rbx), %rdi
movq 0x58(%rbx), %rsi
callq 0x57450
leaq 0x60(%rbx), %r15
movq %r15, %rdi
callq 0xbfe38
movq 0x40(%rbx), %rdi
movq 0x50(%rbx), %rsi
leaq 0x10(%rsp), %r12
movq %r12, %rdx
callq 0x58190
movq 0x40(%rbx), %rdi
movq 0xe8(%rdi), %rax
movslq 0xe0(%rdi), %rcx
shlq $0x7, %rcx
movq 0x10(%rax,%rcx), %rsi
movl 0xc(%rbx), %edx
movl 0x10(%rbx), %ecx
movl 0x14(%r12), %r8d
callq 0x57430
movq %rax, 0x58(%rbx)
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rdx
movl 0xc(%rbx), %ecx
movl 0x10(%rbx), %r8d
movq %rax, %rsi
callq 0x58aa0
movq %rax, 0xc8(%rbx)
movq %rax, %rdi
callq 0x592f0
movq %rax, 0xd0(%rbx)
movq %rsp, %rsi
andq $0x0, (%rsi)
movq 0xc(%rbx), %rax
movq %rax, 0x8(%rsi)
movq %r15, %rdi
callq 0xc0106
movq 0xd0(%rbx), %rdi
pushq $0x1
popq %rsi
callq 0x57510
movq (%r14), %rax
movq %rax, 0x34(%rbx)
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/graphics/backends/cairo/surfacecairo.cpp
// Function: smooth::GUI::SurfaceCairo::PaintRect(smooth::GUI::Rect const&)
S::Int S::GUI::SurfaceCairo::PaintRect(const Rect &pRect)
{
	if (painting) return Error();

	if (window != NIL)
	{
		GC	 gc = XCreateGC(display, window, 0, NIL);

		XCopyArea(display, paintBitmap, window, gc, pRect.left, pRect.top, pRect.GetWidth(), pRect.GetHeight(), pRect.left, pRect.top);

		XFreeGC(display, gc);
	}

	return Success();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpw $0x0, 0xa(%rdi)
je 0xbd8fc
pushq $-0x1
popq %rbx
jmp 0xbd965
movq %rsi, %r12
movq %rdi, %r14
movq 0x50(%rdi), %rsi
testq %rsi, %rsi
je 0xbd963
movq 0x40(%r14), %rdi
xorl %ebx, %ebx
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x57fb0
movq %rax, %r15
movq 0x58(%r14), %rsi
movq 0x40(%r14), %rdi
movq 0x50(%r14), %rdx
movl (%r12), %r8d
movl 0x4(%r12), %r9d
movl 0x8(%r12), %eax
subl %r8d, %eax
movl 0xc(%r12), %r10d
subl %r9d, %r10d
movq %r15, %rcx
pushq %r9
pushq %r8
pushq %r10
pushq %rax
callq 0x5a0c0
addq $0x20, %rsp
movq 0x40(%r14), %rdi
movq %r15, %rsi
callq 0x5a3b0
jmp 0xbd965
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/graphics/backends/cairo/surfacecairo.cpp
// Function: smooth::GUI::SurfaceCairo::StartPaint(smooth::GUI::Rect const&)
S::Int S::GUI::SurfaceCairo::StartPaint(const Rect &iPRect)
{
	if (window == NIL) return Success();

	Rect	 pRect = Rect::OverlapRect(rightToLeft.TranslateRect(iPRect), paintRects.GetLast());

	cairo_save(paintContextCairo);
	cairo_rectangle(paintContextCairo, pRect.left, pRect.top, pRect.GetWidth(), pRect.GetHeight());
	cairo_clip(paintContextCairo);

	paintRects.Add(pRect);

	painting++;

	return Success();
}

// Assembly:
cmpq $0x0, 0x50(%rdi)
je 0xbda31
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
addq $0x28, %rdi
callq 0x63e10
movq %rsp, %r15
movq %rax, (%r15)
movq %rdx, 0x8(%r15)
leaq 0x60(%rbx), %r14
movq %r14, %rdi
callq 0xc0282
movq %r15, %rdi
movq %rax, %rsi
callq 0x59e30
movq %rax, %r12
movq %rdx, %r13
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
movq %rdx, 0x8(%r15)
movq 0xd0(%rbx), %rdi
callq 0x58000
movq 0xd0(%rbx), %rdi
cvtsi2sd %r12d, %xmm0
movq %r12, %rax
shrq $0x20, %rax
cvtsi2sd %eax, %xmm1
movl %r13d, %ecx
subl %r12d, %ecx
cvtsi2sd %ecx, %xmm2
shrq $0x20, %r13
subl %eax, %r13d
cvtsi2sd %r13d, %xmm3
callq 0x576b0
movq 0xd0(%rbx), %rdi
callq 0x58dc0
movq %r14, %rdi
movq %r15, %rsi
callq 0xc0106
incw 0xa(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/graphics/backends/cairo/surfacecairo.cpp
// Function: smooth::GUI::SurfaceCairo::EndPaint()
S::Int S::GUI::SurfaceCairo::EndPaint()
{
	if (!painting) return Error();

	painting--;

	if (painting == 0) PaintRect(paintRects.GetLast());

	paintRects.RemoveNth(paintRects.Length() - 1);

	cairo_restore(paintContextCairo);

	return Success();
}

// Assembly:
movzwl 0xa(%rdi), %eax
testw %ax, %ax
je 0xbda7d
pushq %rbx
movq %rdi, %rbx
decw %ax
movw %ax, 0xa(%rdi)
jne 0xbda5f
leaq 0x60(%rbx), %rdi
callq 0xc0282
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x30(%rcx)
leaq 0x60(%rbx), %rdi
movl 0x68(%rbx), %esi
decl %esi
callq 0xbfec0
movq 0xd0(%rbx), %rdi
callq 0x58d10
xorl %eax, %eax
popq %rbx
retq
pushq $-0x1
popq %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/graphics/backends/cairo/surfacecairo.cpp
// Function: smooth::GUI::SurfaceCairo::CreateCairoContext()
S::Void S::GUI::SurfaceCairo::CreateCairoContext()
{
	if (context != NIL || surface != NIL) return;

	surface = cairo_xlib_surface_create(display, window, visual, size.cx, size.cy);
	context = cairo_create(surface);

	cairo_set_antialias(context, CAIRO_ANTIALIAS_NONE);
}

// Assembly:
pushq %rbx
cmpq $0x0, 0xc0(%rdi)
jne 0xbddbc
movq %rdi, %rbx
cmpq $0x0, 0xb8(%rdi)
je 0xbddbe
popq %rbx
retq
movq 0x40(%rbx), %rdi
movq 0x50(%rbx), %rsi
movq 0x48(%rbx), %rdx
movl 0xc(%rbx), %ecx
movl 0x10(%rbx), %r8d
callq 0x58aa0
movq %rax, 0xb8(%rbx)
movq %rax, %rdi
callq 0x592f0
movq %rax, 0xc0(%rbx)
pushq $0x1
popq %rsi
movq %rax, %rdi
popq %rbx
jmp 0x57510
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/graphics/backends/cairo/surfacecairo.cpp
// Function: smooth::GUI::SurfaceCairo::DestroyCairoContext()
S::Void S::GUI::SurfaceCairo::DestroyCairoContext()
{
	if (context == NIL || surface == NIL) return;

	cairo_destroy(context);
	cairo_surface_destroy(surface);

	context = NIL;
	surface = NIL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xc0(%rdi), %rdi
testq %rdi, %rdi
je 0xbde2c
cmpq $0x0, 0xb8(%rbx)
je 0xbde2c
addq $0xb8, %rbx
callq 0x59ec0
movq (%rbx), %rdi
callq 0x58850
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/graphics/backends/cairo/surfacecairo.cpp
// Function: smooth::GUI::SurfaceCairo::SetPixel(smooth::GUI::Point const&, smooth::GUI::Color const&)
S::Int S::GUI::SurfaceCairo::SetPixel(const Point &iPoint, const Color &color)
{
	if (window == NIL) return Success();

	Point	 point = rightToLeft.TranslatePoint(iPoint);

	if (!painting)
	{
		CreateCairoContext();

		cairo_set_source_rgb(context, color.GetRed() / 255.0, color.GetGreen() / 255.0, color.GetBlue() / 255.0);
		cairo_rectangle(context, point.x, point.y, 1.0, 1.0);
		cairo_fill(context);

		DestroyCairoContext();
	}

	cairo_set_source_rgb(paintContextCairo, color.GetRed() / 255.0, color.GetGreen() / 255.0, color.GetBlue() / 255.0);
	cairo_rectangle(paintContextCairo, point.x, point.y, 1.0, 1.0);
	cairo_fill(paintContextCairo);

	return Success();
}

// Assembly:
cmpq $0x0, 0x50(%rdi)
je 0xbdf8c
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rdi, %rbx
addq $0x28, %rdi
callq 0x63dec
movq %rax, %r15
movq %rax, %r12
shrq $0x20, %r12
cmpw $0x0, 0xa(%rbx)
je 0xbde7f
cvtsi2sd %r15d, %xmm0
movsd %xmm0, 0x10(%rsp)
cvtsi2sd %r12d, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0xbdf0d
movq %rbx, %rdi
callq 0xbdda4
movq 0xc0(%rbx), %rdi
movl 0x8(%r14), %eax
movl $0xff, %ecx
movl %eax, %edx
andl %ecx, %edx
cvtsi2sd %edx, %xmm0
movsd 0x254a9(%rip), %xmm3    # 0xe3350
divsd %xmm3, %xmm0
movl %eax, %edx
shrl $0x8, %edx
andl %ecx, %edx
cvtsi2sd %edx, %xmm1
divsd %xmm3, %xmm1
shrl $0x10, %eax
andl %ecx, %eax
cvtsi2sd %eax, %xmm2
divsd %xmm3, %xmm2
callq 0x592c0
movq 0xc0(%rbx), %rdi
cvtsi2sd %r15d, %xmm0
cvtsi2sd %r12d, %xmm1
movsd 0x2548b(%rip), %xmm2    # 0xe3370
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
movaps %xmm2, %xmm3
callq 0x576b0
movq 0xc0(%rbx), %rdi
callq 0x58fc0
movq %rbx, %rdi
callq 0xbddf8
movq 0xd0(%rbx), %rdi
movl 0x8(%r14), %eax
movl $0xff, %ecx
movl %eax, %edx
andl %ecx, %edx
cvtsi2sd %edx, %xmm0
movsd 0x25423(%rip), %xmm3    # 0xe3350
divsd %xmm3, %xmm0
movl %eax, %edx
shrl $0x8, %edx
andl %ecx, %edx
cvtsi2sd %edx, %xmm1
divsd %xmm3, %xmm1
shrl $0x10, %eax
andl %ecx, %eax
cvtsi2sd %eax, %xmm2
divsd %xmm3, %xmm2
callq 0x592c0
movq 0xd0(%rbx), %rdi
movsd 0x2540f(%rip), %xmm2    # 0xe3370
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movaps %xmm2, %xmm3
callq 0x576b0
movq 0xd0(%rbx), %rdi
callq 0x58fc0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/system/backends/posix/timerposix.cpp
// Function: smooth::System::TimerPOSIX::AllowTimerInterrupts()
S::Int S::System::TimerPOSIX::AllowTimerInterrupts()
{
	/* Unblock SIGALRM so timeouts can be processed.
	 */
	sigset_t	 ss;

	sigemptyset(&ss);
	sigaddset(&ss, SIGALRM);

	pthread_sigmask(SIG_UNBLOCK, &ss, NIL);

	return Success();
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x58bd0
pushq $0xe
popq %rsi
movq %rbx, %rdi
callq 0x59330
pushq $0x1
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x567a0
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/system/backends/posix/timerposix.cpp
// Function: smooth::System::TimerPOSIX::DenyTimerInterrupts()
S::Int S::System::TimerPOSIX::DenyTimerInterrupts()
{
	/* Block SIGALRM again.
	 */
	sigset_t	 ss;

	sigemptyset(&ss);
	sigaddset(&ss, SIGALRM);

	pthread_sigmask(SIG_BLOCK, &ss, NIL);

	return Success();
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x58bd0
pushq $0xe
popq %rsi
movq %rbx, %rdi
callq 0x59330
xorl %edi, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x567a0
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/system/backends/posix/timerposix.cpp
// Function: smooth::System::TimerPOSIX::Start(int)
S::Int S::System::TimerPOSIX::Start(Int nInterval)
{
	if (timer != NIL) return Error();

	if (nInterval <= 0) nInterval = 1;

	timer = new timer_t;

	/* Set handler function.
	 */
	struct sigaction	 sa;

	memset(&sa, 0, sizeof(sa));

	sa.sa_sigaction = TimerProc;
	sa.sa_flags	= SA_SIGINFO;

	sigaction(SIGALRM, &sa, NIL);

	/* Create timer.
	 */
	struct sigevent		 se;

	memset(&se, 0, sizeof(se));

	se.sigev_notify		 = SIGEV_SIGNAL;
	se.sigev_signo		 = SIGALRM;
	se.sigev_value.sival_int = thisTimer->GetHandle();

	timer_create(CLOCK_REALTIME, &se, timer);

	/* Start timer.
	 */
	struct itimerspec	 ts;

	ts.it_value.tv_sec     = nInterval / 1000;
	ts.it_value.tv_nsec    = nInterval % 1000 * 1000000;
	ts.it_interval.tv_sec  = nInterval / 1000;
	ts.it_interval.tv_nsec = nInterval % 1000 * 1000000;

	timer_settime(*timer, 0, &ts, NIL);

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xf8, %rsp
cmpq $0x0, 0x18(%rdi)
je 0xc0439
pushq $-0x1
popq %r14
jmp 0xc04f5
movq %rdi, %rbx
cmpl $0x2, %esi
pushq $0x1
popq %rbp
cmovgel %esi, %ebp
pushq $0x8
popq %rdi
callq 0x56700
movq %rax, 0x18(%rbx)
leaq 0x68(%rsp), %r15
xorl %r14d, %r14d
movl $0x90, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x56ff0
leaq 0x97(%rip), %rax        # 0xc0506
movq %rax, -0x8(%r15)
movl $0x4, 0x80(%r15)
pushq $0xe
popq %rdi
leaq 0x60(%rsp), %rsi
xorl %edx, %edx
callq 0x58be0
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movl $0xe, 0x8(%rsi)
movq 0x10(%rbx), %rax
movl 0x8(%rax), %eax
movl %eax, (%rsi)
movq 0x18(%rbx), %rdx
xorl %edi, %edi
callq 0x59930
movl $0x3e8, %ecx            # imm = 0x3E8
movl %ebp, %eax
xorl %edx, %edx
divl %ecx
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
imull $0xf4240, %edx, %edx    # imm = 0xF4240
movq %rdx, 0x18(%rcx)
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
movq 0x18(%rbx), %rax
movq (%rax), %rdi
xorl %esi, %esi
movq %rcx, %rdx
xorl %ecx, %ecx
callq 0x59030
movl %r14d, %eax
addq $0xf8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/system/backends/posix/timerposix.cpp
// Function: smooth::System::TimerPOSIX::Stop()
S::Int S::System::TimerPOSIX::Stop()
{
	if (timer == NIL) return Error();

	timer_delete(*timer);

	delete timer;

	timer = NIL;

	return Success();
}

// Assembly:
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0xc0558
pushq %rbx
movq %rdi, %rbx
movq (%rax), %rdi
callq 0x579a0
movq 0x18(%rbx), %rdi
pushq $0x8
popq %rsi
callq 0x564c0
andq $0x0, 0x18(%rbx)
xorl %eax, %eax
popq %rbx
retq
pushq $-0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/system/backends/posix/../../../../include/smooth/system/../templates/signals/signalr.h
// Function: smooth::SignalR0<int>::Disconnect(int (*)())
Int Disconnect(returnTYPE (*proc)(SIGNALS_ARGUMENT_TYPES))
			{
				if (slotsN == NIL) return Error();

				SIGNALS_SLOT_GLOBAL_CLASS_NAME<returnTYPE SIGNALS_CONDITIONAL_COMMA SIGNALS_ARGUMENT_TYPES>	 slot(proc);

				for (Int i = slotsN->Length() - 1; i >= 0; i--)
				{
					if ((*((SIGNALS_SLOT_BASE_CLASS_NAME<returnTYPE SIGNALS_CONDITIONAL_COMMA SIGNALS_ARGUMENT_TYPES> *) slotsN->GetNth(i))) == slot)
					{
						RemoveNthN(i);

						break;
					}
				}

				return Success();
			}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0xc05ec
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x9f9a7(%rip), %rcx     # 0x15ff50
movq %rsp, %r14
movq %rcx, (%r14)
movq %rsi, 0x8(%r14)
movl 0x8(%rax), %ebp
testl %ebp, %ebp
jle 0xc05e1
decl %ebp
movq 0x10(%rbx), %rdi
movl %ebp, %esi
callq 0x5c1b6
movq (%rax), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x20(%rax)
testb %al, %al
je 0xc05b6
movq %rbx, %rdi
movl %ebp, %esi
callq 0xac0c8
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $-0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/system/backends/posix/../../../../include/smooth/system/../templates/signals/signalr.h
// Function: smooth::SignalR0<int>::Connect(int (*)())
Int Connect(returnTYPE (*proc)(SIGNALS_ARGUMENT_TYPES))
			{
				if (slotsN == NIL)
				{
					slotsN = new Array<Void *>();
					slotsN->EnableLocking();
				}

				slotsN->Add(new SIGNALS_SLOT_GLOBAL_CLASS_NAME<returnTYPE SIGNALS_CONDITIONAL_COMMA SIGNALS_ARGUMENT_TYPES>(proc));

				return Success();
			}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq 0x10(%rdi), %r15
testq %r15, %r15
jne 0xc062b
movq %rdi, %r14
pushq $0x58
popq %rdi
callq 0x56700
movq %rax, %r15
movq %rax, %rdi
callq 0x5c808
movq %r15, 0x10(%r14)
movq %r15, %rdi
callq 0x583a0
movq 0x10(%r14), %r15
pushq $0x10
popq %rdi
callq 0x56700
leaq 0x9f916(%rip), %rcx     # 0x15ff50
movq %rcx, (%rax)
movq %rbx, 0x8(%rax)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
callq 0x5c03a
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
pushq $0x58
popq %rsi
movq %r15, %rdi
callq 0x564c0
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/threads/backends/posix/mutexposix.cpp
// Function: smooth::Threads::MutexPOSIX::MutexPOSIX(void*)
S::Threads::MutexPOSIX::MutexPOSIX(Void *iMutex)
{
	type = MUTEX_POSIX;

	if (iMutex != NIL)
	{
		mutex	= (pthread_mutex_t *) iMutex;
		myMutex	= False;
	}
	else
	{
		mutex	= new pthread_mutex_t;
		myMutex	= True;

		pthread_mutexattr_t	 mutexattr;

		pthread_mutexattr_init(&mutexattr);
		pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE);

		if (pthread_mutex_init(mutex, &mutexattr) != 0)
		{
			delete mutex;

			mutex = NIL;
		}

		pthread_mutexattr_destroy(&mutexattr);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %esi, %esi
callq 0xae49c
leaq 0x9f89e(%rip), %rax     # 0x15ffa0
movq %rax, (%rbx)
movw $0x1, 0x8(%rbx)
testq %r14, %r14
je 0xc071a
movq %r14, 0x10(%rbx)
movb $0x0, 0x18(%rbx)
jmp 0xc076d
pushq $0x28
popq %rdi
callq 0x56700
movq %rax, 0x10(%rbx)
movb $0x1, 0x18(%rbx)
leaq 0x4(%rsp), %r14
movq %r14, %rdi
callq 0x597c0
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x57bb0
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x57370
testl %eax, %eax
je 0xc0763
movq 0x10(%rbx), %rdi
pushq $0x28
popq %rsi
callq 0x564c0
andq $0x0, 0x10(%rbx)
leaq 0x4(%rsp), %rdi
callq 0x56d40
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xae4ac
movq %r14, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/threads/backends/posix/semaphoreposix.cpp
// Function: smooth::Threads::SemaphorePOSIX::SemaphorePOSIX(int, void*)
S::Threads::SemaphorePOSIX::SemaphorePOSIX(Int iValue, Void *iSemaphore) : SemaphoreBackend(iValue)
{
	type = SEMAPHORE_POSIX;

	if (iSemaphore != NIL)
	{
		SemaphorePOSIX	*oSemaphore = (SemaphorePOSIX *) iSemaphore;

		mutex	    = oSemaphore->mutex;
		condition   = oSemaphore->condition;

		count	    = oSemaphore->count;
		max	    = oSemaphore->max;

		mySemaphore = False;
	}
	else
	{
		mutex	    = new pthread_mutex_t;
		condition   = new pthread_cond_t;

		count	    = iValue;
		max	    = iValue;

		mySemaphore = True;

		if (pthread_mutex_init(mutex, NIL) != 0)
		{
			delete mutex;
			delete condition;

			mutex	  = NIL;
			condition = NIL;
		}
		else if (pthread_cond_init(condition, NIL) != 0)
		{
			pthread_mutex_destroy(mutex);

			delete mutex;
			delete condition;

			mutex	  = NIL;
			condition = NIL;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
xorl %edx, %edx
callq 0xae504
leaq 0x9f763(%rip), %rax     # 0x15fff8
movq %rax, (%rbx)
movw $0x1, 0x8(%rbx)
testq %r14, %r14
je 0xc08ba
movups 0x10(%r14), %xmm0
movups %xmm0, 0x10(%rbx)
movq 0x20(%r14), %rax
movq %rax, 0x20(%rbx)
movb $0x0, 0x28(%rbx)
jmp 0xc0928
pushq $0x28
popq %rdi
callq 0x56700
movq %rax, %r14
movq %rax, 0x10(%rbx)
pushq $0x30
popq %rdi
callq 0x56700
leaq 0x10(%rbx), %r15
movq %rax, 0x18(%rbx)
movl %ebp, 0x20(%rbx)
movl %ebp, 0x24(%rbx)
movb $0x1, 0x28(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x57370
testl %eax, %eax
jne 0xc0909
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0x57570
testl %eax, %eax
je 0xc0928
movq 0x10(%rbx), %rdi
callq 0x564e0
movq 0x10(%rbx), %rdi
pushq $0x28
popq %rsi
callq 0x564c0
movq 0x18(%rbx), %rdi
pushq $0x30
popq %rsi
callq 0x564c0
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xae514
movq %r14, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/threads/backends/posix/semaphoreposix.cpp
// Function: smooth::Threads::SemaphorePOSIX::~SemaphorePOSIX()
S::Threads::SemaphorePOSIX::~SemaphorePOSIX()
{
	if (mySemaphore && mutex != NIL)
	{
		pthread_mutex_destroy(mutex);
		pthread_cond_destroy(condition);

		delete mutex;
		delete condition;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x9f6a7(%rip), %rax     # 0x15fff8
movq %rax, (%rdi)
cmpb $0x1, 0x28(%rdi)
jne 0xc0989
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xc0989
callq 0x564e0
movq 0x18(%rbx), %rdi
callq 0x56f20
movq 0x10(%rbx), %rdi
pushq $0x28
popq %rsi
callq 0x564c0
movq 0x18(%rbx), %rdi
pushq $0x30
popq %rsi
callq 0x564c0
movq %rbx, %rdi
popq %rbx
jmp 0xae514
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/threads/backends/posix/semaphoreposix.cpp
// Function: smooth::Threads::SemaphorePOSIX::Wait()
S::Bool S::Threads::SemaphorePOSIX::Wait()
{
	if (mutex == NIL) return False;

	pthread_mutex_lock(mutex);

	while (count <= 0) pthread_cond_wait(condition, mutex);

	count -= 1;

	pthread_mutex_unlock(mutex);

	return True;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rbx
testq %rbx, %rbx
je 0xc09ea
movq %rdi, %r14
movq %rbx, %rdi
callq 0x56e60
movl 0x20(%r14), %eax
testl %eax, %eax
jg 0xc09db
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdi
callq 0x57af0
jmp 0xc09c4
decl %eax
movl %eax, 0x20(%r14)
movq 0x10(%r14), %rdi
callq 0x56cb0
testq %rbx, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/threads/backends/posix/semaphoreposix.cpp
// Function: smooth::Threads::SemaphorePOSIX::TryWait()
S::Bool S::Threads::SemaphorePOSIX::TryWait()
{
	if (mutex == NIL) return False;

	pthread_mutex_lock(mutex);

	if (count > 0)
	{
		count -= 1;

		pthread_mutex_unlock(mutex);

		return True;
	}

	pthread_mutex_unlock(mutex);

	return False;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xc0a29
callq 0x56e60
movl 0x20(%r14), %eax
testl %eax, %eax
setg %bl
jle 0xc0a1e
decl %eax
movl %eax, 0x20(%r14)
movq 0x10(%r14), %rdi
callq 0x56cb0
jmp 0xc0a2b
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/threads/backends/posix/semaphoreposix.cpp
// Function: smooth::Threads::SemaphorePOSIX::Release()
S::Bool S::Threads::SemaphorePOSIX::Release()
{
	if (mutex == NIL) return False;

	pthread_mutex_lock(mutex);

	if (count < max)
	{
		count += 1;

		pthread_cond_signal(condition);
		pthread_mutex_unlock(mutex);

		return True;
	}

	pthread_mutex_unlock(mutex);

	return False;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xc0a72
callq 0x56e60
movl 0x20(%r14), %eax
cmpl 0x24(%r14), %eax
setl %bl
jge 0xc0a67
incl %eax
movl %eax, 0x20(%r14)
movq 0x18(%r14), %rdi
callq 0x58690
movq 0x10(%r14), %rdi
callq 0x56cb0
jmp 0xc0a74
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/threads/backends/posix/threadposix.cpp
// Function: smooth::Threads::ThreadPOSIX::ThreadPOSIX(void*)
S::Threads::ThreadPOSIX::ThreadPOSIX(Void *iThread)
{
	pthread_mutex_init(&mutex, NIL);

	type		 = THREAD_POSIX;

	thread		 = NIL;
	myThread	 = False;

	info.threadProc	 = NIL;
	info.threadParam = NIL;

	if (iThread != NIL) thread = (pthread_t *) iThread;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
callq 0xae568
leaq 0x9f57a(%rip), %rax     # 0x160050
movq %rax, (%r14)
leaq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0x57370
movw $0x1, 0x8(%r14)
andq $0x0, 0x48(%r14)
movb $0x0, 0x50(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
testq %rbx, %rbx
je 0xc0b06
movq %rbx, 0x48(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/threads/backends/posix/threadposix.cpp
// Function: smooth::Threads::ThreadPOSIX::Start(void (*)(void*), void*)
S::Int S::Threads::ThreadPOSIX::Start(Void (*threadProc)(Void *), Void *threadParam)
{
	Stop();

	info.threadProc	 = threadProc;
	info.threadParam = threadParam;

	thread	 = new pthread_t;
	myThread = True;

	pthread_create(thread, NULL, Caller, &info);

	return Success();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x10(%r15), %r12
movq %r14, 0x10(%r15)
movq %rbx, 0x18(%r15)
pushq $0x8
popq %rdi
callq 0x56700
movq %rax, 0x48(%r15)
movb $0x1, 0x50(%r15)
leaq 0x1b(%rip), %rdx        # 0xc0bb0
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rcx
callq 0x59da0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/threads/backends/posix/threadposix.cpp
// Function: smooth::Threads::ThreadPOSIX::Stop()
S::Int S::Threads::ThreadPOSIX::Stop()
{
	pthread_mutex_lock(&mutex);

	if (thread == NIL || pthread_equal(pthread_self(), *thread))
	{
		pthread_mutex_unlock(&mutex);

		return Error();
	}

	pthread_t	*thread	  = this->thread;
	Bool		 myThread = this->myThread;

	this->thread = NIL;

	pthread_mutex_unlock(&mutex);

	pthread_cancel(*thread);
	pthread_detach(*thread);

	if (myThread) delete thread;

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r15
leaq 0x20(%rdi), %r14
movq %r14, %rdi
callq 0x56e60
movq 0x48(%r15), %rbx
testq %rbx, %rbx
je 0xc0bf2
callq 0x58560
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x5a2e0
testl %eax, %eax
je 0xc0c08
movq %r14, %rdi
callq 0x56cb0
pushq $-0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb 0x50(%r15), %r12b
andq $0x0, 0x48(%r15)
movq %r14, %rdi
callq 0x56cb0
movq (%rbx), %rdi
callq 0x59a60
movq (%rbx), %rdi
callq 0x56f30
xorl %ebp, %ebp
cmpb $0x1, %r12b
jne 0xc0bfd
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x564c0
jmp 0xc0bfd
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/threads/backends/posix/threadposix.cpp
// Function: smooth::Threads::ThreadPOSIX::Wait()
S::Int S::Threads::ThreadPOSIX::Wait()
{
	pthread_mutex_lock(&mutex);

	if (thread == NIL || pthread_equal(pthread_self(), *thread))
	{
		pthread_mutex_unlock(&mutex);

		return Error();
	}

	pthread_t	*thread	  = this->thread;
	Bool		 myThread = this->myThread;

	this->thread = NIL;

	pthread_mutex_unlock(&mutex);

	pthread_join(*thread, NIL);

	if (myThread) delete thread;

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r15
leaq 0x20(%rdi), %r14
movq %r14, %rdi
callq 0x56e60
movq 0x48(%r15), %rbx
testq %rbx, %rbx
je 0xc0c71
callq 0x58560
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x5a2e0
testl %eax, %eax
je 0xc0c8b
movq %r14, %rdi
callq 0x56cb0
pushq $-0x1
popq %r14
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb 0x50(%r15), %bpl
andq $0x0, 0x48(%r15)
movq %r14, %rdi
callq 0x56cb0
movq (%rbx), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x56fd0
cmpb $0x1, %bpl
jne 0xc0c7d
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x564c0
jmp 0xc0c7d
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/threads/backends/posix/threadposix.cpp
// Function: smooth::Threads::ThreadPOSIX::Exit()
S::Void S::Threads::ThreadPOSIX::Exit()
{
	pthread_mutex_lock(&mutex);

	if (thread == NIL || !pthread_equal(pthread_self(), *thread))
	{
		pthread_mutex_unlock(&mutex);

		return;
	}

	pthread_t	*thread	  = this->thread;
	Bool		 myThread = this->myThread;

	this->thread = NIL;

	pthread_mutex_unlock(&mutex);

	pthread_detach(*thread);

	if (myThread) delete thread;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r15
leaq 0x20(%rdi), %r14
movq %r14, %rdi
callq 0x56e60
movq 0x48(%r15), %rbx
testq %rbx, %rbx
je 0xc0d23
callq 0x58560
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x5a2e0
testl %eax, %eax
je 0xc0d23
movb 0x50(%r15), %bpl
andq $0x0, 0x48(%r15)
movq %r14, %rdi
callq 0x56cb0
movq (%rbx), %rdi
callq 0x56f30
cmpb $0x1, %bpl
jne 0xc0d35
pushq $0x8
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x564c0
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x56cb0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: cpuid_get_all_raw_data
int cpuid_get_all_raw_data(struct cpu_raw_data_array_t* data)
{
	int cur_error = cpuid_set_error(ERR_OK);
	int ret_error = cpuid_set_error(ERR_OK);
	logical_cpu_t logical_cpu = 0;
	struct cpu_raw_data_t* raw_ptr = NULL;

	if (data == NULL)
		return cpuid_set_error(ERR_HANDLE);

	bool affinity_saved = save_cpu_affinity();

	cpu_raw_data_array_t_constructor(data, true);
	while (set_cpu_affinity(logical_cpu) || logical_cpu == 0) {
		debugf(2, "Getting raw dump for logical CPU %i\n", logical_cpu);
		cpuid_grow_raw_data_array(data, logical_cpu + 1);
		raw_ptr = &data->raw[logical_cpu];
		cur_error = cpuid_get_raw_data(raw_ptr);
		if (ret_error == ERR_OK)
			ret_error = cur_error;
		logical_cpu++;
	}

	if (affinity_saved)
		restore_cpu_affinity();

	return ret_error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0xa03f2(%rip), %rdi     # 0x161330
callq 0x57820
andl $0x0, 0x30(%rax)
testq %rbx, %rbx
je 0xc1049
leaq 0x38(%rax), %rdx
movl $0x80, %esi
xorl %edi, %edi
movq %rdx, 0x8(%rsp)
callq 0x570a0
movb $0x1, (%rbx)
andw $0x0, 0x2(%rbx)
andq $0x0, 0x8(%rbx)
movl %eax, 0x4(%rsp)
leaq 0x10(%rsp), %r12
pushq $0x2
popq %r14
xorl %ebp, %ebp
xorl %r13d, %r13d
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movzwl %r13w, %r15d
cmpw $0x3ff, %r13w           # imm = 0x3FF
ja 0xc0fd9
pushq $0x1
popq %rax
movl %r15d, %ecx
shlq %cl, %rax
movq %r15, %rcx
shrq $0x6, %rcx
orq %rax, 0x10(%rsp,%rcx,8)
movl $0x80, %esi
xorl %edi, %edi
movq %r12, %rdx
callq 0x58590
testw %r13w, %r13w
je 0xc0ff2
testl %eax, %eax
jne 0xc102f
movl %r14d, %edi
leaq 0x42a90(%rip), %rsi     # 0x103a8c
movl %r15d, %edx
xorl %eax, %eax
callq 0xc34c6
incl %r13d
movzwl %r13w, %esi
movq %rbx, %rdi
callq 0xc106d
imulq $0x580, %r15, %rdi      # imm = 0x580
addq 0x8(%rbx), %rdi
callq 0xc0d95
testl %ebp, %ebp
cmovel %eax, %ebp
jmp 0xc0f8a
cmpl $0x0, 0x4(%rsp)
jne 0xc1059
movl $0x80, %esi
xorl %edi, %edi
movq 0x8(%rsp), %rdx
callq 0x58590
jmp 0xc1059
leaq 0x30(%rax), %rax
movl $0xfffffff4, (%rax)     # imm = 0xFFFFFFF4
pushq $-0xc
popq %rbp
movl %ebp, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: cpuid_grow_raw_data_array
static void cpuid_grow_raw_data_array(struct cpu_raw_data_array_t* raw_array, logical_cpu_t n)
{
	logical_cpu_t i;
	struct cpu_raw_data_t *tmp = NULL;

	if ((n <= 0) || (n < raw_array->num_raw)) return;
	debugf(3, "Growing cpu_raw_data_array_t from %u to %u items\n", raw_array->num_raw, n);
	tmp = realloc(raw_array->raw, sizeof(struct cpu_raw_data_t) * n);
	if (tmp == NULL) { /* Memory allocation failure */
		cpuid_set_error(ERR_NO_MEM);
		return;
	}

	for (i = raw_array->num_raw; i < n; i++)
		raw_data_t_constructor(&tmp[i]);
	raw_array->num_raw = n;
	raw_array->raw     = tmp;
}

// Assembly:
testl %esi, %esi
je 0xc111a
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movzwl 0x2(%rdi), %edx
cmpw %bp, %dx
ja 0xc110c
leaq 0x42f58(%rip), %rsi     # 0x103fed
pushq $0x3
popq %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0xc34c6
movq 0x8(%rbx), %rdi
movzwl %bp, %r12d
imulq $0x580, %r12, %rsi      # imm = 0x580
callq 0x56410
testq %rax, %rax
je 0xc10f6
movq %rax, %r14
movzwl 0x2(%rbx), %r13d
imulq $0x580, %r13, %r15      # imm = 0x580
addq %rax, %r15
cmpq %r12, %r13
jae 0xc10ec
movl $0x580, %edx            # imm = 0x580
movq %r15, %rdi
xorl %esi, %esi
callq 0x56ff0
incq %r13
addq $0x580, %r15            # imm = 0x580
jmp 0xc10cc
movw %bp, 0x2(%rbx)
movq %r14, 0x8(%rbx)
jmp 0xc110c
leaq 0xa0233(%rip), %rdi     # 0x161330
callq 0x57820
movl $0xfffffffd, 0x30(%rax) # imm = 0xFFFFFFFD
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: cpu_id_t_constructor
static void cpu_id_t_constructor(struct cpu_id_t* id)
{
	memset(id, 0, sizeof(struct cpu_id_t));
	id->l1_data_cache = id->l1_instruction_cache = id->l2_cache = id->l3_cache = id->l4_cache = -1;
	id->l1_assoc = id->l1_data_assoc = id->l1_instruction_assoc = id->l2_assoc = id->l3_assoc = id->l4_assoc = -1;
	id->l1_cacheline = id->l1_data_cacheline = id->l1_instruction_cacheline = id->l2_cacheline = id->l3_cacheline = id->l4_cacheline = -1;
	id->l1_data_instances = id->l1_instruction_instances = id->l2_instances = id->l3_instances = id->l4_instances = -1;
	id->sse_size = -1;
	init_affinity_mask(&id->affinity_mask);
	id->purpose = PURPOSE_GENERAL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x21e0, %edx           # imm = 0x21E0
xorl %esi, %esi
callq 0x56ff0
orl $-0x1, 0x190(%rbx)
leaq 0x1d8(%rbx), %rdi
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0xf8(%rbx)
movdqu %xmm0, 0x108(%rbx)
movdqu %xmm0, 0x118(%rbx)
movdqu %xmm0, 0x128(%rbx)
movdqu %xmm0, 0x138(%rbx)
orq $-0x1, 0x148(%rbx)
callq 0xc3c12
andl $0x0, 0x21d8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: cpu_ident_purpose
static cpu_purpose_t cpu_ident_purpose(struct cpu_raw_data_t* raw)
{
	cpu_vendor_t vendor = VENDOR_UNKNOWN;
	cpu_purpose_t purpose = PURPOSE_GENERAL;
	char vendor_str[VENDOR_STR_MAX];

	vendor = cpuid_vendor_identify(raw->basic_cpuid[0], vendor_str);
	if (vendor == VENDOR_UNKNOWN) {
		cpuid_set_error(ERR_CPU_UNKN);
		return purpose;
	}

	switch (vendor) {
		case VENDOR_AMD:
			purpose = cpuid_identify_purpose_amd(raw);
			break;
		case VENDOR_INTEL:
			purpose = cpuid_identify_purpose_intel(raw);
			break;
		default:
			purpose = PURPOSE_GENERAL;
			break;
	}
	debugf(3, "Identified a '%s' CPU core type\n", cpu_purpose_str(purpose));

	return purpose;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %rsi
callq 0xc3065
cmpl $0x1, %eax
je 0xc2c59
testl %eax, %eax
je 0xc2c4f
xorl %ebx, %ebx
cmpl $-0x1, %eax
jne 0xc2c63
leaq 0x9e6f4(%rip), %rdi     # 0x161330
callq 0x57820
movl $0xfffffff9, 0x30(%rax) # imm = 0xFFFFFFF9
xorl %ebx, %ebx
jmp 0xc2c7e
movq %rbx, %rdi
callq 0xc5e97
jmp 0xc2c61
movq %rbx, %rdi
callq 0xc4af6
movl %eax, %ebx
movl %ebx, %edi
callq 0xc2eb6
leaq 0x418de(%rip), %rsi     # 0x10454f
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xc34c6
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq