LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
subq $0xc0, %rsp
movq 0x10(%rdi), %r12
testq %r12, %r12
je 0xc3cad
movq %rdi, %rbx
callq 0x55300
testl %eax, %eax
je 0xc3bd5
movl $0x1, %edi
callq 0x578c0
jmp 0xc3cad
movl $0xa, %ebp
movq 0xa8f8f(%rip), %r14     # 0x16cb70
movq 0xa9080(%rip), %r15     # 0x16cc68
movq 0x10(%rbx), %rdi
callq 0x55e10
movq 0x10(%rbx), %rdi
movl $0x1, %esi
callq 0x55c00
testl %eax, %eax
jne 0xc3c26
movq %r14, %rdi
callq 0xc3cc4
movl $0xa, %edi
callq 0x578c0
movq %r15, %rdi
callq 0xc3cc4
decl %ebp
jne 0xc3be8
jmp 0xc3cad
movq 0x10(%rbx), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x57ee0
movq %r14, %rdi
xorl %esi, %esi
callq 0x55080
testl %eax, %eax
jne 0xc3cad
cmpl $0x6, (%rsp)
jne 0xc3c6b
leaq -0xd5(%rip), %r14       # 0xc3b7b
movq %rsp, %r15
movq 0x10(%rbx), %rdi
movq 0x20(%rsp), %rcx
movq %r15, %rsi
movq %r14, %rdx
callq 0x56c40
testl %eax, %eax
jne 0xc3c53
cmpl $0x16, (%rsp)
jne 0xc3c93
leaq -0xec(%rip), %r14       # 0xc3b8c
movq %rsp, %r15
movq 0x10(%rbx), %rdi
movq 0x20(%rsp), %rcx
movq %r15, %rsi
movq %r14, %rdx
callq 0x56c40
testl %eax, %eax
jne 0xc3c7b
movq 0x20(%rsp), %rdi
callq 0xbfb44
testq %rax, %rax
je 0xc3cad
movq %rsp, %rsi
movq %rax, %rdi
callq 0xbfdd8
testq %r12, %r12
setne %al
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x50618(%rip), %rdi     # 0x1143d4
movl $0x2, %esi
callq 0x57cf0
movq %rax, 0xb41eb(%rip)     # 0x177fb8
testq %rax, %rax
je 0xc3e02
leaq 0x50608(%rip), %rsi     # 0x1143e1
movq %rax, %rdi
callq 0x557b0
movq %rax, 0xb41c0(%rip)     # 0x177fa8
movq 0xb41c9(%rip), %rdi     # 0x177fb8
leaq 0x505fa(%rip), %rsi     # 0x1143f0
callq 0x557b0
movq %rax, 0xb41ae(%rip)     # 0x177fb0
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0xb4179(%rip), %rax     # 0x177fa8
testq %rax, %rax
je 0xc3ed9
movq %rsi, %r14
leaq 0xc(%rsp), %rbx
movl $0x0, (%rbx)
movq 0xe8(%rdi), %rcx
movslq 0xe0(%rdi), %rdx
shlq $0x7, %rdx
movq 0x10(%rcx,%rdx), %rsi
movl $0x1, %edx
movq %rbx, %rcx
callq *%rax
movslq (%rbx), %rsi
xorl %ebx, %ebx
testq %rsi, %rsi
jle 0xc3ee0
movl (%r14), %ecx
movl 0x4(%r14), %edx
imulq $0x38, %rsi, %rsi
xorl %edi, %edi
xorl %r8d, %r8d
xorl %r14d, %r14d
movl 0x14(%rax,%rdi), %r9d
cmpl %r9d, %ecx
jl 0xc3ec5
movl 0x1c(%rax,%rdi), %r11d
addl %r9d, %r11d
cmpl %r11d, %ecx
jge 0xc3ec5
movl 0x18(%rax,%rdi), %r10d
cmpl %r10d, %edx
jl 0xc3ec5
movl 0x20(%rax,%rdi), %r15d
addl %r10d, %r15d
cmpl %r15d, %edx
jge 0xc3ec5
movl %r11d, %r8d
shlq $0x20, %r15
orq %r8, %r15
movq %r15, %r14
movl %r10d, %r8d
movl %r9d, %ebx
addq $0x38, %rdi
cmpq %rdi, %rsi
jne 0xc3e84
shlq $0x20, %r8
movl %ebx, %ecx
movq %r8, %rbx
jmp 0xc3ee5
xorl %r14d, %r14d
xorl %ebx, %ebx
jmp 0xc3ef1
xorl %r14d, %r14d
xorl %ecx, %ecx
orq %rcx, %rbx
movq %rax, %rdi
callq *0xb40bf(%rip)          # 0x177fb0
movq %rbx, %rax
movq %r14, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0xc3fd2
movq %rdi, %rbx
cmpq $0x0, 0xb4030(%rip)     # 0x177fa8
je 0xc3fa1
callq 0x555d0
movq %r14, %rdi
movq %rax, %rsi
callq 0xc3e1f
movq %rax, %rcx
orq %rdx, %rcx
je 0xc3fa1
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0xc3fd8
movq 0x10(%rbx), %rdi
callq 0x57050
movq %rax, %rdi
callq 0x562c0
movl %eax, %ebp
movq 0x10(%rbx), %rdi
callq 0x57050
movq %rax, %rdi
callq 0x58370
movl %eax, %edx
movl %ebp, %eax
shlq $0x20, %rdx
orq %rax, %rdx
jmp 0xc3fd4
xorl %edx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %eax
orq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xc4054
movq %rdi, %rbx
cmpq $0x0, 0xb3fae(%rip)     # 0x177fa8
je 0xc4023
callq 0x555d0
movq %r14, %rdi
movq %rax, %rsi
callq 0xc3e1f
movq %rax, %rcx
orq %rdx, %rcx
je 0xc4023
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0xc405a
movq 0x10(%rbx), %rdi
callq 0x57050
movq %rax, %rdi
callq 0x562c0
movl %eax, %ebp
movq 0x10(%rbx), %rdi
callq 0x57050
movq %rax, %rdi
callq 0x58370
movl %eax, %edx
movl %ebp, %eax
shlq $0x20, %rdx
orq %rax, %rdx
jmp 0xc4056
xorl %edx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %eax
orq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xc4113
movq 0xb3f23(%rip), %rax     # 0x177fa8
testq %rax, %rax
je 0xc4130
leaq 0x4(%rsp), %r14
movl $0x0, (%r14)
movq 0xe8(%rdi), %rcx
movslq 0xe0(%rdi), %rdx
shlq $0x7, %rdx
movq 0x10(%rcx,%rdx), %rsi
movl $0x1, %edx
movq %r14, %rcx
callq *%rax
movslq (%r14), %rcx
testq %rcx, %rcx
jle 0xc4118
imulq $0x38, %rcx, %rcx
xorl %edx, %edx
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %esi, %esi
movl 0x14(%rax,%rdx), %edi
movl 0x18(%rax,%rdx), %r14d
cmpl %edi, %ebp
cmovgel %edi, %ebp
cmpl %r14d, %r15d
cmovgel %r14d, %r15d
addl 0x1c(%rax,%rdx), %edi
cmpl %edi, %esi
cmovgl %esi, %edi
shrq $0x20, %rsi
addl 0x20(%rax,%rdx), %r14d
cmpl %r14d, %esi
cmovgl %esi, %r14d
shlq $0x20, %r14
orq %rdi, %r14
addq $0x38, %rdx
movq %r14, %rsi
cmpq %rdx, %rcx
jne 0xc40d0
jmp 0xc4120
xorl %r14d, %r14d
jmp 0xc4163
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %ebp, %ebp
movq %rax, %rdi
callq *0xb3e87(%rip)          # 0x177fb0
cmpl $0x0, 0x4(%rsp)
jg 0xc4165
movq 0x10(%rbx), %rdi
callq 0x57050
movq %rax, %rdi
callq 0x562c0
movl %eax, %ebp
movq 0x10(%rbx), %rdi
callq 0x57050
movq %rax, %rdi
callq 0x58370
movl %eax, %r14d
movl %ebp, %eax
shlq $0x20, %r14
orq %rax, %r14
xorl %r15d, %r15d
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_O1/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 0xa6317(%rip), %rax     # 0x16ad48
movq %rax, (%rdi)
cmpq $0x0, 0x50(%rdi)
je 0xc4a60
movq 0xd0(%rbx), %rdi
callq 0x58b80
movq 0xc8(%rbx), %rdi
callq 0x57630
movq 0x40(%rbx), %rdi
movq 0x58(%rbx), %rsi
callq 0x56360
leaq 0x60(%rbx), %rdi
callq 0xc7192
movq %rbx, %rdi
popq %rbx
jmp 0x60bb2
movq %rax, %rdi
callq 0x5aede
// File: /workspace/github_c_makefile_star2_O1/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 0x632c6
movl 0x34(%rbx), %eax
cmpl (%r14), %eax
jl 0xc4acf
movl 0x38(%rbx), %eax
cmpl 0x4(%r14), %eax
jge 0xc4bbd
cmpq $0x0, 0x50(%rbx)
je 0xc4bb6
cmpw $0x0, 0xa(%rbx)
jne 0xc4bb6
movq 0xd0(%rbx), %rdi
callq 0x58b80
movq 0xc8(%rbx), %rdi
callq 0x57630
movq 0x40(%rbx), %rdi
movq 0x58(%rbx), %rsi
callq 0x56360
leaq 0x60(%rbx), %r15
movq %r15, %rdi
callq 0xc71ca
movq 0x40(%rbx), %rdi
movq 0x50(%rbx), %rsi
leaq 0x10(%rsp), %r12
movq %r12, %rdx
callq 0x56fd0
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 0x56340
movq %rax, 0x58(%rbx)
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rdx
movl 0xc(%rbx), %ecx
movl 0x10(%rbx), %r8d
movq %rax, %rsi
callq 0x57860
movq %rax, 0xc8(%rbx)
movq %rax, %rdi
callq 0x58060
movq %rax, 0xd0(%rbx)
movq %rsp, %rsi
movq $0x0, (%rsi)
movl 0xc(%rbx), %eax
movl %eax, 0x8(%rsi)
movl 0x10(%rbx), %eax
movl %eax, 0xc(%rsi)
movq %r15, %rdi
callq 0xc74a4
movq 0xd0(%rbx), %rdi
movl $0x1, %esi
callq 0x56410
movq (%r14), %rax
movq %rax, 0x34(%rbx)
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpw $0x0, 0xa(%rdi)
jne 0xc4c51
movq %rsi, %r12
movq %rdi, %r14
movq 0x50(%rdi), %rsi
testq %rsi, %rsi
je 0xc4c4f
movq 0x40(%r14), %rdi
xorl %ebx, %ebx
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x56e00
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 0x58d70
addq $0x20, %rsp
movq 0x40(%r14), %rdi
movq %r15, %rsi
callq 0x59030
jmp 0xc4c51
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_O1/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 0xc4d0c
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
addq $0x28, %rdi
callq 0x63296
movq %rsp, %r15
movq %rax, (%r15)
movq %rdx, 0x8(%r15)
leaq 0x60(%rbx), %r14
movq %r14, %rdi
callq 0xc7640
movq %r15, %rdi
movq %rax, %rsi
callq 0x58af0
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
movq %rdx, 0x8(%r15)
movq 0xd0(%rbx), %rdi
callq 0x56e50
movq 0xd0(%rbx), %rdi
movl (%r15), %eax
movl 0x4(%r15), %ecx
cvtsi2sd %eax, %xmm0
cvtsi2sd %ecx, %xmm1
movl 0x8(%r15), %edx
subl %eax, %edx
cvtsi2sd %edx, %xmm2
movl 0xc(%r15), %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm3
callq 0x565a0
movq 0xd0(%rbx), %rdi
callq 0x57b50
movq %r14, %rdi
movq %r15, %rsi
callq 0xc74a4
incw 0xa(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0xc4d59
pushq %rbx
movq %rdi, %rbx
decw %ax
movw %ax, 0xa(%rdi)
jne 0xc4d3b
leaq 0x60(%rbx), %rdi
callq 0xc7640
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x30(%rcx)
leaq 0x60(%rbx), %rdi
movl 0x68(%rbx), %esi
decl %esi
callq 0xc7256
movq 0xd0(%rbx), %rdi
callq 0x57ab0
xorl %eax, %eax
popq %rbx
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0xc50a2
movq %rdi, %rbx
cmpq $0x0, 0xb8(%rdi)
je 0xc50a4
popq %rbx
retq
movq 0x40(%rbx), %rdi
movq 0x50(%rbx), %rsi
movq 0x48(%rbx), %rdx
movl 0xc(%rbx), %ecx
movl 0x10(%rbx), %r8d
callq 0x57860
movq %rax, 0xb8(%rbx)
movq %rax, %rdi
callq 0x58060
movq %rax, 0xc0(%rbx)
movq %rax, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x56410
// File: /workspace/github_c_makefile_star2_O1/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 0xc5114
cmpq $0x0, 0xb8(%rbx)
je 0xc5114
addq $0xb8, %rbx
callq 0x58b80
movq (%rbx), %rdi
callq 0x57630
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xc5268
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rdi, %rbx
addq $0x28, %rdi
callq 0x63272
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
shrq $0x20, %rax
cmpw $0x0, 0xa(%rbx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
jne 0xc51e4
movq %rbx, %rdi
callq 0xc508a
movq 0xc0(%rbx), %rdi
movl 0x8(%r14), %eax
movl $0xff, %ecx
movl %eax, %edx
andl %ecx, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movsd 0x2f1e0(%rip), %xmm3    # 0xf4368
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 0x58030
movq 0xc0(%rbx), %rdi
movsd 0x2f1cc(%rip), %xmm2    # 0xf4388
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movaps %xmm2, %xmm3
callq 0x565a0
movq 0xc0(%rbx), %rdi
callq 0x57d40
movq %rbx, %rdi
callq 0xc50e0
movq 0xd0(%rbx), %rdi
movl 0x8(%r14), %eax
movl $0xff, %ecx
movl %eax, %edx
andl %ecx, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movsd 0x2f161(%rip), %xmm3    # 0xf4368
divsd %xmm3, %xmm0
movl %eax, %edx
shrl $0x8, %edx
andl %ecx, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
divsd %xmm3, %xmm1
shrl $0x10, %eax
andl %ecx, %eax
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
divsd %xmm3, %xmm2
callq 0x58030
movq 0xd0(%rbx), %rdi
movsd 0x2f147(%rip), %xmm2    # 0xf4388
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movaps %xmm2, %xmm3
callq 0x565a0
movq 0xd0(%rbx), %rdi
callq 0x57d40
addq $0x18, %rsp
popq %rbx
popq %r14
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x57980
movq %rbx, %rdi
movl $0xe, %esi
callq 0x580a0
movl $0x1, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x55740
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x57980
movq %rbx, %rdi
movl $0xe, %esi
callq 0x580a0
xorl %edi, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x55740
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpq $0x0, 0x18(%rdi)
jne 0xc791f
movq %rdi, %rbx
cmpl $0x2, %esi
movl $0x1, %r12d
cmovgel %esi, %r12d
movl $0x8, %edi
callq 0x556b0
movq %rax, 0x18(%rbx)
leaq 0x60(%rsp), %r15
xorl %r14d, %r14d
movl $0x98, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x55f20
leaq 0x9f(%rip), %rax        # 0xc7932
movq %rax, (%r15)
movl $0x4, 0x88(%r15)
movl $0xe, %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0x57990
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 0x58640
imulq $0x10624dd3, %r12, %rax # imm = 0x10624DD3
shrq $0x26, %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
imull $0x3e8, %eax, %ecx      # imm = 0x3E8
subl %ecx, %r12d
imull $0xf4240, %r12d, %ecx   # imm = 0xF4240
movq %rcx, 0x18(%rdx)
movq %rax, (%rdx)
movq %rcx, 0x8(%rdx)
movq 0x18(%rbx), %rax
movq (%rax), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x57db0
movl %r14d, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0xc798e
pushq %rbx
movq %rdi, %rbx
movq (%rax), %rdi
callq 0x56860
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xc7982
movl $0x8, %esi
callq 0x55480
movq $0x0, 0x18(%rbx)
xorl %eax, %eax
popq %rbx
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xc7a02
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xa3571(%rip), %rcx     # 0x16af30
movq %rsp, %r14
movq %rcx, (%r14)
movq %rsi, 0x8(%r14)
movl 0x8(%rax), %ebp
testl %ebp, %ebp
jle 0xc79f7
decl %ebp
movq 0x10(%rbx), %rdi
movl %ebp, %esi
callq 0x5b0a4
movq (%rax), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x20(%rax)
testb %al, %al
je 0xc79cc
movq %rbx, %rdi
movl %ebp, %esi
callq 0xb1dae
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rdi, %r14
cmpq $0x0, 0x10(%rdi)
jne 0xc7a5c
movl $0x58, %edi
callq 0x556b0
movq %rax, %r15
movq %rax, %rdi
callq 0x55d90
leaq 0x98da6(%rip), %rax     # 0x1607e0
movq %rax, 0x40(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r15)
leaq 0x98eb3(%rip), %rax     # 0x160900
movq %rax, (%r15)
movq %r15, 0x10(%r14)
movq %r15, %rdi
callq 0x571b0
movq 0x10(%r14), %r14
movl $0x10, %edi
callq 0x556b0
leaq 0xa34bf(%rip), %rcx     # 0x16af30
movq %rcx, (%rax)
movq %rbx, 0x8(%rax)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %r14, %rdi
callq 0x5af08
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x58, %esi
movq %r15, %rdi
callq 0x55480
movq %rbx, %rdi
callq 0x57090
// File: /workspace/github_c_makefile_star2_O1/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 0xb4576
leaq 0xa343e(%rip), %rax     # 0x16af80
movq %rax, (%rbx)
movw $0x1, 0x8(%rbx)
testq %r14, %r14
je 0xc7b5a
movq %r14, 0x10(%rbx)
movb $0x0, 0x18(%rbx)
jmp 0xc7bbb
movl $0x28, %edi
callq 0x556b0
movq %rax, 0x10(%rbx)
movb $0x1, 0x18(%rbx)
leaq 0x4(%rsp), %r14
movq %r14, %rdi
callq 0x584d0
movq %r14, %rdi
movl $0x1, %esi
callq 0x56a50
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x56280
testl %eax, %eax
je 0xc7bb1
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xc7ba9
movl $0x28, %esi
callq 0x55480
movq $0x0, 0x10(%rbx)
leaq 0x4(%rsp), %rdi
callq 0x55ca0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xb4588
movq %r14, %rdi
callq 0x57090
// File: /workspace/github_c_makefile_star2_O1/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 0xb45ea
leaq 0xa32eb(%rip), %rax     # 0x16afd8
movq %rax, (%rbx)
movw $0x1, 0x8(%rbx)
testq %r14, %r14
je 0xc7d1f
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x18(%rbx)
movl 0x20(%r14), %eax
movl %eax, 0x20(%rbx)
movl 0x24(%r14), %eax
movl %eax, 0x24(%rbx)
movb $0x0, 0x28(%rbx)
jmp 0xc7d9d
movl $0x28, %edi
callq 0x556b0
movq %rax, %r14
movq %rax, 0x10(%rbx)
movl $0x30, %edi
callq 0x556b0
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 0x56280
testl %eax, %eax
jne 0xc7d71
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0x56470
testl %eax, %eax
je 0xc7d9d
movq (%r15), %rdi
callq 0x554a0
movq (%r15), %rdi
testq %rdi, %rdi
je 0xc7d83
movl $0x28, %esi
callq 0x55480
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xc7d96
movl $0x30, %esi
callq 0x55480
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 0xb45fc
movq %r14, %rdi
callq 0x57090
nop
// File: /workspace/github_c_makefile_star2_O1/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 0xa3211(%rip), %rax     # 0x16afd8
movq %rax, (%rdi)
cmpb $0x1, 0x28(%rdi)
jne 0xc7e0d
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xc7e0d
callq 0x554a0
movq 0x18(%rbx), %rdi
callq 0x55e50
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xc7dfa
movl $0x28, %esi
callq 0x55480
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xc7e0d
movl $0x30, %esi
callq 0x55480
movq %rbx, %rdi
popq %rbx
jmp 0xb45fc
// File: /workspace/github_c_makefile_star2_O1/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 0xc7e70
movq %rdi, %r14
movq %rbx, %rdi
callq 0x55da0
movl 0x20(%r14), %eax
testl %eax, %eax
jg 0xc7e61
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdi
callq 0x56990
jmp 0xc7e4a
decl %eax
movl %eax, 0x20(%r14)
movq 0x10(%r14), %rdi
callq 0x55c20
testq %rbx, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xc7eaf
callq 0x55da0
movl 0x20(%r14), %eax
testl %eax, %eax
setg %bl
jle 0xc7ea4
decl %eax
movl %eax, 0x20(%r14)
movq 0x10(%r14), %rdi
callq 0x55c20
jmp 0xc7eb1
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0xc7ef8
callq 0x55da0
movl 0x20(%r14), %eax
cmpl 0x24(%r14), %eax
setl %bl
jge 0xc7eed
incl %eax
movl %eax, 0x20(%r14)
movq 0x18(%r14), %rdi
callq 0x57490
movq 0x10(%r14), %rdi
callq 0x55c20
jmp 0xc7efa
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xb465a
leaq 0xa30d2(%rip), %rax     # 0x16b030
movq %rax, (%r14)
leaq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0x56280
movw $0x1, 0x8(%r14)
movq $0x0, 0x48(%r14)
movb $0x0, 0x50(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
testq %rbx, %rbx
je 0xc7f91
movq %rbx, 0x48(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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)
movl $0x8, %edi
callq 0x556b0
movq %rax, 0x48(%r15)
movb $0x1, 0x50(%r15)
leaq 0x1b(%rip), %rdx        # 0xc8040
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rcx
callq 0x58a60
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x55da0
movq 0x48(%r15), %rbx
testq %rbx, %rbx
je 0xc8082
callq 0x57370
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x58f70
testl %eax, %eax
je 0xc809a
movq %r14, %rdi
callq 0x55c20
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb 0x50(%r15), %r12b
movq $0x0, 0x48(%r15)
movq %r14, %rdi
callq 0x55c20
movq (%rbx), %rdi
callq 0x58770
movq (%rbx), %rdi
callq 0x55e60
xorl %ebp, %ebp
cmpb $0x1, %r12b
jne 0xc808f
movl $0x8, %esi
movq %rbx, %rdi
callq 0x55480
jmp 0xc808f
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x55da0
movq 0x48(%r15), %rbx
testq %rbx, %rbx
je 0xc8109
callq 0x57370
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x58f70
testl %eax, %eax
je 0xc8125
movq %r14, %rdi
callq 0x55c20
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb 0x50(%r15), %bpl
movq $0x0, 0x48(%r15)
movq %r14, %rdi
callq 0x55c20
movq (%rbx), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x55f00
cmpb $0x1, %bpl
jne 0xc8117
movl $0x8, %esi
movq %rbx, %rdi
callq 0x55480
jmp 0xc8117
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x55da0
movq 0x48(%r15), %rbx
testq %rbx, %rbx
je 0xc81c8
callq 0x57370
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x58f70
testl %eax, %eax
je 0xc81c8
movb 0x50(%r15), %bpl
movq $0x0, 0x48(%r15)
movq %r14, %rdi
callq 0x55c20
movq (%rbx), %rdi
callq 0x55e60
cmpb $0x1, %bpl
jne 0xc81da
movl $0x8, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x55480
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x55c20
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0xa3f3b(%rip), %rdi     # 0x16c330
callq 0x566e0
movl $0x0, 0x30(%rax)
testq %rbx, %rbx
je 0xc850b
leaq 0x38(%rax), %rdx
movl $0x80, %esi
xorl %edi, %edi
movq %rdx, 0x8(%rsp)
callq 0x55fd0
movl %eax, 0x4(%rsp)
movb $0x1, (%rbx)
movw $0x0, 0x2(%rbx)
movq $0x0, 0x8(%rbx)
leaq 0x10(%rsp), %r12
leaq 0x4c5a6(%rip), %r13     # 0x1149ec
xorl %ebp, %ebp
xorl %r14d, %r14d
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 %r14w, %r15d
cmpl $0x3ff, %r15d           # imm = 0x3FF
ja 0xc849d
movl $0x1, %eax
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 0x57390
testw %r14w, %r14w
je 0xc84b6
testl %eax, %eax
jne 0xc84f1
movl $0x2, %edi
movq %r13, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0xcaa16
incl %r14d
movzwl %r14w, %esi
movq %rbx, %rdi
callq 0xc8531
imulq $0x580, %r15, %rdi      # imm = 0x580
addq 0x8(%rbx), %rdi
callq 0xc8243
testl %ebp, %ebp
cmovel %eax, %ebp
jmp 0xc844b
cmpl $0x0, 0x4(%rsp)
jne 0xc851d
movl $0x80, %esi
xorl %edi, %edi
movq 0x8(%rsp), %rdx
callq 0x57390
jmp 0xc851d
leaq 0x30(%rax), %rax
movl $0xfffffff4, (%rax)     # imm = 0xFFFFFFF4
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
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_O1/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 0xc85de
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movzwl 0x2(%rdi), %edx
cmpw %r14w, %dx
ja 0xc85d9
leaq 0x4c9f4(%rip), %rsi     # 0x114f4d
movl $0x3, %edi
movl %r14d, %ecx
xorl %eax, %eax
callq 0xcaa16
movq 0x8(%rbx), %rdi
movzwl %r14w, %eax
imulq $0x580, %rax, %rsi      # imm = 0x580
callq 0x553d0
testq %rax, %rax
je 0xc85c3
movq %rax, %r15
movzwl 0x2(%rbx), %eax
cmpw %r14w, %ax
jae 0xc85b8
imulq $0x580, %rax, %rcx      # imm = 0x580
movq %r15, %rdi
addq %rcx, %rdi
notl %eax
addl %r14d, %eax
movzwl %ax, %eax
imulq $0x580, %rax, %rdx      # imm = 0x580
addq $0x580, %rdx            # imm = 0x580
xorl %esi, %esi
callq 0x55f20
movw %r14w, 0x2(%rbx)
movq %r15, 0x8(%rbx)
jmp 0xc85d9
leaq 0xa3d66(%rip), %rdi     # 0x16c330
callq 0x566e0
movl $0xfffffffd, 0x30(%rax) # imm = 0xFFFFFFFD
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xca57e
cmpl $0x1, %eax
je 0xca14f
testl %eax, %eax
je 0xca145
xorl %ebx, %ebx
cmpl $-0x1, %eax
jne 0xca159
leaq 0xa21fe(%rip), %rdi     # 0x16c330
callq 0x566e0
movl $0xfffffff9, 0x30(%rax) # imm = 0xFFFFFFF9
xorl %ebx, %ebx
jmp 0xca195
movq %rbx, %rdi
callq 0xcd89a
jmp 0xca157
movq %rbx, %rdi
callq 0xcc268
movl %eax, %ebx
movl $0x8, %eax
leaq 0xa0f4b(%rip), %rcx     # 0x16b0b0
leaq 0x48718(%rip), %rdx     # 0x112884
cmpl %ebx, -0x8(%rax,%rcx)
je 0xca17e
addq $0x10, %rax
cmpq $0x38, %rax
jne 0xca16c
jmp 0xca182
movq (%rax,%rcx), %rdx
leaq 0x4b326(%rip), %rsi     # 0x1154af
movl $0x3, %edi
xorl %eax, %eax
callq 0xcaa16
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: update_core_instances
static void update_core_instances(struct internal_core_instances_t* cores,
                                   struct internal_apic_info_t* apic_info)
{
	uint32_t core_id_index = 0;

	core_id_index = apic_info->core_id % CORES_HTABLE_SIZE;
	if ((cores->htable[core_id_index].core_id == 0) || (cores->htable[core_id_index].core_id == apic_info->core_id)) {
		if (cores->htable[core_id_index].num_logical_cpu == 0)
			cores->instances++;
		cores->htable[core_id_index].core_id = apic_info->core_id;
		cores->htable[core_id_index].num_logical_cpu++;
	}
	else {
		warnf("update_core_instances: collision at index %u (core ID is %i, not %i)\n",
			core_id_index, cores->htable[core_id_index].core_id, apic_info->core_id);
	}
}

// Assembly:
movl 0x8(%rsi), %ecx
leal 0xff(%rcx), %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
andl $0xffffff00, %eax       # imm = 0xFFFFFF00
movl %ecx, %esi
subl %eax, %esi
movl 0x8(%rdi,%rsi,8), %edx
testl %edx, %edx
setne %al
cmpl %ecx, %edx
setne %r8b
testb %r8b, %al
jne 0xca1e0
movzwl 0x4(%rdi,%rsi,8), %eax
testw %ax, %ax
jne 0xca1d4
incb (%rdi)
movl %ecx, 0x8(%rdi,%rsi,8)
incl %eax
movw %ax, 0x4(%rdi,%rsi,8)
retq
leaq 0x4b393(%rip), %rdi     # 0x11557a
xorl %eax, %eax
jmp 0xca95e