LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/nouveau.c
// Function: renderer_fill_rectangle
void
renderer_fill_rectangle(struct wld_renderer *base, uint32_t color,
                        int32_t x, int32_t y,
                        uint32_t width, uint32_t height)
{
	struct nouveau_renderer *renderer = nouveau_renderer(base);
	struct nouveau_buffer *dst = renderer->target;
	uint32_t format;

	if (!ensure_space(renderer->pushbuf, 18))
		return;

	format = nvc0_format(dst->base.base.format);

	nouveau_bufctx_reset(renderer->bufctx, 0);
	nvc0_2d_use_buffer(renderer, dst, G80_2D_DST_FORMAT, format);
	nvc0_2d(renderer->pushbuf, G80_2D_DRAW_SHAPE, 3,
	        G80_2D_DRAW_SHAPE_RECTANGLES, format, color);
	nouveau_pushbuf_bufctx(renderer->pushbuf, renderer->bufctx);

	if (nouveau_pushbuf_validate(renderer->pushbuf) != 0)
		return;

	nvc0_2d(renderer->pushbuf, G80_2D_DRAW_POINT32_X(0), 4,
	        x, y, x + width, y + height);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r14d
movl %r8d, %ebx
movl %ecx, %r15d
movl %edx, %r13d
movq %rsi, 0x10(%rsp)
movq %rdi, %r12
callq 0xc79d
movq 0x18(%r12), %rdi
movq 0x30(%r12), %rbp
pushq $0x12
popq %rsi
callq 0xc021
testb %al, %al
je 0xc232
movl 0x14(%rbp), %eax
xorl %ecx, %ecx
cmpl $0x34325241, %eax       # imm = 0x34325241
movl $0xcf, %edx
cmovnel %ecx, %edx
cmpl $0x34325258, %eax       # imm = 0x34325258
movl %r13d, 0xc(%rsp)
movq %r14, %r13
movq %rbx, %r14
movl %r15d, %ebx
movl $0xe6, %r15d
cmovnel %edx, %r15d
movq 0x20(%r12), %rdi
xorl %esi, %esi
callq 0x9110
movq %r12, %rdi
movq %rbp, %rsi
movl $0x200, %edx            # imm = 0x200
movl %r15d, %ecx
callq 0xc7cb
movq 0x18(%r12), %rdi
subq $0x8, %rsp
pushq $0x3
popq %rcx
pushq $0x4
popq %r8
xorl %esi, %esi
movl $0x580, %edx            # imm = 0x580
movl %r15d, %r9d
movl %ebx, %ebp
movq %r14, %rbx
movl 0x14(%rsp), %r15d
xorl %eax, %eax
pushq 0x18(%rsp)
callq 0xc04a
popq %rax
popq %rcx
movq 0x18(%r12), %rdi
movq 0x20(%r12), %rsi
callq 0x92d0
movq 0x18(%r12), %rdi
callq 0x9460
testl %eax, %eax
je 0xc241
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%r12), %rdi
addl %r15d, %ebx
addl %ebp, %r13d
pushq $0x4
popq %rcx
xorl %esi, %esi
movl $0x600, %edx            # imm = 0x600
movl %r15d, %r8d
movl %ebp, %r9d
xorl %eax, %eax
pushq %r13
pushq %rbx
callq 0xc04a
addq $0x28, %rsp
jmp 0xc236
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/nouveau.c
// Function: renderer_destroy
void
renderer_destroy(struct wld_renderer *base)
{
	struct nouveau_renderer *renderer = nouveau_renderer(base);

	nvc0_2d_finalize(renderer);
	nouveau_bufctx_del(&renderer->bufctx);
	nouveau_pushbuf_del(&renderer->pushbuf);
	nouveau_object_del(&renderer->channel);
	free(renderer);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0xc79d
leaq 0x28(%rbx), %rdi
callq 0x93d0
leaq 0x20(%rbx), %rdi
callq 0x9700
leaq 0x18(%rbx), %rdi
callq 0x9550
leaq 0x10(%rbx), %rdi
callq 0x93d0
movq %rbx, %rdi
popq %rbx
jmp 0x9060
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/nouveau.c
// Function: buffer_map
bool
buffer_map(struct buffer *base)
{
	struct nouveau_buffer *buffer = nouveau_buffer(&base->base);

	/* If the buffer is tiled, it cannot be mapped into virtual memory in order
	 * to appear linear like intel can do with map_gtt. */
	if (buffer->bo->config.nvc0.tile_mode)
		return false;

	if (nouveau_bo_map(buffer->bo, NOUVEAU_BO_WR,
	                   buffer->context->client)
	    != 0) {
		return false;
	}

	buffer->base.base.map = buffer->bo->map;

	return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0xc76f
movq 0x68(%rbx), %rdi
cmpl $0x0, 0x34(%rdi)
jne 0xc709
movq 0x60(%rbx), %rax
movq 0x10(%rax), %rdx
movl $0x200, %esi            # imm = 0x200
callq 0x96c0
testl %eax, %eax
je 0xc70d
xorl %eax, %eax
popq %rbx
retq
movq 0x68(%rbx), %rax
movq 0x28(%rax), %rax
movq %rax, 0x30(%rbx)
movb $0x1, %al
jmp 0xc70b
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/nouveau.c
// Function: buffer_unmap
bool
buffer_unmap(struct buffer *base)
{
	struct nouveau_buffer *buffer = nouveau_buffer(&base->base);

	if (munmap(buffer->bo->map, buffer->bo->size) == -1)
		return false;

	buffer->bo->map = NULL;
	base->base.map = NULL;

	return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0xc76f
movq 0x68(%rbx), %rax
movq 0x10(%rax), %rsi
movq 0x28(%rax), %rdi
callq 0x9630
cmpl $-0x1, %eax
je 0xc74a
movq 0x68(%rbx), %rcx
andq $0x0, 0x28(%rcx)
andq $0x0, 0x30(%rbx)
cmpl $-0x1, %eax
setne %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/nouveau.c
// Function: nvc0_2d_use_buffer
static inline void
nvc0_2d_use_buffer(struct nouveau_renderer *renderer,
                   struct nouveau_buffer *buffer,
                   uint16_t format_method, uint16_t format)
{
	uint32_t access = format == G80_2D_SRC_FORMAT ? NOUVEAU_BO_RD
	                                              : NOUVEAU_BO_WR;

	nvc0_2d_inline(renderer->pushbuf, format_method, format);

	if (buffer->bo->config.nvc0.memtype) {
		nvc0_2d(renderer->pushbuf, format_method + 0x04, 2,
		        0, buffer->bo->config.nvc0.tile_mode);
	} else {
		nvc0_2d_inline(renderer->pushbuf, format_method + 0x04, 1);
		nvc0_2d(renderer->pushbuf, format_method + 0x14, 1,
		        buffer->base.base.pitch);
	}

	nvc0_2d(renderer->pushbuf, format_method + 0x18, 4,
	        buffer->base.base.width, buffer->base.base.height,
	        buffer->bo->offset >> 32, buffer->bo->offset);
	nouveau_bufctx_refn(renderer->bufctx, 0, buffer->bo,
	                    NOUVEAU_BO_VRAM | access);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
shll $0x10, %ecx
shrl $0x2, %edx
orl %ecx, %edx
orl $0x80006000, %edx       # imm = 0x80006000
movq 0x30(%rdi), %rax
leaq 0x4(%rax), %rcx
movq %rcx, 0x30(%rdi)
movl %edx, (%rax)
movq 0x68(%rsi), %rdx
movl %r15d, %ecx
addl $0x4, %ecx
cmpl $0x0, 0x30(%rdx)
je 0xc821
movl 0x34(%rdx), %r9d
movzwl %cx, %edx
pushq $0x2
popq %rcx
xorl %esi, %esi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xc04a
jmp 0xc84f
movzwl %cx, %ecx
shrl $0x2, %ecx
orl $0x80016000, %ecx       # imm = 0x80016000
leaq 0x8(%rax), %rdx
movq %rdx, 0x30(%rdi)
movl %ecx, 0x4(%rax)
leal 0x14(%r15), %eax
movl 0x10(%rbx), %r8d
movzwl %ax, %edx
pushq $0x1
popq %rcx
xorl %esi, %esi
xorl %eax, %eax
callq 0xc04a
movq 0x18(%r14), %rdi
leal 0x18(%r15), %eax
movl 0x8(%rbx), %r8d
movl 0xc(%rbx), %r9d
movq 0x68(%rbx), %rcx
movq 0x20(%rcx), %r10
movq %r10, %r11
shrq $0x20, %r11
movzwl %ax, %edx
pushq $0x4
popq %rcx
xorl %esi, %esi
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0xc04a
popq %rax
popq %rcx
movq 0x20(%r14), %rdi
movq 0x68(%rbx), %rdx
xorl %esi, %esi
movl $0x201, %ecx            # imm = 0x201
popq %rbx
popq %r14
popq %r15
jmp 0x95c0
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/nouveau.c
// Function: new_buffer
static struct nouveau_buffer *
new_buffer(struct nouveau_context *context,
           uint32_t width, uint32_t height,
           uint32_t format, uint32_t pitch)
{
	struct nouveau_buffer *buffer;

	if (!(buffer = malloc(sizeof *buffer)))
		return NULL;

	buffer_initialize(&buffer->base, &wld_buffer_impl,
	                  width, height, format, pitch);
	buffer->context = context;
	buffer->exporter.export = &export;
	wld_buffer_add_exporter(&buffer->base.base, &buffer->exporter);

	return buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %r14
pushq $0x70
popq %rdi
callq 0x9570
movq %rax, %rbx
testq %rax, %rax
je 0xc8ff
leaq 0xc20b(%rip), %rsi      # 0x18ad8
movq %rbx, %rdi
movl %r13d, %edx
movl %r12d, %ecx
movl %r15d, %r8d
movl %ebp, %r9d
callq 0x998c
movq %r14, 0x60(%rbx)
movq %rbx, %rsi
addq $0x50, %rsi
leaq 0x1e(%rip), %rax        # 0xc911
movq %rax, 0x50(%rbx)
movq %rbx, %rdi
callq 0x97f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/nouveau.c
// Function: export
static bool export(struct wld_exporter *exporter, struct wld_buffer *base,
                   uint32_t type, union wld_object *object)
{
	struct nouveau_buffer *buffer = nouveau_buffer(base);

	switch (type) {
	case WLD_DRM_OBJECT_HANDLE:
		object->u32 = buffer->bo->handle;
		return true;
	case WLD_DRM_OBJECT_PRIME_FD:
		if (nouveau_bo_set_prime(buffer->bo, &object->i) != 0)
			return false;
		return true;
	default:
		return false;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rsi, %rdi
callq 0xc76f
cmpl $0x2000001, %ebp        # imm = 0x2000001
je 0xc942
cmpl $0x2000000, %ebp        # imm = 0x2000000
jne 0xc955
movq 0x68(%r14), %rax
movl 0x8(%rax), %eax
movl %eax, (%rbx)
movb $0x1, %al
jmp 0xc957
movq 0x68(%r14), %rdi
movq %rbx, %rsi
callq 0x96e0
testl %eax, %eax
sete %al
jmp 0xc957
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/pixman.c
// Function: context_create_renderer
struct wld_renderer *
context_create_renderer(struct wld_context *context)
{
	struct pixman_renderer *renderer;

	if (!(renderer = malloc(sizeof *renderer)))
		goto error0;

	if (!(renderer->glyph_cache = pixman_glyph_cache_create()))
		goto error1;

	renderer_initialize(&renderer->base, &wld_renderer_impl);
	renderer->target = NULL;

	return &renderer->base;

error1:
	free(renderer);
error0:
	return NULL;
}

// Assembly:
pushq %rbx
pushq $0x20
popq %rdi
callq 0x9570
testq %rax, %rax
je 0xc9e1
movq %rax, %rbx
callq 0x9720
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0xc9d9
leaq 0xc14e(%rip), %rsi      # 0x18b18
movq %rbx, %rdi
callq 0xa397
andq $0x0, 0x10(%rbx)
jmp 0xc9e3
movq %rbx, %rdi
callq 0x9060
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/pixman.c
// Function: context_create_buffer
struct buffer *
context_create_buffer(struct wld_context *context,
                      uint32_t width, uint32_t height,
                      uint32_t format, uint32_t flags)
{
	struct buffer *buffer;
	pixman_image_t *image;

	image = pixman_image_create_bits(format_wld_to_pixman(format),
	                                 width, height, NULL, 0);

	if (!image)
		goto error0;

	if (!(buffer = new_buffer(image)))
		goto error1;

	return buffer;

error1:
	pixman_image_unref(image);
error0:
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpl $0x34325258, %ecx       # imm = 0x34325258
movl $0x20020888, %eax       # imm = 0x20020888
cmovnel %ebx, %eax
cmpl $0x34325241, %ecx       # imm = 0x34325241
movl $0x20028888, %edi       # imm = 0x20028888
cmovnel %eax, %edi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x9670
testq %rax, %rax
je 0xca36
movq %rax, %r14
movq %rax, %rdi
callq 0xd1e8
movq %rax, %rbx
testq %rax, %rax
jne 0xca36
movq %r14, %rdi
callq 0x93e0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/pixman.c
// Function: context_import_buffer
struct buffer *
context_import_buffer(struct wld_context *context,
                      uint32_t type, union wld_object object,
                      uint32_t width, uint32_t height,
                      uint32_t format, uint32_t pitch)
{
	struct buffer *buffer;
	pixman_image_t *image;

	switch (type) {
	case WLD_OBJECT_DATA:
		image = pixman_image_create_bits(format_wld_to_pixman(format),
		                                 width, height, object.ptr, pitch);
		break;
	default:
		image = NULL;
	}

	if (!image)
		goto error0;

	if (!(buffer = new_buffer(image)))
		goto error1;

	return buffer;

error1:
	pixman_image_unref(image);
error0:
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testl %esi, %esi
je 0xca56
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdx, %rax
movl 0x20(%rsp), %r10d
cmpl $0x34325258, %r9d       # imm = 0x34325258
movl $0x20020888, %edx       # imm = 0x20020888
cmovnel %ebx, %edx
cmpl $0x34325241, %r9d       # imm = 0x34325241
movl $0x20028888, %edi       # imm = 0x20028888
cmovnel %edx, %edi
movl %ecx, %esi
movl %r8d, %edx
movq %rax, %rcx
movl %r10d, %r8d
callq 0x9670
testq %rax, %rax
je 0xca4b
movq %rax, %r14
movq %rax, %rdi
callq 0xd1e8
movq %rax, %rbx
testq %rax, %rax
jne 0xca4b
movq %r14, %rdi
callq 0x93e0
xorl %ebx, %ebx
jmp 0xca4b
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/pixman.c
// Function: renderer_set_target
bool
renderer_set_target(struct wld_renderer *base, struct buffer *buffer)
{
	struct pixman_renderer *renderer = pixman_renderer(base);

	if (renderer->target)
		pixman_image_unref(renderer->target);

	if (buffer)
		return (renderer->target = pixman_image(buffer));

	renderer->target = NULL;
	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0xd048
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xcad2
callq 0x93e0
testq %r14, %r14
je 0xcae7
movq %r14, %rdi
callq 0xd076
testq %rax, %rax
setne %cl
jmp 0xcaeb
movb $0x1, %cl
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/pixman.c
// Function: renderer_fill_rectangle
void
renderer_fill_rectangle(struct wld_renderer *base, uint32_t color,
                        int32_t x, int32_t y,
                        uint32_t width, uint32_t height)
{
	struct pixman_renderer *renderer = pixman_renderer(base);
	pixman_color_t pixman_color = PIXMAN_COLOR(color);
	pixman_box32_t box = { x, y, x + width, y + height };

	pixman_image_fill_boxes(PIXMAN_OP_SRC, renderer->target,
	                        &pixman_color, 1, &box);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r13d
movl %r8d, %r15d
movl %ecx, %ebp
movl %edx, %r12d
movl %esi, %ebx
movq %rdi, %r14
callq 0xd048
movl %ebx, %eax
shrl $0x10, %eax
movl $0xff, %ecx
andl %ecx, %eax
movzbl %bh, %edx
andl %ebx, %ecx
shrl $0x18, %ebx
movd %eax, %xmm0
pinsrw $0x1, %edx, %xmm0
pinsrw $0x2, %ecx, %xmm0
pinsrw $0x3, %ebx, %xmm0
pmullw 0x4985(%rip), %xmm0     # 0x114d0
movq %rsp, %rdx
movq %xmm0, (%rdx)
leaq 0x8(%rsp), %r8
movl %r12d, (%r8)
movl %ebp, 0x4(%r8)
addl %r12d, %r15d
movl %r15d, 0x8(%r8)
addl %ebp, %r13d
movl %r13d, 0xc(%r8)
movq 0x10(%r14), %rsi
pushq $0x1
popq %rcx
movl %ecx, %edi
callq 0x9580
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/pixman.c
// Function: renderer_fill_region
void
renderer_fill_region(struct wld_renderer *base, uint32_t color,
                     pixman_region32_t *region)
{
	struct pixman_renderer *renderer = pixman_renderer(base);
	pixman_color_t pixman_color = PIXMAN_COLOR(color);
	pixman_box32_t *boxes;
	int num_boxes;

	boxes = pixman_region32_rectangles(region, &num_boxes);
	pixman_image_fill_boxes(PIXMAN_OP_SRC, renderer->target,
	                        &pixman_color, num_boxes, boxes);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r13
callq 0xd048
movl %ebx, %eax
shrl $0x10, %eax
movl $0xff, %ecx
andl %ecx, %eax
movzbl %bh, %edx
andl %ebx, %ecx
shrl $0x18, %ebx
movd %eax, %xmm0
pinsrw $0x1, %edx, %xmm0
pinsrw $0x2, %ecx, %xmm0
pinsrw $0x3, %ebx, %xmm0
pmullw 0x48fe(%rip), %xmm0     # 0x114d0
leaq 0x8(%rsp), %r15
movq %xmm0, (%r15)
leaq 0x4(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x93b0
movq 0x10(%r13), %rsi
movl (%r12), %ecx
pushq $0x1
popq %rdi
movq %r15, %rdx
movq %rax, %r8
callq 0x9580
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/pixman.c
// Function: renderer_copy_rectangle
void
renderer_copy_rectangle(struct wld_renderer *base, struct buffer *buffer,
                        int32_t dst_x, int32_t dst_y,
                        int32_t src_x, int32_t src_y,
                        uint32_t width, uint32_t height)
{
	struct pixman_renderer *renderer = pixman_renderer(base);
	pixman_image_t *src = pixman_image(buffer), *dst = renderer->target;

	if (!src)
		return;

	pixman_image_composite32(PIXMAN_OP_SRC, src, NULL, dst,
	                         src_x, src_y, 0, 0, dst_x, dst_y, width, height);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r15d
movl %edx, %r14d
movq %rsi, %r13
movq %rdi, %r12
callq 0xd048
movq %r13, %rdi
callq 0xd076
testq %rax, %rax
je 0xcc7d
movl 0x78(%rsp), %edx
movl 0x70(%rsp), %esi
movq 0x10(%r12), %rcx
movl %edx, 0x28(%rsp)
movl %esi, 0x20(%rsp)
andl $0x0, 0x8(%rsp)
movl %r15d, 0x18(%rsp)
andl $0x0, (%rsp)
movl %r14d, 0x10(%rsp)
pushq $0x1
popq %rdi
movq %rax, %rsi
xorl %edx, %edx
movl %ebp, %r8d
movl %ebx, %r9d
callq 0x9120
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/pixman.c
// Function: renderer_copy_region
void
renderer_copy_region(struct wld_renderer *base, struct buffer *buffer,
                     int32_t dst_x, int32_t dst_y,
                     pixman_region32_t *region)
{
	struct pixman_renderer *renderer = pixman_renderer(base);
	pixman_image_t *src = pixman_image(buffer), *dst = renderer->target;
	pixman_region32_t clip;

	if (!src)
		return;

	pixman_region32_init(&clip);
	pixman_region32_copy(&clip, region);
	pixman_region32_translate(&clip, dst_x, dst_y);

	pixman_image_set_clip_region32(dst, &clip);
	pixman_image_composite32(PIXMAN_OP_SRC, src, NULL, dst,
	                         region->extents.x1, region->extents.y1, 0, 0,
	                         region->extents.x1 + dst_x,
	                         region->extents.y1 + dst_y,
	                         region->extents.x2 - region->extents.x1,
	                         region->extents.y2 - region->extents.y1);
	pixman_image_set_clip_region32(dst, NULL);

	pixman_region32_fini(&clip);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r13
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
callq 0xd048
movq %r15, %rdi
callq 0xd076
testq %rax, %rax
je 0xcd4a
movq %rax, %r12
movq 0x10(%r14), %r15
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x9230
movq %r14, %rdi
movq %r13, %rsi
callq 0x92c0
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x95e0
movq %r15, %rdi
movq %r14, %rsi
callq 0x9410
movl (%r13), %r8d
movl 0x4(%r13), %r9d
addl %r8d, %ebx
addl %r9d, %ebp
movl 0x8(%r13), %eax
subl %r8d, %eax
movl 0xc(%r13), %ecx
subl %r9d, %ecx
movl %ecx, 0x28(%rsp)
movl %eax, 0x20(%rsp)
andl $0x0, 0x8(%rsp)
movl %ebp, 0x18(%rsp)
andl $0x0, (%rsp)
movl %ebx, 0x10(%rsp)
pushq $0x1
popq %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x9120
movq %r15, %rdi
xorl %esi, %esi
callq 0x9410
movq %r14, %rdi
callq 0x9130
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/pixman.c
// Function: pixman_image
static pixman_image_t *
pixman_image(struct buffer *buffer)
{
	if (buffer->base.impl == &wld_buffer_impl)
		return pixman_image_ref(pixman_buffer(&buffer->base)->image);

	union wld_object object;

	if (wld_export(&buffer->base, WLD_PIXMAN_OBJECT_IMAGE, &object))
		return object.ptr;

	struct pixman_map *map;
	pixman_image_t *image;

	if (!wld_map(&buffer->base))
		goto error0;

	image = pixman_image_create_bits(format_wld_to_pixman(buffer->base.format),
	                                 buffer->base.width, buffer->base.height,
	                                 buffer->base.map, buffer->base.pitch);

	if (!image)
		goto error1;

	if (!(map = malloc(sizeof *map)))
		goto error2;

	map->image = image;
	map->exporter.export = &map_export;
	wld_buffer_add_exporter(&buffer->base, &map->exporter);
	map->destructor.destroy = &map_destroy;
	wld_buffer_add_destructor(&buffer->base, &map->destructor);
	pixman_image_set_destroy_function(image, &destroy_image, buffer);

	return pixman_image_ref(image);

error2:
	pixman_image_unref(image);
error1:
	wld_unmap(&buffer->base);
error0:
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xbad7(%rip), %rax      # 0x18b60
cmpq %rax, (%rdi)
je 0xd0ae
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x1000000, %esi        # imm = 0x1000000
callq 0x9890
testb %al, %al
je 0xd0c8
movq 0x8(%rsp), %rax
jmp 0xd187
movq %rbx, %rdi
callq 0xd191
movq 0x50(%rbx), %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x94f0
movq %rbx, %rdi
callq 0x91a0
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
je 0xd187
movl 0x14(%rbx), %ecx
cmpl $0x34325258, %ecx       # imm = 0x34325258
movl $0x20020888, %edx       # imm = 0x20020888
cmovel %edx, %eax
cmpl $0x34325241, %ecx       # imm = 0x34325241
movl $0x20028888, %edi       # imm = 0x20028888
cmovnel %eax, %edi
movl 0x8(%rbx), %esi
movl 0xc(%rbx), %edx
movq 0x30(%rbx), %rcx
movl 0x10(%rbx), %r8d
callq 0x9670
testq %rax, %rax
je 0xd17d
movq %rax, %r14
pushq $0x28
popq %rdi
callq 0x9570
testq %rax, %rax
je 0xd175
movq %rax, %r15
movq %r14, 0x20(%rax)
leaq -0x7d5(%rip), %rax      # 0xc95c
movq %rax, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x97f0
movq %r15, %rsi
addq $0x10, %rsi
leaq -0x7c3(%rip), %rax      # 0xc98a
movq %rax, 0x10(%r15)
movq %rbx, %rdi
callq 0x96f0
leaq 0x5f(%rip), %rsi        # 0xd1bf
movq %r14, %rdi
movq %rbx, %rdx
callq 0x9870
movq %r14, %rdi
callq 0x94f0
jmp 0xd187
movq %r14, %rdi
callq 0x93e0
movq %rbx, %rdi
callq 0x9140
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/pixman.c
// Function: new_buffer
static struct buffer *
new_buffer(pixman_image_t *image)
{
	struct pixman_buffer *buffer;

	if (!(buffer = malloc(sizeof *buffer)))
		return NULL;

	buffer_initialize(&buffer->base, &wld_buffer_impl,
	                  pixman_image_get_width(image),
	                  pixman_image_get_height(image),
	                  format_pixman_to_wld(pixman_image_get_format(image)),
	                  pixman_image_get_stride(image));
	buffer->base.base.map = pixman_image_get_data(image);
	buffer->image = image;

	return &buffer->base;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x58
popq %rdi
callq 0x9570
movq %rax, %r14
testq %rax, %rax
je 0xd270
movq %rbx, %rdi
callq 0x9430
movl %eax, %ebp
movq %rbx, %rdi
callq 0x9470
movl %eax, %r15d
movq %rbx, %rdi
callq 0x9180
xorl %ecx, %ecx
cmpl $0x20020888, %eax       # imm = 0x20020888
movl $0x34325258, %edx       # imm = 0x34325258
cmovnel %ecx, %edx
cmpl $0x20028888, %eax       # imm = 0x20028888
movl $0x34325241, %r12d      # imm = 0x34325241
cmovnel %edx, %r12d
movq %rbx, %rdi
callq 0x9510
leaq 0xb913(%rip), %rsi      # 0x18b60
movq %r14, %rdi
movl %ebp, %edx
movl %r15d, %ecx
movl %r12d, %r8d
movl %eax, %r9d
callq 0x998c
movq %rbx, %rdi
callq 0x97a0
movq %rax, 0x30(%r14)
movq %rbx, 0x50(%r14)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/wayland.c
// Function: interface_id
enum wld_wayland_interface_id
interface_id(const char *string)
{
	if (strcmp(string, "drm") == 0)
		return WLD_DRM;
	if (strcmp(string, "shm") == 0)
		return WLD_SHM;

	fprintf(stderr, "Unknown Wayland interface specified: '%s'\n", string);

	return WLD_NONE;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x4563(%rip), %rsi      # 0x117ea
callq 0x9450
testl %eax, %eax
je 0xd2a8
leaq 0x44c5(%rip), %rsi      # 0x1175c
movq %rbx, %rdi
callq 0x9450
testl %eax, %eax
jne 0xd2ac
pushq $0x1
popq %rax
jmp 0xd2aa
xorl %eax, %eax
popq %rbx
retq
movq 0xbd3d(%rip), %rax      # 0x18ff0
movq (%rax), %rdi
leaq 0x42a4(%rip), %rsi      # 0x11561
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9480
pushq $-0x2
jmp 0xd2a5
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/wayland.c
// Function: wld_wayland_create_surface
wld_surface *
wld_wayland_create_surface(struct wld_context *context,
                           uint32_t width, uint32_t height,
                           uint32_t format, uint32_t flags,
                           struct wl_surface *wl)
{
	struct wayland_buffer_socket *socket;

	if (!(socket = malloc(sizeof *socket)))
		goto error0;

	socket->base.impl = &buffer_socket_impl;
	socket->listener.release = &buffer_release;
	socket->wl = wl;
	socket->queue = ((struct wayland_context *)context)->queue;
	socket->display = ((struct wayland_context *)context)->display;
	socket->surface = buffered_surface_create(context, width, height, format,
	                                          flags, &socket->base);

	if (!socket->surface)
		goto error1;

	return socket->surface;

error1:
	free(socket);
error0:
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r13
movl %r8d, 0x4(%rsp)
movl %ecx, %r14d
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbp
pushq $0x30
popq %rdi
callq 0x9570
testq %rax, %rax
je 0xd52b
movq %rax, %rbx
leaq 0xb6a9(%rip), %rax      # 0x18b90
movq %rax, (%rbx)
leaq 0x4b(%rip), %rax        # 0xd53c
movq %rax, 0x8(%rbx)
movq %r13, 0x18(%rbx)
movups 0x10(%rbp), %xmm0
movups %xmm0, 0x20(%rbx)
movq %rbp, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl %r14d, %ecx
movl 0x4(%rsp), %r8d
movq %rbx, %r9
callq 0x9ad4
movq %rax, 0x10(%rbx)
testq %rax, %rax
jne 0xd52d
movq %rbx, %rdi
callq 0x9060
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/wayland.c
// Function: wayland_buffer_add_exporter
bool
wayland_buffer_add_exporter(struct buffer *buffer, struct wl_buffer *wl)
{
	struct wayland_buffer *wayland_buffer;

	if (!(wayland_buffer = malloc(sizeof *wayland_buffer)))
		return false;

	wayland_buffer->wl = wl;
	wayland_buffer->exporter.export = &buffer_export;
	wld_buffer_add_exporter(&buffer->base, &wayland_buffer->exporter);
	wayland_buffer->destructor.destroy = &buffer_destroy;
	wld_buffer_add_destructor(&buffer->base, &wayland_buffer->destructor);

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x28
popq %rdi
callq 0x9570
movq %rax, %r14
testq %rax, %rax
je 0xd5aa
movq %r15, 0x20(%r14)
leaq 0x31(%rip), %rax        # 0xd5b6
movq %rax, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x97f0
leaq 0x10(%r14), %rsi
leaq 0x31(%rip), %rax        # 0xd5cf
movq %rax, 0x10(%r14)
movq %rbx, %rdi
callq 0x96f0
testq %r14, %r14
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/wayland.c
// Function: buffer_socket_attach
bool
buffer_socket_attach(struct buffer_socket *base, struct buffer *buffer)
{
	struct wayland_buffer_socket *socket = wayland_buffer_socket(base);
	struct wl_buffer *wl;
	union wld_object object;

	if (!wld_export(&buffer->base, WLD_WAYLAND_OBJECT_BUFFER, &object))
		return false;

	wl = object.ptr;

	if (!wl_proxy_get_listener((struct wl_proxy *)wl))
		wl_buffer_add_listener(wl, &socket->listener, buffer);

	wl_surface_attach(socket->wl, wl, 0, 0);

	if (pixman_region32_not_empty(&buffer->base.damage)) {
		pixman_box32_t *box;
		int num_boxes;

		box = pixman_region32_rectangles(&buffer->base.damage, &num_boxes);

		while (num_boxes--) {
			wl_surface_damage(socket->wl, box->x1, box->y1,
			                  box->x2 - box->x1, box->y2 - box->y1);
		}
	}

	wl_surface_commit(socket->wl);

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r15
movq %rdi, 0x20(%rsp)
callq 0xd75f
leaq 0x30(%rsp), %rdx
movq %r15, %rdi
movl $0x3000000, %esi        # imm = 0x3000000
callq 0x9890
testb %al, %al
je 0xd734
movb %al, 0x1f(%rsp)
movq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x91e0
testq %rax, %rax
jne 0xd668
movq 0x20(%rsp), %rax
leaq 0x8(%rax), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x92b0
movq 0x20(%rsp), %rax
movq 0x18(%rax), %r13
movq %r13, %rdi
callq 0x9170
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
pushq $0x1
popq %rsi
movq %r13, %rdi
xorl %edx, %edx
movl %eax, %ecx
xorl %r8d, %r8d
movq %r12, %r9
xorl %eax, %eax
callq 0x9400
addq $0x18, %r15
movq %r15, %rdi
callq 0x91f0
testl %eax, %eax
je 0xd70b
leaq 0x2c(%rsp), %rsi
movq %r15, %rdi
callq 0x93b0
movq %rax, %r15
subl $0x1, 0x2c(%rsp)
jb 0xd70b
movq 0x20(%rsp), %rax
movq 0x18(%rax), %r12
movl (%r15), %r13d
movl 0x4(%r15), %ebx
movl 0x8(%r15), %ebp
subl %r13d, %ebp
movl 0xc(%r15), %r14d
subl %ebx, %r14d
movq %r12, %rdi
callq 0x9170
movl %r14d, 0x10(%rsp)
movl %ebp, 0x8(%rsp)
movl %ebx, (%rsp)
movq %r12, %rdi
pushq $0x2
popq %rsi
xorl %edx, %edx
movl %eax, %ecx
xorl %r8d, %r8d
movl %r13d, %r9d
xorl %eax, %eax
callq 0x9400
jmp 0xd6b9
movq 0x20(%rsp), %rax
movq 0x18(%rax), %r14
movq %r14, %rdi
callq 0x9170
pushq $0x6
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
movl %eax, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x9400
movb 0x1f(%rsp), %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/wayland-shm.c
// Function: wayland_create_context
struct wayland_context *
wayland_create_context(struct wl_display *display,
                       struct wl_event_queue *queue)
{
	struct shm_context *context;

	if (!(context = malloc(sizeof *context)))
		goto error0;

	context_initialize(&context->base.base, &wld_context_impl);
	context->wl = NULL;
	wl_array_init(&context->formats);

	if (!(context->registry = wl_display_get_registry(display))) {
		DEBUG("Couldn't get registry\n");
		goto error1;
	}

	wl_registry_add_listener(context->registry, &registry_listener, context);
	wl_proxy_set_queue((struct wl_proxy *)context->registry, queue);

	/* Wait for wl_shm global. */
	wl_display_roundtrip_queue(display, queue);

	if (!context->wl) {
		DEBUG("No wl_shm global\n");
		goto error2;
	}

	wl_shm_add_listener(context->wl, &shm_listener, context);

	/* Wait for SHM formats. */
	wl_display_roundtrip_queue(display, queue);

	return &context->base;

error2:
	wl_registry_destroy(context->registry);
error1:
	wl_array_release(&context->formats);
	free(context);
error0:
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r12
pushq $0x48
popq %rdi
callq 0x9570
testq %rax, %rax
je 0xd8a9
movq %rax, %rbx
leaq 0xb3ff(%rip), %rsi      # 0x18bb8
movq %rax, %rdi
callq 0x9eb8
andq $0x0, 0x28(%rbx)
movq %rbx, %r14
addq $0x30, %r14
movq %r14, %rdi
callq 0x91c0
movq %r12, %rdi
callq 0x9170
movq 0xb7e4(%rip), %rdx      # 0x18fc8
pushq $0x1
popq %rsi
movq %r12, %rdi
movl %eax, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x9400
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0xd850
leaq 0xb3d7(%rip), %rsi      # 0x18be0
movq %rax, %rdi
movq %rbx, %rdx
callq 0x92b0
movq 0x20(%rbx), %rdi
movq %r15, %rsi
callq 0x97c0
movq %r12, %rdi
movq %r15, %rsi
callq 0x97b0
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0xd871
leaq 0xb3b5(%rip), %rsi      # 0x18bf0
movq %rbx, %rdx
callq 0x92b0
movq %r12, %rdi
movq %r15, %rsi
callq 0x97b0
jmp 0xd8ab
movq 0xb799(%rip), %rax      # 0x18ff0
movq (%rax), %rdi
leaq 0x3e4c(%rip), %rsi      # 0x116ad
leaq 0x3db4(%rip), %rdx      # 0x1161c
xorl %eax, %eax
callq 0x9480
jmp 0xd899
movq 0xb778(%rip), %rax      # 0x18ff0
movq (%rax), %rdi
leaq 0x3e48(%rip), %rsi      # 0x116ca
leaq 0x3d93(%rip), %rdx      # 0x1161c
xorl %eax, %eax
callq 0x9480
movq 0x20(%rbx), %rdi
callq 0x9830
movq %r14, %rdi
callq 0x95a0
movq %rbx, %rdi
callq 0x9060
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/wayland-shm.c
// Function: wayland_has_format
bool
wayland_has_format(struct wld_context *base, uint32_t format)
{
	struct shm_context *context = shm_context(base);
	uint32_t *supported_format;
	uint32_t shm_format = format_wld_to_shm(format);

	wl_array_for_each (supported_format, &context->formats) {
		if (*supported_format == shm_format)
			return true;
	}

	return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0xdb3c
xorl %eax, %eax
cmpl $0x34325258, %ebx       # imm = 0x34325258
sete %al
movq 0x40(%r14), %rsi
movq 0x30(%r14), %rcx
addq %rsi, %rcx
movq %rsi, %rdx
cmpq %rcx, %rsi
jae 0xd8ee
leaq 0x4(%rdx), %rsi
cmpl %eax, (%rdx)
jne 0xd8de
cmpq %rcx, %rdx
setb %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/wayland-shm.c
// Function: context_destroy
void
context_destroy(struct wld_context *base)
{
	struct shm_context *context = shm_context(base);

	wl_shm_destroy(context->wl);
	wl_registry_destroy(context->registry);
	wl_array_release(&context->formats);
	wl_event_queue_destroy(context->base.queue);
	free(context);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0xdb3c
movq 0x28(%rbx), %rdi
callq 0x9830
movq 0x20(%rbx), %rdi
callq 0x9830
leaq 0x30(%rbx), %rdi
callq 0x95a0
movq 0x18(%rbx), %rdi
callq 0x9190
movq %rbx, %rdi
popq %rbx
jmp 0x9060
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/wayland-shm.c
// Function: buffer_map
bool
buffer_map(struct buffer *base)
{
	struct shm_buffer *buffer = shm_buffer(&base->base);
	void *data;

	data = mmap(NULL, buffer->base.base.pitch * buffer->base.base.height,
	            PROT_READ | PROT_WRITE, MAP_SHARED, buffer->fd, 0);

	if (data == MAP_FAILED)
		return false;

	buffer->base.base.map = data;

	return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0xdbe1
movl 0xc(%rbx), %esi
movl 0x50(%rbx), %r8d
imull 0x10(%rbx), %esi
pushq $0x3
popq %rdx
pushq $0x1
popq %rcx
xorl %edi, %edi
xorl %r9d, %r9d
callq 0x9290
cmpq $-0x1, %rax
je 0xdb98
movq %rax, 0x30(%rbx)
cmpq $-0x1, %rax
setne %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/wayland-drm.c
// Function: wayland_has_format
bool
wayland_has_format(struct wld_context *base, uint32_t format)
{
	struct drm_context *context = drm_context(base);
	uint32_t *supported_format;

	wl_array_for_each (supported_format, &context->formats) {
		if (*supported_format == format)
			return true;
	}

	return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0xde70
movq 0x48(%r14), %rdx
movq 0x38(%r14), %rax
addq %rdx, %rax
movq %rdx, %rcx
cmpq %rax, %rdx
jae 0xde54
leaq 0x4(%rcx), %rdx
cmpl %ebx, (%rcx)
jne 0xde44
cmpq %rax, %rcx
setb %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/wayland-drm.c
// Function: context_create_buffer
struct buffer *
context_create_buffer(struct wld_context *base,
                      uint32_t width, uint32_t height,
                      uint32_t format, uint32_t flags)
{
	struct drm_context *context = drm_context(base);
	struct buffer *buffer;
	union wld_object object;
	struct wl_buffer *wl;

	if (!wayland_has_format(base, format))
		goto error0;

	buffer = context->driver_context->impl->create_buffer(context->driver_context, width, height, format, flags);

	if (!buffer)
		goto error0;

	if (!wld_export(&buffer->base, WLD_DRM_OBJECT_PRIME_FD, &object))
		goto error1;

	wl = wl_drm_create_prime_buffer(context->wl, object.i, width, height,
	                                format, 0, buffer->base.pitch, 0, 0, 0, 0);
	close(object.i);

	if (!wl)
		goto error1;

	if (!wayland_buffer_add_exporter(buffer, wl))
		goto error2;

	return buffer;

error2:
	wl_buffer_destroy(wl);
error1:
	wld_buffer_unreference(&buffer->base);
error0:
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r8d, %ebx
movl %ecx, %r15d
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %r12
callq 0xde70
movq %r12, %rdi
movl %r15d, %esi
callq 0xde2b
testb %al, %al
je 0xdfcd
movq 0x20(%r12), %rdi
movq (%rdi), %rax
movl %ebp, %esi
movl %r14d, %edx
movl %r15d, %ecx
movl %ebx, %r8d
callq *0x8(%rax)
testq %rax, %rax
je 0xdfcd
movq %rax, %rbx
leaq 0x60(%rsp), %rdx
movq %rax, %rdi
movl $0x2000001, %esi        # imm = 0x2000001
callq 0x9890
testb %al, %al
je 0xdfc5
movq 0x28(%r12), %r12
movl 0x60(%rsp), %eax
movl %eax, 0x5c(%rsp)
movl 0x10(%rbx), %r13d
movq %r12, %rdi
callq 0x9170
movl %r13d, 0x28(%rsp)
movl %r15d, 0x18(%rsp)
andl $0x0, 0x48(%rsp)
movl %r14d, 0x10(%rsp)
andl $0x0, 0x40(%rsp)
movl %ebp, 0x8(%rsp)
andl $0x0, 0x38(%rsp)
movl 0x5c(%rsp), %ecx
movl %ecx, (%rsp)
andl $0x0, 0x30(%rsp)
andl $0x0, 0x20(%rsp)
movq 0xb05c(%rip), %rdx      # 0x18fd0
pushq $0x3
popq %rsi
movq %r12, %rdi
movl %eax, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x9400
movq %rax, %r14
movl 0x60(%rsp), %edi
callq 0x93c0
testq %r14, %r14
je 0xdfc5
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd55f
testb %al, %al
jne 0xdfcf
movq %r14, %rdi
callq 0x9170
pushq $0x1
popq %r8
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x9400
movq %rbx, %rdi
callq 0x9260
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]wld/wayland-drm.c
// Function: context_destroy
void
context_destroy(struct wld_context *base)
{
	struct drm_context *context = drm_context(base);

	wld_destroy_context(context->driver_context);
	close(context->fd);
	wl_drm_destroy(context->wl);
	wl_registry_destroy(context->registry);
	wl_array_release(&context->formats);
	wl_event_queue_destroy(context->base.queue);
	free(context);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0xde70
movq 0x20(%rbx), %rdi
callq 0x9490
movl 0x54(%rbx), %edi
callq 0x93c0
movq 0x28(%rbx), %rdi
callq 0x9830
movq 0x30(%rbx), %rdi
callq 0x9830
leaq 0x38(%rbx), %rdi
callq 0x95a0
movq 0x18(%rbx), %rdi
callq 0x9190
movq %rbx, %rdi
popq %rbx
jmp 0x9060
// File: /workspace/github_c_makefile_star2_O2/google[P]multichase/fairness.c
// Function: wait_for_startup
static void wait_for_startup(void) {
  // wait for everyone to spawn
  pthread_mutex_lock(&wait_mutex);
  --nr_to_startup;
  if (nr_to_startup) {
    pthread_cond_wait(&wait_cond, &wait_mutex);
  } else {
    pthread_cond_broadcast(&wait_cond);
  }
  pthread_mutex_unlock(&wait_mutex);
}

// Assembly:
pushq %rax
leaq 0xef27d(%rip), %rdi     # 0x4f1328
callq 0x424200
decq 0xeb261(%rip)           # 0x4ed318
je 0x4020ce
leaq 0xef290(%rip), %rdi     # 0x4f1350
leaq 0xef261(%rip), %rsi     # 0x4f1328
callq 0x420860
jmp 0x4020da
leaq 0xef27b(%rip), %rdi     # 0x4f1350
callq 0x420210
leaq 0xef247(%rip), %rdi     # 0x4f1328
popq %rax
jmp 0x4250e0
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DASCRUBBER/DASpatch.c
// Function: unsuitable
static int unsuitable(int bread, int lft, int rgt)
{ int tb, te;

  tb = TRIM_IDX[bread];
  te = TRIM_IDX[bread+1];
  for ( ; tb < te; tb += 3)
    if (TRIM[tb+1] >= lft)
      break;
  if (tb >= te || TRIM[tb] > lft)
    return (1);
  for ( ; tb < te ; tb += 3)
    { if (TRIM[tb+1] >= rgt)
        break;
      if (TRIM[tb+2] == SPLIT)
        return (1);
    }
  if (tb >= te || TRIM[tb] > rgt)
    return (1);
  return (0);
}

// Assembly:
movabsq $0x300000000, %rcx      # imm = 0x300000000
movq 0x1b97a(%rip), %rax     # 0x1e1b0
movslq %edi, %rdi
movq (%rax,%rdi,8), %r9
movslq 0x8(%rax,%rdi,8), %r8
movq 0x1b96f(%rip), %rdi     # 0x1e1b8
movslq %r9d, %r10
shlq $0x20, %r9
pushq $0x1
popq %rax
cmpq %r8, %r10
jge 0x289f
cmpl %esi, 0x4(%rdi,%r10,4)
jge 0x2868
addq $0x3, %r10
addq %rcx, %r9
jmp 0x2853
movq %r9, %r11
sarq $0x1e, %r11
cmpl %esi, (%rdi,%r11)
jg 0x289f
cmpq %r8, %r10
jge 0x289f
cmpl %edx, 0x4(%rdi,%r10,4)
jge 0x2892
cmpl $0x2, 0x8(%rdi,%r10,4)
je 0x289f
addq $0x3, %r10
addq %rcx, %r9
jmp 0x2875
sarq $0x1e, %r9
xorl %eax, %eax
cmpl %edx, (%rdi,%r9)
setg %al
retq
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DASCRUBBER/align.c
// Function: New_Work_Data
Work_Data *New_Work_Data()
{ _Work_Data *work;
  
  work = (_Work_Data *) Malloc(sizeof(_Work_Data),"Allocating work data block");
  if (work == NULL)
    EXIT(NULL);
  work->vecmax = 0;
  work->vector = NULL;
  work->pntmax = 0;
  work->points = NULL;
  work->tramax = 0;
  work->trace  = NULL;
  work->alnmax = 0;
  work->alnpts = NULL;
  work->celmax = 0;
  work->cells  = NULL;
  return ((Work_Data *) work);
}

// Assembly:
pushq %rax
leaq 0x15ba8(%rip), %rsi     # 0x18450
pushq $0x50
popq %rdi
callq 0x10d91
testq %rax, %rax
je 0x28e3
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
andl $0x0, 0x20(%rax)
andq $0x0, 0x28(%rax)
andl $0x0, 0x30(%rax)
andq $0x0, 0x38(%rax)
andl $0x0, 0x40(%rax)
andq $0x0, 0x48(%rax)
andl $0x0, 0x10(%rax)
andq $0x0, 0x18(%rax)
popq %rcx
retq
pushq $0x1
popq %rdi
callq 0x1280
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DASCRUBBER/align.c
// Function: Free_Work_Data
void Free_Work_Data(Work_Data *ework)
{ _Work_Data *work = (_Work_Data *) ework;
  if (work->vector != NULL)
    free(work->vector);
  if (work->cells != NULL)
    free(work->cells);
  if (work->trace != NULL)
    free(work->trace);
  if (work->points != NULL)
    free(work->points);
  if (work->alnpts != NULL)
    free(work->alnpts);
  free(work);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x1030
movq 0x18(%rbx), %rdi
callq 0x1030
movq 0x38(%rbx), %rdi
callq 0x1030
movq 0x28(%rbx), %rdi
callq 0x1030
movq 0x48(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DASCRUBBER/align.c
// Function: set_table
static void set_table(int bit, int prefix, int score, int max, Table_Bits *parms)
{ if (bit >= TRIM_LEN)
    { parms->table[prefix] = (int16) (score-max);
      parms->score[prefix] = (int16) score;
    }
  else
    { if (score > max)
        max = score;
      set_table(bit+1,(prefix<<1),score - parms->dscore,max,parms);
      set_table(bit+1,(prefix<<1) | 1,score + parms->mscore,max,parms);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %r15d
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r12d
cmpl $0xf, %r12d
jge 0x2b3c
cmpl %r15d, %ebp
cmovgl %ebp, %r15d
incl %r12d
leal (%r14,%r14), %esi
movl %ebp, %edx
subl 0x4(%rbx), %edx
movl %r12d, %edi
movl %r15d, %ecx
movq %rbx, %r8
callq 0x2af3
leal 0x1(,%r14,2), %r14d
addl (%rbx), %ebp
jmp 0x2b09
movl %ebp, %eax
subl %r15d, %eax
movq 0x8(%rbx), %rcx
movslq %r14d, %rdx
movw %ax, (%rcx,%rdx,2)
movq 0x10(%rbx), %rax
movw %bp, (%rax,%rdx,2)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DASCRUBBER/align.c
// Function: enlarge_vector
static int enlarge_vector(_Work_Data *work, int newmax)
{ void *vec;
  int   max;

  max = ((int) (newmax*1.2)) + 10000;
  vec = Realloc(work->vector,max,"Enlarging DP vector");
  if (vec == NULL)
    EXIT(1);
  work->vecmax = max;
  work->vector = vec;
  return (0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cvtsi2sd %esi, %xmm0
mulsd 0x14fea(%rip), %xmm0    # 0x18010
cvttsd2si %xmm0, %ebp
movq %rdi, %rbx
addl $0x2710, %ebp           # imm = 0x2710
movq 0x8(%rdi), %rdi
movslq %ebp, %rsi
leaq 0x15623(%rip), %rdx     # 0x18664
callq 0x10de9
testq %rax, %rax
je 0x3058
movl %ebp, (%rbx)
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x1280
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DASCRUBBER/align.c
// Function: enlarge_points
static int enlarge_points(_Work_Data *work, int newmax)
{ void *vec;
  int   max;

  max = ((int) (newmax*1.2)) + 10000;
  vec = Realloc(work->points,max,"Enlarging point vector");
  if (vec == NULL)
    EXIT(1);
  work->pntmax = max;
  work->points = vec;
  return (0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cvtsi2sd %esi, %xmm0
mulsd 0x14fa1(%rip), %xmm0    # 0x18010
cvttsd2si %xmm0, %ebp
movq %rdi, %rbx
addl $0x2710, %ebp           # imm = 0x2710
movq 0x28(%rdi), %rdi
movslq %ebp, %rsi
leaq 0x155ee(%rip), %rdx     # 0x18678
callq 0x10de9
testq %rax, %rax
je 0x30a2
movl %ebp, 0x20(%rbx)
movq %rax, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x1280
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DASCRUBBER/align.c
// Function: Write_Overlap
int Write_Overlap(FILE *output, Overlap *ovl, int tbytes)
{ if (fwrite( ((char *) ovl) + PtrSize, OvlIOSize, 1, output) != 1)
    return (1);
  if (ovl->path.trace != NULL)
    if (fwrite(ovl->path.trace,tbytes,ovl->path.tlen,output) != (size_t) ovl->path.tlen)
      return (1);
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r15
leaq 0x8(%rsi), %r14
pushq $0x28
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %r15, %rcx
callq 0x1290
pushq $0x1
popq %rbx
cmpq $0x1, %rax
jne 0x843e
movq (%r12), %rdi
testq %rdi, %rdi
je 0x843c
movslq %ebp, %rsi
movslq (%r14), %rdx
movq %r15, %rcx
callq 0x1290
movslq (%r14), %rcx
cmpq %rcx, %rax
jne 0x843e
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DASCRUBBER/align.c
// Function: Compress_TraceTo8
int Compress_TraceTo8(Overlap *ovl, int check)
{ uint16 *t16 = (uint16 *) ovl->path.trace;
  uint8  *t8  = (uint8  *) ovl->path.trace;
  int     j, x;

  if (check)
    for (j = 0; j < ovl->path.tlen; j++)
      { x = t16[j];
        if (x > 255)
          { fprintf(stderr,"%s: Compression of trace to bytes fails, value too big\n",Prog_Name);
            EXIT(1);
          }
        t8[j] = (uint8) x;
      }
  else
    for (j = 0; j < ovl->path.tlen; j++)
      t8[j] = (uint8) (t16[j]);
  return (0);
}

// Assembly:
pushq %rax
movq (%rdi), %rax
xorl %ecx, %ecx
testl %esi, %esi
je 0x8478
movslq 0x8(%rdi), %rdx
cmpq %rdx, %rcx
jge 0x8481
movzwl (%rax,%rcx,2), %edx
cmpw $0x100, %dx             # imm = 0x100
jae 0x8485
movb %dl, (%rax,%rcx)
incq %rcx
jmp 0x8453
movb (%rax,%rcx,2), %dl
movb %dl, (%rax,%rcx)
incq %rcx
movslq 0x8(%rdi), %rdx
cmpq %rdx, %rcx
jl 0x846f
xorl %eax, %eax
popq %rcx
retq
movq 0x15b6c(%rip), %rax     # 0x1dff8
movq (%rax), %rdi
leaq 0x15e5a(%rip), %rax     # 0x1e2f0
movq (%rax), %rdx
leaq 0x10064(%rip), %rsi     # 0x18504
xorl %eax, %eax
callq 0x11a0
pushq $0x1
popq %rdi
callq 0x1280
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DASCRUBBER/align.c
// Function: Decompress_TraceTo16
void Decompress_TraceTo16(Overlap *ovl)
{ uint16 *t16 = (uint16 *) ovl->path.trace;
  uint8  *t8  = (uint8  *) ovl->path.trace;
  int     j;

  for (j = ovl->path.tlen-1; j >= 0; j--)
    t16[j] = t8[j];
}

// Assembly:
movq (%rdi), %rax
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
jle 0x84c8
movzbl -0x1(%rax,%rcx), %edx
movw %dx, -0x2(%rax,%rcx,2)
decq %rcx
jmp 0x84b5
retq