/* puzzle.c generated by valac 0.38.0.11-8bd7f, the Vala compiler
 * generated from puzzle.vala, do not modify */

/*
 * Copyright (C) 2010-2013 Robert Ancell
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
 * license.
 */
/*
  1   2   4

  8   *   16

  32  64  128
*/

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>


#define TYPE_PUZZLE (puzzle_get_type ())
#define PUZZLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PUZZLE, Puzzle))
#define PUZZLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PUZZLE, PuzzleClass))
#define IS_PUZZLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PUZZLE))
#define IS_PUZZLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PUZZLE))
#define PUZZLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PUZZLE, PuzzleClass))

typedef struct _Puzzle Puzzle;
typedef struct _PuzzleClass PuzzleClass;
typedef struct _PuzzlePrivate PuzzlePrivate;
enum  {
	PUZZLE_DUMMY_PROPERTY,
	PUZZLE_LAST_PROPERTY
};
static GParamSpec* puzzle_properties[PUZZLE_LAST_PROPERTY];
enum  {
	PUZZLE_CHANGED_SIGNAL,
	PUZZLE_MOVED_SIGNAL,
	PUZZLE_LAST_SIGNAL
};
static guint puzzle_signals[PUZZLE_LAST_SIGNAL] = {0};

struct _Puzzle {
	GObject parent_instance;
	PuzzlePrivate * priv;
	gint width;
	gint height;
	gchar* map;
	gint map_length1;
	gchar* move_map;
	gint move_map_length1;
	gchar* orig_map;
	gint orig_map_length1;
	gchar* lastmove_map;
	gint lastmove_map_length1;
	gchar* undomove_map;
	gint undomove_map_length1;
	gint moves;
};

struct _PuzzleClass {
	GObjectClass parent_class;
};


static gpointer puzzle_parent_class = NULL;

GType puzzle_get_type (void) G_GNUC_CONST;
Puzzle* puzzle_new (gint width, gint height, const gchar* data);
Puzzle* puzzle_construct (GType object_type, gint width, gint height, const gchar* data);
static gchar* _vala_array_dup1 (gchar* self, int length);
static gchar* _vala_array_dup2 (gchar* self, int length);
static void puzzle_set_piece_id (Puzzle* self, gchar* src, int src_length1, gint x, gint y, gchar id);
static gchar* _vala_array_dup3 (gchar* self, int length);
static gchar* _vala_array_dup4 (gchar* self, int length);
gchar puzzle_get_piece_id (Puzzle* self, gchar* src, int src_length1, gint x, gint y);
gint puzzle_get_piece_nr (Puzzle* self, gint x, gint y);
gboolean puzzle_game_over (Puzzle* self);
gboolean puzzle_mapcmp (Puzzle* self, gchar* m1, int m1_length1, gchar* m2, int m2_length1);
gboolean puzzle_movable (Puzzle* self, gint id);
gboolean puzzle_move_piece (Puzzle* self, gchar id, gint x1, gint y1, gint x2, gint y2);
static gboolean puzzle_check_valid_move (Puzzle* self, gint id, gint dx, gint dy);
static gboolean puzzle_do_move_piece (Puzzle* self, gchar id, gint dx, gint dy);
static gchar* _vala_array_dup5 (gchar* self, int length);
static gchar* _vala_array_dup6 (gchar* self, int length);
static void puzzle_finalize (GObject * obj);

const gint image_map[110] = {0, 0, 64, 1, 66, 2, 2, 3, 16, 4, 24, 5, 8, 6, 208, 7, 248, 8, 104, 9, 214, 10, 255, 11, 107, 12, 22, 13, 31, 14, 11, 15, 18, 16, 10, 17, 80, 18, 72, 19, 56, 5, 152, 5, 70, 2, 67, 2, 194, 2, 98, 2, 9, 6, 20, 4, 144, 4, 3, 3, 40, 6, 25, 5, 28, 5, 96, 1, 19, 16, 201, 19, 146, 16, 198, 2, 84, 18, 46, 17, 112, 18, 6, 3, 184, 5, 192, 1, 147, 16, 73, 19, 42, 17, 200, 19, 99, 2, 116, 18, 29, 5, 14, 17, 26, 25, 224, 1, -1, -1};

static gchar* _vala_array_dup1 (gchar* self, int length) {
#line 108 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return g_memdup (self, length * sizeof (gchar));
#line 100 "puzzle.c"
}


static gchar* _vala_array_dup2 (gchar* self, int length) {
#line 109 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return g_memdup (self, length * sizeof (gchar));
#line 107 "puzzle.c"
}


static gchar string_get (const gchar* self, glong index) {
	gchar result = '\0';
	glong _tmp0_;
	gchar _tmp1_;
#line 1118 "/home/mcatanzaro/Projects/GNOME/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, '\0');
#line 1119 "/home/mcatanzaro/Projects/GNOME/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = index;
#line 1119 "/home/mcatanzaro/Projects/GNOME/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp1_ = ((gchar*) self)[_tmp0_];
#line 1119 "/home/mcatanzaro/Projects/GNOME/install/share/vala-0.38/vapi/glib-2.0.vapi"
	result = _tmp1_;
#line 1119 "/home/mcatanzaro/Projects/GNOME/install/share/vala-0.38/vapi/glib-2.0.vapi"
	return result;
#line 125 "puzzle.c"
}


static gchar* _vala_array_dup3 (gchar* self, int length) {
#line 122 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return g_memdup (self, length * sizeof (gchar));
#line 132 "puzzle.c"
}


static gchar* _vala_array_dup4 (gchar* self, int length) {
#line 123 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return g_memdup (self, length * sizeof (gchar));
#line 139 "puzzle.c"
}


Puzzle* puzzle_construct (GType object_type, gint width, gint height, const gchar* data) {
	Puzzle * self = NULL;
	gint _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gint _tmp5__length1;
	gchar* _tmp6_;
	gint _tmp6__length1;
	gchar* _tmp7_;
	gint _tmp7__length1;
	gchar* _tmp8_;
	gint _tmp8__length1;
	const gchar* _tmp9_;
	gchar* _tmp25_;
	gint _tmp25__length1;
	gchar* _tmp26_;
	gint _tmp26__length1;
	gchar* _tmp27_;
	gint _tmp27__length1;
	gchar* _tmp28_;
	gint _tmp28__length1;
#line 103 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self = (Puzzle*) g_object_new (object_type, NULL);
#line 105 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp0_ = width;
#line 105 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->width = _tmp0_;
#line 106 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp1_ = height;
#line 106 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->height = _tmp1_;
#line 107 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp2_ = width;
#line 107 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp3_ = height;
#line 107 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp4_ = g_new0 (gchar, (_tmp2_ + 2) * (_tmp3_ + 2));
#line 107 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->map = (g_free (self->map), NULL);
#line 107 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->map = _tmp4_;
#line 107 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->map_length1 = (_tmp2_ + 2) * (_tmp3_ + 2);
#line 108 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp5_ = self->map;
#line 108 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp5__length1 = self->map_length1;
#line 108 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp6_ = (_tmp5_ != NULL) ? _vala_array_dup1 (_tmp5_, _tmp5__length1) : ((gpointer) _tmp5_);
#line 108 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp6__length1 = _tmp5__length1;
#line 108 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->move_map = (g_free (self->move_map), NULL);
#line 108 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->move_map = _tmp6_;
#line 108 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->move_map_length1 = _tmp6__length1;
#line 109 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp7_ = self->map;
#line 109 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp7__length1 = self->map_length1;
#line 109 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp8_ = (_tmp7_ != NULL) ? _vala_array_dup2 (_tmp7_, _tmp7__length1) : ((gpointer) _tmp7_);
#line 109 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp8__length1 = _tmp7__length1;
#line 109 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->undomove_map = (g_free (self->undomove_map), NULL);
#line 109 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->undomove_map = _tmp8_;
#line 109 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->undomove_map_length1 = _tmp8__length1;
#line 110 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp9_ = data;
#line 110 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp9_ != NULL) {
#line 221 "puzzle.c"
		gint i = 0;
#line 112 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		i = 0;
#line 225 "puzzle.c"
		{
			gint y = 0;
#line 113 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			y = 0;
#line 230 "puzzle.c"
			{
				gboolean _tmp10_ = FALSE;
#line 113 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp10_ = TRUE;
#line 113 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				while (TRUE) {
#line 237 "puzzle.c"
					gint _tmp12_;
					gint _tmp13_;
#line 113 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					if (!_tmp10_) {
#line 242 "puzzle.c"
						gint _tmp11_;
#line 113 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						_tmp11_ = y;
#line 113 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						y = _tmp11_ + 1;
#line 248 "puzzle.c"
					}
#line 113 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					_tmp10_ = FALSE;
#line 113 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					_tmp12_ = y;
#line 113 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					_tmp13_ = height;
#line 113 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					if (!(_tmp12_ < _tmp13_)) {
#line 113 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						break;
#line 260 "puzzle.c"
					}
					{
						gint x = 0;
#line 115 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						x = 0;
#line 266 "puzzle.c"
						{
							gboolean _tmp14_ = FALSE;
#line 115 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp14_ = TRUE;
#line 115 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							while (TRUE) {
#line 273 "puzzle.c"
								gint _tmp16_;
								gint _tmp17_;
								gchar* _tmp18_;
								gint _tmp18__length1;
								gint _tmp19_;
								gint _tmp20_;
								const gchar* _tmp21_;
								gint _tmp22_;
								gchar _tmp23_;
								gint _tmp24_;
#line 115 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								if (!_tmp14_) {
#line 286 "puzzle.c"
									gint _tmp15_;
#line 115 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									_tmp15_ = x;
#line 115 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									x = _tmp15_ + 1;
#line 292 "puzzle.c"
								}
#line 115 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp14_ = FALSE;
#line 115 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp16_ = x;
#line 115 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp17_ = width;
#line 115 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								if (!(_tmp16_ < _tmp17_)) {
#line 115 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									break;
#line 304 "puzzle.c"
								}
#line 117 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp18_ = self->map;
#line 117 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp18__length1 = self->map_length1;
#line 117 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp19_ = x;
#line 117 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp20_ = y;
#line 117 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp21_ = data;
#line 117 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp22_ = i;
#line 117 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp23_ = string_get (_tmp21_, (glong) _tmp22_);
#line 117 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								puzzle_set_piece_id (self, _tmp18_, _tmp18__length1, _tmp19_, _tmp20_, _tmp23_);
#line 118 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp24_ = i;
#line 118 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								i = _tmp24_ + 1;
#line 326 "puzzle.c"
							}
						}
					}
				}
			}
		}
	}
#line 122 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp25_ = self->map;
#line 122 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp25__length1 = self->map_length1;
#line 122 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp26_ = (_tmp25_ != NULL) ? _vala_array_dup3 (_tmp25_, _tmp25__length1) : ((gpointer) _tmp25_);
#line 122 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp26__length1 = _tmp25__length1;
#line 122 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->orig_map = (g_free (self->orig_map), NULL);
#line 122 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->orig_map = _tmp26_;
#line 122 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->orig_map_length1 = _tmp26__length1;
#line 123 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp27_ = self->map;
#line 123 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp27__length1 = self->map_length1;
#line 123 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp28_ = (_tmp27_ != NULL) ? _vala_array_dup4 (_tmp27_, _tmp27__length1) : ((gpointer) _tmp27_);
#line 123 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp28__length1 = _tmp27__length1;
#line 123 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->lastmove_map = (g_free (self->lastmove_map), NULL);
#line 123 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->lastmove_map = _tmp28_;
#line 123 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->lastmove_map_length1 = _tmp28__length1;
#line 103 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return self;
#line 364 "puzzle.c"
}


Puzzle* puzzle_new (gint width, gint height, const gchar* data) {
#line 103 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return puzzle_construct (TYPE_PUZZLE, width, height, data);
#line 371 "puzzle.c"
}


gchar puzzle_get_piece_id (Puzzle* self, gchar* src, int src_length1, gint x, gint y) {
	gchar result = '\0';
	gchar* _tmp0_;
	gint _tmp0__length1;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gchar _tmp4_;
#line 126 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, '\0');
#line 128 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp0_ = src;
#line 128 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp0__length1 = src_length1;
#line 128 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp1_ = x;
#line 128 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp2_ = y;
#line 128 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp3_ = self->width;
#line 128 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp4_ = _tmp0_[(_tmp1_ + 1) + ((_tmp2_ + 1) * (_tmp3_ + 2))];
#line 128 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	result = _tmp4_;
#line 128 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return result;
#line 401 "puzzle.c"
}


static void puzzle_set_piece_id (Puzzle* self, gchar* src, int src_length1, gint x, gint y, gchar id) {
	gchar* _tmp0_;
	gint _tmp0__length1;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gchar _tmp4_;
	gchar _tmp5_;
#line 131 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	g_return_if_fail (self != NULL);
#line 133 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp0_ = src;
#line 133 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp0__length1 = src_length1;
#line 133 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp1_ = x;
#line 133 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp2_ = y;
#line 133 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp3_ = self->width;
#line 133 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp4_ = id;
#line 133 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp0_[(_tmp1_ + 1) + ((_tmp2_ + 1) * (_tmp3_ + 2))] = _tmp4_;
#line 133 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp5_ = _tmp0_[(_tmp1_ + 1) + ((_tmp2_ + 1) * (_tmp3_ + 2))];
#line 431 "puzzle.c"
}


gint puzzle_get_piece_nr (Puzzle* self, gint x, gint y) {
	gint result = 0;
	gint _tmp0_;
	gint _tmp1_;
	gchar c = '\0';
	gchar* _tmp2_;
	gint _tmp2__length1;
	gint _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	gchar _tmp6_;
	gchar _tmp7_;
	gchar _tmp8_;
	gchar _tmp9_;
	gint nr = 0;
	gchar* _tmp10_;
	gint _tmp10__length1;
	gint _tmp11_;
	gint _tmp12_;
	gint _tmp13_;
	gchar _tmp14_;
	gchar _tmp15_;
	gchar* _tmp17_;
	gint _tmp17__length1;
	gint _tmp18_;
	gint _tmp19_;
	gint _tmp20_;
	gchar _tmp21_;
	gchar _tmp22_;
	gchar* _tmp24_;
	gint _tmp24__length1;
	gint _tmp25_;
	gint _tmp26_;
	gint _tmp27_;
	gchar _tmp28_;
	gchar _tmp29_;
	gchar* _tmp31_;
	gint _tmp31__length1;
	gint _tmp32_;
	gint _tmp33_;
	gint _tmp34_;
	gchar _tmp35_;
	gchar _tmp36_;
	gchar* _tmp38_;
	gint _tmp38__length1;
	gint _tmp39_;
	gint _tmp40_;
	gint _tmp41_;
	gchar _tmp42_;
	gchar _tmp43_;
	gchar* _tmp45_;
	gint _tmp45__length1;
	gint _tmp46_;
	gint _tmp47_;
	gint _tmp48_;
	gchar _tmp49_;
	gchar _tmp50_;
	gchar* _tmp52_;
	gint _tmp52__length1;
	gint _tmp53_;
	gint _tmp54_;
	gint _tmp55_;
	gchar _tmp56_;
	gchar _tmp57_;
	gchar* _tmp59_;
	gint _tmp59__length1;
	gint _tmp60_;
	gint _tmp61_;
	gint _tmp62_;
	gchar _tmp63_;
	gchar _tmp64_;
	gint i = 0;
	gint _tmp73_;
	gint _tmp74_;
#line 136 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 138 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp0_ = x;
#line 138 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	x = _tmp0_ + 1;
#line 139 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp1_ = y;
#line 139 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	y = _tmp1_ + 1;
#line 141 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp2_ = self->map;
#line 141 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp2__length1 = self->map_length1;
#line 141 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp3_ = x;
#line 141 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp4_ = y;
#line 141 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp5_ = self->width;
#line 141 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp6_ = _tmp2_[_tmp3_ + (_tmp4_ * (_tmp5_ + 2))];
#line 141 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	c = _tmp6_;
#line 142 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp7_ = c;
#line 142 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp7_ == '-') {
#line 143 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		result = 23;
#line 143 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		return result;
#line 541 "puzzle.c"
	}
#line 144 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp8_ = c;
#line 144 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp8_ == ' ') {
#line 145 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		result = 21;
#line 145 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		return result;
#line 551 "puzzle.c"
	}
#line 146 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp9_ = c;
#line 146 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp9_ == '.') {
#line 147 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		result = 20;
#line 147 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		return result;
#line 561 "puzzle.c"
	}
#line 149 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	nr = 0;
#line 150 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp10_ = self->map;
#line 150 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp10__length1 = self->map_length1;
#line 150 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp11_ = x;
#line 150 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp12_ = y;
#line 150 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp13_ = self->width;
#line 150 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp14_ = _tmp10_[(_tmp11_ - 1) + ((_tmp12_ - 1) * (_tmp13_ + 2))];
#line 150 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp15_ = c;
#line 150 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp14_ == _tmp15_) {
#line 581 "puzzle.c"
		gint _tmp16_;
#line 151 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp16_ = nr;
#line 151 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		nr = _tmp16_ + 1;
#line 587 "puzzle.c"
	}
#line 152 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp17_ = self->map;
#line 152 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp17__length1 = self->map_length1;
#line 152 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp18_ = x;
#line 152 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp19_ = y;
#line 152 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp20_ = self->width;
#line 152 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp21_ = _tmp17_[(_tmp18_ - 0) + ((_tmp19_ - 1) * (_tmp20_ + 2))];
#line 152 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp22_ = c;
#line 152 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp21_ == _tmp22_) {
#line 605 "puzzle.c"
		gint _tmp23_;
#line 153 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp23_ = nr;
#line 153 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		nr = _tmp23_ + 2;
#line 611 "puzzle.c"
	}
#line 154 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp24_ = self->map;
#line 154 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp24__length1 = self->map_length1;
#line 154 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp25_ = x;
#line 154 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp26_ = y;
#line 154 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp27_ = self->width;
#line 154 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp28_ = _tmp24_[(_tmp25_ + 1) + ((_tmp26_ - 1) * (_tmp27_ + 2))];
#line 154 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp29_ = c;
#line 154 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp28_ == _tmp29_) {
#line 629 "puzzle.c"
		gint _tmp30_;
#line 155 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp30_ = nr;
#line 155 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		nr = _tmp30_ + 4;
#line 635 "puzzle.c"
	}
#line 156 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp31_ = self->map;
#line 156 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp31__length1 = self->map_length1;
#line 156 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp32_ = x;
#line 156 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp33_ = y;
#line 156 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp34_ = self->width;
#line 156 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp35_ = _tmp31_[(_tmp32_ - 1) + ((_tmp33_ - 0) * (_tmp34_ + 2))];
#line 156 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp36_ = c;
#line 156 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp35_ == _tmp36_) {
#line 653 "puzzle.c"
		gint _tmp37_;
#line 157 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp37_ = nr;
#line 157 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		nr = _tmp37_ + 8;
#line 659 "puzzle.c"
	}
#line 158 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp38_ = self->map;
#line 158 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp38__length1 = self->map_length1;
#line 158 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp39_ = x;
#line 158 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp40_ = y;
#line 158 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp41_ = self->width;
#line 158 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp42_ = _tmp38_[(_tmp39_ + 1) + ((_tmp40_ - 0) * (_tmp41_ + 2))];
#line 158 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp43_ = c;
#line 158 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp42_ == _tmp43_) {
#line 677 "puzzle.c"
		gint _tmp44_;
#line 159 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp44_ = nr;
#line 159 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		nr = _tmp44_ + 16;
#line 683 "puzzle.c"
	}
#line 160 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp45_ = self->map;
#line 160 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp45__length1 = self->map_length1;
#line 160 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp46_ = x;
#line 160 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp47_ = y;
#line 160 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp48_ = self->width;
#line 160 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp49_ = _tmp45_[(_tmp46_ - 1) + ((_tmp47_ + 1) * (_tmp48_ + 2))];
#line 160 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp50_ = c;
#line 160 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp49_ == _tmp50_) {
#line 701 "puzzle.c"
		gint _tmp51_;
#line 161 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp51_ = nr;
#line 161 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		nr = _tmp51_ + 32;
#line 707 "puzzle.c"
	}
#line 162 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp52_ = self->map;
#line 162 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp52__length1 = self->map_length1;
#line 162 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp53_ = x;
#line 162 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp54_ = y;
#line 162 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp55_ = self->width;
#line 162 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp56_ = _tmp52_[(_tmp53_ - 0) + ((_tmp54_ + 1) * (_tmp55_ + 2))];
#line 162 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp57_ = c;
#line 162 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp56_ == _tmp57_) {
#line 725 "puzzle.c"
		gint _tmp58_;
#line 163 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp58_ = nr;
#line 163 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		nr = _tmp58_ + 64;
#line 731 "puzzle.c"
	}
#line 164 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp59_ = self->map;
#line 164 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp59__length1 = self->map_length1;
#line 164 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp60_ = x;
#line 164 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp61_ = y;
#line 164 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp62_ = self->width;
#line 164 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp63_ = _tmp59_[(_tmp60_ + 1) + ((_tmp61_ + 1) * (_tmp62_ + 2))];
#line 164 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp64_ = c;
#line 164 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp63_ == _tmp64_) {
#line 749 "puzzle.c"
		gint _tmp65_;
#line 165 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp65_ = nr;
#line 165 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		nr = _tmp65_ + 128;
#line 755 "puzzle.c"
	}
#line 167 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	i = 0;
#line 168 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	while (TRUE) {
#line 761 "puzzle.c"
		gboolean _tmp66_ = FALSE;
		gint _tmp67_;
		gint _tmp68_;
		gint _tmp69_;
		gint _tmp72_;
#line 168 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp67_ = nr;
#line 168 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp68_ = i;
#line 168 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp69_ = image_map[_tmp68_];
#line 168 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		if (_tmp67_ != _tmp69_) {
#line 775 "puzzle.c"
			gint _tmp70_;
			gint _tmp71_;
#line 168 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp70_ = i;
#line 168 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp71_ = image_map[_tmp70_];
#line 168 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp66_ = _tmp71_ != -1;
#line 784 "puzzle.c"
		} else {
#line 168 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp66_ = FALSE;
#line 788 "puzzle.c"
		}
#line 168 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		if (!_tmp66_) {
#line 168 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			break;
#line 794 "puzzle.c"
		}
#line 169 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp72_ = i;
#line 169 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		i = _tmp72_ + 2;
#line 800 "puzzle.c"
	}
#line 171 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp73_ = i;
#line 171 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp74_ = image_map[_tmp73_ + 1];
#line 171 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	result = _tmp74_;
#line 171 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return result;
#line 810 "puzzle.c"
}


gboolean puzzle_game_over (Puzzle* self) {
	gboolean result = FALSE;
	gboolean over = FALSE;
#line 174 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 176 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	over = TRUE;
#line 821 "puzzle.c"
	{
		gint y = 0;
#line 177 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		y = 0;
#line 826 "puzzle.c"
		{
			gboolean _tmp0_ = FALSE;
#line 177 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp0_ = TRUE;
#line 177 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			while (TRUE) {
#line 833 "puzzle.c"
				gint _tmp2_;
				gint _tmp3_;
#line 177 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				if (!_tmp0_) {
#line 838 "puzzle.c"
					gint _tmp1_;
#line 177 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					_tmp1_ = y;
#line 177 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					y = _tmp1_ + 1;
#line 844 "puzzle.c"
				}
#line 177 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp0_ = FALSE;
#line 177 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp2_ = y;
#line 177 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp3_ = self->height;
#line 177 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				if (!(_tmp2_ < _tmp3_)) {
#line 177 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					break;
#line 856 "puzzle.c"
				}
				{
					gint x = 0;
#line 178 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					x = 0;
#line 862 "puzzle.c"
					{
						gboolean _tmp4_ = FALSE;
#line 178 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						_tmp4_ = TRUE;
#line 178 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						while (TRUE) {
#line 869 "puzzle.c"
							gint _tmp6_;
							gint _tmp7_;
							gboolean _tmp8_ = FALSE;
							gchar* _tmp9_;
							gint _tmp9__length1;
							gint _tmp10_;
							gint _tmp11_;
							gchar _tmp12_;
#line 178 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (!_tmp4_) {
#line 880 "puzzle.c"
								gint _tmp5_;
#line 178 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp5_ = x;
#line 178 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								x = _tmp5_ + 1;
#line 886 "puzzle.c"
							}
#line 178 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp4_ = FALSE;
#line 178 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp6_ = x;
#line 178 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp7_ = self->width;
#line 178 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (!(_tmp6_ < _tmp7_)) {
#line 178 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								break;
#line 898 "puzzle.c"
							}
#line 179 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp9_ = self->map;
#line 179 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp9__length1 = self->map_length1;
#line 179 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp10_ = x;
#line 179 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp11_ = y;
#line 179 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp12_ = puzzle_get_piece_id (self, _tmp9_, _tmp9__length1, _tmp10_, _tmp11_);
#line 179 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (_tmp12_ == '*') {
#line 912 "puzzle.c"
								gchar* _tmp13_;
								gint _tmp13__length1;
								gint _tmp14_;
								gint _tmp15_;
								gchar _tmp16_;
#line 179 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp13_ = self->orig_map;
#line 179 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp13__length1 = self->orig_map_length1;
#line 179 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp14_ = x;
#line 179 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp15_ = y;
#line 179 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp16_ = puzzle_get_piece_id (self, _tmp13_, _tmp13__length1, _tmp14_, _tmp15_);
#line 179 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp8_ = _tmp16_ != '.';
#line 930 "puzzle.c"
							} else {
#line 179 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp8_ = FALSE;
#line 934 "puzzle.c"
							}
#line 179 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (_tmp8_) {
#line 180 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								over = FALSE;
#line 940 "puzzle.c"
							}
						}
					}
				}
			}
		}
	}
#line 181 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	result = over;
#line 181 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return result;
#line 952 "puzzle.c"
}


gboolean puzzle_mapcmp (Puzzle* self, gchar* m1, int m1_length1, gchar* m2, int m2_length1) {
	gboolean result = FALSE;
#line 184 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 960 "puzzle.c"
	{
		gint y = 0;
#line 186 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		y = 0;
#line 965 "puzzle.c"
		{
			gboolean _tmp0_ = FALSE;
#line 186 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp0_ = TRUE;
#line 186 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			while (TRUE) {
#line 972 "puzzle.c"
				gint _tmp2_;
				gint _tmp3_;
#line 186 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				if (!_tmp0_) {
#line 977 "puzzle.c"
					gint _tmp1_;
#line 186 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					_tmp1_ = y;
#line 186 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					y = _tmp1_ + 1;
#line 983 "puzzle.c"
				}
#line 186 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp0_ = FALSE;
#line 186 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp2_ = y;
#line 186 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp3_ = self->height;
#line 186 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				if (!(_tmp2_ < _tmp3_)) {
#line 186 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					break;
#line 995 "puzzle.c"
				}
				{
					gint x = 0;
#line 187 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					x = 0;
#line 1001 "puzzle.c"
					{
						gboolean _tmp4_ = FALSE;
#line 187 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						_tmp4_ = TRUE;
#line 187 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						while (TRUE) {
#line 1008 "puzzle.c"
							gint _tmp6_;
							gint _tmp7_;
							gchar* _tmp8_;
							gint _tmp8__length1;
							gint _tmp9_;
							gint _tmp10_;
							gchar _tmp11_;
							gchar* _tmp12_;
							gint _tmp12__length1;
							gint _tmp13_;
							gint _tmp14_;
							gchar _tmp15_;
#line 187 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (!_tmp4_) {
#line 1023 "puzzle.c"
								gint _tmp5_;
#line 187 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp5_ = x;
#line 187 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								x = _tmp5_ + 1;
#line 1029 "puzzle.c"
							}
#line 187 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp4_ = FALSE;
#line 187 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp6_ = x;
#line 187 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp7_ = self->width;
#line 187 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (!(_tmp6_ < _tmp7_)) {
#line 187 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								break;
#line 1041 "puzzle.c"
							}
#line 188 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp8_ = m1;
#line 188 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp8__length1 = m1_length1;
#line 188 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp9_ = x;
#line 188 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp10_ = y;
#line 188 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp11_ = puzzle_get_piece_id (self, _tmp8_, _tmp8__length1, _tmp9_, _tmp10_);
#line 188 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp12_ = m2;
#line 188 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp12__length1 = m2_length1;
#line 188 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp13_ = x;
#line 188 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp14_ = y;
#line 188 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp15_ = puzzle_get_piece_id (self, _tmp12_, _tmp12__length1, _tmp13_, _tmp14_);
#line 188 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (_tmp11_ != _tmp15_) {
#line 189 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								result = TRUE;
#line 189 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								return result;
#line 1069 "puzzle.c"
							}
						}
					}
				}
			}
		}
	}
#line 190 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	result = FALSE;
#line 190 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return result;
#line 1081 "puzzle.c"
}


gboolean puzzle_movable (Puzzle* self, gint id) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gint _tmp3_;
#line 193 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 195 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp3_ = id;
#line 195 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp3_ == ((gint) '#')) {
#line 195 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp2_ = TRUE;
#line 1099 "puzzle.c"
	} else {
		gint _tmp4_;
#line 195 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp4_ = id;
#line 195 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp2_ = _tmp4_ == ((gint) '.');
#line 1106 "puzzle.c"
	}
#line 195 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp2_) {
#line 195 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp1_ = TRUE;
#line 1112 "puzzle.c"
	} else {
		gint _tmp5_;
#line 195 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp5_ = id;
#line 195 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp1_ = _tmp5_ == ((gint) ' ');
#line 1119 "puzzle.c"
	}
#line 195 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp1_) {
#line 195 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp0_ = TRUE;
#line 1125 "puzzle.c"
	} else {
		gint _tmp6_;
#line 195 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp6_ = id;
#line 195 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp0_ = _tmp6_ == ((gint) '-');
#line 1132 "puzzle.c"
	}
#line 195 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp0_) {
#line 196 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		result = FALSE;
#line 196 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		return result;
#line 1140 "puzzle.c"
	}
#line 197 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	result = TRUE;
#line 197 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return result;
#line 1146 "puzzle.c"
}


gboolean puzzle_move_piece (Puzzle* self, gchar id, gint x1, gint y1, gint x2, gint y2) {
	gboolean result = FALSE;
	gboolean return_value = FALSE;
	gchar _tmp0_;
	gboolean _tmp1_;
	gchar* _tmp2_;
	gint _tmp2__length1;
	gint _tmp3_;
	gint _tmp4_;
	gchar _tmp5_;
	gchar _tmp6_;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gint _tmp9_;
	gint _tmp10_;
	gint _tmp20_;
	gint _tmp21_;
	gint _tmp22_;
	gint _tmp35_;
	gint _tmp36_;
	gint _tmp37_;
#line 200 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 202 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return_value = FALSE;
#line 204 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp0_ = id;
#line 204 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp1_ = puzzle_movable (self, (gint) _tmp0_);
#line 204 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (!_tmp1_) {
#line 205 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		result = FALSE;
#line 205 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		return result;
#line 1185 "puzzle.c"
	}
#line 207 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp2_ = self->map;
#line 207 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp2__length1 = self->map_length1;
#line 207 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp3_ = x2;
#line 207 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp4_ = y2;
#line 207 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp5_ = puzzle_get_piece_id (self, _tmp2_, _tmp2__length1, _tmp3_, _tmp4_);
#line 207 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp6_ = id;
#line 207 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp5_ == _tmp6_) {
#line 208 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		return_value = TRUE;
#line 1203 "puzzle.c"
	}
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp9_ = y1;
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp10_ = y2;
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp9_ == _tmp10_) {
#line 1211 "puzzle.c"
		gint _tmp11_;
		gint _tmp12_;
		gint _tmp13_;
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp11_ = x1;
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp12_ = x2;
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp13_ = abs (_tmp11_ - _tmp12_);
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp8_ = _tmp13_ == 1;
#line 1223 "puzzle.c"
	} else {
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp8_ = FALSE;
#line 1227 "puzzle.c"
	}
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp8_) {
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp7_ = TRUE;
#line 1233 "puzzle.c"
	} else {
		gboolean _tmp14_ = FALSE;
		gint _tmp15_;
		gint _tmp16_;
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp15_ = x1;
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp16_ = x2;
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		if (_tmp15_ == _tmp16_) {
#line 1244 "puzzle.c"
			gint _tmp17_;
			gint _tmp18_;
			gint _tmp19_;
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp17_ = y1;
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp18_ = y2;
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp19_ = abs (_tmp17_ - _tmp18_);
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp14_ = _tmp19_ == 1;
#line 1256 "puzzle.c"
		} else {
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp14_ = FALSE;
#line 1260 "puzzle.c"
		}
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp7_ = _tmp14_;
#line 1264 "puzzle.c"
	}
#line 210 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (!_tmp7_) {
#line 211 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		result = FALSE;
#line 211 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		return result;
#line 1272 "puzzle.c"
	}
#line 213 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp20_ = y1;
#line 213 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp21_ = y2;
#line 213 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp22_ = abs (_tmp20_ - _tmp21_);
#line 213 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp22_ == 1) {
#line 1282 "puzzle.c"
		gint _tmp23_;
		gint _tmp24_;
		gint _tmp29_;
		gint _tmp30_;
#line 215 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp23_ = y1;
#line 215 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp24_ = y2;
#line 215 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		if ((_tmp23_ - _tmp24_) < 0) {
#line 1293 "puzzle.c"
			gchar _tmp25_;
			gboolean _tmp26_;
#line 216 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp25_ = id;
#line 216 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp26_ = puzzle_check_valid_move (self, (gint) _tmp25_, 0, 1);
#line 216 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			if (_tmp26_) {
#line 1302 "puzzle.c"
				gchar _tmp27_;
				gboolean _tmp28_;
#line 217 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp27_ = id;
#line 217 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp28_ = puzzle_do_move_piece (self, _tmp27_, 0, 1);
#line 217 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				result = _tmp28_;
#line 217 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				return result;
#line 1313 "puzzle.c"
			}
		}
#line 218 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp29_ = y1;
#line 218 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp30_ = y2;
#line 218 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		if ((_tmp29_ - _tmp30_) > 0) {
#line 1322 "puzzle.c"
			gchar _tmp31_;
			gboolean _tmp32_;
#line 219 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp31_ = id;
#line 219 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp32_ = puzzle_check_valid_move (self, (gint) _tmp31_, 0, -1);
#line 219 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			if (_tmp32_) {
#line 1331 "puzzle.c"
				gchar _tmp33_;
				gboolean _tmp34_;
#line 220 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp33_ = id;
#line 220 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp34_ = puzzle_do_move_piece (self, _tmp33_, 0, -1);
#line 220 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				result = _tmp34_;
#line 220 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				return result;
#line 1342 "puzzle.c"
			}
		}
	}
#line 223 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp35_ = x1;
#line 223 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp36_ = x2;
#line 223 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp37_ = abs (_tmp35_ - _tmp36_);
#line 223 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	if (_tmp37_ == 1) {
#line 1354 "puzzle.c"
		gint _tmp38_;
		gint _tmp39_;
		gint _tmp44_;
		gint _tmp45_;
#line 225 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp38_ = x1;
#line 225 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp39_ = x2;
#line 225 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		if ((_tmp38_ - _tmp39_) < 0) {
#line 1365 "puzzle.c"
			gchar _tmp40_;
			gboolean _tmp41_;
#line 226 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp40_ = id;
#line 226 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp41_ = puzzle_check_valid_move (self, (gint) _tmp40_, 1, 0);
#line 226 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			if (_tmp41_) {
#line 1374 "puzzle.c"
				gchar _tmp42_;
				gboolean _tmp43_;
#line 227 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp42_ = id;
#line 227 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp43_ = puzzle_do_move_piece (self, _tmp42_, 1, 0);
#line 227 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				result = _tmp43_;
#line 227 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				return result;
#line 1385 "puzzle.c"
			}
		}
#line 228 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp44_ = x1;
#line 228 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		_tmp45_ = x2;
#line 228 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		if ((_tmp44_ - _tmp45_) > 0) {
#line 1394 "puzzle.c"
			gchar _tmp46_;
			gboolean _tmp47_;
#line 229 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp46_ = id;
#line 229 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp47_ = puzzle_check_valid_move (self, (gint) _tmp46_, -1, 0);
#line 229 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			if (_tmp47_) {
#line 1403 "puzzle.c"
				gchar _tmp48_;
				gboolean _tmp49_;
#line 230 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp48_ = id;
#line 230 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp49_ = puzzle_do_move_piece (self, _tmp48_, -1, 0);
#line 230 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				result = _tmp49_;
#line 230 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				return result;
#line 1414 "puzzle.c"
			}
		}
	}
#line 233 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	result = return_value;
#line 233 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return result;
#line 1422 "puzzle.c"
}


static gboolean puzzle_check_valid_move (Puzzle* self, gint id, gint dx, gint dy) {
	gboolean result = FALSE;
#line 236 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1430 "puzzle.c"
	{
		gint y = 0;
#line 238 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		y = 0;
#line 1435 "puzzle.c"
		{
			gboolean _tmp0_ = FALSE;
#line 238 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp0_ = TRUE;
#line 238 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			while (TRUE) {
#line 1442 "puzzle.c"
				gint _tmp2_;
				gint _tmp3_;
#line 238 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				if (!_tmp0_) {
#line 1447 "puzzle.c"
					gint _tmp1_;
#line 238 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					_tmp1_ = y;
#line 238 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					y = _tmp1_ + 1;
#line 1453 "puzzle.c"
				}
#line 238 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp0_ = FALSE;
#line 238 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp2_ = y;
#line 238 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp3_ = self->height;
#line 238 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				if (!(_tmp2_ < _tmp3_)) {
#line 238 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					break;
#line 1465 "puzzle.c"
				}
				{
					gint x = 0;
#line 240 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					x = 0;
#line 1471 "puzzle.c"
					{
						gboolean _tmp4_ = FALSE;
#line 240 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						_tmp4_ = TRUE;
#line 240 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						while (TRUE) {
#line 1478 "puzzle.c"
							gint _tmp6_;
							gint _tmp7_;
							gchar* _tmp8_;
							gint _tmp8__length1;
							gint _tmp9_;
							gint _tmp10_;
							gchar _tmp11_;
							gint _tmp12_;
#line 240 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (!_tmp4_) {
#line 1489 "puzzle.c"
								gint _tmp5_;
#line 240 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp5_ = x;
#line 240 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								x = _tmp5_ + 1;
#line 1495 "puzzle.c"
							}
#line 240 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp4_ = FALSE;
#line 240 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp6_ = x;
#line 240 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp7_ = self->width;
#line 240 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (!(_tmp6_ < _tmp7_)) {
#line 240 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								break;
#line 1507 "puzzle.c"
							}
#line 242 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp8_ = self->map;
#line 242 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp8__length1 = self->map_length1;
#line 242 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp9_ = x;
#line 242 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp10_ = y;
#line 242 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp11_ = puzzle_get_piece_id (self, _tmp8_, _tmp8__length1, _tmp9_, _tmp10_);
#line 242 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp12_ = id;
#line 242 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (((gint) _tmp11_) == _tmp12_) {
#line 1523 "puzzle.c"
								gchar z = '\0';
								gchar* _tmp13_;
								gint _tmp13__length1;
								gint _tmp14_;
								gint _tmp15_;
								gint _tmp16_;
								gint _tmp17_;
								gchar _tmp18_;
								gboolean _tmp19_ = FALSE;
								gboolean _tmp20_ = FALSE;
								gboolean _tmp21_ = FALSE;
								gchar _tmp22_;
#line 244 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp13_ = self->map;
#line 244 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp13__length1 = self->map_length1;
#line 244 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp14_ = x;
#line 244 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp15_ = dx;
#line 244 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp16_ = y;
#line 244 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp17_ = dy;
#line 244 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp18_ = puzzle_get_piece_id (self, _tmp13_, _tmp13__length1, _tmp14_ + _tmp15_, _tmp16_ + _tmp17_);
#line 244 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								z = _tmp18_;
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp22_ = z;
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								if (_tmp22_ == ' ') {
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									_tmp21_ = TRUE;
#line 1558 "puzzle.c"
								} else {
									gchar _tmp23_;
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									_tmp23_ = z;
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									_tmp21_ = _tmp23_ == '.';
#line 1565 "puzzle.c"
								}
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								if (_tmp21_) {
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									_tmp20_ = TRUE;
#line 1571 "puzzle.c"
								} else {
									gchar _tmp24_;
									gint _tmp25_;
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									_tmp24_ = z;
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									_tmp25_ = id;
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									_tmp20_ = ((gint) _tmp24_) == _tmp25_;
#line 1581 "puzzle.c"
								}
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								if (_tmp20_) {
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									_tmp19_ = TRUE;
#line 1587 "puzzle.c"
								} else {
									gboolean _tmp26_ = FALSE;
									gint _tmp27_;
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									_tmp27_ = id;
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									if (_tmp27_ == ((gint) '*')) {
#line 1595 "puzzle.c"
										gchar _tmp28_;
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
										_tmp28_ = z;
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
										_tmp26_ = _tmp28_ == '-';
#line 1601 "puzzle.c"
									} else {
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
										_tmp26_ = FALSE;
#line 1605 "puzzle.c"
									}
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									_tmp19_ = _tmp26_;
#line 1609 "puzzle.c"
								}
#line 245 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								if (!_tmp19_) {
#line 246 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									result = FALSE;
#line 246 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
									return result;
#line 1617 "puzzle.c"
								}
							}
						}
					}
				}
			}
		}
	}
#line 251 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	result = TRUE;
#line 251 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return result;
#line 1630 "puzzle.c"
}


static gchar* _vala_array_dup5 (gchar* self, int length) {
#line 256 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return g_memdup (self, length * sizeof (gchar));
#line 1637 "puzzle.c"
}


static gchar* _vala_array_dup6 (gchar* self, int length) {
#line 290 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return g_memdup (self, length * sizeof (gchar));
#line 1644 "puzzle.c"
}


static gboolean puzzle_do_move_piece (Puzzle* self, gchar id, gint dx, gint dy) {
	gboolean result = FALSE;
	gchar* tmpmap = NULL;
	gchar* _tmp0_;
	gint _tmp0__length1;
	gchar* _tmp1_;
	gint _tmp1__length1;
	gint tmpmap_length1;
	gint _tmpmap_size_;
	gchar* _tmp69_;
	gint _tmp69__length1;
	gchar* _tmp70_;
	gint _tmp70__length1;
#line 254 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 256 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp0_ = self->map;
#line 256 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp0__length1 = self->map_length1;
#line 256 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup5 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
#line 256 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp1__length1 = _tmp0__length1;
#line 256 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	tmpmap = _tmp1_;
#line 256 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	tmpmap_length1 = _tmp1__length1;
#line 256 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmpmap_size_ = tmpmap_length1;
#line 1677 "puzzle.c"
	{
		gint y = 0;
#line 259 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		y = 0;
#line 1682 "puzzle.c"
		{
			gboolean _tmp2_ = FALSE;
#line 259 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp2_ = TRUE;
#line 259 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			while (TRUE) {
#line 1689 "puzzle.c"
				gint _tmp4_;
				gint _tmp5_;
#line 259 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				if (!_tmp2_) {
#line 1694 "puzzle.c"
					gint _tmp3_;
#line 259 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					_tmp3_ = y;
#line 259 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					y = _tmp3_ + 1;
#line 1700 "puzzle.c"
				}
#line 259 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp2_ = FALSE;
#line 259 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp4_ = y;
#line 259 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp5_ = self->height;
#line 259 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				if (!(_tmp4_ < _tmp5_)) {
#line 259 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					break;
#line 1712 "puzzle.c"
				}
				{
					gint x = 0;
#line 260 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					x = 0;
#line 1718 "puzzle.c"
					{
						gboolean _tmp6_ = FALSE;
#line 260 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						_tmp6_ = TRUE;
#line 260 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						while (TRUE) {
#line 1725 "puzzle.c"
							gint _tmp8_;
							gint _tmp9_;
							gchar* _tmp10_;
							gint _tmp10__length1;
							gint _tmp11_;
							gint _tmp12_;
							gchar _tmp13_;
							gchar _tmp14_;
#line 260 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (!_tmp6_) {
#line 1736 "puzzle.c"
								gint _tmp7_;
#line 260 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp7_ = x;
#line 260 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								x = _tmp7_ + 1;
#line 1742 "puzzle.c"
							}
#line 260 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp6_ = FALSE;
#line 260 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp8_ = x;
#line 260 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp9_ = self->width;
#line 260 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (!(_tmp8_ < _tmp9_)) {
#line 260 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								break;
#line 1754 "puzzle.c"
							}
#line 261 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp10_ = tmpmap;
#line 261 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp10__length1 = tmpmap_length1;
#line 261 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp11_ = x;
#line 261 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp12_ = y;
#line 261 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp13_ = puzzle_get_piece_id (self, _tmp10_, _tmp10__length1, _tmp11_, _tmp12_);
#line 261 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp14_ = id;
#line 261 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (_tmp13_ == _tmp14_) {
#line 1770 "puzzle.c"
								gchar* _tmp15_;
								gint _tmp15__length1;
								gint _tmp16_;
								gint _tmp17_;
#line 262 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp15_ = tmpmap;
#line 262 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp15__length1 = tmpmap_length1;
#line 262 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp16_ = x;
#line 262 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp17_ = y;
#line 262 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								puzzle_set_piece_id (self, _tmp15_, _tmp15__length1, _tmp16_, _tmp17_, ' ');
#line 1785 "puzzle.c"
							}
						}
					}
				}
			}
		}
	}
	{
		gint y = 0;
#line 264 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		y = 0;
#line 1797 "puzzle.c"
		{
			gboolean _tmp18_ = FALSE;
#line 264 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp18_ = TRUE;
#line 264 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			while (TRUE) {
#line 1804 "puzzle.c"
				gint _tmp20_;
				gint _tmp21_;
#line 264 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				if (!_tmp18_) {
#line 1809 "puzzle.c"
					gint _tmp19_;
#line 264 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					_tmp19_ = y;
#line 264 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					y = _tmp19_ + 1;
#line 1815 "puzzle.c"
				}
#line 264 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp18_ = FALSE;
#line 264 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp20_ = y;
#line 264 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp21_ = self->height;
#line 264 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				if (!(_tmp20_ < _tmp21_)) {
#line 264 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					break;
#line 1827 "puzzle.c"
				}
				{
					gint x = 0;
#line 265 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					x = 0;
#line 1833 "puzzle.c"
					{
						gboolean _tmp22_ = FALSE;
#line 265 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						_tmp22_ = TRUE;
#line 265 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						while (TRUE) {
#line 1840 "puzzle.c"
							gint _tmp24_;
							gint _tmp25_;
							gchar* _tmp26_;
							gint _tmp26__length1;
							gint _tmp27_;
							gint _tmp28_;
							gchar _tmp29_;
							gchar _tmp30_;
#line 265 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (!_tmp22_) {
#line 1851 "puzzle.c"
								gint _tmp23_;
#line 265 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp23_ = x;
#line 265 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								x = _tmp23_ + 1;
#line 1857 "puzzle.c"
							}
#line 265 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp22_ = FALSE;
#line 265 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp24_ = x;
#line 265 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp25_ = self->width;
#line 265 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (!(_tmp24_ < _tmp25_)) {
#line 265 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								break;
#line 1869 "puzzle.c"
							}
#line 266 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp26_ = self->map;
#line 266 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp26__length1 = self->map_length1;
#line 266 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp27_ = x;
#line 266 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp28_ = y;
#line 266 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp29_ = puzzle_get_piece_id (self, _tmp26_, _tmp26__length1, _tmp27_, _tmp28_);
#line 266 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp30_ = id;
#line 266 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (_tmp29_ == _tmp30_) {
#line 1885 "puzzle.c"
								gchar* _tmp31_;
								gint _tmp31__length1;
								gint _tmp32_;
								gint _tmp33_;
								gint _tmp34_;
								gint _tmp35_;
								gchar _tmp36_;
#line 267 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp31_ = tmpmap;
#line 267 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp31__length1 = tmpmap_length1;
#line 267 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp32_ = x;
#line 267 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp33_ = dx;
#line 267 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp34_ = y;
#line 267 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp35_ = dy;
#line 267 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp36_ = id;
#line 267 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								puzzle_set_piece_id (self, _tmp31_, _tmp31__length1, _tmp32_ + _tmp33_, _tmp34_ + _tmp35_, _tmp36_);
#line 1909 "puzzle.c"
							}
						}
					}
				}
			}
		}
	}
	{
		gint y = 0;
#line 270 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
		y = 0;
#line 1921 "puzzle.c"
		{
			gboolean _tmp37_ = FALSE;
#line 270 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			_tmp37_ = TRUE;
#line 270 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
			while (TRUE) {
#line 1928 "puzzle.c"
				gint _tmp39_;
				gint _tmp40_;
#line 270 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				if (!_tmp37_) {
#line 1933 "puzzle.c"
					gint _tmp38_;
#line 270 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					_tmp38_ = y;
#line 270 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					y = _tmp38_ + 1;
#line 1939 "puzzle.c"
				}
#line 270 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp37_ = FALSE;
#line 270 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp39_ = y;
#line 270 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				_tmp40_ = self->height;
#line 270 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
				if (!(_tmp39_ < _tmp40_)) {
#line 270 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					break;
#line 1951 "puzzle.c"
				}
				{
					gint x = 0;
#line 272 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
					x = 0;
#line 1957 "puzzle.c"
					{
						gboolean _tmp41_ = FALSE;
#line 272 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						_tmp41_ = TRUE;
#line 272 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
						while (TRUE) {
#line 1964 "puzzle.c"
							gint _tmp43_;
							gint _tmp44_;
							gboolean _tmp45_ = FALSE;
							gchar* _tmp46_;
							gint _tmp46__length1;
							gint _tmp47_;
							gint _tmp48_;
							gchar _tmp49_;
							gboolean _tmp57_ = FALSE;
							gchar* _tmp58_;
							gint _tmp58__length1;
							gint _tmp59_;
							gint _tmp60_;
							gchar _tmp61_;
#line 272 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (!_tmp41_) {
#line 1981 "puzzle.c"
								gint _tmp42_;
#line 272 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp42_ = x;
#line 272 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								x = _tmp42_ + 1;
#line 1987 "puzzle.c"
							}
#line 272 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp41_ = FALSE;
#line 272 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp43_ = x;
#line 272 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp44_ = self->width;
#line 272 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (!(_tmp43_ < _tmp44_)) {
#line 272 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								break;
#line 1999 "puzzle.c"
							}
#line 274 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp46_ = tmpmap;
#line 274 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp46__length1 = tmpmap_length1;
#line 274 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp47_ = x;
#line 274 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp48_ = y;
#line 274 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp49_ = puzzle_get_piece_id (self, _tmp46_, _tmp46__length1, _tmp47_, _tmp48_);
#line 274 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (_tmp49_ == ' ') {
#line 2013 "puzzle.c"
								gchar* _tmp50_;
								gint _tmp50__length1;
								gint _tmp51_;
								gint _tmp52_;
								gchar _tmp53_;
#line 274 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp50_ = self->orig_map;
#line 274 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp50__length1 = self->orig_map_length1;
#line 274 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp51_ = x;
#line 274 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp52_ = y;
#line 274 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp53_ = puzzle_get_piece_id (self, _tmp50_, _tmp50__length1, _tmp51_, _tmp52_);
#line 274 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp45_ = _tmp53_ == '.';
#line 2031 "puzzle.c"
							} else {
#line 274 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp45_ = FALSE;
#line 2035 "puzzle.c"
							}
#line 274 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (_tmp45_) {
#line 2039 "puzzle.c"
								gchar* _tmp54_;
								gint _tmp54__length1;
								gint _tmp55_;
								gint _tmp56_;
#line 275 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp54_ = tmpmap;
#line 275 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp54__length1 = tmpmap_length1;
#line 275 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp55_ = x;
#line 275 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp56_ = y;
#line 275 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								puzzle_set_piece_id (self, _tmp54_, _tmp54__length1, _tmp55_, _tmp56_, '.');
#line 2054 "puzzle.c"
							}
#line 276 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp58_ = tmpmap;
#line 276 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp58__length1 = tmpmap_length1;
#line 276 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp59_ = x;
#line 276 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp60_ = y;
#line 276 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							_tmp61_ = puzzle_get_piece_id (self, _tmp58_, _tmp58__length1, _tmp59_, _tmp60_);
#line 276 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (_tmp61_ == ' ') {
#line 2068 "puzzle.c"
								gchar* _tmp62_;
								gint _tmp62__length1;
								gint _tmp63_;
								gint _tmp64_;
								gchar _tmp65_;
#line 276 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp62_ = self->orig_map;
#line 276 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp62__length1 = self->orig_map_length1;
#line 276 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp63_ = x;
#line 276 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp64_ = y;
#line 276 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp65_ = puzzle_get_piece_id (self, _tmp62_, _tmp62__length1, _tmp63_, _tmp64_);
#line 276 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp57_ = _tmp65_ == '-';
#line 2086 "puzzle.c"
							} else {
#line 276 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp57_ = FALSE;
#line 2090 "puzzle.c"
							}
#line 276 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
							if (_tmp57_) {
#line 2094 "puzzle.c"
								gchar* _tmp66_;
								gint _tmp66__length1;
								gint _tmp67_;
								gint _tmp68_;
#line 277 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp66_ = tmpmap;
#line 277 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp66__length1 = tmpmap_length1;
#line 277 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp67_ = x;
#line 277 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								_tmp68_ = y;
#line 277 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
								puzzle_set_piece_id (self, _tmp66_, _tmp66__length1, _tmp67_, _tmp68_, '-');
#line 2109 "puzzle.c"
							}
						}
					}
				}
			}
		}
	}
#line 288 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	g_signal_emit (self, puzzle_signals[PUZZLE_CHANGED_SIGNAL], 0);
#line 290 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp69_ = tmpmap;
#line 290 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp69__length1 = tmpmap_length1;
#line 290 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp70_ = (_tmp69_ != NULL) ? _vala_array_dup6 (_tmp69_, _tmp69__length1) : ((gpointer) _tmp69_);
#line 290 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	_tmp70__length1 = _tmp69__length1;
#line 290 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->map = (g_free (self->map), NULL);
#line 290 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->map = _tmp70_;
#line 290 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->map_length1 = _tmp70__length1;
#line 292 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	result = TRUE;
#line 292 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	tmpmap = (g_free (tmpmap), NULL);
#line 292 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	return result;
#line 2139 "puzzle.c"
}


static void puzzle_class_init (PuzzleClass * klass) {
#line 87 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	puzzle_parent_class = g_type_class_peek_parent (klass);
#line 87 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	G_OBJECT_CLASS (klass)->finalize = puzzle_finalize;
#line 87 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	puzzle_signals[PUZZLE_CHANGED_SIGNAL] = g_signal_new ("changed", TYPE_PUZZLE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 87 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	puzzle_signals[PUZZLE_MOVED_SIGNAL] = g_signal_new ("moved", TYPE_PUZZLE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 2152 "puzzle.c"
}


static void puzzle_instance_init (Puzzle * self) {
#line 98 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->moves = 0;
#line 2159 "puzzle.c"
}


static void puzzle_finalize (GObject * obj) {
	Puzzle * self;
#line 87 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PUZZLE, Puzzle);
#line 92 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->map = (g_free (self->map), NULL);
#line 93 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->move_map = (g_free (self->move_map), NULL);
#line 94 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->orig_map = (g_free (self->orig_map), NULL);
#line 95 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->lastmove_map = (g_free (self->lastmove_map), NULL);
#line 96 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	self->undomove_map = (g_free (self->undomove_map), NULL);
#line 87 "/home/mcatanzaro/Projects/GNOME/gnome-klotski/src/puzzle.vala"
	G_OBJECT_CLASS (puzzle_parent_class)->finalize (obj);
#line 2179 "puzzle.c"
}


GType puzzle_get_type (void) {
	static volatile gsize puzzle_type_id__volatile = 0;
	if (g_once_init_enter (&puzzle_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PuzzleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) puzzle_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Puzzle), 0, (GInstanceInitFunc) puzzle_instance_init, NULL };
		GType puzzle_type_id;
		puzzle_type_id = g_type_register_static (G_TYPE_OBJECT, "Puzzle", &g_define_type_info, 0);
		g_once_init_leave (&puzzle_type_id__volatile, puzzle_type_id);
	}
	return puzzle_type_id__volatile;
}



