/* puzzle.c generated by valac 0.30.0.15-6463e, 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 2 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;

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;
enum  {
	PUZZLE_DUMMY_PROPERTY
};
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/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	return g_memdup (self, length * sizeof (gchar));
#line 92 "puzzle.c"
}


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


static gchar string_get (const gchar* self, glong index) {
	gchar result = '\0';
	glong _tmp0_ = 0L;
	gchar _tmp1_ = '\0';
#line 996 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.30/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, '\0');
#line 997 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.30/vapi/glib-2.0.vapi"
	_tmp0_ = index;
#line 997 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.30/vapi/glib-2.0.vapi"
	_tmp1_ = ((gchar*) self)[_tmp0_];
#line 997 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.30/vapi/glib-2.0.vapi"
	result = _tmp1_;
#line 997 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.30/vapi/glib-2.0.vapi"
	return result;
#line 117 "puzzle.c"
}


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


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


Puzzle* puzzle_construct (GType object_type, gint width, gint height, const gchar* data) {
	Puzzle * self = NULL;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
	gchar* _tmp6_ = NULL;
	gint _tmp6__length1 = 0;
	gchar* _tmp7_ = NULL;
	gint _tmp7__length1 = 0;
	gchar* _tmp8_ = NULL;
	gint _tmp8__length1 = 0;
	const gchar* _tmp9_ = NULL;
	gchar* _tmp25_ = NULL;
	gint _tmp25__length1 = 0;
	gchar* _tmp26_ = NULL;
	gint _tmp26__length1 = 0;
	gchar* _tmp27_ = NULL;
	gint _tmp27__length1 = 0;
	gchar* _tmp28_ = NULL;
	gint _tmp28__length1 = 0;
#line 103 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self = (Puzzle*) g_object_new (object_type, NULL);
#line 105 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp0_ = width;
#line 105 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->width = _tmp0_;
#line 106 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp1_ = height;
#line 106 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->height = _tmp1_;
#line 107 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp2_ = width;
#line 107 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp3_ = height;
#line 107 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp4_ = g_new0 (gchar, (_tmp2_ + 2) * (_tmp3_ + 2));
#line 107 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->map = (g_free (self->map), NULL);
#line 107 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->map = _tmp4_;
#line 107 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->map_length1 = (_tmp2_ + 2) * (_tmp3_ + 2);
#line 108 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp5_ = self->map;
#line 108 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp5__length1 = self->map_length1;
#line 108 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp6_ = (_tmp5_ != NULL) ? _vala_array_dup1 (_tmp5_, _tmp5__length1) : ((gpointer) _tmp5_);
#line 108 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp6__length1 = _tmp5__length1;
#line 108 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->move_map = (g_free (self->move_map), NULL);
#line 108 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->move_map = _tmp6_;
#line 108 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->move_map_length1 = _tmp6__length1;
#line 109 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp7_ = self->map;
#line 109 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp7__length1 = self->map_length1;
#line 109 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp8_ = (_tmp7_ != NULL) ? _vala_array_dup2 (_tmp7_, _tmp7__length1) : ((gpointer) _tmp7_);
#line 109 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp8__length1 = _tmp7__length1;
#line 109 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->undomove_map = (g_free (self->undomove_map), NULL);
#line 109 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->undomove_map = _tmp8_;
#line 109 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->undomove_map_length1 = _tmp8__length1;
#line 110 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp9_ = data;
#line 110 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp9_ != NULL) {
#line 213 "puzzle.c"
		gint i = 0;
#line 112 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		i = 0;
#line 217 "puzzle.c"
		{
			gint y = 0;
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			y = 0;
#line 222 "puzzle.c"
			{
				gboolean _tmp10_ = FALSE;
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp10_ = TRUE;
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				while (TRUE) {
#line 229 "puzzle.c"
					gint _tmp12_ = 0;
					gint _tmp13_ = 0;
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					if (!_tmp10_) {
#line 234 "puzzle.c"
						gint _tmp11_ = 0;
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						_tmp11_ = y;
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						y = _tmp11_ + 1;
#line 240 "puzzle.c"
					}
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					_tmp10_ = FALSE;
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					_tmp12_ = y;
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					_tmp13_ = height;
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					if (!(_tmp12_ < _tmp13_)) {
#line 113 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						break;
#line 252 "puzzle.c"
					}
					{
						gint x = 0;
#line 115 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						x = 0;
#line 258 "puzzle.c"
						{
							gboolean _tmp14_ = FALSE;
#line 115 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp14_ = TRUE;
#line 115 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							while (TRUE) {
#line 265 "puzzle.c"
								gint _tmp16_ = 0;
								gint _tmp17_ = 0;
								gchar* _tmp18_ = NULL;
								gint _tmp18__length1 = 0;
								gint _tmp19_ = 0;
								gint _tmp20_ = 0;
								const gchar* _tmp21_ = NULL;
								gint _tmp22_ = 0;
								gchar _tmp23_ = '\0';
								gint _tmp24_ = 0;
#line 115 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								if (!_tmp14_) {
#line 278 "puzzle.c"
									gint _tmp15_ = 0;
#line 115 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									_tmp15_ = x;
#line 115 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									x = _tmp15_ + 1;
#line 284 "puzzle.c"
								}
#line 115 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp14_ = FALSE;
#line 115 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp16_ = x;
#line 115 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp17_ = width;
#line 115 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								if (!(_tmp16_ < _tmp17_)) {
#line 115 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									break;
#line 296 "puzzle.c"
								}
#line 117 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp18_ = self->map;
#line 117 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp18__length1 = self->map_length1;
#line 117 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp19_ = x;
#line 117 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp20_ = y;
#line 117 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp21_ = data;
#line 117 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp22_ = i;
#line 117 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp23_ = string_get (_tmp21_, (glong) _tmp22_);
#line 117 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								puzzle_set_piece_id (self, _tmp18_, _tmp18__length1, _tmp19_, _tmp20_, _tmp23_);
#line 118 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp24_ = i;
#line 118 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								i = _tmp24_ + 1;
#line 318 "puzzle.c"
							}
						}
					}
				}
			}
		}
	}
#line 122 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp25_ = self->map;
#line 122 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp25__length1 = self->map_length1;
#line 122 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp26_ = (_tmp25_ != NULL) ? _vala_array_dup3 (_tmp25_, _tmp25__length1) : ((gpointer) _tmp25_);
#line 122 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp26__length1 = _tmp25__length1;
#line 122 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->orig_map = (g_free (self->orig_map), NULL);
#line 122 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->orig_map = _tmp26_;
#line 122 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->orig_map_length1 = _tmp26__length1;
#line 123 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp27_ = self->map;
#line 123 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp27__length1 = self->map_length1;
#line 123 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp28_ = (_tmp27_ != NULL) ? _vala_array_dup4 (_tmp27_, _tmp27__length1) : ((gpointer) _tmp27_);
#line 123 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp28__length1 = _tmp27__length1;
#line 123 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->lastmove_map = (g_free (self->lastmove_map), NULL);
#line 123 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->lastmove_map = _tmp28_;
#line 123 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->lastmove_map_length1 = _tmp28__length1;
#line 103 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	return self;
#line 356 "puzzle.c"
}


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


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


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


gint puzzle_get_piece_nr (Puzzle* self, gint x, gint y) {
	gint result = 0;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gchar c = '\0';
	gchar* _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	gchar _tmp6_ = '\0';
	gchar _tmp7_ = '\0';
	gchar _tmp8_ = '\0';
	gchar _tmp9_ = '\0';
	gint nr = 0;
	gchar* _tmp10_ = NULL;
	gint _tmp10__length1 = 0;
	gint _tmp11_ = 0;
	gint _tmp12_ = 0;
	gint _tmp13_ = 0;
	gchar _tmp14_ = '\0';
	gchar _tmp15_ = '\0';
	gchar* _tmp17_ = NULL;
	gint _tmp17__length1 = 0;
	gint _tmp18_ = 0;
	gint _tmp19_ = 0;
	gint _tmp20_ = 0;
	gchar _tmp21_ = '\0';
	gchar _tmp22_ = '\0';
	gchar* _tmp24_ = NULL;
	gint _tmp24__length1 = 0;
	gint _tmp25_ = 0;
	gint _tmp26_ = 0;
	gint _tmp27_ = 0;
	gchar _tmp28_ = '\0';
	gchar _tmp29_ = '\0';
	gchar* _tmp31_ = NULL;
	gint _tmp31__length1 = 0;
	gint _tmp32_ = 0;
	gint _tmp33_ = 0;
	gint _tmp34_ = 0;
	gchar _tmp35_ = '\0';
	gchar _tmp36_ = '\0';
	gchar* _tmp38_ = NULL;
	gint _tmp38__length1 = 0;
	gint _tmp39_ = 0;
	gint _tmp40_ = 0;
	gint _tmp41_ = 0;
	gchar _tmp42_ = '\0';
	gchar _tmp43_ = '\0';
	gchar* _tmp45_ = NULL;
	gint _tmp45__length1 = 0;
	gint _tmp46_ = 0;
	gint _tmp47_ = 0;
	gint _tmp48_ = 0;
	gchar _tmp49_ = '\0';
	gchar _tmp50_ = '\0';
	gchar* _tmp52_ = NULL;
	gint _tmp52__length1 = 0;
	gint _tmp53_ = 0;
	gint _tmp54_ = 0;
	gint _tmp55_ = 0;
	gchar _tmp56_ = '\0';
	gchar _tmp57_ = '\0';
	gchar* _tmp59_ = NULL;
	gint _tmp59__length1 = 0;
	gint _tmp60_ = 0;
	gint _tmp61_ = 0;
	gint _tmp62_ = 0;
	gchar _tmp63_ = '\0';
	gchar _tmp64_ = '\0';
	gint i = 0;
	gint _tmp73_ = 0;
	gint _tmp74_ = 0;
#line 136 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 138 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp0_ = x;
#line 138 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	x = _tmp0_ + 1;
#line 139 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp1_ = y;
#line 139 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	y = _tmp1_ + 1;
#line 141 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp2_ = self->map;
#line 141 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp2__length1 = self->map_length1;
#line 141 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp3_ = x;
#line 141 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp4_ = y;
#line 141 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp5_ = self->width;
#line 141 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp6_ = _tmp2_[_tmp3_ + (_tmp4_ * (_tmp5_ + 2))];
#line 141 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	c = _tmp6_;
#line 142 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp7_ = c;
#line 142 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp7_ == '-') {
#line 143 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		result = 23;
#line 143 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		return result;
#line 533 "puzzle.c"
	}
#line 144 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp8_ = c;
#line 144 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp8_ == ' ') {
#line 145 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		result = 21;
#line 145 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		return result;
#line 543 "puzzle.c"
	}
#line 146 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp9_ = c;
#line 146 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp9_ == '.') {
#line 147 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		result = 20;
#line 147 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		return result;
#line 553 "puzzle.c"
	}
#line 149 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	nr = 0;
#line 150 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp10_ = self->map;
#line 150 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp10__length1 = self->map_length1;
#line 150 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp11_ = x;
#line 150 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp12_ = y;
#line 150 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp13_ = self->width;
#line 150 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp14_ = _tmp10_[(_tmp11_ - 1) + ((_tmp12_ - 1) * (_tmp13_ + 2))];
#line 150 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp15_ = c;
#line 150 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp14_ == _tmp15_) {
#line 573 "puzzle.c"
		gint _tmp16_ = 0;
#line 151 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp16_ = nr;
#line 151 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		nr = _tmp16_ + 1;
#line 579 "puzzle.c"
	}
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp17_ = self->map;
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp17__length1 = self->map_length1;
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp18_ = x;
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp19_ = y;
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp20_ = self->width;
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp21_ = _tmp17_[(_tmp18_ - 0) + ((_tmp19_ - 1) * (_tmp20_ + 2))];
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp22_ = c;
#line 152 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp21_ == _tmp22_) {
#line 597 "puzzle.c"
		gint _tmp23_ = 0;
#line 153 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp23_ = nr;
#line 153 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		nr = _tmp23_ + 2;
#line 603 "puzzle.c"
	}
#line 154 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp24_ = self->map;
#line 154 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp24__length1 = self->map_length1;
#line 154 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp25_ = x;
#line 154 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp26_ = y;
#line 154 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp27_ = self->width;
#line 154 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp28_ = _tmp24_[(_tmp25_ + 1) + ((_tmp26_ - 1) * (_tmp27_ + 2))];
#line 154 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp29_ = c;
#line 154 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp28_ == _tmp29_) {
#line 621 "puzzle.c"
		gint _tmp30_ = 0;
#line 155 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp30_ = nr;
#line 155 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		nr = _tmp30_ + 4;
#line 627 "puzzle.c"
	}
#line 156 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp31_ = self->map;
#line 156 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp31__length1 = self->map_length1;
#line 156 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp32_ = x;
#line 156 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp33_ = y;
#line 156 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp34_ = self->width;
#line 156 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp35_ = _tmp31_[(_tmp32_ - 1) + ((_tmp33_ - 0) * (_tmp34_ + 2))];
#line 156 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp36_ = c;
#line 156 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp35_ == _tmp36_) {
#line 645 "puzzle.c"
		gint _tmp37_ = 0;
#line 157 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp37_ = nr;
#line 157 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		nr = _tmp37_ + 8;
#line 651 "puzzle.c"
	}
#line 158 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp38_ = self->map;
#line 158 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp38__length1 = self->map_length1;
#line 158 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp39_ = x;
#line 158 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp40_ = y;
#line 158 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp41_ = self->width;
#line 158 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp42_ = _tmp38_[(_tmp39_ + 1) + ((_tmp40_ - 0) * (_tmp41_ + 2))];
#line 158 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp43_ = c;
#line 158 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp42_ == _tmp43_) {
#line 669 "puzzle.c"
		gint _tmp44_ = 0;
#line 159 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp44_ = nr;
#line 159 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		nr = _tmp44_ + 16;
#line 675 "puzzle.c"
	}
#line 160 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp45_ = self->map;
#line 160 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp45__length1 = self->map_length1;
#line 160 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp46_ = x;
#line 160 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp47_ = y;
#line 160 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp48_ = self->width;
#line 160 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp49_ = _tmp45_[(_tmp46_ - 1) + ((_tmp47_ + 1) * (_tmp48_ + 2))];
#line 160 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp50_ = c;
#line 160 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp49_ == _tmp50_) {
#line 693 "puzzle.c"
		gint _tmp51_ = 0;
#line 161 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp51_ = nr;
#line 161 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		nr = _tmp51_ + 32;
#line 699 "puzzle.c"
	}
#line 162 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp52_ = self->map;
#line 162 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp52__length1 = self->map_length1;
#line 162 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp53_ = x;
#line 162 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp54_ = y;
#line 162 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp55_ = self->width;
#line 162 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp56_ = _tmp52_[(_tmp53_ - 0) + ((_tmp54_ + 1) * (_tmp55_ + 2))];
#line 162 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp57_ = c;
#line 162 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp56_ == _tmp57_) {
#line 717 "puzzle.c"
		gint _tmp58_ = 0;
#line 163 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp58_ = nr;
#line 163 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		nr = _tmp58_ + 64;
#line 723 "puzzle.c"
	}
#line 164 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp59_ = self->map;
#line 164 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp59__length1 = self->map_length1;
#line 164 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp60_ = x;
#line 164 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp61_ = y;
#line 164 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp62_ = self->width;
#line 164 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp63_ = _tmp59_[(_tmp60_ + 1) + ((_tmp61_ + 1) * (_tmp62_ + 2))];
#line 164 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp64_ = c;
#line 164 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp63_ == _tmp64_) {
#line 741 "puzzle.c"
		gint _tmp65_ = 0;
#line 165 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp65_ = nr;
#line 165 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		nr = _tmp65_ + 128;
#line 747 "puzzle.c"
	}
#line 167 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	i = 0;
#line 168 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	while (TRUE) {
#line 753 "puzzle.c"
		gboolean _tmp66_ = FALSE;
		gint _tmp67_ = 0;
		gint _tmp68_ = 0;
		gint _tmp69_ = 0;
		gint _tmp72_ = 0;
#line 168 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp67_ = nr;
#line 168 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp68_ = i;
#line 168 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp69_ = image_map[_tmp68_];
#line 168 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		if (_tmp67_ != _tmp69_) {
#line 767 "puzzle.c"
			gint _tmp70_ = 0;
			gint _tmp71_ = 0;
#line 168 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp70_ = i;
#line 168 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp71_ = image_map[_tmp70_];
#line 168 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp66_ = _tmp71_ != -1;
#line 776 "puzzle.c"
		} else {
#line 168 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp66_ = FALSE;
#line 780 "puzzle.c"
		}
#line 168 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		if (!_tmp66_) {
#line 168 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			break;
#line 786 "puzzle.c"
		}
#line 169 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp72_ = i;
#line 169 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		i = _tmp72_ + 2;
#line 792 "puzzle.c"
	}
#line 171 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp73_ = i;
#line 171 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp74_ = image_map[_tmp73_ + 1];
#line 171 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	result = _tmp74_;
#line 171 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	return result;
#line 802 "puzzle.c"
}


gboolean puzzle_game_over (Puzzle* self) {
	gboolean result = FALSE;
	gboolean over = FALSE;
#line 174 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 176 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	over = TRUE;
#line 813 "puzzle.c"
	{
		gint y = 0;
#line 177 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		y = 0;
#line 818 "puzzle.c"
		{
			gboolean _tmp0_ = FALSE;
#line 177 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp0_ = TRUE;
#line 177 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			while (TRUE) {
#line 825 "puzzle.c"
				gint _tmp2_ = 0;
				gint _tmp3_ = 0;
#line 177 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				if (!_tmp0_) {
#line 830 "puzzle.c"
					gint _tmp1_ = 0;
#line 177 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					_tmp1_ = y;
#line 177 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					y = _tmp1_ + 1;
#line 836 "puzzle.c"
				}
#line 177 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp0_ = FALSE;
#line 177 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp2_ = y;
#line 177 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp3_ = self->height;
#line 177 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				if (!(_tmp2_ < _tmp3_)) {
#line 177 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					break;
#line 848 "puzzle.c"
				}
				{
					gint x = 0;
#line 178 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					x = 0;
#line 854 "puzzle.c"
					{
						gboolean _tmp4_ = FALSE;
#line 178 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						_tmp4_ = TRUE;
#line 178 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						while (TRUE) {
#line 861 "puzzle.c"
							gint _tmp6_ = 0;
							gint _tmp7_ = 0;
							gboolean _tmp8_ = FALSE;
							gchar* _tmp9_ = NULL;
							gint _tmp9__length1 = 0;
							gint _tmp10_ = 0;
							gint _tmp11_ = 0;
							gchar _tmp12_ = '\0';
#line 178 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (!_tmp4_) {
#line 872 "puzzle.c"
								gint _tmp5_ = 0;
#line 178 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp5_ = x;
#line 178 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								x = _tmp5_ + 1;
#line 878 "puzzle.c"
							}
#line 178 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp4_ = FALSE;
#line 178 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp6_ = x;
#line 178 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp7_ = self->width;
#line 178 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (!(_tmp6_ < _tmp7_)) {
#line 178 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								break;
#line 890 "puzzle.c"
							}
#line 179 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp9_ = self->map;
#line 179 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp9__length1 = self->map_length1;
#line 179 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp10_ = x;
#line 179 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp11_ = y;
#line 179 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp12_ = puzzle_get_piece_id (self, _tmp9_, _tmp9__length1, _tmp10_, _tmp11_);
#line 179 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (_tmp12_ == '*') {
#line 904 "puzzle.c"
								gchar* _tmp13_ = NULL;
								gint _tmp13__length1 = 0;
								gint _tmp14_ = 0;
								gint _tmp15_ = 0;
								gchar _tmp16_ = '\0';
#line 179 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp13_ = self->orig_map;
#line 179 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp13__length1 = self->orig_map_length1;
#line 179 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp14_ = x;
#line 179 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp15_ = y;
#line 179 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp16_ = puzzle_get_piece_id (self, _tmp13_, _tmp13__length1, _tmp14_, _tmp15_);
#line 179 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp8_ = _tmp16_ != '.';
#line 922 "puzzle.c"
							} else {
#line 179 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp8_ = FALSE;
#line 926 "puzzle.c"
							}
#line 179 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (_tmp8_) {
#line 180 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								over = FALSE;
#line 932 "puzzle.c"
							}
						}
					}
				}
			}
		}
	}
#line 181 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	result = over;
#line 181 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	return result;
#line 944 "puzzle.c"
}


gboolean puzzle_mapcmp (Puzzle* self, gchar* m1, int m1_length1, gchar* m2, int m2_length1) {
	gboolean result = FALSE;
#line 184 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 952 "puzzle.c"
	{
		gint y = 0;
#line 186 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		y = 0;
#line 957 "puzzle.c"
		{
			gboolean _tmp0_ = FALSE;
#line 186 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp0_ = TRUE;
#line 186 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			while (TRUE) {
#line 964 "puzzle.c"
				gint _tmp2_ = 0;
				gint _tmp3_ = 0;
#line 186 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				if (!_tmp0_) {
#line 969 "puzzle.c"
					gint _tmp1_ = 0;
#line 186 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					_tmp1_ = y;
#line 186 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					y = _tmp1_ + 1;
#line 975 "puzzle.c"
				}
#line 186 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp0_ = FALSE;
#line 186 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp2_ = y;
#line 186 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp3_ = self->height;
#line 186 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				if (!(_tmp2_ < _tmp3_)) {
#line 186 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					break;
#line 987 "puzzle.c"
				}
				{
					gint x = 0;
#line 187 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					x = 0;
#line 993 "puzzle.c"
					{
						gboolean _tmp4_ = FALSE;
#line 187 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						_tmp4_ = TRUE;
#line 187 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						while (TRUE) {
#line 1000 "puzzle.c"
							gint _tmp6_ = 0;
							gint _tmp7_ = 0;
							gchar* _tmp8_ = NULL;
							gint _tmp8__length1 = 0;
							gint _tmp9_ = 0;
							gint _tmp10_ = 0;
							gchar _tmp11_ = '\0';
							gchar* _tmp12_ = NULL;
							gint _tmp12__length1 = 0;
							gint _tmp13_ = 0;
							gint _tmp14_ = 0;
							gchar _tmp15_ = '\0';
#line 187 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (!_tmp4_) {
#line 1015 "puzzle.c"
								gint _tmp5_ = 0;
#line 187 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp5_ = x;
#line 187 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								x = _tmp5_ + 1;
#line 1021 "puzzle.c"
							}
#line 187 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp4_ = FALSE;
#line 187 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp6_ = x;
#line 187 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp7_ = self->width;
#line 187 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (!(_tmp6_ < _tmp7_)) {
#line 187 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								break;
#line 1033 "puzzle.c"
							}
#line 188 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp8_ = m1;
#line 188 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp8__length1 = m1_length1;
#line 188 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp9_ = x;
#line 188 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp10_ = y;
#line 188 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp11_ = puzzle_get_piece_id (self, _tmp8_, _tmp8__length1, _tmp9_, _tmp10_);
#line 188 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp12_ = m2;
#line 188 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp12__length1 = m2_length1;
#line 188 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp13_ = x;
#line 188 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp14_ = y;
#line 188 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp15_ = puzzle_get_piece_id (self, _tmp12_, _tmp12__length1, _tmp13_, _tmp14_);
#line 188 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (_tmp11_ != _tmp15_) {
#line 189 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								result = TRUE;
#line 189 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								return result;
#line 1061 "puzzle.c"
							}
						}
					}
				}
			}
		}
	}
#line 190 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	result = FALSE;
#line 190 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	return result;
#line 1073 "puzzle.c"
}


gboolean puzzle_movable (Puzzle* self, gint id) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gint _tmp3_ = 0;
#line 193 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 195 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp3_ = id;
#line 195 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp3_ == ((gint) '#')) {
#line 195 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp2_ = TRUE;
#line 1091 "puzzle.c"
	} else {
		gint _tmp4_ = 0;
#line 195 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp4_ = id;
#line 195 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp2_ = _tmp4_ == ((gint) '.');
#line 1098 "puzzle.c"
	}
#line 195 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp2_) {
#line 195 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp1_ = TRUE;
#line 1104 "puzzle.c"
	} else {
		gint _tmp5_ = 0;
#line 195 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp5_ = id;
#line 195 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp1_ = _tmp5_ == ((gint) ' ');
#line 1111 "puzzle.c"
	}
#line 195 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp1_) {
#line 195 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp0_ = TRUE;
#line 1117 "puzzle.c"
	} else {
		gint _tmp6_ = 0;
#line 195 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp6_ = id;
#line 195 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp0_ = _tmp6_ == ((gint) '-');
#line 1124 "puzzle.c"
	}
#line 195 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp0_) {
#line 196 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		result = FALSE;
#line 196 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		return result;
#line 1132 "puzzle.c"
	}
#line 197 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	result = TRUE;
#line 197 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	return result;
#line 1138 "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_ = '\0';
	gboolean _tmp1_ = FALSE;
	gchar* _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	gchar _tmp5_ = '\0';
	gchar _tmp6_ = '\0';
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gint _tmp9_ = 0;
	gint _tmp10_ = 0;
	gint _tmp20_ = 0;
	gint _tmp21_ = 0;
	gint _tmp22_ = 0;
	gint _tmp35_ = 0;
	gint _tmp36_ = 0;
	gint _tmp37_ = 0;
#line 200 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 202 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	return_value = FALSE;
#line 204 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp0_ = id;
#line 204 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp1_ = puzzle_movable (self, (gint) _tmp0_);
#line 204 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (!_tmp1_) {
#line 205 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		result = FALSE;
#line 205 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		return result;
#line 1177 "puzzle.c"
	}
#line 207 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp2_ = self->map;
#line 207 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp2__length1 = self->map_length1;
#line 207 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp3_ = x2;
#line 207 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp4_ = y2;
#line 207 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp5_ = puzzle_get_piece_id (self, _tmp2_, _tmp2__length1, _tmp3_, _tmp4_);
#line 207 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp6_ = id;
#line 207 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp5_ == _tmp6_) {
#line 208 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		return_value = TRUE;
#line 1195 "puzzle.c"
	}
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp9_ = y1;
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp10_ = y2;
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp9_ == _tmp10_) {
#line 1203 "puzzle.c"
		gint _tmp11_ = 0;
		gint _tmp12_ = 0;
		gint _tmp13_ = 0;
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp11_ = x1;
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp12_ = x2;
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp13_ = abs (_tmp11_ - _tmp12_);
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp8_ = _tmp13_ == 1;
#line 1215 "puzzle.c"
	} else {
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp8_ = FALSE;
#line 1219 "puzzle.c"
	}
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp8_) {
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp7_ = TRUE;
#line 1225 "puzzle.c"
	} else {
		gboolean _tmp14_ = FALSE;
		gint _tmp15_ = 0;
		gint _tmp16_ = 0;
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp15_ = x1;
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp16_ = x2;
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		if (_tmp15_ == _tmp16_) {
#line 1236 "puzzle.c"
			gint _tmp17_ = 0;
			gint _tmp18_ = 0;
			gint _tmp19_ = 0;
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp17_ = y1;
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp18_ = y2;
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp19_ = abs (_tmp17_ - _tmp18_);
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp14_ = _tmp19_ == 1;
#line 1248 "puzzle.c"
		} else {
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp14_ = FALSE;
#line 1252 "puzzle.c"
		}
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp7_ = _tmp14_;
#line 1256 "puzzle.c"
	}
#line 210 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (!_tmp7_) {
#line 211 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		result = FALSE;
#line 211 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		return result;
#line 1264 "puzzle.c"
	}
#line 213 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp20_ = y1;
#line 213 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp21_ = y2;
#line 213 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp22_ = abs (_tmp20_ - _tmp21_);
#line 213 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp22_ == 1) {
#line 1274 "puzzle.c"
		gint _tmp23_ = 0;
		gint _tmp24_ = 0;
		gint _tmp29_ = 0;
		gint _tmp30_ = 0;
#line 215 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp23_ = y1;
#line 215 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp24_ = y2;
#line 215 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		if ((_tmp23_ - _tmp24_) < 0) {
#line 1285 "puzzle.c"
			gchar _tmp25_ = '\0';
			gboolean _tmp26_ = FALSE;
#line 216 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp25_ = id;
#line 216 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp26_ = puzzle_check_valid_move (self, (gint) _tmp25_, 0, 1);
#line 216 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			if (_tmp26_) {
#line 1294 "puzzle.c"
				gchar _tmp27_ = '\0';
				gboolean _tmp28_ = FALSE;
#line 217 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp27_ = id;
#line 217 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp28_ = puzzle_do_move_piece (self, _tmp27_, 0, 1);
#line 217 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				result = _tmp28_;
#line 217 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				return result;
#line 1305 "puzzle.c"
			}
		}
#line 218 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp29_ = y1;
#line 218 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp30_ = y2;
#line 218 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		if ((_tmp29_ - _tmp30_) > 0) {
#line 1314 "puzzle.c"
			gchar _tmp31_ = '\0';
			gboolean _tmp32_ = FALSE;
#line 219 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp31_ = id;
#line 219 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp32_ = puzzle_check_valid_move (self, (gint) _tmp31_, 0, -1);
#line 219 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			if (_tmp32_) {
#line 1323 "puzzle.c"
				gchar _tmp33_ = '\0';
				gboolean _tmp34_ = FALSE;
#line 220 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp33_ = id;
#line 220 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp34_ = puzzle_do_move_piece (self, _tmp33_, 0, -1);
#line 220 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				result = _tmp34_;
#line 220 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				return result;
#line 1334 "puzzle.c"
			}
		}
	}
#line 223 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp35_ = x1;
#line 223 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp36_ = x2;
#line 223 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp37_ = abs (_tmp35_ - _tmp36_);
#line 223 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	if (_tmp37_ == 1) {
#line 1346 "puzzle.c"
		gint _tmp38_ = 0;
		gint _tmp39_ = 0;
		gint _tmp44_ = 0;
		gint _tmp45_ = 0;
#line 225 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp38_ = x1;
#line 225 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp39_ = x2;
#line 225 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		if ((_tmp38_ - _tmp39_) < 0) {
#line 1357 "puzzle.c"
			gchar _tmp40_ = '\0';
			gboolean _tmp41_ = FALSE;
#line 226 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp40_ = id;
#line 226 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp41_ = puzzle_check_valid_move (self, (gint) _tmp40_, 1, 0);
#line 226 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			if (_tmp41_) {
#line 1366 "puzzle.c"
				gchar _tmp42_ = '\0';
				gboolean _tmp43_ = FALSE;
#line 227 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp42_ = id;
#line 227 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp43_ = puzzle_do_move_piece (self, _tmp42_, 1, 0);
#line 227 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				result = _tmp43_;
#line 227 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				return result;
#line 1377 "puzzle.c"
			}
		}
#line 228 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp44_ = x1;
#line 228 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		_tmp45_ = x2;
#line 228 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		if ((_tmp44_ - _tmp45_) > 0) {
#line 1386 "puzzle.c"
			gchar _tmp46_ = '\0';
			gboolean _tmp47_ = FALSE;
#line 229 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp46_ = id;
#line 229 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp47_ = puzzle_check_valid_move (self, (gint) _tmp46_, -1, 0);
#line 229 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			if (_tmp47_) {
#line 1395 "puzzle.c"
				gchar _tmp48_ = '\0';
				gboolean _tmp49_ = FALSE;
#line 230 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp48_ = id;
#line 230 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp49_ = puzzle_do_move_piece (self, _tmp48_, -1, 0);
#line 230 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				result = _tmp49_;
#line 230 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				return result;
#line 1406 "puzzle.c"
			}
		}
	}
#line 233 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	result = return_value;
#line 233 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	return result;
#line 1414 "puzzle.c"
}


static gboolean puzzle_check_valid_move (Puzzle* self, gint id, gint dx, gint dy) {
	gboolean result = FALSE;
#line 236 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1422 "puzzle.c"
	{
		gint y = 0;
#line 238 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		y = 0;
#line 1427 "puzzle.c"
		{
			gboolean _tmp0_ = FALSE;
#line 238 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp0_ = TRUE;
#line 238 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			while (TRUE) {
#line 1434 "puzzle.c"
				gint _tmp2_ = 0;
				gint _tmp3_ = 0;
#line 238 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				if (!_tmp0_) {
#line 1439 "puzzle.c"
					gint _tmp1_ = 0;
#line 238 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					_tmp1_ = y;
#line 238 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					y = _tmp1_ + 1;
#line 1445 "puzzle.c"
				}
#line 238 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp0_ = FALSE;
#line 238 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp2_ = y;
#line 238 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp3_ = self->height;
#line 238 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				if (!(_tmp2_ < _tmp3_)) {
#line 238 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					break;
#line 1457 "puzzle.c"
				}
				{
					gint x = 0;
#line 240 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					x = 0;
#line 1463 "puzzle.c"
					{
						gboolean _tmp4_ = FALSE;
#line 240 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						_tmp4_ = TRUE;
#line 240 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						while (TRUE) {
#line 1470 "puzzle.c"
							gint _tmp6_ = 0;
							gint _tmp7_ = 0;
							gchar* _tmp8_ = NULL;
							gint _tmp8__length1 = 0;
							gint _tmp9_ = 0;
							gint _tmp10_ = 0;
							gchar _tmp11_ = '\0';
							gint _tmp12_ = 0;
#line 240 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (!_tmp4_) {
#line 1481 "puzzle.c"
								gint _tmp5_ = 0;
#line 240 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp5_ = x;
#line 240 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								x = _tmp5_ + 1;
#line 1487 "puzzle.c"
							}
#line 240 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp4_ = FALSE;
#line 240 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp6_ = x;
#line 240 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp7_ = self->width;
#line 240 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (!(_tmp6_ < _tmp7_)) {
#line 240 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								break;
#line 1499 "puzzle.c"
							}
#line 242 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp8_ = self->map;
#line 242 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp8__length1 = self->map_length1;
#line 242 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp9_ = x;
#line 242 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp10_ = y;
#line 242 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp11_ = puzzle_get_piece_id (self, _tmp8_, _tmp8__length1, _tmp9_, _tmp10_);
#line 242 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp12_ = id;
#line 242 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (((gint) _tmp11_) == _tmp12_) {
#line 1515 "puzzle.c"
								gchar z = '\0';
								gchar* _tmp13_ = NULL;
								gint _tmp13__length1 = 0;
								gint _tmp14_ = 0;
								gint _tmp15_ = 0;
								gint _tmp16_ = 0;
								gint _tmp17_ = 0;
								gchar _tmp18_ = '\0';
								gboolean _tmp19_ = FALSE;
								gboolean _tmp20_ = FALSE;
								gboolean _tmp21_ = FALSE;
								gchar _tmp22_ = '\0';
#line 244 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp13_ = self->map;
#line 244 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp13__length1 = self->map_length1;
#line 244 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp14_ = x;
#line 244 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp15_ = dx;
#line 244 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp16_ = y;
#line 244 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp17_ = dy;
#line 244 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp18_ = puzzle_get_piece_id (self, _tmp13_, _tmp13__length1, _tmp14_ + _tmp15_, _tmp16_ + _tmp17_);
#line 244 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								z = _tmp18_;
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp22_ = z;
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								if (_tmp22_ == ' ') {
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									_tmp21_ = TRUE;
#line 1550 "puzzle.c"
								} else {
									gchar _tmp23_ = '\0';
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									_tmp23_ = z;
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									_tmp21_ = _tmp23_ == '.';
#line 1557 "puzzle.c"
								}
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								if (_tmp21_) {
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									_tmp20_ = TRUE;
#line 1563 "puzzle.c"
								} else {
									gchar _tmp24_ = '\0';
									gint _tmp25_ = 0;
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									_tmp24_ = z;
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									_tmp25_ = id;
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									_tmp20_ = ((gint) _tmp24_) == _tmp25_;
#line 1573 "puzzle.c"
								}
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								if (_tmp20_) {
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									_tmp19_ = TRUE;
#line 1579 "puzzle.c"
								} else {
									gboolean _tmp26_ = FALSE;
									gint _tmp27_ = 0;
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									_tmp27_ = id;
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									if (_tmp27_ == ((gint) '*')) {
#line 1587 "puzzle.c"
										gchar _tmp28_ = '\0';
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
										_tmp28_ = z;
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
										_tmp26_ = _tmp28_ == '-';
#line 1593 "puzzle.c"
									} else {
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
										_tmp26_ = FALSE;
#line 1597 "puzzle.c"
									}
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									_tmp19_ = _tmp26_;
#line 1601 "puzzle.c"
								}
#line 245 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								if (!_tmp19_) {
#line 246 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									result = FALSE;
#line 246 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
									return result;
#line 1609 "puzzle.c"
								}
							}
						}
					}
				}
			}
		}
	}
#line 251 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	result = TRUE;
#line 251 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	return result;
#line 1622 "puzzle.c"
}


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


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


static gboolean puzzle_do_move_piece (Puzzle* self, gchar id, gint dx, gint dy) {
	gboolean result = FALSE;
	gchar* tmpmap = NULL;
	gchar* _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	gchar* _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	gint tmpmap_length1 = 0;
	gint _tmpmap_size_ = 0;
	gchar* _tmp69_ = NULL;
	gint _tmp69__length1 = 0;
	gchar* _tmp70_ = NULL;
	gint _tmp70__length1 = 0;
#line 254 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 256 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp0_ = self->map;
#line 256 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp0__length1 = self->map_length1;
#line 256 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup5 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
#line 256 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp1__length1 = _tmp0__length1;
#line 256 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	tmpmap = _tmp1_;
#line 256 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	tmpmap_length1 = _tmp1__length1;
#line 256 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmpmap_size_ = tmpmap_length1;
#line 1669 "puzzle.c"
	{
		gint y = 0;
#line 259 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		y = 0;
#line 1674 "puzzle.c"
		{
			gboolean _tmp2_ = FALSE;
#line 259 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp2_ = TRUE;
#line 259 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			while (TRUE) {
#line 1681 "puzzle.c"
				gint _tmp4_ = 0;
				gint _tmp5_ = 0;
#line 259 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				if (!_tmp2_) {
#line 1686 "puzzle.c"
					gint _tmp3_ = 0;
#line 259 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					_tmp3_ = y;
#line 259 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					y = _tmp3_ + 1;
#line 1692 "puzzle.c"
				}
#line 259 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp2_ = FALSE;
#line 259 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp4_ = y;
#line 259 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp5_ = self->height;
#line 259 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				if (!(_tmp4_ < _tmp5_)) {
#line 259 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					break;
#line 1704 "puzzle.c"
				}
				{
					gint x = 0;
#line 260 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					x = 0;
#line 1710 "puzzle.c"
					{
						gboolean _tmp6_ = FALSE;
#line 260 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						_tmp6_ = TRUE;
#line 260 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						while (TRUE) {
#line 1717 "puzzle.c"
							gint _tmp8_ = 0;
							gint _tmp9_ = 0;
							gchar* _tmp10_ = NULL;
							gint _tmp10__length1 = 0;
							gint _tmp11_ = 0;
							gint _tmp12_ = 0;
							gchar _tmp13_ = '\0';
							gchar _tmp14_ = '\0';
#line 260 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (!_tmp6_) {
#line 1728 "puzzle.c"
								gint _tmp7_ = 0;
#line 260 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp7_ = x;
#line 260 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								x = _tmp7_ + 1;
#line 1734 "puzzle.c"
							}
#line 260 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp6_ = FALSE;
#line 260 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp8_ = x;
#line 260 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp9_ = self->width;
#line 260 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (!(_tmp8_ < _tmp9_)) {
#line 260 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								break;
#line 1746 "puzzle.c"
							}
#line 261 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp10_ = tmpmap;
#line 261 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp10__length1 = tmpmap_length1;
#line 261 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp11_ = x;
#line 261 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp12_ = y;
#line 261 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp13_ = puzzle_get_piece_id (self, _tmp10_, _tmp10__length1, _tmp11_, _tmp12_);
#line 261 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp14_ = id;
#line 261 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (_tmp13_ == _tmp14_) {
#line 1762 "puzzle.c"
								gchar* _tmp15_ = NULL;
								gint _tmp15__length1 = 0;
								gint _tmp16_ = 0;
								gint _tmp17_ = 0;
#line 262 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp15_ = tmpmap;
#line 262 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp15__length1 = tmpmap_length1;
#line 262 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp16_ = x;
#line 262 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp17_ = y;
#line 262 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								puzzle_set_piece_id (self, _tmp15_, _tmp15__length1, _tmp16_, _tmp17_, ' ');
#line 1777 "puzzle.c"
							}
						}
					}
				}
			}
		}
	}
	{
		gint y = 0;
#line 264 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		y = 0;
#line 1789 "puzzle.c"
		{
			gboolean _tmp18_ = FALSE;
#line 264 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp18_ = TRUE;
#line 264 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			while (TRUE) {
#line 1796 "puzzle.c"
				gint _tmp20_ = 0;
				gint _tmp21_ = 0;
#line 264 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				if (!_tmp18_) {
#line 1801 "puzzle.c"
					gint _tmp19_ = 0;
#line 264 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					_tmp19_ = y;
#line 264 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					y = _tmp19_ + 1;
#line 1807 "puzzle.c"
				}
#line 264 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp18_ = FALSE;
#line 264 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp20_ = y;
#line 264 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp21_ = self->height;
#line 264 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				if (!(_tmp20_ < _tmp21_)) {
#line 264 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					break;
#line 1819 "puzzle.c"
				}
				{
					gint x = 0;
#line 265 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					x = 0;
#line 1825 "puzzle.c"
					{
						gboolean _tmp22_ = FALSE;
#line 265 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						_tmp22_ = TRUE;
#line 265 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						while (TRUE) {
#line 1832 "puzzle.c"
							gint _tmp24_ = 0;
							gint _tmp25_ = 0;
							gchar* _tmp26_ = NULL;
							gint _tmp26__length1 = 0;
							gint _tmp27_ = 0;
							gint _tmp28_ = 0;
							gchar _tmp29_ = '\0';
							gchar _tmp30_ = '\0';
#line 265 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (!_tmp22_) {
#line 1843 "puzzle.c"
								gint _tmp23_ = 0;
#line 265 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp23_ = x;
#line 265 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								x = _tmp23_ + 1;
#line 1849 "puzzle.c"
							}
#line 265 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp22_ = FALSE;
#line 265 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp24_ = x;
#line 265 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp25_ = self->width;
#line 265 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (!(_tmp24_ < _tmp25_)) {
#line 265 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								break;
#line 1861 "puzzle.c"
							}
#line 266 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp26_ = self->map;
#line 266 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp26__length1 = self->map_length1;
#line 266 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp27_ = x;
#line 266 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp28_ = y;
#line 266 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp29_ = puzzle_get_piece_id (self, _tmp26_, _tmp26__length1, _tmp27_, _tmp28_);
#line 266 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp30_ = id;
#line 266 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (_tmp29_ == _tmp30_) {
#line 1877 "puzzle.c"
								gchar* _tmp31_ = NULL;
								gint _tmp31__length1 = 0;
								gint _tmp32_ = 0;
								gint _tmp33_ = 0;
								gint _tmp34_ = 0;
								gint _tmp35_ = 0;
								gchar _tmp36_ = '\0';
#line 267 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp31_ = tmpmap;
#line 267 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp31__length1 = tmpmap_length1;
#line 267 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp32_ = x;
#line 267 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp33_ = dx;
#line 267 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp34_ = y;
#line 267 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp35_ = dy;
#line 267 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp36_ = id;
#line 267 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								puzzle_set_piece_id (self, _tmp31_, _tmp31__length1, _tmp32_ + _tmp33_, _tmp34_ + _tmp35_, _tmp36_);
#line 1901 "puzzle.c"
							}
						}
					}
				}
			}
		}
	}
	{
		gint y = 0;
#line 270 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
		y = 0;
#line 1913 "puzzle.c"
		{
			gboolean _tmp37_ = FALSE;
#line 270 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			_tmp37_ = TRUE;
#line 270 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
			while (TRUE) {
#line 1920 "puzzle.c"
				gint _tmp39_ = 0;
				gint _tmp40_ = 0;
#line 270 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				if (!_tmp37_) {
#line 1925 "puzzle.c"
					gint _tmp38_ = 0;
#line 270 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					_tmp38_ = y;
#line 270 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					y = _tmp38_ + 1;
#line 1931 "puzzle.c"
				}
#line 270 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp37_ = FALSE;
#line 270 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp39_ = y;
#line 270 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				_tmp40_ = self->height;
#line 270 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
				if (!(_tmp39_ < _tmp40_)) {
#line 270 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					break;
#line 1943 "puzzle.c"
				}
				{
					gint x = 0;
#line 272 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
					x = 0;
#line 1949 "puzzle.c"
					{
						gboolean _tmp41_ = FALSE;
#line 272 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						_tmp41_ = TRUE;
#line 272 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
						while (TRUE) {
#line 1956 "puzzle.c"
							gint _tmp43_ = 0;
							gint _tmp44_ = 0;
							gboolean _tmp45_ = FALSE;
							gchar* _tmp46_ = NULL;
							gint _tmp46__length1 = 0;
							gint _tmp47_ = 0;
							gint _tmp48_ = 0;
							gchar _tmp49_ = '\0';
							gboolean _tmp57_ = FALSE;
							gchar* _tmp58_ = NULL;
							gint _tmp58__length1 = 0;
							gint _tmp59_ = 0;
							gint _tmp60_ = 0;
							gchar _tmp61_ = '\0';
#line 272 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (!_tmp41_) {
#line 1973 "puzzle.c"
								gint _tmp42_ = 0;
#line 272 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp42_ = x;
#line 272 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								x = _tmp42_ + 1;
#line 1979 "puzzle.c"
							}
#line 272 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp41_ = FALSE;
#line 272 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp43_ = x;
#line 272 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp44_ = self->width;
#line 272 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (!(_tmp43_ < _tmp44_)) {
#line 272 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								break;
#line 1991 "puzzle.c"
							}
#line 274 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp46_ = tmpmap;
#line 274 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp46__length1 = tmpmap_length1;
#line 274 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp47_ = x;
#line 274 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp48_ = y;
#line 274 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp49_ = puzzle_get_piece_id (self, _tmp46_, _tmp46__length1, _tmp47_, _tmp48_);
#line 274 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (_tmp49_ == ' ') {
#line 2005 "puzzle.c"
								gchar* _tmp50_ = NULL;
								gint _tmp50__length1 = 0;
								gint _tmp51_ = 0;
								gint _tmp52_ = 0;
								gchar _tmp53_ = '\0';
#line 274 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp50_ = self->orig_map;
#line 274 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp50__length1 = self->orig_map_length1;
#line 274 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp51_ = x;
#line 274 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp52_ = y;
#line 274 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp53_ = puzzle_get_piece_id (self, _tmp50_, _tmp50__length1, _tmp51_, _tmp52_);
#line 274 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp45_ = _tmp53_ == '.';
#line 2023 "puzzle.c"
							} else {
#line 274 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp45_ = FALSE;
#line 2027 "puzzle.c"
							}
#line 274 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (_tmp45_) {
#line 2031 "puzzle.c"
								gchar* _tmp54_ = NULL;
								gint _tmp54__length1 = 0;
								gint _tmp55_ = 0;
								gint _tmp56_ = 0;
#line 275 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp54_ = tmpmap;
#line 275 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp54__length1 = tmpmap_length1;
#line 275 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp55_ = x;
#line 275 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp56_ = y;
#line 275 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								puzzle_set_piece_id (self, _tmp54_, _tmp54__length1, _tmp55_, _tmp56_, '.');
#line 2046 "puzzle.c"
							}
#line 276 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp58_ = tmpmap;
#line 276 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp58__length1 = tmpmap_length1;
#line 276 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp59_ = x;
#line 276 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp60_ = y;
#line 276 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							_tmp61_ = puzzle_get_piece_id (self, _tmp58_, _tmp58__length1, _tmp59_, _tmp60_);
#line 276 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (_tmp61_ == ' ') {
#line 2060 "puzzle.c"
								gchar* _tmp62_ = NULL;
								gint _tmp62__length1 = 0;
								gint _tmp63_ = 0;
								gint _tmp64_ = 0;
								gchar _tmp65_ = '\0';
#line 276 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp62_ = self->orig_map;
#line 276 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp62__length1 = self->orig_map_length1;
#line 276 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp63_ = x;
#line 276 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp64_ = y;
#line 276 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp65_ = puzzle_get_piece_id (self, _tmp62_, _tmp62__length1, _tmp63_, _tmp64_);
#line 276 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp57_ = _tmp65_ == '-';
#line 2078 "puzzle.c"
							} else {
#line 276 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp57_ = FALSE;
#line 2082 "puzzle.c"
							}
#line 276 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
							if (_tmp57_) {
#line 2086 "puzzle.c"
								gchar* _tmp66_ = NULL;
								gint _tmp66__length1 = 0;
								gint _tmp67_ = 0;
								gint _tmp68_ = 0;
#line 277 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp66_ = tmpmap;
#line 277 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp66__length1 = tmpmap_length1;
#line 277 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp67_ = x;
#line 277 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								_tmp68_ = y;
#line 277 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
								puzzle_set_piece_id (self, _tmp66_, _tmp66__length1, _tmp67_, _tmp68_, '-');
#line 2101 "puzzle.c"
							}
						}
					}
				}
			}
		}
	}
#line 288 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	g_signal_emit_by_name (self, "changed");
#line 290 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp69_ = tmpmap;
#line 290 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp69__length1 = tmpmap_length1;
#line 290 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp70_ = (_tmp69_ != NULL) ? _vala_array_dup6 (_tmp69_, _tmp69__length1) : ((gpointer) _tmp69_);
#line 290 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	_tmp70__length1 = _tmp69__length1;
#line 290 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->map = (g_free (self->map), NULL);
#line 290 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->map = _tmp70_;
#line 290 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->map_length1 = _tmp70__length1;
#line 292 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	result = TRUE;
#line 292 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	tmpmap = (g_free (tmpmap), NULL);
#line 292 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	return result;
#line 2131 "puzzle.c"
}


static void puzzle_class_init (PuzzleClass * klass) {
#line 87 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	puzzle_parent_class = g_type_class_peek_parent (klass);
#line 87 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	G_OBJECT_CLASS (klass)->finalize = puzzle_finalize;
#line 87 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	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/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	g_signal_new ("moved", TYPE_PUZZLE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 2144 "puzzle.c"
}


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


static void puzzle_finalize (GObject* obj) {
	Puzzle * self;
#line 87 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PUZZLE, Puzzle);
#line 92 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->map = (g_free (self->map), NULL);
#line 93 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->move_map = (g_free (self->move_map), NULL);
#line 94 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->orig_map = (g_free (self->orig_map), NULL);
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->lastmove_map = (g_free (self->lastmove_map), NULL);
#line 96 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	self->undomove_map = (g_free (self->undomove_map), NULL);
#line 87 "/home/mcatanzaro/src/jhbuild/checkout/gnome-klotski/src/puzzle.vala"
	G_OBJECT_CLASS (puzzle_parent_class)->finalize (obj);
#line 2171 "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;
}



