/* treemap.c generated by valac 0.56.3, the Vala compiler
 * generated from treemap.vala, do not modify */

/* treemap.vala
 *
 * Copyright (C) 2009-2014  Maciej Piechotka
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Maciej Piechotka <uzytkownik2@gmail.com>
 */

#include "gee.h"
#include <glib.h>
#include <glib-object.h>
#include <gobject/gvaluecollector.h>

#define GEE_FUNCTIONS_TYPE_COMPARE_DATA_FUNC_CLOSURE (gee_functions_compare_data_func_closure_get_type ())
#define GEE_FUNCTIONS_COMPARE_DATA_FUNC_CLOSURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_FUNCTIONS_TYPE_COMPARE_DATA_FUNC_CLOSURE, GeeFunctionsCompareDataFuncClosure))
#define GEE_FUNCTIONS_COMPARE_DATA_FUNC_CLOSURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_FUNCTIONS_TYPE_COMPARE_DATA_FUNC_CLOSURE, GeeFunctionsCompareDataFuncClosureClass))
#define GEE_FUNCTIONS_IS_COMPARE_DATA_FUNC_CLOSURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_FUNCTIONS_TYPE_COMPARE_DATA_FUNC_CLOSURE))
#define GEE_FUNCTIONS_IS_COMPARE_DATA_FUNC_CLOSURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_FUNCTIONS_TYPE_COMPARE_DATA_FUNC_CLOSURE))
#define GEE_FUNCTIONS_COMPARE_DATA_FUNC_CLOSURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_FUNCTIONS_TYPE_COMPARE_DATA_FUNC_CLOSURE, GeeFunctionsCompareDataFuncClosureClass))

typedef struct _GeeFunctionsCompareDataFuncClosure GeeFunctionsCompareDataFuncClosure;
typedef struct _GeeFunctionsCompareDataFuncClosureClass GeeFunctionsCompareDataFuncClosureClass;

#define GEE_FUNCTIONS_TYPE_EQUAL_DATA_FUNC_CLOSURE (gee_functions_equal_data_func_closure_get_type ())
#define GEE_FUNCTIONS_EQUAL_DATA_FUNC_CLOSURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_FUNCTIONS_TYPE_EQUAL_DATA_FUNC_CLOSURE, GeeFunctionsEqualDataFuncClosure))
#define GEE_FUNCTIONS_EQUAL_DATA_FUNC_CLOSURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_FUNCTIONS_TYPE_EQUAL_DATA_FUNC_CLOSURE, GeeFunctionsEqualDataFuncClosureClass))
#define GEE_FUNCTIONS_IS_EQUAL_DATA_FUNC_CLOSURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_FUNCTIONS_TYPE_EQUAL_DATA_FUNC_CLOSURE))
#define GEE_FUNCTIONS_IS_EQUAL_DATA_FUNC_CLOSURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_FUNCTIONS_TYPE_EQUAL_DATA_FUNC_CLOSURE))
#define GEE_FUNCTIONS_EQUAL_DATA_FUNC_CLOSURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_FUNCTIONS_TYPE_EQUAL_DATA_FUNC_CLOSURE, GeeFunctionsEqualDataFuncClosureClass))

typedef struct _GeeFunctionsEqualDataFuncClosure GeeFunctionsEqualDataFuncClosure;
typedef struct _GeeFunctionsEqualDataFuncClosureClass GeeFunctionsEqualDataFuncClosureClass;
typedef struct _GeeTreeMapNode GeeTreeMapNode;
enum  {
	GEE_TREE_MAP_0_PROPERTY,
	GEE_TREE_MAP_K_TYPE,
	GEE_TREE_MAP_K_DUP_FUNC,
	GEE_TREE_MAP_K_DESTROY_FUNC,
	GEE_TREE_MAP_V_TYPE,
	GEE_TREE_MAP_V_DUP_FUNC,
	GEE_TREE_MAP_V_DESTROY_FUNC,
	GEE_TREE_MAP_SIZE_PROPERTY,
	GEE_TREE_MAP_READ_ONLY_PROPERTY,
	GEE_TREE_MAP_KEYS_PROPERTY,
	GEE_TREE_MAP_VALUES_PROPERTY,
	GEE_TREE_MAP_ENTRIES_PROPERTY,
	GEE_TREE_MAP_ASCENDING_KEYS_PROPERTY,
	GEE_TREE_MAP_ASCENDING_ENTRIES_PROPERTY,
	GEE_TREE_MAP_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_properties[GEE_TREE_MAP_NUM_PROPERTIES];
typedef enum  {
	GEE_TREE_MAP_RANGE_TYPE_HEAD,
	GEE_TREE_MAP_RANGE_TYPE_TAIL,
	GEE_TREE_MAP_RANGE_TYPE_EMPTY,
	GEE_TREE_MAP_RANGE_TYPE_BOUNDED
} GeeTreeMapRangeType;

#define GEE_TREE_MAP_TYPE_RANGE_TYPE (gee_tree_map_range_type_get_type ())
#define _gee_functions_compare_data_func_closure_unref0(var) ((var == NULL) ? NULL : (var = (gee_functions_compare_data_func_closure_unref (var), NULL)))
#define _gee_functions_equal_data_func_closure_unref0(var) ((var == NULL) ? NULL : (var = (gee_functions_equal_data_func_closure_unref (var), NULL)))
#define _gee_tree_map_node_free0(var) ((var == NULL) ? NULL : (var = (gee_tree_map_node_free (var), NULL)))
typedef enum  {
	GEE_TREE_MAP_NODE_COLOR_RED,
	GEE_TREE_MAP_NODE_COLOR_BLACK
} GeeTreeMapNodeColor;

#define GEE_TREE_MAP_NODE_TYPE_COLOR (gee_tree_map_node_color_get_type ())

#define GEE_TREE_MAP_TYPE_RANGE (gee_tree_map_range_get_type ())
#define GEE_TREE_MAP_RANGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_RANGE, GeeTreeMapRange))
#define GEE_TREE_MAP_RANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_RANGE, GeeTreeMapRangeClass))
#define GEE_TREE_MAP_IS_RANGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_RANGE))
#define GEE_TREE_MAP_IS_RANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_RANGE))
#define GEE_TREE_MAP_RANGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_RANGE, GeeTreeMapRangeClass))

typedef struct _GeeTreeMapRange GeeTreeMapRange;
typedef struct _GeeTreeMapRangeClass GeeTreeMapRangeClass;

#define GEE_TREE_MAP_TYPE_SUB_MAP (gee_tree_map_sub_map_get_type ())
#define GEE_TREE_MAP_SUB_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_SUB_MAP, GeeTreeMapSubMap))
#define GEE_TREE_MAP_SUB_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_SUB_MAP, GeeTreeMapSubMapClass))
#define GEE_TREE_MAP_IS_SUB_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_SUB_MAP))
#define GEE_TREE_MAP_IS_SUB_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_SUB_MAP))
#define GEE_TREE_MAP_SUB_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_SUB_MAP, GeeTreeMapSubMapClass))

typedef struct _GeeTreeMapSubMap GeeTreeMapSubMap;
typedef struct _GeeTreeMapSubMapClass GeeTreeMapSubMapClass;
#define _gee_tree_map_range_unref0(var) ((var == NULL) ? NULL : (var = (gee_tree_map_range_unref (var), NULL)))

#define GEE_TREE_MAP_TYPE_NODE_ITERATOR (gee_tree_map_node_iterator_get_type ())
#define GEE_TREE_MAP_NODE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_NODE_ITERATOR, GeeTreeMapNodeIterator))
#define GEE_TREE_MAP_NODE_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_NODE_ITERATOR, GeeTreeMapNodeIteratorClass))
#define GEE_TREE_MAP_IS_NODE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_NODE_ITERATOR))
#define GEE_TREE_MAP_IS_NODE_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_NODE_ITERATOR))
#define GEE_TREE_MAP_NODE_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_NODE_ITERATOR, GeeTreeMapNodeIteratorClass))

typedef struct _GeeTreeMapNodeIterator GeeTreeMapNodeIterator;
typedef struct _GeeTreeMapNodeIteratorClass GeeTreeMapNodeIteratorClass;

#define GEE_TREE_MAP_TYPE_MAP_ITERATOR (gee_tree_map_map_iterator_get_type ())
#define GEE_TREE_MAP_MAP_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_MAP_ITERATOR, GeeTreeMapMapIterator))
#define GEE_TREE_MAP_MAP_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_MAP_ITERATOR, GeeTreeMapMapIteratorClass))
#define GEE_TREE_MAP_IS_MAP_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_MAP_ITERATOR))
#define GEE_TREE_MAP_IS_MAP_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_MAP_ITERATOR))
#define GEE_TREE_MAP_MAP_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_MAP_ITERATOR, GeeTreeMapMapIteratorClass))

typedef struct _GeeTreeMapMapIterator GeeTreeMapMapIterator;
typedef struct _GeeTreeMapMapIteratorClass GeeTreeMapMapIteratorClass;

#define GEE_TREE_MAP_TYPE_KEY_SET (gee_tree_map_key_set_get_type ())
#define GEE_TREE_MAP_KEY_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_KEY_SET, GeeTreeMapKeySet))
#define GEE_TREE_MAP_KEY_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_KEY_SET, GeeTreeMapKeySetClass))
#define GEE_TREE_MAP_IS_KEY_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_KEY_SET))
#define GEE_TREE_MAP_IS_KEY_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_KEY_SET))
#define GEE_TREE_MAP_KEY_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_KEY_SET, GeeTreeMapKeySetClass))

typedef struct _GeeTreeMapKeySet GeeTreeMapKeySet;
typedef struct _GeeTreeMapKeySetClass GeeTreeMapKeySetClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GEE_TREE_MAP_TYPE_VALUE_COLLECTION (gee_tree_map_value_collection_get_type ())
#define GEE_TREE_MAP_VALUE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_VALUE_COLLECTION, GeeTreeMapValueCollection))
#define GEE_TREE_MAP_VALUE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_VALUE_COLLECTION, GeeTreeMapValueCollectionClass))
#define GEE_TREE_MAP_IS_VALUE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_VALUE_COLLECTION))
#define GEE_TREE_MAP_IS_VALUE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_VALUE_COLLECTION))
#define GEE_TREE_MAP_VALUE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_VALUE_COLLECTION, GeeTreeMapValueCollectionClass))

typedef struct _GeeTreeMapValueCollection GeeTreeMapValueCollection;
typedef struct _GeeTreeMapValueCollectionClass GeeTreeMapValueCollectionClass;

#define GEE_TREE_MAP_TYPE_ENTRY_SET (gee_tree_map_entry_set_get_type ())
#define GEE_TREE_MAP_ENTRY_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_ENTRY_SET, GeeTreeMapEntrySet))
#define GEE_TREE_MAP_ENTRY_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_ENTRY_SET, GeeTreeMapEntrySetClass))
#define GEE_TREE_MAP_IS_ENTRY_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_ENTRY_SET))
#define GEE_TREE_MAP_IS_ENTRY_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_ENTRY_SET))
#define GEE_TREE_MAP_ENTRY_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_ENTRY_SET, GeeTreeMapEntrySetClass))

typedef struct _GeeTreeMapEntrySet GeeTreeMapEntrySet;
typedef struct _GeeTreeMapEntrySetClass GeeTreeMapEntrySetClass;
typedef struct _GeeFunctionsCompareDataFuncClosurePrivate GeeFunctionsCompareDataFuncClosurePrivate;
typedef struct _GeeFunctionsEqualDataFuncClosurePrivate GeeFunctionsEqualDataFuncClosurePrivate;

#define GEE_TREE_MAP_TYPE_ENTRY (gee_tree_map_entry_get_type ())
#define GEE_TREE_MAP_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_ENTRY, GeeTreeMapEntry))
#define GEE_TREE_MAP_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_ENTRY, GeeTreeMapEntryClass))
#define GEE_TREE_MAP_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_ENTRY))
#define GEE_TREE_MAP_IS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_ENTRY))
#define GEE_TREE_MAP_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_ENTRY, GeeTreeMapEntryClass))

typedef struct _GeeTreeMapEntry GeeTreeMapEntry;
typedef struct _GeeTreeMapEntryClass GeeTreeMapEntryClass;
typedef struct _GeeTreeMapEntryPrivate GeeTreeMapEntryPrivate;
enum  {
	GEE_TREE_MAP_ENTRY_0_PROPERTY,
	GEE_TREE_MAP_ENTRY_K_TYPE,
	GEE_TREE_MAP_ENTRY_K_DUP_FUNC,
	GEE_TREE_MAP_ENTRY_K_DESTROY_FUNC,
	GEE_TREE_MAP_ENTRY_V_TYPE,
	GEE_TREE_MAP_ENTRY_V_DUP_FUNC,
	GEE_TREE_MAP_ENTRY_V_DESTROY_FUNC,
	GEE_TREE_MAP_ENTRY_KEY_PROPERTY,
	GEE_TREE_MAP_ENTRY_VALUE_PROPERTY,
	GEE_TREE_MAP_ENTRY_READ_ONLY_PROPERTY,
	GEE_TREE_MAP_ENTRY_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_entry_properties[GEE_TREE_MAP_ENTRY_NUM_PROPERTIES];
typedef struct _GeeTreeMapRangePrivate GeeTreeMapRangePrivate;
typedef struct _GeeTreeMapParamSpecRange GeeTreeMapParamSpecRange;
typedef struct _GeeTreeMapSubMapPrivate GeeTreeMapSubMapPrivate;
enum  {
	GEE_TREE_MAP_SUB_MAP_0_PROPERTY,
	GEE_TREE_MAP_SUB_MAP_K_TYPE,
	GEE_TREE_MAP_SUB_MAP_K_DUP_FUNC,
	GEE_TREE_MAP_SUB_MAP_K_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_MAP_V_TYPE,
	GEE_TREE_MAP_SUB_MAP_V_DUP_FUNC,
	GEE_TREE_MAP_SUB_MAP_V_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_MAP_SIZE_PROPERTY,
	GEE_TREE_MAP_SUB_MAP_IS_EMPTY_PROPERTY,
	GEE_TREE_MAP_SUB_MAP_KEYS_PROPERTY,
	GEE_TREE_MAP_SUB_MAP_VALUES_PROPERTY,
	GEE_TREE_MAP_SUB_MAP_ENTRIES_PROPERTY,
	GEE_TREE_MAP_SUB_MAP_READ_ONLY_PROPERTY,
	GEE_TREE_MAP_SUB_MAP_ASCENDING_KEYS_PROPERTY,
	GEE_TREE_MAP_SUB_MAP_ASCENDING_ENTRIES_PROPERTY,
	GEE_TREE_MAP_SUB_MAP_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_sub_map_properties[GEE_TREE_MAP_SUB_MAP_NUM_PROPERTIES];

#define GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR (gee_tree_map_sub_node_iterator_get_type ())
#define GEE_TREE_MAP_SUB_NODE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR, GeeTreeMapSubNodeIterator))
#define GEE_TREE_MAP_SUB_NODE_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR, GeeTreeMapSubNodeIteratorClass))
#define GEE_TREE_MAP_IS_SUB_NODE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR))
#define GEE_TREE_MAP_IS_SUB_NODE_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR))
#define GEE_TREE_MAP_SUB_NODE_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR, GeeTreeMapSubNodeIteratorClass))

typedef struct _GeeTreeMapSubNodeIterator GeeTreeMapSubNodeIterator;
typedef struct _GeeTreeMapSubNodeIteratorClass GeeTreeMapSubNodeIteratorClass;

#define GEE_TREE_MAP_TYPE_SUB_MAP_ITERATOR (gee_tree_map_sub_map_iterator_get_type ())
#define GEE_TREE_MAP_SUB_MAP_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_SUB_MAP_ITERATOR, GeeTreeMapSubMapIterator))
#define GEE_TREE_MAP_SUB_MAP_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_SUB_MAP_ITERATOR, GeeTreeMapSubMapIteratorClass))
#define GEE_TREE_MAP_IS_SUB_MAP_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_SUB_MAP_ITERATOR))
#define GEE_TREE_MAP_IS_SUB_MAP_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_SUB_MAP_ITERATOR))
#define GEE_TREE_MAP_SUB_MAP_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_SUB_MAP_ITERATOR, GeeTreeMapSubMapIteratorClass))

typedef struct _GeeTreeMapSubMapIterator GeeTreeMapSubMapIterator;
typedef struct _GeeTreeMapSubMapIteratorClass GeeTreeMapSubMapIteratorClass;

#define GEE_TREE_MAP_TYPE_SUB_KEY_SET (gee_tree_map_sub_key_set_get_type ())
#define GEE_TREE_MAP_SUB_KEY_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_SUB_KEY_SET, GeeTreeMapSubKeySet))
#define GEE_TREE_MAP_SUB_KEY_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_SUB_KEY_SET, GeeTreeMapSubKeySetClass))
#define GEE_TREE_MAP_IS_SUB_KEY_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_SUB_KEY_SET))
#define GEE_TREE_MAP_IS_SUB_KEY_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_SUB_KEY_SET))
#define GEE_TREE_MAP_SUB_KEY_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_SUB_KEY_SET, GeeTreeMapSubKeySetClass))

typedef struct _GeeTreeMapSubKeySet GeeTreeMapSubKeySet;
typedef struct _GeeTreeMapSubKeySetClass GeeTreeMapSubKeySetClass;

#define GEE_TREE_MAP_TYPE_SUB_VALUE_COLLECTION (gee_tree_map_sub_value_collection_get_type ())
#define GEE_TREE_MAP_SUB_VALUE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_SUB_VALUE_COLLECTION, GeeTreeMapSubValueCollection))
#define GEE_TREE_MAP_SUB_VALUE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_SUB_VALUE_COLLECTION, GeeTreeMapSubValueCollectionClass))
#define GEE_TREE_MAP_IS_SUB_VALUE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_SUB_VALUE_COLLECTION))
#define GEE_TREE_MAP_IS_SUB_VALUE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_SUB_VALUE_COLLECTION))
#define GEE_TREE_MAP_SUB_VALUE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_SUB_VALUE_COLLECTION, GeeTreeMapSubValueCollectionClass))

typedef struct _GeeTreeMapSubValueCollection GeeTreeMapSubValueCollection;
typedef struct _GeeTreeMapSubValueCollectionClass GeeTreeMapSubValueCollectionClass;

#define GEE_TREE_MAP_TYPE_SUB_ENTRY_SET (gee_tree_map_sub_entry_set_get_type ())
#define GEE_TREE_MAP_SUB_ENTRY_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_SUB_ENTRY_SET, GeeTreeMapSubEntrySet))
#define GEE_TREE_MAP_SUB_ENTRY_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_SUB_ENTRY_SET, GeeTreeMapSubEntrySetClass))
#define GEE_TREE_MAP_IS_SUB_ENTRY_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_SUB_ENTRY_SET))
#define GEE_TREE_MAP_IS_SUB_ENTRY_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_SUB_ENTRY_SET))
#define GEE_TREE_MAP_SUB_ENTRY_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_SUB_ENTRY_SET, GeeTreeMapSubEntrySetClass))

typedef struct _GeeTreeMapSubEntrySet GeeTreeMapSubEntrySet;
typedef struct _GeeTreeMapSubEntrySetClass GeeTreeMapSubEntrySetClass;
typedef struct _GeeTreeMapKeySetPrivate GeeTreeMapKeySetPrivate;
enum  {
	GEE_TREE_MAP_KEY_SET_0_PROPERTY,
	GEE_TREE_MAP_KEY_SET_K_TYPE,
	GEE_TREE_MAP_KEY_SET_K_DUP_FUNC,
	GEE_TREE_MAP_KEY_SET_K_DESTROY_FUNC,
	GEE_TREE_MAP_KEY_SET_V_TYPE,
	GEE_TREE_MAP_KEY_SET_V_DUP_FUNC,
	GEE_TREE_MAP_KEY_SET_V_DESTROY_FUNC,
	GEE_TREE_MAP_KEY_SET_SIZE_PROPERTY,
	GEE_TREE_MAP_KEY_SET_READ_ONLY_PROPERTY,
	GEE_TREE_MAP_KEY_SET_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_key_set_properties[GEE_TREE_MAP_KEY_SET_NUM_PROPERTIES];

#define GEE_TREE_MAP_TYPE_KEY_ITERATOR (gee_tree_map_key_iterator_get_type ())
#define GEE_TREE_MAP_KEY_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_KEY_ITERATOR, GeeTreeMapKeyIterator))
#define GEE_TREE_MAP_KEY_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_KEY_ITERATOR, GeeTreeMapKeyIteratorClass))
#define GEE_TREE_MAP_IS_KEY_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_KEY_ITERATOR))
#define GEE_TREE_MAP_IS_KEY_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_KEY_ITERATOR))
#define GEE_TREE_MAP_KEY_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_KEY_ITERATOR, GeeTreeMapKeyIteratorClass))

typedef struct _GeeTreeMapKeyIterator GeeTreeMapKeyIterator;
typedef struct _GeeTreeMapKeyIteratorClass GeeTreeMapKeyIteratorClass;
typedef struct _GeeTreeMapSubKeySetPrivate GeeTreeMapSubKeySetPrivate;
enum  {
	GEE_TREE_MAP_SUB_KEY_SET_0_PROPERTY,
	GEE_TREE_MAP_SUB_KEY_SET_K_TYPE,
	GEE_TREE_MAP_SUB_KEY_SET_K_DUP_FUNC,
	GEE_TREE_MAP_SUB_KEY_SET_K_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_KEY_SET_V_TYPE,
	GEE_TREE_MAP_SUB_KEY_SET_V_DUP_FUNC,
	GEE_TREE_MAP_SUB_KEY_SET_V_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_KEY_SET_MAP_PROPERTY,
	GEE_TREE_MAP_SUB_KEY_SET_RANGE_PROPERTY,
	GEE_TREE_MAP_SUB_KEY_SET_SIZE_PROPERTY,
	GEE_TREE_MAP_SUB_KEY_SET_READ_ONLY_PROPERTY,
	GEE_TREE_MAP_SUB_KEY_SET_IS_EMPTY_PROPERTY,
	GEE_TREE_MAP_SUB_KEY_SET_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_sub_key_set_properties[GEE_TREE_MAP_SUB_KEY_SET_NUM_PROPERTIES];

#define GEE_TREE_MAP_TYPE_SUB_KEY_ITERATOR (gee_tree_map_sub_key_iterator_get_type ())
#define GEE_TREE_MAP_SUB_KEY_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_SUB_KEY_ITERATOR, GeeTreeMapSubKeyIterator))
#define GEE_TREE_MAP_SUB_KEY_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_SUB_KEY_ITERATOR, GeeTreeMapSubKeyIteratorClass))
#define GEE_TREE_MAP_IS_SUB_KEY_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_SUB_KEY_ITERATOR))
#define GEE_TREE_MAP_IS_SUB_KEY_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_SUB_KEY_ITERATOR))
#define GEE_TREE_MAP_SUB_KEY_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_SUB_KEY_ITERATOR, GeeTreeMapSubKeyIteratorClass))

typedef struct _GeeTreeMapSubKeyIterator GeeTreeMapSubKeyIterator;
typedef struct _GeeTreeMapSubKeyIteratorClass GeeTreeMapSubKeyIteratorClass;
typedef struct _GeeTreeMapValueCollectionPrivate GeeTreeMapValueCollectionPrivate;
enum  {
	GEE_TREE_MAP_VALUE_COLLECTION_0_PROPERTY,
	GEE_TREE_MAP_VALUE_COLLECTION_K_TYPE,
	GEE_TREE_MAP_VALUE_COLLECTION_K_DUP_FUNC,
	GEE_TREE_MAP_VALUE_COLLECTION_K_DESTROY_FUNC,
	GEE_TREE_MAP_VALUE_COLLECTION_V_TYPE,
	GEE_TREE_MAP_VALUE_COLLECTION_V_DUP_FUNC,
	GEE_TREE_MAP_VALUE_COLLECTION_V_DESTROY_FUNC,
	GEE_TREE_MAP_VALUE_COLLECTION_SIZE_PROPERTY,
	GEE_TREE_MAP_VALUE_COLLECTION_READ_ONLY_PROPERTY,
	GEE_TREE_MAP_VALUE_COLLECTION_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_value_collection_properties[GEE_TREE_MAP_VALUE_COLLECTION_NUM_PROPERTIES];

#define GEE_TREE_MAP_TYPE_VALUE_ITERATOR (gee_tree_map_value_iterator_get_type ())
#define GEE_TREE_MAP_VALUE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_VALUE_ITERATOR, GeeTreeMapValueIterator))
#define GEE_TREE_MAP_VALUE_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_VALUE_ITERATOR, GeeTreeMapValueIteratorClass))
#define GEE_TREE_MAP_IS_VALUE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_VALUE_ITERATOR))
#define GEE_TREE_MAP_IS_VALUE_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_VALUE_ITERATOR))
#define GEE_TREE_MAP_VALUE_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_VALUE_ITERATOR, GeeTreeMapValueIteratorClass))

typedef struct _GeeTreeMapValueIterator GeeTreeMapValueIterator;
typedef struct _GeeTreeMapValueIteratorClass GeeTreeMapValueIteratorClass;
typedef struct _GeeTreeMapSubValueCollectionPrivate GeeTreeMapSubValueCollectionPrivate;
enum  {
	GEE_TREE_MAP_SUB_VALUE_COLLECTION_0_PROPERTY,
	GEE_TREE_MAP_SUB_VALUE_COLLECTION_K_TYPE,
	GEE_TREE_MAP_SUB_VALUE_COLLECTION_K_DUP_FUNC,
	GEE_TREE_MAP_SUB_VALUE_COLLECTION_K_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_VALUE_COLLECTION_V_TYPE,
	GEE_TREE_MAP_SUB_VALUE_COLLECTION_V_DUP_FUNC,
	GEE_TREE_MAP_SUB_VALUE_COLLECTION_V_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_VALUE_COLLECTION_MAP_PROPERTY,
	GEE_TREE_MAP_SUB_VALUE_COLLECTION_RANGE_PROPERTY,
	GEE_TREE_MAP_SUB_VALUE_COLLECTION_READ_ONLY_PROPERTY,
	GEE_TREE_MAP_SUB_VALUE_COLLECTION_SIZE_PROPERTY,
	GEE_TREE_MAP_SUB_VALUE_COLLECTION_IS_EMPTY_PROPERTY,
	GEE_TREE_MAP_SUB_VALUE_COLLECTION_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_sub_value_collection_properties[GEE_TREE_MAP_SUB_VALUE_COLLECTION_NUM_PROPERTIES];

#define GEE_TREE_MAP_TYPE_SUB_VALUE_ITERATOR (gee_tree_map_sub_value_iterator_get_type ())
#define GEE_TREE_MAP_SUB_VALUE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_SUB_VALUE_ITERATOR, GeeTreeMapSubValueIterator))
#define GEE_TREE_MAP_SUB_VALUE_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_SUB_VALUE_ITERATOR, GeeTreeMapSubValueIteratorClass))
#define GEE_TREE_MAP_IS_SUB_VALUE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_SUB_VALUE_ITERATOR))
#define GEE_TREE_MAP_IS_SUB_VALUE_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_SUB_VALUE_ITERATOR))
#define GEE_TREE_MAP_SUB_VALUE_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_SUB_VALUE_ITERATOR, GeeTreeMapSubValueIteratorClass))

typedef struct _GeeTreeMapSubValueIterator GeeTreeMapSubValueIterator;
typedef struct _GeeTreeMapSubValueIteratorClass GeeTreeMapSubValueIteratorClass;
typedef struct _GeeTreeMapEntrySetPrivate GeeTreeMapEntrySetPrivate;
enum  {
	GEE_TREE_MAP_ENTRY_SET_0_PROPERTY,
	GEE_TREE_MAP_ENTRY_SET_K_TYPE,
	GEE_TREE_MAP_ENTRY_SET_K_DUP_FUNC,
	GEE_TREE_MAP_ENTRY_SET_K_DESTROY_FUNC,
	GEE_TREE_MAP_ENTRY_SET_V_TYPE,
	GEE_TREE_MAP_ENTRY_SET_V_DUP_FUNC,
	GEE_TREE_MAP_ENTRY_SET_V_DESTROY_FUNC,
	GEE_TREE_MAP_ENTRY_SET_SIZE_PROPERTY,
	GEE_TREE_MAP_ENTRY_SET_READ_ONLY_PROPERTY,
	GEE_TREE_MAP_ENTRY_SET_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_entry_set_properties[GEE_TREE_MAP_ENTRY_SET_NUM_PROPERTIES];

#define GEE_TREE_MAP_TYPE_ENTRY_ITERATOR (gee_tree_map_entry_iterator_get_type ())
#define GEE_TREE_MAP_ENTRY_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_ENTRY_ITERATOR, GeeTreeMapEntryIterator))
#define GEE_TREE_MAP_ENTRY_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_ENTRY_ITERATOR, GeeTreeMapEntryIteratorClass))
#define GEE_TREE_MAP_IS_ENTRY_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_ENTRY_ITERATOR))
#define GEE_TREE_MAP_IS_ENTRY_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_ENTRY_ITERATOR))
#define GEE_TREE_MAP_ENTRY_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_ENTRY_ITERATOR, GeeTreeMapEntryIteratorClass))

typedef struct _GeeTreeMapEntryIterator GeeTreeMapEntryIterator;
typedef struct _GeeTreeMapEntryIteratorClass GeeTreeMapEntryIteratorClass;
typedef struct _GeeTreeMapSubEntrySetPrivate GeeTreeMapSubEntrySetPrivate;
enum  {
	GEE_TREE_MAP_SUB_ENTRY_SET_0_PROPERTY,
	GEE_TREE_MAP_SUB_ENTRY_SET_K_TYPE,
	GEE_TREE_MAP_SUB_ENTRY_SET_K_DUP_FUNC,
	GEE_TREE_MAP_SUB_ENTRY_SET_K_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_ENTRY_SET_V_TYPE,
	GEE_TREE_MAP_SUB_ENTRY_SET_V_DUP_FUNC,
	GEE_TREE_MAP_SUB_ENTRY_SET_V_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_ENTRY_SET_MAP_PROPERTY,
	GEE_TREE_MAP_SUB_ENTRY_SET_RANGE_PROPERTY,
	GEE_TREE_MAP_SUB_ENTRY_SET_SIZE_PROPERTY,
	GEE_TREE_MAP_SUB_ENTRY_SET_READ_ONLY_PROPERTY,
	GEE_TREE_MAP_SUB_ENTRY_SET_IS_EMPTY_PROPERTY,
	GEE_TREE_MAP_SUB_ENTRY_SET_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_sub_entry_set_properties[GEE_TREE_MAP_SUB_ENTRY_SET_NUM_PROPERTIES];

#define GEE_TREE_MAP_TYPE_SUB_ENTRY_ITERATOR (gee_tree_map_sub_entry_iterator_get_type ())
#define GEE_TREE_MAP_SUB_ENTRY_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TREE_MAP_TYPE_SUB_ENTRY_ITERATOR, GeeTreeMapSubEntryIterator))
#define GEE_TREE_MAP_SUB_ENTRY_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TREE_MAP_TYPE_SUB_ENTRY_ITERATOR, GeeTreeMapSubEntryIteratorClass))
#define GEE_TREE_MAP_IS_SUB_ENTRY_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TREE_MAP_TYPE_SUB_ENTRY_ITERATOR))
#define GEE_TREE_MAP_IS_SUB_ENTRY_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TREE_MAP_TYPE_SUB_ENTRY_ITERATOR))
#define GEE_TREE_MAP_SUB_ENTRY_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TREE_MAP_TYPE_SUB_ENTRY_ITERATOR, GeeTreeMapSubEntryIteratorClass))

typedef struct _GeeTreeMapSubEntryIterator GeeTreeMapSubEntryIterator;
typedef struct _GeeTreeMapSubEntryIteratorClass GeeTreeMapSubEntryIteratorClass;
typedef struct _GeeTreeMapNodeIteratorPrivate GeeTreeMapNodeIteratorPrivate;
enum  {
	GEE_TREE_MAP_NODE_ITERATOR_0_PROPERTY,
	GEE_TREE_MAP_NODE_ITERATOR_K_TYPE,
	GEE_TREE_MAP_NODE_ITERATOR_K_DUP_FUNC,
	GEE_TREE_MAP_NODE_ITERATOR_K_DESTROY_FUNC,
	GEE_TREE_MAP_NODE_ITERATOR_V_TYPE,
	GEE_TREE_MAP_NODE_ITERATOR_V_DUP_FUNC,
	GEE_TREE_MAP_NODE_ITERATOR_V_DESTROY_FUNC,
	GEE_TREE_MAP_NODE_ITERATOR_READ_ONLY_PROPERTY,
	GEE_TREE_MAP_NODE_ITERATOR_VALID_PROPERTY,
	GEE_TREE_MAP_NODE_ITERATOR_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_node_iterator_properties[GEE_TREE_MAP_NODE_ITERATOR_NUM_PROPERTIES];
typedef struct _GeeTreeMapSubNodeIteratorPrivate GeeTreeMapSubNodeIteratorPrivate;
enum  {
	GEE_TREE_MAP_SUB_NODE_ITERATOR_0_PROPERTY,
	GEE_TREE_MAP_SUB_NODE_ITERATOR_K_TYPE,
	GEE_TREE_MAP_SUB_NODE_ITERATOR_K_DUP_FUNC,
	GEE_TREE_MAP_SUB_NODE_ITERATOR_K_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_NODE_ITERATOR_V_TYPE,
	GEE_TREE_MAP_SUB_NODE_ITERATOR_V_DUP_FUNC,
	GEE_TREE_MAP_SUB_NODE_ITERATOR_V_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_NODE_ITERATOR_READ_ONLY_PROPERTY,
	GEE_TREE_MAP_SUB_NODE_ITERATOR_VALID_PROPERTY,
	GEE_TREE_MAP_SUB_NODE_ITERATOR_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_sub_node_iterator_properties[GEE_TREE_MAP_SUB_NODE_ITERATOR_NUM_PROPERTIES];
typedef struct _GeeTreeMapKeyIteratorPrivate GeeTreeMapKeyIteratorPrivate;
enum  {
	GEE_TREE_MAP_KEY_ITERATOR_0_PROPERTY,
	GEE_TREE_MAP_KEY_ITERATOR_K_TYPE,
	GEE_TREE_MAP_KEY_ITERATOR_K_DUP_FUNC,
	GEE_TREE_MAP_KEY_ITERATOR_K_DESTROY_FUNC,
	GEE_TREE_MAP_KEY_ITERATOR_V_TYPE,
	GEE_TREE_MAP_KEY_ITERATOR_V_DUP_FUNC,
	GEE_TREE_MAP_KEY_ITERATOR_V_DESTROY_FUNC,
	GEE_TREE_MAP_KEY_ITERATOR_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_key_iterator_properties[GEE_TREE_MAP_KEY_ITERATOR_NUM_PROPERTIES];
typedef struct _GeeTreeMapSubKeyIteratorPrivate GeeTreeMapSubKeyIteratorPrivate;
enum  {
	GEE_TREE_MAP_SUB_KEY_ITERATOR_0_PROPERTY,
	GEE_TREE_MAP_SUB_KEY_ITERATOR_K_TYPE,
	GEE_TREE_MAP_SUB_KEY_ITERATOR_K_DUP_FUNC,
	GEE_TREE_MAP_SUB_KEY_ITERATOR_K_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_KEY_ITERATOR_V_TYPE,
	GEE_TREE_MAP_SUB_KEY_ITERATOR_V_DUP_FUNC,
	GEE_TREE_MAP_SUB_KEY_ITERATOR_V_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_KEY_ITERATOR_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_sub_key_iterator_properties[GEE_TREE_MAP_SUB_KEY_ITERATOR_NUM_PROPERTIES];
typedef struct _GeeTreeMapValueIteratorPrivate GeeTreeMapValueIteratorPrivate;
enum  {
	GEE_TREE_MAP_VALUE_ITERATOR_0_PROPERTY,
	GEE_TREE_MAP_VALUE_ITERATOR_K_TYPE,
	GEE_TREE_MAP_VALUE_ITERATOR_K_DUP_FUNC,
	GEE_TREE_MAP_VALUE_ITERATOR_K_DESTROY_FUNC,
	GEE_TREE_MAP_VALUE_ITERATOR_V_TYPE,
	GEE_TREE_MAP_VALUE_ITERATOR_V_DUP_FUNC,
	GEE_TREE_MAP_VALUE_ITERATOR_V_DESTROY_FUNC,
	GEE_TREE_MAP_VALUE_ITERATOR_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_value_iterator_properties[GEE_TREE_MAP_VALUE_ITERATOR_NUM_PROPERTIES];
typedef struct _GeeTreeMapSubValueIteratorPrivate GeeTreeMapSubValueIteratorPrivate;
enum  {
	GEE_TREE_MAP_SUB_VALUE_ITERATOR_0_PROPERTY,
	GEE_TREE_MAP_SUB_VALUE_ITERATOR_K_TYPE,
	GEE_TREE_MAP_SUB_VALUE_ITERATOR_K_DUP_FUNC,
	GEE_TREE_MAP_SUB_VALUE_ITERATOR_K_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_VALUE_ITERATOR_V_TYPE,
	GEE_TREE_MAP_SUB_VALUE_ITERATOR_V_DUP_FUNC,
	GEE_TREE_MAP_SUB_VALUE_ITERATOR_V_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_VALUE_ITERATOR_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_sub_value_iterator_properties[GEE_TREE_MAP_SUB_VALUE_ITERATOR_NUM_PROPERTIES];
typedef struct _GeeTreeMapEntryIteratorPrivate GeeTreeMapEntryIteratorPrivate;
enum  {
	GEE_TREE_MAP_ENTRY_ITERATOR_0_PROPERTY,
	GEE_TREE_MAP_ENTRY_ITERATOR_K_TYPE,
	GEE_TREE_MAP_ENTRY_ITERATOR_K_DUP_FUNC,
	GEE_TREE_MAP_ENTRY_ITERATOR_K_DESTROY_FUNC,
	GEE_TREE_MAP_ENTRY_ITERATOR_V_TYPE,
	GEE_TREE_MAP_ENTRY_ITERATOR_V_DUP_FUNC,
	GEE_TREE_MAP_ENTRY_ITERATOR_V_DESTROY_FUNC,
	GEE_TREE_MAP_ENTRY_ITERATOR_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_entry_iterator_properties[GEE_TREE_MAP_ENTRY_ITERATOR_NUM_PROPERTIES];
typedef struct _GeeTreeMapSubEntryIteratorPrivate GeeTreeMapSubEntryIteratorPrivate;
enum  {
	GEE_TREE_MAP_SUB_ENTRY_ITERATOR_0_PROPERTY,
	GEE_TREE_MAP_SUB_ENTRY_ITERATOR_K_TYPE,
	GEE_TREE_MAP_SUB_ENTRY_ITERATOR_K_DUP_FUNC,
	GEE_TREE_MAP_SUB_ENTRY_ITERATOR_K_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_ENTRY_ITERATOR_V_TYPE,
	GEE_TREE_MAP_SUB_ENTRY_ITERATOR_V_DUP_FUNC,
	GEE_TREE_MAP_SUB_ENTRY_ITERATOR_V_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_ENTRY_ITERATOR_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_sub_entry_iterator_properties[GEE_TREE_MAP_SUB_ENTRY_ITERATOR_NUM_PROPERTIES];
typedef struct _GeeTreeMapMapIteratorPrivate GeeTreeMapMapIteratorPrivate;
enum  {
	GEE_TREE_MAP_MAP_ITERATOR_0_PROPERTY,
	GEE_TREE_MAP_MAP_ITERATOR_K_TYPE,
	GEE_TREE_MAP_MAP_ITERATOR_K_DUP_FUNC,
	GEE_TREE_MAP_MAP_ITERATOR_K_DESTROY_FUNC,
	GEE_TREE_MAP_MAP_ITERATOR_V_TYPE,
	GEE_TREE_MAP_MAP_ITERATOR_V_DUP_FUNC,
	GEE_TREE_MAP_MAP_ITERATOR_V_DESTROY_FUNC,
	GEE_TREE_MAP_MAP_ITERATOR_READ_ONLY_PROPERTY,
	GEE_TREE_MAP_MAP_ITERATOR_MUTABLE_PROPERTY,
	GEE_TREE_MAP_MAP_ITERATOR_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_map_iterator_properties[GEE_TREE_MAP_MAP_ITERATOR_NUM_PROPERTIES];
typedef struct _GeeTreeMapSubMapIteratorPrivate GeeTreeMapSubMapIteratorPrivate;
enum  {
	GEE_TREE_MAP_SUB_MAP_ITERATOR_0_PROPERTY,
	GEE_TREE_MAP_SUB_MAP_ITERATOR_K_TYPE,
	GEE_TREE_MAP_SUB_MAP_ITERATOR_K_DUP_FUNC,
	GEE_TREE_MAP_SUB_MAP_ITERATOR_K_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_MAP_ITERATOR_V_TYPE,
	GEE_TREE_MAP_SUB_MAP_ITERATOR_V_DUP_FUNC,
	GEE_TREE_MAP_SUB_MAP_ITERATOR_V_DESTROY_FUNC,
	GEE_TREE_MAP_SUB_MAP_ITERATOR_READ_ONLY_PROPERTY,
	GEE_TREE_MAP_SUB_MAP_ITERATOR_MUTABLE_PROPERTY,
	GEE_TREE_MAP_SUB_MAP_ITERATOR_NUM_PROPERTIES
};
static GParamSpec* gee_tree_map_sub_map_iterator_properties[GEE_TREE_MAP_SUB_MAP_ITERATOR_NUM_PROPERTIES];
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _GeeTreeMapPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
	gint _size;
	GeeSortedSet* _keys;
	GeeCollection* _values;
	GeeSortedSet* _entries;
	GeeFunctionsCompareDataFuncClosure* _key_compare_func;
	GeeFunctionsEqualDataFuncClosure* _value_equal_func;
	GeeTreeMapNode* root;
	GeeTreeMapNode* first;
	GeeTreeMapNode* last;
	gint stamp;
};

struct _GeeTreeMapNode {
	gpointer key;
	gpointer value;
	GeeTreeMapNodeColor color;
	GeeTreeMapNode* left;
	GeeTreeMapNode* right;
	GeeTreeMapNode* prev;
	GeeTreeMapNode* next;
	GeeMapEntry* entry;
};

struct _GeeFunctionsCompareDataFuncClosure {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GeeFunctionsCompareDataFuncClosurePrivate * priv;
	GCompareDataFunc func;
	gpointer func_target;
	GDestroyNotify func_target_destroy_notify;
};

struct _GeeFunctionsCompareDataFuncClosureClass {
	GTypeClass parent_class;
	void (*finalize) (GeeFunctionsCompareDataFuncClosure *self);
};

struct _GeeFunctionsEqualDataFuncClosure {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GeeFunctionsEqualDataFuncClosurePrivate * priv;
	GeeEqualDataFunc func;
	gpointer func_target;
	GDestroyNotify func_target_destroy_notify;
};

struct _GeeFunctionsEqualDataFuncClosureClass {
	GTypeClass parent_class;
	void (*finalize) (GeeFunctionsEqualDataFuncClosure *self);
};

struct _GeeTreeMapEntry {
	GeeMapEntry parent_instance;
	GeeTreeMapEntryPrivate * priv;
};

struct _GeeTreeMapEntryClass {
	GeeMapEntryClass parent_class;
};

struct _GeeTreeMapEntryPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
	GeeTreeMapNode* _node;
};

struct _GeeTreeMapRange {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GeeTreeMapRangePrivate * priv;
};

struct _GeeTreeMapRangeClass {
	GTypeClass parent_class;
	void (*finalize) (GeeTreeMapRange *self);
};

struct _GeeTreeMapRangePrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
	GeeTreeMap* map;
	gpointer after;
	gpointer before;
	GeeTreeMapRangeType type;
};

struct _GeeTreeMapParamSpecRange {
	GParamSpec parent_instance;
};

struct _GeeTreeMapSubMap {
	GeeAbstractBidirSortedMap parent_instance;
	GeeTreeMapSubMapPrivate * priv;
};

struct _GeeTreeMapSubMapClass {
	GeeAbstractBidirSortedMapClass parent_class;
};

struct _GeeTreeMapSubMapPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
	GeeSortedSet* _keys;
	GeeCollection* _values;
	GeeSortedSet* _entries;
	GeeTreeMap* map;
	GeeTreeMapRange* range;
};

struct _GeeTreeMapKeySet {
	GeeAbstractBidirSortedSet parent_instance;
	GeeTreeMapKeySetPrivate * priv;
};

struct _GeeTreeMapKeySetClass {
	GeeAbstractBidirSortedSetClass parent_class;
};

struct _GeeTreeMapKeySetPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
	GeeTreeMap* _map;
};

struct _GeeTreeMapSubKeySet {
	GeeAbstractBidirSortedSet parent_instance;
	GeeTreeMapSubKeySetPrivate * priv;
};

struct _GeeTreeMapSubKeySetClass {
	GeeAbstractBidirSortedSetClass parent_class;
};

struct _GeeTreeMapSubKeySetPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
	GeeTreeMap* _map;
	GeeTreeMapRange* _range;
};

struct _GeeTreeMapValueCollection {
	GeeAbstractCollection parent_instance;
	GeeTreeMapValueCollectionPrivate * priv;
};

struct _GeeTreeMapValueCollectionClass {
	GeeAbstractCollectionClass parent_class;
};

struct _GeeTreeMapValueCollectionPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
	GeeTreeMap* _map;
};

struct _GeeTreeMapSubValueCollection {
	GeeAbstractCollection parent_instance;
	GeeTreeMapSubValueCollectionPrivate * priv;
};

struct _GeeTreeMapSubValueCollectionClass {
	GeeAbstractCollectionClass parent_class;
};

struct _GeeTreeMapSubValueCollectionPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
	GeeTreeMap* _map;
	GeeTreeMapRange* _range;
};

struct _GeeTreeMapEntrySet {
	GeeAbstractBidirSortedSet parent_instance;
	GeeTreeMapEntrySetPrivate * priv;
};

struct _GeeTreeMapEntrySetClass {
	GeeAbstractBidirSortedSetClass parent_class;
};

struct _GeeTreeMapEntrySetPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
	GeeTreeMap* _map;
};

struct _GeeTreeMapSubEntrySet {
	GeeAbstractBidirSortedSet parent_instance;
	GeeTreeMapSubEntrySetPrivate * priv;
};

struct _GeeTreeMapSubEntrySetClass {
	GeeAbstractBidirSortedSetClass parent_class;
};

struct _GeeTreeMapSubEntrySetPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
	GeeTreeMap* _map;
	GeeTreeMapRange* _range;
};

struct _GeeTreeMapNodeIterator {
	GObject parent_instance;
	GeeTreeMapNodeIteratorPrivate * priv;
	GeeTreeMap* _map;
	gint stamp;
	gboolean started;
	GeeTreeMapNode* current;
	GeeTreeMapNode* _next;
	GeeTreeMapNode* _prev;
};

struct _GeeTreeMapNodeIteratorClass {
	GObjectClass parent_class;
	gboolean (*get_read_only) (GeeTreeMapNodeIterator* self);
};

struct _GeeTreeMapNodeIteratorPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
};

struct _GeeTreeMapSubNodeIterator {
	GObject parent_instance;
	GeeTreeMapSubNodeIteratorPrivate * priv;
	GeeTreeMap* _map;
	GeeTreeMapRange* range;
	GeeTreeMapNodeIterator* iterator;
};

struct _GeeTreeMapSubNodeIteratorClass {
	GObjectClass parent_class;
	gboolean (*first) (GeeTreeMapSubNodeIterator* self);
	gboolean (*last) (GeeTreeMapSubNodeIterator* self);
	GeeTreeMapNodeIterator* (*iterator_pointing_at) (GeeTreeMapSubNodeIterator* self, GeeTreeMapNode* node);
	gboolean (*get_read_only) (GeeTreeMapSubNodeIterator* self);
};

struct _GeeTreeMapSubNodeIteratorPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
};

struct _GeeTreeMapKeyIterator {
	GeeTreeMapNodeIterator parent_instance;
	GeeTreeMapKeyIteratorPrivate * priv;
};

struct _GeeTreeMapKeyIteratorClass {
	GeeTreeMapNodeIteratorClass parent_class;
};

struct _GeeTreeMapKeyIteratorPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
};

struct _GeeTreeMapSubKeyIterator {
	GeeTreeMapSubNodeIterator parent_instance;
	GeeTreeMapSubKeyIteratorPrivate * priv;
};

struct _GeeTreeMapSubKeyIteratorClass {
	GeeTreeMapSubNodeIteratorClass parent_class;
};

struct _GeeTreeMapSubKeyIteratorPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
};

struct _GeeTreeMapValueIterator {
	GeeTreeMapNodeIterator parent_instance;
	GeeTreeMapValueIteratorPrivate * priv;
};

struct _GeeTreeMapValueIteratorClass {
	GeeTreeMapNodeIteratorClass parent_class;
};

struct _GeeTreeMapValueIteratorPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
};

struct _GeeTreeMapSubValueIterator {
	GeeTreeMapSubNodeIterator parent_instance;
	GeeTreeMapSubValueIteratorPrivate * priv;
};

struct _GeeTreeMapSubValueIteratorClass {
	GeeTreeMapSubNodeIteratorClass parent_class;
};

struct _GeeTreeMapSubValueIteratorPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
};

struct _GeeTreeMapEntryIterator {
	GeeTreeMapNodeIterator parent_instance;
	GeeTreeMapEntryIteratorPrivate * priv;
};

struct _GeeTreeMapEntryIteratorClass {
	GeeTreeMapNodeIteratorClass parent_class;
};

struct _GeeTreeMapEntryIteratorPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
};

struct _GeeTreeMapSubEntryIterator {
	GeeTreeMapSubNodeIterator parent_instance;
	GeeTreeMapSubEntryIteratorPrivate * priv;
};

struct _GeeTreeMapSubEntryIteratorClass {
	GeeTreeMapSubNodeIteratorClass parent_class;
};

struct _GeeTreeMapSubEntryIteratorPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
};

struct _GeeTreeMapMapIterator {
	GeeTreeMapNodeIterator parent_instance;
	GeeTreeMapMapIteratorPrivate * priv;
};

struct _GeeTreeMapMapIteratorClass {
	GeeTreeMapNodeIteratorClass parent_class;
};

struct _GeeTreeMapMapIteratorPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
};

struct _GeeTreeMapSubMapIterator {
	GeeTreeMapSubNodeIterator parent_instance;
	GeeTreeMapSubMapIteratorPrivate * priv;
};

struct _GeeTreeMapSubMapIteratorClass {
	GeeTreeMapSubNodeIteratorClass parent_class;
};

struct _GeeTreeMapSubMapIteratorPrivate {
	GType k_type;
	GBoxedCopyFunc k_dup_func;
	GDestroyNotify k_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
};

static gint GeeTreeMap_private_offset;
static gpointer gee_tree_map_parent_class = NULL;
static gint GeeTreeMapEntry_private_offset;
static gpointer gee_tree_map_entry_parent_class = NULL;
static gint GeeTreeMapRange_private_offset;
static gpointer gee_tree_map_range_parent_class = NULL;
static gint GeeTreeMapSubMap_private_offset;
static gpointer gee_tree_map_sub_map_parent_class = NULL;
static gint GeeTreeMapKeySet_private_offset;
static gpointer gee_tree_map_key_set_parent_class = NULL;
static gint GeeTreeMapSubKeySet_private_offset;
static gpointer gee_tree_map_sub_key_set_parent_class = NULL;
static gint GeeTreeMapValueCollection_private_offset;
static gpointer gee_tree_map_value_collection_parent_class = NULL;
static gint GeeTreeMapSubValueCollection_private_offset;
static gpointer gee_tree_map_sub_value_collection_parent_class = NULL;
static gint GeeTreeMapEntrySet_private_offset;
static gpointer gee_tree_map_entry_set_parent_class = NULL;
static gint GeeTreeMapSubEntrySet_private_offset;
static gpointer gee_tree_map_sub_entry_set_parent_class = NULL;
static gint GeeTreeMapNodeIterator_private_offset;
static gpointer gee_tree_map_node_iterator_parent_class = NULL;
static gint GeeTreeMapSubNodeIterator_private_offset;
static gpointer gee_tree_map_sub_node_iterator_parent_class = NULL;
static gint GeeTreeMapKeyIterator_private_offset;
static gpointer gee_tree_map_key_iterator_parent_class = NULL;
static GeeTraversableIface * gee_tree_map_key_iterator_gee_traversable_parent_iface = NULL;
static GeeIteratorIface * gee_tree_map_key_iterator_gee_iterator_parent_iface = NULL;
static GeeBidirIteratorIface * gee_tree_map_key_iterator_gee_bidir_iterator_parent_iface = NULL;
static gint GeeTreeMapSubKeyIterator_private_offset;
static gpointer gee_tree_map_sub_key_iterator_parent_class = NULL;
static GeeTraversableIface * gee_tree_map_sub_key_iterator_gee_traversable_parent_iface = NULL;
static GeeIteratorIface * gee_tree_map_sub_key_iterator_gee_iterator_parent_iface = NULL;
static GeeBidirIteratorIface * gee_tree_map_sub_key_iterator_gee_bidir_iterator_parent_iface = NULL;
static gint GeeTreeMapValueIterator_private_offset;
static gpointer gee_tree_map_value_iterator_parent_class = NULL;
static GeeTraversableIface * gee_tree_map_value_iterator_gee_traversable_parent_iface = NULL;
static GeeIteratorIface * gee_tree_map_value_iterator_gee_iterator_parent_iface = NULL;
static GeeBidirIteratorIface * gee_tree_map_value_iterator_gee_bidir_iterator_parent_iface = NULL;
static gint GeeTreeMapSubValueIterator_private_offset;
static gpointer gee_tree_map_sub_value_iterator_parent_class = NULL;
static GeeTraversableIface * gee_tree_map_sub_value_iterator_gee_traversable_parent_iface = NULL;
static GeeIteratorIface * gee_tree_map_sub_value_iterator_gee_iterator_parent_iface = NULL;
static GeeBidirIteratorIface * gee_tree_map_sub_value_iterator_gee_bidir_iterator_parent_iface = NULL;
static gint GeeTreeMapEntryIterator_private_offset;
static gpointer gee_tree_map_entry_iterator_parent_class = NULL;
static GeeTraversableIface * gee_tree_map_entry_iterator_gee_traversable_parent_iface = NULL;
static GeeIteratorIface * gee_tree_map_entry_iterator_gee_iterator_parent_iface = NULL;
static GeeBidirIteratorIface * gee_tree_map_entry_iterator_gee_bidir_iterator_parent_iface = NULL;
static gint GeeTreeMapSubEntryIterator_private_offset;
static gpointer gee_tree_map_sub_entry_iterator_parent_class = NULL;
static GeeTraversableIface * gee_tree_map_sub_entry_iterator_gee_traversable_parent_iface = NULL;
static GeeIteratorIface * gee_tree_map_sub_entry_iterator_gee_iterator_parent_iface = NULL;
static GeeBidirIteratorIface * gee_tree_map_sub_entry_iterator_gee_bidir_iterator_parent_iface = NULL;
static gint GeeTreeMapMapIterator_private_offset;
static gpointer gee_tree_map_map_iterator_parent_class = NULL;
static GeeMapIteratorIface * gee_tree_map_map_iterator_gee_map_iterator_parent_iface = NULL;
static GeeBidirMapIteratorIface * gee_tree_map_map_iterator_gee_bidir_map_iterator_parent_iface = NULL;
static gint GeeTreeMapSubMapIterator_private_offset;
static gpointer gee_tree_map_sub_map_iterator_parent_class = NULL;
static GeeMapIteratorIface * gee_tree_map_sub_map_iterator_gee_map_iterator_parent_iface = NULL;
static GeeBidirMapIteratorIface * gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_parent_iface = NULL;

 G_GNUC_INTERNAL gpointer gee_functions_compare_data_func_closure_ref (gpointer instance);
 G_GNUC_INTERNAL void gee_functions_compare_data_func_closure_unref (gpointer instance);
 G_GNUC_INTERNAL GParamSpec* gee_functions_param_spec_compare_data_func_closure (const gchar* name,
                                                                const gchar* nick,
                                                                const gchar* blurb,
                                                                GType object_type,
                                                                GParamFlags flags);
 G_GNUC_INTERNAL void gee_functions_value_set_compare_data_func_closure (GValue* value,
                                                        gpointer v_object) G_GNUC_UNUSED ;
 G_GNUC_INTERNAL void gee_functions_value_take_compare_data_func_closure (GValue* value,
                                                         gpointer v_object);
 G_GNUC_INTERNAL gpointer gee_functions_value_get_compare_data_func_closure (const GValue* value) G_GNUC_UNUSED ;
 G_GNUC_INTERNAL GType gee_functions_compare_data_func_closure_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
 G_GNUC_INTERNAL gpointer gee_functions_equal_data_func_closure_ref (gpointer instance);
 G_GNUC_INTERNAL void gee_functions_equal_data_func_closure_unref (gpointer instance);
 G_GNUC_INTERNAL GParamSpec* gee_functions_param_spec_equal_data_func_closure (const gchar* name,
                                                              const gchar* nick,
                                                              const gchar* blurb,
                                                              GType object_type,
                                                              GParamFlags flags);
 G_GNUC_INTERNAL void gee_functions_value_set_equal_data_func_closure (GValue* value,
                                                      gpointer v_object) G_GNUC_UNUSED ;
 G_GNUC_INTERNAL void gee_functions_value_take_equal_data_func_closure (GValue* value,
                                                       gpointer v_object);
 G_GNUC_INTERNAL gpointer gee_functions_value_get_equal_data_func_closure (const GValue* value) G_GNUC_UNUSED ;
 G_GNUC_INTERNAL GType gee_functions_equal_data_func_closure_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static void gee_tree_map_node_free (GeeTreeMapNode * self);
static GType gee_tree_map_range_type_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
 G_GNUC_INTERNAL GeeFunctionsCompareDataFuncClosure* gee_functions_compare_data_func_closure_new (GType g_type,
                                                                                 GBoxedCopyFunc g_dup_func,
                                                                                 GDestroyNotify g_destroy_func,
                                                                                 GCompareDataFunc func,
                                                                                 gpointer func_target,
                                                                                 GDestroyNotify func_target_destroy_notify);
 G_GNUC_INTERNAL GeeFunctionsCompareDataFuncClosure* gee_functions_compare_data_func_closure_construct (GType object_type,
                                                                                       GType g_type,
                                                                                       GBoxedCopyFunc g_dup_func,
                                                                                       GDestroyNotify g_destroy_func,
                                                                                       GCompareDataFunc func,
                                                                                       gpointer func_target,
                                                                                       GDestroyNotify func_target_destroy_notify);
 G_GNUC_INTERNAL GeeFunctionsEqualDataFuncClosure* gee_functions_equal_data_func_closure_new (GType g_type,
                                                                             GBoxedCopyFunc g_dup_func,
                                                                             GDestroyNotify g_destroy_func,
                                                                             GeeEqualDataFunc func,
                                                                             gpointer func_target,
                                                                             GDestroyNotify func_target_destroy_notify);
 G_GNUC_INTERNAL GeeFunctionsEqualDataFuncClosure* gee_functions_equal_data_func_closure_construct (GType object_type,
                                                                                   GType g_type,
                                                                                   GBoxedCopyFunc g_dup_func,
                                                                                   GDestroyNotify g_destroy_func,
                                                                                   GeeEqualDataFunc func,
                                                                                   gpointer func_target,
                                                                                   GDestroyNotify func_target_destroy_notify);
 G_GNUC_INTERNAL GeeTreeMap* gee_tree_map_new_with_closures (GType k_type,
                                            GBoxedCopyFunc k_dup_func,
                                            GDestroyNotify k_destroy_func,
                                            GType v_type,
                                            GBoxedCopyFunc v_dup_func,
                                            GDestroyNotify v_destroy_func,
                                            GeeFunctionsCompareDataFuncClosure* key_compare_func,
                                            GeeFunctionsEqualDataFuncClosure* value_equal_func);
 G_GNUC_INTERNAL GeeTreeMap* gee_tree_map_construct_with_closures (GType object_type,
                                                  GType k_type,
                                                  GBoxedCopyFunc k_dup_func,
                                                  GDestroyNotify k_destroy_func,
                                                  GType v_type,
                                                  GBoxedCopyFunc v_dup_func,
                                                  GDestroyNotify v_destroy_func,
                                                  GeeFunctionsCompareDataFuncClosure* key_compare_func,
                                                  GeeFunctionsEqualDataFuncClosure* value_equal_func);
static void gee_tree_map_rotate_right (GeeTreeMap* self,
                                GeeTreeMapNode** root);
static GType gee_tree_map_node_color_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static void gee_tree_map_rotate_left (GeeTreeMap* self,
                               GeeTreeMapNode** root);
static gboolean gee_tree_map_is_red (GeeTreeMap* self,
                              GeeTreeMapNode* n);
static gboolean gee_tree_map_is_black (GeeTreeMap* self,
                                GeeTreeMapNode* n);
static gboolean gee_tree_map_real_has_key (GeeAbstractMap* base,
                                    gconstpointer key);
static gboolean gee_tree_map_real_has (GeeAbstractMap* base,
                                gconstpointer key,
                                gconstpointer value);
static gpointer gee_tree_map_real_get (GeeAbstractMap* base,
                                gconstpointer key);
static gboolean gee_tree_map_set_to_node (GeeTreeMap* self,
                                   GeeTreeMapNode** node,
                                   gconstpointer key,
                                   gconstpointer value,
                                   gpointer* old_value,
                                   GeeTreeMapNode* prev,
                                   GeeTreeMapNode* next);
static GeeTreeMapNode* gee_tree_map_node_new (gpointer key,
                                       gpointer value,
                                       GeeTreeMapNode* prev,
                                       GeeTreeMapNode* next);
static void gee_tree_map_fix_up (GeeTreeMap* self,
                          GeeTreeMapNode** node);
static void gee_tree_map_real_set (GeeAbstractMap* base,
                            gconstpointer key,
                            gconstpointer value);
static void gee_tree_map_move_red_left (GeeTreeMap* self,
                                 GeeTreeMapNode** root);
static void gee_tree_map_node_flip (GeeTreeMapNode* self);
static void gee_tree_map_move_red_right (GeeTreeMap* self,
                                  GeeTreeMapNode** root);
static void gee_tree_map_fix_removal (GeeTreeMap* self,
                               GeeTreeMapNode** node,
                               gpointer* key,
                               gpointer* value);
static void gee_tree_map_remove_minimal (GeeTreeMap* self,
                                  GeeTreeMapNode** node,
                                  gpointer* key,
                                  gpointer* value);
static gboolean gee_tree_map_remove_from_node (GeeTreeMap* self,
                                        GeeTreeMapNode** node,
                                        gconstpointer key,
                                        gpointer* value,
                                        GeeTreeMapNode** prev,
                                        GeeTreeMapNode** next);
static gboolean gee_tree_map_real_unset (GeeAbstractMap* base,
                                  gconstpointer key,
                                  gpointer* value);
static inline void gee_tree_map_clear_subtree (GeeTreeMap* self,
                                 GeeTreeMapNode* node);
static void gee_tree_map_real_clear (GeeAbstractMap* base);
static GeeSortedMap* gee_tree_map_real_head_map (GeeAbstractSortedMap* base,
                                          gconstpointer before);
static GeeTreeMapRange* gee_tree_map_range_new_head (GType k_type,
                                              GBoxedCopyFunc k_dup_func,
                                              GDestroyNotify k_destroy_func,
                                              GType v_type,
                                              GBoxedCopyFunc v_dup_func,
                                              GDestroyNotify v_destroy_func,
                                              GeeTreeMap* map,
                                              gconstpointer before);
static GeeTreeMapRange* gee_tree_map_range_construct_head (GType object_type,
                                                    GType k_type,
                                                    GBoxedCopyFunc k_dup_func,
                                                    GDestroyNotify k_destroy_func,
                                                    GType v_type,
                                                    GBoxedCopyFunc v_dup_func,
                                                    GDestroyNotify v_destroy_func,
                                                    GeeTreeMap* map,
                                                    gconstpointer before);
static gpointer gee_tree_map_range_ref (gpointer instance);
static void gee_tree_map_range_unref (gpointer instance);
static GParamSpec* gee_tree_map_param_spec_range (const gchar* name,
                                           const gchar* nick,
                                           const gchar* blurb,
                                           GType object_type,
                                           GParamFlags flags) G_GNUC_UNUSED ;
static void gee_tree_map_value_set_range (GValue* value,
                                   gpointer v_object) G_GNUC_UNUSED ;
static void gee_tree_map_value_take_range (GValue* value,
                                    gpointer v_object) G_GNUC_UNUSED ;
static gpointer gee_tree_map_value_get_range (const GValue* value) G_GNUC_UNUSED ;
static GType gee_tree_map_range_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static GeeTreeMapSubMap* gee_tree_map_sub_map_new (GType k_type,
                                            GBoxedCopyFunc k_dup_func,
                                            GDestroyNotify k_destroy_func,
                                            GType v_type,
                                            GBoxedCopyFunc v_dup_func,
                                            GDestroyNotify v_destroy_func,
                                            GeeTreeMap* map,
                                            GeeTreeMapRange* range);
static GeeTreeMapSubMap* gee_tree_map_sub_map_construct (GType object_type,
                                                  GType k_type,
                                                  GBoxedCopyFunc k_dup_func,
                                                  GDestroyNotify k_destroy_func,
                                                  GType v_type,
                                                  GBoxedCopyFunc v_dup_func,
                                                  GDestroyNotify v_destroy_func,
                                                  GeeTreeMap* map,
                                                  GeeTreeMapRange* range);
static GType gee_tree_map_sub_map_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static GeeSortedMap* gee_tree_map_real_tail_map (GeeAbstractSortedMap* base,
                                          gconstpointer after);
static GeeTreeMapRange* gee_tree_map_range_new_tail (GType k_type,
                                              GBoxedCopyFunc k_dup_func,
                                              GDestroyNotify k_destroy_func,
                                              GType v_type,
                                              GBoxedCopyFunc v_dup_func,
                                              GDestroyNotify v_destroy_func,
                                              GeeTreeMap* map,
                                              gconstpointer after);
static GeeTreeMapRange* gee_tree_map_range_construct_tail (GType object_type,
                                                    GType k_type,
                                                    GBoxedCopyFunc k_dup_func,
                                                    GDestroyNotify k_destroy_func,
                                                    GType v_type,
                                                    GBoxedCopyFunc v_dup_func,
                                                    GDestroyNotify v_destroy_func,
                                                    GeeTreeMap* map,
                                                    gconstpointer after);
static GeeSortedMap* gee_tree_map_real_sub_map (GeeAbstractSortedMap* base,
                                         gconstpointer after,
                                         gconstpointer before);
static GeeTreeMapRange* gee_tree_map_range_new (GType k_type,
                                         GBoxedCopyFunc k_dup_func,
                                         GDestroyNotify k_destroy_func,
                                         GType v_type,
                                         GBoxedCopyFunc v_dup_func,
                                         GDestroyNotify v_destroy_func,
                                         GeeTreeMap* map,
                                         gconstpointer after,
                                         gconstpointer before);
static GeeTreeMapRange* gee_tree_map_range_construct (GType object_type,
                                               GType k_type,
                                               GBoxedCopyFunc k_dup_func,
                                               GDestroyNotify k_destroy_func,
                                               GType v_type,
                                               GBoxedCopyFunc v_dup_func,
                                               GDestroyNotify v_destroy_func,
                                               GeeTreeMap* map,
                                               gconstpointer after,
                                               gconstpointer before);
static GeeMapIterator* gee_tree_map_real_map_iterator (GeeAbstractMap* base);
static GeeTreeMapMapIterator* gee_tree_map_map_iterator_new (GType k_type,
                                                      GBoxedCopyFunc k_dup_func,
                                                      GDestroyNotify k_destroy_func,
                                                      GType v_type,
                                                      GBoxedCopyFunc v_dup_func,
                                                      GDestroyNotify v_destroy_func,
                                                      GeeTreeMap* map);
static GeeTreeMapMapIterator* gee_tree_map_map_iterator_construct (GType object_type,
                                                            GType k_type,
                                                            GBoxedCopyFunc k_dup_func,
                                                            GDestroyNotify k_destroy_func,
                                                            GType v_type,
                                                            GBoxedCopyFunc v_dup_func,
                                                            GDestroyNotify v_destroy_func,
                                                            GeeTreeMap* map);
static GType gee_tree_map_node_iterator_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static GType gee_tree_map_map_iterator_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static GeeBidirMapIterator* gee_tree_map_real_bidir_map_iterator (GeeAbstractBidirSortedMap* base);
 G_GNUC_INTERNAL GeeFunctionsCompareDataFuncClosure* gee_tree_map_get_key_compare_func_closure (GeeTreeMap* self);
static inline gpointer gee_tree_map_min (GeeTreeMap* self,
                           gconstpointer a,
                           gconstpointer b);
static inline gpointer gee_tree_map_max (GeeTreeMap* self,
                           gconstpointer a,
                           gconstpointer b);
static inline GeeTreeMapNode* gee_tree_map_find_node (GeeTreeMap* self,
                                        gconstpointer key);
static inline GeeTreeMapNode* gee_tree_map_find_nearest (GeeTreeMap* self,
                                           gconstpointer key);
static inline GeeTreeMapNode* gee_tree_map_find_lower (GeeTreeMap* self,
                                         gconstpointer key);
static inline GeeTreeMapNode* gee_tree_map_find_higher (GeeTreeMap* self,
                                          gconstpointer key);
static inline GeeTreeMapNode* gee_tree_map_find_floor (GeeTreeMap* self,
                                         gconstpointer key);
static inline GeeTreeMapNode* gee_tree_map_find_ceil (GeeTreeMap* self,
                                        gconstpointer key);
static inline gpointer gee_tree_map_lift_null_key (GeeTreeMap* self,
                                     GeeTreeMapNode* node);
static GeeTreeMapKeySet* gee_tree_map_key_set_new (GType k_type,
                                            GBoxedCopyFunc k_dup_func,
                                            GDestroyNotify k_destroy_func,
                                            GType v_type,
                                            GBoxedCopyFunc v_dup_func,
                                            GDestroyNotify v_destroy_func,
                                            GeeTreeMap* map);
static GeeTreeMapKeySet* gee_tree_map_key_set_construct (GType object_type,
                                                  GType k_type,
                                                  GBoxedCopyFunc k_dup_func,
                                                  GDestroyNotify k_destroy_func,
                                                  GType v_type,
                                                  GBoxedCopyFunc v_dup_func,
                                                  GDestroyNotify v_destroy_func,
                                                  GeeTreeMap* map);
static GType gee_tree_map_key_set_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static GeeTreeMapValueCollection* gee_tree_map_value_collection_new (GType k_type,
                                                              GBoxedCopyFunc k_dup_func,
                                                              GDestroyNotify k_destroy_func,
                                                              GType v_type,
                                                              GBoxedCopyFunc v_dup_func,
                                                              GDestroyNotify v_destroy_func,
                                                              GeeTreeMap* map);
static GeeTreeMapValueCollection* gee_tree_map_value_collection_construct (GType object_type,
                                                                    GType k_type,
                                                                    GBoxedCopyFunc k_dup_func,
                                                                    GDestroyNotify k_destroy_func,
                                                                    GType v_type,
                                                                    GBoxedCopyFunc v_dup_func,
                                                                    GDestroyNotify v_destroy_func,
                                                                    GeeTreeMap* map);
static GType gee_tree_map_value_collection_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static GeeTreeMapEntrySet* gee_tree_map_entry_set_new (GType k_type,
                                                GBoxedCopyFunc k_dup_func,
                                                GDestroyNotify k_destroy_func,
                                                GType v_type,
                                                GBoxedCopyFunc v_dup_func,
                                                GDestroyNotify v_destroy_func,
                                                GeeTreeMap* map);
static GeeTreeMapEntrySet* gee_tree_map_entry_set_construct (GType object_type,
                                                      GType k_type,
                                                      GBoxedCopyFunc k_dup_func,
                                                      GDestroyNotify k_destroy_func,
                                                      GType v_type,
                                                      GBoxedCopyFunc v_dup_func,
                                                      GDestroyNotify v_destroy_func,
                                                      GeeTreeMap* map);
static GType gee_tree_map_entry_set_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static void gee_tree_map_set_key_compare_func (GeeTreeMap* self,
                                        GCompareDataFunc value,
                                        gpointer value_target);
static void gee_tree_map_set_value_equal_func (GeeTreeMap* self,
                                        GeeEqualDataFunc value,
                                        gpointer value_target);
static void gee_tree_map_node_instance_init (GeeTreeMapNode * self);
static GeeTreeMapNodeColor gee_tree_map_node_color_flip (GeeTreeMapNodeColor self);
static GType gee_tree_map_entry_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static GeeMapEntry* gee_tree_map_entry_entry_for (GType k_type,
                                           GBoxedCopyFunc k_dup_func,
                                           GDestroyNotify k_destroy_func,
                                           GType v_type,
                                           GBoxedCopyFunc v_dup_func,
                                           GDestroyNotify v_destroy_func,
                                           GeeTreeMapNode* node);
static GeeTreeMapEntry* gee_tree_map_entry_new (GType k_type,
                                         GBoxedCopyFunc k_dup_func,
                                         GDestroyNotify k_destroy_func,
                                         GType v_type,
                                         GBoxedCopyFunc v_dup_func,
                                         GDestroyNotify v_destroy_func,
                                         GeeTreeMapNode* node);
static GeeTreeMapEntry* gee_tree_map_entry_construct (GType object_type,
                                               GType k_type,
                                               GBoxedCopyFunc k_dup_func,
                                               GDestroyNotify k_destroy_func,
                                               GType v_type,
                                               GBoxedCopyFunc v_dup_func,
                                               GDestroyNotify v_destroy_func,
                                               GeeTreeMapNode* node);
static void gee_tree_map_entry_finalize (GObject * obj);
static GType gee_tree_map_entry_get_type_once (void);
static void _vala_gee_tree_map_entry_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec);
static void _vala_gee_tree_map_entry_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec);
static GeeTreeMapRange* gee_tree_map_range_new_empty (GType k_type,
                                               GBoxedCopyFunc k_dup_func,
                                               GDestroyNotify k_destroy_func,
                                               GType v_type,
                                               GBoxedCopyFunc v_dup_func,
                                               GDestroyNotify v_destroy_func,
                                               GeeTreeMap* map);
static GeeTreeMapRange* gee_tree_map_range_construct_empty (GType object_type,
                                                     GType k_type,
                                                     GBoxedCopyFunc k_dup_func,
                                                     GDestroyNotify k_destroy_func,
                                                     GType v_type,
                                                     GBoxedCopyFunc v_dup_func,
                                                     GDestroyNotify v_destroy_func,
                                                     GeeTreeMap* map);
static GeeTreeMapRange* gee_tree_map_range_cut_head (GeeTreeMapRange* self,
                                              gconstpointer after);
static GeeTreeMapRange* gee_tree_map_range_cut_tail (GeeTreeMapRange* self,
                                              gconstpointer before);
static GeeTreeMapRange* gee_tree_map_range_cut (GeeTreeMapRange* self,
                                         gconstpointer after,
                                         gconstpointer before);
static gboolean gee_tree_map_range_in_range (GeeTreeMapRange* self,
                                      gconstpointer key);
static gint gee_tree_map_range_compare_range (GeeTreeMapRange* self,
                                       gconstpointer key);
static gboolean gee_tree_map_range_empty_submap (GeeTreeMapRange* self);
static GeeTreeMapNode* gee_tree_map_range_first (GeeTreeMapRange* self);
static GeeTreeMapNode* gee_tree_map_range_last (GeeTreeMapRange* self);
static void gee_tree_map_range_finalize (GeeTreeMapRange * obj);
static GType gee_tree_map_range_get_type_once (void);
static gboolean gee_tree_map_sub_map_real_has_key (GeeAbstractMap* base,
                                            gconstpointer key);
static gboolean gee_tree_map_sub_map_real_has (GeeAbstractMap* base,
                                        gconstpointer key,
                                        gconstpointer value);
static gpointer gee_tree_map_sub_map_real_get (GeeAbstractMap* base,
                                        gconstpointer key);
static void gee_tree_map_sub_map_real_set (GeeAbstractMap* base,
                                    gconstpointer key,
                                    gconstpointer value);
static gboolean gee_tree_map_sub_map_real_unset (GeeAbstractMap* base,
                                          gconstpointer key,
                                          gpointer* value);
static void gee_tree_map_sub_map_real_clear (GeeAbstractMap* base);
static GeeMapIterator* gee_tree_map_sub_map_real_map_iterator (GeeAbstractMap* base);
static GeeTreeMapSubMapIterator* gee_tree_map_sub_map_iterator_new (GType k_type,
                                                             GBoxedCopyFunc k_dup_func,
                                                             GDestroyNotify k_destroy_func,
                                                             GType v_type,
                                                             GBoxedCopyFunc v_dup_func,
                                                             GDestroyNotify v_destroy_func,
                                                             GeeTreeMap* map,
                                                             GeeTreeMapRange* range);
static GeeTreeMapSubMapIterator* gee_tree_map_sub_map_iterator_construct (GType object_type,
                                                                   GType k_type,
                                                                   GBoxedCopyFunc k_dup_func,
                                                                   GDestroyNotify k_destroy_func,
                                                                   GType v_type,
                                                                   GBoxedCopyFunc v_dup_func,
                                                                   GDestroyNotify v_destroy_func,
                                                                   GeeTreeMap* map,
                                                                   GeeTreeMapRange* range);
static GType gee_tree_map_sub_node_iterator_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static GType gee_tree_map_sub_map_iterator_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static GeeBidirMapIterator* gee_tree_map_sub_map_real_bidir_map_iterator (GeeAbstractBidirSortedMap* base);
static GeeSortedMap* gee_tree_map_sub_map_real_head_map (GeeAbstractSortedMap* base,
                                                  gconstpointer before);
static GeeSortedMap* gee_tree_map_sub_map_real_tail_map (GeeAbstractSortedMap* base,
                                                  gconstpointer after);
static GeeSortedMap* gee_tree_map_sub_map_real_sub_map (GeeAbstractSortedMap* base,
                                                 gconstpointer after,
                                                 gconstpointer before);
static gboolean gee_tree_map_sub_map_get_is_empty (GeeTreeMapSubMap* self);
static GeeTreeMapSubKeySet* gee_tree_map_sub_key_set_new (GType k_type,
                                                   GBoxedCopyFunc k_dup_func,
                                                   GDestroyNotify k_destroy_func,
                                                   GType v_type,
                                                   GBoxedCopyFunc v_dup_func,
                                                   GDestroyNotify v_destroy_func,
                                                   GeeTreeMap* map,
                                                   GeeTreeMapRange* range);
static GeeTreeMapSubKeySet* gee_tree_map_sub_key_set_construct (GType object_type,
                                                         GType k_type,
                                                         GBoxedCopyFunc k_dup_func,
                                                         GDestroyNotify k_destroy_func,
                                                         GType v_type,
                                                         GBoxedCopyFunc v_dup_func,
                                                         GDestroyNotify v_destroy_func,
                                                         GeeTreeMap* map,
                                                         GeeTreeMapRange* range);
static GType gee_tree_map_sub_key_set_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static GeeTreeMapSubValueCollection* gee_tree_map_sub_value_collection_new (GType k_type,
                                                                     GBoxedCopyFunc k_dup_func,
                                                                     GDestroyNotify k_destroy_func,
                                                                     GType v_type,
                                                                     GBoxedCopyFunc v_dup_func,
                                                                     GDestroyNotify v_destroy_func,
                                                                     GeeTreeMap* map,
                                                                     GeeTreeMapRange* range);
static GeeTreeMapSubValueCollection* gee_tree_map_sub_value_collection_construct (GType object_type,
                                                                           GType k_type,
                                                                           GBoxedCopyFunc k_dup_func,
                                                                           GDestroyNotify k_destroy_func,
                                                                           GType v_type,
                                                                           GBoxedCopyFunc v_dup_func,
                                                                           GDestroyNotify v_destroy_func,
                                                                           GeeTreeMap* map,
                                                                           GeeTreeMapRange* range);
static GType gee_tree_map_sub_value_collection_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static GeeTreeMapSubEntrySet* gee_tree_map_sub_entry_set_new (GType k_type,
                                                       GBoxedCopyFunc k_dup_func,
                                                       GDestroyNotify k_destroy_func,
                                                       GType v_type,
                                                       GBoxedCopyFunc v_dup_func,
                                                       GDestroyNotify v_destroy_func,
                                                       GeeTreeMap* map,
                                                       GeeTreeMapRange* range);
static GeeTreeMapSubEntrySet* gee_tree_map_sub_entry_set_construct (GType object_type,
                                                             GType k_type,
                                                             GBoxedCopyFunc k_dup_func,
                                                             GDestroyNotify k_destroy_func,
                                                             GType v_type,
                                                             GBoxedCopyFunc v_dup_func,
                                                             GDestroyNotify v_destroy_func,
                                                             GeeTreeMap* map,
                                                             GeeTreeMapRange* range);
static GType gee_tree_map_sub_entry_set_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static void gee_tree_map_sub_map_finalize (GObject * obj);
static GType gee_tree_map_sub_map_get_type_once (void);
static void _vala_gee_tree_map_sub_map_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_gee_tree_map_sub_map_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);
static GeeIterator* gee_tree_map_key_set_real_iterator (GeeAbstractCollection* base);
static GeeTreeMapKeyIterator* gee_tree_map_key_iterator_new (GType k_type,
                                                      GBoxedCopyFunc k_dup_func,
                                                      GDestroyNotify k_destroy_func,
                                                      GType v_type,
                                                      GBoxedCopyFunc v_dup_func,
                                                      GDestroyNotify v_destroy_func,
                                                      GeeTreeMap* map);
static GeeTreeMapKeyIterator* gee_tree_map_key_iterator_construct (GType object_type,
                                                            GType k_type,
                                                            GBoxedCopyFunc k_dup_func,
                                                            GDestroyNotify k_destroy_func,
                                                            GType v_type,
                                                            GBoxedCopyFunc v_dup_func,
                                                            GDestroyNotify v_destroy_func,
                                                            GeeTreeMap* map);
static GType gee_tree_map_key_iterator_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static gboolean gee_tree_map_key_set_real_add (GeeAbstractCollection* base,
                                        gconstpointer key);
static void gee_tree_map_key_set_real_clear (GeeAbstractCollection* base);
static gboolean gee_tree_map_key_set_real_remove (GeeAbstractCollection* base,
                                           gconstpointer key);
static gboolean gee_tree_map_key_set_real_contains (GeeAbstractCollection* base,
                                             gconstpointer key);
static gpointer gee_tree_map_key_set_real_first (GeeAbstractSortedSet* base);
static gpointer gee_tree_map_key_set_real_last (GeeAbstractSortedSet* base);
static GeeBidirIterator* gee_tree_map_key_set_real_bidir_iterator (GeeAbstractBidirSortedSet* base);
static GeeSortedSet* gee_tree_map_key_set_real_head_set (GeeAbstractSortedSet* base,
                                                  gconstpointer before);
static GeeSortedSet* gee_tree_map_key_set_real_tail_set (GeeAbstractSortedSet* base,
                                                  gconstpointer after);
static GeeSortedSet* gee_tree_map_key_set_real_sub_set (GeeAbstractSortedSet* base,
                                                 gconstpointer after,
                                                 gconstpointer before);
static GeeIterator* gee_tree_map_key_set_real_iterator_at (GeeAbstractSortedSet* base,
                                                    gconstpointer item);
static GeeTreeMapKeyIterator* gee_tree_map_key_iterator_new_pointing (GType k_type,
                                                               GBoxedCopyFunc k_dup_func,
                                                               GDestroyNotify k_destroy_func,
                                                               GType v_type,
                                                               GBoxedCopyFunc v_dup_func,
                                                               GDestroyNotify v_destroy_func,
                                                               GeeTreeMap* map,
                                                               GeeTreeMapNode* current);
static GeeTreeMapKeyIterator* gee_tree_map_key_iterator_construct_pointing (GType object_type,
                                                                     GType k_type,
                                                                     GBoxedCopyFunc k_dup_func,
                                                                     GDestroyNotify k_destroy_func,
                                                                     GType v_type,
                                                                     GBoxedCopyFunc v_dup_func,
                                                                     GDestroyNotify v_destroy_func,
                                                                     GeeTreeMap* map,
                                                                     GeeTreeMapNode* current);
static gpointer gee_tree_map_key_set_real_lower (GeeAbstractSortedSet* base,
                                          gconstpointer item);
static gpointer gee_tree_map_key_set_real_higher (GeeAbstractSortedSet* base,
                                           gconstpointer item);
static gpointer gee_tree_map_key_set_real_floor (GeeAbstractSortedSet* base,
                                          gconstpointer item);
static gpointer gee_tree_map_key_set_real_ceil (GeeAbstractSortedSet* base,
                                         gconstpointer item);
static void gee_tree_map_key_set_finalize (GObject * obj);
static GType gee_tree_map_key_set_get_type_once (void);
static void _vala_gee_tree_map_key_set_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_gee_tree_map_key_set_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);
static void gee_tree_map_sub_key_set_set_map (GeeTreeMapSubKeySet* self,
                                       GeeTreeMap* value);
static void gee_tree_map_sub_key_set_set_range (GeeTreeMapSubKeySet* self,
                                         GeeTreeMapRange* value);
static GeeIterator* gee_tree_map_sub_key_set_real_iterator (GeeAbstractCollection* base);
static GeeTreeMap* gee_tree_map_sub_key_set_get_map (GeeTreeMapSubKeySet* self);
static GeeTreeMapRange* gee_tree_map_sub_key_set_get_range (GeeTreeMapSubKeySet* self);
static GeeTreeMapSubKeyIterator* gee_tree_map_sub_key_iterator_new (GType k_type,
                                                             GBoxedCopyFunc k_dup_func,
                                                             GDestroyNotify k_destroy_func,
                                                             GType v_type,
                                                             GBoxedCopyFunc v_dup_func,
                                                             GDestroyNotify v_destroy_func,
                                                             GeeTreeMap* map,
                                                             GeeTreeMapRange* range);
static GeeTreeMapSubKeyIterator* gee_tree_map_sub_key_iterator_construct (GType object_type,
                                                                   GType k_type,
                                                                   GBoxedCopyFunc k_dup_func,
                                                                   GDestroyNotify k_destroy_func,
                                                                   GType v_type,
                                                                   GBoxedCopyFunc v_dup_func,
                                                                   GDestroyNotify v_destroy_func,
                                                                   GeeTreeMap* map,
                                                                   GeeTreeMapRange* range);
static GType gee_tree_map_sub_key_iterator_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static gboolean gee_tree_map_sub_key_set_real_add (GeeAbstractCollection* base,
                                            gconstpointer key);
static void gee_tree_map_sub_key_set_real_clear (GeeAbstractCollection* base);
static gboolean gee_tree_map_sub_key_set_real_remove (GeeAbstractCollection* base,
                                               gconstpointer key);
static gboolean gee_tree_map_sub_key_set_real_contains (GeeAbstractCollection* base,
                                                 gconstpointer key);
static GeeBidirIterator* gee_tree_map_sub_key_set_real_bidir_iterator (GeeAbstractBidirSortedSet* base);
static gpointer gee_tree_map_sub_key_set_real_first (GeeAbstractSortedSet* base);
static gpointer gee_tree_map_sub_key_set_real_last (GeeAbstractSortedSet* base);
static GeeSortedSet* gee_tree_map_sub_key_set_real_head_set (GeeAbstractSortedSet* base,
                                                      gconstpointer before);
static GeeSortedSet* gee_tree_map_sub_key_set_real_tail_set (GeeAbstractSortedSet* base,
                                                      gconstpointer after);
static GeeSortedSet* gee_tree_map_sub_key_set_real_sub_set (GeeAbstractSortedSet* base,
                                                     gconstpointer after,
                                                     gconstpointer before);
static GeeIterator* gee_tree_map_sub_key_set_real_iterator_at (GeeAbstractSortedSet* base,
                                                        gconstpointer key);
static GeeTreeMapSubKeyIterator* gee_tree_map_sub_key_iterator_new_pointing (GType k_type,
                                                                      GBoxedCopyFunc k_dup_func,
                                                                      GDestroyNotify k_destroy_func,
                                                                      GType v_type,
                                                                      GBoxedCopyFunc v_dup_func,
                                                                      GDestroyNotify v_destroy_func,
                                                                      GeeTreeMap* map,
                                                                      GeeTreeMapRange* range,
                                                                      GeeTreeMapNode* node);
static GeeTreeMapSubKeyIterator* gee_tree_map_sub_key_iterator_construct_pointing (GType object_type,
                                                                            GType k_type,
                                                                            GBoxedCopyFunc k_dup_func,
                                                                            GDestroyNotify k_destroy_func,
                                                                            GType v_type,
                                                                            GBoxedCopyFunc v_dup_func,
                                                                            GDestroyNotify v_destroy_func,
                                                                            GeeTreeMap* map,
                                                                            GeeTreeMapRange* range,
                                                                            GeeTreeMapNode* node);
static gpointer gee_tree_map_sub_key_set_real_lower (GeeAbstractSortedSet* base,
                                              gconstpointer key);
static gpointer gee_tree_map_sub_key_set_real_higher (GeeAbstractSortedSet* base,
                                               gconstpointer key);
static gpointer gee_tree_map_sub_key_set_real_floor (GeeAbstractSortedSet* base,
                                              gconstpointer key);
static gpointer gee_tree_map_sub_key_set_real_ceil (GeeAbstractSortedSet* base,
                                             gconstpointer key);
static gboolean gee_tree_map_sub_key_set_get_is_empty (GeeTreeMapSubKeySet* self);
static void gee_tree_map_sub_key_set_finalize (GObject * obj);
static GType gee_tree_map_sub_key_set_get_type_once (void);
static void _vala_gee_tree_map_sub_key_set_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec);
static void _vala_gee_tree_map_sub_key_set_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec);
static GeeIterator* gee_tree_map_value_collection_real_iterator (GeeAbstractCollection* base);
static GeeTreeMapValueIterator* gee_tree_map_value_iterator_new (GType k_type,
                                                          GBoxedCopyFunc k_dup_func,
                                                          GDestroyNotify k_destroy_func,
                                                          GType v_type,
                                                          GBoxedCopyFunc v_dup_func,
                                                          GDestroyNotify v_destroy_func,
                                                          GeeTreeMap* map);
static GeeTreeMapValueIterator* gee_tree_map_value_iterator_construct (GType object_type,
                                                                GType k_type,
                                                                GBoxedCopyFunc k_dup_func,
                                                                GDestroyNotify k_destroy_func,
                                                                GType v_type,
                                                                GBoxedCopyFunc v_dup_func,
                                                                GDestroyNotify v_destroy_func,
                                                                GeeTreeMap* map);
static GType gee_tree_map_value_iterator_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static gboolean gee_tree_map_value_collection_real_add (GeeAbstractCollection* base,
                                                 gconstpointer key);
static void gee_tree_map_value_collection_real_clear (GeeAbstractCollection* base);
static gboolean gee_tree_map_value_collection_real_remove (GeeAbstractCollection* base,
                                                    gconstpointer key);
static gboolean gee_tree_map_value_collection_real_contains (GeeAbstractCollection* base,
                                                      gconstpointer key);
static void gee_tree_map_value_collection_finalize (GObject * obj);
static GType gee_tree_map_value_collection_get_type_once (void);
static void _vala_gee_tree_map_value_collection_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_gee_tree_map_value_collection_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);
static void gee_tree_map_sub_value_collection_set_map (GeeTreeMapSubValueCollection* self,
                                                GeeTreeMap* value);
static void gee_tree_map_sub_value_collection_set_range (GeeTreeMapSubValueCollection* self,
                                                  GeeTreeMapRange* value);
static GeeIterator* gee_tree_map_sub_value_collection_real_iterator (GeeAbstractCollection* base);
static GeeTreeMap* gee_tree_map_sub_value_collection_get_map (GeeTreeMapSubValueCollection* self);
static GeeTreeMapRange* gee_tree_map_sub_value_collection_get_range (GeeTreeMapSubValueCollection* self);
static GeeTreeMapSubValueIterator* gee_tree_map_sub_value_iterator_new (GType k_type,
                                                                 GBoxedCopyFunc k_dup_func,
                                                                 GDestroyNotify k_destroy_func,
                                                                 GType v_type,
                                                                 GBoxedCopyFunc v_dup_func,
                                                                 GDestroyNotify v_destroy_func,
                                                                 GeeTreeMap* map,
                                                                 GeeTreeMapRange* range);
static GeeTreeMapSubValueIterator* gee_tree_map_sub_value_iterator_construct (GType object_type,
                                                                       GType k_type,
                                                                       GBoxedCopyFunc k_dup_func,
                                                                       GDestroyNotify k_destroy_func,
                                                                       GType v_type,
                                                                       GBoxedCopyFunc v_dup_func,
                                                                       GDestroyNotify v_destroy_func,
                                                                       GeeTreeMap* map,
                                                                       GeeTreeMapRange* range);
static GType gee_tree_map_sub_value_iterator_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static gboolean gee_tree_map_sub_value_collection_real_add (GeeAbstractCollection* base,
                                                     gconstpointer key);
static void gee_tree_map_sub_value_collection_real_clear (GeeAbstractCollection* base);
static gboolean gee_tree_map_sub_value_collection_real_remove (GeeAbstractCollection* base,
                                                        gconstpointer key);
static gboolean gee_tree_map_sub_value_collection_real_contains (GeeAbstractCollection* base,
                                                          gconstpointer key);
static gboolean gee_tree_map_sub_value_collection_get_is_empty (GeeTreeMapSubValueCollection* self);
static void gee_tree_map_sub_value_collection_finalize (GObject * obj);
static GType gee_tree_map_sub_value_collection_get_type_once (void);
static void _vala_gee_tree_map_sub_value_collection_get_property (GObject * object,
                                                           guint property_id,
                                                           GValue * value,
                                                           GParamSpec * pspec);
static void _vala_gee_tree_map_sub_value_collection_set_property (GObject * object,
                                                           guint property_id,
                                                           const GValue * value,
                                                           GParamSpec * pspec);
static GeeIterator* gee_tree_map_entry_set_real_iterator (GeeAbstractCollection* base);
static GeeTreeMapEntryIterator* gee_tree_map_entry_iterator_new (GType k_type,
                                                          GBoxedCopyFunc k_dup_func,
                                                          GDestroyNotify k_destroy_func,
                                                          GType v_type,
                                                          GBoxedCopyFunc v_dup_func,
                                                          GDestroyNotify v_destroy_func,
                                                          GeeTreeMap* map);
static GeeTreeMapEntryIterator* gee_tree_map_entry_iterator_construct (GType object_type,
                                                                GType k_type,
                                                                GBoxedCopyFunc k_dup_func,
                                                                GDestroyNotify k_destroy_func,
                                                                GType v_type,
                                                                GBoxedCopyFunc v_dup_func,
                                                                GDestroyNotify v_destroy_func,
                                                                GeeTreeMap* map);
static GType gee_tree_map_entry_iterator_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static gboolean gee_tree_map_entry_set_real_add (GeeAbstractCollection* base,
                                          GeeMapEntry* entry);
static void gee_tree_map_entry_set_real_clear (GeeAbstractCollection* base);
static gboolean gee_tree_map_entry_set_real_remove (GeeAbstractCollection* base,
                                             GeeMapEntry* entry);
static gboolean gee_tree_map_entry_set_real_contains (GeeAbstractCollection* base,
                                               GeeMapEntry* entry);
static GeeMapEntry* gee_tree_map_entry_set_real_first (GeeAbstractSortedSet* base);
static GeeMapEntry* gee_tree_map_entry_set_real_last (GeeAbstractSortedSet* base);
static GeeBidirIterator* gee_tree_map_entry_set_real_bidir_iterator (GeeAbstractBidirSortedSet* base);
static GeeSortedSet* gee_tree_map_entry_set_real_head_set (GeeAbstractSortedSet* base,
                                                    GeeMapEntry* before);
static GeeSortedSet* gee_tree_map_entry_set_real_tail_set (GeeAbstractSortedSet* base,
                                                    GeeMapEntry* after);
static GeeSortedSet* gee_tree_map_entry_set_real_sub_set (GeeAbstractSortedSet* base,
                                                   GeeMapEntry* after,
                                                   GeeMapEntry* before);
static GeeIterator* gee_tree_map_entry_set_real_iterator_at (GeeAbstractSortedSet* base,
                                                      GeeMapEntry* item);
static GeeTreeMapEntryIterator* gee_tree_map_entry_iterator_new_pointing (GType k_type,
                                                                   GBoxedCopyFunc k_dup_func,
                                                                   GDestroyNotify k_destroy_func,
                                                                   GType v_type,
                                                                   GBoxedCopyFunc v_dup_func,
                                                                   GDestroyNotify v_destroy_func,
                                                                   GeeTreeMap* map,
                                                                   GeeTreeMapNode* node);
static GeeTreeMapEntryIterator* gee_tree_map_entry_iterator_construct_pointing (GType object_type,
                                                                         GType k_type,
                                                                         GBoxedCopyFunc k_dup_func,
                                                                         GDestroyNotify k_destroy_func,
                                                                         GType v_type,
                                                                         GBoxedCopyFunc v_dup_func,
                                                                         GDestroyNotify v_destroy_func,
                                                                         GeeTreeMap* map,
                                                                         GeeTreeMapNode* node);
static GeeMapEntry* gee_tree_map_entry_set_real_lower (GeeAbstractSortedSet* base,
                                                GeeMapEntry* item);
static GeeMapEntry* gee_tree_map_entry_set_real_higher (GeeAbstractSortedSet* base,
                                                 GeeMapEntry* item);
static GeeMapEntry* gee_tree_map_entry_set_real_floor (GeeAbstractSortedSet* base,
                                                GeeMapEntry* item);
static GeeMapEntry* gee_tree_map_entry_set_real_ceil (GeeAbstractSortedSet* base,
                                               GeeMapEntry* item);
static void gee_tree_map_entry_set_finalize (GObject * obj);
static GType gee_tree_map_entry_set_get_type_once (void);
static void _vala_gee_tree_map_entry_set_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_gee_tree_map_entry_set_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);
static void gee_tree_map_sub_entry_set_set_map (GeeTreeMapSubEntrySet* self,
                                         GeeTreeMap* value);
static void gee_tree_map_sub_entry_set_set_range (GeeTreeMapSubEntrySet* self,
                                           GeeTreeMapRange* value);
static GeeIterator* gee_tree_map_sub_entry_set_real_iterator (GeeAbstractCollection* base);
static GeeTreeMap* gee_tree_map_sub_entry_set_get_map (GeeTreeMapSubEntrySet* self);
static GeeTreeMapRange* gee_tree_map_sub_entry_set_get_range (GeeTreeMapSubEntrySet* self);
static GeeTreeMapSubEntryIterator* gee_tree_map_sub_entry_iterator_new (GType k_type,
                                                                 GBoxedCopyFunc k_dup_func,
                                                                 GDestroyNotify k_destroy_func,
                                                                 GType v_type,
                                                                 GBoxedCopyFunc v_dup_func,
                                                                 GDestroyNotify v_destroy_func,
                                                                 GeeTreeMap* map,
                                                                 GeeTreeMapRange* range);
static GeeTreeMapSubEntryIterator* gee_tree_map_sub_entry_iterator_construct (GType object_type,
                                                                       GType k_type,
                                                                       GBoxedCopyFunc k_dup_func,
                                                                       GDestroyNotify k_destroy_func,
                                                                       GType v_type,
                                                                       GBoxedCopyFunc v_dup_func,
                                                                       GDestroyNotify v_destroy_func,
                                                                       GeeTreeMap* map,
                                                                       GeeTreeMapRange* range);
static GType gee_tree_map_sub_entry_iterator_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static gboolean gee_tree_map_sub_entry_set_real_add (GeeAbstractCollection* base,
                                              GeeMapEntry* entry);
static void gee_tree_map_sub_entry_set_real_clear (GeeAbstractCollection* base);
static gboolean gee_tree_map_sub_entry_set_real_remove (GeeAbstractCollection* base,
                                                 GeeMapEntry* entry);
static gboolean gee_tree_map_sub_entry_set_real_contains (GeeAbstractCollection* base,
                                                   GeeMapEntry* entry);
static GeeBidirIterator* gee_tree_map_sub_entry_set_real_bidir_iterator (GeeAbstractBidirSortedSet* base);
static GeeMapEntry* gee_tree_map_sub_entry_set_real_first (GeeAbstractSortedSet* base);
static GeeMapEntry* gee_tree_map_sub_entry_set_real_last (GeeAbstractSortedSet* base);
static GeeSortedSet* gee_tree_map_sub_entry_set_real_head_set (GeeAbstractSortedSet* base,
                                                        GeeMapEntry* before);
static GeeSortedSet* gee_tree_map_sub_entry_set_real_tail_set (GeeAbstractSortedSet* base,
                                                        GeeMapEntry* after);
static GeeSortedSet* gee_tree_map_sub_entry_set_real_sub_set (GeeAbstractSortedSet* base,
                                                       GeeMapEntry* after,
                                                       GeeMapEntry* before);
static GeeIterator* gee_tree_map_sub_entry_set_real_iterator_at (GeeAbstractSortedSet* base,
                                                          GeeMapEntry* entry);
static GeeTreeMapSubEntryIterator* gee_tree_map_sub_entry_iterator_new_pointing (GType k_type,
                                                                          GBoxedCopyFunc k_dup_func,
                                                                          GDestroyNotify k_destroy_func,
                                                                          GType v_type,
                                                                          GBoxedCopyFunc v_dup_func,
                                                                          GDestroyNotify v_destroy_func,
                                                                          GeeTreeMap* map,
                                                                          GeeTreeMapRange* range,
                                                                          GeeTreeMapNode* node);
static GeeTreeMapSubEntryIterator* gee_tree_map_sub_entry_iterator_construct_pointing (GType object_type,
                                                                                GType k_type,
                                                                                GBoxedCopyFunc k_dup_func,
                                                                                GDestroyNotify k_destroy_func,
                                                                                GType v_type,
                                                                                GBoxedCopyFunc v_dup_func,
                                                                                GDestroyNotify v_destroy_func,
                                                                                GeeTreeMap* map,
                                                                                GeeTreeMapRange* range,
                                                                                GeeTreeMapNode* node);
static GeeMapEntry* gee_tree_map_sub_entry_set_real_lower (GeeAbstractSortedSet* base,
                                                    GeeMapEntry* entry);
static GeeMapEntry* gee_tree_map_sub_entry_set_real_higher (GeeAbstractSortedSet* base,
                                                     GeeMapEntry* entry);
static GeeMapEntry* gee_tree_map_sub_entry_set_real_floor (GeeAbstractSortedSet* base,
                                                    GeeMapEntry* entry);
static GeeMapEntry* gee_tree_map_sub_entry_set_real_ceil (GeeAbstractSortedSet* base,
                                                   GeeMapEntry* entry);
static gboolean gee_tree_map_sub_entry_set_get_is_empty (GeeTreeMapSubEntrySet* self);
static void gee_tree_map_sub_entry_set_finalize (GObject * obj);
static GType gee_tree_map_sub_entry_set_get_type_once (void);
static void _vala_gee_tree_map_sub_entry_set_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static void _vala_gee_tree_map_sub_entry_set_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec);
static gboolean gee_tree_map_node_iterator_get_read_only (GeeTreeMapNodeIterator* self);
static GeeTreeMapNodeIterator* gee_tree_map_node_iterator_new (GType k_type,
                                                        GBoxedCopyFunc k_dup_func,
                                                        GDestroyNotify k_destroy_func,
                                                        GType v_type,
                                                        GBoxedCopyFunc v_dup_func,
                                                        GDestroyNotify v_destroy_func,
                                                        GeeTreeMap* map);
static GeeTreeMapNodeIterator* gee_tree_map_node_iterator_construct (GType object_type,
                                                              GType k_type,
                                                              GBoxedCopyFunc k_dup_func,
                                                              GDestroyNotify k_destroy_func,
                                                              GType v_type,
                                                              GBoxedCopyFunc v_dup_func,
                                                              GDestroyNotify v_destroy_func,
                                                              GeeTreeMap* map);
static GeeTreeMapNodeIterator* gee_tree_map_node_iterator_new_pointing (GType k_type,
                                                                 GBoxedCopyFunc k_dup_func,
                                                                 GDestroyNotify k_destroy_func,
                                                                 GType v_type,
                                                                 GBoxedCopyFunc v_dup_func,
                                                                 GDestroyNotify v_destroy_func,
                                                                 GeeTreeMap* map,
                                                                 GeeTreeMapNode* current);
static GeeTreeMapNodeIterator* gee_tree_map_node_iterator_construct_pointing (GType object_type,
                                                                       GType k_type,
                                                                       GBoxedCopyFunc k_dup_func,
                                                                       GDestroyNotify k_destroy_func,
                                                                       GType v_type,
                                                                       GBoxedCopyFunc v_dup_func,
                                                                       GDestroyNotify v_destroy_func,
                                                                       GeeTreeMap* map,
                                                                       GeeTreeMapNode* current);
static GeeTreeMapNodeIterator* gee_tree_map_node_iterator_new_from_iterator (GType k_type,
                                                                      GBoxedCopyFunc k_dup_func,
                                                                      GDestroyNotify k_destroy_func,
                                                                      GType v_type,
                                                                      GBoxedCopyFunc v_dup_func,
                                                                      GDestroyNotify v_destroy_func,
                                                                      GeeTreeMapNodeIterator* iter);
static GeeTreeMapNodeIterator* gee_tree_map_node_iterator_construct_from_iterator (GType object_type,
                                                                            GType k_type,
                                                                            GBoxedCopyFunc k_dup_func,
                                                                            GDestroyNotify k_destroy_func,
                                                                            GType v_type,
                                                                            GBoxedCopyFunc v_dup_func,
                                                                            GDestroyNotify v_destroy_func,
                                                                            GeeTreeMapNodeIterator* iter);
static gboolean gee_tree_map_node_iterator_next (GeeTreeMapNodeIterator* self);
static gboolean gee_tree_map_node_iterator_has_next (GeeTreeMapNodeIterator* self);
static gboolean gee_tree_map_node_iterator_first (GeeTreeMapNodeIterator* self);
static gboolean gee_tree_map_node_iterator_previous (GeeTreeMapNodeIterator* self);
static gboolean gee_tree_map_node_iterator_has_previous (GeeTreeMapNodeIterator* self);
static gboolean gee_tree_map_node_iterator_last (GeeTreeMapNodeIterator* self);
static void gee_tree_map_node_iterator_remove (GeeTreeMapNodeIterator* self);
static void gee_tree_map_node_iterator_unset (GeeTreeMapNodeIterator* self);
static GeeTreeMapNode* gee_tree_map_node_iterator_safe_next_get (GeeTreeMapNodeIterator* self);
static GeeTreeMapNode* gee_tree_map_node_iterator_safe_previous_get (GeeTreeMapNodeIterator* self);
static gboolean gee_tree_map_node_iterator_get_valid (GeeTreeMapNodeIterator* self);
static void gee_tree_map_node_iterator_finalize (GObject * obj);
static GType gee_tree_map_node_iterator_get_type_once (void);
static void _vala_gee_tree_map_node_iterator_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static void _vala_gee_tree_map_node_iterator_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec);
static gboolean gee_tree_map_sub_node_iterator_first (GeeTreeMapSubNodeIterator* self);
static gboolean gee_tree_map_sub_node_iterator_last (GeeTreeMapSubNodeIterator* self);
static GeeTreeMapNodeIterator* gee_tree_map_sub_node_iterator_iterator_pointing_at (GeeTreeMapSubNodeIterator* self,
                                                                             GeeTreeMapNode* node);
static gboolean gee_tree_map_sub_node_iterator_get_read_only (GeeTreeMapSubNodeIterator* self);
static GeeTreeMapSubNodeIterator* gee_tree_map_sub_node_iterator_new (GType k_type,
                                                               GBoxedCopyFunc k_dup_func,
                                                               GDestroyNotify k_destroy_func,
                                                               GType v_type,
                                                               GBoxedCopyFunc v_dup_func,
                                                               GDestroyNotify v_destroy_func,
                                                               GeeTreeMap* map,
                                                               GeeTreeMapRange* range);
static GeeTreeMapSubNodeIterator* gee_tree_map_sub_node_iterator_construct (GType object_type,
                                                                     GType k_type,
                                                                     GBoxedCopyFunc k_dup_func,
                                                                     GDestroyNotify k_destroy_func,
                                                                     GType v_type,
                                                                     GBoxedCopyFunc v_dup_func,
                                                                     GDestroyNotify v_destroy_func,
                                                                     GeeTreeMap* map,
                                                                     GeeTreeMapRange* range);
static GeeTreeMapSubNodeIterator* gee_tree_map_sub_node_iterator_new_pointing (GType k_type,
                                                                        GBoxedCopyFunc k_dup_func,
                                                                        GDestroyNotify k_destroy_func,
                                                                        GType v_type,
                                                                        GBoxedCopyFunc v_dup_func,
                                                                        GDestroyNotify v_destroy_func,
                                                                        GeeTreeMap* map,
                                                                        GeeTreeMapRange* range,
                                                                        GeeTreeMapNode* node);
static GeeTreeMapSubNodeIterator* gee_tree_map_sub_node_iterator_construct_pointing (GType object_type,
                                                                              GType k_type,
                                                                              GBoxedCopyFunc k_dup_func,
                                                                              GDestroyNotify k_destroy_func,
                                                                              GType v_type,
                                                                              GBoxedCopyFunc v_dup_func,
                                                                              GDestroyNotify v_destroy_func,
                                                                              GeeTreeMap* map,
                                                                              GeeTreeMapRange* range,
                                                                              GeeTreeMapNode* node);
static GeeTreeMapSubNodeIterator* gee_tree_map_sub_node_iterator_new_from_iterator (GType k_type,
                                                                             GBoxedCopyFunc k_dup_func,
                                                                             GDestroyNotify k_destroy_func,
                                                                             GType v_type,
                                                                             GBoxedCopyFunc v_dup_func,
                                                                             GDestroyNotify v_destroy_func,
                                                                             GeeTreeMapSubNodeIterator* iter);
static GeeTreeMapSubNodeIterator* gee_tree_map_sub_node_iterator_construct_from_iterator (GType object_type,
                                                                                   GType k_type,
                                                                                   GBoxedCopyFunc k_dup_func,
                                                                                   GDestroyNotify k_destroy_func,
                                                                                   GType v_type,
                                                                                   GBoxedCopyFunc v_dup_func,
                                                                                   GDestroyNotify v_destroy_func,
                                                                                   GeeTreeMapSubNodeIterator* iter);
static gboolean gee_tree_map_sub_node_iterator_next (GeeTreeMapSubNodeIterator* self);
static gboolean gee_tree_map_sub_node_iterator_has_next (GeeTreeMapSubNodeIterator* self);
static gboolean gee_tree_map_sub_node_iterator_real_first (GeeTreeMapSubNodeIterator* self);
static gboolean gee_tree_map_sub_node_iterator_previous (GeeTreeMapSubNodeIterator* self);
static gboolean gee_tree_map_sub_node_iterator_has_previous (GeeTreeMapSubNodeIterator* self);
static gboolean gee_tree_map_sub_node_iterator_real_last (GeeTreeMapSubNodeIterator* self);
static void gee_tree_map_sub_node_iterator_remove (GeeTreeMapSubNodeIterator* self);
static gboolean gee_tree_map_sub_node_iterator_get_valid (GeeTreeMapSubNodeIterator* self);
static void gee_tree_map_sub_node_iterator_unset (GeeTreeMapSubNodeIterator* self);
static GeeTreeMapNodeIterator* gee_tree_map_sub_node_iterator_real_iterator_pointing_at (GeeTreeMapSubNodeIterator* self,
                                                                                  GeeTreeMapNode* node);
static void gee_tree_map_sub_node_iterator_finalize (GObject * obj);
static GType gee_tree_map_sub_node_iterator_get_type_once (void);
static void _vala_gee_tree_map_sub_node_iterator_get_property (GObject * object,
                                                        guint property_id,
                                                        GValue * value,
                                                        GParamSpec * pspec);
static void _vala_gee_tree_map_sub_node_iterator_set_property (GObject * object,
                                                        guint property_id,
                                                        const GValue * value,
                                                        GParamSpec * pspec);
static GeeTreeMapKeyIterator* gee_tree_map_key_iterator_new_from_iterator (GType k_type,
                                                                    GBoxedCopyFunc k_dup_func,
                                                                    GDestroyNotify k_destroy_func,
                                                                    GType v_type,
                                                                    GBoxedCopyFunc v_dup_func,
                                                                    GDestroyNotify v_destroy_func,
                                                                    GeeTreeMapKeyIterator* iterator);
static GeeTreeMapKeyIterator* gee_tree_map_key_iterator_construct_from_iterator (GType object_type,
                                                                          GType k_type,
                                                                          GBoxedCopyFunc k_dup_func,
                                                                          GDestroyNotify k_destroy_func,
                                                                          GType v_type,
                                                                          GBoxedCopyFunc v_dup_func,
                                                                          GDestroyNotify v_destroy_func,
                                                                          GeeTreeMapKeyIterator* iterator);
static gpointer gee_tree_map_key_iterator_real_get (GeeIterator* base);
static gboolean gee_tree_map_key_iterator_real_foreach (GeeTraversable* base,
                                                 GeeForallFunc f,
                                                 gpointer f_target);
static GeeIterator** gee_tree_map_key_iterator_real_tee (GeeTraversable* base,
                                                  guint forks,
                                                  gint* result_length1);
static GType gee_tree_map_key_iterator_get_type_once (void);
static void _vala_gee_tree_map_key_iterator_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec);
static void _vala_gee_tree_map_key_iterator_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec);
static GeeTreeMapSubKeyIterator* gee_tree_map_sub_key_iterator_new_from_iterator (GType k_type,
                                                                           GBoxedCopyFunc k_dup_func,
                                                                           GDestroyNotify k_destroy_func,
                                                                           GType v_type,
                                                                           GBoxedCopyFunc v_dup_func,
                                                                           GDestroyNotify v_destroy_func,
                                                                           GeeTreeMapSubKeyIterator* iterator);
static GeeTreeMapSubKeyIterator* gee_tree_map_sub_key_iterator_construct_from_iterator (GType object_type,
                                                                                 GType k_type,
                                                                                 GBoxedCopyFunc k_dup_func,
                                                                                 GDestroyNotify k_destroy_func,
                                                                                 GType v_type,
                                                                                 GBoxedCopyFunc v_dup_func,
                                                                                 GDestroyNotify v_destroy_func,
                                                                                 GeeTreeMapSubKeyIterator* iterator);
static gpointer gee_tree_map_sub_key_iterator_real_get (GeeIterator* base);
static gboolean gee_tree_map_sub_key_iterator_real_foreach (GeeTraversable* base,
                                                     GeeForallFunc f,
                                                     gpointer f_target);
static GeeIterator** gee_tree_map_sub_key_iterator_real_tee (GeeTraversable* base,
                                                      guint forks,
                                                      gint* result_length1);
static GType gee_tree_map_sub_key_iterator_get_type_once (void);
static void _vala_gee_tree_map_sub_key_iterator_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_gee_tree_map_sub_key_iterator_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);
static GeeTreeMapValueIterator* gee_tree_map_value_iterator_new_pointing (GType k_type,
                                                                   GBoxedCopyFunc k_dup_func,
                                                                   GDestroyNotify k_destroy_func,
                                                                   GType v_type,
                                                                   GBoxedCopyFunc v_dup_func,
                                                                   GDestroyNotify v_destroy_func,
                                                                   GeeTreeMap* map,
                                                                   GeeTreeMapNode* current);
static GeeTreeMapValueIterator* gee_tree_map_value_iterator_construct_pointing (GType object_type,
                                                                         GType k_type,
                                                                         GBoxedCopyFunc k_dup_func,
                                                                         GDestroyNotify k_destroy_func,
                                                                         GType v_type,
                                                                         GBoxedCopyFunc v_dup_func,
                                                                         GDestroyNotify v_destroy_func,
                                                                         GeeTreeMap* map,
                                                                         GeeTreeMapNode* current);
static GeeTreeMapValueIterator* gee_tree_map_value_iterator_new_from_iterator (GType k_type,
                                                                        GBoxedCopyFunc k_dup_func,
                                                                        GDestroyNotify k_destroy_func,
                                                                        GType v_type,
                                                                        GBoxedCopyFunc v_dup_func,
                                                                        GDestroyNotify v_destroy_func,
                                                                        GeeTreeMapValueIterator* iterator);
static GeeTreeMapValueIterator* gee_tree_map_value_iterator_construct_from_iterator (GType object_type,
                                                                              GType k_type,
                                                                              GBoxedCopyFunc k_dup_func,
                                                                              GDestroyNotify k_destroy_func,
                                                                              GType v_type,
                                                                              GBoxedCopyFunc v_dup_func,
                                                                              GDestroyNotify v_destroy_func,
                                                                              GeeTreeMapValueIterator* iterator);
static gpointer gee_tree_map_value_iterator_real_get (GeeIterator* base);
static gboolean gee_tree_map_value_iterator_real_foreach (GeeTraversable* base,
                                                   GeeForallFunc f,
                                                   gpointer f_target);
static GeeIterator** gee_tree_map_value_iterator_real_tee (GeeTraversable* base,
                                                    guint forks,
                                                    gint* result_length1);
static GType gee_tree_map_value_iterator_get_type_once (void);
static void _vala_gee_tree_map_value_iterator_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec);
static void _vala_gee_tree_map_value_iterator_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec);
static GeeTreeMapSubValueIterator* gee_tree_map_sub_value_iterator_new_pointing (GType k_type,
                                                                          GBoxedCopyFunc k_dup_func,
                                                                          GDestroyNotify k_destroy_func,
                                                                          GType v_type,
                                                                          GBoxedCopyFunc v_dup_func,
                                                                          GDestroyNotify v_destroy_func,
                                                                          GeeTreeMap* map,
                                                                          GeeTreeMapRange* range,
                                                                          GeeTreeMapNode* node);
static GeeTreeMapSubValueIterator* gee_tree_map_sub_value_iterator_construct_pointing (GType object_type,
                                                                                GType k_type,
                                                                                GBoxedCopyFunc k_dup_func,
                                                                                GDestroyNotify k_destroy_func,
                                                                                GType v_type,
                                                                                GBoxedCopyFunc v_dup_func,
                                                                                GDestroyNotify v_destroy_func,
                                                                                GeeTreeMap* map,
                                                                                GeeTreeMapRange* range,
                                                                                GeeTreeMapNode* node);
static GeeTreeMapSubValueIterator* gee_tree_map_sub_value_iterator_new_from_iterator (GType k_type,
                                                                               GBoxedCopyFunc k_dup_func,
                                                                               GDestroyNotify k_destroy_func,
                                                                               GType v_type,
                                                                               GBoxedCopyFunc v_dup_func,
                                                                               GDestroyNotify v_destroy_func,
                                                                               GeeTreeMapSubValueIterator* iterator);
static GeeTreeMapSubValueIterator* gee_tree_map_sub_value_iterator_construct_from_iterator (GType object_type,
                                                                                     GType k_type,
                                                                                     GBoxedCopyFunc k_dup_func,
                                                                                     GDestroyNotify k_destroy_func,
                                                                                     GType v_type,
                                                                                     GBoxedCopyFunc v_dup_func,
                                                                                     GDestroyNotify v_destroy_func,
                                                                                     GeeTreeMapSubValueIterator* iterator);
static gpointer gee_tree_map_sub_value_iterator_real_get (GeeIterator* base);
static gboolean gee_tree_map_sub_value_iterator_real_foreach (GeeTraversable* base,
                                                       GeeForallFunc f,
                                                       gpointer f_target);
static GeeIterator** gee_tree_map_sub_value_iterator_real_tee (GeeTraversable* base,
                                                        guint forks,
                                                        gint* result_length1);
static GType gee_tree_map_sub_value_iterator_get_type_once (void);
static void _vala_gee_tree_map_sub_value_iterator_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec);
static void _vala_gee_tree_map_sub_value_iterator_set_property (GObject * object,
                                                         guint property_id,
                                                         const GValue * value,
                                                         GParamSpec * pspec);
static GeeTreeMapEntryIterator* gee_tree_map_entry_iterator_new_from_iterator (GType k_type,
                                                                        GBoxedCopyFunc k_dup_func,
                                                                        GDestroyNotify k_destroy_func,
                                                                        GType v_type,
                                                                        GBoxedCopyFunc v_dup_func,
                                                                        GDestroyNotify v_destroy_func,
                                                                        GeeTreeMapEntryIterator* iterator);
static GeeTreeMapEntryIterator* gee_tree_map_entry_iterator_construct_from_iterator (GType object_type,
                                                                              GType k_type,
                                                                              GBoxedCopyFunc k_dup_func,
                                                                              GDestroyNotify k_destroy_func,
                                                                              GType v_type,
                                                                              GBoxedCopyFunc v_dup_func,
                                                                              GDestroyNotify v_destroy_func,
                                                                              GeeTreeMapEntryIterator* iterator);
static GeeMapEntry* gee_tree_map_entry_iterator_real_get (GeeIterator* base);
static void gee_tree_map_entry_iterator_real_remove (GeeIterator* base);
static gboolean gee_tree_map_entry_iterator_real_foreach (GeeTraversable* base,
                                                   GeeForallFunc f,
                                                   gpointer f_target);
static GeeIterator** gee_tree_map_entry_iterator_real_tee (GeeTraversable* base,
                                                    guint forks,
                                                    gint* result_length1);
static GType gee_tree_map_entry_iterator_get_type_once (void);
static void _vala_gee_tree_map_entry_iterator_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec);
static void _vala_gee_tree_map_entry_iterator_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec);
static GeeTreeMapSubEntryIterator* gee_tree_map_sub_entry_iterator_new_from_iterator (GType k_type,
                                                                               GBoxedCopyFunc k_dup_func,
                                                                               GDestroyNotify k_destroy_func,
                                                                               GType v_type,
                                                                               GBoxedCopyFunc v_dup_func,
                                                                               GDestroyNotify v_destroy_func,
                                                                               GeeTreeMapSubEntryIterator* iterator);
static GeeTreeMapSubEntryIterator* gee_tree_map_sub_entry_iterator_construct_from_iterator (GType object_type,
                                                                                     GType k_type,
                                                                                     GBoxedCopyFunc k_dup_func,
                                                                                     GDestroyNotify k_destroy_func,
                                                                                     GType v_type,
                                                                                     GBoxedCopyFunc v_dup_func,
                                                                                     GDestroyNotify v_destroy_func,
                                                                                     GeeTreeMapSubEntryIterator* iterator);
static GeeMapEntry* gee_tree_map_sub_entry_iterator_real_get (GeeIterator* base);
static void gee_tree_map_sub_entry_iterator_real_remove (GeeIterator* base);
static gboolean gee_tree_map_sub_entry_iterator_real_foreach (GeeTraversable* base,
                                                       GeeForallFunc f,
                                                       gpointer f_target);
static GeeIterator** gee_tree_map_sub_entry_iterator_real_tee (GeeTraversable* base,
                                                        guint forks,
                                                        gint* result_length1);
static GType gee_tree_map_sub_entry_iterator_get_type_once (void);
static void _vala_gee_tree_map_sub_entry_iterator_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec);
static void _vala_gee_tree_map_sub_entry_iterator_set_property (GObject * object,
                                                         guint property_id,
                                                         const GValue * value,
                                                         GParamSpec * pspec);
static gpointer gee_tree_map_map_iterator_real_get_key (GeeMapIterator* base);
static gpointer gee_tree_map_map_iterator_real_get_value (GeeMapIterator* base);
static void gee_tree_map_map_iterator_real_set_value (GeeMapIterator* base,
                                               gconstpointer value);
static GType gee_tree_map_map_iterator_get_type_once (void);
static void _vala_gee_tree_map_map_iterator_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec);
static void _vala_gee_tree_map_map_iterator_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec);
static gpointer gee_tree_map_sub_map_iterator_real_get_key (GeeMapIterator* base);
static gpointer gee_tree_map_sub_map_iterator_real_get_value (GeeMapIterator* base);
static void gee_tree_map_sub_map_iterator_real_set_value (GeeMapIterator* base,
                                                   gconstpointer value);
static GType gee_tree_map_sub_map_iterator_get_type_once (void);
static void _vala_gee_tree_map_sub_map_iterator_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_gee_tree_map_sub_map_iterator_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);
static void gee_tree_map_finalize (GObject * obj);
static GType gee_tree_map_get_type_once (void);
static void _vala_gee_tree_map_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec);
static void _vala_gee_tree_map_set_property (GObject * object,
                                      guint property_id,
                                      const GValue * value,
                                      GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
gee_tree_map_get_instance_private (GeeTreeMap* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMap_private_offset);
}

static GType
gee_tree_map_range_type_get_type_once (void)
{
	static const GEnumValue values[] = {{GEE_TREE_MAP_RANGE_TYPE_HEAD, "GEE_TREE_MAP_RANGE_TYPE_HEAD", "head"}, {GEE_TREE_MAP_RANGE_TYPE_TAIL, "GEE_TREE_MAP_RANGE_TYPE_TAIL", "tail"}, {GEE_TREE_MAP_RANGE_TYPE_EMPTY, "GEE_TREE_MAP_RANGE_TYPE_EMPTY", "empty"}, {GEE_TREE_MAP_RANGE_TYPE_BOUNDED, "GEE_TREE_MAP_RANGE_TYPE_BOUNDED", "bounded"}, {0, NULL, NULL}};
	GType gee_tree_map_range_type_type_id;
	gee_tree_map_range_type_type_id = g_enum_register_static ("GeeTreeMapRangeType", values);
	return gee_tree_map_range_type_type_id;
}

static GType
gee_tree_map_range_type_get_type (void)
{
	static volatile gsize gee_tree_map_range_type_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_range_type_type_id__once)) {
		GType gee_tree_map_range_type_type_id;
		gee_tree_map_range_type_type_id = gee_tree_map_range_type_get_type_once ();
		g_once_init_leave (&gee_tree_map_range_type_type_id__once, gee_tree_map_range_type_type_id);
	}
	return gee_tree_map_range_type_type_id__once;
}

/**
 * Constructs a new, empty tree map sorted according to the specified
 * comparator function.
 *
 * If not provided, the functions parameters are requested to the
 * {@link Functions} function factory methods.
 *
 * @param key_compare_func an optional key comparator function
 * @param value_equal_func an optional values equality testing function
 */
GeeTreeMap*
gee_tree_map_construct (GType object_type,
                        GType k_type,
                        GBoxedCopyFunc k_dup_func,
                        GDestroyNotify k_destroy_func,
                        GType v_type,
                        GBoxedCopyFunc v_dup_func,
                        GDestroyNotify v_destroy_func,
                        GCompareDataFunc key_compare_func,
                        gpointer key_compare_func_target,
                        GDestroyNotify key_compare_func_target_destroy_notify,
                        GeeEqualDataFunc value_equal_func,
                        gpointer value_equal_func_target,
                        GDestroyNotify value_equal_func_target_destroy_notify)
{
	GeeTreeMap * self = NULL;
	GCompareDataFunc _tmp6_;
	gpointer _tmp6__target;
	GDestroyNotify _tmp6__target_destroy_notify;
	GeeFunctionsCompareDataFuncClosure* _tmp7_;
	GeeEqualDataFunc _tmp8_;
	gpointer _tmp8__target;
	GDestroyNotify _tmp8__target_destroy_notify;
	GeeFunctionsEqualDataFuncClosure* _tmp9_;
	self = (GeeTreeMap*) gee_abstract_bidir_sorted_map_construct (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	if (key_compare_func == NULL) {
		gpointer _tmp0_ = NULL;
		GDestroyNotify _tmp1_ = NULL;
		GCompareDataFunc _tmp2_;
		_tmp2_ = gee_functions_get_compare_func_for (k_type, &_tmp0_, &_tmp1_);
		(key_compare_func_target_destroy_notify == NULL) ? NULL : (key_compare_func_target_destroy_notify (key_compare_func_target), NULL);
		key_compare_func = NULL;
		key_compare_func_target = NULL;
		key_compare_func_target_destroy_notify = NULL;
		key_compare_func = _tmp2_;
		key_compare_func_target = _tmp0_;
		key_compare_func_target_destroy_notify = _tmp1_;
	}
	if (value_equal_func == NULL) {
		gpointer _tmp3_ = NULL;
		GDestroyNotify _tmp4_ = NULL;
		GeeEqualDataFunc _tmp5_;
		_tmp5_ = gee_functions_get_equal_func_for (v_type, &_tmp3_, &_tmp4_);
		(value_equal_func_target_destroy_notify == NULL) ? NULL : (value_equal_func_target_destroy_notify (value_equal_func_target), NULL);
		value_equal_func = NULL;
		value_equal_func_target = NULL;
		value_equal_func_target_destroy_notify = NULL;
		value_equal_func = _tmp5_;
		value_equal_func_target = _tmp3_;
		value_equal_func_target_destroy_notify = _tmp4_;
	}
	_tmp6_ = key_compare_func;
	_tmp6__target = key_compare_func_target;
	_tmp6__target_destroy_notify = key_compare_func_target_destroy_notify;
	key_compare_func = NULL;
	key_compare_func_target = NULL;
	key_compare_func_target_destroy_notify = NULL;
	_tmp7_ = gee_functions_compare_data_func_closure_new (k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, _tmp6_, _tmp6__target, _tmp6__target_destroy_notify);
	_gee_functions_compare_data_func_closure_unref0 (self->priv->_key_compare_func);
	self->priv->_key_compare_func = _tmp7_;
	_tmp8_ = value_equal_func;
	_tmp8__target = value_equal_func_target;
	_tmp8__target_destroy_notify = value_equal_func_target_destroy_notify;
	value_equal_func = NULL;
	value_equal_func_target = NULL;
	value_equal_func_target_destroy_notify = NULL;
	_tmp9_ = gee_functions_equal_data_func_closure_new (v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, _tmp8_, _tmp8__target, _tmp8__target_destroy_notify);
	_gee_functions_equal_data_func_closure_unref0 (self->priv->_value_equal_func);
	self->priv->_value_equal_func = _tmp9_;
	(key_compare_func_target_destroy_notify == NULL) ? NULL : (key_compare_func_target_destroy_notify (key_compare_func_target), NULL);
	key_compare_func = NULL;
	key_compare_func_target = NULL;
	key_compare_func_target_destroy_notify = NULL;
	(value_equal_func_target_destroy_notify == NULL) ? NULL : (value_equal_func_target_destroy_notify (value_equal_func_target), NULL);
	value_equal_func = NULL;
	value_equal_func_target = NULL;
	value_equal_func_target_destroy_notify = NULL;
	return self;
}

GeeTreeMap*
gee_tree_map_new (GType k_type,
                  GBoxedCopyFunc k_dup_func,
                  GDestroyNotify k_destroy_func,
                  GType v_type,
                  GBoxedCopyFunc v_dup_func,
                  GDestroyNotify v_destroy_func,
                  GCompareDataFunc key_compare_func,
                  gpointer key_compare_func_target,
                  GDestroyNotify key_compare_func_target_destroy_notify,
                  GeeEqualDataFunc value_equal_func,
                  gpointer value_equal_func_target,
                  GDestroyNotify value_equal_func_target_destroy_notify)
{
	return gee_tree_map_construct (GEE_TYPE_TREE_MAP, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, key_compare_func, key_compare_func_target, key_compare_func_target_destroy_notify, value_equal_func, value_equal_func_target, value_equal_func_target_destroy_notify);
}

static gpointer
_gee_functions_compare_data_func_closure_ref0 (gpointer self)
{
	return self ? gee_functions_compare_data_func_closure_ref (self) : NULL;
}

static gpointer
_gee_functions_equal_data_func_closure_ref0 (gpointer self)
{
	return self ? gee_functions_equal_data_func_closure_ref (self) : NULL;
}

 G_GNUC_INTERNAL GeeTreeMap*
gee_tree_map_construct_with_closures (GType object_type,
                                      GType k_type,
                                      GBoxedCopyFunc k_dup_func,
                                      GDestroyNotify k_destroy_func,
                                      GType v_type,
                                      GBoxedCopyFunc v_dup_func,
                                      GDestroyNotify v_destroy_func,
                                      GeeFunctionsCompareDataFuncClosure* key_compare_func,
                                      GeeFunctionsEqualDataFuncClosure* value_equal_func)
{
	GeeTreeMap * self = NULL;
	GeeFunctionsCompareDataFuncClosure* _tmp0_;
	GeeFunctionsEqualDataFuncClosure* _tmp1_;
	g_return_val_if_fail (key_compare_func != NULL, NULL);
	g_return_val_if_fail (value_equal_func != NULL, NULL);
	self = (GeeTreeMap*) gee_abstract_bidir_sorted_map_construct (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = _gee_functions_compare_data_func_closure_ref0 (key_compare_func);
	_gee_functions_compare_data_func_closure_unref0 (self->priv->_key_compare_func);
	self->priv->_key_compare_func = _tmp0_;
	_tmp1_ = _gee_functions_equal_data_func_closure_ref0 (value_equal_func);
	_gee_functions_equal_data_func_closure_unref0 (self->priv->_value_equal_func);
	self->priv->_value_equal_func = _tmp1_;
	_gee_functions_compare_data_func_closure_unref0 (key_compare_func);
	_gee_functions_equal_data_func_closure_unref0 (value_equal_func);
	return self;
}

 G_GNUC_INTERNAL GeeTreeMap*
gee_tree_map_new_with_closures (GType k_type,
                                GBoxedCopyFunc k_dup_func,
                                GDestroyNotify k_destroy_func,
                                GType v_type,
                                GBoxedCopyFunc v_dup_func,
                                GDestroyNotify v_destroy_func,
                                GeeFunctionsCompareDataFuncClosure* key_compare_func,
                                GeeFunctionsEqualDataFuncClosure* value_equal_func)
{
	return gee_tree_map_construct_with_closures (GEE_TYPE_TREE_MAP, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, key_compare_func, value_equal_func);
}

static void
gee_tree_map_rotate_right (GeeTreeMap* self,
                           GeeTreeMapNode** root)
{
	GeeTreeMapNode* pivot = NULL;
	GeeTreeMapNode* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeTreeMapNode* _tmp4_;
	GeeTreeMapNode* _tmp5_;
	GeeTreeMapNode* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (*root != NULL);
	_tmp0_ = (*root)->left;
	(*root)->left = NULL;
	pivot = _tmp0_;
	_tmp1_ = pivot;
	_tmp1_->color = (*root)->color;
	(*root)->color = GEE_TREE_MAP_NODE_COLOR_RED;
	_tmp2_ = pivot;
	_tmp3_ = _tmp2_->right;
	_tmp2_->right = NULL;
	_gee_tree_map_node_free0 ((*root)->left);
	(*root)->left = _tmp3_;
	_tmp4_ = pivot;
	_tmp5_ = *root;
	*root = NULL;
	_gee_tree_map_node_free0 (_tmp4_->right);
	_tmp4_->right = _tmp5_;
	_tmp6_ = pivot;
	pivot = NULL;
	_gee_tree_map_node_free0 (*root);
	*root = _tmp6_;
	_gee_tree_map_node_free0 (pivot);
}

static void
gee_tree_map_rotate_left (GeeTreeMap* self,
                          GeeTreeMapNode** root)
{
	GeeTreeMapNode* pivot = NULL;
	GeeTreeMapNode* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeTreeMapNode* _tmp4_;
	GeeTreeMapNode* _tmp5_;
	GeeTreeMapNode* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (*root != NULL);
	_tmp0_ = (*root)->right;
	(*root)->right = NULL;
	pivot = _tmp0_;
	_tmp1_ = pivot;
	_tmp1_->color = (*root)->color;
	(*root)->color = GEE_TREE_MAP_NODE_COLOR_RED;
	_tmp2_ = pivot;
	_tmp3_ = _tmp2_->left;
	_tmp2_->left = NULL;
	_gee_tree_map_node_free0 ((*root)->right);
	(*root)->right = _tmp3_;
	_tmp4_ = pivot;
	_tmp5_ = *root;
	*root = NULL;
	_gee_tree_map_node_free0 (_tmp4_->left);
	_tmp4_->left = _tmp5_;
	_tmp6_ = pivot;
	pivot = NULL;
	_gee_tree_map_node_free0 (*root);
	*root = _tmp6_;
	_gee_tree_map_node_free0 (pivot);
}

static gboolean
gee_tree_map_is_red (GeeTreeMap* self,
                     GeeTreeMapNode* n)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (n != NULL) {
		_tmp0_ = n->color == GEE_TREE_MAP_NODE_COLOR_RED;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gboolean
gee_tree_map_is_black (GeeTreeMap* self,
                       GeeTreeMapNode* n)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (n == NULL) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = n->color == GEE_TREE_MAP_NODE_COLOR_BLACK;
	}
	result = _tmp0_;
	return result;
}

/**
 * {@inheritDoc}
 */
static gboolean
gee_tree_map_real_has_key (GeeAbstractMap* base,
                           gconstpointer key)
{
	GeeTreeMap * self;
	GeeTreeMapNode* cur = NULL;
	GeeTreeMapNode* _tmp0_;
	gboolean result;
	self = (GeeTreeMap*) base;
	_tmp0_ = self->priv->root;
	cur = _tmp0_;
	while (TRUE) {
		GeeTreeMapNode* _tmp1_;
		gint res = 0;
		GCompareDataFunc _tmp2_ = NULL;
		gpointer _tmp2__target = NULL;
		GCompareDataFunc _tmp3_;
		gpointer _tmp3__target;
		GeeTreeMapNode* _tmp4_;
		gconstpointer _tmp5_;
		_tmp1_ = cur;
		if (!(_tmp1_ != NULL)) {
			break;
		}
		_tmp2_ = gee_tree_map_get_key_compare_func (self, &_tmp2__target);
		_tmp3_ = _tmp2_;
		_tmp3__target = _tmp2__target;
		_tmp4_ = cur;
		_tmp5_ = _tmp4_->key;
		res = _tmp3_ (key, _tmp5_, _tmp3__target);
		if (res == 0) {
			result = TRUE;
			return result;
		} else {
			if (res < 0) {
				GeeTreeMapNode* _tmp6_;
				GeeTreeMapNode* _tmp7_;
				_tmp6_ = cur;
				_tmp7_ = _tmp6_->left;
				cur = _tmp7_;
			} else {
				GeeTreeMapNode* _tmp8_;
				GeeTreeMapNode* _tmp9_;
				_tmp8_ = cur;
				_tmp9_ = _tmp8_->right;
				cur = _tmp9_;
			}
		}
	}
	result = FALSE;
	return result;
}

/**
 * {@inheritDoc}
 */
static gboolean
gee_tree_map_real_has (GeeAbstractMap* base,
                       gconstpointer key,
                       gconstpointer value)
{
	GeeTreeMap * self;
	gpointer own_value = NULL;
	gpointer _tmp0_;
	gboolean _tmp1_ = FALSE;
	gconstpointer _tmp2_;
	gboolean result;
	self = (GeeTreeMap*) base;
	_tmp0_ = gee_abstract_map_get ((GeeAbstractMap*) self, key);
	own_value = _tmp0_;
	_tmp2_ = own_value;
	if (_tmp2_ != NULL) {
		GeeEqualDataFunc _tmp3_ = NULL;
		gpointer _tmp3__target = NULL;
		GeeEqualDataFunc _tmp4_;
		gpointer _tmp4__target;
		gconstpointer _tmp5_;
		_tmp3_ = gee_tree_map_get_value_equal_func (self, &_tmp3__target);
		_tmp4_ = _tmp3_;
		_tmp4__target = _tmp3__target;
		_tmp5_ = own_value;
		_tmp1_ = _tmp4_ (_tmp5_, value, _tmp4__target);
	} else {
		_tmp1_ = FALSE;
	}
	result = _tmp1_;
	((own_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (own_value = (self->priv->v_destroy_func (own_value), NULL));
	return result;
}

/**
 * {@inheritDoc}
 */
static gpointer
gee_tree_map_real_get (GeeAbstractMap* base,
                       gconstpointer key)
{
	GeeTreeMap * self;
	GeeTreeMapNode* cur = NULL;
	GeeTreeMapNode* _tmp0_;
	gpointer result;
	self = (GeeTreeMap*) base;
	_tmp0_ = self->priv->root;
	cur = _tmp0_;
	while (TRUE) {
		GeeTreeMapNode* _tmp1_;
		gint res = 0;
		GCompareDataFunc _tmp2_ = NULL;
		gpointer _tmp2__target = NULL;
		GCompareDataFunc _tmp3_;
		gpointer _tmp3__target;
		GeeTreeMapNode* _tmp4_;
		gconstpointer _tmp5_;
		_tmp1_ = cur;
		if (!(_tmp1_ != NULL)) {
			break;
		}
		_tmp2_ = gee_tree_map_get_key_compare_func (self, &_tmp2__target);
		_tmp3_ = _tmp2_;
		_tmp3__target = _tmp2__target;
		_tmp4_ = cur;
		_tmp5_ = _tmp4_->key;
		res = _tmp3_ (key, _tmp5_, _tmp3__target);
		if (res == 0) {
			GeeTreeMapNode* _tmp6_;
			gconstpointer _tmp7_;
			gpointer _tmp8_;
			_tmp6_ = cur;
			_tmp7_ = _tmp6_->value;
			_tmp8_ = ((_tmp7_ != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) _tmp7_) : ((gpointer) _tmp7_);
			result = _tmp8_;
			return result;
		} else {
			if (res < 0) {
				GeeTreeMapNode* _tmp9_;
				GeeTreeMapNode* _tmp10_;
				_tmp9_ = cur;
				_tmp10_ = _tmp9_->left;
				cur = _tmp10_;
			} else {
				GeeTreeMapNode* _tmp11_;
				GeeTreeMapNode* _tmp12_;
				_tmp11_ = cur;
				_tmp12_ = _tmp11_->right;
				cur = _tmp12_;
			}
		}
	}
	result = NULL;
	return result;
}

static gboolean
gee_tree_map_set_to_node (GeeTreeMap* self,
                          GeeTreeMapNode** node,
                          gconstpointer key,
                          gconstpointer value,
                          gpointer* old_value,
                          GeeTreeMapNode* prev,
                          GeeTreeMapNode* next)
{
	gpointer _vala_old_value = NULL;
	gint cmp = 0;
	GCompareDataFunc _tmp4_ = NULL;
	gpointer _tmp4__target = NULL;
	GCompareDataFunc _tmp5_;
	gpointer _tmp5__target;
	gconstpointer _tmp6_;
	gboolean changed = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if ((*node) == NULL) {
		gpointer _tmp0_;
		gpointer _tmp1_;
		GeeTreeMapNode* _tmp2_;
		gint _tmp3_;
		((_vala_old_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_old_value = (self->priv->v_destroy_func (_vala_old_value), NULL));
		_vala_old_value = NULL;
		_tmp0_ = ((key != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) key) : ((gpointer) key);
		_tmp1_ = ((value != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) value) : ((gpointer) value);
		_tmp2_ = gee_tree_map_node_new (_tmp0_, _tmp1_, prev, next);
		_gee_tree_map_node_free0 (*node);
		*node = _tmp2_;
		if (prev == NULL) {
			self->priv->first = *node;
		}
		if (next == NULL) {
			self->priv->last = *node;
		}
		_tmp3_ = self->priv->_size;
		self->priv->_size = _tmp3_ + 1;
		result = TRUE;
		if (old_value) {
			*old_value = _vala_old_value;
		} else {
			((_vala_old_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_old_value = (self->priv->v_destroy_func (_vala_old_value), NULL));
		}
		return result;
	}
	_tmp4_ = gee_tree_map_get_key_compare_func (self, &_tmp4__target);
	_tmp5_ = _tmp4_;
	_tmp5__target = _tmp4__target;
	_tmp6_ = (*node)->key;
	cmp = _tmp5_ (key, _tmp6_, _tmp5__target);
	if (cmp == 0) {
		GeeEqualDataFunc _tmp7_ = NULL;
		gpointer _tmp7__target = NULL;
		GeeEqualDataFunc _tmp8_;
		gpointer _tmp8__target;
		gconstpointer _tmp9_;
		_tmp7_ = gee_tree_map_get_value_equal_func (self, &_tmp7__target);
		_tmp8_ = _tmp7_;
		_tmp8__target = _tmp7__target;
		_tmp9_ = (*node)->value;
		if (_tmp8_ (value, _tmp9_, _tmp8__target)) {
			((_vala_old_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_old_value = (self->priv->v_destroy_func (_vala_old_value), NULL));
			_vala_old_value = NULL;
			changed = FALSE;
		} else {
			gpointer _tmp10_;
			gpointer _tmp11_;
			_tmp10_ = (*node)->value;
			(*node)->value = NULL;
			((_vala_old_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_old_value = (self->priv->v_destroy_func (_vala_old_value), NULL));
			_vala_old_value = _tmp10_;
			_tmp11_ = ((value != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) value) : ((gpointer) value);
			(((*node)->value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : ((*node)->value = (self->priv->v_destroy_func ((*node)->value), NULL));
			(*node)->value = _tmp11_;
			changed = TRUE;
		}
	} else {
		if (cmp < 0) {
			GeeTreeMapNode* _tmp12_;
			gpointer _tmp13_ = NULL;
			gboolean _tmp14_;
			_tmp12_ = (*node)->prev;
			_tmp14_ = gee_tree_map_set_to_node (self, &(*node)->left, key, value, &_tmp13_, _tmp12_, *node);
			((_vala_old_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_old_value = (self->priv->v_destroy_func (_vala_old_value), NULL));
			_vala_old_value = _tmp13_;
			changed = _tmp14_;
		} else {
			GeeTreeMapNode* _tmp15_;
			gpointer _tmp16_ = NULL;
			gboolean _tmp17_;
			_tmp15_ = (*node)->next;
			_tmp17_ = gee_tree_map_set_to_node (self, &(*node)->right, key, value, &_tmp16_, *node, _tmp15_);
			((_vala_old_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_old_value = (self->priv->v_destroy_func (_vala_old_value), NULL));
			_vala_old_value = _tmp16_;
			changed = _tmp17_;
		}
	}
	gee_tree_map_fix_up (self, node);
	result = changed;
	if (old_value) {
		*old_value = _vala_old_value;
	} else {
		((_vala_old_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_old_value = (self->priv->v_destroy_func (_vala_old_value), NULL));
	}
	return result;
}

/**
 * {@inheritDoc}
 */
static void
gee_tree_map_real_set (GeeAbstractMap* base,
                       gconstpointer key,
                       gconstpointer value)
{
	GeeTreeMap * self;
	gpointer old_value = NULL;
	gpointer _tmp0_ = NULL;
	GeeTreeMapNode* _tmp1_;
	gint _tmp2_;
	self = (GeeTreeMap*) base;
	gee_tree_map_set_to_node (self, &self->priv->root, key, value, &_tmp0_, NULL, NULL);
	((old_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (old_value = (self->priv->v_destroy_func (old_value), NULL));
	old_value = _tmp0_;
	_tmp1_ = self->priv->root;
	_tmp1_->color = GEE_TREE_MAP_NODE_COLOR_BLACK;
	_tmp2_ = self->priv->stamp;
	self->priv->stamp = _tmp2_ + 1;
	((old_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (old_value = (self->priv->v_destroy_func (old_value), NULL));
}

static void
gee_tree_map_move_red_left (GeeTreeMap* self,
                            GeeTreeMapNode** root)
{
	GeeTreeMapNode* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (*root != NULL);
	gee_tree_map_node_flip (*root);
	_tmp0_ = (*root)->right;
	_tmp1_ = _tmp0_->left;
	if (gee_tree_map_is_red (self, _tmp1_)) {
		gee_tree_map_rotate_right (self, &(*root)->right);
		gee_tree_map_rotate_left (self, root);
		gee_tree_map_node_flip (*root);
	}
}

static void
gee_tree_map_move_red_right (GeeTreeMap* self,
                             GeeTreeMapNode** root)
{
	GeeTreeMapNode* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (*root != NULL);
	gee_tree_map_node_flip (*root);
	_tmp0_ = (*root)->left;
	_tmp1_ = _tmp0_->left;
	if (gee_tree_map_is_red (self, _tmp1_)) {
		gee_tree_map_rotate_right (self, root);
		gee_tree_map_node_flip (*root);
	}
}

static void
gee_tree_map_fix_removal (GeeTreeMap* self,
                          GeeTreeMapNode** node,
                          gpointer* key,
                          gpointer* value)
{
	gpointer _vala_key = NULL;
	gpointer _vala_value = NULL;
	GeeTreeMapNode* n = NULL;
	GeeTreeMapNode* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	gpointer _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gpointer _tmp4_;
	GeeTreeMapNode* _tmp5_;
	GeeTreeMapNode* _tmp6_;
	GeeTreeMapNode* _tmp13_;
	GeeTreeMapNode* _tmp14_;
	GeeTreeMapNode* _tmp21_;
	gint _tmp22_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (*node != NULL);
	_tmp0_ = *node;
	*node = NULL;
	n = _tmp0_;
	_tmp1_ = n;
	_tmp2_ = _tmp1_->key;
	_tmp1_->key = NULL;
	((_vala_key == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_vala_key = (self->priv->k_destroy_func (_vala_key), NULL));
	_vala_key = _tmp2_;
	_tmp3_ = n;
	_tmp4_ = _tmp3_->value;
	_tmp3_->value = NULL;
	((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
	_vala_value = _tmp4_;
	_tmp5_ = n;
	_tmp6_ = _tmp5_->prev;
	if (_tmp6_ != NULL) {
		GeeTreeMapNode* _tmp7_;
		GeeTreeMapNode* _tmp8_;
		GeeTreeMapNode* _tmp9_;
		GeeTreeMapNode* _tmp10_;
		_tmp7_ = n;
		_tmp8_ = _tmp7_->prev;
		_tmp9_ = n;
		_tmp10_ = _tmp9_->next;
		_tmp8_->next = _tmp10_;
	} else {
		GeeTreeMapNode* _tmp11_;
		GeeTreeMapNode* _tmp12_;
		_tmp11_ = n;
		_tmp12_ = _tmp11_->next;
		self->priv->first = _tmp12_;
	}
	_tmp13_ = n;
	_tmp14_ = _tmp13_->next;
	if (_tmp14_ != NULL) {
		GeeTreeMapNode* _tmp15_;
		GeeTreeMapNode* _tmp16_;
		GeeTreeMapNode* _tmp17_;
		GeeTreeMapNode* _tmp18_;
		_tmp15_ = n;
		_tmp16_ = _tmp15_->next;
		_tmp17_ = n;
		_tmp18_ = _tmp17_->prev;
		_tmp16_->prev = _tmp18_;
	} else {
		GeeTreeMapNode* _tmp19_;
		GeeTreeMapNode* _tmp20_;
		_tmp19_ = n;
		_tmp20_ = _tmp19_->next;
		self->priv->last = _tmp20_;
	}
	_tmp21_ = n;
	((_tmp21_->value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_tmp21_->value = (self->priv->v_destroy_func (_tmp21_->value), NULL));
	_tmp21_->value = NULL;
	_gee_tree_map_node_free0 (*node);
	*node = NULL;
	_tmp22_ = self->priv->_size;
	self->priv->_size = _tmp22_ - 1;
	_gee_tree_map_node_free0 (n);
	if (key) {
		*key = _vala_key;
	} else {
		((_vala_key == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_vala_key = (self->priv->k_destroy_func (_vala_key), NULL));
	}
	if (value) {
		*value = _vala_value;
	} else {
		((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
	}
}

static void
gee_tree_map_remove_minimal (GeeTreeMap* self,
                             GeeTreeMapNode** node,
                             gpointer* key,
                             gpointer* value)
{
	gpointer _vala_key = NULL;
	gpointer _vala_value = NULL;
	GeeTreeMapNode* _tmp0_;
	gboolean _tmp3_ = FALSE;
	GeeTreeMapNode* _tmp4_;
	gpointer _tmp7_ = NULL;
	gpointer _tmp8_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (*node != NULL);
	_tmp0_ = (*node)->left;
	if (_tmp0_ == NULL) {
		gpointer _tmp1_ = NULL;
		gpointer _tmp2_ = NULL;
		gee_tree_map_fix_removal (self, node, &_tmp1_, &_tmp2_);
		((_vala_key == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_vala_key = (self->priv->k_destroy_func (_vala_key), NULL));
		_vala_key = _tmp1_;
		((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
		_vala_value = _tmp2_;
		if (key) {
			*key = _vala_key;
		} else {
			((_vala_key == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_vala_key = (self->priv->k_destroy_func (_vala_key), NULL));
		}
		if (value) {
			*value = _vala_value;
		} else {
			((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
		}
		return;
	}
	_tmp4_ = (*node)->left;
	if (gee_tree_map_is_black (self, _tmp4_)) {
		GeeTreeMapNode* _tmp5_;
		GeeTreeMapNode* _tmp6_;
		_tmp5_ = (*node)->left;
		_tmp6_ = _tmp5_->left;
		_tmp3_ = gee_tree_map_is_black (self, _tmp6_);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		gee_tree_map_move_red_left (self, node);
	}
	gee_tree_map_remove_minimal (self, &(*node)->left, &_tmp7_, &_tmp8_);
	((_vala_key == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_vala_key = (self->priv->k_destroy_func (_vala_key), NULL));
	_vala_key = _tmp7_;
	((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
	_vala_value = _tmp8_;
	gee_tree_map_fix_up (self, node);
	if (key) {
		*key = _vala_key;
	} else {
		((_vala_key == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_vala_key = (self->priv->k_destroy_func (_vala_key), NULL));
	}
	if (value) {
		*value = _vala_value;
	} else {
		((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
	}
}

static gboolean
gee_tree_map_remove_from_node (GeeTreeMap* self,
                               GeeTreeMapNode** node,
                               gconstpointer key,
                               gpointer* value,
                               GeeTreeMapNode** prev,
                               GeeTreeMapNode** next)
{
	gpointer _vala_value = NULL;
	GeeTreeMapNode* _vala_prev = NULL;
	GeeTreeMapNode* _vala_next = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if ((*node) == NULL) {
		((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
		_vala_value = NULL;
		_vala_next = NULL;
		_vala_prev = NULL;
		result = FALSE;
		if (value) {
			*value = _vala_value;
		} else {
			((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
		}
		if (prev) {
			*prev = _vala_prev;
		}
		if (next) {
			*next = _vala_next;
		}
		return result;
	} else {
		GCompareDataFunc _tmp0_ = NULL;
		gpointer _tmp0__target = NULL;
		GCompareDataFunc _tmp1_;
		gpointer _tmp1__target;
		gconstpointer _tmp2_;
		_tmp0_ = gee_tree_map_get_key_compare_func (self, &_tmp0__target);
		_tmp1_ = _tmp0_;
		_tmp1__target = _tmp0__target;
		_tmp2_ = (*node)->key;
		if (_tmp1_ (key, _tmp2_, _tmp1__target) < 0) {
			GeeTreeMapNode* left = NULL;
			GeeTreeMapNode* _tmp3_;
			GeeTreeMapNode* _tmp4_;
			gboolean _tmp5_ = FALSE;
			gboolean _tmp6_ = FALSE;
			GeeTreeMapNode* _tmp7_;
			gboolean r = FALSE;
			gpointer _tmp11_ = NULL;
			GeeTreeMapNode* _tmp12_ = NULL;
			GeeTreeMapNode* _tmp13_ = NULL;
			gboolean _tmp14_;
			_tmp3_ = (*node)->left;
			left = _tmp3_;
			_tmp4_ = left;
			if (_tmp4_ == NULL) {
				((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
				_vala_value = NULL;
				_vala_next = NULL;
				_vala_prev = NULL;
				result = FALSE;
				if (value) {
					*value = _vala_value;
				} else {
					((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
				}
				if (prev) {
					*prev = _vala_prev;
				}
				if (next) {
					*next = _vala_next;
				}
				return result;
			}
			_tmp7_ = (*node)->left;
			if (_tmp7_ != NULL) {
				GeeTreeMapNode* _tmp8_;
				_tmp8_ = left;
				_tmp6_ = gee_tree_map_is_black (self, _tmp8_);
			} else {
				_tmp6_ = FALSE;
			}
			if (_tmp6_) {
				GeeTreeMapNode* _tmp9_;
				GeeTreeMapNode* _tmp10_;
				_tmp9_ = left;
				_tmp10_ = _tmp9_->left;
				_tmp5_ = gee_tree_map_is_black (self, _tmp10_);
			} else {
				_tmp5_ = FALSE;
			}
			if (_tmp5_) {
				gee_tree_map_move_red_left (self, node);
			}
			_tmp14_ = gee_tree_map_remove_from_node (self, &(*node)->left, key, &_tmp11_, &_tmp12_, &_tmp13_);
			((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
			_vala_value = _tmp11_;
			_vala_prev = _tmp12_;
			_vala_next = _tmp13_;
			r = _tmp14_;
			gee_tree_map_fix_up (self, node);
			result = r;
			if (value) {
				*value = _vala_value;
			} else {
				((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
			}
			if (prev) {
				*prev = _vala_prev;
			}
			if (next) {
				*next = _vala_next;
			}
			return result;
		} else {
			GeeTreeMapNode* _tmp15_;
			GeeTreeMapNode* r = NULL;
			GeeTreeMapNode* _tmp16_;
			gboolean _tmp17_ = FALSE;
			GCompareDataFunc _tmp18_ = NULL;
			gpointer _tmp18__target = NULL;
			GCompareDataFunc _tmp19_;
			gpointer _tmp19__target;
			gconstpointer _tmp20_;
			gboolean _tmp25_ = FALSE;
			gboolean _tmp26_ = FALSE;
			GeeTreeMapNode* _tmp27_;
			GCompareDataFunc _tmp31_ = NULL;
			gpointer _tmp31__target = NULL;
			GCompareDataFunc _tmp32_;
			gpointer _tmp32__target;
			gconstpointer _tmp33_;
			_tmp15_ = (*node)->left;
			if (gee_tree_map_is_red (self, _tmp15_)) {
				gee_tree_map_rotate_right (self, node);
			}
			_tmp16_ = (*node)->right;
			r = _tmp16_;
			_tmp18_ = gee_tree_map_get_key_compare_func (self, &_tmp18__target);
			_tmp19_ = _tmp18_;
			_tmp19__target = _tmp18__target;
			_tmp20_ = (*node)->key;
			if (_tmp19_ (key, _tmp20_, _tmp19__target) == 0) {
				GeeTreeMapNode* _tmp21_;
				_tmp21_ = r;
				_tmp17_ = _tmp21_ == NULL;
			} else {
				_tmp17_ = FALSE;
			}
			if (_tmp17_) {
				GeeTreeMapNode* _tmp22_;
				GeeTreeMapNode* _tmp23_;
				gpointer _tmp24_ = NULL;
				_tmp22_ = (*node)->prev;
				_vala_prev = _tmp22_;
				_tmp23_ = (*node)->next;
				_vala_next = _tmp23_;
				gee_tree_map_fix_removal (self, node, NULL, &_tmp24_);
				((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
				_vala_value = _tmp24_;
				result = TRUE;
				if (value) {
					*value = _vala_value;
				} else {
					((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
				}
				if (prev) {
					*prev = _vala_prev;
				}
				if (next) {
					*next = _vala_next;
				}
				return result;
			}
			_tmp27_ = r;
			if (gee_tree_map_is_black (self, _tmp27_)) {
				GeeTreeMapNode* _tmp28_;
				_tmp28_ = r;
				_tmp26_ = _tmp28_ != NULL;
			} else {
				_tmp26_ = FALSE;
			}
			if (_tmp26_) {
				GeeTreeMapNode* _tmp29_;
				GeeTreeMapNode* _tmp30_;
				_tmp29_ = r;
				_tmp30_ = _tmp29_->left;
				_tmp25_ = gee_tree_map_is_black (self, _tmp30_);
			} else {
				_tmp25_ = FALSE;
			}
			if (_tmp25_) {
				gee_tree_map_move_red_right (self, node);
			}
			_tmp31_ = gee_tree_map_get_key_compare_func (self, &_tmp31__target);
			_tmp32_ = _tmp31_;
			_tmp32__target = _tmp31__target;
			_tmp33_ = (*node)->key;
			if (_tmp32_ (key, _tmp33_, _tmp32__target) == 0) {
				gpointer _tmp34_;
				GeeTreeMapNode* _tmp35_;
				gpointer _tmp36_ = NULL;
				gpointer _tmp37_ = NULL;
				_tmp34_ = (*node)->value;
				(*node)->value = NULL;
				((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
				_vala_value = _tmp34_;
				_tmp35_ = (*node)->prev;
				_vala_prev = _tmp35_;
				_vala_next = *node;
				gee_tree_map_remove_minimal (self, &(*node)->right, &_tmp36_, &_tmp37_);
				(((*node)->key == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : ((*node)->key = (self->priv->k_destroy_func ((*node)->key), NULL));
				(*node)->key = _tmp36_;
				(((*node)->value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : ((*node)->value = (self->priv->v_destroy_func ((*node)->value), NULL));
				(*node)->value = _tmp37_;
				gee_tree_map_fix_up (self, node);
				result = TRUE;
				if (value) {
					*value = _vala_value;
				} else {
					((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
				}
				if (prev) {
					*prev = _vala_prev;
				}
				if (next) {
					*next = _vala_next;
				}
				return result;
			} else {
				gboolean re = FALSE;
				gpointer _tmp38_ = NULL;
				GeeTreeMapNode* _tmp39_ = NULL;
				GeeTreeMapNode* _tmp40_ = NULL;
				gboolean _tmp41_;
				_tmp41_ = gee_tree_map_remove_from_node (self, &(*node)->right, key, &_tmp38_, &_tmp39_, &_tmp40_);
				((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
				_vala_value = _tmp38_;
				_vala_prev = _tmp39_;
				_vala_next = _tmp40_;
				re = _tmp41_;
				gee_tree_map_fix_up (self, node);
				result = re;
				if (value) {
					*value = _vala_value;
				} else {
					((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
				}
				if (prev) {
					*prev = _vala_prev;
				}
				if (next) {
					*next = _vala_next;
				}
				return result;
			}
		}
	}
}

static void
gee_tree_map_fix_up (GeeTreeMap* self,
                     GeeTreeMapNode** node)
{
	gboolean _tmp0_ = FALSE;
	GeeTreeMapNode* _tmp1_;
	gboolean _tmp3_ = FALSE;
	GeeTreeMapNode* _tmp4_;
	gboolean _tmp7_ = FALSE;
	GeeTreeMapNode* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (*node != NULL);
	_tmp1_ = (*node)->left;
	if (gee_tree_map_is_black (self, _tmp1_)) {
		GeeTreeMapNode* _tmp2_;
		_tmp2_ = (*node)->right;
		_tmp0_ = gee_tree_map_is_red (self, _tmp2_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gee_tree_map_rotate_left (self, node);
	}
	_tmp4_ = (*node)->left;
	if (gee_tree_map_is_red (self, _tmp4_)) {
		GeeTreeMapNode* _tmp5_;
		GeeTreeMapNode* _tmp6_;
		_tmp5_ = (*node)->left;
		_tmp6_ = _tmp5_->left;
		_tmp3_ = gee_tree_map_is_red (self, _tmp6_);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		gee_tree_map_rotate_right (self, node);
	}
	_tmp8_ = (*node)->left;
	if (gee_tree_map_is_red (self, _tmp8_)) {
		GeeTreeMapNode* _tmp9_;
		_tmp9_ = (*node)->right;
		_tmp7_ = gee_tree_map_is_red (self, _tmp9_);
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		gee_tree_map_node_flip (*node);
	}
}

/**
 * {@inheritDoc}
 */
static gboolean
gee_tree_map_real_unset (GeeAbstractMap* base,
                         gconstpointer key,
                         gpointer* value)
{
	GeeTreeMap * self;
	gpointer _vala_value = NULL;
	gboolean b = FALSE;
	gpointer _tmp0_ = NULL;
	gboolean _tmp1_;
	GeeTreeMapNode* _tmp2_;
	gint _tmp4_;
	gboolean result;
	self = (GeeTreeMap*) base;
	_tmp1_ = gee_tree_map_remove_from_node (self, &self->priv->root, key, &_tmp0_, NULL, NULL);
	((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
	_vala_value = _tmp0_;
	b = _tmp1_;
	_tmp2_ = self->priv->root;
	if (_tmp2_ != NULL) {
		GeeTreeMapNode* _tmp3_;
		_tmp3_ = self->priv->root;
		_tmp3_->color = GEE_TREE_MAP_NODE_COLOR_BLACK;
	}
	_tmp4_ = self->priv->stamp;
	self->priv->stamp = _tmp4_ + 1;
	result = b;
	if (value) {
		*value = _vala_value;
	} else {
		((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
	}
	return result;
}

static inline void
gee_tree_map_clear_subtree (GeeTreeMap* self,
                            GeeTreeMapNode* node)
{
	GeeTreeMapNode* _tmp0_;
	GeeTreeMapNode* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	((node->key == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (node->key = (self->priv->k_destroy_func (node->key), NULL));
	node->key = NULL;
	((node->value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (node->value = (self->priv->v_destroy_func (node->value), NULL));
	node->value = NULL;
	_tmp0_ = node->left;
	if (_tmp0_ != NULL) {
		GeeTreeMapNode* _tmp1_;
		_tmp1_ = node->left;
		node->left = NULL;
		gee_tree_map_clear_subtree (self, _tmp1_);
	}
	_tmp2_ = node->right;
	if (_tmp2_ != NULL) {
		GeeTreeMapNode* _tmp3_;
		_tmp3_ = node->right;
		node->right = NULL;
		gee_tree_map_clear_subtree (self, _tmp3_);
	}
	_gee_tree_map_node_free0 (node);
}

/**
 * {@inheritDoc}
 */
static void
gee_tree_map_real_clear (GeeAbstractMap* base)
{
	GeeTreeMap * self;
	GeeTreeMapNode* _tmp0_;
	gint _tmp3_;
	self = (GeeTreeMap*) base;
	_tmp0_ = self->priv->root;
	if (_tmp0_ != NULL) {
		GeeTreeMapNode* _tmp1_;
		GeeTreeMapNode* _tmp2_;
		_tmp1_ = self->priv->root;
		self->priv->root = NULL;
		gee_tree_map_clear_subtree (self, _tmp1_);
		self->priv->last = NULL;
		_tmp2_ = self->priv->last;
		self->priv->first = _tmp2_;
	}
	self->priv->_size = 0;
	_tmp3_ = self->priv->stamp;
	self->priv->stamp = _tmp3_ + 1;
}

/**
 * {@inheritDoc}
 */
static GeeSortedMap*
gee_tree_map_real_head_map (GeeAbstractSortedMap* base,
                            gconstpointer before)
{
	GeeTreeMap * self;
	GeeTreeMapRange* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapSubMap* _tmp2_;
	GeeSortedMap* _tmp3_;
	GeeSortedMap* result;
	self = (GeeTreeMap*) base;
	_tmp0_ = gee_tree_map_range_new_head (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self, before);
	_tmp1_ = _tmp0_;
	_tmp2_ = gee_tree_map_sub_map_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self, _tmp1_);
	_tmp3_ = (GeeSortedMap*) _tmp2_;
	_gee_tree_map_range_unref0 (_tmp1_);
	result = _tmp3_;
	return result;
}

/**
 * {@inheritDoc}
 */
static GeeSortedMap*
gee_tree_map_real_tail_map (GeeAbstractSortedMap* base,
                            gconstpointer after)
{
	GeeTreeMap * self;
	GeeTreeMapRange* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapSubMap* _tmp2_;
	GeeSortedMap* _tmp3_;
	GeeSortedMap* result;
	self = (GeeTreeMap*) base;
	_tmp0_ = gee_tree_map_range_new_tail (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self, after);
	_tmp1_ = _tmp0_;
	_tmp2_ = gee_tree_map_sub_map_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self, _tmp1_);
	_tmp3_ = (GeeSortedMap*) _tmp2_;
	_gee_tree_map_range_unref0 (_tmp1_);
	result = _tmp3_;
	return result;
}

/**
 * {@inheritDoc}
 */
static GeeSortedMap*
gee_tree_map_real_sub_map (GeeAbstractSortedMap* base,
                           gconstpointer after,
                           gconstpointer before)
{
	GeeTreeMap * self;
	GeeTreeMapRange* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapSubMap* _tmp2_;
	GeeSortedMap* _tmp3_;
	GeeSortedMap* result;
	self = (GeeTreeMap*) base;
	_tmp0_ = gee_tree_map_range_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self, after, before);
	_tmp1_ = _tmp0_;
	_tmp2_ = gee_tree_map_sub_map_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self, _tmp1_);
	_tmp3_ = (GeeSortedMap*) _tmp2_;
	_gee_tree_map_range_unref0 (_tmp1_);
	result = _tmp3_;
	return result;
}

/**
 * {@inheritDoc}
 */
static GeeMapIterator*
gee_tree_map_real_map_iterator (GeeAbstractMap* base)
{
	GeeTreeMap * self;
	GeeTreeMapMapIterator* _tmp0_;
	GeeMapIterator* result;
	self = (GeeTreeMap*) base;
	_tmp0_ = gee_tree_map_map_iterator_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self);
	result = (GeeMapIterator*) _tmp0_;
	return result;
}

/**
 * {@inheritDoc}
 */
static GeeBidirMapIterator*
gee_tree_map_real_bidir_map_iterator (GeeAbstractBidirSortedMap* base)
{
	GeeTreeMap * self;
	GeeTreeMapMapIterator* _tmp0_;
	GeeBidirMapIterator* result;
	self = (GeeTreeMap*) base;
	_tmp0_ = gee_tree_map_map_iterator_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self);
	result = (GeeBidirMapIterator*) _tmp0_;
	return result;
}

 G_GNUC_INTERNAL GeeFunctionsCompareDataFuncClosure*
gee_tree_map_get_key_compare_func_closure (GeeTreeMap* self)
{
	GeeFunctionsCompareDataFuncClosure* _tmp0_;
	GeeFunctionsCompareDataFuncClosure* _tmp1_;
	GeeFunctionsCompareDataFuncClosure* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_key_compare_func;
	_tmp1_ = _gee_functions_compare_data_func_closure_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static inline gpointer
gee_tree_map_min (GeeTreeMap* self,
                  gconstpointer a,
                  gconstpointer b)
{
	gconstpointer _tmp0_ = NULL;
	GCompareDataFunc _tmp1_ = NULL;
	gpointer _tmp1__target = NULL;
	GCompareDataFunc _tmp2_;
	gpointer _tmp2__target;
	gpointer _tmp3_;
	gpointer result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = gee_tree_map_get_key_compare_func (self, &_tmp1__target);
	_tmp2_ = _tmp1_;
	_tmp2__target = _tmp1__target;
	if (_tmp2_ (a, b, _tmp2__target) <= 0) {
		_tmp0_ = a;
	} else {
		_tmp0_ = b;
	}
	_tmp3_ = ((_tmp0_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp0_) : ((gpointer) _tmp0_);
	result = _tmp3_;
	return result;
}

static inline gpointer
gee_tree_map_max (GeeTreeMap* self,
                  gconstpointer a,
                  gconstpointer b)
{
	gconstpointer _tmp0_ = NULL;
	GCompareDataFunc _tmp1_ = NULL;
	gpointer _tmp1__target = NULL;
	GCompareDataFunc _tmp2_;
	gpointer _tmp2__target;
	gpointer _tmp3_;
	gpointer result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = gee_tree_map_get_key_compare_func (self, &_tmp1__target);
	_tmp2_ = _tmp1_;
	_tmp2__target = _tmp1__target;
	if (_tmp2_ (a, b, _tmp2__target) > 0) {
		_tmp0_ = a;
	} else {
		_tmp0_ = b;
	}
	_tmp3_ = ((_tmp0_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp0_) : ((gpointer) _tmp0_);
	result = _tmp3_;
	return result;
}

static inline GeeTreeMapNode*
gee_tree_map_find_node (GeeTreeMap* self,
                        gconstpointer key)
{
	GeeTreeMapNode* cur = NULL;
	GeeTreeMapNode* _tmp0_;
	GeeTreeMapNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->root;
	cur = _tmp0_;
	while (TRUE) {
		GeeTreeMapNode* _tmp1_;
		gint res = 0;
		GCompareDataFunc _tmp2_ = NULL;
		gpointer _tmp2__target = NULL;
		GCompareDataFunc _tmp3_;
		gpointer _tmp3__target;
		GeeTreeMapNode* _tmp4_;
		gconstpointer _tmp5_;
		_tmp1_ = cur;
		if (!(_tmp1_ != NULL)) {
			break;
		}
		_tmp2_ = gee_tree_map_get_key_compare_func (self, &_tmp2__target);
		_tmp3_ = _tmp2_;
		_tmp3__target = _tmp2__target;
		_tmp4_ = cur;
		_tmp5_ = _tmp4_->key;
		res = _tmp3_ (key, _tmp5_, _tmp3__target);
		if (res == 0) {
			GeeTreeMapNode* _tmp6_;
			_tmp6_ = cur;
			result = _tmp6_;
			return result;
		} else {
			if (res < 0) {
				GeeTreeMapNode* _tmp7_;
				GeeTreeMapNode* _tmp8_;
				_tmp7_ = cur;
				_tmp8_ = _tmp7_->left;
				cur = _tmp8_;
			} else {
				GeeTreeMapNode* _tmp9_;
				GeeTreeMapNode* _tmp10_;
				_tmp9_ = cur;
				_tmp10_ = _tmp9_->right;
				cur = _tmp10_;
			}
		}
	}
	result = NULL;
	return result;
}

static inline GeeTreeMapNode*
gee_tree_map_find_nearest (GeeTreeMap* self,
                           gconstpointer key)
{
	GeeTreeMapNode* cur = NULL;
	GeeTreeMapNode* _tmp0_;
	GeeTreeMapNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->root;
	cur = _tmp0_;
	while (TRUE) {
		GeeTreeMapNode* _tmp1_;
		gint res = 0;
		GCompareDataFunc _tmp2_ = NULL;
		gpointer _tmp2__target = NULL;
		GCompareDataFunc _tmp3_;
		gpointer _tmp3__target;
		GeeTreeMapNode* _tmp4_;
		gconstpointer _tmp5_;
		_tmp1_ = cur;
		if (!(_tmp1_ != NULL)) {
			break;
		}
		_tmp2_ = gee_tree_map_get_key_compare_func (self, &_tmp2__target);
		_tmp3_ = _tmp2_;
		_tmp3__target = _tmp2__target;
		_tmp4_ = cur;
		_tmp5_ = _tmp4_->key;
		res = _tmp3_ (key, _tmp5_, _tmp3__target);
		if (res == 0) {
			GeeTreeMapNode* _tmp6_;
			_tmp6_ = cur;
			result = _tmp6_;
			return result;
		} else {
			if (res < 0) {
				GeeTreeMapNode* _tmp7_;
				GeeTreeMapNode* _tmp8_;
				GeeTreeMapNode* _tmp10_;
				GeeTreeMapNode* _tmp11_;
				_tmp7_ = cur;
				_tmp8_ = _tmp7_->left;
				if (_tmp8_ == NULL) {
					GeeTreeMapNode* _tmp9_;
					_tmp9_ = cur;
					result = _tmp9_;
					return result;
				}
				_tmp10_ = cur;
				_tmp11_ = _tmp10_->left;
				cur = _tmp11_;
			} else {
				GeeTreeMapNode* _tmp12_;
				GeeTreeMapNode* _tmp13_;
				GeeTreeMapNode* _tmp15_;
				GeeTreeMapNode* _tmp16_;
				_tmp12_ = cur;
				_tmp13_ = _tmp12_->right;
				if (_tmp13_ == NULL) {
					GeeTreeMapNode* _tmp14_;
					_tmp14_ = cur;
					result = _tmp14_;
					return result;
				}
				_tmp15_ = cur;
				_tmp16_ = _tmp15_->right;
				cur = _tmp16_;
			}
		}
	}
	result = NULL;
	return result;
}

static inline GeeTreeMapNode*
gee_tree_map_find_lower (GeeTreeMap* self,
                         gconstpointer key)
{
	GeeTreeMapNode* node = NULL;
	GeeTreeMapNode* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMapNode* _tmp2_ = NULL;
	GCompareDataFunc _tmp3_ = NULL;
	gpointer _tmp3__target = NULL;
	GCompareDataFunc _tmp4_;
	gpointer _tmp4__target;
	GeeTreeMapNode* _tmp5_;
	gconstpointer _tmp6_;
	GeeTreeMapNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_tree_map_find_nearest (self, key);
	node = _tmp0_;
	_tmp1_ = node;
	if (_tmp1_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp3_ = gee_tree_map_get_key_compare_func (self, &_tmp3__target);
	_tmp4_ = _tmp3_;
	_tmp4__target = _tmp3__target;
	_tmp5_ = node;
	_tmp6_ = _tmp5_->key;
	if (_tmp4_ (key, _tmp6_, _tmp4__target) <= 0) {
		GeeTreeMapNode* _tmp7_;
		GeeTreeMapNode* _tmp8_;
		_tmp7_ = node;
		_tmp8_ = _tmp7_->prev;
		_tmp2_ = _tmp8_;
	} else {
		GeeTreeMapNode* _tmp9_;
		_tmp9_ = node;
		_tmp2_ = _tmp9_;
	}
	result = _tmp2_;
	return result;
}

static inline GeeTreeMapNode*
gee_tree_map_find_higher (GeeTreeMap* self,
                          gconstpointer key)
{
	GeeTreeMapNode* node = NULL;
	GeeTreeMapNode* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMapNode* _tmp2_ = NULL;
	GCompareDataFunc _tmp3_ = NULL;
	gpointer _tmp3__target = NULL;
	GCompareDataFunc _tmp4_;
	gpointer _tmp4__target;
	GeeTreeMapNode* _tmp5_;
	gconstpointer _tmp6_;
	GeeTreeMapNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_tree_map_find_nearest (self, key);
	node = _tmp0_;
	_tmp1_ = node;
	if (_tmp1_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp3_ = gee_tree_map_get_key_compare_func (self, &_tmp3__target);
	_tmp4_ = _tmp3_;
	_tmp4__target = _tmp3__target;
	_tmp5_ = node;
	_tmp6_ = _tmp5_->key;
	if (_tmp4_ (key, _tmp6_, _tmp4__target) >= 0) {
		GeeTreeMapNode* _tmp7_;
		GeeTreeMapNode* _tmp8_;
		_tmp7_ = node;
		_tmp8_ = _tmp7_->next;
		_tmp2_ = _tmp8_;
	} else {
		GeeTreeMapNode* _tmp9_;
		_tmp9_ = node;
		_tmp2_ = _tmp9_;
	}
	result = _tmp2_;
	return result;
}

static inline GeeTreeMapNode*
gee_tree_map_find_floor (GeeTreeMap* self,
                         gconstpointer key)
{
	GeeTreeMapNode* node = NULL;
	GeeTreeMapNode* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMapNode* _tmp2_ = NULL;
	GCompareDataFunc _tmp3_ = NULL;
	gpointer _tmp3__target = NULL;
	GCompareDataFunc _tmp4_;
	gpointer _tmp4__target;
	GeeTreeMapNode* _tmp5_;
	gconstpointer _tmp6_;
	GeeTreeMapNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_tree_map_find_nearest (self, key);
	node = _tmp0_;
	_tmp1_ = node;
	if (_tmp1_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp3_ = gee_tree_map_get_key_compare_func (self, &_tmp3__target);
	_tmp4_ = _tmp3_;
	_tmp4__target = _tmp3__target;
	_tmp5_ = node;
	_tmp6_ = _tmp5_->key;
	if (_tmp4_ (key, _tmp6_, _tmp4__target) < 0) {
		GeeTreeMapNode* _tmp7_;
		GeeTreeMapNode* _tmp8_;
		_tmp7_ = node;
		_tmp8_ = _tmp7_->prev;
		_tmp2_ = _tmp8_;
	} else {
		GeeTreeMapNode* _tmp9_;
		_tmp9_ = node;
		_tmp2_ = _tmp9_;
	}
	result = _tmp2_;
	return result;
}

static inline GeeTreeMapNode*
gee_tree_map_find_ceil (GeeTreeMap* self,
                        gconstpointer key)
{
	GeeTreeMapNode* node = NULL;
	GeeTreeMapNode* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMapNode* _tmp2_ = NULL;
	GCompareDataFunc _tmp3_ = NULL;
	gpointer _tmp3__target = NULL;
	GCompareDataFunc _tmp4_;
	gpointer _tmp4__target;
	GeeTreeMapNode* _tmp5_;
	gconstpointer _tmp6_;
	GeeTreeMapNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_tree_map_find_nearest (self, key);
	node = _tmp0_;
	_tmp1_ = node;
	if (_tmp1_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp3_ = gee_tree_map_get_key_compare_func (self, &_tmp3__target);
	_tmp4_ = _tmp3_;
	_tmp4__target = _tmp3__target;
	_tmp5_ = node;
	_tmp6_ = _tmp5_->key;
	if (_tmp4_ (key, _tmp6_, _tmp4__target) > 0) {
		GeeTreeMapNode* _tmp7_;
		GeeTreeMapNode* _tmp8_;
		_tmp7_ = node;
		_tmp8_ = _tmp7_->next;
		_tmp2_ = _tmp8_;
	} else {
		GeeTreeMapNode* _tmp9_;
		_tmp9_ = node;
		_tmp2_ = _tmp9_;
	}
	result = _tmp2_;
	return result;
}

static inline gpointer
gee_tree_map_lift_null_key (GeeTreeMap* self,
                            GeeTreeMapNode* node)
{
	gconstpointer _tmp0_ = NULL;
	gpointer _tmp2_;
	gpointer result;
	g_return_val_if_fail (self != NULL, NULL);
	if (node != NULL) {
		gconstpointer _tmp1_;
		_tmp1_ = node->key;
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = NULL;
	}
	_tmp2_ = ((_tmp0_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp0_) : ((gpointer) _tmp0_);
	result = _tmp2_;
	return result;
}

static gint
gee_tree_map_real_get_size (GeeAbstractMap* base)
{
	gint result;
	GeeTreeMap* self;
	self = (GeeTreeMap*) base;
	result = self->priv->_size;
	return result;
}

static gboolean
gee_tree_map_real_get_read_only (GeeAbstractMap* base)
{
	gboolean result;
	GeeTreeMap* self;
	self = (GeeTreeMap*) base;
	result = FALSE;
	return result;
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static GeeSet*
gee_tree_map_real_get_keys (GeeAbstractMap* base)
{
	GeeSet* result;
	GeeTreeMap* self;
	GeeSortedSet* keys = NULL;
	GeeSortedSet* _tmp0_;
	GeeSortedSet* _tmp1_;
	GeeSortedSet* _tmp2_;
	self = (GeeTreeMap*) base;
	_tmp0_ = self->priv->_keys;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	keys = _tmp1_;
	_tmp2_ = self->priv->_keys;
	if (_tmp2_ == NULL) {
		GeeTreeMapKeySet* _tmp3_;
		GeeSortedSet* _tmp4_;
		GeeSortedSet* _tmp5_;
		_tmp3_ = gee_tree_map_key_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self);
		_g_object_unref0 (keys);
		keys = (GeeSortedSet*) _tmp3_;
		_tmp4_ = keys;
		self->priv->_keys = _tmp4_;
		_tmp5_ = keys;
		g_object_add_weak_pointer ((GObject*) _tmp5_, (void**) (&self->priv->_keys));
	}
	result = (GeeSet*) keys;
	return result;
}

static GeeCollection*
gee_tree_map_real_get_values (GeeAbstractMap* base)
{
	GeeCollection* result;
	GeeTreeMap* self;
	GeeCollection* values = NULL;
	GeeCollection* _tmp0_;
	GeeCollection* _tmp1_;
	GeeCollection* _tmp2_;
	self = (GeeTreeMap*) base;
	_tmp0_ = self->priv->_values;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	values = _tmp1_;
	_tmp2_ = self->priv->_values;
	if (_tmp2_ == NULL) {
		GeeTreeMapValueCollection* _tmp3_;
		GeeCollection* _tmp4_;
		GeeCollection* _tmp5_;
		_tmp3_ = gee_tree_map_value_collection_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self);
		_g_object_unref0 (values);
		values = (GeeCollection*) _tmp3_;
		_tmp4_ = values;
		self->priv->_values = _tmp4_;
		_tmp5_ = values;
		g_object_add_weak_pointer ((GObject*) _tmp5_, (void**) (&self->priv->_values));
	}
	result = values;
	return result;
}

static GeeSet*
gee_tree_map_real_get_entries (GeeAbstractMap* base)
{
	GeeSet* result;
	GeeTreeMap* self;
	GeeSortedSet* entries = NULL;
	GeeSortedSet* _tmp0_;
	GeeSortedSet* _tmp1_;
	GeeSortedSet* _tmp2_;
	self = (GeeTreeMap*) base;
	_tmp0_ = self->priv->_entries;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	entries = _tmp1_;
	_tmp2_ = self->priv->_entries;
	if (_tmp2_ == NULL) {
		GeeTreeMapEntrySet* _tmp3_;
		GeeSortedSet* _tmp4_;
		GeeSortedSet* _tmp5_;
		_tmp3_ = gee_tree_map_entry_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self);
		_g_object_unref0 (entries);
		entries = (GeeSortedSet*) _tmp3_;
		_tmp4_ = entries;
		self->priv->_entries = _tmp4_;
		_tmp5_ = entries;
		g_object_add_weak_pointer ((GObject*) _tmp5_, (void**) (&self->priv->_entries));
	}
	result = (GeeSet*) entries;
	return result;
}

GCompareDataFunc
gee_tree_map_get_key_compare_func (GeeTreeMap* self,
                                   gpointer* result_target)
{
	GCompareDataFunc result;
	GeeFunctionsCompareDataFuncClosure* _tmp0_;
	GCompareDataFunc _tmp1_;
	gpointer _tmp1__target;
	GCompareDataFunc _tmp2_;
	gpointer _tmp2__target;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_key_compare_func;
	_tmp1_ = _tmp0_->func;
	_tmp1__target = _tmp0_->func_target;
	_tmp2_ = _tmp1_;
	_tmp2__target = _tmp1__target;
	*result_target = _tmp2__target;
	result = _tmp2_;
	return result;
}

static void
gee_tree_map_set_key_compare_func (GeeTreeMap* self,
                                   GCompareDataFunc value,
                                   gpointer value_target)
{
	g_return_if_fail (self != NULL);
}

GeeEqualDataFunc
gee_tree_map_get_value_equal_func (GeeTreeMap* self,
                                   gpointer* result_target)
{
	GeeEqualDataFunc result;
	GeeFunctionsEqualDataFuncClosure* _tmp0_;
	GeeEqualDataFunc _tmp1_;
	gpointer _tmp1__target;
	GeeEqualDataFunc _tmp2_;
	gpointer _tmp2__target;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_value_equal_func;
	_tmp1_ = _tmp0_->func;
	_tmp1__target = _tmp0_->func_target;
	_tmp2_ = _tmp1_;
	_tmp2__target = _tmp1__target;
	*result_target = _tmp2__target;
	result = _tmp2_;
	return result;
}

static void
gee_tree_map_set_value_equal_func (GeeTreeMap* self,
                                   GeeEqualDataFunc value,
                                   gpointer value_target)
{
	g_return_if_fail (self != NULL);
}

static GeeSortedSet*
gee_tree_map_real_get_ascending_keys (GeeAbstractSortedMap* base)
{
	GeeSortedSet* result;
	GeeTreeMap* self;
	GeeSortedSet* keys = NULL;
	GeeSortedSet* _tmp0_;
	GeeSortedSet* _tmp1_;
	GeeSortedSet* _tmp2_;
	self = (GeeTreeMap*) base;
	_tmp0_ = self->priv->_keys;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	keys = _tmp1_;
	_tmp2_ = self->priv->_keys;
	if (_tmp2_ == NULL) {
		GeeTreeMapKeySet* _tmp3_;
		GeeSortedSet* _tmp4_;
		GeeSortedSet* _tmp5_;
		_tmp3_ = gee_tree_map_key_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self);
		_g_object_unref0 (keys);
		keys = (GeeSortedSet*) _tmp3_;
		_tmp4_ = keys;
		self->priv->_keys = _tmp4_;
		_tmp5_ = keys;
		g_object_add_weak_pointer ((GObject*) _tmp5_, &self->priv->_keys);
	}
	result = keys;
	return result;
}

static GeeSortedSet*
gee_tree_map_real_get_ascending_entries (GeeAbstractSortedMap* base)
{
	GeeSortedSet* result;
	GeeTreeMap* self;
	GeeSortedSet* entries = NULL;
	GeeSortedSet* _tmp0_;
	GeeSortedSet* _tmp1_;
	GeeSortedSet* _tmp2_;
	self = (GeeTreeMap*) base;
	_tmp0_ = self->priv->_entries;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	entries = _tmp1_;
	_tmp2_ = self->priv->_entries;
	if (_tmp2_ == NULL) {
		GeeTreeMapEntrySet* _tmp3_;
		GeeSortedSet* _tmp4_;
		GeeSortedSet* _tmp5_;
		_tmp3_ = gee_tree_map_entry_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self);
		_g_object_unref0 (entries);
		entries = (GeeSortedSet*) _tmp3_;
		_tmp4_ = entries;
		self->priv->_entries = _tmp4_;
		_tmp5_ = entries;
		g_object_add_weak_pointer ((GObject*) _tmp5_, &self->priv->_entries);
	}
	result = entries;
	return result;
}

static GeeTreeMapNodeColor
gee_tree_map_node_color_flip (GeeTreeMapNodeColor self)
{
	GeeTreeMapNodeColor result;
	if (self == GEE_TREE_MAP_NODE_COLOR_RED) {
		result = GEE_TREE_MAP_NODE_COLOR_BLACK;
		return result;
	} else {
		result = GEE_TREE_MAP_NODE_COLOR_RED;
		return result;
	}
}

static GType
gee_tree_map_node_color_get_type_once (void)
{
	static const GEnumValue values[] = {{GEE_TREE_MAP_NODE_COLOR_RED, "GEE_TREE_MAP_NODE_COLOR_RED", "red"}, {GEE_TREE_MAP_NODE_COLOR_BLACK, "GEE_TREE_MAP_NODE_COLOR_BLACK", "black"}, {0, NULL, NULL}};
	GType gee_tree_map_node_color_type_id;
	gee_tree_map_node_color_type_id = g_enum_register_static ("GeeTreeMapNodeColor", values);
	return gee_tree_map_node_color_type_id;
}

GType
gee_tree_map_node_color_get_type (void)
{
	static volatile gsize gee_tree_map_node_color_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_node_color_type_id__once)) {
		GType gee_tree_map_node_color_type_id;
		gee_tree_map_node_color_type_id = gee_tree_map_node_color_get_type_once ();
		g_once_init_leave (&gee_tree_map_node_color_type_id__once, gee_tree_map_node_color_type_id);
	}
	return gee_tree_map_node_color_type_id__once;
}

static GeeTreeMapNode*
gee_tree_map_node_new (gpointer key,
                       gpointer value,
                       GeeTreeMapNode* prev,
                       GeeTreeMapNode* next)
{
	GeeTreeMapNode* self;
	gpointer _tmp0_;
	gpointer _tmp1_;
	self = g_slice_new0 (GeeTreeMapNode);
	gee_tree_map_node_instance_init (self);
	_tmp0_ = key;
	key = NULL;
	self->key = _tmp0_;
	_tmp1_ = value;
	value = NULL;
	self->value = _tmp1_;
	self->color = GEE_TREE_MAP_NODE_COLOR_RED;
	self->prev = prev;
	self->next = next;
	if (prev != NULL) {
		prev->next = self;
	}
	if (next != NULL) {
		next->prev = self;
	}
	return self;
}

static void
gee_tree_map_node_flip (GeeTreeMapNode* self)
{
	GeeTreeMapNode* _tmp0_;
	GeeTreeMapNode* _tmp3_;
	g_return_if_fail (self != NULL);
	self->color = gee_tree_map_node_color_flip (self->color);
	_tmp0_ = self->left;
	if (_tmp0_ != NULL) {
		GeeTreeMapNode* _tmp1_;
		GeeTreeMapNode* _tmp2_;
		_tmp1_ = self->left;
		_tmp2_ = self->left;
		_tmp1_->color = gee_tree_map_node_color_flip (_tmp2_->color);
	}
	_tmp3_ = self->right;
	if (_tmp3_ != NULL) {
		GeeTreeMapNode* _tmp4_;
		GeeTreeMapNode* _tmp5_;
		_tmp4_ = self->right;
		_tmp5_ = self->right;
		_tmp4_->color = gee_tree_map_node_color_flip (_tmp5_->color);
	}
}

static void
gee_tree_map_node_instance_init (GeeTreeMapNode * self)
{
}

static void
gee_tree_map_node_free (GeeTreeMapNode * self)
{
	GeeMapEntry* _tmp0_;
	_tmp0_ = self->entry;
	if (_tmp0_ != NULL) {
		GeeMapEntry* _tmp1_;
		_tmp1_ = self->entry;
		g_object_remove_weak_pointer ((GObject*) _tmp1_, (void**) (&self->entry));
	}
	_gee_tree_map_node_free0 (self->left);
	_gee_tree_map_node_free0 (self->right);
	g_slice_free (GeeTreeMapNode, self);
}

static inline gpointer
gee_tree_map_entry_get_instance_private (GeeTreeMapEntry* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapEntry_private_offset);
}

static GeeMapEntry*
gee_tree_map_entry_entry_for (GType k_type,
                              GBoxedCopyFunc k_dup_func,
                              GDestroyNotify k_destroy_func,
                              GType v_type,
                              GBoxedCopyFunc v_dup_func,
                              GDestroyNotify v_destroy_func,
                              GeeTreeMapNode* node)
{
	GeeMapEntry* _result_ = NULL;
	GeeMapEntry* _tmp0_;
	GeeMapEntry* _tmp1_;
	GeeMapEntry* _tmp2_;
	GeeMapEntry* result;
	g_return_val_if_fail (node != NULL, NULL);
	_tmp0_ = node->entry;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_result_ = _tmp1_;
	_tmp2_ = _result_;
	if (_tmp2_ == NULL) {
		GeeTreeMapEntry* _tmp3_;
		GeeMapEntry* _tmp4_;
		GeeMapEntry* _tmp5_;
		_tmp3_ = gee_tree_map_entry_new (k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, node);
		_g_object_unref0 (_result_);
		_result_ = (GeeMapEntry*) _tmp3_;
		_tmp4_ = _result_;
		node->entry = _tmp4_;
		_tmp5_ = _result_;
		g_object_add_weak_pointer ((GObject*) _tmp5_, (void**) (&node->entry));
	}
	result = _result_;
	return result;
}

static GeeTreeMapEntry*
gee_tree_map_entry_construct (GType object_type,
                              GType k_type,
                              GBoxedCopyFunc k_dup_func,
                              GDestroyNotify k_destroy_func,
                              GType v_type,
                              GBoxedCopyFunc v_dup_func,
                              GDestroyNotify v_destroy_func,
                              GeeTreeMapNode* node)
{
	GeeTreeMapEntry * self = NULL;
	g_return_val_if_fail (node != NULL, NULL);
	self = (GeeTreeMapEntry*) gee_map_entry_construct (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	self->priv->_node = node;
	return self;
}

static GeeTreeMapEntry*
gee_tree_map_entry_new (GType k_type,
                        GBoxedCopyFunc k_dup_func,
                        GDestroyNotify k_destroy_func,
                        GType v_type,
                        GBoxedCopyFunc v_dup_func,
                        GDestroyNotify v_destroy_func,
                        GeeTreeMapNode* node)
{
	return gee_tree_map_entry_construct (GEE_TREE_MAP_TYPE_ENTRY, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, node);
}

static gconstpointer
gee_tree_map_entry_real_get_key (GeeMapEntry* base)
{
	gconstpointer result;
	GeeTreeMapEntry* self;
	GeeTreeMapNode* _tmp0_;
	gconstpointer _tmp1_;
	self = (GeeTreeMapEntry*) base;
	_tmp0_ = self->priv->_node;
	_tmp1_ = _tmp0_->key;
	result = _tmp1_;
	return result;
}

static gconstpointer
gee_tree_map_entry_real_get_value (GeeMapEntry* base)
{
	gconstpointer result;
	GeeTreeMapEntry* self;
	GeeTreeMapNode* _tmp0_;
	gconstpointer _tmp1_;
	self = (GeeTreeMapEntry*) base;
	_tmp0_ = self->priv->_node;
	_tmp1_ = _tmp0_->value;
	result = _tmp1_;
	return result;
}

static void
gee_tree_map_entry_real_set_value (GeeMapEntry* base,
                                   gconstpointer value)
{
	GeeTreeMapEntry* self;
	GeeTreeMapNode* _tmp0_;
	gpointer _tmp1_;
	self = (GeeTreeMapEntry*) base;
	_tmp0_ = self->priv->_node;
	_tmp1_ = ((value != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) value) : ((gpointer) value);
	((_tmp0_->value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_tmp0_->value = (self->priv->v_destroy_func (_tmp0_->value), NULL));
	_tmp0_->value = _tmp1_;
	g_object_notify_by_pspec ((GObject *) self, gee_tree_map_entry_properties[GEE_TREE_MAP_ENTRY_VALUE_PROPERTY]);
}

static gboolean
gee_tree_map_entry_real_get_read_only (GeeMapEntry* base)
{
	gboolean result;
	GeeTreeMapEntry* self;
	self = (GeeTreeMapEntry*) base;
	result = FALSE;
	return result;
}

static void
gee_tree_map_entry_class_init (GeeTreeMapEntryClass * klass,
                               gpointer klass_data)
{
	gee_tree_map_entry_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapEntry_private_offset);
	GEE_MAP_ENTRY_CLASS (klass)->get_key = gee_tree_map_entry_real_get_key;
	GEE_MAP_ENTRY_CLASS (klass)->get_value = gee_tree_map_entry_real_get_value;
	GEE_MAP_ENTRY_CLASS (klass)->set_value = gee_tree_map_entry_real_set_value;
	GEE_MAP_ENTRY_CLASS (klass)->get_read_only = gee_tree_map_entry_real_get_read_only;
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_entry_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_entry_set_property;
	G_OBJECT_CLASS (klass)->finalize = gee_tree_map_entry_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_KEY_PROPERTY, gee_tree_map_entry_properties[GEE_TREE_MAP_ENTRY_KEY_PROPERTY] = g_param_spec_pointer ("key", "key", "key", G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_VALUE_PROPERTY, gee_tree_map_entry_properties[GEE_TREE_MAP_ENTRY_VALUE_PROPERTY] = g_param_spec_pointer ("value", "value", "value", G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_READ_ONLY_PROPERTY, gee_tree_map_entry_properties[GEE_TREE_MAP_ENTRY_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gee_tree_map_entry_instance_init (GeeTreeMapEntry * self,
                                  gpointer klass)
{
	self->priv = gee_tree_map_entry_get_instance_private (self);
}

static void
gee_tree_map_entry_finalize (GObject * obj)
{
	GeeTreeMapEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TREE_MAP_TYPE_ENTRY, GeeTreeMapEntry);
	G_OBJECT_CLASS (gee_tree_map_entry_parent_class)->finalize (obj);
}

static GType
gee_tree_map_entry_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapEntry), 0, (GInstanceInitFunc) gee_tree_map_entry_instance_init, NULL };
	GType gee_tree_map_entry_type_id;
	gee_tree_map_entry_type_id = g_type_register_static (GEE_MAP_TYPE_ENTRY, "GeeTreeMapEntry", &g_define_type_info, 0);
	GeeTreeMapEntry_private_offset = g_type_add_instance_private (gee_tree_map_entry_type_id, sizeof (GeeTreeMapEntryPrivate));
	return gee_tree_map_entry_type_id;
}

static GType
gee_tree_map_entry_get_type (void)
{
	static volatile gsize gee_tree_map_entry_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_entry_type_id__once)) {
		GType gee_tree_map_entry_type_id;
		gee_tree_map_entry_type_id = gee_tree_map_entry_get_type_once ();
		g_once_init_leave (&gee_tree_map_entry_type_id__once, gee_tree_map_entry_type_id);
	}
	return gee_tree_map_entry_type_id__once;
}

static void
_vala_gee_tree_map_entry_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec)
{
	GeeTreeMapEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_ENTRY, GeeTreeMapEntry);
	switch (property_id) {
		case GEE_TREE_MAP_ENTRY_KEY_PROPERTY:
		g_value_set_pointer (value, gee_map_entry_get_key ((GeeMapEntry*) self));
		break;
		case GEE_TREE_MAP_ENTRY_VALUE_PROPERTY:
		g_value_set_pointer (value, gee_map_entry_get_value ((GeeMapEntry*) self));
		break;
		case GEE_TREE_MAP_ENTRY_READ_ONLY_PROPERTY:
		g_value_set_boolean (value, gee_map_entry_get_read_only ((GeeMapEntry*) self));
		break;
		case GEE_TREE_MAP_ENTRY_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_ENTRY_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_ENTRY_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_ENTRY_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_ENTRY_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_ENTRY_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_entry_set_property (GObject * object,
                                       guint property_id,
                                       const GValue * value,
                                       GParamSpec * pspec)
{
	GeeTreeMapEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_ENTRY, GeeTreeMapEntry);
	switch (property_id) {
		case GEE_TREE_MAP_ENTRY_VALUE_PROPERTY:
		gee_map_entry_set_value ((GeeMapEntry*) self, g_value_get_pointer (value));
		break;
		case GEE_TREE_MAP_ENTRY_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_ENTRY_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_ENTRY_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_ENTRY_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_ENTRY_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_ENTRY_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_range_get_instance_private (GeeTreeMapRange* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapRange_private_offset);
}

static GeeTreeMapRange*
gee_tree_map_range_construct (GType object_type,
                              GType k_type,
                              GBoxedCopyFunc k_dup_func,
                              GDestroyNotify k_destroy_func,
                              GType v_type,
                              GBoxedCopyFunc v_dup_func,
                              GDestroyNotify v_destroy_func,
                              GeeTreeMap* map,
                              gconstpointer after,
                              gconstpointer before)
{
	GeeTreeMapRange* self = NULL;
	GeeTreeMap* _tmp0_;
	GCompareDataFunc _tmp1_ = NULL;
	gpointer _tmp1__target = NULL;
	GCompareDataFunc _tmp2_;
	gpointer _tmp2__target;
	g_return_val_if_fail (map != NULL, NULL);
	self = (GeeTreeMapRange*) g_type_create_instance (object_type);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = _g_object_ref0 (map);
	_g_object_unref0 (self->priv->map);
	self->priv->map = _tmp0_;
	_tmp1_ = gee_tree_map_get_key_compare_func (map, &_tmp1__target);
	_tmp2_ = _tmp1_;
	_tmp2__target = _tmp1__target;
	if (_tmp2_ (after, before, _tmp2__target) < 0) {
		gpointer _tmp3_;
		gpointer _tmp4_;
		_tmp3_ = ((after != NULL) && (k_dup_func != NULL)) ? k_dup_func ((gpointer) after) : ((gpointer) after);
		((self->priv->after == NULL) || (k_destroy_func == NULL)) ? NULL : (self->priv->after = (k_destroy_func (self->priv->after), NULL));
		self->priv->after = _tmp3_;
		_tmp4_ = ((before != NULL) && (k_dup_func != NULL)) ? k_dup_func ((gpointer) before) : ((gpointer) before);
		((self->priv->before == NULL) || (k_destroy_func == NULL)) ? NULL : (self->priv->before = (k_destroy_func (self->priv->before), NULL));
		self->priv->before = _tmp4_;
		self->priv->type = GEE_TREE_MAP_RANGE_TYPE_BOUNDED;
	} else {
		self->priv->type = GEE_TREE_MAP_RANGE_TYPE_EMPTY;
	}
	return self;
}

static GeeTreeMapRange*
gee_tree_map_range_new (GType k_type,
                        GBoxedCopyFunc k_dup_func,
                        GDestroyNotify k_destroy_func,
                        GType v_type,
                        GBoxedCopyFunc v_dup_func,
                        GDestroyNotify v_destroy_func,
                        GeeTreeMap* map,
                        gconstpointer after,
                        gconstpointer before)
{
	return gee_tree_map_range_construct (GEE_TREE_MAP_TYPE_RANGE, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, after, before);
}

static GeeTreeMapRange*
gee_tree_map_range_construct_head (GType object_type,
                                   GType k_type,
                                   GBoxedCopyFunc k_dup_func,
                                   GDestroyNotify k_destroy_func,
                                   GType v_type,
                                   GBoxedCopyFunc v_dup_func,
                                   GDestroyNotify v_destroy_func,
                                   GeeTreeMap* map,
                                   gconstpointer before)
{
	GeeTreeMapRange* self = NULL;
	GeeTreeMap* _tmp0_;
	gpointer _tmp1_;
	g_return_val_if_fail (map != NULL, NULL);
	self = (GeeTreeMapRange*) g_type_create_instance (object_type);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = _g_object_ref0 (map);
	_g_object_unref0 (self->priv->map);
	self->priv->map = _tmp0_;
	_tmp1_ = ((before != NULL) && (k_dup_func != NULL)) ? k_dup_func ((gpointer) before) : ((gpointer) before);
	((self->priv->before == NULL) || (k_destroy_func == NULL)) ? NULL : (self->priv->before = (k_destroy_func (self->priv->before), NULL));
	self->priv->before = _tmp1_;
	self->priv->type = GEE_TREE_MAP_RANGE_TYPE_HEAD;
	return self;
}

static GeeTreeMapRange*
gee_tree_map_range_new_head (GType k_type,
                             GBoxedCopyFunc k_dup_func,
                             GDestroyNotify k_destroy_func,
                             GType v_type,
                             GBoxedCopyFunc v_dup_func,
                             GDestroyNotify v_destroy_func,
                             GeeTreeMap* map,
                             gconstpointer before)
{
	return gee_tree_map_range_construct_head (GEE_TREE_MAP_TYPE_RANGE, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, before);
}

static GeeTreeMapRange*
gee_tree_map_range_construct_tail (GType object_type,
                                   GType k_type,
                                   GBoxedCopyFunc k_dup_func,
                                   GDestroyNotify k_destroy_func,
                                   GType v_type,
                                   GBoxedCopyFunc v_dup_func,
                                   GDestroyNotify v_destroy_func,
                                   GeeTreeMap* map,
                                   gconstpointer after)
{
	GeeTreeMapRange* self = NULL;
	GeeTreeMap* _tmp0_;
	gpointer _tmp1_;
	g_return_val_if_fail (map != NULL, NULL);
	self = (GeeTreeMapRange*) g_type_create_instance (object_type);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = _g_object_ref0 (map);
	_g_object_unref0 (self->priv->map);
	self->priv->map = _tmp0_;
	_tmp1_ = ((after != NULL) && (k_dup_func != NULL)) ? k_dup_func ((gpointer) after) : ((gpointer) after);
	((self->priv->after == NULL) || (k_destroy_func == NULL)) ? NULL : (self->priv->after = (k_destroy_func (self->priv->after), NULL));
	self->priv->after = _tmp1_;
	self->priv->type = GEE_TREE_MAP_RANGE_TYPE_TAIL;
	return self;
}

static GeeTreeMapRange*
gee_tree_map_range_new_tail (GType k_type,
                             GBoxedCopyFunc k_dup_func,
                             GDestroyNotify k_destroy_func,
                             GType v_type,
                             GBoxedCopyFunc v_dup_func,
                             GDestroyNotify v_destroy_func,
                             GeeTreeMap* map,
                             gconstpointer after)
{
	return gee_tree_map_range_construct_tail (GEE_TREE_MAP_TYPE_RANGE, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, after);
}

static GeeTreeMapRange*
gee_tree_map_range_construct_empty (GType object_type,
                                    GType k_type,
                                    GBoxedCopyFunc k_dup_func,
                                    GDestroyNotify k_destroy_func,
                                    GType v_type,
                                    GBoxedCopyFunc v_dup_func,
                                    GDestroyNotify v_destroy_func,
                                    GeeTreeMap* map)
{
	GeeTreeMapRange* self = NULL;
	GeeTreeMap* _tmp0_;
	g_return_val_if_fail (map != NULL, NULL);
	self = (GeeTreeMapRange*) g_type_create_instance (object_type);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = _g_object_ref0 (map);
	_g_object_unref0 (self->priv->map);
	self->priv->map = _tmp0_;
	self->priv->type = GEE_TREE_MAP_RANGE_TYPE_EMPTY;
	return self;
}

static GeeTreeMapRange*
gee_tree_map_range_new_empty (GType k_type,
                              GBoxedCopyFunc k_dup_func,
                              GDestroyNotify k_destroy_func,
                              GType v_type,
                              GBoxedCopyFunc v_dup_func,
                              GDestroyNotify v_destroy_func,
                              GeeTreeMap* map)
{
	return gee_tree_map_range_construct_empty (GEE_TREE_MAP_TYPE_RANGE, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map);
}

static gpointer
_gee_tree_map_range_ref0 (gpointer self)
{
	return self ? gee_tree_map_range_ref (self) : NULL;
}

static GeeTreeMapRange*
gee_tree_map_range_cut_head (GeeTreeMapRange* self,
                             gconstpointer after)
{
	GeeTreeMapRange* result;
	g_return_val_if_fail (self != NULL, NULL);
	switch (self->priv->type) {
		case GEE_TREE_MAP_RANGE_TYPE_HEAD:
		{
			GeeTreeMap* _tmp0_;
			gconstpointer _tmp1_;
			GeeTreeMapRange* _tmp2_;
			_tmp0_ = self->priv->map;
			_tmp1_ = self->priv->before;
			_tmp2_ = gee_tree_map_range_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, after, _tmp1_);
			result = _tmp2_;
			return result;
		}
		case GEE_TREE_MAP_RANGE_TYPE_TAIL:
		{
			GeeTreeMap* _tmp3_;
			GeeTreeMap* _tmp4_;
			gconstpointer _tmp5_;
			gpointer _tmp6_;
			gpointer _tmp7_;
			GeeTreeMapRange* _tmp8_;
			GeeTreeMapRange* _tmp9_;
			_tmp3_ = self->priv->map;
			_tmp4_ = self->priv->map;
			_tmp5_ = self->priv->after;
			_tmp6_ = gee_tree_map_max (_tmp4_, after, _tmp5_);
			_tmp7_ = _tmp6_;
			_tmp8_ = gee_tree_map_range_new_tail (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp3_, _tmp7_);
			_tmp9_ = _tmp8_;
			((_tmp7_ == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_tmp7_ = (self->priv->k_destroy_func (_tmp7_), NULL));
			result = _tmp9_;
			return result;
		}
		case GEE_TREE_MAP_RANGE_TYPE_EMPTY:
		{
			GeeTreeMapRange* _tmp10_;
			_tmp10_ = _gee_tree_map_range_ref0 (self);
			result = _tmp10_;
			return result;
		}
		case GEE_TREE_MAP_RANGE_TYPE_BOUNDED:
		{
			gpointer _after = NULL;
			GeeTreeMap* _tmp11_;
			gconstpointer _tmp12_;
			gpointer _tmp13_;
			GeeTreeMap* _tmp14_;
			gconstpointer _tmp15_;
			gconstpointer _tmp16_;
			GeeTreeMapRange* _tmp17_;
			_tmp11_ = self->priv->map;
			_tmp12_ = self->priv->after;
			_tmp13_ = gee_tree_map_max (_tmp11_, after, _tmp12_);
			_after = _tmp13_;
			_tmp14_ = self->priv->map;
			_tmp15_ = _after;
			_tmp16_ = self->priv->before;
			_tmp17_ = gee_tree_map_range_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp14_, _tmp15_, _tmp16_);
			result = _tmp17_;
			((_after == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_after = (self->priv->k_destroy_func (_after), NULL));
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

static GeeTreeMapRange*
gee_tree_map_range_cut_tail (GeeTreeMapRange* self,
                             gconstpointer before)
{
	GeeTreeMapRange* result;
	g_return_val_if_fail (self != NULL, NULL);
	switch (self->priv->type) {
		case GEE_TREE_MAP_RANGE_TYPE_HEAD:
		{
			GeeTreeMap* _tmp0_;
			GeeTreeMap* _tmp1_;
			gconstpointer _tmp2_;
			gpointer _tmp3_;
			gpointer _tmp4_;
			GeeTreeMapRange* _tmp5_;
			GeeTreeMapRange* _tmp6_;
			_tmp0_ = self->priv->map;
			_tmp1_ = self->priv->map;
			_tmp2_ = self->priv->before;
			_tmp3_ = gee_tree_map_min (_tmp1_, before, _tmp2_);
			_tmp4_ = _tmp3_;
			_tmp5_ = gee_tree_map_range_new_head (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp4_);
			_tmp6_ = _tmp5_;
			((_tmp4_ == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_tmp4_ = (self->priv->k_destroy_func (_tmp4_), NULL));
			result = _tmp6_;
			return result;
		}
		case GEE_TREE_MAP_RANGE_TYPE_TAIL:
		{
			GeeTreeMap* _tmp7_;
			gconstpointer _tmp8_;
			GeeTreeMapRange* _tmp9_;
			_tmp7_ = self->priv->map;
			_tmp8_ = self->priv->after;
			_tmp9_ = gee_tree_map_range_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp7_, _tmp8_, before);
			result = _tmp9_;
			return result;
		}
		case GEE_TREE_MAP_RANGE_TYPE_EMPTY:
		{
			GeeTreeMapRange* _tmp10_;
			_tmp10_ = _gee_tree_map_range_ref0 (self);
			result = _tmp10_;
			return result;
		}
		case GEE_TREE_MAP_RANGE_TYPE_BOUNDED:
		{
			gpointer _before = NULL;
			GeeTreeMap* _tmp11_;
			gconstpointer _tmp12_;
			gpointer _tmp13_;
			GeeTreeMap* _tmp14_;
			gconstpointer _tmp15_;
			gconstpointer _tmp16_;
			GeeTreeMapRange* _tmp17_;
			_tmp11_ = self->priv->map;
			_tmp12_ = self->priv->before;
			_tmp13_ = gee_tree_map_min (_tmp11_, before, _tmp12_);
			_before = _tmp13_;
			_tmp14_ = self->priv->map;
			_tmp15_ = self->priv->after;
			_tmp16_ = _before;
			_tmp17_ = gee_tree_map_range_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp14_, _tmp15_, _tmp16_);
			result = _tmp17_;
			((_before == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_before = (self->priv->k_destroy_func (_before), NULL));
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

static GeeTreeMapRange*
gee_tree_map_range_cut (GeeTreeMapRange* self,
                        gconstpointer after,
                        gconstpointer before)
{
	gpointer _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gpointer _before = NULL;
	gpointer _tmp7_;
	gpointer _tmp8_ = NULL;
	gboolean _tmp9_ = FALSE;
	gpointer _after = NULL;
	gpointer _tmp14_;
	GeeTreeMap* _tmp15_;
	gconstpointer _tmp16_;
	gconstpointer _tmp17_;
	GeeTreeMapRange* _tmp18_;
	GeeTreeMapRange* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (self->priv->type == GEE_TREE_MAP_RANGE_TYPE_EMPTY) {
		GeeTreeMapRange* _tmp0_;
		_tmp0_ = _gee_tree_map_range_ref0 (self);
		result = _tmp0_;
		return result;
	}
	if (self->priv->type == GEE_TREE_MAP_RANGE_TYPE_HEAD) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = self->priv->type == GEE_TREE_MAP_RANGE_TYPE_BOUNDED;
	}
	if (_tmp2_) {
		GeeTreeMap* _tmp3_;
		gconstpointer _tmp4_;
		gpointer _tmp5_;
		_tmp3_ = self->priv->map;
		_tmp4_ = self->priv->before;
		_tmp5_ = gee_tree_map_min (_tmp3_, before, _tmp4_);
		((_tmp1_ == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_tmp1_ = (self->priv->k_destroy_func (_tmp1_), NULL));
		_tmp1_ = _tmp5_;
	} else {
		gpointer _tmp6_;
		_tmp6_ = ((before != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) before) : ((gpointer) before);
		((_tmp1_ == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_tmp1_ = (self->priv->k_destroy_func (_tmp1_), NULL));
		_tmp1_ = _tmp6_;
	}
	_tmp7_ = ((_tmp1_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp1_) : ((gpointer) _tmp1_);
	_before = _tmp7_;
	if (self->priv->type == GEE_TREE_MAP_RANGE_TYPE_TAIL) {
		_tmp9_ = TRUE;
	} else {
		_tmp9_ = self->priv->type == GEE_TREE_MAP_RANGE_TYPE_BOUNDED;
	}
	if (_tmp9_) {
		GeeTreeMap* _tmp10_;
		gconstpointer _tmp11_;
		gpointer _tmp12_;
		_tmp10_ = self->priv->map;
		_tmp11_ = self->priv->after;
		_tmp12_ = gee_tree_map_max (_tmp10_, after, _tmp11_);
		((_tmp8_ == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_tmp8_ = (self->priv->k_destroy_func (_tmp8_), NULL));
		_tmp8_ = _tmp12_;
	} else {
		gpointer _tmp13_;
		_tmp13_ = ((after != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) after) : ((gpointer) after);
		((_tmp8_ == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_tmp8_ = (self->priv->k_destroy_func (_tmp8_), NULL));
		_tmp8_ = _tmp13_;
	}
	_tmp14_ = ((_tmp8_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp8_) : ((gpointer) _tmp8_);
	_after = _tmp14_;
	_tmp15_ = self->priv->map;
	_tmp16_ = _after;
	_tmp17_ = _before;
	_tmp18_ = gee_tree_map_range_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp15_, _tmp16_, _tmp17_);
	result = _tmp18_;
	((_after == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_after = (self->priv->k_destroy_func (_after), NULL));
	((_tmp8_ == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_tmp8_ = (self->priv->k_destroy_func (_tmp8_), NULL));
	((_before == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_before = (self->priv->k_destroy_func (_before), NULL));
	((_tmp1_ == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (_tmp1_ = (self->priv->k_destroy_func (_tmp1_), NULL));
	return result;
}

static gboolean
gee_tree_map_range_in_range (GeeTreeMapRange* self,
                             gconstpointer key)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (self->priv->type == GEE_TREE_MAP_RANGE_TYPE_EMPTY) {
		_tmp0_ = FALSE;
	} else {
		_tmp0_ = gee_tree_map_range_compare_range (self, key) == 0;
	}
	result = _tmp0_;
	return result;
}

static gint
gee_tree_map_range_compare_range (GeeTreeMapRange* self,
                                  gconstpointer key)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	switch (self->priv->type) {
		case GEE_TREE_MAP_RANGE_TYPE_HEAD:
		{
			gint _tmp0_ = 0;
			GeeTreeMap* _tmp1_;
			GCompareDataFunc _tmp2_ = NULL;
			gpointer _tmp2__target = NULL;
			GCompareDataFunc _tmp3_;
			gpointer _tmp3__target;
			gconstpointer _tmp4_;
			_tmp1_ = self->priv->map;
			_tmp2_ = gee_tree_map_get_key_compare_func (_tmp1_, &_tmp2__target);
			_tmp3_ = _tmp2_;
			_tmp3__target = _tmp2__target;
			_tmp4_ = self->priv->before;
			if (_tmp3_ (key, _tmp4_, _tmp3__target) < 0) {
				_tmp0_ = 0;
			} else {
				_tmp0_ = 1;
			}
			result = _tmp0_;
			return result;
		}
		case GEE_TREE_MAP_RANGE_TYPE_TAIL:
		{
			gint _tmp5_ = 0;
			GeeTreeMap* _tmp6_;
			GCompareDataFunc _tmp7_ = NULL;
			gpointer _tmp7__target = NULL;
			GCompareDataFunc _tmp8_;
			gpointer _tmp8__target;
			gconstpointer _tmp9_;
			_tmp6_ = self->priv->map;
			_tmp7_ = gee_tree_map_get_key_compare_func (_tmp6_, &_tmp7__target);
			_tmp8_ = _tmp7_;
			_tmp8__target = _tmp7__target;
			_tmp9_ = self->priv->after;
			if (_tmp8_ (key, _tmp9_, _tmp8__target) >= 0) {
				_tmp5_ = 0;
			} else {
				_tmp5_ = -1;
			}
			result = _tmp5_;
			return result;
		}
		case GEE_TREE_MAP_RANGE_TYPE_EMPTY:
		{
			result = 0;
			return result;
		}
		case GEE_TREE_MAP_RANGE_TYPE_BOUNDED:
		{
			gint _tmp10_ = 0;
			GeeTreeMap* _tmp11_;
			GCompareDataFunc _tmp12_ = NULL;
			gpointer _tmp12__target = NULL;
			GCompareDataFunc _tmp13_;
			gpointer _tmp13__target;
			gconstpointer _tmp14_;
			_tmp11_ = self->priv->map;
			_tmp12_ = gee_tree_map_get_key_compare_func (_tmp11_, &_tmp12__target);
			_tmp13_ = _tmp12_;
			_tmp13__target = _tmp12__target;
			_tmp14_ = self->priv->after;
			if (_tmp13_ (key, _tmp14_, _tmp13__target) >= 0) {
				gint _tmp15_ = 0;
				GeeTreeMap* _tmp16_;
				GCompareDataFunc _tmp17_ = NULL;
				gpointer _tmp17__target = NULL;
				GCompareDataFunc _tmp18_;
				gpointer _tmp18__target;
				gconstpointer _tmp19_;
				_tmp16_ = self->priv->map;
				_tmp17_ = gee_tree_map_get_key_compare_func (_tmp16_, &_tmp17__target);
				_tmp18_ = _tmp17_;
				_tmp18__target = _tmp17__target;
				_tmp19_ = self->priv->before;
				if (_tmp18_ (key, _tmp19_, _tmp18__target) < 0) {
					_tmp15_ = 0;
				} else {
					_tmp15_ = 1;
				}
				_tmp10_ = _tmp15_;
			} else {
				_tmp10_ = -1;
			}
			result = _tmp10_;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

static gboolean
gee_tree_map_range_empty_submap (GeeTreeMapRange* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	switch (self->priv->type) {
		case GEE_TREE_MAP_RANGE_TYPE_HEAD:
		{
			gboolean _tmp0_ = FALSE;
			GeeTreeMap* _tmp1_;
			GeeTreeMapNode* _tmp2_;
			_tmp1_ = self->priv->map;
			_tmp2_ = _tmp1_->priv->first;
			if (_tmp2_ == NULL) {
				_tmp0_ = TRUE;
			} else {
				GeeTreeMap* _tmp3_;
				GeeTreeMapNode* _tmp4_;
				gconstpointer _tmp5_;
				_tmp3_ = self->priv->map;
				_tmp4_ = _tmp3_->priv->first;
				_tmp5_ = _tmp4_->key;
				_tmp0_ = !gee_tree_map_range_in_range (self, _tmp5_);
			}
			result = _tmp0_;
			return result;
		}
		case GEE_TREE_MAP_RANGE_TYPE_TAIL:
		{
			gboolean _tmp6_ = FALSE;
			GeeTreeMap* _tmp7_;
			GeeTreeMapNode* _tmp8_;
			_tmp7_ = self->priv->map;
			_tmp8_ = _tmp7_->priv->last;
			if (_tmp8_ == NULL) {
				_tmp6_ = TRUE;
			} else {
				GeeTreeMap* _tmp9_;
				GeeTreeMapNode* _tmp10_;
				gconstpointer _tmp11_;
				_tmp9_ = self->priv->map;
				_tmp10_ = _tmp9_->priv->last;
				_tmp11_ = _tmp10_->key;
				_tmp6_ = !gee_tree_map_range_in_range (self, _tmp11_);
			}
			result = _tmp6_;
			return result;
		}
		case GEE_TREE_MAP_RANGE_TYPE_EMPTY:
		{
			result = TRUE;
			return result;
		}
		case GEE_TREE_MAP_RANGE_TYPE_BOUNDED:
		{
			GeeTreeMapNode* _tmp12_;
			_tmp12_ = gee_tree_map_range_first (self);
			result = _tmp12_ == NULL;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

static GeeTreeMapNode*
gee_tree_map_range_first (GeeTreeMapRange* self)
{
	GeeTreeMapNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	switch (self->priv->type) {
		case GEE_TREE_MAP_RANGE_TYPE_EMPTY:
		{
			result = NULL;
			return result;
		}
		case GEE_TREE_MAP_RANGE_TYPE_HEAD:
		{
			GeeTreeMap* _tmp0_;
			GeeTreeMapNode* _tmp1_;
			_tmp0_ = self->priv->map;
			_tmp1_ = _tmp0_->priv->first;
			result = _tmp1_;
			return result;
		}
		default:
		{
			GeeTreeMap* _tmp2_;
			gconstpointer _tmp3_;
			GeeTreeMapNode* _tmp4_;
			_tmp2_ = self->priv->map;
			_tmp3_ = self->priv->after;
			_tmp4_ = gee_tree_map_find_floor (_tmp2_, _tmp3_);
			result = _tmp4_;
			return result;
		}
	}
}

static GeeTreeMapNode*
gee_tree_map_range_last (GeeTreeMapRange* self)
{
	GeeTreeMapNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	switch (self->priv->type) {
		case GEE_TREE_MAP_RANGE_TYPE_EMPTY:
		{
			result = NULL;
			return result;
		}
		case GEE_TREE_MAP_RANGE_TYPE_TAIL:
		{
			GeeTreeMap* _tmp0_;
			GeeTreeMapNode* _tmp1_;
			_tmp0_ = self->priv->map;
			_tmp1_ = _tmp0_->priv->last;
			result = _tmp1_;
			return result;
		}
		default:
		{
			GeeTreeMap* _tmp2_;
			gconstpointer _tmp3_;
			GeeTreeMapNode* _tmp4_;
			_tmp2_ = self->priv->map;
			_tmp3_ = self->priv->before;
			_tmp4_ = gee_tree_map_find_lower (_tmp2_, _tmp3_);
			result = _tmp4_;
			return result;
		}
	}
}

static void
gee_tree_map_value_range_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
gee_tree_map_value_range_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		gee_tree_map_range_unref (value->data[0].v_pointer);
	}
}

static void
gee_tree_map_value_range_copy_value (const GValue* src_value,
                                     GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = gee_tree_map_range_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
gee_tree_map_value_range_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
gee_tree_map_value_range_collect_value (GValue* value,
                                        guint n_collect_values,
                                        GTypeCValue* collect_values,
                                        guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		GeeTreeMapRange * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = gee_tree_map_range_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
gee_tree_map_value_range_lcopy_value (const GValue* value,
                                      guint n_collect_values,
                                      GTypeCValue* collect_values,
                                      guint collect_flags)
{
	GeeTreeMapRange ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = gee_tree_map_range_ref (value->data[0].v_pointer);
	}
	return NULL;
}

static GParamSpec*
gee_tree_map_param_spec_range (const gchar* name,
                               const gchar* nick,
                               const gchar* blurb,
                               GType object_type,
                               GParamFlags flags)
{
	GeeTreeMapParamSpecRange* spec;
	g_return_val_if_fail (g_type_is_a (object_type, GEE_TREE_MAP_TYPE_RANGE), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

static gpointer
gee_tree_map_value_get_range (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GEE_TREE_MAP_TYPE_RANGE), NULL);
	return value->data[0].v_pointer;
}

static void
gee_tree_map_value_set_range (GValue* value,
                              gpointer v_object)
{
	GeeTreeMapRange * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GEE_TREE_MAP_TYPE_RANGE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GEE_TREE_MAP_TYPE_RANGE));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		gee_tree_map_range_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		gee_tree_map_range_unref (old);
	}
}

static void
gee_tree_map_value_take_range (GValue* value,
                               gpointer v_object)
{
	GeeTreeMapRange * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GEE_TREE_MAP_TYPE_RANGE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GEE_TREE_MAP_TYPE_RANGE));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		gee_tree_map_range_unref (old);
	}
}

static void
gee_tree_map_range_class_init (GeeTreeMapRangeClass * klass,
                               gpointer klass_data)
{
	gee_tree_map_range_parent_class = g_type_class_peek_parent (klass);
	((GeeTreeMapRangeClass *) klass)->finalize = gee_tree_map_range_finalize;
	g_type_class_adjust_private_offset (klass, &GeeTreeMapRange_private_offset);
}

static void
gee_tree_map_range_instance_init (GeeTreeMapRange * self,
                                  gpointer klass)
{
	self->priv = gee_tree_map_range_get_instance_private (self);
	self->ref_count = 1;
}

static void
gee_tree_map_range_finalize (GeeTreeMapRange * obj)
{
	GeeTreeMapRange * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TREE_MAP_TYPE_RANGE, GeeTreeMapRange);
	g_signal_handlers_destroy (self);
	_g_object_unref0 (self->priv->map);
	((self->priv->after == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (self->priv->after = (self->priv->k_destroy_func (self->priv->after), NULL));
	((self->priv->before == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (self->priv->before = (self->priv->k_destroy_func (self->priv->before), NULL));
}

static GType
gee_tree_map_range_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { gee_tree_map_value_range_init, gee_tree_map_value_range_free_value, gee_tree_map_value_range_copy_value, gee_tree_map_value_range_peek_pointer, "p", gee_tree_map_value_range_collect_value, "p", gee_tree_map_value_range_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapRangeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_range_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapRange), 0, (GInstanceInitFunc) gee_tree_map_range_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType gee_tree_map_range_type_id;
	gee_tree_map_range_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GeeTreeMapRange", &g_define_type_info, &g_define_type_fundamental_info, 0);
	GeeTreeMapRange_private_offset = g_type_add_instance_private (gee_tree_map_range_type_id, sizeof (GeeTreeMapRangePrivate));
	return gee_tree_map_range_type_id;
}

static GType
gee_tree_map_range_get_type (void)
{
	static volatile gsize gee_tree_map_range_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_range_type_id__once)) {
		GType gee_tree_map_range_type_id;
		gee_tree_map_range_type_id = gee_tree_map_range_get_type_once ();
		g_once_init_leave (&gee_tree_map_range_type_id__once, gee_tree_map_range_type_id);
	}
	return gee_tree_map_range_type_id__once;
}

static gpointer
gee_tree_map_range_ref (gpointer instance)
{
	GeeTreeMapRange * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

static void
gee_tree_map_range_unref (gpointer instance)
{
	GeeTreeMapRange * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		GEE_TREE_MAP_RANGE_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static inline gpointer
gee_tree_map_sub_map_get_instance_private (GeeTreeMapSubMap* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapSubMap_private_offset);
}

static GeeTreeMapSubMap*
gee_tree_map_sub_map_construct (GType object_type,
                                GType k_type,
                                GBoxedCopyFunc k_dup_func,
                                GDestroyNotify k_destroy_func,
                                GType v_type,
                                GBoxedCopyFunc v_dup_func,
                                GDestroyNotify v_destroy_func,
                                GeeTreeMap* map,
                                GeeTreeMapRange* range)
{
	GeeTreeMapSubMap * self = NULL;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (range != NULL, NULL);
	self = (GeeTreeMapSubMap*) gee_abstract_bidir_sorted_map_construct (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = _g_object_ref0 (map);
	_g_object_unref0 (self->priv->map);
	self->priv->map = _tmp0_;
	_tmp1_ = _gee_tree_map_range_ref0 (range);
	_gee_tree_map_range_unref0 (self->priv->range);
	self->priv->range = _tmp1_;
	return self;
}

static GeeTreeMapSubMap*
gee_tree_map_sub_map_new (GType k_type,
                          GBoxedCopyFunc k_dup_func,
                          GDestroyNotify k_destroy_func,
                          GType v_type,
                          GBoxedCopyFunc v_dup_func,
                          GDestroyNotify v_destroy_func,
                          GeeTreeMap* map,
                          GeeTreeMapRange* range)
{
	return gee_tree_map_sub_map_construct (GEE_TREE_MAP_TYPE_SUB_MAP, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, range);
}

static gboolean
gee_tree_map_sub_map_real_has_key (GeeAbstractMap* base,
                                   gconstpointer key)
{
	GeeTreeMapSubMap * self;
	gboolean _tmp0_ = FALSE;
	GeeTreeMapRange* _tmp1_;
	gboolean result;
	self = (GeeTreeMapSubMap*) base;
	_tmp1_ = self->priv->range;
	if (gee_tree_map_range_in_range (_tmp1_, key)) {
		GeeTreeMap* _tmp2_;
		_tmp2_ = self->priv->map;
		_tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp2_, key);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gboolean
gee_tree_map_sub_map_real_has (GeeAbstractMap* base,
                               gconstpointer key,
                               gconstpointer value)
{
	GeeTreeMapSubMap * self;
	gboolean _tmp0_ = FALSE;
	GeeTreeMapRange* _tmp1_;
	gboolean result;
	self = (GeeTreeMapSubMap*) base;
	_tmp1_ = self->priv->range;
	if (gee_tree_map_range_in_range (_tmp1_, key)) {
		GeeTreeMap* _tmp2_;
		_tmp2_ = self->priv->map;
		_tmp0_ = gee_abstract_map_has ((GeeAbstractMap*) _tmp2_, key, value);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gpointer
gee_tree_map_sub_map_real_get (GeeAbstractMap* base,
                               gconstpointer key)
{
	GeeTreeMapSubMap * self;
	gpointer _tmp0_ = NULL;
	GeeTreeMapRange* _tmp1_;
	gpointer result;
	self = (GeeTreeMapSubMap*) base;
	_tmp1_ = self->priv->range;
	if (gee_tree_map_range_in_range (_tmp1_, key)) {
		GeeTreeMap* _tmp2_;
		gpointer _tmp3_;
		_tmp2_ = self->priv->map;
		_tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp2_, key);
		((_tmp0_ == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_tmp0_ = (self->priv->v_destroy_func (_tmp0_), NULL));
		_tmp0_ = _tmp3_;
	} else {
		((_tmp0_ == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_tmp0_ = (self->priv->v_destroy_func (_tmp0_), NULL));
		_tmp0_ = NULL;
	}
	result = _tmp0_;
	return result;
}

static void
gee_tree_map_sub_map_real_set (GeeAbstractMap* base,
                               gconstpointer key,
                               gconstpointer value)
{
	GeeTreeMapSubMap * self;
	GeeTreeMapRange* _tmp0_;
	self = (GeeTreeMapSubMap*) base;
	_tmp0_ = self->priv->range;
	if (gee_tree_map_range_in_range (_tmp0_, key)) {
		GeeTreeMap* _tmp1_;
		_tmp1_ = self->priv->map;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp1_, key, value);
	}
}

static gboolean
gee_tree_map_sub_map_real_unset (GeeAbstractMap* base,
                                 gconstpointer key,
                                 gpointer* value)
{
	GeeTreeMapSubMap * self;
	gpointer _vala_value = NULL;
	gboolean _tmp0_ = FALSE;
	GeeTreeMapRange* _tmp1_;
	gboolean result;
	self = (GeeTreeMapSubMap*) base;
	((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
	_vala_value = NULL;
	_tmp1_ = self->priv->range;
	if (gee_tree_map_range_in_range (_tmp1_, key)) {
		GeeTreeMap* _tmp2_;
		gpointer _tmp3_ = NULL;
		gboolean _tmp4_;
		_tmp2_ = self->priv->map;
		_tmp4_ = gee_abstract_map_unset ((GeeAbstractMap*) _tmp2_, key, &_tmp3_);
		((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
		_vala_value = _tmp3_;
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	if (value) {
		*value = _vala_value;
	} else {
		((_vala_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_vala_value = (self->priv->v_destroy_func (_vala_value), NULL));
	}
	return result;
}

static void
gee_tree_map_sub_map_real_clear (GeeAbstractMap* base)
{
	GeeTreeMapSubMap * self;
	self = (GeeTreeMapSubMap*) base;
	{
		GeeMapIterator* iterator = NULL;
		GeeMapIterator* _tmp0_;
		_tmp0_ = gee_abstract_map_map_iterator ((GeeAbstractMap*) self);
		iterator = _tmp0_;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				GeeMapIterator* _tmp2_;
				GeeMapIterator* _tmp3_;
				if (!_tmp1_) {
				}
				_tmp1_ = FALSE;
				_tmp2_ = iterator;
				if (!gee_map_iterator_next (_tmp2_)) {
					break;
				}
				_tmp3_ = iterator;
				gee_map_iterator_unset (_tmp3_);
			}
		}
		_g_object_unref0 (iterator);
	}
}

static GeeMapIterator*
gee_tree_map_sub_map_real_map_iterator (GeeAbstractMap* base)
{
	GeeTreeMapSubMap * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapSubMapIterator* _tmp2_;
	GeeMapIterator* result;
	self = (GeeTreeMapSubMap*) base;
	_tmp0_ = self->priv->map;
	_tmp1_ = self->priv->range;
	_tmp2_ = gee_tree_map_sub_map_iterator_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp1_);
	result = (GeeMapIterator*) _tmp2_;
	return result;
}

static GeeBidirMapIterator*
gee_tree_map_sub_map_real_bidir_map_iterator (GeeAbstractBidirSortedMap* base)
{
	GeeTreeMapSubMap * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapSubMapIterator* _tmp2_;
	GeeBidirMapIterator* result;
	self = (GeeTreeMapSubMap*) base;
	_tmp0_ = self->priv->map;
	_tmp1_ = self->priv->range;
	_tmp2_ = gee_tree_map_sub_map_iterator_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp1_);
	result = (GeeBidirMapIterator*) _tmp2_;
	return result;
}

static GeeSortedMap*
gee_tree_map_sub_map_real_head_map (GeeAbstractSortedMap* base,
                                    gconstpointer before)
{
	GeeTreeMapSubMap * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapRange* _tmp2_;
	GeeTreeMapRange* _tmp3_;
	GeeTreeMapSubMap* _tmp4_;
	GeeSortedMap* _tmp5_;
	GeeSortedMap* result;
	self = (GeeTreeMapSubMap*) base;
	_tmp0_ = self->priv->map;
	_tmp1_ = self->priv->range;
	_tmp2_ = gee_tree_map_range_cut_tail (_tmp1_, before);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_tree_map_sub_map_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp3_);
	_tmp5_ = (GeeSortedMap*) _tmp4_;
	_gee_tree_map_range_unref0 (_tmp3_);
	result = _tmp5_;
	return result;
}

static GeeSortedMap*
gee_tree_map_sub_map_real_tail_map (GeeAbstractSortedMap* base,
                                    gconstpointer after)
{
	GeeTreeMapSubMap * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapRange* _tmp2_;
	GeeTreeMapRange* _tmp3_;
	GeeTreeMapSubMap* _tmp4_;
	GeeSortedMap* _tmp5_;
	GeeSortedMap* result;
	self = (GeeTreeMapSubMap*) base;
	_tmp0_ = self->priv->map;
	_tmp1_ = self->priv->range;
	_tmp2_ = gee_tree_map_range_cut_head (_tmp1_, after);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_tree_map_sub_map_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp3_);
	_tmp5_ = (GeeSortedMap*) _tmp4_;
	_gee_tree_map_range_unref0 (_tmp3_);
	result = _tmp5_;
	return result;
}

static GeeSortedMap*
gee_tree_map_sub_map_real_sub_map (GeeAbstractSortedMap* base,
                                   gconstpointer after,
                                   gconstpointer before)
{
	GeeTreeMapSubMap * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapRange* _tmp2_;
	GeeTreeMapRange* _tmp3_;
	GeeTreeMapSubMap* _tmp4_;
	GeeSortedMap* _tmp5_;
	GeeSortedMap* result;
	self = (GeeTreeMapSubMap*) base;
	_tmp0_ = self->priv->map;
	_tmp1_ = self->priv->range;
	_tmp2_ = gee_tree_map_range_cut (_tmp1_, after, before);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_tree_map_sub_map_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp3_);
	_tmp5_ = (GeeSortedMap*) _tmp4_;
	_gee_tree_map_range_unref0 (_tmp3_);
	result = _tmp5_;
	return result;
}

static gint
gee_tree_map_sub_map_real_get_size (GeeAbstractMap* base)
{
	gint result;
	GeeTreeMapSubMap* self;
	GeeSet* _tmp0_;
	GeeSet* _tmp1_;
	GeeSet* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	self = (GeeTreeMapSubMap*) base;
	_tmp0_ = gee_abstract_map_get_keys ((GeeAbstractMap*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp2_);
	result = _tmp5_;
	return result;
}

static gboolean
gee_tree_map_sub_map_get_is_empty (GeeTreeMapSubMap* self)
{
	gboolean result;
	GeeSet* _tmp0_;
	GeeSet* _tmp1_;
	GeeSet* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = gee_abstract_map_get_keys ((GeeAbstractMap*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_collection_get_is_empty ((GeeCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp2_);
	result = _tmp5_;
	return result;
}

static GeeSet*
gee_tree_map_sub_map_real_get_keys (GeeAbstractMap* base)
{
	GeeSet* result;
	GeeTreeMapSubMap* self;
	GeeSortedSet* keys = NULL;
	GeeSortedSet* _tmp0_;
	GeeSortedSet* _tmp1_;
	GeeSortedSet* _tmp2_;
	self = (GeeTreeMapSubMap*) base;
	_tmp0_ = self->priv->_keys;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	keys = _tmp1_;
	_tmp2_ = self->priv->_keys;
	if (_tmp2_ == NULL) {
		GeeTreeMap* _tmp3_;
		GeeTreeMapRange* _tmp4_;
		GeeTreeMapSubKeySet* _tmp5_;
		GeeSortedSet* _tmp6_;
		GeeSortedSet* _tmp7_;
		_tmp3_ = self->priv->map;
		_tmp4_ = self->priv->range;
		_tmp5_ = gee_tree_map_sub_key_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp3_, _tmp4_);
		_g_object_unref0 (keys);
		keys = (GeeSortedSet*) _tmp5_;
		_tmp6_ = keys;
		self->priv->_keys = _tmp6_;
		_tmp7_ = keys;
		g_object_add_weak_pointer ((GObject*) _tmp7_, &self->priv->_keys);
	}
	result = (GeeSet*) keys;
	return result;
}

static GeeCollection*
gee_tree_map_sub_map_real_get_values (GeeAbstractMap* base)
{
	GeeCollection* result;
	GeeTreeMapSubMap* self;
	GeeCollection* values = NULL;
	GeeCollection* _tmp0_;
	GeeCollection* _tmp1_;
	GeeCollection* _tmp2_;
	self = (GeeTreeMapSubMap*) base;
	_tmp0_ = self->priv->_values;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	values = _tmp1_;
	_tmp2_ = self->priv->_values;
	if (_tmp2_ == NULL) {
		GeeTreeMap* _tmp3_;
		GeeTreeMapRange* _tmp4_;
		GeeTreeMapSubValueCollection* _tmp5_;
		GeeCollection* _tmp6_;
		GeeCollection* _tmp7_;
		_tmp3_ = self->priv->map;
		_tmp4_ = self->priv->range;
		_tmp5_ = gee_tree_map_sub_value_collection_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp3_, _tmp4_);
		_g_object_unref0 (values);
		values = (GeeCollection*) _tmp5_;
		_tmp6_ = values;
		self->priv->_values = _tmp6_;
		_tmp7_ = values;
		g_object_add_weak_pointer ((GObject*) _tmp7_, &self->priv->_values);
	}
	result = values;
	return result;
}

static GeeSet*
gee_tree_map_sub_map_real_get_entries (GeeAbstractMap* base)
{
	GeeSet* result;
	GeeTreeMapSubMap* self;
	GeeSortedSet* entries = NULL;
	GeeSortedSet* _tmp0_;
	GeeSortedSet* _tmp1_;
	GeeSortedSet* _tmp2_;
	self = (GeeTreeMapSubMap*) base;
	_tmp0_ = self->priv->_entries;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	entries = _tmp1_;
	_tmp2_ = self->priv->_entries;
	if (_tmp2_ == NULL) {
		GeeTreeMap* _tmp3_;
		GeeTreeMapRange* _tmp4_;
		GeeTreeMapSubEntrySet* _tmp5_;
		GeeSortedSet* _tmp6_;
		GeeSortedSet* _tmp7_;
		_tmp3_ = self->priv->map;
		_tmp4_ = self->priv->range;
		_tmp5_ = gee_tree_map_sub_entry_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp3_, _tmp4_);
		_g_object_unref0 (entries);
		entries = (GeeSortedSet*) _tmp5_;
		_tmp6_ = entries;
		self->priv->_entries = _tmp6_;
		_tmp7_ = entries;
		g_object_add_weak_pointer ((GObject*) _tmp7_, &self->priv->_entries);
	}
	result = (GeeSet*) entries;
	return result;
}

static gboolean
gee_tree_map_sub_map_real_get_read_only (GeeAbstractMap* base)
{
	gboolean result;
	GeeTreeMapSubMap* self;
	self = (GeeTreeMapSubMap*) base;
	result = TRUE;
	return result;
}

static GeeSortedSet*
gee_tree_map_sub_map_real_get_ascending_keys (GeeAbstractSortedMap* base)
{
	GeeSortedSet* result;
	GeeTreeMapSubMap* self;
	GeeSortedSet* keys = NULL;
	GeeSortedSet* _tmp0_;
	GeeSortedSet* _tmp1_;
	GeeSortedSet* _tmp2_;
	self = (GeeTreeMapSubMap*) base;
	_tmp0_ = self->priv->_keys;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	keys = _tmp1_;
	_tmp2_ = self->priv->_keys;
	if (_tmp2_ == NULL) {
		GeeTreeMap* _tmp3_;
		GeeTreeMapRange* _tmp4_;
		GeeTreeMapSubKeySet* _tmp5_;
		GeeSortedSet* _tmp6_;
		GeeSortedSet* _tmp7_;
		_tmp3_ = self->priv->map;
		_tmp4_ = self->priv->range;
		_tmp5_ = gee_tree_map_sub_key_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp3_, _tmp4_);
		_g_object_unref0 (keys);
		keys = (GeeSortedSet*) _tmp5_;
		_tmp6_ = keys;
		self->priv->_keys = _tmp6_;
		_tmp7_ = keys;
		g_object_add_weak_pointer ((GObject*) _tmp7_, &self->priv->_keys);
	}
	result = keys;
	return result;
}

static GeeSortedSet*
gee_tree_map_sub_map_real_get_ascending_entries (GeeAbstractSortedMap* base)
{
	GeeSortedSet* result;
	GeeTreeMapSubMap* self;
	GeeSortedSet* entries = NULL;
	GeeSortedSet* _tmp0_;
	GeeSortedSet* _tmp1_;
	GeeSortedSet* _tmp2_;
	GeeSortedSet* _tmp8_;
	GeeSortedSet* _tmp9_;
	self = (GeeTreeMapSubMap*) base;
	_tmp0_ = self->priv->_entries;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	entries = _tmp1_;
	_tmp2_ = self->priv->_entries;
	if (_tmp2_ == NULL) {
		GeeTreeMap* _tmp3_;
		GeeTreeMapRange* _tmp4_;
		GeeTreeMapSubEntrySet* _tmp5_;
		GeeSortedSet* _tmp6_;
		GeeSortedSet* _tmp7_;
		_tmp3_ = self->priv->map;
		_tmp4_ = self->priv->range;
		_tmp5_ = gee_tree_map_sub_entry_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp3_, _tmp4_);
		_g_object_unref0 (entries);
		entries = (GeeSortedSet*) _tmp5_;
		_tmp6_ = entries;
		self->priv->_entries = _tmp6_;
		_tmp7_ = entries;
		g_object_add_weak_pointer ((GObject*) _tmp7_, &self->priv->_entries);
	}
	_tmp8_ = self->priv->_entries;
	_tmp9_ = _g_object_ref0 (_tmp8_);
	result = _tmp9_;
	_g_object_unref0 (entries);
	return result;
}

static void
gee_tree_map_sub_map_class_init (GeeTreeMapSubMapClass * klass,
                                 gpointer klass_data)
{
	gee_tree_map_sub_map_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapSubMap_private_offset);
	((GeeAbstractMapClass *) klass)->has_key = (gboolean (*) (GeeAbstractMap*, gconstpointer)) gee_tree_map_sub_map_real_has_key;
	((GeeAbstractMapClass *) klass)->has = (gboolean (*) (GeeAbstractMap*, gconstpointer, gconstpointer)) gee_tree_map_sub_map_real_has;
	((GeeAbstractMapClass *) klass)->get = (gpointer (*) (GeeAbstractMap*, gconstpointer)) gee_tree_map_sub_map_real_get;
	((GeeAbstractMapClass *) klass)->set = (void (*) (GeeAbstractMap*, gconstpointer, gconstpointer)) gee_tree_map_sub_map_real_set;
	((GeeAbstractMapClass *) klass)->unset = (gboolean (*) (GeeAbstractMap*, gconstpointer, gpointer*)) gee_tree_map_sub_map_real_unset;
	((GeeAbstractMapClass *) klass)->clear = (void (*) (GeeAbstractMap*)) gee_tree_map_sub_map_real_clear;
	((GeeAbstractMapClass *) klass)->map_iterator = (GeeMapIterator* (*) (GeeAbstractMap*)) gee_tree_map_sub_map_real_map_iterator;
	((GeeAbstractBidirSortedMapClass *) klass)->bidir_map_iterator = (GeeBidirMapIterator* (*) (GeeAbstractBidirSortedMap*)) gee_tree_map_sub_map_real_bidir_map_iterator;
	((GeeAbstractSortedMapClass *) klass)->head_map = (GeeSortedMap* (*) (GeeAbstractSortedMap*, gconstpointer)) gee_tree_map_sub_map_real_head_map;
	((GeeAbstractSortedMapClass *) klass)->tail_map = (GeeSortedMap* (*) (GeeAbstractSortedMap*, gconstpointer)) gee_tree_map_sub_map_real_tail_map;
	((GeeAbstractSortedMapClass *) klass)->sub_map = (GeeSortedMap* (*) (GeeAbstractSortedMap*, gconstpointer, gconstpointer)) gee_tree_map_sub_map_real_sub_map;
	GEE_ABSTRACT_MAP_CLASS (klass)->get_size = gee_tree_map_sub_map_real_get_size;
	GEE_ABSTRACT_MAP_CLASS (klass)->get_keys = gee_tree_map_sub_map_real_get_keys;
	GEE_ABSTRACT_MAP_CLASS (klass)->get_values = gee_tree_map_sub_map_real_get_values;
	GEE_ABSTRACT_MAP_CLASS (klass)->get_entries = gee_tree_map_sub_map_real_get_entries;
	GEE_ABSTRACT_MAP_CLASS (klass)->get_read_only = gee_tree_map_sub_map_real_get_read_only;
	GEE_ABSTRACT_SORTED_MAP_CLASS (klass)->get_ascending_keys = gee_tree_map_sub_map_real_get_ascending_keys;
	GEE_ABSTRACT_SORTED_MAP_CLASS (klass)->get_ascending_entries = gee_tree_map_sub_map_real_get_ascending_entries;
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_sub_map_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_sub_map_set_property;
	G_OBJECT_CLASS (klass)->finalize = gee_tree_map_sub_map_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_SIZE_PROPERTY, gee_tree_map_sub_map_properties[GEE_TREE_MAP_SUB_MAP_SIZE_PROPERTY] = g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_IS_EMPTY_PROPERTY, gee_tree_map_sub_map_properties[GEE_TREE_MAP_SUB_MAP_IS_EMPTY_PROPERTY] = g_param_spec_boolean ("is-empty", "is-empty", "is-empty", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_KEYS_PROPERTY, gee_tree_map_sub_map_properties[GEE_TREE_MAP_SUB_MAP_KEYS_PROPERTY] = g_param_spec_object ("keys", "keys", "keys", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_VALUES_PROPERTY, gee_tree_map_sub_map_properties[GEE_TREE_MAP_SUB_MAP_VALUES_PROPERTY] = g_param_spec_object ("values", "values", "values", GEE_TYPE_COLLECTION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_ENTRIES_PROPERTY, gee_tree_map_sub_map_properties[GEE_TREE_MAP_SUB_MAP_ENTRIES_PROPERTY] = g_param_spec_object ("entries", "entries", "entries", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_READ_ONLY_PROPERTY, gee_tree_map_sub_map_properties[GEE_TREE_MAP_SUB_MAP_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_ASCENDING_KEYS_PROPERTY, gee_tree_map_sub_map_properties[GEE_TREE_MAP_SUB_MAP_ASCENDING_KEYS_PROPERTY] = g_param_spec_object ("ascending-keys", "ascending-keys", "ascending-keys", GEE_TYPE_SORTED_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_ASCENDING_ENTRIES_PROPERTY, gee_tree_map_sub_map_properties[GEE_TREE_MAP_SUB_MAP_ASCENDING_ENTRIES_PROPERTY] = g_param_spec_object ("ascending-entries", "ascending-entries", "ascending-entries", GEE_TYPE_SORTED_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gee_tree_map_sub_map_instance_init (GeeTreeMapSubMap * self,
                                    gpointer klass)
{
	self->priv = gee_tree_map_sub_map_get_instance_private (self);
}

static void
gee_tree_map_sub_map_finalize (GObject * obj)
{
	GeeTreeMapSubMap * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TREE_MAP_TYPE_SUB_MAP, GeeTreeMapSubMap);
	_g_object_unref0 (self->priv->map);
	_gee_tree_map_range_unref0 (self->priv->range);
	G_OBJECT_CLASS (gee_tree_map_sub_map_parent_class)->finalize (obj);
}

static GType
gee_tree_map_sub_map_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapSubMapClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_sub_map_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapSubMap), 0, (GInstanceInitFunc) gee_tree_map_sub_map_instance_init, NULL };
	GType gee_tree_map_sub_map_type_id;
	gee_tree_map_sub_map_type_id = g_type_register_static (GEE_TYPE_ABSTRACT_BIDIR_SORTED_MAP, "GeeTreeMapSubMap", &g_define_type_info, 0);
	GeeTreeMapSubMap_private_offset = g_type_add_instance_private (gee_tree_map_sub_map_type_id, sizeof (GeeTreeMapSubMapPrivate));
	return gee_tree_map_sub_map_type_id;
}

static GType
gee_tree_map_sub_map_get_type (void)
{
	static volatile gsize gee_tree_map_sub_map_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_sub_map_type_id__once)) {
		GType gee_tree_map_sub_map_type_id;
		gee_tree_map_sub_map_type_id = gee_tree_map_sub_map_get_type_once ();
		g_once_init_leave (&gee_tree_map_sub_map_type_id__once, gee_tree_map_sub_map_type_id);
	}
	return gee_tree_map_sub_map_type_id__once;
}

static void
_vala_gee_tree_map_sub_map_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	GeeTreeMapSubMap * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_MAP, GeeTreeMapSubMap);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_MAP_SIZE_PROPERTY:
		g_value_set_int (value, gee_abstract_map_get_size ((GeeAbstractMap*) self));
		break;
		case GEE_TREE_MAP_SUB_MAP_IS_EMPTY_PROPERTY:
		g_value_set_boolean (value, gee_tree_map_sub_map_get_is_empty (self));
		break;
		case GEE_TREE_MAP_SUB_MAP_KEYS_PROPERTY:
		g_value_take_object (value, gee_abstract_map_get_keys ((GeeAbstractMap*) self));
		break;
		case GEE_TREE_MAP_SUB_MAP_VALUES_PROPERTY:
		g_value_take_object (value, gee_abstract_map_get_values ((GeeAbstractMap*) self));
		break;
		case GEE_TREE_MAP_SUB_MAP_ENTRIES_PROPERTY:
		g_value_take_object (value, gee_abstract_map_get_entries ((GeeAbstractMap*) self));
		break;
		case GEE_TREE_MAP_SUB_MAP_READ_ONLY_PROPERTY:
		g_value_set_boolean (value, gee_abstract_map_get_read_only ((GeeAbstractMap*) self));
		break;
		case GEE_TREE_MAP_SUB_MAP_ASCENDING_KEYS_PROPERTY:
		g_value_take_object (value, gee_abstract_sorted_map_get_ascending_keys ((GeeAbstractSortedMap*) self));
		break;
		case GEE_TREE_MAP_SUB_MAP_ASCENDING_ENTRIES_PROPERTY:
		g_value_take_object (value, gee_abstract_sorted_map_get_ascending_entries ((GeeAbstractSortedMap*) self));
		break;
		case GEE_TREE_MAP_SUB_MAP_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_SUB_MAP_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_SUB_MAP_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_SUB_MAP_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_SUB_MAP_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_SUB_MAP_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_sub_map_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	GeeTreeMapSubMap * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_MAP, GeeTreeMapSubMap);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_MAP_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_MAP_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_MAP_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_MAP_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_MAP_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_MAP_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_key_set_get_instance_private (GeeTreeMapKeySet* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapKeySet_private_offset);
}

static GeeTreeMapKeySet*
gee_tree_map_key_set_construct (GType object_type,
                                GType k_type,
                                GBoxedCopyFunc k_dup_func,
                                GDestroyNotify k_destroy_func,
                                GType v_type,
                                GBoxedCopyFunc v_dup_func,
                                GDestroyNotify v_destroy_func,
                                GeeTreeMap* map)
{
	GeeTreeMapKeySet * self = NULL;
	GeeTreeMap* _tmp0_;
	g_return_val_if_fail (map != NULL, NULL);
	self = (GeeTreeMapKeySet*) gee_abstract_bidir_sorted_set_construct (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = _g_object_ref0 (map);
	_g_object_unref0 (self->priv->_map);
	self->priv->_map = _tmp0_;
	return self;
}

static GeeTreeMapKeySet*
gee_tree_map_key_set_new (GType k_type,
                          GBoxedCopyFunc k_dup_func,
                          GDestroyNotify k_destroy_func,
                          GType v_type,
                          GBoxedCopyFunc v_dup_func,
                          GDestroyNotify v_destroy_func,
                          GeeTreeMap* map)
{
	return gee_tree_map_key_set_construct (GEE_TREE_MAP_TYPE_KEY_SET, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map);
}

static GeeIterator*
gee_tree_map_key_set_real_iterator (GeeAbstractCollection* base)
{
	GeeTreeMapKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapKeyIterator* _tmp1_;
	GeeIterator* result;
	self = (GeeTreeMapKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_tree_map_key_iterator_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_);
	result = (GeeIterator*) _tmp1_;
	return result;
}

static gboolean
gee_tree_map_key_set_real_add (GeeAbstractCollection* base,
                               gconstpointer key)
{
	GeeTreeMapKeySet * self;
	self = (GeeTreeMapKeySet*) base;
	g_assert_not_reached ();
}

static void
gee_tree_map_key_set_real_clear (GeeAbstractCollection* base)
{
	GeeTreeMapKeySet * self;
	self = (GeeTreeMapKeySet*) base;
	g_assert_not_reached ();
}

static gboolean
gee_tree_map_key_set_real_remove (GeeAbstractCollection* base,
                                  gconstpointer key)
{
	GeeTreeMapKeySet * self;
	self = (GeeTreeMapKeySet*) base;
	g_assert_not_reached ();
}

static gboolean
gee_tree_map_key_set_real_contains (GeeAbstractCollection* base,
                                    gconstpointer key)
{
	GeeTreeMapKeySet * self;
	GeeTreeMap* _tmp0_;
	gboolean result;
	self = (GeeTreeMapKeySet*) base;
	_tmp0_ = self->priv->_map;
	result = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, key);
	return result;
}

static gpointer
gee_tree_map_key_set_real_first (GeeAbstractSortedSet* base)
{
	GeeTreeMapKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMap* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gconstpointer _tmp4_;
	gpointer _tmp5_;
	gpointer result;
	self = (GeeTreeMapKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = _tmp0_->priv->first;
	_vala_assert (_tmp1_ != NULL, "_map.first != null");
	_tmp2_ = self->priv->_map;
	_tmp3_ = _tmp2_->priv->first;
	_tmp4_ = _tmp3_->key;
	_tmp5_ = ((_tmp4_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp4_) : ((gpointer) _tmp4_);
	result = _tmp5_;
	return result;
}

static gpointer
gee_tree_map_key_set_real_last (GeeAbstractSortedSet* base)
{
	GeeTreeMapKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMap* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gconstpointer _tmp4_;
	gpointer _tmp5_;
	gpointer result;
	self = (GeeTreeMapKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = _tmp0_->priv->last;
	_vala_assert (_tmp1_ != NULL, "_map.last != null");
	_tmp2_ = self->priv->_map;
	_tmp3_ = _tmp2_->priv->last;
	_tmp4_ = _tmp3_->key;
	_tmp5_ = ((_tmp4_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp4_) : ((gpointer) _tmp4_);
	result = _tmp5_;
	return result;
}

static GeeBidirIterator*
gee_tree_map_key_set_real_bidir_iterator (GeeAbstractBidirSortedSet* base)
{
	GeeTreeMapKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapKeyIterator* _tmp1_;
	GeeBidirIterator* result;
	self = (GeeTreeMapKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_tree_map_key_iterator_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_);
	result = (GeeBidirIterator*) _tmp1_;
	return result;
}

static GeeSortedSet*
gee_tree_map_key_set_real_head_set (GeeAbstractSortedSet* base,
                                    gconstpointer before)
{
	GeeTreeMapKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	GeeTreeMapRange* _tmp2_;
	GeeTreeMapRange* _tmp3_;
	GeeTreeMapSubKeySet* _tmp4_;
	GeeSortedSet* _tmp5_;
	GeeSortedSet* result;
	self = (GeeTreeMapKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_map;
	_tmp2_ = gee_tree_map_range_new_head (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp1_, before);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_tree_map_sub_key_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp3_);
	_tmp5_ = (GeeSortedSet*) _tmp4_;
	_gee_tree_map_range_unref0 (_tmp3_);
	result = _tmp5_;
	return result;
}

static GeeSortedSet*
gee_tree_map_key_set_real_tail_set (GeeAbstractSortedSet* base,
                                    gconstpointer after)
{
	GeeTreeMapKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	GeeTreeMapRange* _tmp2_;
	GeeTreeMapRange* _tmp3_;
	GeeTreeMapSubKeySet* _tmp4_;
	GeeSortedSet* _tmp5_;
	GeeSortedSet* result;
	self = (GeeTreeMapKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_map;
	_tmp2_ = gee_tree_map_range_new_tail (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp1_, after);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_tree_map_sub_key_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp3_);
	_tmp5_ = (GeeSortedSet*) _tmp4_;
	_gee_tree_map_range_unref0 (_tmp3_);
	result = _tmp5_;
	return result;
}

static GeeSortedSet*
gee_tree_map_key_set_real_sub_set (GeeAbstractSortedSet* base,
                                   gconstpointer after,
                                   gconstpointer before)
{
	GeeTreeMapKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	GeeTreeMapRange* _tmp2_;
	GeeTreeMapRange* _tmp3_;
	GeeTreeMapSubKeySet* _tmp4_;
	GeeSortedSet* _tmp5_;
	GeeSortedSet* result;
	self = (GeeTreeMapKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_map;
	_tmp2_ = gee_tree_map_range_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp1_, after, before);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_tree_map_sub_key_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp3_);
	_tmp5_ = (GeeSortedSet*) _tmp4_;
	_gee_tree_map_range_unref0 (_tmp3_);
	result = _tmp5_;
	return result;
}

static GeeIterator*
gee_tree_map_key_set_real_iterator_at (GeeAbstractSortedSet* base,
                                       gconstpointer item)
{
	GeeTreeMapKeySet * self;
	GeeTreeMapNode* node = NULL;
	GeeTreeMap* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	GeeTreeMap* _tmp3_;
	GeeTreeMapNode* _tmp4_;
	GeeTreeMapKeyIterator* _tmp5_;
	GeeIterator* result;
	self = (GeeTreeMapKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_tree_map_find_node (_tmp0_, item);
	node = _tmp1_;
	_tmp2_ = node;
	if (_tmp2_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp3_ = self->priv->_map;
	_tmp4_ = node;
	_tmp5_ = gee_tree_map_key_iterator_new_pointing (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp3_, _tmp4_);
	result = (GeeIterator*) _tmp5_;
	return result;
}

static gpointer
gee_tree_map_key_set_real_lower (GeeAbstractSortedSet* base,
                                 gconstpointer item)
{
	GeeTreeMapKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	gpointer _tmp3_;
	gpointer result;
	self = (GeeTreeMapKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_map;
	_tmp2_ = gee_tree_map_find_lower (_tmp1_, item);
	_tmp3_ = gee_tree_map_lift_null_key (_tmp0_, _tmp2_);
	result = _tmp3_;
	return result;
}

static gpointer
gee_tree_map_key_set_real_higher (GeeAbstractSortedSet* base,
                                  gconstpointer item)
{
	GeeTreeMapKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	gpointer _tmp3_;
	gpointer result;
	self = (GeeTreeMapKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_map;
	_tmp2_ = gee_tree_map_find_higher (_tmp1_, item);
	_tmp3_ = gee_tree_map_lift_null_key (_tmp0_, _tmp2_);
	result = _tmp3_;
	return result;
}

static gpointer
gee_tree_map_key_set_real_floor (GeeAbstractSortedSet* base,
                                 gconstpointer item)
{
	GeeTreeMapKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	gpointer _tmp3_;
	gpointer result;
	self = (GeeTreeMapKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_map;
	_tmp2_ = gee_tree_map_find_floor (_tmp1_, item);
	_tmp3_ = gee_tree_map_lift_null_key (_tmp0_, _tmp2_);
	result = _tmp3_;
	return result;
}

static gpointer
gee_tree_map_key_set_real_ceil (GeeAbstractSortedSet* base,
                                gconstpointer item)
{
	GeeTreeMapKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	gpointer _tmp3_;
	gpointer result;
	self = (GeeTreeMapKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_map;
	_tmp2_ = gee_tree_map_find_ceil (_tmp1_, item);
	_tmp3_ = gee_tree_map_lift_null_key (_tmp0_, _tmp2_);
	result = _tmp3_;
	return result;
}

static gint
gee_tree_map_key_set_real_get_size (GeeAbstractCollection* base)
{
	gint result;
	GeeTreeMapKeySet* self;
	GeeTreeMap* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	self = (GeeTreeMapKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_abstract_map_get_size ((GeeAbstractMap*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

static gboolean
gee_tree_map_key_set_real_get_read_only (GeeAbstractCollection* base)
{
	gboolean result;
	GeeTreeMapKeySet* self;
	self = (GeeTreeMapKeySet*) base;
	result = TRUE;
	return result;
}

static void
gee_tree_map_key_set_class_init (GeeTreeMapKeySetClass * klass,
                                 gpointer klass_data)
{
	gee_tree_map_key_set_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapKeySet_private_offset);
	((GeeAbstractCollectionClass *) klass)->iterator = (GeeIterator* (*) (GeeAbstractCollection*)) gee_tree_map_key_set_real_iterator;
	((GeeAbstractCollectionClass *) klass)->add = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_key_set_real_add;
	((GeeAbstractCollectionClass *) klass)->clear = (void (*) (GeeAbstractCollection*)) gee_tree_map_key_set_real_clear;
	((GeeAbstractCollectionClass *) klass)->remove = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_key_set_real_remove;
	((GeeAbstractCollectionClass *) klass)->contains = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_key_set_real_contains;
	((GeeAbstractSortedSetClass *) klass)->first = (gpointer (*) (GeeAbstractSortedSet*)) gee_tree_map_key_set_real_first;
	((GeeAbstractSortedSetClass *) klass)->last = (gpointer (*) (GeeAbstractSortedSet*)) gee_tree_map_key_set_real_last;
	((GeeAbstractBidirSortedSetClass *) klass)->bidir_iterator = (GeeBidirIterator* (*) (GeeAbstractBidirSortedSet*)) gee_tree_map_key_set_real_bidir_iterator;
	((GeeAbstractSortedSetClass *) klass)->head_set = (GeeSortedSet* (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_key_set_real_head_set;
	((GeeAbstractSortedSetClass *) klass)->tail_set = (GeeSortedSet* (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_key_set_real_tail_set;
	((GeeAbstractSortedSetClass *) klass)->sub_set = (GeeSortedSet* (*) (GeeAbstractSortedSet*, gconstpointer, gconstpointer)) gee_tree_map_key_set_real_sub_set;
	((GeeAbstractSortedSetClass *) klass)->iterator_at = (GeeIterator* (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_key_set_real_iterator_at;
	((GeeAbstractSortedSetClass *) klass)->lower = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_key_set_real_lower;
	((GeeAbstractSortedSetClass *) klass)->higher = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_key_set_real_higher;
	((GeeAbstractSortedSetClass *) klass)->floor = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_key_set_real_floor;
	((GeeAbstractSortedSetClass *) klass)->ceil = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_key_set_real_ceil;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_size = gee_tree_map_key_set_real_get_size;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_read_only = gee_tree_map_key_set_real_get_read_only;
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_key_set_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_key_set_set_property;
	G_OBJECT_CLASS (klass)->finalize = gee_tree_map_key_set_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEY_SET_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEY_SET_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEY_SET_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEY_SET_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEY_SET_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEY_SET_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEY_SET_SIZE_PROPERTY, gee_tree_map_key_set_properties[GEE_TREE_MAP_KEY_SET_SIZE_PROPERTY] = g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEY_SET_READ_ONLY_PROPERTY, gee_tree_map_key_set_properties[GEE_TREE_MAP_KEY_SET_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gee_tree_map_key_set_instance_init (GeeTreeMapKeySet * self,
                                    gpointer klass)
{
	self->priv = gee_tree_map_key_set_get_instance_private (self);
}

static void
gee_tree_map_key_set_finalize (GObject * obj)
{
	GeeTreeMapKeySet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TREE_MAP_TYPE_KEY_SET, GeeTreeMapKeySet);
	_g_object_unref0 (self->priv->_map);
	G_OBJECT_CLASS (gee_tree_map_key_set_parent_class)->finalize (obj);
}

static GType
gee_tree_map_key_set_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapKeySetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_key_set_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapKeySet), 0, (GInstanceInitFunc) gee_tree_map_key_set_instance_init, NULL };
	GType gee_tree_map_key_set_type_id;
	gee_tree_map_key_set_type_id = g_type_register_static (GEE_TYPE_ABSTRACT_BIDIR_SORTED_SET, "GeeTreeMapKeySet", &g_define_type_info, 0);
	GeeTreeMapKeySet_private_offset = g_type_add_instance_private (gee_tree_map_key_set_type_id, sizeof (GeeTreeMapKeySetPrivate));
	return gee_tree_map_key_set_type_id;
}

static GType
gee_tree_map_key_set_get_type (void)
{
	static volatile gsize gee_tree_map_key_set_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_key_set_type_id__once)) {
		GType gee_tree_map_key_set_type_id;
		gee_tree_map_key_set_type_id = gee_tree_map_key_set_get_type_once ();
		g_once_init_leave (&gee_tree_map_key_set_type_id__once, gee_tree_map_key_set_type_id);
	}
	return gee_tree_map_key_set_type_id__once;
}

static void
_vala_gee_tree_map_key_set_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	GeeTreeMapKeySet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_KEY_SET, GeeTreeMapKeySet);
	switch (property_id) {
		case GEE_TREE_MAP_KEY_SET_SIZE_PROPERTY:
		g_value_set_int (value, gee_abstract_collection_get_size ((GeeAbstractCollection*) self));
		break;
		case GEE_TREE_MAP_KEY_SET_READ_ONLY_PROPERTY:
		g_value_set_boolean (value, gee_abstract_collection_get_read_only ((GeeAbstractCollection*) self));
		break;
		case GEE_TREE_MAP_KEY_SET_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_KEY_SET_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_KEY_SET_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_KEY_SET_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_KEY_SET_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_KEY_SET_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_key_set_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	GeeTreeMapKeySet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_KEY_SET, GeeTreeMapKeySet);
	switch (property_id) {
		case GEE_TREE_MAP_KEY_SET_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_KEY_SET_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_KEY_SET_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_KEY_SET_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_KEY_SET_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_KEY_SET_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_sub_key_set_get_instance_private (GeeTreeMapSubKeySet* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapSubKeySet_private_offset);
}

static GeeTreeMapSubKeySet*
gee_tree_map_sub_key_set_construct (GType object_type,
                                    GType k_type,
                                    GBoxedCopyFunc k_dup_func,
                                    GDestroyNotify k_destroy_func,
                                    GType v_type,
                                    GBoxedCopyFunc v_dup_func,
                                    GDestroyNotify v_destroy_func,
                                    GeeTreeMap* map,
                                    GeeTreeMapRange* range)
{
	GeeTreeMapSubKeySet * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (range != NULL, NULL);
	self = (GeeTreeMapSubKeySet*) gee_abstract_bidir_sorted_set_construct (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	gee_tree_map_sub_key_set_set_map (self, map);
	gee_tree_map_sub_key_set_set_range (self, range);
	return self;
}

static GeeTreeMapSubKeySet*
gee_tree_map_sub_key_set_new (GType k_type,
                              GBoxedCopyFunc k_dup_func,
                              GDestroyNotify k_destroy_func,
                              GType v_type,
                              GBoxedCopyFunc v_dup_func,
                              GDestroyNotify v_destroy_func,
                              GeeTreeMap* map,
                              GeeTreeMapRange* range)
{
	return gee_tree_map_sub_key_set_construct (GEE_TREE_MAP_TYPE_SUB_KEY_SET, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, range);
}

static GeeIterator*
gee_tree_map_sub_key_set_real_iterator (GeeAbstractCollection* base)
{
	GeeTreeMapSubKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapSubKeyIterator* _tmp2_;
	GeeIterator* result;
	self = (GeeTreeMapSubKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_range;
	_tmp2_ = gee_tree_map_sub_key_iterator_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp1_);
	result = (GeeIterator*) _tmp2_;
	return result;
}

static gboolean
gee_tree_map_sub_key_set_real_add (GeeAbstractCollection* base,
                                   gconstpointer key)
{
	GeeTreeMapSubKeySet * self;
	self = (GeeTreeMapSubKeySet*) base;
	g_assert_not_reached ();
}

static void
gee_tree_map_sub_key_set_real_clear (GeeAbstractCollection* base)
{
	GeeTreeMapSubKeySet * self;
	self = (GeeTreeMapSubKeySet*) base;
	g_assert_not_reached ();
}

static gboolean
gee_tree_map_sub_key_set_real_remove (GeeAbstractCollection* base,
                                      gconstpointer key)
{
	GeeTreeMapSubKeySet * self;
	self = (GeeTreeMapSubKeySet*) base;
	g_assert_not_reached ();
}

static gboolean
gee_tree_map_sub_key_set_real_contains (GeeAbstractCollection* base,
                                        gconstpointer key)
{
	GeeTreeMapSubKeySet * self;
	gboolean _tmp0_ = FALSE;
	GeeTreeMapRange* _tmp1_;
	gboolean result;
	self = (GeeTreeMapSubKeySet*) base;
	_tmp1_ = self->priv->_range;
	if (gee_tree_map_range_in_range (_tmp1_, key)) {
		GeeTreeMap* _tmp2_;
		_tmp2_ = self->priv->_map;
		_tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp2_, key);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static GeeBidirIterator*
gee_tree_map_sub_key_set_real_bidir_iterator (GeeAbstractBidirSortedSet* base)
{
	GeeTreeMapSubKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapSubKeyIterator* _tmp2_;
	GeeBidirIterator* result;
	self = (GeeTreeMapSubKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_range;
	_tmp2_ = gee_tree_map_sub_key_iterator_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp1_);
	result = (GeeBidirIterator*) _tmp2_;
	return result;
}

static gpointer
gee_tree_map_sub_key_set_real_first (GeeAbstractSortedSet* base)
{
	GeeTreeMapSubKeySet * self;
	GeeTreeMapNode* _first = NULL;
	GeeTreeMapRange* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	gconstpointer _tmp2_;
	gpointer _tmp3_;
	gpointer result;
	self = (GeeTreeMapSubKeySet*) base;
	_tmp0_ = self->priv->_range;
	_tmp1_ = gee_tree_map_range_first (_tmp0_);
	_first = _tmp1_;
	_vala_assert (_first != NULL, "_first != null");
	_tmp2_ = _first->key;
	_tmp3_ = ((_tmp2_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp2_) : ((gpointer) _tmp2_);
	result = _tmp3_;
	return result;
}

static gpointer
gee_tree_map_sub_key_set_real_last (GeeAbstractSortedSet* base)
{
	GeeTreeMapSubKeySet * self;
	GeeTreeMapNode* _last = NULL;
	GeeTreeMapRange* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	gconstpointer _tmp2_;
	gpointer _tmp3_;
	gpointer result;
	self = (GeeTreeMapSubKeySet*) base;
	_tmp0_ = self->priv->_range;
	_tmp1_ = gee_tree_map_range_last (_tmp0_);
	_last = _tmp1_;
	_vala_assert (_last != NULL, "_last != null");
	_tmp2_ = _last->key;
	_tmp3_ = ((_tmp2_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp2_) : ((gpointer) _tmp2_);
	result = _tmp3_;
	return result;
}

static GeeSortedSet*
gee_tree_map_sub_key_set_real_head_set (GeeAbstractSortedSet* base,
                                        gconstpointer before)
{
	GeeTreeMapSubKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapRange* _tmp2_;
	GeeTreeMapRange* _tmp3_;
	GeeTreeMapSubKeySet* _tmp4_;
	GeeSortedSet* _tmp5_;
	GeeSortedSet* result;
	self = (GeeTreeMapSubKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_range;
	_tmp2_ = gee_tree_map_range_cut_tail (_tmp1_, before);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_tree_map_sub_key_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp3_);
	_tmp5_ = (GeeSortedSet*) _tmp4_;
	_gee_tree_map_range_unref0 (_tmp3_);
	result = _tmp5_;
	return result;
}

static GeeSortedSet*
gee_tree_map_sub_key_set_real_tail_set (GeeAbstractSortedSet* base,
                                        gconstpointer after)
{
	GeeTreeMapSubKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapRange* _tmp2_;
	GeeTreeMapRange* _tmp3_;
	GeeTreeMapSubKeySet* _tmp4_;
	GeeSortedSet* _tmp5_;
	GeeSortedSet* result;
	self = (GeeTreeMapSubKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_range;
	_tmp2_ = gee_tree_map_range_cut_head (_tmp1_, after);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_tree_map_sub_key_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp3_);
	_tmp5_ = (GeeSortedSet*) _tmp4_;
	_gee_tree_map_range_unref0 (_tmp3_);
	result = _tmp5_;
	return result;
}

static GeeSortedSet*
gee_tree_map_sub_key_set_real_sub_set (GeeAbstractSortedSet* base,
                                       gconstpointer after,
                                       gconstpointer before)
{
	GeeTreeMapSubKeySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapRange* _tmp2_;
	GeeTreeMapRange* _tmp3_;
	GeeTreeMapSubKeySet* _tmp4_;
	GeeSortedSet* _tmp5_;
	GeeSortedSet* result;
	self = (GeeTreeMapSubKeySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_range;
	_tmp2_ = gee_tree_map_range_cut (_tmp1_, after, before);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_tree_map_sub_key_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp3_);
	_tmp5_ = (GeeSortedSet*) _tmp4_;
	_gee_tree_map_range_unref0 (_tmp3_);
	result = _tmp5_;
	return result;
}

static GeeIterator*
gee_tree_map_sub_key_set_real_iterator_at (GeeAbstractSortedSet* base,
                                           gconstpointer key)
{
	GeeTreeMapSubKeySet * self;
	GeeTreeMapRange* _tmp0_;
	GeeTreeMapNode* n = NULL;
	GeeTreeMap* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeTreeMap* _tmp4_;
	GeeTreeMapRange* _tmp5_;
	GeeTreeMapNode* _tmp6_;
	GeeTreeMapSubKeyIterator* _tmp7_;
	GeeIterator* result;
	self = (GeeTreeMapSubKeySet*) base;
	_tmp0_ = self->priv->_range;
	if (!gee_tree_map_range_in_range (_tmp0_, key)) {
		result = NULL;
		return result;
	}
	_tmp1_ = self->priv->_map;
	_tmp2_ = gee_tree_map_find_node (_tmp1_, key);
	n = _tmp2_;
	_tmp3_ = n;
	if (_tmp3_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp4_ = self->priv->_map;
	_tmp5_ = self->priv->_range;
	_tmp6_ = n;
	_tmp7_ = gee_tree_map_sub_key_iterator_new_pointing (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp4_, _tmp5_, _tmp6_);
	result = (GeeIterator*) _tmp7_;
	return result;
}

static gpointer
gee_tree_map_sub_key_set_real_lower (GeeAbstractSortedSet* base,
                                     gconstpointer key)
{
	GeeTreeMapSubKeySet * self;
	gint res = 0;
	GeeTreeMapRange* _tmp0_;
	gpointer l = NULL;
	GeeTreeMap* _tmp2_;
	GeeTreeMap* _tmp3_;
	GeeTreeMapNode* _tmp4_;
	gpointer _tmp5_;
	gconstpointer _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	gconstpointer _tmp8_;
	gpointer _tmp12_;
	gpointer result;
	self = (GeeTreeMapSubKeySet*) base;
	_tmp0_ = self->priv->_range;
	res = gee_tree_map_range_compare_range (_tmp0_, key);
	if (res > 0) {
		gpointer _tmp1_;
		_tmp1_ = gee_abstract_sorted_set_last ((GeeAbstractSortedSet*) self);
		result = _tmp1_;
		return result;
	}
	_tmp2_ = self->priv->_map;
	_tmp3_ = self->priv->_map;
	_tmp4_ = gee_tree_map_find_lower (_tmp3_, key);
	_tmp5_ = gee_tree_map_lift_null_key (_tmp2_, _tmp4_);
	l = _tmp5_;
	_tmp8_ = l;
	if (_tmp8_ != NULL) {
		GeeTreeMapRange* _tmp9_;
		gconstpointer _tmp10_;
		_tmp9_ = self->priv->_range;
		_tmp10_ = l;
		_tmp7_ = gee_tree_map_range_in_range (_tmp9_, _tmp10_);
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		gconstpointer _tmp11_;
		_tmp11_ = l;
		_tmp6_ = _tmp11_;
	} else {
		_tmp6_ = NULL;
	}
	_tmp12_ = ((_tmp6_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp6_) : ((gpointer) _tmp6_);
	result = _tmp12_;
	((l == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (l = (self->priv->k_destroy_func (l), NULL));
	return result;
}

static gpointer
gee_tree_map_sub_key_set_real_higher (GeeAbstractSortedSet* base,
                                      gconstpointer key)
{
	GeeTreeMapSubKeySet * self;
	gint res = 0;
	GeeTreeMapRange* _tmp0_;
	gpointer h = NULL;
	GeeTreeMap* _tmp2_;
	GeeTreeMap* _tmp3_;
	GeeTreeMapNode* _tmp4_;
	gpointer _tmp5_;
	gconstpointer _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	gconstpointer _tmp8_;
	gpointer _tmp12_;
	gpointer result;
	self = (GeeTreeMapSubKeySet*) base;
	_tmp0_ = self->priv->_range;
	res = gee_tree_map_range_compare_range (_tmp0_, key);
	if (res < 0) {
		gpointer _tmp1_;
		_tmp1_ = gee_abstract_sorted_set_first ((GeeAbstractSortedSet*) self);
		result = _tmp1_;
		return result;
	}
	_tmp2_ = self->priv->_map;
	_tmp3_ = self->priv->_map;
	_tmp4_ = gee_tree_map_find_higher (_tmp3_, key);
	_tmp5_ = gee_tree_map_lift_null_key (_tmp2_, _tmp4_);
	h = _tmp5_;
	_tmp8_ = h;
	if (_tmp8_ != NULL) {
		GeeTreeMapRange* _tmp9_;
		gconstpointer _tmp10_;
		_tmp9_ = self->priv->_range;
		_tmp10_ = h;
		_tmp7_ = gee_tree_map_range_in_range (_tmp9_, _tmp10_);
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		gconstpointer _tmp11_;
		_tmp11_ = h;
		_tmp6_ = _tmp11_;
	} else {
		_tmp6_ = NULL;
	}
	_tmp12_ = ((_tmp6_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp6_) : ((gpointer) _tmp6_);
	result = _tmp12_;
	((h == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (h = (self->priv->k_destroy_func (h), NULL));
	return result;
}

static gpointer
gee_tree_map_sub_key_set_real_floor (GeeAbstractSortedSet* base,
                                     gconstpointer key)
{
	GeeTreeMapSubKeySet * self;
	gint res = 0;
	GeeTreeMapRange* _tmp0_;
	gpointer l = NULL;
	GeeTreeMap* _tmp2_;
	GeeTreeMap* _tmp3_;
	GeeTreeMapNode* _tmp4_;
	gpointer _tmp5_;
	gconstpointer _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	gconstpointer _tmp8_;
	gpointer _tmp12_;
	gpointer result;
	self = (GeeTreeMapSubKeySet*) base;
	_tmp0_ = self->priv->_range;
	res = gee_tree_map_range_compare_range (_tmp0_, key);
	if (res > 0) {
		gpointer _tmp1_;
		_tmp1_ = gee_abstract_sorted_set_last ((GeeAbstractSortedSet*) self);
		result = _tmp1_;
		return result;
	}
	_tmp2_ = self->priv->_map;
	_tmp3_ = self->priv->_map;
	_tmp4_ = gee_tree_map_find_floor (_tmp3_, key);
	_tmp5_ = gee_tree_map_lift_null_key (_tmp2_, _tmp4_);
	l = _tmp5_;
	_tmp8_ = l;
	if (_tmp8_ != NULL) {
		GeeTreeMapRange* _tmp9_;
		gconstpointer _tmp10_;
		_tmp9_ = self->priv->_range;
		_tmp10_ = l;
		_tmp7_ = gee_tree_map_range_in_range (_tmp9_, _tmp10_);
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		gconstpointer _tmp11_;
		_tmp11_ = l;
		_tmp6_ = _tmp11_;
	} else {
		_tmp6_ = NULL;
	}
	_tmp12_ = ((_tmp6_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp6_) : ((gpointer) _tmp6_);
	result = _tmp12_;
	((l == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (l = (self->priv->k_destroy_func (l), NULL));
	return result;
}

static gpointer
gee_tree_map_sub_key_set_real_ceil (GeeAbstractSortedSet* base,
                                    gconstpointer key)
{
	GeeTreeMapSubKeySet * self;
	gint res = 0;
	GeeTreeMapRange* _tmp0_;
	gpointer h = NULL;
	GeeTreeMap* _tmp2_;
	GeeTreeMap* _tmp3_;
	GeeTreeMapNode* _tmp4_;
	gpointer _tmp5_;
	gconstpointer _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	gconstpointer _tmp8_;
	gpointer _tmp12_;
	gpointer result;
	self = (GeeTreeMapSubKeySet*) base;
	_tmp0_ = self->priv->_range;
	res = gee_tree_map_range_compare_range (_tmp0_, key);
	if (res < 0) {
		gpointer _tmp1_;
		_tmp1_ = gee_abstract_sorted_set_first ((GeeAbstractSortedSet*) self);
		result = _tmp1_;
		return result;
	}
	_tmp2_ = self->priv->_map;
	_tmp3_ = self->priv->_map;
	_tmp4_ = gee_tree_map_find_ceil (_tmp3_, key);
	_tmp5_ = gee_tree_map_lift_null_key (_tmp2_, _tmp4_);
	h = _tmp5_;
	_tmp8_ = h;
	if (_tmp8_ != NULL) {
		GeeTreeMapRange* _tmp9_;
		gconstpointer _tmp10_;
		_tmp9_ = self->priv->_range;
		_tmp10_ = h;
		_tmp7_ = gee_tree_map_range_in_range (_tmp9_, _tmp10_);
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		gconstpointer _tmp11_;
		_tmp11_ = h;
		_tmp6_ = _tmp11_;
	} else {
		_tmp6_ = NULL;
	}
	_tmp12_ = ((_tmp6_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp6_) : ((gpointer) _tmp6_);
	result = _tmp12_;
	((h == NULL) || (self->priv->k_destroy_func == NULL)) ? NULL : (h = (self->priv->k_destroy_func (h), NULL));
	return result;
}

static GeeTreeMap*
gee_tree_map_sub_key_set_get_map (GeeTreeMapSubKeySet* self)
{
	GeeTreeMap* result;
	GeeTreeMap* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_map;
	result = _tmp0_;
	return result;
}

static void
gee_tree_map_sub_key_set_set_map (GeeTreeMapSubKeySet* self,
                                  GeeTreeMap* value)
{
	GeeTreeMap* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_map);
	self->priv->_map = _tmp0_;
}

static GeeTreeMapRange*
gee_tree_map_sub_key_set_get_range (GeeTreeMapSubKeySet* self)
{
	GeeTreeMapRange* result;
	GeeTreeMapRange* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_range;
	result = _tmp0_;
	return result;
}

static void
gee_tree_map_sub_key_set_set_range (GeeTreeMapSubKeySet* self,
                                    GeeTreeMapRange* value)
{
	GeeTreeMapRange* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _gee_tree_map_range_ref0 (value);
	_gee_tree_map_range_unref0 (self->priv->_range);
	self->priv->_range = _tmp0_;
}

static gint
gee_tree_map_sub_key_set_real_get_size (GeeAbstractCollection* base)
{
	gint result;
	GeeTreeMapSubKeySet* self;
	gint i = 0;
	GeeIterator* iterator = NULL;
	GeeIterator* _tmp0_;
	self = (GeeTreeMapSubKeySet*) base;
	i = 0;
	_tmp0_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) self);
	iterator = _tmp0_;
	while (TRUE) {
		GeeIterator* _tmp1_;
		gint _tmp2_;
		_tmp1_ = iterator;
		if (!gee_iterator_next (_tmp1_)) {
			break;
		}
		_tmp2_ = i;
		i = _tmp2_ + 1;
	}
	result = i;
	_g_object_unref0 (iterator);
	return result;
}

static gboolean
gee_tree_map_sub_key_set_real_get_read_only (GeeAbstractCollection* base)
{
	gboolean result;
	GeeTreeMapSubKeySet* self;
	self = (GeeTreeMapSubKeySet*) base;
	result = TRUE;
	return result;
}

static gboolean
gee_tree_map_sub_key_set_get_is_empty (GeeTreeMapSubKeySet* self)
{
	gboolean result;
	GeeTreeMapRange* _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_range;
	result = gee_tree_map_range_empty_submap (_tmp0_);
	return result;
}

static void
gee_tree_map_sub_key_set_class_init (GeeTreeMapSubKeySetClass * klass,
                                     gpointer klass_data)
{
	gee_tree_map_sub_key_set_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapSubKeySet_private_offset);
	((GeeAbstractCollectionClass *) klass)->iterator = (GeeIterator* (*) (GeeAbstractCollection*)) gee_tree_map_sub_key_set_real_iterator;
	((GeeAbstractCollectionClass *) klass)->add = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_sub_key_set_real_add;
	((GeeAbstractCollectionClass *) klass)->clear = (void (*) (GeeAbstractCollection*)) gee_tree_map_sub_key_set_real_clear;
	((GeeAbstractCollectionClass *) klass)->remove = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_sub_key_set_real_remove;
	((GeeAbstractCollectionClass *) klass)->contains = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_sub_key_set_real_contains;
	((GeeAbstractBidirSortedSetClass *) klass)->bidir_iterator = (GeeBidirIterator* (*) (GeeAbstractBidirSortedSet*)) gee_tree_map_sub_key_set_real_bidir_iterator;
	((GeeAbstractSortedSetClass *) klass)->first = (gpointer (*) (GeeAbstractSortedSet*)) gee_tree_map_sub_key_set_real_first;
	((GeeAbstractSortedSetClass *) klass)->last = (gpointer (*) (GeeAbstractSortedSet*)) gee_tree_map_sub_key_set_real_last;
	((GeeAbstractSortedSetClass *) klass)->head_set = (GeeSortedSet* (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_sub_key_set_real_head_set;
	((GeeAbstractSortedSetClass *) klass)->tail_set = (GeeSortedSet* (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_sub_key_set_real_tail_set;
	((GeeAbstractSortedSetClass *) klass)->sub_set = (GeeSortedSet* (*) (GeeAbstractSortedSet*, gconstpointer, gconstpointer)) gee_tree_map_sub_key_set_real_sub_set;
	((GeeAbstractSortedSetClass *) klass)->iterator_at = (GeeIterator* (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_sub_key_set_real_iterator_at;
	((GeeAbstractSortedSetClass *) klass)->lower = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_sub_key_set_real_lower;
	((GeeAbstractSortedSetClass *) klass)->higher = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_sub_key_set_real_higher;
	((GeeAbstractSortedSetClass *) klass)->floor = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_sub_key_set_real_floor;
	((GeeAbstractSortedSetClass *) klass)->ceil = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_sub_key_set_real_ceil;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_size = gee_tree_map_sub_key_set_real_get_size;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_read_only = gee_tree_map_sub_key_set_real_get_read_only;
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_sub_key_set_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_sub_key_set_set_property;
	G_OBJECT_CLASS (klass)->finalize = gee_tree_map_sub_key_set_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_SET_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_SET_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_SET_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_SET_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_SET_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_SET_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_SET_MAP_PROPERTY, gee_tree_map_sub_key_set_properties[GEE_TREE_MAP_SUB_KEY_SET_MAP_PROPERTY] = g_param_spec_object ("map", "map", "map", GEE_TYPE_TREE_MAP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_SET_RANGE_PROPERTY, gee_tree_map_sub_key_set_properties[GEE_TREE_MAP_SUB_KEY_SET_RANGE_PROPERTY] = gee_tree_map_param_spec_range ("range", "range", "range", GEE_TREE_MAP_TYPE_RANGE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_SET_SIZE_PROPERTY, gee_tree_map_sub_key_set_properties[GEE_TREE_MAP_SUB_KEY_SET_SIZE_PROPERTY] = g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_SET_READ_ONLY_PROPERTY, gee_tree_map_sub_key_set_properties[GEE_TREE_MAP_SUB_KEY_SET_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_SET_IS_EMPTY_PROPERTY, gee_tree_map_sub_key_set_properties[GEE_TREE_MAP_SUB_KEY_SET_IS_EMPTY_PROPERTY] = g_param_spec_boolean ("is-empty", "is-empty", "is-empty", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gee_tree_map_sub_key_set_instance_init (GeeTreeMapSubKeySet * self,
                                        gpointer klass)
{
	self->priv = gee_tree_map_sub_key_set_get_instance_private (self);
}

static void
gee_tree_map_sub_key_set_finalize (GObject * obj)
{
	GeeTreeMapSubKeySet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TREE_MAP_TYPE_SUB_KEY_SET, GeeTreeMapSubKeySet);
	_g_object_unref0 (self->priv->_map);
	_gee_tree_map_range_unref0 (self->priv->_range);
	G_OBJECT_CLASS (gee_tree_map_sub_key_set_parent_class)->finalize (obj);
}

static GType
gee_tree_map_sub_key_set_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapSubKeySetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_sub_key_set_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapSubKeySet), 0, (GInstanceInitFunc) gee_tree_map_sub_key_set_instance_init, NULL };
	GType gee_tree_map_sub_key_set_type_id;
	gee_tree_map_sub_key_set_type_id = g_type_register_static (GEE_TYPE_ABSTRACT_BIDIR_SORTED_SET, "GeeTreeMapSubKeySet", &g_define_type_info, 0);
	GeeTreeMapSubKeySet_private_offset = g_type_add_instance_private (gee_tree_map_sub_key_set_type_id, sizeof (GeeTreeMapSubKeySetPrivate));
	return gee_tree_map_sub_key_set_type_id;
}

static GType
gee_tree_map_sub_key_set_get_type (void)
{
	static volatile gsize gee_tree_map_sub_key_set_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_sub_key_set_type_id__once)) {
		GType gee_tree_map_sub_key_set_type_id;
		gee_tree_map_sub_key_set_type_id = gee_tree_map_sub_key_set_get_type_once ();
		g_once_init_leave (&gee_tree_map_sub_key_set_type_id__once, gee_tree_map_sub_key_set_type_id);
	}
	return gee_tree_map_sub_key_set_type_id__once;
}

static void
_vala_gee_tree_map_sub_key_set_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec)
{
	GeeTreeMapSubKeySet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_KEY_SET, GeeTreeMapSubKeySet);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_KEY_SET_MAP_PROPERTY:
		g_value_set_object (value, gee_tree_map_sub_key_set_get_map (self));
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_RANGE_PROPERTY:
		gee_tree_map_value_set_range (value, gee_tree_map_sub_key_set_get_range (self));
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_SIZE_PROPERTY:
		g_value_set_int (value, gee_abstract_collection_get_size ((GeeAbstractCollection*) self));
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_READ_ONLY_PROPERTY:
		g_value_set_boolean (value, gee_abstract_collection_get_read_only ((GeeAbstractCollection*) self));
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_IS_EMPTY_PROPERTY:
		g_value_set_boolean (value, gee_tree_map_sub_key_set_get_is_empty (self));
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_sub_key_set_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec)
{
	GeeTreeMapSubKeySet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_KEY_SET, GeeTreeMapSubKeySet);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_KEY_SET_MAP_PROPERTY:
		gee_tree_map_sub_key_set_set_map (self, g_value_get_object (value));
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_RANGE_PROPERTY:
		gee_tree_map_sub_key_set_set_range (self, gee_tree_map_value_get_range (value));
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_KEY_SET_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_value_collection_get_instance_private (GeeTreeMapValueCollection* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapValueCollection_private_offset);
}

static GeeTreeMapValueCollection*
gee_tree_map_value_collection_construct (GType object_type,
                                         GType k_type,
                                         GBoxedCopyFunc k_dup_func,
                                         GDestroyNotify k_destroy_func,
                                         GType v_type,
                                         GBoxedCopyFunc v_dup_func,
                                         GDestroyNotify v_destroy_func,
                                         GeeTreeMap* map)
{
	GeeTreeMapValueCollection * self = NULL;
	GeeTreeMap* _tmp0_;
	g_return_val_if_fail (map != NULL, NULL);
	self = (GeeTreeMapValueCollection*) gee_abstract_collection_construct (object_type, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = _g_object_ref0 (map);
	_g_object_unref0 (self->priv->_map);
	self->priv->_map = _tmp0_;
	return self;
}

static GeeTreeMapValueCollection*
gee_tree_map_value_collection_new (GType k_type,
                                   GBoxedCopyFunc k_dup_func,
                                   GDestroyNotify k_destroy_func,
                                   GType v_type,
                                   GBoxedCopyFunc v_dup_func,
                                   GDestroyNotify v_destroy_func,
                                   GeeTreeMap* map)
{
	return gee_tree_map_value_collection_construct (GEE_TREE_MAP_TYPE_VALUE_COLLECTION, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map);
}

static GeeIterator*
gee_tree_map_value_collection_real_iterator (GeeAbstractCollection* base)
{
	GeeTreeMapValueCollection * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapValueIterator* _tmp1_;
	GeeIterator* result;
	self = (GeeTreeMapValueCollection*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_tree_map_value_iterator_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_);
	result = (GeeIterator*) _tmp1_;
	return result;
}

static gboolean
gee_tree_map_value_collection_real_add (GeeAbstractCollection* base,
                                        gconstpointer key)
{
	GeeTreeMapValueCollection * self;
	self = (GeeTreeMapValueCollection*) base;
	g_assert_not_reached ();
}

static void
gee_tree_map_value_collection_real_clear (GeeAbstractCollection* base)
{
	GeeTreeMapValueCollection * self;
	self = (GeeTreeMapValueCollection*) base;
	g_assert_not_reached ();
}

static gboolean
gee_tree_map_value_collection_real_remove (GeeAbstractCollection* base,
                                           gconstpointer key)
{
	GeeTreeMapValueCollection * self;
	self = (GeeTreeMapValueCollection*) base;
	g_assert_not_reached ();
}

static gboolean
gee_tree_map_value_collection_real_contains (GeeAbstractCollection* base,
                                             gconstpointer key)
{
	GeeTreeMapValueCollection * self;
	GeeIterator* it = NULL;
	GeeIterator* _tmp0_;
	gboolean result;
	self = (GeeTreeMapValueCollection*) base;
	_tmp0_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) self);
	it = _tmp0_;
	while (TRUE) {
		GeeIterator* _tmp1_;
		GeeTreeMap* _tmp2_;
		GeeEqualDataFunc _tmp3_ = NULL;
		gpointer _tmp3__target = NULL;
		GeeEqualDataFunc _tmp4_;
		gpointer _tmp4__target;
		GeeIterator* _tmp5_;
		gpointer _tmp6_;
		gpointer _tmp7_;
		gboolean _tmp8_;
		_tmp1_ = it;
		if (!gee_iterator_next (_tmp1_)) {
			break;
		}
		_tmp2_ = self->priv->_map;
		_tmp3_ = gee_tree_map_get_value_equal_func (_tmp2_, &_tmp3__target);
		_tmp4_ = _tmp3_;
		_tmp4__target = _tmp3__target;
		_tmp5_ = it;
		_tmp6_ = gee_iterator_get (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = _tmp4_ (key, _tmp7_, _tmp4__target);
		((_tmp7_ == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_tmp7_ = (self->priv->v_destroy_func (_tmp7_), NULL));
		if (_tmp8_) {
			result = TRUE;
			_g_object_unref0 (it);
			return result;
		}
	}
	result = FALSE;
	_g_object_unref0 (it);
	return result;
}

static gint
gee_tree_map_value_collection_real_get_size (GeeAbstractCollection* base)
{
	gint result;
	GeeTreeMapValueCollection* self;
	GeeTreeMap* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	self = (GeeTreeMapValueCollection*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_abstract_map_get_size ((GeeAbstractMap*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

static gboolean
gee_tree_map_value_collection_real_get_read_only (GeeAbstractCollection* base)
{
	gboolean result;
	GeeTreeMapValueCollection* self;
	self = (GeeTreeMapValueCollection*) base;
	result = TRUE;
	return result;
}

static void
gee_tree_map_value_collection_class_init (GeeTreeMapValueCollectionClass * klass,
                                          gpointer klass_data)
{
	gee_tree_map_value_collection_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapValueCollection_private_offset);
	((GeeAbstractCollectionClass *) klass)->iterator = (GeeIterator* (*) (GeeAbstractCollection*)) gee_tree_map_value_collection_real_iterator;
	((GeeAbstractCollectionClass *) klass)->add = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_value_collection_real_add;
	((GeeAbstractCollectionClass *) klass)->clear = (void (*) (GeeAbstractCollection*)) gee_tree_map_value_collection_real_clear;
	((GeeAbstractCollectionClass *) klass)->remove = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_value_collection_real_remove;
	((GeeAbstractCollectionClass *) klass)->contains = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_value_collection_real_contains;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_size = gee_tree_map_value_collection_real_get_size;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_read_only = gee_tree_map_value_collection_real_get_read_only;
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_value_collection_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_value_collection_set_property;
	G_OBJECT_CLASS (klass)->finalize = gee_tree_map_value_collection_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUE_COLLECTION_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUE_COLLECTION_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUE_COLLECTION_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUE_COLLECTION_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUE_COLLECTION_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUE_COLLECTION_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUE_COLLECTION_SIZE_PROPERTY, gee_tree_map_value_collection_properties[GEE_TREE_MAP_VALUE_COLLECTION_SIZE_PROPERTY] = g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUE_COLLECTION_READ_ONLY_PROPERTY, gee_tree_map_value_collection_properties[GEE_TREE_MAP_VALUE_COLLECTION_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gee_tree_map_value_collection_instance_init (GeeTreeMapValueCollection * self,
                                             gpointer klass)
{
	self->priv = gee_tree_map_value_collection_get_instance_private (self);
}

static void
gee_tree_map_value_collection_finalize (GObject * obj)
{
	GeeTreeMapValueCollection * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TREE_MAP_TYPE_VALUE_COLLECTION, GeeTreeMapValueCollection);
	_g_object_unref0 (self->priv->_map);
	G_OBJECT_CLASS (gee_tree_map_value_collection_parent_class)->finalize (obj);
}

static GType
gee_tree_map_value_collection_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapValueCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_value_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapValueCollection), 0, (GInstanceInitFunc) gee_tree_map_value_collection_instance_init, NULL };
	GType gee_tree_map_value_collection_type_id;
	gee_tree_map_value_collection_type_id = g_type_register_static (GEE_TYPE_ABSTRACT_COLLECTION, "GeeTreeMapValueCollection", &g_define_type_info, 0);
	GeeTreeMapValueCollection_private_offset = g_type_add_instance_private (gee_tree_map_value_collection_type_id, sizeof (GeeTreeMapValueCollectionPrivate));
	return gee_tree_map_value_collection_type_id;
}

static GType
gee_tree_map_value_collection_get_type (void)
{
	static volatile gsize gee_tree_map_value_collection_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_value_collection_type_id__once)) {
		GType gee_tree_map_value_collection_type_id;
		gee_tree_map_value_collection_type_id = gee_tree_map_value_collection_get_type_once ();
		g_once_init_leave (&gee_tree_map_value_collection_type_id__once, gee_tree_map_value_collection_type_id);
	}
	return gee_tree_map_value_collection_type_id__once;
}

static void
_vala_gee_tree_map_value_collection_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	GeeTreeMapValueCollection * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_VALUE_COLLECTION, GeeTreeMapValueCollection);
	switch (property_id) {
		case GEE_TREE_MAP_VALUE_COLLECTION_SIZE_PROPERTY:
		g_value_set_int (value, gee_abstract_collection_get_size ((GeeAbstractCollection*) self));
		break;
		case GEE_TREE_MAP_VALUE_COLLECTION_READ_ONLY_PROPERTY:
		g_value_set_boolean (value, gee_abstract_collection_get_read_only ((GeeAbstractCollection*) self));
		break;
		case GEE_TREE_MAP_VALUE_COLLECTION_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_VALUE_COLLECTION_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_VALUE_COLLECTION_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_VALUE_COLLECTION_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_VALUE_COLLECTION_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_VALUE_COLLECTION_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_value_collection_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	GeeTreeMapValueCollection * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_VALUE_COLLECTION, GeeTreeMapValueCollection);
	switch (property_id) {
		case GEE_TREE_MAP_VALUE_COLLECTION_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_VALUE_COLLECTION_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_VALUE_COLLECTION_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_VALUE_COLLECTION_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_VALUE_COLLECTION_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_VALUE_COLLECTION_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_sub_value_collection_get_instance_private (GeeTreeMapSubValueCollection* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapSubValueCollection_private_offset);
}

static GeeTreeMapSubValueCollection*
gee_tree_map_sub_value_collection_construct (GType object_type,
                                             GType k_type,
                                             GBoxedCopyFunc k_dup_func,
                                             GDestroyNotify k_destroy_func,
                                             GType v_type,
                                             GBoxedCopyFunc v_dup_func,
                                             GDestroyNotify v_destroy_func,
                                             GeeTreeMap* map,
                                             GeeTreeMapRange* range)
{
	GeeTreeMapSubValueCollection * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (range != NULL, NULL);
	self = (GeeTreeMapSubValueCollection*) gee_abstract_collection_construct (object_type, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	gee_tree_map_sub_value_collection_set_map (self, map);
	gee_tree_map_sub_value_collection_set_range (self, range);
	return self;
}

static GeeTreeMapSubValueCollection*
gee_tree_map_sub_value_collection_new (GType k_type,
                                       GBoxedCopyFunc k_dup_func,
                                       GDestroyNotify k_destroy_func,
                                       GType v_type,
                                       GBoxedCopyFunc v_dup_func,
                                       GDestroyNotify v_destroy_func,
                                       GeeTreeMap* map,
                                       GeeTreeMapRange* range)
{
	return gee_tree_map_sub_value_collection_construct (GEE_TREE_MAP_TYPE_SUB_VALUE_COLLECTION, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, range);
}

static GeeIterator*
gee_tree_map_sub_value_collection_real_iterator (GeeAbstractCollection* base)
{
	GeeTreeMapSubValueCollection * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapSubValueIterator* _tmp2_;
	GeeIterator* result;
	self = (GeeTreeMapSubValueCollection*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_range;
	_tmp2_ = gee_tree_map_sub_value_iterator_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp1_);
	result = (GeeIterator*) _tmp2_;
	return result;
}

static gboolean
gee_tree_map_sub_value_collection_real_add (GeeAbstractCollection* base,
                                            gconstpointer key)
{
	GeeTreeMapSubValueCollection * self;
	self = (GeeTreeMapSubValueCollection*) base;
	g_assert_not_reached ();
}

static void
gee_tree_map_sub_value_collection_real_clear (GeeAbstractCollection* base)
{
	GeeTreeMapSubValueCollection * self;
	self = (GeeTreeMapSubValueCollection*) base;
	g_assert_not_reached ();
}

static gboolean
gee_tree_map_sub_value_collection_real_remove (GeeAbstractCollection* base,
                                               gconstpointer key)
{
	GeeTreeMapSubValueCollection * self;
	self = (GeeTreeMapSubValueCollection*) base;
	g_assert_not_reached ();
}

static gboolean
gee_tree_map_sub_value_collection_real_contains (GeeAbstractCollection* base,
                                                 gconstpointer key)
{
	GeeTreeMapSubValueCollection * self;
	GeeIterator* it = NULL;
	GeeIterator* _tmp0_;
	gboolean result;
	self = (GeeTreeMapSubValueCollection*) base;
	_tmp0_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) self);
	it = _tmp0_;
	while (TRUE) {
		GeeIterator* _tmp1_;
		GeeTreeMap* _tmp2_;
		GeeEqualDataFunc _tmp3_ = NULL;
		gpointer _tmp3__target = NULL;
		GeeEqualDataFunc _tmp4_;
		gpointer _tmp4__target;
		GeeIterator* _tmp5_;
		gpointer _tmp6_;
		gpointer _tmp7_;
		gboolean _tmp8_;
		_tmp1_ = it;
		if (!gee_iterator_next (_tmp1_)) {
			break;
		}
		_tmp2_ = self->priv->_map;
		_tmp3_ = gee_tree_map_get_value_equal_func (_tmp2_, &_tmp3__target);
		_tmp4_ = _tmp3_;
		_tmp4__target = _tmp3__target;
		_tmp5_ = it;
		_tmp6_ = gee_iterator_get (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = _tmp4_ (key, _tmp7_, _tmp4__target);
		((_tmp7_ == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_tmp7_ = (self->priv->v_destroy_func (_tmp7_), NULL));
		if (_tmp8_) {
			result = TRUE;
			_g_object_unref0 (it);
			return result;
		}
	}
	result = FALSE;
	_g_object_unref0 (it);
	return result;
}

static GeeTreeMap*
gee_tree_map_sub_value_collection_get_map (GeeTreeMapSubValueCollection* self)
{
	GeeTreeMap* result;
	GeeTreeMap* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_map;
	result = _tmp0_;
	return result;
}

static void
gee_tree_map_sub_value_collection_set_map (GeeTreeMapSubValueCollection* self,
                                           GeeTreeMap* value)
{
	GeeTreeMap* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_map);
	self->priv->_map = _tmp0_;
}

static GeeTreeMapRange*
gee_tree_map_sub_value_collection_get_range (GeeTreeMapSubValueCollection* self)
{
	GeeTreeMapRange* result;
	GeeTreeMapRange* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_range;
	result = _tmp0_;
	return result;
}

static void
gee_tree_map_sub_value_collection_set_range (GeeTreeMapSubValueCollection* self,
                                             GeeTreeMapRange* value)
{
	GeeTreeMapRange* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _gee_tree_map_range_ref0 (value);
	_gee_tree_map_range_unref0 (self->priv->_range);
	self->priv->_range = _tmp0_;
}

static gboolean
gee_tree_map_sub_value_collection_real_get_read_only (GeeAbstractCollection* base)
{
	gboolean result;
	GeeTreeMapSubValueCollection* self;
	self = (GeeTreeMapSubValueCollection*) base;
	result = TRUE;
	return result;
}

static gint
gee_tree_map_sub_value_collection_real_get_size (GeeAbstractCollection* base)
{
	gint result;
	GeeTreeMapSubValueCollection* self;
	gint i = 0;
	GeeIterator* iterator = NULL;
	GeeIterator* _tmp0_;
	self = (GeeTreeMapSubValueCollection*) base;
	i = 0;
	_tmp0_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) self);
	iterator = _tmp0_;
	while (TRUE) {
		GeeIterator* _tmp1_;
		gint _tmp2_;
		_tmp1_ = iterator;
		if (!gee_iterator_next (_tmp1_)) {
			break;
		}
		_tmp2_ = i;
		i = _tmp2_ + 1;
	}
	result = i;
	_g_object_unref0 (iterator);
	return result;
}

static gboolean
gee_tree_map_sub_value_collection_get_is_empty (GeeTreeMapSubValueCollection* self)
{
	gboolean result;
	GeeTreeMapRange* _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_range;
	result = gee_tree_map_range_empty_submap (_tmp0_);
	return result;
}

static void
gee_tree_map_sub_value_collection_class_init (GeeTreeMapSubValueCollectionClass * klass,
                                              gpointer klass_data)
{
	gee_tree_map_sub_value_collection_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapSubValueCollection_private_offset);
	((GeeAbstractCollectionClass *) klass)->iterator = (GeeIterator* (*) (GeeAbstractCollection*)) gee_tree_map_sub_value_collection_real_iterator;
	((GeeAbstractCollectionClass *) klass)->add = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_sub_value_collection_real_add;
	((GeeAbstractCollectionClass *) klass)->clear = (void (*) (GeeAbstractCollection*)) gee_tree_map_sub_value_collection_real_clear;
	((GeeAbstractCollectionClass *) klass)->remove = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_sub_value_collection_real_remove;
	((GeeAbstractCollectionClass *) klass)->contains = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_sub_value_collection_real_contains;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_read_only = gee_tree_map_sub_value_collection_real_get_read_only;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_size = gee_tree_map_sub_value_collection_real_get_size;
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_sub_value_collection_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_sub_value_collection_set_property;
	G_OBJECT_CLASS (klass)->finalize = gee_tree_map_sub_value_collection_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_COLLECTION_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_COLLECTION_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_COLLECTION_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_COLLECTION_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_COLLECTION_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_COLLECTION_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_COLLECTION_MAP_PROPERTY, gee_tree_map_sub_value_collection_properties[GEE_TREE_MAP_SUB_VALUE_COLLECTION_MAP_PROPERTY] = g_param_spec_object ("map", "map", "map", GEE_TYPE_TREE_MAP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_COLLECTION_RANGE_PROPERTY, gee_tree_map_sub_value_collection_properties[GEE_TREE_MAP_SUB_VALUE_COLLECTION_RANGE_PROPERTY] = gee_tree_map_param_spec_range ("range", "range", "range", GEE_TREE_MAP_TYPE_RANGE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_COLLECTION_READ_ONLY_PROPERTY, gee_tree_map_sub_value_collection_properties[GEE_TREE_MAP_SUB_VALUE_COLLECTION_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_COLLECTION_SIZE_PROPERTY, gee_tree_map_sub_value_collection_properties[GEE_TREE_MAP_SUB_VALUE_COLLECTION_SIZE_PROPERTY] = g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_COLLECTION_IS_EMPTY_PROPERTY, gee_tree_map_sub_value_collection_properties[GEE_TREE_MAP_SUB_VALUE_COLLECTION_IS_EMPTY_PROPERTY] = g_param_spec_boolean ("is-empty", "is-empty", "is-empty", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gee_tree_map_sub_value_collection_instance_init (GeeTreeMapSubValueCollection * self,
                                                 gpointer klass)
{
	self->priv = gee_tree_map_sub_value_collection_get_instance_private (self);
}

static void
gee_tree_map_sub_value_collection_finalize (GObject * obj)
{
	GeeTreeMapSubValueCollection * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TREE_MAP_TYPE_SUB_VALUE_COLLECTION, GeeTreeMapSubValueCollection);
	_g_object_unref0 (self->priv->_map);
	_gee_tree_map_range_unref0 (self->priv->_range);
	G_OBJECT_CLASS (gee_tree_map_sub_value_collection_parent_class)->finalize (obj);
}

static GType
gee_tree_map_sub_value_collection_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapSubValueCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_sub_value_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapSubValueCollection), 0, (GInstanceInitFunc) gee_tree_map_sub_value_collection_instance_init, NULL };
	GType gee_tree_map_sub_value_collection_type_id;
	gee_tree_map_sub_value_collection_type_id = g_type_register_static (GEE_TYPE_ABSTRACT_COLLECTION, "GeeTreeMapSubValueCollection", &g_define_type_info, 0);
	GeeTreeMapSubValueCollection_private_offset = g_type_add_instance_private (gee_tree_map_sub_value_collection_type_id, sizeof (GeeTreeMapSubValueCollectionPrivate));
	return gee_tree_map_sub_value_collection_type_id;
}

static GType
gee_tree_map_sub_value_collection_get_type (void)
{
	static volatile gsize gee_tree_map_sub_value_collection_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_sub_value_collection_type_id__once)) {
		GType gee_tree_map_sub_value_collection_type_id;
		gee_tree_map_sub_value_collection_type_id = gee_tree_map_sub_value_collection_get_type_once ();
		g_once_init_leave (&gee_tree_map_sub_value_collection_type_id__once, gee_tree_map_sub_value_collection_type_id);
	}
	return gee_tree_map_sub_value_collection_type_id__once;
}

static void
_vala_gee_tree_map_sub_value_collection_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec)
{
	GeeTreeMapSubValueCollection * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_VALUE_COLLECTION, GeeTreeMapSubValueCollection);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_MAP_PROPERTY:
		g_value_set_object (value, gee_tree_map_sub_value_collection_get_map (self));
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_RANGE_PROPERTY:
		gee_tree_map_value_set_range (value, gee_tree_map_sub_value_collection_get_range (self));
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_READ_ONLY_PROPERTY:
		g_value_set_boolean (value, gee_abstract_collection_get_read_only ((GeeAbstractCollection*) self));
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_SIZE_PROPERTY:
		g_value_set_int (value, gee_abstract_collection_get_size ((GeeAbstractCollection*) self));
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_IS_EMPTY_PROPERTY:
		g_value_set_boolean (value, gee_tree_map_sub_value_collection_get_is_empty (self));
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_sub_value_collection_set_property (GObject * object,
                                                      guint property_id,
                                                      const GValue * value,
                                                      GParamSpec * pspec)
{
	GeeTreeMapSubValueCollection * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_VALUE_COLLECTION, GeeTreeMapSubValueCollection);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_MAP_PROPERTY:
		gee_tree_map_sub_value_collection_set_map (self, g_value_get_object (value));
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_RANGE_PROPERTY:
		gee_tree_map_sub_value_collection_set_range (self, gee_tree_map_value_get_range (value));
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_VALUE_COLLECTION_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_entry_set_get_instance_private (GeeTreeMapEntrySet* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapEntrySet_private_offset);
}

static GeeTreeMapEntrySet*
gee_tree_map_entry_set_construct (GType object_type,
                                  GType k_type,
                                  GBoxedCopyFunc k_dup_func,
                                  GDestroyNotify k_destroy_func,
                                  GType v_type,
                                  GBoxedCopyFunc v_dup_func,
                                  GDestroyNotify v_destroy_func,
                                  GeeTreeMap* map)
{
	GeeTreeMapEntrySet * self = NULL;
	GeeTreeMap* _tmp0_;
	g_return_val_if_fail (map != NULL, NULL);
	self = (GeeTreeMapEntrySet*) gee_abstract_bidir_sorted_set_construct (object_type, GEE_MAP_TYPE_ENTRY, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = _g_object_ref0 (map);
	_g_object_unref0 (self->priv->_map);
	self->priv->_map = _tmp0_;
	return self;
}

static GeeTreeMapEntrySet*
gee_tree_map_entry_set_new (GType k_type,
                            GBoxedCopyFunc k_dup_func,
                            GDestroyNotify k_destroy_func,
                            GType v_type,
                            GBoxedCopyFunc v_dup_func,
                            GDestroyNotify v_destroy_func,
                            GeeTreeMap* map)
{
	return gee_tree_map_entry_set_construct (GEE_TREE_MAP_TYPE_ENTRY_SET, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map);
}

static GeeIterator*
gee_tree_map_entry_set_real_iterator (GeeAbstractCollection* base)
{
	GeeTreeMapEntrySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapEntryIterator* _tmp1_;
	GeeIterator* result;
	self = (GeeTreeMapEntrySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_tree_map_entry_iterator_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_);
	result = (GeeIterator*) _tmp1_;
	return result;
}

static gboolean
gee_tree_map_entry_set_real_add (GeeAbstractCollection* base,
                                 GeeMapEntry* entry)
{
	GeeTreeMapEntrySet * self;
	self = (GeeTreeMapEntrySet*) base;
	g_return_val_if_fail (entry != NULL, FALSE);
	g_assert_not_reached ();
}

static void
gee_tree_map_entry_set_real_clear (GeeAbstractCollection* base)
{
	GeeTreeMapEntrySet * self;
	self = (GeeTreeMapEntrySet*) base;
	g_assert_not_reached ();
}

static gboolean
gee_tree_map_entry_set_real_remove (GeeAbstractCollection* base,
                                    GeeMapEntry* entry)
{
	GeeTreeMapEntrySet * self;
	self = (GeeTreeMapEntrySet*) base;
	g_return_val_if_fail (entry != NULL, FALSE);
	g_assert_not_reached ();
}

static gboolean
gee_tree_map_entry_set_real_contains (GeeAbstractCollection* base,
                                      GeeMapEntry* entry)
{
	GeeTreeMapEntrySet * self;
	GeeTreeMap* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	gconstpointer _tmp4_;
	gboolean result;
	self = (GeeTreeMapEntrySet*) base;
	g_return_val_if_fail (entry != NULL, FALSE);
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_map_entry_get_key (entry);
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_map_entry_get_value (entry);
	_tmp4_ = _tmp3_;
	result = gee_abstract_map_has ((GeeAbstractMap*) _tmp0_, _tmp2_, _tmp4_);
	return result;
}

static GeeMapEntry*
gee_tree_map_entry_set_real_first (GeeAbstractSortedSet* base)
{
	GeeTreeMapEntrySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMap* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeMapEntry* _tmp4_;
	GeeMapEntry* result;
	self = (GeeTreeMapEntrySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = _tmp0_->priv->first;
	_vala_assert (_tmp1_ != NULL, "_map.first != null");
	_tmp2_ = self->priv->_map;
	_tmp3_ = _tmp2_->priv->first;
	_tmp4_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp3_);
	result = _tmp4_;
	return result;
}

static GeeMapEntry*
gee_tree_map_entry_set_real_last (GeeAbstractSortedSet* base)
{
	GeeTreeMapEntrySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMap* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeMapEntry* _tmp4_;
	GeeMapEntry* result;
	self = (GeeTreeMapEntrySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = _tmp0_->priv->last;
	_vala_assert (_tmp1_ != NULL, "_map.last != null");
	_tmp2_ = self->priv->_map;
	_tmp3_ = _tmp2_->priv->last;
	_tmp4_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp3_);
	result = _tmp4_;
	return result;
}

static GeeBidirIterator*
gee_tree_map_entry_set_real_bidir_iterator (GeeAbstractBidirSortedSet* base)
{
	GeeTreeMapEntrySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapEntryIterator* _tmp1_;
	GeeBidirIterator* result;
	self = (GeeTreeMapEntrySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_tree_map_entry_iterator_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_);
	result = (GeeBidirIterator*) _tmp1_;
	return result;
}

static GeeSortedSet*
gee_tree_map_entry_set_real_head_set (GeeAbstractSortedSet* base,
                                      GeeMapEntry* before)
{
	GeeTreeMapEntrySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	GeeTreeMapRange* _tmp4_;
	GeeTreeMapRange* _tmp5_;
	GeeTreeMapSubEntrySet* _tmp6_;
	GeeSortedSet* _tmp7_;
	GeeSortedSet* result;
	self = (GeeTreeMapEntrySet*) base;
	g_return_val_if_fail (before != NULL, NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_map;
	_tmp2_ = gee_map_entry_get_key (before);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_tree_map_range_new_head (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp1_, _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = gee_tree_map_sub_entry_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp5_);
	_tmp7_ = (GeeSortedSet*) _tmp6_;
	_gee_tree_map_range_unref0 (_tmp5_);
	result = _tmp7_;
	return result;
}

static GeeSortedSet*
gee_tree_map_entry_set_real_tail_set (GeeAbstractSortedSet* base,
                                      GeeMapEntry* after)
{
	GeeTreeMapEntrySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	GeeTreeMapRange* _tmp4_;
	GeeTreeMapRange* _tmp5_;
	GeeTreeMapSubEntrySet* _tmp6_;
	GeeSortedSet* _tmp7_;
	GeeSortedSet* result;
	self = (GeeTreeMapEntrySet*) base;
	g_return_val_if_fail (after != NULL, NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_map;
	_tmp2_ = gee_map_entry_get_key (after);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_tree_map_range_new_tail (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp1_, _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = gee_tree_map_sub_entry_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp5_);
	_tmp7_ = (GeeSortedSet*) _tmp6_;
	_gee_tree_map_range_unref0 (_tmp5_);
	result = _tmp7_;
	return result;
}

static GeeSortedSet*
gee_tree_map_entry_set_real_sub_set (GeeAbstractSortedSet* base,
                                     GeeMapEntry* after,
                                     GeeMapEntry* before)
{
	GeeTreeMapEntrySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	gconstpointer _tmp4_;
	gconstpointer _tmp5_;
	GeeTreeMapRange* _tmp6_;
	GeeTreeMapRange* _tmp7_;
	GeeTreeMapSubEntrySet* _tmp8_;
	GeeSortedSet* _tmp9_;
	GeeSortedSet* result;
	self = (GeeTreeMapEntrySet*) base;
	g_return_val_if_fail (after != NULL, NULL);
	g_return_val_if_fail (before != NULL, NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_map;
	_tmp2_ = gee_map_entry_get_key (after);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_map_entry_get_key (before);
	_tmp5_ = _tmp4_;
	_tmp6_ = gee_tree_map_range_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp1_, _tmp3_, _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = gee_tree_map_sub_entry_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp7_);
	_tmp9_ = (GeeSortedSet*) _tmp8_;
	_gee_tree_map_range_unref0 (_tmp7_);
	result = _tmp9_;
	return result;
}

static GeeIterator*
gee_tree_map_entry_set_real_iterator_at (GeeAbstractSortedSet* base,
                                         GeeMapEntry* item)
{
	GeeTreeMapEntrySet * self;
	GeeTreeMapNode* node = NULL;
	GeeTreeMap* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gboolean _tmp4_ = FALSE;
	GeeTreeMapNode* _tmp5_;
	GeeTreeMap* _tmp13_;
	GeeTreeMapNode* _tmp14_;
	GeeTreeMapEntryIterator* _tmp15_;
	GeeIterator* result;
	self = (GeeTreeMapEntrySet*) base;
	g_return_val_if_fail (item != NULL, NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_map_entry_get_key (item);
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_tree_map_find_node (_tmp0_, _tmp2_);
	node = _tmp3_;
	_tmp5_ = node;
	if (_tmp5_ == NULL) {
		_tmp4_ = TRUE;
	} else {
		GeeTreeMap* _tmp6_;
		GeeEqualDataFunc _tmp7_ = NULL;
		gpointer _tmp7__target = NULL;
		GeeEqualDataFunc _tmp8_;
		gpointer _tmp8__target;
		GeeTreeMapNode* _tmp9_;
		gconstpointer _tmp10_;
		gconstpointer _tmp11_;
		gconstpointer _tmp12_;
		_tmp6_ = self->priv->_map;
		_tmp7_ = gee_tree_map_get_value_equal_func (_tmp6_, &_tmp7__target);
		_tmp8_ = _tmp7_;
		_tmp8__target = _tmp7__target;
		_tmp9_ = node;
		_tmp10_ = _tmp9_->value;
		_tmp11_ = gee_map_entry_get_value (item);
		_tmp12_ = _tmp11_;
		_tmp4_ = !_tmp8_ (_tmp10_, _tmp12_, _tmp8__target);
	}
	if (_tmp4_) {
		result = NULL;
		return result;
	}
	_tmp13_ = self->priv->_map;
	_tmp14_ = node;
	_tmp15_ = gee_tree_map_entry_iterator_new_pointing (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp13_, _tmp14_);
	result = (GeeIterator*) _tmp15_;
	return result;
}

static GeeMapEntry*
gee_tree_map_entry_set_real_lower (GeeAbstractSortedSet* base,
                                   GeeMapEntry* item)
{
	GeeTreeMapEntrySet * self;
	GeeTreeMapNode* l = NULL;
	GeeTreeMap* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeMapEntry* _tmp4_ = NULL;
	GeeTreeMapNode* _tmp5_;
	GeeMapEntry* result;
	self = (GeeTreeMapEntrySet*) base;
	g_return_val_if_fail (item != NULL, NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_map_entry_get_key (item);
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_tree_map_find_lower (_tmp0_, _tmp2_);
	l = _tmp3_;
	_tmp5_ = l;
	if (_tmp5_ != NULL) {
		GeeTreeMapNode* _tmp6_;
		GeeMapEntry* _tmp7_;
		_tmp6_ = l;
		_tmp7_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp6_);
		_g_object_unref0 (_tmp4_);
		_tmp4_ = _tmp7_;
	} else {
		_g_object_unref0 (_tmp4_);
		_tmp4_ = NULL;
	}
	result = _tmp4_;
	return result;
}

static GeeMapEntry*
gee_tree_map_entry_set_real_higher (GeeAbstractSortedSet* base,
                                    GeeMapEntry* item)
{
	GeeTreeMapEntrySet * self;
	GeeTreeMapNode* l = NULL;
	GeeTreeMap* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeMapEntry* _tmp4_ = NULL;
	GeeTreeMapNode* _tmp5_;
	GeeMapEntry* result;
	self = (GeeTreeMapEntrySet*) base;
	g_return_val_if_fail (item != NULL, NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_map_entry_get_key (item);
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_tree_map_find_higher (_tmp0_, _tmp2_);
	l = _tmp3_;
	_tmp5_ = l;
	if (_tmp5_ != NULL) {
		GeeTreeMapNode* _tmp6_;
		GeeMapEntry* _tmp7_;
		_tmp6_ = l;
		_tmp7_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp6_);
		_g_object_unref0 (_tmp4_);
		_tmp4_ = _tmp7_;
	} else {
		_g_object_unref0 (_tmp4_);
		_tmp4_ = NULL;
	}
	result = _tmp4_;
	return result;
}

static GeeMapEntry*
gee_tree_map_entry_set_real_floor (GeeAbstractSortedSet* base,
                                   GeeMapEntry* item)
{
	GeeTreeMapEntrySet * self;
	GeeTreeMapNode* l = NULL;
	GeeTreeMap* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeMapEntry* _tmp4_ = NULL;
	GeeTreeMapNode* _tmp5_;
	GeeMapEntry* result;
	self = (GeeTreeMapEntrySet*) base;
	g_return_val_if_fail (item != NULL, NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_map_entry_get_key (item);
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_tree_map_find_floor (_tmp0_, _tmp2_);
	l = _tmp3_;
	_tmp5_ = l;
	if (_tmp5_ != NULL) {
		GeeTreeMapNode* _tmp6_;
		GeeMapEntry* _tmp7_;
		_tmp6_ = l;
		_tmp7_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp6_);
		_g_object_unref0 (_tmp4_);
		_tmp4_ = _tmp7_;
	} else {
		_g_object_unref0 (_tmp4_);
		_tmp4_ = NULL;
	}
	result = _tmp4_;
	return result;
}

static GeeMapEntry*
gee_tree_map_entry_set_real_ceil (GeeAbstractSortedSet* base,
                                  GeeMapEntry* item)
{
	GeeTreeMapEntrySet * self;
	GeeTreeMapNode* l = NULL;
	GeeTreeMap* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeMapEntry* _tmp4_ = NULL;
	GeeTreeMapNode* _tmp5_;
	GeeMapEntry* result;
	self = (GeeTreeMapEntrySet*) base;
	g_return_val_if_fail (item != NULL, NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_map_entry_get_key (item);
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_tree_map_find_ceil (_tmp0_, _tmp2_);
	l = _tmp3_;
	_tmp5_ = l;
	if (_tmp5_ != NULL) {
		GeeTreeMapNode* _tmp6_;
		GeeMapEntry* _tmp7_;
		_tmp6_ = l;
		_tmp7_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp6_);
		_g_object_unref0 (_tmp4_);
		_tmp4_ = _tmp7_;
	} else {
		_g_object_unref0 (_tmp4_);
		_tmp4_ = NULL;
	}
	result = _tmp4_;
	return result;
}

static gint
gee_tree_map_entry_set_real_get_size (GeeAbstractCollection* base)
{
	gint result;
	GeeTreeMapEntrySet* self;
	GeeTreeMap* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	self = (GeeTreeMapEntrySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = gee_abstract_map_get_size ((GeeAbstractMap*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

static gboolean
gee_tree_map_entry_set_real_get_read_only (GeeAbstractCollection* base)
{
	gboolean result;
	GeeTreeMapEntrySet* self;
	self = (GeeTreeMapEntrySet*) base;
	result = TRUE;
	return result;
}

static void
gee_tree_map_entry_set_class_init (GeeTreeMapEntrySetClass * klass,
                                   gpointer klass_data)
{
	gee_tree_map_entry_set_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapEntrySet_private_offset);
	((GeeAbstractCollectionClass *) klass)->iterator = (GeeIterator* (*) (GeeAbstractCollection*)) gee_tree_map_entry_set_real_iterator;
	((GeeAbstractCollectionClass *) klass)->add = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_entry_set_real_add;
	((GeeAbstractCollectionClass *) klass)->clear = (void (*) (GeeAbstractCollection*)) gee_tree_map_entry_set_real_clear;
	((GeeAbstractCollectionClass *) klass)->remove = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_entry_set_real_remove;
	((GeeAbstractCollectionClass *) klass)->contains = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_entry_set_real_contains;
	((GeeAbstractSortedSetClass *) klass)->first = (gpointer (*) (GeeAbstractSortedSet*)) gee_tree_map_entry_set_real_first;
	((GeeAbstractSortedSetClass *) klass)->last = (gpointer (*) (GeeAbstractSortedSet*)) gee_tree_map_entry_set_real_last;
	((GeeAbstractBidirSortedSetClass *) klass)->bidir_iterator = (GeeBidirIterator* (*) (GeeAbstractBidirSortedSet*)) gee_tree_map_entry_set_real_bidir_iterator;
	((GeeAbstractSortedSetClass *) klass)->head_set = (GeeSortedSet* (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_entry_set_real_head_set;
	((GeeAbstractSortedSetClass *) klass)->tail_set = (GeeSortedSet* (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_entry_set_real_tail_set;
	((GeeAbstractSortedSetClass *) klass)->sub_set = (GeeSortedSet* (*) (GeeAbstractSortedSet*, gconstpointer, gconstpointer)) gee_tree_map_entry_set_real_sub_set;
	((GeeAbstractSortedSetClass *) klass)->iterator_at = (GeeIterator* (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_entry_set_real_iterator_at;
	((GeeAbstractSortedSetClass *) klass)->lower = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_entry_set_real_lower;
	((GeeAbstractSortedSetClass *) klass)->higher = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_entry_set_real_higher;
	((GeeAbstractSortedSetClass *) klass)->floor = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_entry_set_real_floor;
	((GeeAbstractSortedSetClass *) klass)->ceil = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_entry_set_real_ceil;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_size = gee_tree_map_entry_set_real_get_size;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_read_only = gee_tree_map_entry_set_real_get_read_only;
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_entry_set_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_entry_set_set_property;
	G_OBJECT_CLASS (klass)->finalize = gee_tree_map_entry_set_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_SET_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_SET_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_SET_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_SET_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_SET_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_SET_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_SET_SIZE_PROPERTY, gee_tree_map_entry_set_properties[GEE_TREE_MAP_ENTRY_SET_SIZE_PROPERTY] = g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_SET_READ_ONLY_PROPERTY, gee_tree_map_entry_set_properties[GEE_TREE_MAP_ENTRY_SET_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gee_tree_map_entry_set_instance_init (GeeTreeMapEntrySet * self,
                                      gpointer klass)
{
	self->priv = gee_tree_map_entry_set_get_instance_private (self);
}

static void
gee_tree_map_entry_set_finalize (GObject * obj)
{
	GeeTreeMapEntrySet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TREE_MAP_TYPE_ENTRY_SET, GeeTreeMapEntrySet);
	_g_object_unref0 (self->priv->_map);
	G_OBJECT_CLASS (gee_tree_map_entry_set_parent_class)->finalize (obj);
}

static GType
gee_tree_map_entry_set_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapEntrySetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_entry_set_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapEntrySet), 0, (GInstanceInitFunc) gee_tree_map_entry_set_instance_init, NULL };
	GType gee_tree_map_entry_set_type_id;
	gee_tree_map_entry_set_type_id = g_type_register_static (GEE_TYPE_ABSTRACT_BIDIR_SORTED_SET, "GeeTreeMapEntrySet", &g_define_type_info, 0);
	GeeTreeMapEntrySet_private_offset = g_type_add_instance_private (gee_tree_map_entry_set_type_id, sizeof (GeeTreeMapEntrySetPrivate));
	return gee_tree_map_entry_set_type_id;
}

static GType
gee_tree_map_entry_set_get_type (void)
{
	static volatile gsize gee_tree_map_entry_set_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_entry_set_type_id__once)) {
		GType gee_tree_map_entry_set_type_id;
		gee_tree_map_entry_set_type_id = gee_tree_map_entry_set_get_type_once ();
		g_once_init_leave (&gee_tree_map_entry_set_type_id__once, gee_tree_map_entry_set_type_id);
	}
	return gee_tree_map_entry_set_type_id__once;
}

static void
_vala_gee_tree_map_entry_set_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	GeeTreeMapEntrySet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_ENTRY_SET, GeeTreeMapEntrySet);
	switch (property_id) {
		case GEE_TREE_MAP_ENTRY_SET_SIZE_PROPERTY:
		g_value_set_int (value, gee_abstract_collection_get_size ((GeeAbstractCollection*) self));
		break;
		case GEE_TREE_MAP_ENTRY_SET_READ_ONLY_PROPERTY:
		g_value_set_boolean (value, gee_abstract_collection_get_read_only ((GeeAbstractCollection*) self));
		break;
		case GEE_TREE_MAP_ENTRY_SET_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_ENTRY_SET_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_ENTRY_SET_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_ENTRY_SET_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_ENTRY_SET_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_ENTRY_SET_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_entry_set_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	GeeTreeMapEntrySet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_ENTRY_SET, GeeTreeMapEntrySet);
	switch (property_id) {
		case GEE_TREE_MAP_ENTRY_SET_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_ENTRY_SET_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_ENTRY_SET_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_ENTRY_SET_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_ENTRY_SET_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_ENTRY_SET_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_sub_entry_set_get_instance_private (GeeTreeMapSubEntrySet* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapSubEntrySet_private_offset);
}

static GeeTreeMapSubEntrySet*
gee_tree_map_sub_entry_set_construct (GType object_type,
                                      GType k_type,
                                      GBoxedCopyFunc k_dup_func,
                                      GDestroyNotify k_destroy_func,
                                      GType v_type,
                                      GBoxedCopyFunc v_dup_func,
                                      GDestroyNotify v_destroy_func,
                                      GeeTreeMap* map,
                                      GeeTreeMapRange* range)
{
	GeeTreeMapSubEntrySet * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (range != NULL, NULL);
	self = (GeeTreeMapSubEntrySet*) gee_abstract_bidir_sorted_set_construct (object_type, GEE_MAP_TYPE_ENTRY, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	gee_tree_map_sub_entry_set_set_map (self, map);
	gee_tree_map_sub_entry_set_set_range (self, range);
	return self;
}

static GeeTreeMapSubEntrySet*
gee_tree_map_sub_entry_set_new (GType k_type,
                                GBoxedCopyFunc k_dup_func,
                                GDestroyNotify k_destroy_func,
                                GType v_type,
                                GBoxedCopyFunc v_dup_func,
                                GDestroyNotify v_destroy_func,
                                GeeTreeMap* map,
                                GeeTreeMapRange* range)
{
	return gee_tree_map_sub_entry_set_construct (GEE_TREE_MAP_TYPE_SUB_ENTRY_SET, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, range);
}

static GeeIterator*
gee_tree_map_sub_entry_set_real_iterator (GeeAbstractCollection* base)
{
	GeeTreeMapSubEntrySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapSubEntryIterator* _tmp2_;
	GeeIterator* result;
	self = (GeeTreeMapSubEntrySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_range;
	_tmp2_ = gee_tree_map_sub_entry_iterator_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp1_);
	result = (GeeIterator*) _tmp2_;
	return result;
}

static gboolean
gee_tree_map_sub_entry_set_real_add (GeeAbstractCollection* base,
                                     GeeMapEntry* entry)
{
	GeeTreeMapSubEntrySet * self;
	self = (GeeTreeMapSubEntrySet*) base;
	g_return_val_if_fail (entry != NULL, FALSE);
	g_assert_not_reached ();
}

static void
gee_tree_map_sub_entry_set_real_clear (GeeAbstractCollection* base)
{
	GeeTreeMapSubEntrySet * self;
	self = (GeeTreeMapSubEntrySet*) base;
	g_assert_not_reached ();
}

static gboolean
gee_tree_map_sub_entry_set_real_remove (GeeAbstractCollection* base,
                                        GeeMapEntry* entry)
{
	GeeTreeMapSubEntrySet * self;
	self = (GeeTreeMapSubEntrySet*) base;
	g_return_val_if_fail (entry != NULL, FALSE);
	g_assert_not_reached ();
}

static gboolean
gee_tree_map_sub_entry_set_real_contains (GeeAbstractCollection* base,
                                          GeeMapEntry* entry)
{
	GeeTreeMapSubEntrySet * self;
	gboolean _tmp0_ = FALSE;
	GeeTreeMapRange* _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	gboolean result;
	self = (GeeTreeMapSubEntrySet*) base;
	g_return_val_if_fail (entry != NULL, FALSE);
	_tmp1_ = self->priv->_range;
	_tmp2_ = gee_map_entry_get_key (entry);
	_tmp3_ = _tmp2_;
	if (gee_tree_map_range_in_range (_tmp1_, _tmp3_)) {
		GeeTreeMap* _tmp4_;
		gconstpointer _tmp5_;
		gconstpointer _tmp6_;
		gconstpointer _tmp7_;
		gconstpointer _tmp8_;
		_tmp4_ = self->priv->_map;
		_tmp5_ = gee_map_entry_get_key (entry);
		_tmp6_ = _tmp5_;
		_tmp7_ = gee_map_entry_get_value (entry);
		_tmp8_ = _tmp7_;
		_tmp0_ = gee_abstract_map_has ((GeeAbstractMap*) _tmp4_, _tmp6_, _tmp8_);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static GeeBidirIterator*
gee_tree_map_sub_entry_set_real_bidir_iterator (GeeAbstractBidirSortedSet* base)
{
	GeeTreeMapSubEntrySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMapSubEntryIterator* _tmp2_;
	GeeBidirIterator* result;
	self = (GeeTreeMapSubEntrySet*) base;
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_range;
	_tmp2_ = gee_tree_map_sub_entry_iterator_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp1_);
	result = (GeeBidirIterator*) _tmp2_;
	return result;
}

static GeeMapEntry*
gee_tree_map_sub_entry_set_real_first (GeeAbstractSortedSet* base)
{
	GeeTreeMapSubEntrySet * self;
	GeeTreeMapNode* _first = NULL;
	GeeTreeMapRange* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeMapEntry* _tmp2_;
	GeeMapEntry* result;
	self = (GeeTreeMapSubEntrySet*) base;
	_tmp0_ = self->priv->_range;
	_tmp1_ = gee_tree_map_range_first (_tmp0_);
	_first = _tmp1_;
	_vala_assert (_first != NULL, "_first != null");
	_tmp2_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _first);
	result = _tmp2_;
	return result;
}

static GeeMapEntry*
gee_tree_map_sub_entry_set_real_last (GeeAbstractSortedSet* base)
{
	GeeTreeMapSubEntrySet * self;
	GeeTreeMapNode* _last = NULL;
	GeeTreeMapRange* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeMapEntry* _tmp2_;
	GeeMapEntry* result;
	self = (GeeTreeMapSubEntrySet*) base;
	_tmp0_ = self->priv->_range;
	_tmp1_ = gee_tree_map_range_last (_tmp0_);
	_last = _tmp1_;
	_vala_assert (_last != NULL, "_last != null");
	_tmp2_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _last);
	result = _tmp2_;
	return result;
}

static GeeSortedSet*
gee_tree_map_sub_entry_set_real_head_set (GeeAbstractSortedSet* base,
                                          GeeMapEntry* before)
{
	GeeTreeMapSubEntrySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	GeeTreeMapRange* _tmp4_;
	GeeTreeMapRange* _tmp5_;
	GeeTreeMapSubEntrySet* _tmp6_;
	GeeSortedSet* _tmp7_;
	GeeSortedSet* result;
	self = (GeeTreeMapSubEntrySet*) base;
	g_return_val_if_fail (before != NULL, NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_range;
	_tmp2_ = gee_map_entry_get_key (before);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_tree_map_range_cut_tail (_tmp1_, _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = gee_tree_map_sub_entry_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp5_);
	_tmp7_ = (GeeSortedSet*) _tmp6_;
	_gee_tree_map_range_unref0 (_tmp5_);
	result = _tmp7_;
	return result;
}

static GeeSortedSet*
gee_tree_map_sub_entry_set_real_tail_set (GeeAbstractSortedSet* base,
                                          GeeMapEntry* after)
{
	GeeTreeMapSubEntrySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	GeeTreeMapRange* _tmp4_;
	GeeTreeMapRange* _tmp5_;
	GeeTreeMapSubEntrySet* _tmp6_;
	GeeSortedSet* _tmp7_;
	GeeSortedSet* result;
	self = (GeeTreeMapSubEntrySet*) base;
	g_return_val_if_fail (after != NULL, NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_range;
	_tmp2_ = gee_map_entry_get_key (after);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_tree_map_range_cut_head (_tmp1_, _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = gee_tree_map_sub_entry_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp5_);
	_tmp7_ = (GeeSortedSet*) _tmp6_;
	_gee_tree_map_range_unref0 (_tmp5_);
	result = _tmp7_;
	return result;
}

static GeeSortedSet*
gee_tree_map_sub_entry_set_real_sub_set (GeeAbstractSortedSet* base,
                                         GeeMapEntry* after,
                                         GeeMapEntry* before)
{
	GeeTreeMapSubEntrySet * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	gconstpointer _tmp4_;
	gconstpointer _tmp5_;
	GeeTreeMapRange* _tmp6_;
	GeeTreeMapRange* _tmp7_;
	GeeTreeMapSubEntrySet* _tmp8_;
	GeeSortedSet* _tmp9_;
	GeeSortedSet* result;
	self = (GeeTreeMapSubEntrySet*) base;
	g_return_val_if_fail (after != NULL, NULL);
	g_return_val_if_fail (before != NULL, NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = self->priv->_range;
	_tmp2_ = gee_map_entry_get_key (after);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_map_entry_get_key (before);
	_tmp5_ = _tmp4_;
	_tmp6_ = gee_tree_map_range_cut (_tmp1_, _tmp3_, _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = gee_tree_map_sub_entry_set_new (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, _tmp7_);
	_tmp9_ = (GeeSortedSet*) _tmp8_;
	_gee_tree_map_range_unref0 (_tmp7_);
	result = _tmp9_;
	return result;
}

static GeeIterator*
gee_tree_map_sub_entry_set_real_iterator_at (GeeAbstractSortedSet* base,
                                             GeeMapEntry* entry)
{
	GeeTreeMapSubEntrySet * self;
	GeeTreeMapRange* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	GeeTreeMapNode* n = NULL;
	GeeTreeMap* _tmp3_;
	gconstpointer _tmp4_;
	gconstpointer _tmp5_;
	GeeTreeMapNode* _tmp6_;
	gboolean _tmp7_ = FALSE;
	GeeTreeMapNode* _tmp8_;
	GeeTreeMap* _tmp16_;
	GeeTreeMapRange* _tmp17_;
	GeeTreeMapNode* _tmp18_;
	GeeTreeMapSubEntryIterator* _tmp19_;
	GeeIterator* result;
	self = (GeeTreeMapSubEntrySet*) base;
	g_return_val_if_fail (entry != NULL, NULL);
	_tmp0_ = self->priv->_range;
	_tmp1_ = gee_map_entry_get_key (entry);
	_tmp2_ = _tmp1_;
	if (!gee_tree_map_range_in_range (_tmp0_, _tmp2_)) {
		result = NULL;
		return result;
	}
	_tmp3_ = self->priv->_map;
	_tmp4_ = gee_map_entry_get_key (entry);
	_tmp5_ = _tmp4_;
	_tmp6_ = gee_tree_map_find_node (_tmp3_, _tmp5_);
	n = _tmp6_;
	_tmp8_ = n;
	if (_tmp8_ == NULL) {
		_tmp7_ = TRUE;
	} else {
		GeeTreeMap* _tmp9_;
		GeeEqualDataFunc _tmp10_ = NULL;
		gpointer _tmp10__target = NULL;
		GeeEqualDataFunc _tmp11_;
		gpointer _tmp11__target;
		GeeTreeMapNode* _tmp12_;
		gconstpointer _tmp13_;
		gconstpointer _tmp14_;
		gconstpointer _tmp15_;
		_tmp9_ = self->priv->_map;
		_tmp10_ = gee_tree_map_get_value_equal_func (_tmp9_, &_tmp10__target);
		_tmp11_ = _tmp10_;
		_tmp11__target = _tmp10__target;
		_tmp12_ = n;
		_tmp13_ = _tmp12_->value;
		_tmp14_ = gee_map_entry_get_value (entry);
		_tmp15_ = _tmp14_;
		_tmp7_ = !_tmp11_ (_tmp13_, _tmp15_, _tmp11__target);
	}
	if (_tmp7_) {
		result = NULL;
		return result;
	}
	_tmp16_ = self->priv->_map;
	_tmp17_ = self->priv->_range;
	_tmp18_ = n;
	_tmp19_ = gee_tree_map_sub_entry_iterator_new_pointing (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp16_, _tmp17_, _tmp18_);
	result = (GeeIterator*) _tmp19_;
	return result;
}

static GeeMapEntry*
gee_tree_map_sub_entry_set_real_lower (GeeAbstractSortedSet* base,
                                       GeeMapEntry* entry)
{
	GeeTreeMapSubEntrySet * self;
	gint res = 0;
	GeeTreeMapRange* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	GeeTreeMapNode* l = NULL;
	GeeTreeMap* _tmp4_;
	gconstpointer _tmp5_;
	gconstpointer _tmp6_;
	GeeTreeMapNode* _tmp7_;
	GeeMapEntry* _tmp8_ = NULL;
	gboolean _tmp9_ = FALSE;
	GeeTreeMapNode* _tmp10_;
	GeeMapEntry* result;
	self = (GeeTreeMapSubEntrySet*) base;
	g_return_val_if_fail (entry != NULL, NULL);
	_tmp0_ = self->priv->_range;
	_tmp1_ = gee_map_entry_get_key (entry);
	_tmp2_ = _tmp1_;
	res = gee_tree_map_range_compare_range (_tmp0_, _tmp2_);
	if (res > 0) {
		gpointer _tmp3_;
		_tmp3_ = gee_abstract_sorted_set_last ((GeeAbstractSortedSet*) self);
		result = (GeeMapEntry*) _tmp3_;
		return result;
	}
	_tmp4_ = self->priv->_map;
	_tmp5_ = gee_map_entry_get_key (entry);
	_tmp6_ = _tmp5_;
	_tmp7_ = gee_tree_map_find_lower (_tmp4_, _tmp6_);
	l = _tmp7_;
	_tmp10_ = l;
	if (_tmp10_ != NULL) {
		GeeTreeMapRange* _tmp11_;
		GeeTreeMapNode* _tmp12_;
		gconstpointer _tmp13_;
		_tmp11_ = self->priv->_range;
		_tmp12_ = l;
		_tmp13_ = _tmp12_->key;
		_tmp9_ = gee_tree_map_range_in_range (_tmp11_, _tmp13_);
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		GeeTreeMapNode* _tmp14_;
		GeeMapEntry* _tmp15_;
		_tmp14_ = l;
		_tmp15_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp14_);
		_g_object_unref0 (_tmp8_);
		_tmp8_ = _tmp15_;
	} else {
		_g_object_unref0 (_tmp8_);
		_tmp8_ = NULL;
	}
	result = _tmp8_;
	return result;
}

static GeeMapEntry*
gee_tree_map_sub_entry_set_real_higher (GeeAbstractSortedSet* base,
                                        GeeMapEntry* entry)
{
	GeeTreeMapSubEntrySet * self;
	gint res = 0;
	GeeTreeMapRange* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	GeeTreeMapNode* h = NULL;
	GeeTreeMap* _tmp4_;
	gconstpointer _tmp5_;
	gconstpointer _tmp6_;
	GeeTreeMapNode* _tmp7_;
	GeeMapEntry* _tmp8_ = NULL;
	gboolean _tmp9_ = FALSE;
	GeeTreeMapNode* _tmp10_;
	GeeMapEntry* result;
	self = (GeeTreeMapSubEntrySet*) base;
	g_return_val_if_fail (entry != NULL, NULL);
	_tmp0_ = self->priv->_range;
	_tmp1_ = gee_map_entry_get_key (entry);
	_tmp2_ = _tmp1_;
	res = gee_tree_map_range_compare_range (_tmp0_, _tmp2_);
	if (res < 0) {
		gpointer _tmp3_;
		_tmp3_ = gee_abstract_sorted_set_first ((GeeAbstractSortedSet*) self);
		result = (GeeMapEntry*) _tmp3_;
		return result;
	}
	_tmp4_ = self->priv->_map;
	_tmp5_ = gee_map_entry_get_key (entry);
	_tmp6_ = _tmp5_;
	_tmp7_ = gee_tree_map_find_higher (_tmp4_, _tmp6_);
	h = _tmp7_;
	_tmp10_ = h;
	if (_tmp10_ != NULL) {
		GeeTreeMapRange* _tmp11_;
		GeeTreeMapNode* _tmp12_;
		gconstpointer _tmp13_;
		_tmp11_ = self->priv->_range;
		_tmp12_ = h;
		_tmp13_ = _tmp12_->key;
		_tmp9_ = gee_tree_map_range_in_range (_tmp11_, _tmp13_);
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		GeeTreeMapNode* _tmp14_;
		GeeMapEntry* _tmp15_;
		_tmp14_ = h;
		_tmp15_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp14_);
		_g_object_unref0 (_tmp8_);
		_tmp8_ = _tmp15_;
	} else {
		_g_object_unref0 (_tmp8_);
		_tmp8_ = NULL;
	}
	result = _tmp8_;
	return result;
}

static GeeMapEntry*
gee_tree_map_sub_entry_set_real_floor (GeeAbstractSortedSet* base,
                                       GeeMapEntry* entry)
{
	GeeTreeMapSubEntrySet * self;
	gint res = 0;
	GeeTreeMapRange* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	GeeTreeMapNode* l = NULL;
	GeeTreeMap* _tmp4_;
	gconstpointer _tmp5_;
	gconstpointer _tmp6_;
	GeeTreeMapNode* _tmp7_;
	GeeMapEntry* _tmp8_ = NULL;
	gboolean _tmp9_ = FALSE;
	GeeTreeMapNode* _tmp10_;
	GeeMapEntry* result;
	self = (GeeTreeMapSubEntrySet*) base;
	g_return_val_if_fail (entry != NULL, NULL);
	_tmp0_ = self->priv->_range;
	_tmp1_ = gee_map_entry_get_key (entry);
	_tmp2_ = _tmp1_;
	res = gee_tree_map_range_compare_range (_tmp0_, _tmp2_);
	if (res > 0) {
		gpointer _tmp3_;
		_tmp3_ = gee_abstract_sorted_set_last ((GeeAbstractSortedSet*) self);
		result = (GeeMapEntry*) _tmp3_;
		return result;
	}
	_tmp4_ = self->priv->_map;
	_tmp5_ = gee_map_entry_get_key (entry);
	_tmp6_ = _tmp5_;
	_tmp7_ = gee_tree_map_find_floor (_tmp4_, _tmp6_);
	l = _tmp7_;
	_tmp10_ = l;
	if (_tmp10_ != NULL) {
		GeeTreeMapRange* _tmp11_;
		GeeTreeMapNode* _tmp12_;
		gconstpointer _tmp13_;
		_tmp11_ = self->priv->_range;
		_tmp12_ = l;
		_tmp13_ = _tmp12_->key;
		_tmp9_ = gee_tree_map_range_in_range (_tmp11_, _tmp13_);
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		GeeTreeMapNode* _tmp14_;
		GeeMapEntry* _tmp15_;
		_tmp14_ = l;
		_tmp15_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp14_);
		_g_object_unref0 (_tmp8_);
		_tmp8_ = _tmp15_;
	} else {
		_g_object_unref0 (_tmp8_);
		_tmp8_ = NULL;
	}
	result = _tmp8_;
	return result;
}

static GeeMapEntry*
gee_tree_map_sub_entry_set_real_ceil (GeeAbstractSortedSet* base,
                                      GeeMapEntry* entry)
{
	GeeTreeMapSubEntrySet * self;
	gint res = 0;
	GeeTreeMapRange* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	GeeTreeMapNode* h = NULL;
	GeeTreeMap* _tmp4_;
	gconstpointer _tmp5_;
	gconstpointer _tmp6_;
	GeeTreeMapNode* _tmp7_;
	GeeMapEntry* _tmp8_ = NULL;
	gboolean _tmp9_ = FALSE;
	GeeTreeMapNode* _tmp10_;
	GeeMapEntry* result;
	self = (GeeTreeMapSubEntrySet*) base;
	g_return_val_if_fail (entry != NULL, NULL);
	_tmp0_ = self->priv->_range;
	_tmp1_ = gee_map_entry_get_key (entry);
	_tmp2_ = _tmp1_;
	res = gee_tree_map_range_compare_range (_tmp0_, _tmp2_);
	if (res < 0) {
		gpointer _tmp3_;
		_tmp3_ = gee_abstract_sorted_set_first ((GeeAbstractSortedSet*) self);
		result = (GeeMapEntry*) _tmp3_;
		return result;
	}
	_tmp4_ = self->priv->_map;
	_tmp5_ = gee_map_entry_get_key (entry);
	_tmp6_ = _tmp5_;
	_tmp7_ = gee_tree_map_find_ceil (_tmp4_, _tmp6_);
	h = _tmp7_;
	_tmp10_ = h;
	if (_tmp10_ != NULL) {
		GeeTreeMapRange* _tmp11_;
		GeeTreeMapNode* _tmp12_;
		gconstpointer _tmp13_;
		_tmp11_ = self->priv->_range;
		_tmp12_ = h;
		_tmp13_ = _tmp12_->key;
		_tmp9_ = gee_tree_map_range_in_range (_tmp11_, _tmp13_);
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		GeeTreeMapNode* _tmp14_;
		GeeMapEntry* _tmp15_;
		_tmp14_ = h;
		_tmp15_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp14_);
		_g_object_unref0 (_tmp8_);
		_tmp8_ = _tmp15_;
	} else {
		_g_object_unref0 (_tmp8_);
		_tmp8_ = NULL;
	}
	result = _tmp8_;
	return result;
}

static GeeTreeMap*
gee_tree_map_sub_entry_set_get_map (GeeTreeMapSubEntrySet* self)
{
	GeeTreeMap* result;
	GeeTreeMap* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_map;
	result = _tmp0_;
	return result;
}

static void
gee_tree_map_sub_entry_set_set_map (GeeTreeMapSubEntrySet* self,
                                    GeeTreeMap* value)
{
	GeeTreeMap* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_map);
	self->priv->_map = _tmp0_;
}

static GeeTreeMapRange*
gee_tree_map_sub_entry_set_get_range (GeeTreeMapSubEntrySet* self)
{
	GeeTreeMapRange* result;
	GeeTreeMapRange* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_range;
	result = _tmp0_;
	return result;
}

static void
gee_tree_map_sub_entry_set_set_range (GeeTreeMapSubEntrySet* self,
                                      GeeTreeMapRange* value)
{
	GeeTreeMapRange* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _gee_tree_map_range_ref0 (value);
	_gee_tree_map_range_unref0 (self->priv->_range);
	self->priv->_range = _tmp0_;
}

static gint
gee_tree_map_sub_entry_set_real_get_size (GeeAbstractCollection* base)
{
	gint result;
	GeeTreeMapSubEntrySet* self;
	gint i = 0;
	GeeIterator* iterator = NULL;
	GeeIterator* _tmp0_;
	self = (GeeTreeMapSubEntrySet*) base;
	i = 0;
	_tmp0_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) self);
	iterator = _tmp0_;
	while (TRUE) {
		GeeIterator* _tmp1_;
		gint _tmp2_;
		_tmp1_ = iterator;
		if (!gee_iterator_next (_tmp1_)) {
			break;
		}
		_tmp2_ = i;
		i = _tmp2_ + 1;
	}
	result = i;
	_g_object_unref0 (iterator);
	return result;
}

static gboolean
gee_tree_map_sub_entry_set_real_get_read_only (GeeAbstractCollection* base)
{
	gboolean result;
	GeeTreeMapSubEntrySet* self;
	self = (GeeTreeMapSubEntrySet*) base;
	result = TRUE;
	return result;
}

static gboolean
gee_tree_map_sub_entry_set_get_is_empty (GeeTreeMapSubEntrySet* self)
{
	gboolean result;
	GeeTreeMapRange* _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_range;
	result = gee_tree_map_range_empty_submap (_tmp0_);
	return result;
}

static void
gee_tree_map_sub_entry_set_class_init (GeeTreeMapSubEntrySetClass * klass,
                                       gpointer klass_data)
{
	gee_tree_map_sub_entry_set_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapSubEntrySet_private_offset);
	((GeeAbstractCollectionClass *) klass)->iterator = (GeeIterator* (*) (GeeAbstractCollection*)) gee_tree_map_sub_entry_set_real_iterator;
	((GeeAbstractCollectionClass *) klass)->add = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_sub_entry_set_real_add;
	((GeeAbstractCollectionClass *) klass)->clear = (void (*) (GeeAbstractCollection*)) gee_tree_map_sub_entry_set_real_clear;
	((GeeAbstractCollectionClass *) klass)->remove = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_sub_entry_set_real_remove;
	((GeeAbstractCollectionClass *) klass)->contains = (gboolean (*) (GeeAbstractCollection*, gconstpointer)) gee_tree_map_sub_entry_set_real_contains;
	((GeeAbstractBidirSortedSetClass *) klass)->bidir_iterator = (GeeBidirIterator* (*) (GeeAbstractBidirSortedSet*)) gee_tree_map_sub_entry_set_real_bidir_iterator;
	((GeeAbstractSortedSetClass *) klass)->first = (gpointer (*) (GeeAbstractSortedSet*)) gee_tree_map_sub_entry_set_real_first;
	((GeeAbstractSortedSetClass *) klass)->last = (gpointer (*) (GeeAbstractSortedSet*)) gee_tree_map_sub_entry_set_real_last;
	((GeeAbstractSortedSetClass *) klass)->head_set = (GeeSortedSet* (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_sub_entry_set_real_head_set;
	((GeeAbstractSortedSetClass *) klass)->tail_set = (GeeSortedSet* (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_sub_entry_set_real_tail_set;
	((GeeAbstractSortedSetClass *) klass)->sub_set = (GeeSortedSet* (*) (GeeAbstractSortedSet*, gconstpointer, gconstpointer)) gee_tree_map_sub_entry_set_real_sub_set;
	((GeeAbstractSortedSetClass *) klass)->iterator_at = (GeeIterator* (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_sub_entry_set_real_iterator_at;
	((GeeAbstractSortedSetClass *) klass)->lower = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_sub_entry_set_real_lower;
	((GeeAbstractSortedSetClass *) klass)->higher = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_sub_entry_set_real_higher;
	((GeeAbstractSortedSetClass *) klass)->floor = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_sub_entry_set_real_floor;
	((GeeAbstractSortedSetClass *) klass)->ceil = (gpointer (*) (GeeAbstractSortedSet*, gconstpointer)) gee_tree_map_sub_entry_set_real_ceil;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_size = gee_tree_map_sub_entry_set_real_get_size;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_read_only = gee_tree_map_sub_entry_set_real_get_read_only;
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_sub_entry_set_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_sub_entry_set_set_property;
	G_OBJECT_CLASS (klass)->finalize = gee_tree_map_sub_entry_set_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_SET_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_SET_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_SET_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_SET_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_SET_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_SET_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_SET_MAP_PROPERTY, gee_tree_map_sub_entry_set_properties[GEE_TREE_MAP_SUB_ENTRY_SET_MAP_PROPERTY] = g_param_spec_object ("map", "map", "map", GEE_TYPE_TREE_MAP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_SET_RANGE_PROPERTY, gee_tree_map_sub_entry_set_properties[GEE_TREE_MAP_SUB_ENTRY_SET_RANGE_PROPERTY] = gee_tree_map_param_spec_range ("range", "range", "range", GEE_TREE_MAP_TYPE_RANGE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_SET_SIZE_PROPERTY, gee_tree_map_sub_entry_set_properties[GEE_TREE_MAP_SUB_ENTRY_SET_SIZE_PROPERTY] = g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_SET_READ_ONLY_PROPERTY, gee_tree_map_sub_entry_set_properties[GEE_TREE_MAP_SUB_ENTRY_SET_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_SET_IS_EMPTY_PROPERTY, gee_tree_map_sub_entry_set_properties[GEE_TREE_MAP_SUB_ENTRY_SET_IS_EMPTY_PROPERTY] = g_param_spec_boolean ("is-empty", "is-empty", "is-empty", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gee_tree_map_sub_entry_set_instance_init (GeeTreeMapSubEntrySet * self,
                                          gpointer klass)
{
	self->priv = gee_tree_map_sub_entry_set_get_instance_private (self);
}

static void
gee_tree_map_sub_entry_set_finalize (GObject * obj)
{
	GeeTreeMapSubEntrySet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TREE_MAP_TYPE_SUB_ENTRY_SET, GeeTreeMapSubEntrySet);
	_g_object_unref0 (self->priv->_map);
	_gee_tree_map_range_unref0 (self->priv->_range);
	G_OBJECT_CLASS (gee_tree_map_sub_entry_set_parent_class)->finalize (obj);
}

static GType
gee_tree_map_sub_entry_set_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapSubEntrySetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_sub_entry_set_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapSubEntrySet), 0, (GInstanceInitFunc) gee_tree_map_sub_entry_set_instance_init, NULL };
	GType gee_tree_map_sub_entry_set_type_id;
	gee_tree_map_sub_entry_set_type_id = g_type_register_static (GEE_TYPE_ABSTRACT_BIDIR_SORTED_SET, "GeeTreeMapSubEntrySet", &g_define_type_info, 0);
	GeeTreeMapSubEntrySet_private_offset = g_type_add_instance_private (gee_tree_map_sub_entry_set_type_id, sizeof (GeeTreeMapSubEntrySetPrivate));
	return gee_tree_map_sub_entry_set_type_id;
}

static GType
gee_tree_map_sub_entry_set_get_type (void)
{
	static volatile gsize gee_tree_map_sub_entry_set_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_sub_entry_set_type_id__once)) {
		GType gee_tree_map_sub_entry_set_type_id;
		gee_tree_map_sub_entry_set_type_id = gee_tree_map_sub_entry_set_get_type_once ();
		g_once_init_leave (&gee_tree_map_sub_entry_set_type_id__once, gee_tree_map_sub_entry_set_type_id);
	}
	return gee_tree_map_sub_entry_set_type_id__once;
}

static void
_vala_gee_tree_map_sub_entry_set_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	GeeTreeMapSubEntrySet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_ENTRY_SET, GeeTreeMapSubEntrySet);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_ENTRY_SET_MAP_PROPERTY:
		g_value_set_object (value, gee_tree_map_sub_entry_set_get_map (self));
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_RANGE_PROPERTY:
		gee_tree_map_value_set_range (value, gee_tree_map_sub_entry_set_get_range (self));
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_SIZE_PROPERTY:
		g_value_set_int (value, gee_abstract_collection_get_size ((GeeAbstractCollection*) self));
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_READ_ONLY_PROPERTY:
		g_value_set_boolean (value, gee_abstract_collection_get_read_only ((GeeAbstractCollection*) self));
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_IS_EMPTY_PROPERTY:
		g_value_set_boolean (value, gee_tree_map_sub_entry_set_get_is_empty (self));
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_sub_entry_set_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec)
{
	GeeTreeMapSubEntrySet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_ENTRY_SET, GeeTreeMapSubEntrySet);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_ENTRY_SET_MAP_PROPERTY:
		gee_tree_map_sub_entry_set_set_map (self, g_value_get_object (value));
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_RANGE_PROPERTY:
		gee_tree_map_sub_entry_set_set_range (self, gee_tree_map_value_get_range (value));
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_SET_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_node_iterator_get_instance_private (GeeTreeMapNodeIterator* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapNodeIterator_private_offset);
}

static GeeTreeMapNodeIterator*
gee_tree_map_node_iterator_construct (GType object_type,
                                      GType k_type,
                                      GBoxedCopyFunc k_dup_func,
                                      GDestroyNotify k_destroy_func,
                                      GType v_type,
                                      GBoxedCopyFunc v_dup_func,
                                      GDestroyNotify v_destroy_func,
                                      GeeTreeMap* map)
{
	GeeTreeMapNodeIterator * self = NULL;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	g_return_val_if_fail (map != NULL, NULL);
	self = (GeeTreeMapNodeIterator*) g_object_new (object_type, "k-type", k_type, "k-dup-func", k_dup_func, "k-destroy-func", k_destroy_func, "v-type", v_type, "v-dup-func", v_dup_func, "v-destroy-func", v_destroy_func, NULL);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = _g_object_ref0 (map);
	_g_object_unref0 (self->_map);
	self->_map = _tmp0_;
	_tmp1_ = self->_map;
	self->stamp = _tmp1_->priv->stamp;
	return self;
}

static GeeTreeMapNodeIterator*
gee_tree_map_node_iterator_new (GType k_type,
                                GBoxedCopyFunc k_dup_func,
                                GDestroyNotify k_destroy_func,
                                GType v_type,
                                GBoxedCopyFunc v_dup_func,
                                GDestroyNotify v_destroy_func,
                                GeeTreeMap* map)
{
	return gee_tree_map_node_iterator_construct (GEE_TREE_MAP_TYPE_NODE_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map);
}

static GeeTreeMapNodeIterator*
gee_tree_map_node_iterator_construct_pointing (GType object_type,
                                               GType k_type,
                                               GBoxedCopyFunc k_dup_func,
                                               GDestroyNotify k_destroy_func,
                                               GType v_type,
                                               GBoxedCopyFunc v_dup_func,
                                               GDestroyNotify v_destroy_func,
                                               GeeTreeMap* map,
                                               GeeTreeMapNode* current)
{
	GeeTreeMapNodeIterator * self = NULL;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (current != NULL, NULL);
	self = (GeeTreeMapNodeIterator*) g_object_new (object_type, "k-type", k_type, "k-dup-func", k_dup_func, "k-destroy-func", k_destroy_func, "v-type", v_type, "v-dup-func", v_dup_func, "v-destroy-func", v_destroy_func, NULL);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = _g_object_ref0 (map);
	_g_object_unref0 (self->_map);
	self->_map = _tmp0_;
	_tmp1_ = self->_map;
	self->stamp = _tmp1_->priv->stamp;
	self->current = current;
	return self;
}

static GeeTreeMapNodeIterator*
gee_tree_map_node_iterator_new_pointing (GType k_type,
                                         GBoxedCopyFunc k_dup_func,
                                         GDestroyNotify k_destroy_func,
                                         GType v_type,
                                         GBoxedCopyFunc v_dup_func,
                                         GDestroyNotify v_destroy_func,
                                         GeeTreeMap* map,
                                         GeeTreeMapNode* current)
{
	return gee_tree_map_node_iterator_construct_pointing (GEE_TREE_MAP_TYPE_NODE_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, current);
}

static GeeTreeMapNodeIterator*
gee_tree_map_node_iterator_construct_from_iterator (GType object_type,
                                                    GType k_type,
                                                    GBoxedCopyFunc k_dup_func,
                                                    GDestroyNotify k_destroy_func,
                                                    GType v_type,
                                                    GBoxedCopyFunc v_dup_func,
                                                    GDestroyNotify v_destroy_func,
                                                    GeeTreeMapNodeIterator* iter)
{
	GeeTreeMapNodeIterator * self = NULL;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeTreeMapNode* _tmp4_;
	g_return_val_if_fail (iter != NULL, NULL);
	self = (GeeTreeMapNodeIterator*) g_object_new (object_type, "k-type", k_type, "k-dup-func", k_dup_func, "k-destroy-func", k_destroy_func, "v-type", v_type, "v-dup-func", v_dup_func, "v-destroy-func", v_destroy_func, NULL);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = iter->_map;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->_map);
	self->_map = _tmp1_;
	self->stamp = iter->stamp;
	self->started = iter->started;
	_tmp2_ = iter->current;
	self->current = _tmp2_;
	_tmp3_ = iter->_next;
	self->_next = _tmp3_;
	_tmp4_ = iter->_prev;
	self->_prev = _tmp4_;
	return self;
}

static GeeTreeMapNodeIterator*
gee_tree_map_node_iterator_new_from_iterator (GType k_type,
                                              GBoxedCopyFunc k_dup_func,
                                              GDestroyNotify k_destroy_func,
                                              GType v_type,
                                              GBoxedCopyFunc v_dup_func,
                                              GDestroyNotify v_destroy_func,
                                              GeeTreeMapNodeIterator* iter)
{
	return gee_tree_map_node_iterator_construct_from_iterator (GEE_TREE_MAP_TYPE_NODE_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, iter);
}

static gboolean
gee_tree_map_node_iterator_next (GeeTreeMapNodeIterator* self)
{
	GeeTreeMap* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->_map;
	_vala_assert (self->stamp == _tmp0_->priv->stamp, "stamp == _map.stamp");
	_tmp1_ = self->current;
	if (_tmp1_ != NULL) {
		GeeTreeMapNode* _tmp2_;
		GeeTreeMapNode* _tmp3_;
		_tmp2_ = self->current;
		_tmp3_ = _tmp2_->next;
		if (_tmp3_ != NULL) {
			GeeTreeMapNode* _tmp4_;
			GeeTreeMapNode* _tmp5_;
			_tmp4_ = self->current;
			_tmp5_ = _tmp4_->next;
			self->current = _tmp5_;
			result = TRUE;
			return result;
		} else {
			result = FALSE;
			return result;
		}
	} else {
		gboolean _tmp6_ = FALSE;
		GeeTreeMapNode* _tmp7_;
		_tmp7_ = self->_next;
		if (_tmp7_ == NULL) {
			GeeTreeMapNode* _tmp8_;
			_tmp8_ = self->_prev;
			_tmp6_ = _tmp8_ == NULL;
		} else {
			_tmp6_ = FALSE;
		}
		if (_tmp6_) {
			GeeTreeMap* _tmp9_;
			GeeTreeMapNode* _tmp10_;
			GeeTreeMapNode* _tmp11_;
			_tmp9_ = self->_map;
			_tmp10_ = _tmp9_->priv->first;
			self->current = _tmp10_;
			self->started = TRUE;
			_tmp11_ = self->current;
			result = _tmp11_ != NULL;
			return result;
		} else {
			GeeTreeMapNode* _tmp12_;
			GeeTreeMapNode* _tmp13_;
			GeeTreeMapNode* _tmp14_;
			_tmp12_ = self->_next;
			self->current = _tmp12_;
			_tmp13_ = self->current;
			if (_tmp13_ != NULL) {
				self->_next = NULL;
				self->_prev = NULL;
			}
			_tmp14_ = self->current;
			result = _tmp14_ != NULL;
			return result;
		}
	}
}

static gboolean
gee_tree_map_node_iterator_has_next (GeeTreeMapNodeIterator* self)
{
	GeeTreeMap* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	GeeTreeMapNode* _tmp6_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->_map;
	_vala_assert (self->stamp == _tmp0_->priv->stamp, "stamp == _map.stamp");
	_tmp6_ = self->current;
	if (_tmp6_ == NULL) {
		GeeTreeMapNode* _tmp7_;
		_tmp7_ = self->_next;
		_tmp5_ = _tmp7_ == NULL;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		GeeTreeMapNode* _tmp8_;
		_tmp8_ = self->_prev;
		_tmp4_ = _tmp8_ == NULL;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		GeeTreeMap* _tmp9_;
		GeeTreeMapNode* _tmp10_;
		_tmp9_ = self->_map;
		_tmp10_ = _tmp9_->priv->first;
		_tmp3_ = _tmp10_ != NULL;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		gboolean _tmp11_ = FALSE;
		GeeTreeMapNode* _tmp12_;
		_tmp12_ = self->current;
		if (_tmp12_ == NULL) {
			GeeTreeMapNode* _tmp13_;
			_tmp13_ = self->_next;
			_tmp11_ = _tmp13_ != NULL;
		} else {
			_tmp11_ = FALSE;
		}
		_tmp2_ = _tmp11_;
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		gboolean _tmp14_ = FALSE;
		GeeTreeMapNode* _tmp15_;
		_tmp15_ = self->current;
		if (_tmp15_ != NULL) {
			GeeTreeMapNode* _tmp16_;
			GeeTreeMapNode* _tmp17_;
			_tmp16_ = self->current;
			_tmp17_ = _tmp16_->next;
			_tmp14_ = _tmp17_ != NULL;
		} else {
			_tmp14_ = FALSE;
		}
		_tmp1_ = _tmp14_;
	}
	result = _tmp1_;
	return result;
}

static gboolean
gee_tree_map_node_iterator_first (GeeTreeMapNodeIterator* self)
{
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->_map;
	_vala_assert (self->stamp == _tmp0_->priv->stamp, "stamp == _map.stamp");
	_tmp1_ = self->_map;
	_tmp2_ = _tmp1_->priv->first;
	self->current = _tmp2_;
	self->_next = NULL;
	self->_prev = NULL;
	_tmp3_ = self->current;
	result = _tmp3_ != NULL;
	return result;
}

static gboolean
gee_tree_map_node_iterator_previous (GeeTreeMapNodeIterator* self)
{
	GeeTreeMap* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->_map;
	_vala_assert (self->stamp == _tmp0_->priv->stamp, "stamp == _map.stamp");
	_tmp1_ = self->current;
	if (_tmp1_ != NULL) {
		GeeTreeMapNode* _tmp2_;
		GeeTreeMapNode* _tmp3_;
		_tmp2_ = self->current;
		_tmp3_ = _tmp2_->prev;
		if (_tmp3_ != NULL) {
			GeeTreeMapNode* _tmp4_;
			GeeTreeMapNode* _tmp5_;
			_tmp4_ = self->current;
			_tmp5_ = _tmp4_->prev;
			self->current = _tmp5_;
			result = TRUE;
			return result;
		} else {
			result = FALSE;
			return result;
		}
	} else {
		GeeTreeMapNode* _tmp6_;
		_tmp6_ = self->_prev;
		if (_tmp6_ != NULL) {
			GeeTreeMapNode* _tmp7_;
			_tmp7_ = self->_prev;
			self->current = _tmp7_;
			self->_next = NULL;
			self->_prev = NULL;
			result = TRUE;
			return result;
		} else {
			result = FALSE;
			return result;
		}
	}
}

static gboolean
gee_tree_map_node_iterator_has_previous (GeeTreeMapNodeIterator* self)
{
	GeeTreeMap* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	GeeTreeMapNode* _tmp3_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->_map;
	_vala_assert (self->stamp == _tmp0_->priv->stamp, "stamp == _map.stamp");
	_tmp3_ = self->current;
	if (_tmp3_ == NULL) {
		GeeTreeMapNode* _tmp4_;
		_tmp4_ = self->_prev;
		_tmp2_ = _tmp4_ != NULL;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		gboolean _tmp5_ = FALSE;
		GeeTreeMapNode* _tmp6_;
		_tmp6_ = self->current;
		if (_tmp6_ != NULL) {
			GeeTreeMapNode* _tmp7_;
			GeeTreeMapNode* _tmp8_;
			_tmp7_ = self->current;
			_tmp8_ = _tmp7_->prev;
			_tmp5_ = _tmp8_ != NULL;
		} else {
			_tmp5_ = FALSE;
		}
		_tmp1_ = _tmp5_;
	}
	result = _tmp1_;
	return result;
}

static gboolean
gee_tree_map_node_iterator_last (GeeTreeMapNodeIterator* self)
{
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->_map;
	_vala_assert (self->stamp == _tmp0_->priv->stamp, "stamp == _map.stamp");
	_tmp1_ = self->_map;
	_tmp2_ = _tmp1_->priv->last;
	self->current = _tmp2_;
	self->_next = NULL;
	self->_prev = NULL;
	_tmp3_ = self->current;
	result = _tmp3_ != NULL;
	return result;
}

static void
gee_tree_map_node_iterator_remove (GeeTreeMapNodeIterator* self)
{
	g_return_if_fail (self != NULL);
	g_assert_not_reached ();
}

static void
gee_tree_map_node_iterator_unset (GeeTreeMapNodeIterator* self)
{
	GeeTreeMap* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	gpointer value = NULL;
	gboolean success = FALSE;
	GeeTreeMap* _tmp2_;
	GeeTreeMap* _tmp3_;
	GeeTreeMapNode* _tmp4_;
	gconstpointer _tmp5_;
	gpointer _tmp6_ = NULL;
	GeeTreeMapNode* _tmp7_ = NULL;
	GeeTreeMapNode* _tmp8_ = NULL;
	gboolean _tmp9_;
	GeeTreeMap* _tmp10_;
	GeeTreeMapNode* _tmp11_;
	gint _tmp14_;
	GeeTreeMap* _tmp15_;
	gint _tmp16_;
	GeeTreeMap* _tmp17_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->_map;
	_vala_assert (self->stamp == _tmp0_->priv->stamp, "stamp == _map.stamp");
	_tmp1_ = self->current;
	_vala_assert (_tmp1_ != NULL, "current != null");
	_tmp2_ = self->_map;
	_tmp3_ = self->_map;
	_tmp4_ = self->current;
	_tmp5_ = _tmp4_->key;
	_tmp9_ = gee_tree_map_remove_from_node (_tmp2_, &_tmp3_->priv->root, _tmp5_, &_tmp6_, &_tmp7_, &_tmp8_);
	((value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (value = (self->priv->v_destroy_func (value), NULL));
	value = _tmp6_;
	self->_prev = _tmp7_;
	self->_next = _tmp8_;
	success = _tmp9_;
	_vala_assert (success, "success");
	_tmp10_ = self->_map;
	_tmp11_ = _tmp10_->priv->root;
	if (_tmp11_ != NULL) {
		GeeTreeMap* _tmp12_;
		GeeTreeMapNode* _tmp13_;
		_tmp12_ = self->_map;
		_tmp13_ = _tmp12_->priv->root;
		_tmp13_->color = GEE_TREE_MAP_NODE_COLOR_BLACK;
	}
	self->current = NULL;
	_tmp14_ = self->stamp;
	self->stamp = _tmp14_ + 1;
	_tmp15_ = self->_map;
	_tmp16_ = _tmp15_->priv->stamp;
	_tmp15_->priv->stamp = _tmp16_ + 1;
	_tmp17_ = self->_map;
	_vala_assert (self->stamp == _tmp17_->priv->stamp, "stamp == _map.stamp");
	((value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (value = (self->priv->v_destroy_func (value), NULL));
}

static GeeTreeMapNode*
gee_tree_map_node_iterator_safe_next_get (GeeTreeMapNodeIterator* self)
{
	GeeTreeMapNode* _tmp0_ = NULL;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMapNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->current;
	if (_tmp1_ != NULL) {
		GeeTreeMapNode* _tmp2_;
		GeeTreeMapNode* _tmp3_;
		_tmp2_ = self->current;
		_tmp3_ = _tmp2_->next;
		_tmp0_ = _tmp3_;
	} else {
		GeeTreeMapNode* _tmp4_;
		_tmp4_ = self->_next;
		_tmp0_ = _tmp4_;
	}
	result = _tmp0_;
	return result;
}

static GeeTreeMapNode*
gee_tree_map_node_iterator_safe_previous_get (GeeTreeMapNodeIterator* self)
{
	GeeTreeMapNode* _tmp0_ = NULL;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMapNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->current;
	if (_tmp1_ != NULL) {
		GeeTreeMapNode* _tmp2_;
		GeeTreeMapNode* _tmp3_;
		_tmp2_ = self->current;
		_tmp3_ = _tmp2_->prev;
		_tmp0_ = _tmp3_;
	} else {
		GeeTreeMapNode* _tmp4_;
		_tmp4_ = self->_prev;
		_tmp0_ = _tmp4_;
	}
	result = _tmp0_;
	return result;
}

static gboolean
gee_tree_map_node_iterator_get_read_only (GeeTreeMapNodeIterator* self)
{
	GeeTreeMapNodeIteratorClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = GEE_TREE_MAP_NODE_ITERATOR_GET_CLASS (self);
	if (_klass_->get_read_only) {
		return _klass_->get_read_only (self);
	}
	return FALSE;
}

static gboolean
gee_tree_map_node_iterator_real_get_read_only (GeeTreeMapNodeIterator* base)
{
	gboolean result;
	GeeTreeMapNodeIterator* self;
	self = base;
	result = TRUE;
	return result;
}

static gboolean
gee_tree_map_node_iterator_get_valid (GeeTreeMapNodeIterator* self)
{
	gboolean result;
	GeeTreeMapNode* _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->current;
	result = _tmp0_ != NULL;
	return result;
}

static void
gee_tree_map_node_iterator_class_init (GeeTreeMapNodeIteratorClass * klass,
                                       gpointer klass_data)
{
	gee_tree_map_node_iterator_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapNodeIterator_private_offset);
	GEE_TREE_MAP_NODE_ITERATOR_CLASS (klass)->get_read_only = gee_tree_map_node_iterator_real_get_read_only;
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_node_iterator_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_node_iterator_set_property;
	G_OBJECT_CLASS (klass)->finalize = gee_tree_map_node_iterator_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_NODE_ITERATOR_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_NODE_ITERATOR_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_NODE_ITERATOR_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_NODE_ITERATOR_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_NODE_ITERATOR_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_NODE_ITERATOR_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_NODE_ITERATOR_READ_ONLY_PROPERTY, gee_tree_map_node_iterator_properties[GEE_TREE_MAP_NODE_ITERATOR_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_NODE_ITERATOR_VALID_PROPERTY, gee_tree_map_node_iterator_properties[GEE_TREE_MAP_NODE_ITERATOR_VALID_PROPERTY] = g_param_spec_boolean ("valid", "valid", "valid", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gee_tree_map_node_iterator_instance_init (GeeTreeMapNodeIterator * self,
                                          gpointer klass)
{
	self->priv = gee_tree_map_node_iterator_get_instance_private (self);
	self->started = FALSE;
}

static void
gee_tree_map_node_iterator_finalize (GObject * obj)
{
	GeeTreeMapNodeIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TREE_MAP_TYPE_NODE_ITERATOR, GeeTreeMapNodeIterator);
	_g_object_unref0 (self->_map);
	G_OBJECT_CLASS (gee_tree_map_node_iterator_parent_class)->finalize (obj);
}

static GType
gee_tree_map_node_iterator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapNodeIteratorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_node_iterator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapNodeIterator), 0, (GInstanceInitFunc) gee_tree_map_node_iterator_instance_init, NULL };
	GType gee_tree_map_node_iterator_type_id;
	gee_tree_map_node_iterator_type_id = g_type_register_static (G_TYPE_OBJECT, "GeeTreeMapNodeIterator", &g_define_type_info, 0);
	GeeTreeMapNodeIterator_private_offset = g_type_add_instance_private (gee_tree_map_node_iterator_type_id, sizeof (GeeTreeMapNodeIteratorPrivate));
	return gee_tree_map_node_iterator_type_id;
}

static GType
gee_tree_map_node_iterator_get_type (void)
{
	static volatile gsize gee_tree_map_node_iterator_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_node_iterator_type_id__once)) {
		GType gee_tree_map_node_iterator_type_id;
		gee_tree_map_node_iterator_type_id = gee_tree_map_node_iterator_get_type_once ();
		g_once_init_leave (&gee_tree_map_node_iterator_type_id__once, gee_tree_map_node_iterator_type_id);
	}
	return gee_tree_map_node_iterator_type_id__once;
}

static void
_vala_gee_tree_map_node_iterator_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	GeeTreeMapNodeIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_NODE_ITERATOR, GeeTreeMapNodeIterator);
	switch (property_id) {
		case GEE_TREE_MAP_NODE_ITERATOR_READ_ONLY_PROPERTY:
		g_value_set_boolean (value, gee_tree_map_node_iterator_get_read_only (self));
		break;
		case GEE_TREE_MAP_NODE_ITERATOR_VALID_PROPERTY:
		g_value_set_boolean (value, gee_tree_map_node_iterator_get_valid (self));
		break;
		case GEE_TREE_MAP_NODE_ITERATOR_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_NODE_ITERATOR_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_NODE_ITERATOR_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_NODE_ITERATOR_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_NODE_ITERATOR_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_NODE_ITERATOR_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_node_iterator_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec)
{
	GeeTreeMapNodeIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_NODE_ITERATOR, GeeTreeMapNodeIterator);
	switch (property_id) {
		case GEE_TREE_MAP_NODE_ITERATOR_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_NODE_ITERATOR_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_NODE_ITERATOR_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_NODE_ITERATOR_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_NODE_ITERATOR_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_NODE_ITERATOR_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_sub_node_iterator_get_instance_private (GeeTreeMapSubNodeIterator* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapSubNodeIterator_private_offset);
}

static GeeTreeMapSubNodeIterator*
gee_tree_map_sub_node_iterator_construct (GType object_type,
                                          GType k_type,
                                          GBoxedCopyFunc k_dup_func,
                                          GDestroyNotify k_destroy_func,
                                          GType v_type,
                                          GBoxedCopyFunc v_dup_func,
                                          GDestroyNotify v_destroy_func,
                                          GeeTreeMap* map,
                                          GeeTreeMapRange* range)
{
	GeeTreeMapSubNodeIterator * self = NULL;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (range != NULL, NULL);
	self = (GeeTreeMapSubNodeIterator*) g_object_new (object_type, "k-type", k_type, "k-dup-func", k_dup_func, "k-destroy-func", k_destroy_func, "v-type", v_type, "v-dup-func", v_dup_func, "v-destroy-func", v_destroy_func, NULL);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = _g_object_ref0 (map);
	_g_object_unref0 (self->_map);
	self->_map = _tmp0_;
	_tmp1_ = _gee_tree_map_range_ref0 (range);
	_gee_tree_map_range_unref0 (self->range);
	self->range = _tmp1_;
	return self;
}

static GeeTreeMapSubNodeIterator*
gee_tree_map_sub_node_iterator_new (GType k_type,
                                    GBoxedCopyFunc k_dup_func,
                                    GDestroyNotify k_destroy_func,
                                    GType v_type,
                                    GBoxedCopyFunc v_dup_func,
                                    GDestroyNotify v_destroy_func,
                                    GeeTreeMap* map,
                                    GeeTreeMapRange* range)
{
	return gee_tree_map_sub_node_iterator_construct (GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, range);
}

static GeeTreeMapSubNodeIterator*
gee_tree_map_sub_node_iterator_construct_pointing (GType object_type,
                                                   GType k_type,
                                                   GBoxedCopyFunc k_dup_func,
                                                   GDestroyNotify k_destroy_func,
                                                   GType v_type,
                                                   GBoxedCopyFunc v_dup_func,
                                                   GDestroyNotify v_destroy_func,
                                                   GeeTreeMap* map,
                                                   GeeTreeMapRange* range,
                                                   GeeTreeMapNode* node)
{
	GeeTreeMapSubNodeIterator * self = NULL;
	GeeTreeMap* _tmp0_;
	GeeTreeMapRange* _tmp1_;
	GeeTreeMap* _tmp2_;
	GeeTreeMapNodeIterator* _tmp3_;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (range != NULL, NULL);
	g_return_val_if_fail (node != NULL, NULL);
	self = (GeeTreeMapSubNodeIterator*) g_object_new (object_type, "k-type", k_type, "k-dup-func", k_dup_func, "k-destroy-func", k_destroy_func, "v-type", v_type, "v-dup-func", v_dup_func, "v-destroy-func", v_destroy_func, NULL);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = _g_object_ref0 (map);
	_g_object_unref0 (self->_map);
	self->_map = _tmp0_;
	_tmp1_ = _gee_tree_map_range_ref0 (range);
	_gee_tree_map_range_unref0 (self->range);
	self->range = _tmp1_;
	_tmp2_ = self->_map;
	_tmp3_ = gee_tree_map_node_iterator_new_pointing (k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, _tmp2_, node);
	_g_object_unref0 (self->iterator);
	self->iterator = _tmp3_;
	return self;
}

static GeeTreeMapSubNodeIterator*
gee_tree_map_sub_node_iterator_new_pointing (GType k_type,
                                             GBoxedCopyFunc k_dup_func,
                                             GDestroyNotify k_destroy_func,
                                             GType v_type,
                                             GBoxedCopyFunc v_dup_func,
                                             GDestroyNotify v_destroy_func,
                                             GeeTreeMap* map,
                                             GeeTreeMapRange* range,
                                             GeeTreeMapNode* node)
{
	return gee_tree_map_sub_node_iterator_construct_pointing (GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, range, node);
}

static GeeTreeMapSubNodeIterator*
gee_tree_map_sub_node_iterator_construct_from_iterator (GType object_type,
                                                        GType k_type,
                                                        GBoxedCopyFunc k_dup_func,
                                                        GDestroyNotify k_destroy_func,
                                                        GType v_type,
                                                        GBoxedCopyFunc v_dup_func,
                                                        GDestroyNotify v_destroy_func,
                                                        GeeTreeMapSubNodeIterator* iter)
{
	GeeTreeMapSubNodeIterator * self = NULL;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	GeeTreeMapRange* _tmp2_;
	GeeTreeMapRange* _tmp3_;
	GeeTreeMapNodeIterator* _tmp4_;
	GeeTreeMapNodeIterator* _tmp5_;
	g_return_val_if_fail (iter != NULL, NULL);
	self = (GeeTreeMapSubNodeIterator*) g_object_new (object_type, "k-type", k_type, "k-dup-func", k_dup_func, "k-destroy-func", k_destroy_func, "v-type", v_type, "v-dup-func", v_dup_func, "v-destroy-func", v_destroy_func, NULL);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = iter->_map;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->_map);
	self->_map = _tmp1_;
	_tmp2_ = iter->range;
	_tmp3_ = _gee_tree_map_range_ref0 (_tmp2_);
	_gee_tree_map_range_unref0 (self->range);
	self->range = _tmp3_;
	_tmp4_ = iter->iterator;
	_tmp5_ = gee_tree_map_node_iterator_new_from_iterator (k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, _tmp4_);
	_g_object_unref0 (self->iterator);
	self->iterator = _tmp5_;
	return self;
}

static GeeTreeMapSubNodeIterator*
gee_tree_map_sub_node_iterator_new_from_iterator (GType k_type,
                                                  GBoxedCopyFunc k_dup_func,
                                                  GDestroyNotify k_destroy_func,
                                                  GType v_type,
                                                  GBoxedCopyFunc v_dup_func,
                                                  GDestroyNotify v_destroy_func,
                                                  GeeTreeMapSubNodeIterator* iter)
{
	return gee_tree_map_sub_node_iterator_construct_from_iterator (GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, iter);
}

static gboolean
gee_tree_map_sub_node_iterator_next (GeeTreeMapSubNodeIterator* self)
{
	GeeTreeMapNodeIterator* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->iterator;
	if (_tmp0_ != NULL) {
		GeeTreeMapNode* node = NULL;
		GeeTreeMapNodeIterator* _tmp1_;
		GeeTreeMapNode* _tmp2_;
		gboolean _tmp3_ = FALSE;
		GeeTreeMapNode* _tmp4_;
		_tmp1_ = self->iterator;
		_tmp2_ = gee_tree_map_node_iterator_safe_next_get (_tmp1_);
		node = _tmp2_;
		_tmp4_ = node;
		if (_tmp4_ != NULL) {
			GeeTreeMapRange* _tmp5_;
			GeeTreeMapNode* _tmp6_;
			gconstpointer _tmp7_;
			_tmp5_ = self->range;
			_tmp6_ = node;
			_tmp7_ = _tmp6_->key;
			_tmp3_ = gee_tree_map_range_in_range (_tmp5_, _tmp7_);
		} else {
			_tmp3_ = FALSE;
		}
		if (_tmp3_) {
			GeeTreeMapNodeIterator* _tmp8_;
			_tmp8_ = self->iterator;
			_vala_assert (gee_tree_map_node_iterator_next (_tmp8_), "iterator.next ()");
			result = TRUE;
			return result;
		} else {
			result = FALSE;
			return result;
		}
	} else {
		result = gee_tree_map_sub_node_iterator_first (self);
		return result;
	}
}

static gboolean
gee_tree_map_sub_node_iterator_has_next (GeeTreeMapSubNodeIterator* self)
{
	GeeTreeMapNodeIterator* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->iterator;
	if (_tmp0_ != NULL) {
		GeeTreeMapNode* node = NULL;
		GeeTreeMapNodeIterator* _tmp1_;
		GeeTreeMapNode* _tmp2_;
		gboolean _tmp3_ = FALSE;
		GeeTreeMapNode* _tmp4_;
		_tmp1_ = self->iterator;
		_tmp2_ = gee_tree_map_node_iterator_safe_next_get (_tmp1_);
		node = _tmp2_;
		_tmp4_ = node;
		if (_tmp4_ != NULL) {
			GeeTreeMapRange* _tmp5_;
			GeeTreeMapNode* _tmp6_;
			gconstpointer _tmp7_;
			_tmp5_ = self->range;
			_tmp6_ = node;
			_tmp7_ = _tmp6_->key;
			_tmp3_ = gee_tree_map_range_in_range (_tmp5_, _tmp7_);
		} else {
			_tmp3_ = FALSE;
		}
		result = _tmp3_;
		return result;
	} else {
		GeeTreeMapRange* _tmp8_;
		GeeTreeMapNode* _tmp9_;
		_tmp8_ = self->range;
		_tmp9_ = gee_tree_map_range_first (_tmp8_);
		result = _tmp9_ != NULL;
		return result;
	}
}

static gboolean
gee_tree_map_sub_node_iterator_real_first (GeeTreeMapSubNodeIterator* self)
{
	GeeTreeMapNode* node = NULL;
	GeeTreeMapRange* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeTreeMapNodeIterator* _tmp4_;
	gboolean result;
	_tmp0_ = self->range;
	_tmp1_ = gee_tree_map_range_first (_tmp0_);
	node = _tmp1_;
	_tmp2_ = node;
	if (_tmp2_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp3_ = node;
	_tmp4_ = gee_tree_map_sub_node_iterator_iterator_pointing_at (self, _tmp3_);
	_g_object_unref0 (self->iterator);
	self->iterator = _tmp4_;
	result = TRUE;
	return result;
}

gboolean
gee_tree_map_sub_node_iterator_first (GeeTreeMapSubNodeIterator* self)
{
	GeeTreeMapSubNodeIteratorClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = GEE_TREE_MAP_SUB_NODE_ITERATOR_GET_CLASS (self);
	if (_klass_->first) {
		return _klass_->first (self);
	}
	return FALSE;
}

static gboolean
gee_tree_map_sub_node_iterator_previous (GeeTreeMapSubNodeIterator* self)
{
	GeeTreeMapNodeIterator* _tmp0_;
	GeeTreeMapNode* node = NULL;
	gboolean _tmp1_ = FALSE;
	GeeTreeMapNodeIterator* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeTreeMapNode* _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->iterator;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp2_ = self->iterator;
	_tmp3_ = gee_tree_map_node_iterator_safe_previous_get (_tmp2_);
	node = _tmp3_;
	_tmp4_ = node;
	if (_tmp4_ != NULL) {
		GeeTreeMapRange* _tmp5_;
		GeeTreeMapNode* _tmp6_;
		gconstpointer _tmp7_;
		_tmp5_ = self->range;
		_tmp6_ = node;
		_tmp7_ = _tmp6_->key;
		_tmp1_ = gee_tree_map_range_in_range (_tmp5_, _tmp7_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GeeTreeMapNodeIterator* _tmp8_;
		_tmp8_ = self->iterator;
		_vala_assert (gee_tree_map_node_iterator_previous (_tmp8_), "iterator.previous ()");
		result = TRUE;
		return result;
	} else {
		result = FALSE;
		return result;
	}
}

static gboolean
gee_tree_map_sub_node_iterator_has_previous (GeeTreeMapSubNodeIterator* self)
{
	GeeTreeMapNodeIterator* _tmp0_;
	GeeTreeMapNode* node = NULL;
	gboolean _tmp1_ = FALSE;
	GeeTreeMapNodeIterator* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeTreeMapNode* _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->iterator;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp2_ = self->iterator;
	_tmp3_ = gee_tree_map_node_iterator_safe_previous_get (_tmp2_);
	node = _tmp3_;
	_tmp4_ = node;
	if (_tmp4_ != NULL) {
		GeeTreeMapRange* _tmp5_;
		GeeTreeMapNode* _tmp6_;
		gconstpointer _tmp7_;
		_tmp5_ = self->range;
		_tmp6_ = node;
		_tmp7_ = _tmp6_->key;
		_tmp1_ = gee_tree_map_range_in_range (_tmp5_, _tmp7_);
	} else {
		_tmp1_ = FALSE;
	}
	result = _tmp1_;
	return result;
}

static gboolean
gee_tree_map_sub_node_iterator_real_last (GeeTreeMapSubNodeIterator* self)
{
	GeeTreeMapNode* node = NULL;
	GeeTreeMapRange* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeTreeMapNodeIterator* _tmp4_;
	gboolean result;
	_tmp0_ = self->range;
	_tmp1_ = gee_tree_map_range_last (_tmp0_);
	node = _tmp1_;
	_tmp2_ = node;
	if (_tmp2_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp3_ = node;
	_tmp4_ = gee_tree_map_sub_node_iterator_iterator_pointing_at (self, _tmp3_);
	_g_object_unref0 (self->iterator);
	self->iterator = _tmp4_;
	result = TRUE;
	return result;
}

gboolean
gee_tree_map_sub_node_iterator_last (GeeTreeMapSubNodeIterator* self)
{
	GeeTreeMapSubNodeIteratorClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = GEE_TREE_MAP_SUB_NODE_ITERATOR_GET_CLASS (self);
	if (_klass_->last) {
		return _klass_->last (self);
	}
	return FALSE;
}

static void
gee_tree_map_sub_node_iterator_remove (GeeTreeMapSubNodeIterator* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	GeeTreeMapNodeIterator* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gee_tree_map_sub_node_iterator_get_valid (self);
	_tmp1_ = _tmp0_;
	_vala_assert (_tmp1_, "valid");
	_tmp2_ = self->iterator;
	gee_tree_map_node_iterator_remove (_tmp2_);
}

static void
gee_tree_map_sub_node_iterator_unset (GeeTreeMapSubNodeIterator* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	GeeTreeMapNodeIterator* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gee_tree_map_sub_node_iterator_get_valid (self);
	_tmp1_ = _tmp0_;
	_vala_assert (_tmp1_, "valid");
	_tmp2_ = self->iterator;
	gee_tree_map_node_iterator_unset (_tmp2_);
}

static GeeTreeMapNodeIterator*
gee_tree_map_sub_node_iterator_real_iterator_pointing_at (GeeTreeMapSubNodeIterator* self,
                                                          GeeTreeMapNode* node)
{
	GeeTreeMap* _tmp0_;
	GeeTreeMapNodeIterator* _tmp1_;
	GeeTreeMapNodeIterator* result;
	g_return_val_if_fail (node != NULL, NULL);
	_tmp0_ = self->_map;
	_tmp1_ = gee_tree_map_node_iterator_new_pointing (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp0_, node);
	result = _tmp1_;
	return result;
}

GeeTreeMapNodeIterator*
gee_tree_map_sub_node_iterator_iterator_pointing_at (GeeTreeMapSubNodeIterator* self,
                                                     GeeTreeMapNode* node)
{
	GeeTreeMapSubNodeIteratorClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = GEE_TREE_MAP_SUB_NODE_ITERATOR_GET_CLASS (self);
	if (_klass_->iterator_pointing_at) {
		return _klass_->iterator_pointing_at (self, node);
	}
	return NULL;
}

static gboolean
gee_tree_map_sub_node_iterator_get_read_only (GeeTreeMapSubNodeIterator* self)
{
	GeeTreeMapSubNodeIteratorClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = GEE_TREE_MAP_SUB_NODE_ITERATOR_GET_CLASS (self);
	if (_klass_->get_read_only) {
		return _klass_->get_read_only (self);
	}
	return FALSE;
}

static gboolean
gee_tree_map_sub_node_iterator_real_get_read_only (GeeTreeMapSubNodeIterator* base)
{
	gboolean result;
	GeeTreeMapSubNodeIterator* self;
	self = base;
	result = TRUE;
	return result;
}

static gboolean
gee_tree_map_sub_node_iterator_get_valid (GeeTreeMapSubNodeIterator* self)
{
	gboolean result;
	gboolean _tmp0_ = FALSE;
	GeeTreeMapNodeIterator* _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->iterator;
	if (_tmp1_ != NULL) {
		GeeTreeMapNodeIterator* _tmp2_;
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp2_ = self->iterator;
		_tmp3_ = gee_tree_map_node_iterator_get_valid (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static void
gee_tree_map_sub_node_iterator_class_init (GeeTreeMapSubNodeIteratorClass * klass,
                                           gpointer klass_data)
{
	gee_tree_map_sub_node_iterator_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapSubNodeIterator_private_offset);
	((GeeTreeMapSubNodeIteratorClass *) klass)->first = (gboolean (*) (GeeTreeMapSubNodeIterator*)) gee_tree_map_sub_node_iterator_real_first;
	((GeeTreeMapSubNodeIteratorClass *) klass)->last = (gboolean (*) (GeeTreeMapSubNodeIterator*)) gee_tree_map_sub_node_iterator_real_last;
	((GeeTreeMapSubNodeIteratorClass *) klass)->iterator_pointing_at = (GeeTreeMapNodeIterator* (*) (GeeTreeMapSubNodeIterator*, GeeTreeMapNode*)) gee_tree_map_sub_node_iterator_real_iterator_pointing_at;
	GEE_TREE_MAP_SUB_NODE_ITERATOR_CLASS (klass)->get_read_only = gee_tree_map_sub_node_iterator_real_get_read_only;
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_sub_node_iterator_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_sub_node_iterator_set_property;
	G_OBJECT_CLASS (klass)->finalize = gee_tree_map_sub_node_iterator_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_NODE_ITERATOR_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_NODE_ITERATOR_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_NODE_ITERATOR_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_NODE_ITERATOR_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_NODE_ITERATOR_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_NODE_ITERATOR_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_NODE_ITERATOR_READ_ONLY_PROPERTY, gee_tree_map_sub_node_iterator_properties[GEE_TREE_MAP_SUB_NODE_ITERATOR_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_NODE_ITERATOR_VALID_PROPERTY, gee_tree_map_sub_node_iterator_properties[GEE_TREE_MAP_SUB_NODE_ITERATOR_VALID_PROPERTY] = g_param_spec_boolean ("valid", "valid", "valid", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gee_tree_map_sub_node_iterator_instance_init (GeeTreeMapSubNodeIterator * self,
                                              gpointer klass)
{
	self->priv = gee_tree_map_sub_node_iterator_get_instance_private (self);
	self->iterator = NULL;
}

static void
gee_tree_map_sub_node_iterator_finalize (GObject * obj)
{
	GeeTreeMapSubNodeIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR, GeeTreeMapSubNodeIterator);
	_g_object_unref0 (self->_map);
	_gee_tree_map_range_unref0 (self->range);
	_g_object_unref0 (self->iterator);
	G_OBJECT_CLASS (gee_tree_map_sub_node_iterator_parent_class)->finalize (obj);
}

static GType
gee_tree_map_sub_node_iterator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapSubNodeIteratorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_sub_node_iterator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapSubNodeIterator), 0, (GInstanceInitFunc) gee_tree_map_sub_node_iterator_instance_init, NULL };
	GType gee_tree_map_sub_node_iterator_type_id;
	gee_tree_map_sub_node_iterator_type_id = g_type_register_static (G_TYPE_OBJECT, "GeeTreeMapSubNodeIterator", &g_define_type_info, 0);
	GeeTreeMapSubNodeIterator_private_offset = g_type_add_instance_private (gee_tree_map_sub_node_iterator_type_id, sizeof (GeeTreeMapSubNodeIteratorPrivate));
	return gee_tree_map_sub_node_iterator_type_id;
}

static GType
gee_tree_map_sub_node_iterator_get_type (void)
{
	static volatile gsize gee_tree_map_sub_node_iterator_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_sub_node_iterator_type_id__once)) {
		GType gee_tree_map_sub_node_iterator_type_id;
		gee_tree_map_sub_node_iterator_type_id = gee_tree_map_sub_node_iterator_get_type_once ();
		g_once_init_leave (&gee_tree_map_sub_node_iterator_type_id__once, gee_tree_map_sub_node_iterator_type_id);
	}
	return gee_tree_map_sub_node_iterator_type_id__once;
}

static void
_vala_gee_tree_map_sub_node_iterator_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec)
{
	GeeTreeMapSubNodeIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR, GeeTreeMapSubNodeIterator);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_NODE_ITERATOR_READ_ONLY_PROPERTY:
		g_value_set_boolean (value, gee_tree_map_sub_node_iterator_get_read_only (self));
		break;
		case GEE_TREE_MAP_SUB_NODE_ITERATOR_VALID_PROPERTY:
		g_value_set_boolean (value, gee_tree_map_sub_node_iterator_get_valid (self));
		break;
		case GEE_TREE_MAP_SUB_NODE_ITERATOR_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_SUB_NODE_ITERATOR_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_SUB_NODE_ITERATOR_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_SUB_NODE_ITERATOR_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_SUB_NODE_ITERATOR_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_SUB_NODE_ITERATOR_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_sub_node_iterator_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec)
{
	GeeTreeMapSubNodeIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR, GeeTreeMapSubNodeIterator);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_NODE_ITERATOR_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_NODE_ITERATOR_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_NODE_ITERATOR_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_NODE_ITERATOR_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_NODE_ITERATOR_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_NODE_ITERATOR_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_key_iterator_get_instance_private (GeeTreeMapKeyIterator* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapKeyIterator_private_offset);
}

static GeeTreeMapKeyIterator*
gee_tree_map_key_iterator_construct (GType object_type,
                                     GType k_type,
                                     GBoxedCopyFunc k_dup_func,
                                     GDestroyNotify k_destroy_func,
                                     GType v_type,
                                     GBoxedCopyFunc v_dup_func,
                                     GDestroyNotify v_destroy_func,
                                     GeeTreeMap* map)
{
	GeeTreeMapKeyIterator * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	self = (GeeTreeMapKeyIterator*) gee_tree_map_node_iterator_construct (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, map);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapKeyIterator*
gee_tree_map_key_iterator_new (GType k_type,
                               GBoxedCopyFunc k_dup_func,
                               GDestroyNotify k_destroy_func,
                               GType v_type,
                               GBoxedCopyFunc v_dup_func,
                               GDestroyNotify v_destroy_func,
                               GeeTreeMap* map)
{
	return gee_tree_map_key_iterator_construct (GEE_TREE_MAP_TYPE_KEY_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map);
}

static GeeTreeMapKeyIterator*
gee_tree_map_key_iterator_construct_pointing (GType object_type,
                                              GType k_type,
                                              GBoxedCopyFunc k_dup_func,
                                              GDestroyNotify k_destroy_func,
                                              GType v_type,
                                              GBoxedCopyFunc v_dup_func,
                                              GDestroyNotify v_destroy_func,
                                              GeeTreeMap* map,
                                              GeeTreeMapNode* current)
{
	GeeTreeMapKeyIterator * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (current != NULL, NULL);
	self = (GeeTreeMapKeyIterator*) gee_tree_map_node_iterator_construct_pointing (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, map, current);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapKeyIterator*
gee_tree_map_key_iterator_new_pointing (GType k_type,
                                        GBoxedCopyFunc k_dup_func,
                                        GDestroyNotify k_destroy_func,
                                        GType v_type,
                                        GBoxedCopyFunc v_dup_func,
                                        GDestroyNotify v_destroy_func,
                                        GeeTreeMap* map,
                                        GeeTreeMapNode* current)
{
	return gee_tree_map_key_iterator_construct_pointing (GEE_TREE_MAP_TYPE_KEY_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, current);
}

static GeeTreeMapKeyIterator*
gee_tree_map_key_iterator_construct_from_iterator (GType object_type,
                                                   GType k_type,
                                                   GBoxedCopyFunc k_dup_func,
                                                   GDestroyNotify k_destroy_func,
                                                   GType v_type,
                                                   GBoxedCopyFunc v_dup_func,
                                                   GDestroyNotify v_destroy_func,
                                                   GeeTreeMapKeyIterator* iterator)
{
	GeeTreeMapKeyIterator * self = NULL;
	g_return_val_if_fail (iterator != NULL, NULL);
	self = (GeeTreeMapKeyIterator*) gee_tree_map_node_iterator_construct_from_iterator (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, (GeeTreeMapNodeIterator*) iterator);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapKeyIterator*
gee_tree_map_key_iterator_new_from_iterator (GType k_type,
                                             GBoxedCopyFunc k_dup_func,
                                             GDestroyNotify k_destroy_func,
                                             GType v_type,
                                             GBoxedCopyFunc v_dup_func,
                                             GDestroyNotify v_destroy_func,
                                             GeeTreeMapKeyIterator* iterator)
{
	return gee_tree_map_key_iterator_construct_from_iterator (GEE_TREE_MAP_TYPE_KEY_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, iterator);
}

static gpointer
gee_tree_map_key_iterator_real_get (GeeIterator* base)
{
	GeeTreeMapKeyIterator * self;
	GeeTreeMap* _tmp0_;
	GeeTreeMapNode* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	gconstpointer _tmp3_;
	gpointer _tmp4_;
	gpointer result;
	self = (GeeTreeMapKeyIterator*) base;
	_tmp0_ = ((GeeTreeMapNodeIterator*) self)->_map;
	_vala_assert (((GeeTreeMapNodeIterator*) self)->stamp == _tmp0_->priv->stamp, "stamp == _map.stamp");
	_tmp1_ = ((GeeTreeMapNodeIterator*) self)->current;
	_vala_assert (_tmp1_ != NULL, "current != null");
	_tmp2_ = ((GeeTreeMapNodeIterator*) self)->current;
	_tmp3_ = _tmp2_->key;
	_tmp4_ = ((_tmp3_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp3_) : ((gpointer) _tmp3_);
	result = _tmp4_;
	return result;
}

static gboolean
gee_tree_map_key_iterator_real_foreach (GeeTraversable* base,
                                        GeeForallFunc f,
                                        gpointer f_target)
{
	GeeTreeMapKeyIterator * self;
	GeeTreeMapNode* _tmp0_;
	gboolean result;
	self = (GeeTreeMapKeyIterator*) base;
	_tmp0_ = ((GeeTreeMapNodeIterator*) self)->current;
	if (_tmp0_ != NULL) {
		GeeTreeMapNode* _tmp1_;
		gconstpointer _tmp2_;
		gpointer _tmp3_;
		GeeTreeMapNode* _tmp4_;
		GeeTreeMapNode* _tmp5_;
		_tmp1_ = ((GeeTreeMapNodeIterator*) self)->current;
		_tmp2_ = _tmp1_->key;
		_tmp3_ = ((_tmp2_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp2_) : ((gpointer) _tmp2_);
		if (!f (_tmp3_, f_target)) {
			result = FALSE;
			return result;
		}
		_tmp4_ = ((GeeTreeMapNodeIterator*) self)->current;
		_tmp5_ = _tmp4_->next;
		((GeeTreeMapNodeIterator*) self)->current = _tmp5_;
	} else {
		GeeTreeMapNode* _tmp6_;
		_tmp6_ = ((GeeTreeMapNodeIterator*) self)->_next;
		if (_tmp6_ == NULL) {
			GeeTreeMap* _tmp7_;
			GeeTreeMapNode* _tmp8_;
			_tmp7_ = ((GeeTreeMapNodeIterator*) self)->_map;
			_tmp8_ = _tmp7_->priv->first;
			((GeeTreeMapNodeIterator*) self)->current = _tmp8_;
			((GeeTreeMapNodeIterator*) self)->started = TRUE;
		} else {
			GeeTreeMapNode* _tmp9_;
			GeeTreeMapNode* _tmp10_;
			_tmp9_ = ((GeeTreeMapNodeIterator*) self)->_next;
			((GeeTreeMapNodeIterator*) self)->current = _tmp9_;
			_tmp10_ = ((GeeTreeMapNodeIterator*) self)->current;
			if (_tmp10_ != NULL) {
				((GeeTreeMapNodeIterator*) self)->_next = NULL;
				((GeeTreeMapNodeIterator*) self)->_prev = NULL;
			}
		}
	}
	{
		gboolean _tmp11_ = FALSE;
		_tmp11_ = TRUE;
		while (TRUE) {
			GeeTreeMapNode* _tmp14_;
			GeeTreeMapNode* _tmp15_;
			gconstpointer _tmp16_;
			gpointer _tmp17_;
			if (!_tmp11_) {
				GeeTreeMapNode* _tmp12_;
				GeeTreeMapNode* _tmp13_;
				_tmp12_ = ((GeeTreeMapNodeIterator*) self)->current;
				_tmp13_ = _tmp12_->next;
				((GeeTreeMapNodeIterator*) self)->current = _tmp13_;
			}
			_tmp11_ = FALSE;
			_tmp14_ = ((GeeTreeMapNodeIterator*) self)->current;
			if (!(_tmp14_ != NULL)) {
				break;
			}
			_tmp15_ = ((GeeTreeMapNodeIterator*) self)->current;
			_tmp16_ = _tmp15_->key;
			_tmp17_ = ((_tmp16_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp16_) : ((gpointer) _tmp16_);
			if (!f (_tmp17_, f_target)) {
				result = FALSE;
				return result;
			}
		}
	}
	result = TRUE;
	return result;
}

static GeeIterator**
gee_tree_map_key_iterator_real_tee (GeeTraversable* base,
                                    guint forks,
                                    gint* result_length1)
{
	GeeTreeMapKeyIterator * self;
	GeeIterator** result;
	self = (GeeTreeMapKeyIterator*) base;
	if (forks == ((guint) 0)) {
		GeeIterator** _tmp0_;
		GeeIterator** _tmp1_;
		gint _tmp1__length1;
		_tmp0_ = g_new0 (GeeIterator*, 0 + 1);
		_tmp1_ = _tmp0_;
		_tmp1__length1 = 0;
		if (result_length1) {
			*result_length1 = _tmp1__length1;
		}
		result = _tmp1_;
		return result;
	} else {
		GeeIterator** _result_ = NULL;
		GeeIterator** _tmp2_;
		gint _result__length1;
		gint __result__size_;
		GeeIterator** _tmp3_;
		gint _tmp3__length1;
		GeeIterator* _tmp4_;
		GeeIterator** _tmp9_;
		gint _tmp9__length1;
		_tmp2_ = g_new0 (GeeIterator*, forks + 1);
		_result_ = _tmp2_;
		_result__length1 = forks;
		__result__size_ = _result__length1;
		_tmp3_ = _result_;
		_tmp3__length1 = _result__length1;
		_tmp4_ = _g_object_ref0 ((GeeIterator*) self);
		_g_object_unref0 (_tmp3_[0]);
		_tmp3_[0] = _tmp4_;
		{
			guint i = 0U;
			i = (guint) 1;
			{
				gboolean _tmp5_ = FALSE;
				_tmp5_ = TRUE;
				while (TRUE) {
					GeeIterator** _tmp7_;
					gint _tmp7__length1;
					GeeTreeMapKeyIterator* _tmp8_;
					if (!_tmp5_) {
						guint _tmp6_;
						_tmp6_ = i;
						i = _tmp6_ + 1;
					}
					_tmp5_ = FALSE;
					if (!(i < forks)) {
						break;
					}
					_tmp7_ = _result_;
					_tmp7__length1 = _result__length1;
					_tmp8_ = gee_tree_map_key_iterator_new_from_iterator (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self);
					_g_object_unref0 (_tmp7_[i]);
					_tmp7_[i] = (GeeIterator*) _tmp8_;
				}
			}
		}
		_tmp9_ = _result_;
		_tmp9__length1 = _result__length1;
		if (result_length1) {
			*result_length1 = _tmp9__length1;
		}
		result = _tmp9_;
		return result;
	}
}

static void
gee_tree_map_key_iterator_class_init (GeeTreeMapKeyIteratorClass * klass,
                                      gpointer klass_data)
{
	gee_tree_map_key_iterator_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapKeyIterator_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_key_iterator_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_key_iterator_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEY_ITERATOR_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEY_ITERATOR_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEY_ITERATOR_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEY_ITERATOR_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEY_ITERATOR_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEY_ITERATOR_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}

static GType
gee_tree_map_key_iterator_gee_traversable_get_g_type (GeeTreeMapKeyIterator* self)
{
	return self->priv->k_type;
}

static GBoxedCopyFunc
gee_tree_map_key_iterator_gee_traversable_get_g_dup_func (GeeTreeMapKeyIterator* self)
{
	return self->priv->k_dup_func;
}

static GDestroyNotify
gee_tree_map_key_iterator_gee_traversable_get_g_destroy_func (GeeTreeMapKeyIterator* self)
{
	return self->priv->k_destroy_func;
}

static void
gee_tree_map_key_iterator_gee_traversable_interface_init (GeeTraversableIface * iface,
                                                          gpointer iface_data)
{
	gee_tree_map_key_iterator_gee_traversable_parent_iface = g_type_interface_peek_parent (iface);
	iface->foreach = (gboolean (*) (GeeTraversable*, GeeForallFunc, gpointer)) gee_tree_map_key_iterator_real_foreach;
	iface->tee = (GeeIterator** (*) (GeeTraversable*, guint, gint*)) gee_tree_map_key_iterator_real_tee;
	iface->get_g_type = (GType (*) (GeeTraversable *)) gee_tree_map_key_iterator_gee_traversable_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeTraversable *)) gee_tree_map_key_iterator_gee_traversable_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify (*) (GeeTraversable *)) gee_tree_map_key_iterator_gee_traversable_get_g_destroy_func;
}

static void
gee_tree_map_key_iterator_gee_iterator_interface_init (GeeIteratorIface * iface,
                                                       gpointer iface_data)
{
	gee_tree_map_key_iterator_gee_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get = (gpointer (*) (GeeIterator*)) gee_tree_map_key_iterator_real_get;
	iface->remove = (void (*) (GeeIterator*)) gee_tree_map_node_iterator_remove;
	iface->next = (gboolean (*) (GeeIterator*)) gee_tree_map_node_iterator_next;
	iface->has_next = (gboolean (*) (GeeIterator*)) gee_tree_map_node_iterator_has_next;
	iface->get_valid = (gboolean (*) (GeeIterator *)) gee_tree_map_node_iterator_get_valid;
	iface->get_read_only = (gboolean (*) (GeeIterator *)) gee_tree_map_node_iterator_get_read_only;
}

static GType
gee_tree_map_key_iterator_gee_bidir_iterator_get_g_type (GeeTreeMapKeyIterator* self)
{
	return self->priv->k_type;
}

static GBoxedCopyFunc
gee_tree_map_key_iterator_gee_bidir_iterator_get_g_dup_func (GeeTreeMapKeyIterator* self)
{
	return self->priv->k_dup_func;
}

static GDestroyNotify
gee_tree_map_key_iterator_gee_bidir_iterator_get_g_destroy_func (GeeTreeMapKeyIterator* self)
{
	return self->priv->k_destroy_func;
}

static void
gee_tree_map_key_iterator_gee_bidir_iterator_interface_init (GeeBidirIteratorIface * iface,
                                                             gpointer iface_data)
{
	gee_tree_map_key_iterator_gee_bidir_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_g_type = (GType (*) (GeeBidirIterator *)) gee_tree_map_key_iterator_gee_bidir_iterator_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeBidirIterator *)) gee_tree_map_key_iterator_gee_bidir_iterator_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify (*) (GeeBidirIterator *)) gee_tree_map_key_iterator_gee_bidir_iterator_get_g_destroy_func;
	iface->previous = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_node_iterator_previous;
	iface->has_previous = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_node_iterator_has_previous;
	iface->last = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_node_iterator_last;
	iface->first = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_node_iterator_first;
}

static void
gee_tree_map_key_iterator_instance_init (GeeTreeMapKeyIterator * self,
                                         gpointer klass)
{
	self->priv = gee_tree_map_key_iterator_get_instance_private (self);
}

static GType
gee_tree_map_key_iterator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapKeyIteratorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_key_iterator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapKeyIterator), 0, (GInstanceInitFunc) gee_tree_map_key_iterator_instance_init, NULL };
	static const GInterfaceInfo gee_traversable_info = { (GInterfaceInitFunc) gee_tree_map_key_iterator_gee_traversable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_iterator_info = { (GInterfaceInitFunc) gee_tree_map_key_iterator_gee_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_bidir_iterator_info = { (GInterfaceInitFunc) gee_tree_map_key_iterator_gee_bidir_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType gee_tree_map_key_iterator_type_id;
	gee_tree_map_key_iterator_type_id = g_type_register_static (GEE_TREE_MAP_TYPE_NODE_ITERATOR, "GeeTreeMapKeyIterator", &g_define_type_info, 0);
	g_type_add_interface_static (gee_tree_map_key_iterator_type_id, GEE_TYPE_TRAVERSABLE, &gee_traversable_info);
	g_type_add_interface_static (gee_tree_map_key_iterator_type_id, GEE_TYPE_ITERATOR, &gee_iterator_info);
	g_type_add_interface_static (gee_tree_map_key_iterator_type_id, GEE_TYPE_BIDIR_ITERATOR, &gee_bidir_iterator_info);
	GeeTreeMapKeyIterator_private_offset = g_type_add_instance_private (gee_tree_map_key_iterator_type_id, sizeof (GeeTreeMapKeyIteratorPrivate));
	return gee_tree_map_key_iterator_type_id;
}

static GType
gee_tree_map_key_iterator_get_type (void)
{
	static volatile gsize gee_tree_map_key_iterator_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_key_iterator_type_id__once)) {
		GType gee_tree_map_key_iterator_type_id;
		gee_tree_map_key_iterator_type_id = gee_tree_map_key_iterator_get_type_once ();
		g_once_init_leave (&gee_tree_map_key_iterator_type_id__once, gee_tree_map_key_iterator_type_id);
	}
	return gee_tree_map_key_iterator_type_id__once;
}

static void
_vala_gee_tree_map_key_iterator_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec)
{
	GeeTreeMapKeyIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_KEY_ITERATOR, GeeTreeMapKeyIterator);
	switch (property_id) {
		case GEE_TREE_MAP_KEY_ITERATOR_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_KEY_ITERATOR_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_KEY_ITERATOR_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_KEY_ITERATOR_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_KEY_ITERATOR_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_KEY_ITERATOR_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_key_iterator_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec)
{
	GeeTreeMapKeyIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_KEY_ITERATOR, GeeTreeMapKeyIterator);
	switch (property_id) {
		case GEE_TREE_MAP_KEY_ITERATOR_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_KEY_ITERATOR_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_KEY_ITERATOR_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_KEY_ITERATOR_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_KEY_ITERATOR_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_KEY_ITERATOR_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_sub_key_iterator_get_instance_private (GeeTreeMapSubKeyIterator* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapSubKeyIterator_private_offset);
}

static GeeTreeMapSubKeyIterator*
gee_tree_map_sub_key_iterator_construct (GType object_type,
                                         GType k_type,
                                         GBoxedCopyFunc k_dup_func,
                                         GDestroyNotify k_destroy_func,
                                         GType v_type,
                                         GBoxedCopyFunc v_dup_func,
                                         GDestroyNotify v_destroy_func,
                                         GeeTreeMap* map,
                                         GeeTreeMapRange* range)
{
	GeeTreeMapSubKeyIterator * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (range != NULL, NULL);
	self = (GeeTreeMapSubKeyIterator*) gee_tree_map_sub_node_iterator_construct (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, map, range);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapSubKeyIterator*
gee_tree_map_sub_key_iterator_new (GType k_type,
                                   GBoxedCopyFunc k_dup_func,
                                   GDestroyNotify k_destroy_func,
                                   GType v_type,
                                   GBoxedCopyFunc v_dup_func,
                                   GDestroyNotify v_destroy_func,
                                   GeeTreeMap* map,
                                   GeeTreeMapRange* range)
{
	return gee_tree_map_sub_key_iterator_construct (GEE_TREE_MAP_TYPE_SUB_KEY_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, range);
}

static GeeTreeMapSubKeyIterator*
gee_tree_map_sub_key_iterator_construct_pointing (GType object_type,
                                                  GType k_type,
                                                  GBoxedCopyFunc k_dup_func,
                                                  GDestroyNotify k_destroy_func,
                                                  GType v_type,
                                                  GBoxedCopyFunc v_dup_func,
                                                  GDestroyNotify v_destroy_func,
                                                  GeeTreeMap* map,
                                                  GeeTreeMapRange* range,
                                                  GeeTreeMapNode* node)
{
	GeeTreeMapSubKeyIterator * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (range != NULL, NULL);
	g_return_val_if_fail (node != NULL, NULL);
	self = (GeeTreeMapSubKeyIterator*) gee_tree_map_sub_node_iterator_construct_pointing (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, map, range, node);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapSubKeyIterator*
gee_tree_map_sub_key_iterator_new_pointing (GType k_type,
                                            GBoxedCopyFunc k_dup_func,
                                            GDestroyNotify k_destroy_func,
                                            GType v_type,
                                            GBoxedCopyFunc v_dup_func,
                                            GDestroyNotify v_destroy_func,
                                            GeeTreeMap* map,
                                            GeeTreeMapRange* range,
                                            GeeTreeMapNode* node)
{
	return gee_tree_map_sub_key_iterator_construct_pointing (GEE_TREE_MAP_TYPE_SUB_KEY_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, range, node);
}

static GeeTreeMapSubKeyIterator*
gee_tree_map_sub_key_iterator_construct_from_iterator (GType object_type,
                                                       GType k_type,
                                                       GBoxedCopyFunc k_dup_func,
                                                       GDestroyNotify k_destroy_func,
                                                       GType v_type,
                                                       GBoxedCopyFunc v_dup_func,
                                                       GDestroyNotify v_destroy_func,
                                                       GeeTreeMapSubKeyIterator* iterator)
{
	GeeTreeMapSubKeyIterator * self = NULL;
	g_return_val_if_fail (iterator != NULL, NULL);
	self = (GeeTreeMapSubKeyIterator*) gee_tree_map_sub_node_iterator_construct_from_iterator (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, (GeeTreeMapSubNodeIterator*) iterator);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapSubKeyIterator*
gee_tree_map_sub_key_iterator_new_from_iterator (GType k_type,
                                                 GBoxedCopyFunc k_dup_func,
                                                 GDestroyNotify k_destroy_func,
                                                 GType v_type,
                                                 GBoxedCopyFunc v_dup_func,
                                                 GDestroyNotify v_destroy_func,
                                                 GeeTreeMapSubKeyIterator* iterator)
{
	return gee_tree_map_sub_key_iterator_construct_from_iterator (GEE_TREE_MAP_TYPE_SUB_KEY_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, iterator);
}

static gpointer
gee_tree_map_sub_key_iterator_real_get (GeeIterator* base)
{
	GeeTreeMapSubKeyIterator * self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	GeeTreeMapNodeIterator* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gconstpointer _tmp4_;
	gpointer _tmp5_;
	gpointer result;
	self = (GeeTreeMapSubKeyIterator*) base;
	_tmp0_ = gee_iterator_get_valid ((GeeIterator*) self);
	_tmp1_ = _tmp0_;
	_vala_assert (_tmp1_, "valid");
	_tmp2_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
	_tmp3_ = _tmp2_->current;
	_tmp4_ = _tmp3_->key;
	_tmp5_ = ((_tmp4_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp4_) : ((gpointer) _tmp4_);
	result = _tmp5_;
	return result;
}

static gboolean
gee_tree_map_sub_key_iterator_real_foreach (GeeTraversable* base,
                                            GeeForallFunc f,
                                            gpointer f_target)
{
	GeeTreeMapSubKeyIterator * self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean result;
	self = (GeeTreeMapSubKeyIterator*) base;
	_tmp0_ = gee_iterator_get_valid ((GeeIterator*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GeeTreeMapNodeIterator* _tmp2_;
		GeeTreeMapNode* _tmp3_;
		gconstpointer _tmp4_;
		gpointer _tmp5_;
		_tmp2_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
		_tmp3_ = _tmp2_->current;
		_tmp4_ = _tmp3_->key;
		_tmp5_ = ((_tmp4_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp4_) : ((gpointer) _tmp4_);
		if (!f (_tmp5_, f_target)) {
			result = FALSE;
			return result;
		}
	}
	while (TRUE) {
		GeeTreeMapNodeIterator* _tmp6_;
		GeeTreeMapNodeIterator* _tmp7_;
		GeeTreeMapNode* _tmp8_;
		gconstpointer _tmp9_;
		gpointer _tmp10_;
		_tmp6_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
		if (!gee_tree_map_node_iterator_next (_tmp6_)) {
			break;
		}
		_tmp7_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
		_tmp8_ = _tmp7_->current;
		_tmp9_ = _tmp8_->key;
		_tmp10_ = ((_tmp9_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp9_) : ((gpointer) _tmp9_);
		if (!f (_tmp10_, f_target)) {
			result = FALSE;
			return result;
		}
	}
	result = TRUE;
	return result;
}

static GeeIterator**
gee_tree_map_sub_key_iterator_real_tee (GeeTraversable* base,
                                        guint forks,
                                        gint* result_length1)
{
	GeeTreeMapSubKeyIterator * self;
	GeeIterator** result;
	self = (GeeTreeMapSubKeyIterator*) base;
	if (forks == ((guint) 0)) {
		GeeIterator** _tmp0_;
		GeeIterator** _tmp1_;
		gint _tmp1__length1;
		_tmp0_ = g_new0 (GeeIterator*, 0 + 1);
		_tmp1_ = _tmp0_;
		_tmp1__length1 = 0;
		if (result_length1) {
			*result_length1 = _tmp1__length1;
		}
		result = _tmp1_;
		return result;
	} else {
		GeeIterator** _result_ = NULL;
		GeeIterator** _tmp2_;
		gint _result__length1;
		gint __result__size_;
		GeeIterator** _tmp3_;
		gint _tmp3__length1;
		GeeIterator* _tmp4_;
		GeeIterator** _tmp9_;
		gint _tmp9__length1;
		_tmp2_ = g_new0 (GeeIterator*, forks + 1);
		_result_ = _tmp2_;
		_result__length1 = forks;
		__result__size_ = _result__length1;
		_tmp3_ = _result_;
		_tmp3__length1 = _result__length1;
		_tmp4_ = _g_object_ref0 ((GeeIterator*) self);
		_g_object_unref0 (_tmp3_[0]);
		_tmp3_[0] = _tmp4_;
		{
			guint i = 0U;
			i = (guint) 1;
			{
				gboolean _tmp5_ = FALSE;
				_tmp5_ = TRUE;
				while (TRUE) {
					GeeIterator** _tmp7_;
					gint _tmp7__length1;
					GeeTreeMapSubKeyIterator* _tmp8_;
					if (!_tmp5_) {
						guint _tmp6_;
						_tmp6_ = i;
						i = _tmp6_ + 1;
					}
					_tmp5_ = FALSE;
					if (!(i < forks)) {
						break;
					}
					_tmp7_ = _result_;
					_tmp7__length1 = _result__length1;
					_tmp8_ = gee_tree_map_sub_key_iterator_new_from_iterator (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self);
					_g_object_unref0 (_tmp7_[i]);
					_tmp7_[i] = (GeeIterator*) _tmp8_;
				}
			}
		}
		_tmp9_ = _result_;
		_tmp9__length1 = _result__length1;
		if (result_length1) {
			*result_length1 = _tmp9__length1;
		}
		result = _tmp9_;
		return result;
	}
}

static void
gee_tree_map_sub_key_iterator_class_init (GeeTreeMapSubKeyIteratorClass * klass,
                                          gpointer klass_data)
{
	gee_tree_map_sub_key_iterator_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapSubKeyIterator_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_sub_key_iterator_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_sub_key_iterator_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_ITERATOR_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_ITERATOR_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_ITERATOR_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_ITERATOR_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_ITERATOR_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_KEY_ITERATOR_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}

static GType
gee_tree_map_sub_key_iterator_gee_traversable_get_g_type (GeeTreeMapSubKeyIterator* self)
{
	return self->priv->k_type;
}

static GBoxedCopyFunc
gee_tree_map_sub_key_iterator_gee_traversable_get_g_dup_func (GeeTreeMapSubKeyIterator* self)
{
	return self->priv->k_dup_func;
}

static GDestroyNotify
gee_tree_map_sub_key_iterator_gee_traversable_get_g_destroy_func (GeeTreeMapSubKeyIterator* self)
{
	return self->priv->k_destroy_func;
}

static void
gee_tree_map_sub_key_iterator_gee_traversable_interface_init (GeeTraversableIface * iface,
                                                              gpointer iface_data)
{
	gee_tree_map_sub_key_iterator_gee_traversable_parent_iface = g_type_interface_peek_parent (iface);
	iface->foreach = (gboolean (*) (GeeTraversable*, GeeForallFunc, gpointer)) gee_tree_map_sub_key_iterator_real_foreach;
	iface->tee = (GeeIterator** (*) (GeeTraversable*, guint, gint*)) gee_tree_map_sub_key_iterator_real_tee;
	iface->get_g_type = (GType (*) (GeeTraversable *)) gee_tree_map_sub_key_iterator_gee_traversable_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeTraversable *)) gee_tree_map_sub_key_iterator_gee_traversable_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify (*) (GeeTraversable *)) gee_tree_map_sub_key_iterator_gee_traversable_get_g_destroy_func;
}

static void
gee_tree_map_sub_key_iterator_gee_iterator_interface_init (GeeIteratorIface * iface,
                                                           gpointer iface_data)
{
	gee_tree_map_sub_key_iterator_gee_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get = (gpointer (*) (GeeIterator*)) gee_tree_map_sub_key_iterator_real_get;
	iface->remove = (void (*) (GeeIterator*)) gee_tree_map_sub_node_iterator_remove;
	iface->next = (gboolean (*) (GeeIterator*)) gee_tree_map_sub_node_iterator_next;
	iface->has_next = (gboolean (*) (GeeIterator*)) gee_tree_map_sub_node_iterator_has_next;
	iface->get_valid = (gboolean (*) (GeeIterator *)) gee_tree_map_sub_node_iterator_get_valid;
	iface->get_read_only = (gboolean (*) (GeeIterator *)) gee_tree_map_sub_node_iterator_get_read_only;
}

static GType
gee_tree_map_sub_key_iterator_gee_bidir_iterator_get_g_type (GeeTreeMapSubKeyIterator* self)
{
	return self->priv->k_type;
}

static GBoxedCopyFunc
gee_tree_map_sub_key_iterator_gee_bidir_iterator_get_g_dup_func (GeeTreeMapSubKeyIterator* self)
{
	return self->priv->k_dup_func;
}

static GDestroyNotify
gee_tree_map_sub_key_iterator_gee_bidir_iterator_get_g_destroy_func (GeeTreeMapSubKeyIterator* self)
{
	return self->priv->k_destroy_func;
}

static void
gee_tree_map_sub_key_iterator_gee_bidir_iterator_interface_init (GeeBidirIteratorIface * iface,
                                                                 gpointer iface_data)
{
	gee_tree_map_sub_key_iterator_gee_bidir_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_g_type = (GType (*) (GeeBidirIterator *)) gee_tree_map_sub_key_iterator_gee_bidir_iterator_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeBidirIterator *)) gee_tree_map_sub_key_iterator_gee_bidir_iterator_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify (*) (GeeBidirIterator *)) gee_tree_map_sub_key_iterator_gee_bidir_iterator_get_g_destroy_func;
	iface->previous = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_sub_node_iterator_previous;
	iface->has_previous = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_sub_node_iterator_has_previous;
	iface->last = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_sub_node_iterator_last;
	iface->first = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_sub_node_iterator_first;
}

static void
gee_tree_map_sub_key_iterator_instance_init (GeeTreeMapSubKeyIterator * self,
                                             gpointer klass)
{
	self->priv = gee_tree_map_sub_key_iterator_get_instance_private (self);
}

static GType
gee_tree_map_sub_key_iterator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapSubKeyIteratorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_sub_key_iterator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapSubKeyIterator), 0, (GInstanceInitFunc) gee_tree_map_sub_key_iterator_instance_init, NULL };
	static const GInterfaceInfo gee_traversable_info = { (GInterfaceInitFunc) gee_tree_map_sub_key_iterator_gee_traversable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_iterator_info = { (GInterfaceInitFunc) gee_tree_map_sub_key_iterator_gee_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_bidir_iterator_info = { (GInterfaceInitFunc) gee_tree_map_sub_key_iterator_gee_bidir_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType gee_tree_map_sub_key_iterator_type_id;
	gee_tree_map_sub_key_iterator_type_id = g_type_register_static (GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR, "GeeTreeMapSubKeyIterator", &g_define_type_info, 0);
	g_type_add_interface_static (gee_tree_map_sub_key_iterator_type_id, GEE_TYPE_TRAVERSABLE, &gee_traversable_info);
	g_type_add_interface_static (gee_tree_map_sub_key_iterator_type_id, GEE_TYPE_ITERATOR, &gee_iterator_info);
	g_type_add_interface_static (gee_tree_map_sub_key_iterator_type_id, GEE_TYPE_BIDIR_ITERATOR, &gee_bidir_iterator_info);
	GeeTreeMapSubKeyIterator_private_offset = g_type_add_instance_private (gee_tree_map_sub_key_iterator_type_id, sizeof (GeeTreeMapSubKeyIteratorPrivate));
	return gee_tree_map_sub_key_iterator_type_id;
}

static GType
gee_tree_map_sub_key_iterator_get_type (void)
{
	static volatile gsize gee_tree_map_sub_key_iterator_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_sub_key_iterator_type_id__once)) {
		GType gee_tree_map_sub_key_iterator_type_id;
		gee_tree_map_sub_key_iterator_type_id = gee_tree_map_sub_key_iterator_get_type_once ();
		g_once_init_leave (&gee_tree_map_sub_key_iterator_type_id__once, gee_tree_map_sub_key_iterator_type_id);
	}
	return gee_tree_map_sub_key_iterator_type_id__once;
}

static void
_vala_gee_tree_map_sub_key_iterator_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	GeeTreeMapSubKeyIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_KEY_ITERATOR, GeeTreeMapSubKeyIterator);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_KEY_ITERATOR_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_SUB_KEY_ITERATOR_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_SUB_KEY_ITERATOR_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_SUB_KEY_ITERATOR_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_SUB_KEY_ITERATOR_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_SUB_KEY_ITERATOR_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_sub_key_iterator_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	GeeTreeMapSubKeyIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_KEY_ITERATOR, GeeTreeMapSubKeyIterator);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_KEY_ITERATOR_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_KEY_ITERATOR_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_KEY_ITERATOR_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_KEY_ITERATOR_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_KEY_ITERATOR_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_KEY_ITERATOR_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_value_iterator_get_instance_private (GeeTreeMapValueIterator* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapValueIterator_private_offset);
}

static GeeTreeMapValueIterator*
gee_tree_map_value_iterator_construct (GType object_type,
                                       GType k_type,
                                       GBoxedCopyFunc k_dup_func,
                                       GDestroyNotify k_destroy_func,
                                       GType v_type,
                                       GBoxedCopyFunc v_dup_func,
                                       GDestroyNotify v_destroy_func,
                                       GeeTreeMap* map)
{
	GeeTreeMapValueIterator * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	self = (GeeTreeMapValueIterator*) gee_tree_map_node_iterator_construct (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, map);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapValueIterator*
gee_tree_map_value_iterator_new (GType k_type,
                                 GBoxedCopyFunc k_dup_func,
                                 GDestroyNotify k_destroy_func,
                                 GType v_type,
                                 GBoxedCopyFunc v_dup_func,
                                 GDestroyNotify v_destroy_func,
                                 GeeTreeMap* map)
{
	return gee_tree_map_value_iterator_construct (GEE_TREE_MAP_TYPE_VALUE_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map);
}

static GeeTreeMapValueIterator*
gee_tree_map_value_iterator_construct_pointing (GType object_type,
                                                GType k_type,
                                                GBoxedCopyFunc k_dup_func,
                                                GDestroyNotify k_destroy_func,
                                                GType v_type,
                                                GBoxedCopyFunc v_dup_func,
                                                GDestroyNotify v_destroy_func,
                                                GeeTreeMap* map,
                                                GeeTreeMapNode* current)
{
	GeeTreeMapValueIterator * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (current != NULL, NULL);
	self = (GeeTreeMapValueIterator*) gee_tree_map_node_iterator_construct_pointing (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, map, current);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapValueIterator*
gee_tree_map_value_iterator_new_pointing (GType k_type,
                                          GBoxedCopyFunc k_dup_func,
                                          GDestroyNotify k_destroy_func,
                                          GType v_type,
                                          GBoxedCopyFunc v_dup_func,
                                          GDestroyNotify v_destroy_func,
                                          GeeTreeMap* map,
                                          GeeTreeMapNode* current)
{
	return gee_tree_map_value_iterator_construct_pointing (GEE_TREE_MAP_TYPE_VALUE_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, current);
}

static GeeTreeMapValueIterator*
gee_tree_map_value_iterator_construct_from_iterator (GType object_type,
                                                     GType k_type,
                                                     GBoxedCopyFunc k_dup_func,
                                                     GDestroyNotify k_destroy_func,
                                                     GType v_type,
                                                     GBoxedCopyFunc v_dup_func,
                                                     GDestroyNotify v_destroy_func,
                                                     GeeTreeMapValueIterator* iterator)
{
	GeeTreeMapValueIterator * self = NULL;
	g_return_val_if_fail (iterator != NULL, NULL);
	self = (GeeTreeMapValueIterator*) gee_tree_map_node_iterator_construct_from_iterator (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, (GeeTreeMapNodeIterator*) iterator);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapValueIterator*
gee_tree_map_value_iterator_new_from_iterator (GType k_type,
                                               GBoxedCopyFunc k_dup_func,
                                               GDestroyNotify k_destroy_func,
                                               GType v_type,
                                               GBoxedCopyFunc v_dup_func,
                                               GDestroyNotify v_destroy_func,
                                               GeeTreeMapValueIterator* iterator)
{
	return gee_tree_map_value_iterator_construct_from_iterator (GEE_TREE_MAP_TYPE_VALUE_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, iterator);
}

static gpointer
gee_tree_map_value_iterator_real_get (GeeIterator* base)
{
	GeeTreeMapValueIterator * self;
	GeeTreeMap* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gconstpointer _tmp4_;
	gpointer _tmp5_;
	gpointer result;
	self = (GeeTreeMapValueIterator*) base;
	_tmp0_ = ((GeeTreeMapNodeIterator*) self)->_map;
	_vala_assert (((GeeTreeMapNodeIterator*) self)->stamp == _tmp0_->priv->stamp, "stamp == _map.stamp");
	_tmp1_ = gee_iterator_get_valid ((GeeIterator*) self);
	_tmp2_ = _tmp1_;
	_vala_assert (_tmp2_, "valid");
	_tmp3_ = ((GeeTreeMapNodeIterator*) self)->current;
	_tmp4_ = _tmp3_->value;
	_tmp5_ = ((_tmp4_ != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) _tmp4_) : ((gpointer) _tmp4_);
	result = _tmp5_;
	return result;
}

static gboolean
gee_tree_map_value_iterator_real_foreach (GeeTraversable* base,
                                          GeeForallFunc f,
                                          gpointer f_target)
{
	GeeTreeMapValueIterator * self;
	GeeTreeMapNode* _tmp0_;
	gboolean result;
	self = (GeeTreeMapValueIterator*) base;
	_tmp0_ = ((GeeTreeMapNodeIterator*) self)->current;
	if (_tmp0_ != NULL) {
		GeeTreeMapNode* _tmp1_;
		gconstpointer _tmp2_;
		gpointer _tmp3_;
		GeeTreeMapNode* _tmp4_;
		GeeTreeMapNode* _tmp5_;
		_tmp1_ = ((GeeTreeMapNodeIterator*) self)->current;
		_tmp2_ = _tmp1_->value;
		_tmp3_ = ((_tmp2_ != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) _tmp2_) : ((gpointer) _tmp2_);
		if (!f (_tmp3_, f_target)) {
			result = FALSE;
			return result;
		}
		_tmp4_ = ((GeeTreeMapNodeIterator*) self)->current;
		_tmp5_ = _tmp4_->next;
		((GeeTreeMapNodeIterator*) self)->current = _tmp5_;
	} else {
		GeeTreeMapNode* _tmp6_;
		_tmp6_ = ((GeeTreeMapNodeIterator*) self)->_next;
		if (_tmp6_ == NULL) {
			GeeTreeMap* _tmp7_;
			GeeTreeMapNode* _tmp8_;
			_tmp7_ = ((GeeTreeMapNodeIterator*) self)->_map;
			_tmp8_ = _tmp7_->priv->first;
			((GeeTreeMapNodeIterator*) self)->current = _tmp8_;
			((GeeTreeMapNodeIterator*) self)->started = TRUE;
		} else {
			GeeTreeMapNode* _tmp9_;
			GeeTreeMapNode* _tmp10_;
			_tmp9_ = ((GeeTreeMapNodeIterator*) self)->_next;
			((GeeTreeMapNodeIterator*) self)->current = _tmp9_;
			_tmp10_ = ((GeeTreeMapNodeIterator*) self)->current;
			if (_tmp10_ != NULL) {
				((GeeTreeMapNodeIterator*) self)->_next = NULL;
				((GeeTreeMapNodeIterator*) self)->_prev = NULL;
			}
		}
	}
	{
		gboolean _tmp11_ = FALSE;
		_tmp11_ = TRUE;
		while (TRUE) {
			GeeTreeMapNode* _tmp14_;
			GeeTreeMapNode* _tmp15_;
			gconstpointer _tmp16_;
			gpointer _tmp17_;
			if (!_tmp11_) {
				GeeTreeMapNode* _tmp12_;
				GeeTreeMapNode* _tmp13_;
				_tmp12_ = ((GeeTreeMapNodeIterator*) self)->current;
				_tmp13_ = _tmp12_->next;
				((GeeTreeMapNodeIterator*) self)->current = _tmp13_;
			}
			_tmp11_ = FALSE;
			_tmp14_ = ((GeeTreeMapNodeIterator*) self)->current;
			if (!(_tmp14_ != NULL)) {
				break;
			}
			_tmp15_ = ((GeeTreeMapNodeIterator*) self)->current;
			_tmp16_ = _tmp15_->value;
			_tmp17_ = ((_tmp16_ != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) _tmp16_) : ((gpointer) _tmp16_);
			if (!f (_tmp17_, f_target)) {
				result = FALSE;
				return result;
			}
		}
	}
	result = TRUE;
	return result;
}

static GeeIterator**
gee_tree_map_value_iterator_real_tee (GeeTraversable* base,
                                      guint forks,
                                      gint* result_length1)
{
	GeeTreeMapValueIterator * self;
	GeeIterator** result;
	self = (GeeTreeMapValueIterator*) base;
	if (forks == ((guint) 0)) {
		GeeIterator** _tmp0_;
		GeeIterator** _tmp1_;
		gint _tmp1__length1;
		_tmp0_ = g_new0 (GeeIterator*, 0 + 1);
		_tmp1_ = _tmp0_;
		_tmp1__length1 = 0;
		if (result_length1) {
			*result_length1 = _tmp1__length1;
		}
		result = _tmp1_;
		return result;
	} else {
		GeeIterator** _result_ = NULL;
		GeeIterator** _tmp2_;
		gint _result__length1;
		gint __result__size_;
		GeeIterator** _tmp3_;
		gint _tmp3__length1;
		GeeIterator* _tmp4_;
		GeeIterator** _tmp9_;
		gint _tmp9__length1;
		_tmp2_ = g_new0 (GeeIterator*, forks + 1);
		_result_ = _tmp2_;
		_result__length1 = forks;
		__result__size_ = _result__length1;
		_tmp3_ = _result_;
		_tmp3__length1 = _result__length1;
		_tmp4_ = _g_object_ref0 ((GeeIterator*) self);
		_g_object_unref0 (_tmp3_[0]);
		_tmp3_[0] = _tmp4_;
		{
			guint i = 0U;
			i = (guint) 1;
			{
				gboolean _tmp5_ = FALSE;
				_tmp5_ = TRUE;
				while (TRUE) {
					GeeIterator** _tmp7_;
					gint _tmp7__length1;
					GeeTreeMapValueIterator* _tmp8_;
					if (!_tmp5_) {
						guint _tmp6_;
						_tmp6_ = i;
						i = _tmp6_ + 1;
					}
					_tmp5_ = FALSE;
					if (!(i < forks)) {
						break;
					}
					_tmp7_ = _result_;
					_tmp7__length1 = _result__length1;
					_tmp8_ = gee_tree_map_value_iterator_new_from_iterator (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self);
					_g_object_unref0 (_tmp7_[i]);
					_tmp7_[i] = (GeeIterator*) _tmp8_;
				}
			}
		}
		_tmp9_ = _result_;
		_tmp9__length1 = _result__length1;
		if (result_length1) {
			*result_length1 = _tmp9__length1;
		}
		result = _tmp9_;
		return result;
	}
}

static void
gee_tree_map_value_iterator_class_init (GeeTreeMapValueIteratorClass * klass,
                                        gpointer klass_data)
{
	gee_tree_map_value_iterator_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapValueIterator_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_value_iterator_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_value_iterator_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUE_ITERATOR_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUE_ITERATOR_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUE_ITERATOR_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUE_ITERATOR_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUE_ITERATOR_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUE_ITERATOR_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}

static GType
gee_tree_map_value_iterator_gee_traversable_get_g_type (GeeTreeMapValueIterator* self)
{
	return self->priv->v_type;
}

static GBoxedCopyFunc
gee_tree_map_value_iterator_gee_traversable_get_g_dup_func (GeeTreeMapValueIterator* self)
{
	return self->priv->v_dup_func;
}

static GDestroyNotify
gee_tree_map_value_iterator_gee_traversable_get_g_destroy_func (GeeTreeMapValueIterator* self)
{
	return self->priv->v_destroy_func;
}

static void
gee_tree_map_value_iterator_gee_traversable_interface_init (GeeTraversableIface * iface,
                                                            gpointer iface_data)
{
	gee_tree_map_value_iterator_gee_traversable_parent_iface = g_type_interface_peek_parent (iface);
	iface->foreach = (gboolean (*) (GeeTraversable*, GeeForallFunc, gpointer)) gee_tree_map_value_iterator_real_foreach;
	iface->tee = (GeeIterator** (*) (GeeTraversable*, guint, gint*)) gee_tree_map_value_iterator_real_tee;
	iface->get_g_type = (GType (*) (GeeTraversable *)) gee_tree_map_value_iterator_gee_traversable_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeTraversable *)) gee_tree_map_value_iterator_gee_traversable_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify (*) (GeeTraversable *)) gee_tree_map_value_iterator_gee_traversable_get_g_destroy_func;
}

static void
gee_tree_map_value_iterator_gee_iterator_interface_init (GeeIteratorIface * iface,
                                                         gpointer iface_data)
{
	gee_tree_map_value_iterator_gee_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get = (gpointer (*) (GeeIterator*)) gee_tree_map_value_iterator_real_get;
	iface->remove = (void (*) (GeeIterator*)) gee_tree_map_node_iterator_remove;
	iface->next = (gboolean (*) (GeeIterator*)) gee_tree_map_node_iterator_next;
	iface->has_next = (gboolean (*) (GeeIterator*)) gee_tree_map_node_iterator_has_next;
	iface->get_valid = (gboolean (*) (GeeIterator *)) gee_tree_map_node_iterator_get_valid;
	iface->get_read_only = (gboolean (*) (GeeIterator *)) gee_tree_map_node_iterator_get_read_only;
}

static GType
gee_tree_map_value_iterator_gee_bidir_iterator_get_g_type (GeeTreeMapValueIterator* self)
{
	return self->priv->v_type;
}

static GBoxedCopyFunc
gee_tree_map_value_iterator_gee_bidir_iterator_get_g_dup_func (GeeTreeMapValueIterator* self)
{
	return self->priv->v_dup_func;
}

static GDestroyNotify
gee_tree_map_value_iterator_gee_bidir_iterator_get_g_destroy_func (GeeTreeMapValueIterator* self)
{
	return self->priv->v_destroy_func;
}

static void
gee_tree_map_value_iterator_gee_bidir_iterator_interface_init (GeeBidirIteratorIface * iface,
                                                               gpointer iface_data)
{
	gee_tree_map_value_iterator_gee_bidir_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_g_type = (GType (*) (GeeBidirIterator *)) gee_tree_map_value_iterator_gee_bidir_iterator_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeBidirIterator *)) gee_tree_map_value_iterator_gee_bidir_iterator_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify (*) (GeeBidirIterator *)) gee_tree_map_value_iterator_gee_bidir_iterator_get_g_destroy_func;
	iface->previous = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_node_iterator_previous;
	iface->has_previous = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_node_iterator_has_previous;
	iface->last = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_node_iterator_last;
	iface->first = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_node_iterator_first;
}

static void
gee_tree_map_value_iterator_instance_init (GeeTreeMapValueIterator * self,
                                           gpointer klass)
{
	self->priv = gee_tree_map_value_iterator_get_instance_private (self);
}

static GType
gee_tree_map_value_iterator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapValueIteratorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_value_iterator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapValueIterator), 0, (GInstanceInitFunc) gee_tree_map_value_iterator_instance_init, NULL };
	static const GInterfaceInfo gee_traversable_info = { (GInterfaceInitFunc) gee_tree_map_value_iterator_gee_traversable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_iterator_info = { (GInterfaceInitFunc) gee_tree_map_value_iterator_gee_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_bidir_iterator_info = { (GInterfaceInitFunc) gee_tree_map_value_iterator_gee_bidir_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType gee_tree_map_value_iterator_type_id;
	gee_tree_map_value_iterator_type_id = g_type_register_static (GEE_TREE_MAP_TYPE_NODE_ITERATOR, "GeeTreeMapValueIterator", &g_define_type_info, 0);
	g_type_add_interface_static (gee_tree_map_value_iterator_type_id, GEE_TYPE_TRAVERSABLE, &gee_traversable_info);
	g_type_add_interface_static (gee_tree_map_value_iterator_type_id, GEE_TYPE_ITERATOR, &gee_iterator_info);
	g_type_add_interface_static (gee_tree_map_value_iterator_type_id, GEE_TYPE_BIDIR_ITERATOR, &gee_bidir_iterator_info);
	GeeTreeMapValueIterator_private_offset = g_type_add_instance_private (gee_tree_map_value_iterator_type_id, sizeof (GeeTreeMapValueIteratorPrivate));
	return gee_tree_map_value_iterator_type_id;
}

static GType
gee_tree_map_value_iterator_get_type (void)
{
	static volatile gsize gee_tree_map_value_iterator_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_value_iterator_type_id__once)) {
		GType gee_tree_map_value_iterator_type_id;
		gee_tree_map_value_iterator_type_id = gee_tree_map_value_iterator_get_type_once ();
		g_once_init_leave (&gee_tree_map_value_iterator_type_id__once, gee_tree_map_value_iterator_type_id);
	}
	return gee_tree_map_value_iterator_type_id__once;
}

static void
_vala_gee_tree_map_value_iterator_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec)
{
	GeeTreeMapValueIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_VALUE_ITERATOR, GeeTreeMapValueIterator);
	switch (property_id) {
		case GEE_TREE_MAP_VALUE_ITERATOR_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_VALUE_ITERATOR_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_VALUE_ITERATOR_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_VALUE_ITERATOR_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_VALUE_ITERATOR_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_VALUE_ITERATOR_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_value_iterator_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec)
{
	GeeTreeMapValueIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_VALUE_ITERATOR, GeeTreeMapValueIterator);
	switch (property_id) {
		case GEE_TREE_MAP_VALUE_ITERATOR_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_VALUE_ITERATOR_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_VALUE_ITERATOR_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_VALUE_ITERATOR_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_VALUE_ITERATOR_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_VALUE_ITERATOR_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_sub_value_iterator_get_instance_private (GeeTreeMapSubValueIterator* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapSubValueIterator_private_offset);
}

static GeeTreeMapSubValueIterator*
gee_tree_map_sub_value_iterator_construct (GType object_type,
                                           GType k_type,
                                           GBoxedCopyFunc k_dup_func,
                                           GDestroyNotify k_destroy_func,
                                           GType v_type,
                                           GBoxedCopyFunc v_dup_func,
                                           GDestroyNotify v_destroy_func,
                                           GeeTreeMap* map,
                                           GeeTreeMapRange* range)
{
	GeeTreeMapSubValueIterator * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (range != NULL, NULL);
	self = (GeeTreeMapSubValueIterator*) gee_tree_map_sub_node_iterator_construct (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, map, range);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapSubValueIterator*
gee_tree_map_sub_value_iterator_new (GType k_type,
                                     GBoxedCopyFunc k_dup_func,
                                     GDestroyNotify k_destroy_func,
                                     GType v_type,
                                     GBoxedCopyFunc v_dup_func,
                                     GDestroyNotify v_destroy_func,
                                     GeeTreeMap* map,
                                     GeeTreeMapRange* range)
{
	return gee_tree_map_sub_value_iterator_construct (GEE_TREE_MAP_TYPE_SUB_VALUE_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, range);
}

static GeeTreeMapSubValueIterator*
gee_tree_map_sub_value_iterator_construct_pointing (GType object_type,
                                                    GType k_type,
                                                    GBoxedCopyFunc k_dup_func,
                                                    GDestroyNotify k_destroy_func,
                                                    GType v_type,
                                                    GBoxedCopyFunc v_dup_func,
                                                    GDestroyNotify v_destroy_func,
                                                    GeeTreeMap* map,
                                                    GeeTreeMapRange* range,
                                                    GeeTreeMapNode* node)
{
	GeeTreeMapSubValueIterator * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (range != NULL, NULL);
	g_return_val_if_fail (node != NULL, NULL);
	self = (GeeTreeMapSubValueIterator*) gee_tree_map_sub_node_iterator_construct_pointing (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, map, range, node);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapSubValueIterator*
gee_tree_map_sub_value_iterator_new_pointing (GType k_type,
                                              GBoxedCopyFunc k_dup_func,
                                              GDestroyNotify k_destroy_func,
                                              GType v_type,
                                              GBoxedCopyFunc v_dup_func,
                                              GDestroyNotify v_destroy_func,
                                              GeeTreeMap* map,
                                              GeeTreeMapRange* range,
                                              GeeTreeMapNode* node)
{
	return gee_tree_map_sub_value_iterator_construct_pointing (GEE_TREE_MAP_TYPE_SUB_VALUE_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, range, node);
}

static GeeTreeMapSubValueIterator*
gee_tree_map_sub_value_iterator_construct_from_iterator (GType object_type,
                                                         GType k_type,
                                                         GBoxedCopyFunc k_dup_func,
                                                         GDestroyNotify k_destroy_func,
                                                         GType v_type,
                                                         GBoxedCopyFunc v_dup_func,
                                                         GDestroyNotify v_destroy_func,
                                                         GeeTreeMapSubValueIterator* iterator)
{
	GeeTreeMapSubValueIterator * self = NULL;
	g_return_val_if_fail (iterator != NULL, NULL);
	self = (GeeTreeMapSubValueIterator*) gee_tree_map_sub_node_iterator_construct_from_iterator (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, (GeeTreeMapSubNodeIterator*) iterator);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapSubValueIterator*
gee_tree_map_sub_value_iterator_new_from_iterator (GType k_type,
                                                   GBoxedCopyFunc k_dup_func,
                                                   GDestroyNotify k_destroy_func,
                                                   GType v_type,
                                                   GBoxedCopyFunc v_dup_func,
                                                   GDestroyNotify v_destroy_func,
                                                   GeeTreeMapSubValueIterator* iterator)
{
	return gee_tree_map_sub_value_iterator_construct_from_iterator (GEE_TREE_MAP_TYPE_SUB_VALUE_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, iterator);
}

static gpointer
gee_tree_map_sub_value_iterator_real_get (GeeIterator* base)
{
	GeeTreeMapSubValueIterator * self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	GeeTreeMapNodeIterator* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gconstpointer _tmp4_;
	gpointer _tmp5_;
	gpointer result;
	self = (GeeTreeMapSubValueIterator*) base;
	_tmp0_ = gee_iterator_get_valid ((GeeIterator*) self);
	_tmp1_ = _tmp0_;
	_vala_assert (_tmp1_, "valid");
	_tmp2_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
	_tmp3_ = _tmp2_->current;
	_tmp4_ = _tmp3_->value;
	_tmp5_ = ((_tmp4_ != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) _tmp4_) : ((gpointer) _tmp4_);
	result = _tmp5_;
	return result;
}

static gboolean
gee_tree_map_sub_value_iterator_real_foreach (GeeTraversable* base,
                                              GeeForallFunc f,
                                              gpointer f_target)
{
	GeeTreeMapSubValueIterator * self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean result;
	self = (GeeTreeMapSubValueIterator*) base;
	_tmp0_ = gee_iterator_get_valid ((GeeIterator*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GeeTreeMapNodeIterator* _tmp2_;
		GeeTreeMapNode* _tmp3_;
		gconstpointer _tmp4_;
		gpointer _tmp5_;
		_tmp2_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
		_tmp3_ = _tmp2_->current;
		_tmp4_ = _tmp3_->key;
		_tmp5_ = ((_tmp4_ != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) _tmp4_) : ((gpointer) _tmp4_);
		if (!f (_tmp5_, f_target)) {
			result = FALSE;
			return result;
		}
	}
	while (TRUE) {
		GeeTreeMapNodeIterator* _tmp6_;
		GeeTreeMapNodeIterator* _tmp7_;
		GeeTreeMapNode* _tmp8_;
		gconstpointer _tmp9_;
		gpointer _tmp10_;
		_tmp6_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
		if (!gee_tree_map_node_iterator_next (_tmp6_)) {
			break;
		}
		_tmp7_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
		_tmp8_ = _tmp7_->current;
		_tmp9_ = _tmp8_->key;
		_tmp10_ = ((_tmp9_ != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) _tmp9_) : ((gpointer) _tmp9_);
		if (!f (_tmp10_, f_target)) {
			result = FALSE;
			return result;
		}
	}
	result = TRUE;
	return result;
}

static GeeIterator**
gee_tree_map_sub_value_iterator_real_tee (GeeTraversable* base,
                                          guint forks,
                                          gint* result_length1)
{
	GeeTreeMapSubValueIterator * self;
	GeeIterator** result;
	self = (GeeTreeMapSubValueIterator*) base;
	if (forks == ((guint) 0)) {
		GeeIterator** _tmp0_;
		GeeIterator** _tmp1_;
		gint _tmp1__length1;
		_tmp0_ = g_new0 (GeeIterator*, 0 + 1);
		_tmp1_ = _tmp0_;
		_tmp1__length1 = 0;
		if (result_length1) {
			*result_length1 = _tmp1__length1;
		}
		result = _tmp1_;
		return result;
	} else {
		GeeIterator** _result_ = NULL;
		GeeIterator** _tmp2_;
		gint _result__length1;
		gint __result__size_;
		GeeIterator** _tmp3_;
		gint _tmp3__length1;
		GeeIterator* _tmp4_;
		GeeIterator** _tmp9_;
		gint _tmp9__length1;
		_tmp2_ = g_new0 (GeeIterator*, forks + 1);
		_result_ = _tmp2_;
		_result__length1 = forks;
		__result__size_ = _result__length1;
		_tmp3_ = _result_;
		_tmp3__length1 = _result__length1;
		_tmp4_ = _g_object_ref0 ((GeeIterator*) self);
		_g_object_unref0 (_tmp3_[0]);
		_tmp3_[0] = _tmp4_;
		{
			guint i = 0U;
			i = (guint) 1;
			{
				gboolean _tmp5_ = FALSE;
				_tmp5_ = TRUE;
				while (TRUE) {
					GeeIterator** _tmp7_;
					gint _tmp7__length1;
					GeeTreeMapSubValueIterator* _tmp8_;
					if (!_tmp5_) {
						guint _tmp6_;
						_tmp6_ = i;
						i = _tmp6_ + 1;
					}
					_tmp5_ = FALSE;
					if (!(i < forks)) {
						break;
					}
					_tmp7_ = _result_;
					_tmp7__length1 = _result__length1;
					_tmp8_ = gee_tree_map_sub_value_iterator_new_from_iterator (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self);
					_g_object_unref0 (_tmp7_[i]);
					_tmp7_[i] = (GeeIterator*) _tmp8_;
				}
			}
		}
		_tmp9_ = _result_;
		_tmp9__length1 = _result__length1;
		if (result_length1) {
			*result_length1 = _tmp9__length1;
		}
		result = _tmp9_;
		return result;
	}
}

static void
gee_tree_map_sub_value_iterator_class_init (GeeTreeMapSubValueIteratorClass * klass,
                                            gpointer klass_data)
{
	gee_tree_map_sub_value_iterator_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapSubValueIterator_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_sub_value_iterator_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_sub_value_iterator_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_ITERATOR_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_ITERATOR_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_ITERATOR_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_ITERATOR_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_ITERATOR_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_VALUE_ITERATOR_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}

static GType
gee_tree_map_sub_value_iterator_gee_traversable_get_g_type (GeeTreeMapSubValueIterator* self)
{
	return self->priv->v_type;
}

static GBoxedCopyFunc
gee_tree_map_sub_value_iterator_gee_traversable_get_g_dup_func (GeeTreeMapSubValueIterator* self)
{
	return self->priv->v_dup_func;
}

static GDestroyNotify
gee_tree_map_sub_value_iterator_gee_traversable_get_g_destroy_func (GeeTreeMapSubValueIterator* self)
{
	return self->priv->v_destroy_func;
}

static void
gee_tree_map_sub_value_iterator_gee_traversable_interface_init (GeeTraversableIface * iface,
                                                                gpointer iface_data)
{
	gee_tree_map_sub_value_iterator_gee_traversable_parent_iface = g_type_interface_peek_parent (iface);
	iface->foreach = (gboolean (*) (GeeTraversable*, GeeForallFunc, gpointer)) gee_tree_map_sub_value_iterator_real_foreach;
	iface->tee = (GeeIterator** (*) (GeeTraversable*, guint, gint*)) gee_tree_map_sub_value_iterator_real_tee;
	iface->get_g_type = (GType (*) (GeeTraversable *)) gee_tree_map_sub_value_iterator_gee_traversable_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeTraversable *)) gee_tree_map_sub_value_iterator_gee_traversable_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify (*) (GeeTraversable *)) gee_tree_map_sub_value_iterator_gee_traversable_get_g_destroy_func;
}

static void
gee_tree_map_sub_value_iterator_gee_iterator_interface_init (GeeIteratorIface * iface,
                                                             gpointer iface_data)
{
	gee_tree_map_sub_value_iterator_gee_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get = (gpointer (*) (GeeIterator*)) gee_tree_map_sub_value_iterator_real_get;
	iface->remove = (void (*) (GeeIterator*)) gee_tree_map_sub_node_iterator_remove;
	iface->next = (gboolean (*) (GeeIterator*)) gee_tree_map_sub_node_iterator_next;
	iface->has_next = (gboolean (*) (GeeIterator*)) gee_tree_map_sub_node_iterator_has_next;
	iface->get_valid = (gboolean (*) (GeeIterator *)) gee_tree_map_sub_node_iterator_get_valid;
	iface->get_read_only = (gboolean (*) (GeeIterator *)) gee_tree_map_sub_node_iterator_get_read_only;
}

static GType
gee_tree_map_sub_value_iterator_gee_bidir_iterator_get_g_type (GeeTreeMapSubValueIterator* self)
{
	return self->priv->v_type;
}

static GBoxedCopyFunc
gee_tree_map_sub_value_iterator_gee_bidir_iterator_get_g_dup_func (GeeTreeMapSubValueIterator* self)
{
	return self->priv->v_dup_func;
}

static GDestroyNotify
gee_tree_map_sub_value_iterator_gee_bidir_iterator_get_g_destroy_func (GeeTreeMapSubValueIterator* self)
{
	return self->priv->v_destroy_func;
}

static void
gee_tree_map_sub_value_iterator_gee_bidir_iterator_interface_init (GeeBidirIteratorIface * iface,
                                                                   gpointer iface_data)
{
	gee_tree_map_sub_value_iterator_gee_bidir_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_g_type = (GType (*) (GeeBidirIterator *)) gee_tree_map_sub_value_iterator_gee_bidir_iterator_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeBidirIterator *)) gee_tree_map_sub_value_iterator_gee_bidir_iterator_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify (*) (GeeBidirIterator *)) gee_tree_map_sub_value_iterator_gee_bidir_iterator_get_g_destroy_func;
	iface->previous = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_sub_node_iterator_previous;
	iface->has_previous = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_sub_node_iterator_has_previous;
	iface->last = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_sub_node_iterator_last;
	iface->first = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_sub_node_iterator_first;
}

static void
gee_tree_map_sub_value_iterator_instance_init (GeeTreeMapSubValueIterator * self,
                                               gpointer klass)
{
	self->priv = gee_tree_map_sub_value_iterator_get_instance_private (self);
}

static GType
gee_tree_map_sub_value_iterator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapSubValueIteratorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_sub_value_iterator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapSubValueIterator), 0, (GInstanceInitFunc) gee_tree_map_sub_value_iterator_instance_init, NULL };
	static const GInterfaceInfo gee_traversable_info = { (GInterfaceInitFunc) gee_tree_map_sub_value_iterator_gee_traversable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_iterator_info = { (GInterfaceInitFunc) gee_tree_map_sub_value_iterator_gee_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_bidir_iterator_info = { (GInterfaceInitFunc) gee_tree_map_sub_value_iterator_gee_bidir_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType gee_tree_map_sub_value_iterator_type_id;
	gee_tree_map_sub_value_iterator_type_id = g_type_register_static (GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR, "GeeTreeMapSubValueIterator", &g_define_type_info, 0);
	g_type_add_interface_static (gee_tree_map_sub_value_iterator_type_id, GEE_TYPE_TRAVERSABLE, &gee_traversable_info);
	g_type_add_interface_static (gee_tree_map_sub_value_iterator_type_id, GEE_TYPE_ITERATOR, &gee_iterator_info);
	g_type_add_interface_static (gee_tree_map_sub_value_iterator_type_id, GEE_TYPE_BIDIR_ITERATOR, &gee_bidir_iterator_info);
	GeeTreeMapSubValueIterator_private_offset = g_type_add_instance_private (gee_tree_map_sub_value_iterator_type_id, sizeof (GeeTreeMapSubValueIteratorPrivate));
	return gee_tree_map_sub_value_iterator_type_id;
}

static GType
gee_tree_map_sub_value_iterator_get_type (void)
{
	static volatile gsize gee_tree_map_sub_value_iterator_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_sub_value_iterator_type_id__once)) {
		GType gee_tree_map_sub_value_iterator_type_id;
		gee_tree_map_sub_value_iterator_type_id = gee_tree_map_sub_value_iterator_get_type_once ();
		g_once_init_leave (&gee_tree_map_sub_value_iterator_type_id__once, gee_tree_map_sub_value_iterator_type_id);
	}
	return gee_tree_map_sub_value_iterator_type_id__once;
}

static void
_vala_gee_tree_map_sub_value_iterator_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec)
{
	GeeTreeMapSubValueIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_VALUE_ITERATOR, GeeTreeMapSubValueIterator);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_VALUE_ITERATOR_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_SUB_VALUE_ITERATOR_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_SUB_VALUE_ITERATOR_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_SUB_VALUE_ITERATOR_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_SUB_VALUE_ITERATOR_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_SUB_VALUE_ITERATOR_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_sub_value_iterator_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec)
{
	GeeTreeMapSubValueIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_VALUE_ITERATOR, GeeTreeMapSubValueIterator);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_VALUE_ITERATOR_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_VALUE_ITERATOR_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_VALUE_ITERATOR_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_VALUE_ITERATOR_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_VALUE_ITERATOR_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_VALUE_ITERATOR_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_entry_iterator_get_instance_private (GeeTreeMapEntryIterator* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapEntryIterator_private_offset);
}

static GeeTreeMapEntryIterator*
gee_tree_map_entry_iterator_construct (GType object_type,
                                       GType k_type,
                                       GBoxedCopyFunc k_dup_func,
                                       GDestroyNotify k_destroy_func,
                                       GType v_type,
                                       GBoxedCopyFunc v_dup_func,
                                       GDestroyNotify v_destroy_func,
                                       GeeTreeMap* map)
{
	GeeTreeMapEntryIterator * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	self = (GeeTreeMapEntryIterator*) gee_tree_map_node_iterator_construct (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, map);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapEntryIterator*
gee_tree_map_entry_iterator_new (GType k_type,
                                 GBoxedCopyFunc k_dup_func,
                                 GDestroyNotify k_destroy_func,
                                 GType v_type,
                                 GBoxedCopyFunc v_dup_func,
                                 GDestroyNotify v_destroy_func,
                                 GeeTreeMap* map)
{
	return gee_tree_map_entry_iterator_construct (GEE_TREE_MAP_TYPE_ENTRY_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map);
}

static GeeTreeMapEntryIterator*
gee_tree_map_entry_iterator_construct_pointing (GType object_type,
                                                GType k_type,
                                                GBoxedCopyFunc k_dup_func,
                                                GDestroyNotify k_destroy_func,
                                                GType v_type,
                                                GBoxedCopyFunc v_dup_func,
                                                GDestroyNotify v_destroy_func,
                                                GeeTreeMap* map,
                                                GeeTreeMapNode* node)
{
	GeeTreeMapEntryIterator * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (node != NULL, NULL);
	self = (GeeTreeMapEntryIterator*) gee_tree_map_node_iterator_construct_pointing (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, map, node);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapEntryIterator*
gee_tree_map_entry_iterator_new_pointing (GType k_type,
                                          GBoxedCopyFunc k_dup_func,
                                          GDestroyNotify k_destroy_func,
                                          GType v_type,
                                          GBoxedCopyFunc v_dup_func,
                                          GDestroyNotify v_destroy_func,
                                          GeeTreeMap* map,
                                          GeeTreeMapNode* node)
{
	return gee_tree_map_entry_iterator_construct_pointing (GEE_TREE_MAP_TYPE_ENTRY_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, node);
}

static GeeTreeMapEntryIterator*
gee_tree_map_entry_iterator_construct_from_iterator (GType object_type,
                                                     GType k_type,
                                                     GBoxedCopyFunc k_dup_func,
                                                     GDestroyNotify k_destroy_func,
                                                     GType v_type,
                                                     GBoxedCopyFunc v_dup_func,
                                                     GDestroyNotify v_destroy_func,
                                                     GeeTreeMapEntryIterator* iterator)
{
	GeeTreeMapEntryIterator * self = NULL;
	g_return_val_if_fail (iterator != NULL, NULL);
	self = (GeeTreeMapEntryIterator*) gee_tree_map_node_iterator_construct_from_iterator (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, (GeeTreeMapNodeIterator*) iterator);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapEntryIterator*
gee_tree_map_entry_iterator_new_from_iterator (GType k_type,
                                               GBoxedCopyFunc k_dup_func,
                                               GDestroyNotify k_destroy_func,
                                               GType v_type,
                                               GBoxedCopyFunc v_dup_func,
                                               GDestroyNotify v_destroy_func,
                                               GeeTreeMapEntryIterator* iterator)
{
	return gee_tree_map_entry_iterator_construct_from_iterator (GEE_TREE_MAP_TYPE_ENTRY_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, iterator);
}

static GeeMapEntry*
gee_tree_map_entry_iterator_real_get (GeeIterator* base)
{
	GeeTreeMapEntryIterator * self;
	GeeTreeMap* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GeeTreeMapNode* _tmp3_;
	GeeMapEntry* _tmp4_;
	GeeMapEntry* result;
	self = (GeeTreeMapEntryIterator*) base;
	_tmp0_ = ((GeeTreeMapNodeIterator*) self)->_map;
	_vala_assert (((GeeTreeMapNodeIterator*) self)->stamp == _tmp0_->priv->stamp, "stamp == _map.stamp");
	_tmp1_ = gee_iterator_get_valid ((GeeIterator*) self);
	_tmp2_ = _tmp1_;
	_vala_assert (_tmp2_, "valid");
	_tmp3_ = ((GeeTreeMapNodeIterator*) self)->current;
	_tmp4_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp3_);
	result = _tmp4_;
	return result;
}

static void
gee_tree_map_entry_iterator_real_remove (GeeIterator* base)
{
	GeeTreeMapEntryIterator * self;
	self = (GeeTreeMapEntryIterator*) base;
	gee_tree_map_node_iterator_unset ((GeeTreeMapNodeIterator*) self);
}

static gboolean
gee_tree_map_entry_iterator_real_foreach (GeeTraversable* base,
                                          GeeForallFunc f,
                                          gpointer f_target)
{
	GeeTreeMapEntryIterator * self;
	GeeTreeMapNode* _tmp0_;
	gboolean result;
	self = (GeeTreeMapEntryIterator*) base;
	_tmp0_ = ((GeeTreeMapNodeIterator*) self)->current;
	if (_tmp0_ != NULL) {
		GeeTreeMapNode* _tmp1_;
		GeeMapEntry* _tmp2_;
		GeeTreeMapNode* _tmp3_;
		GeeTreeMapNode* _tmp4_;
		_tmp1_ = ((GeeTreeMapNodeIterator*) self)->current;
		_tmp2_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp1_);
		if (!f (_tmp2_, f_target)) {
			result = FALSE;
			return result;
		}
		_tmp3_ = ((GeeTreeMapNodeIterator*) self)->current;
		_tmp4_ = _tmp3_->next;
		((GeeTreeMapNodeIterator*) self)->current = _tmp4_;
	} else {
		GeeTreeMapNode* _tmp5_;
		_tmp5_ = ((GeeTreeMapNodeIterator*) self)->_next;
		if (_tmp5_ == NULL) {
			GeeTreeMap* _tmp6_;
			GeeTreeMapNode* _tmp7_;
			_tmp6_ = ((GeeTreeMapNodeIterator*) self)->_map;
			_tmp7_ = _tmp6_->priv->first;
			((GeeTreeMapNodeIterator*) self)->current = _tmp7_;
			((GeeTreeMapNodeIterator*) self)->started = TRUE;
		} else {
			GeeTreeMapNode* _tmp8_;
			GeeTreeMapNode* _tmp9_;
			_tmp8_ = ((GeeTreeMapNodeIterator*) self)->_next;
			((GeeTreeMapNodeIterator*) self)->current = _tmp8_;
			_tmp9_ = ((GeeTreeMapNodeIterator*) self)->current;
			if (_tmp9_ != NULL) {
				((GeeTreeMapNodeIterator*) self)->_next = NULL;
				((GeeTreeMapNodeIterator*) self)->_prev = NULL;
			}
		}
	}
	{
		gboolean _tmp10_ = FALSE;
		_tmp10_ = TRUE;
		while (TRUE) {
			GeeTreeMapNode* _tmp13_;
			GeeTreeMapNode* _tmp14_;
			GeeMapEntry* _tmp15_;
			if (!_tmp10_) {
				GeeTreeMapNode* _tmp11_;
				GeeTreeMapNode* _tmp12_;
				_tmp11_ = ((GeeTreeMapNodeIterator*) self)->current;
				_tmp12_ = _tmp11_->next;
				((GeeTreeMapNodeIterator*) self)->current = _tmp12_;
			}
			_tmp10_ = FALSE;
			_tmp13_ = ((GeeTreeMapNodeIterator*) self)->current;
			if (!(_tmp13_ != NULL)) {
				break;
			}
			_tmp14_ = ((GeeTreeMapNodeIterator*) self)->current;
			_tmp15_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp14_);
			if (!f (_tmp15_, f_target)) {
				result = FALSE;
				return result;
			}
		}
	}
	result = TRUE;
	return result;
}

static GeeIterator**
gee_tree_map_entry_iterator_real_tee (GeeTraversable* base,
                                      guint forks,
                                      gint* result_length1)
{
	GeeTreeMapEntryIterator * self;
	GeeIterator** result;
	self = (GeeTreeMapEntryIterator*) base;
	if (forks == ((guint) 0)) {
		GeeIterator** _tmp0_;
		GeeIterator** _tmp1_;
		gint _tmp1__length1;
		_tmp0_ = g_new0 (GeeIterator*, 0 + 1);
		_tmp1_ = _tmp0_;
		_tmp1__length1 = 0;
		if (result_length1) {
			*result_length1 = _tmp1__length1;
		}
		result = _tmp1_;
		return result;
	} else {
		GeeIterator** _result_ = NULL;
		GeeIterator** _tmp2_;
		gint _result__length1;
		gint __result__size_;
		GeeIterator** _tmp3_;
		gint _tmp3__length1;
		GeeIterator* _tmp4_;
		GeeIterator** _tmp9_;
		gint _tmp9__length1;
		_tmp2_ = g_new0 (GeeIterator*, forks + 1);
		_result_ = _tmp2_;
		_result__length1 = forks;
		__result__size_ = _result__length1;
		_tmp3_ = _result_;
		_tmp3__length1 = _result__length1;
		_tmp4_ = _g_object_ref0 ((GeeIterator*) self);
		_g_object_unref0 (_tmp3_[0]);
		_tmp3_[0] = _tmp4_;
		{
			guint i = 0U;
			i = (guint) 1;
			{
				gboolean _tmp5_ = FALSE;
				_tmp5_ = TRUE;
				while (TRUE) {
					GeeIterator** _tmp7_;
					gint _tmp7__length1;
					GeeTreeMapEntryIterator* _tmp8_;
					if (!_tmp5_) {
						guint _tmp6_;
						_tmp6_ = i;
						i = _tmp6_ + 1;
					}
					_tmp5_ = FALSE;
					if (!(i < forks)) {
						break;
					}
					_tmp7_ = _result_;
					_tmp7__length1 = _result__length1;
					_tmp8_ = gee_tree_map_entry_iterator_new_from_iterator (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self);
					_g_object_unref0 (_tmp7_[i]);
					_tmp7_[i] = (GeeIterator*) _tmp8_;
				}
			}
		}
		_tmp9_ = _result_;
		_tmp9__length1 = _result__length1;
		if (result_length1) {
			*result_length1 = _tmp9__length1;
		}
		result = _tmp9_;
		return result;
	}
}

static void
gee_tree_map_entry_iterator_class_init (GeeTreeMapEntryIteratorClass * klass,
                                        gpointer klass_data)
{
	gee_tree_map_entry_iterator_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapEntryIterator_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_entry_iterator_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_entry_iterator_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_ITERATOR_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_ITERATOR_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_ITERATOR_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_ITERATOR_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_ITERATOR_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRY_ITERATOR_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}

static GType
gee_tree_map_entry_iterator_gee_traversable_get_g_type (GeeTreeMapEntryIterator* self)
{
	return GEE_MAP_TYPE_ENTRY;
}

static GBoxedCopyFunc
gee_tree_map_entry_iterator_gee_traversable_get_g_dup_func (GeeTreeMapEntryIterator* self)
{
	return g_object_ref;
}

static GDestroyNotify
gee_tree_map_entry_iterator_gee_traversable_get_g_destroy_func (GeeTreeMapEntryIterator* self)
{
	return g_object_unref;
}

static void
gee_tree_map_entry_iterator_gee_traversable_interface_init (GeeTraversableIface * iface,
                                                            gpointer iface_data)
{
	gee_tree_map_entry_iterator_gee_traversable_parent_iface = g_type_interface_peek_parent (iface);
	iface->foreach = (gboolean (*) (GeeTraversable*, GeeForallFunc, gpointer)) gee_tree_map_entry_iterator_real_foreach;
	iface->tee = (GeeIterator** (*) (GeeTraversable*, guint, gint*)) gee_tree_map_entry_iterator_real_tee;
	iface->get_g_type = (GType (*) (GeeTraversable *)) gee_tree_map_entry_iterator_gee_traversable_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeTraversable *)) gee_tree_map_entry_iterator_gee_traversable_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify (*) (GeeTraversable *)) gee_tree_map_entry_iterator_gee_traversable_get_g_destroy_func;
}

static void
gee_tree_map_entry_iterator_gee_iterator_interface_init (GeeIteratorIface * iface,
                                                         gpointer iface_data)
{
	gee_tree_map_entry_iterator_gee_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get = (gpointer (*) (GeeIterator*)) gee_tree_map_entry_iterator_real_get;
	iface->remove = (void (*) (GeeIterator*)) gee_tree_map_entry_iterator_real_remove;
	iface->next = (gboolean (*) (GeeIterator*)) gee_tree_map_node_iterator_next;
	iface->has_next = (gboolean (*) (GeeIterator*)) gee_tree_map_node_iterator_has_next;
	iface->get_valid = (gboolean (*) (GeeIterator *)) gee_tree_map_node_iterator_get_valid;
	iface->get_read_only = (gboolean (*) (GeeIterator *)) gee_tree_map_node_iterator_get_read_only;
}

static GType
gee_tree_map_entry_iterator_gee_bidir_iterator_get_g_type (GeeTreeMapEntryIterator* self)
{
	return GEE_MAP_TYPE_ENTRY;
}

static GBoxedCopyFunc
gee_tree_map_entry_iterator_gee_bidir_iterator_get_g_dup_func (GeeTreeMapEntryIterator* self)
{
	return g_object_ref;
}

static GDestroyNotify
gee_tree_map_entry_iterator_gee_bidir_iterator_get_g_destroy_func (GeeTreeMapEntryIterator* self)
{
	return g_object_unref;
}

static void
gee_tree_map_entry_iterator_gee_bidir_iterator_interface_init (GeeBidirIteratorIface * iface,
                                                               gpointer iface_data)
{
	gee_tree_map_entry_iterator_gee_bidir_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_g_type = (GType (*) (GeeBidirIterator *)) gee_tree_map_entry_iterator_gee_bidir_iterator_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeBidirIterator *)) gee_tree_map_entry_iterator_gee_bidir_iterator_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify (*) (GeeBidirIterator *)) gee_tree_map_entry_iterator_gee_bidir_iterator_get_g_destroy_func;
	iface->previous = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_node_iterator_previous;
	iface->has_previous = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_node_iterator_has_previous;
	iface->last = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_node_iterator_last;
	iface->first = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_node_iterator_first;
}

static void
gee_tree_map_entry_iterator_instance_init (GeeTreeMapEntryIterator * self,
                                           gpointer klass)
{
	self->priv = gee_tree_map_entry_iterator_get_instance_private (self);
}

static GType
gee_tree_map_entry_iterator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapEntryIteratorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_entry_iterator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapEntryIterator), 0, (GInstanceInitFunc) gee_tree_map_entry_iterator_instance_init, NULL };
	static const GInterfaceInfo gee_traversable_info = { (GInterfaceInitFunc) gee_tree_map_entry_iterator_gee_traversable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_iterator_info = { (GInterfaceInitFunc) gee_tree_map_entry_iterator_gee_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_bidir_iterator_info = { (GInterfaceInitFunc) gee_tree_map_entry_iterator_gee_bidir_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType gee_tree_map_entry_iterator_type_id;
	gee_tree_map_entry_iterator_type_id = g_type_register_static (GEE_TREE_MAP_TYPE_NODE_ITERATOR, "GeeTreeMapEntryIterator", &g_define_type_info, 0);
	g_type_add_interface_static (gee_tree_map_entry_iterator_type_id, GEE_TYPE_TRAVERSABLE, &gee_traversable_info);
	g_type_add_interface_static (gee_tree_map_entry_iterator_type_id, GEE_TYPE_ITERATOR, &gee_iterator_info);
	g_type_add_interface_static (gee_tree_map_entry_iterator_type_id, GEE_TYPE_BIDIR_ITERATOR, &gee_bidir_iterator_info);
	GeeTreeMapEntryIterator_private_offset = g_type_add_instance_private (gee_tree_map_entry_iterator_type_id, sizeof (GeeTreeMapEntryIteratorPrivate));
	return gee_tree_map_entry_iterator_type_id;
}

static GType
gee_tree_map_entry_iterator_get_type (void)
{
	static volatile gsize gee_tree_map_entry_iterator_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_entry_iterator_type_id__once)) {
		GType gee_tree_map_entry_iterator_type_id;
		gee_tree_map_entry_iterator_type_id = gee_tree_map_entry_iterator_get_type_once ();
		g_once_init_leave (&gee_tree_map_entry_iterator_type_id__once, gee_tree_map_entry_iterator_type_id);
	}
	return gee_tree_map_entry_iterator_type_id__once;
}

static void
_vala_gee_tree_map_entry_iterator_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec)
{
	GeeTreeMapEntryIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_ENTRY_ITERATOR, GeeTreeMapEntryIterator);
	switch (property_id) {
		case GEE_TREE_MAP_ENTRY_ITERATOR_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_ENTRY_ITERATOR_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_ENTRY_ITERATOR_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_ENTRY_ITERATOR_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_ENTRY_ITERATOR_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_ENTRY_ITERATOR_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_entry_iterator_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec)
{
	GeeTreeMapEntryIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_ENTRY_ITERATOR, GeeTreeMapEntryIterator);
	switch (property_id) {
		case GEE_TREE_MAP_ENTRY_ITERATOR_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_ENTRY_ITERATOR_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_ENTRY_ITERATOR_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_ENTRY_ITERATOR_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_ENTRY_ITERATOR_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_ENTRY_ITERATOR_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_sub_entry_iterator_get_instance_private (GeeTreeMapSubEntryIterator* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapSubEntryIterator_private_offset);
}

static GeeTreeMapSubEntryIterator*
gee_tree_map_sub_entry_iterator_construct (GType object_type,
                                           GType k_type,
                                           GBoxedCopyFunc k_dup_func,
                                           GDestroyNotify k_destroy_func,
                                           GType v_type,
                                           GBoxedCopyFunc v_dup_func,
                                           GDestroyNotify v_destroy_func,
                                           GeeTreeMap* map,
                                           GeeTreeMapRange* range)
{
	GeeTreeMapSubEntryIterator * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (range != NULL, NULL);
	self = (GeeTreeMapSubEntryIterator*) gee_tree_map_sub_node_iterator_construct (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, map, range);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapSubEntryIterator*
gee_tree_map_sub_entry_iterator_new (GType k_type,
                                     GBoxedCopyFunc k_dup_func,
                                     GDestroyNotify k_destroy_func,
                                     GType v_type,
                                     GBoxedCopyFunc v_dup_func,
                                     GDestroyNotify v_destroy_func,
                                     GeeTreeMap* map,
                                     GeeTreeMapRange* range)
{
	return gee_tree_map_sub_entry_iterator_construct (GEE_TREE_MAP_TYPE_SUB_ENTRY_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, range);
}

static GeeTreeMapSubEntryIterator*
gee_tree_map_sub_entry_iterator_construct_pointing (GType object_type,
                                                    GType k_type,
                                                    GBoxedCopyFunc k_dup_func,
                                                    GDestroyNotify k_destroy_func,
                                                    GType v_type,
                                                    GBoxedCopyFunc v_dup_func,
                                                    GDestroyNotify v_destroy_func,
                                                    GeeTreeMap* map,
                                                    GeeTreeMapRange* range,
                                                    GeeTreeMapNode* node)
{
	GeeTreeMapSubEntryIterator * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (range != NULL, NULL);
	g_return_val_if_fail (node != NULL, NULL);
	self = (GeeTreeMapSubEntryIterator*) gee_tree_map_sub_node_iterator_construct_pointing (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, map, range, node);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapSubEntryIterator*
gee_tree_map_sub_entry_iterator_new_pointing (GType k_type,
                                              GBoxedCopyFunc k_dup_func,
                                              GDestroyNotify k_destroy_func,
                                              GType v_type,
                                              GBoxedCopyFunc v_dup_func,
                                              GDestroyNotify v_destroy_func,
                                              GeeTreeMap* map,
                                              GeeTreeMapRange* range,
                                              GeeTreeMapNode* node)
{
	return gee_tree_map_sub_entry_iterator_construct_pointing (GEE_TREE_MAP_TYPE_SUB_ENTRY_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, range, node);
}

static GeeTreeMapSubEntryIterator*
gee_tree_map_sub_entry_iterator_construct_from_iterator (GType object_type,
                                                         GType k_type,
                                                         GBoxedCopyFunc k_dup_func,
                                                         GDestroyNotify k_destroy_func,
                                                         GType v_type,
                                                         GBoxedCopyFunc v_dup_func,
                                                         GDestroyNotify v_destroy_func,
                                                         GeeTreeMapSubEntryIterator* iterator)
{
	GeeTreeMapSubEntryIterator * self = NULL;
	g_return_val_if_fail (iterator != NULL, NULL);
	self = (GeeTreeMapSubEntryIterator*) gee_tree_map_sub_node_iterator_construct_from_iterator (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, (GeeTreeMapSubNodeIterator*) iterator);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapSubEntryIterator*
gee_tree_map_sub_entry_iterator_new_from_iterator (GType k_type,
                                                   GBoxedCopyFunc k_dup_func,
                                                   GDestroyNotify k_destroy_func,
                                                   GType v_type,
                                                   GBoxedCopyFunc v_dup_func,
                                                   GDestroyNotify v_destroy_func,
                                                   GeeTreeMapSubEntryIterator* iterator)
{
	return gee_tree_map_sub_entry_iterator_construct_from_iterator (GEE_TREE_MAP_TYPE_SUB_ENTRY_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, iterator);
}

static GeeMapEntry*
gee_tree_map_sub_entry_iterator_real_get (GeeIterator* base)
{
	GeeTreeMapSubEntryIterator * self;
	GeeTreeMapNodeIterator* _tmp0_;
	GeeTreeMapNodeIterator* _tmp1_;
	GeeTreeMapNode* _tmp2_;
	GeeMapEntry* _tmp3_;
	GeeMapEntry* result;
	self = (GeeTreeMapSubEntryIterator*) base;
	_tmp0_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
	_vala_assert (_tmp0_ != NULL, "iterator != null");
	_tmp1_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
	_tmp2_ = _tmp1_->current;
	_tmp3_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp2_);
	result = _tmp3_;
	return result;
}

static void
gee_tree_map_sub_entry_iterator_real_remove (GeeIterator* base)
{
	GeeTreeMapSubEntryIterator * self;
	self = (GeeTreeMapSubEntryIterator*) base;
	gee_tree_map_sub_node_iterator_unset ((GeeTreeMapSubNodeIterator*) self);
}

static gboolean
gee_tree_map_sub_entry_iterator_real_foreach (GeeTraversable* base,
                                              GeeForallFunc f,
                                              gpointer f_target)
{
	GeeTreeMapSubEntryIterator * self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean result;
	self = (GeeTreeMapSubEntryIterator*) base;
	_tmp0_ = gee_iterator_get_valid ((GeeIterator*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GeeTreeMapNodeIterator* _tmp2_;
		GeeTreeMapNode* _tmp3_;
		GeeMapEntry* _tmp4_;
		_tmp2_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
		_tmp3_ = _tmp2_->current;
		_tmp4_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp3_);
		if (!f (_tmp4_, f_target)) {
			result = FALSE;
			return result;
		}
	}
	while (TRUE) {
		GeeTreeMapNodeIterator* _tmp5_;
		GeeTreeMapNodeIterator* _tmp6_;
		GeeTreeMapNode* _tmp7_;
		GeeMapEntry* _tmp8_;
		_tmp5_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
		if (!gee_tree_map_node_iterator_next (_tmp5_)) {
			break;
		}
		_tmp6_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
		_tmp7_ = _tmp6_->current;
		_tmp8_ = gee_tree_map_entry_entry_for (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, _tmp7_);
		if (!f (_tmp8_, f_target)) {
			result = FALSE;
			return result;
		}
	}
	result = TRUE;
	return result;
}

static GeeIterator**
gee_tree_map_sub_entry_iterator_real_tee (GeeTraversable* base,
                                          guint forks,
                                          gint* result_length1)
{
	GeeTreeMapSubEntryIterator * self;
	GeeIterator** result;
	self = (GeeTreeMapSubEntryIterator*) base;
	if (forks == ((guint) 0)) {
		GeeIterator** _tmp0_;
		GeeIterator** _tmp1_;
		gint _tmp1__length1;
		_tmp0_ = g_new0 (GeeIterator*, 0 + 1);
		_tmp1_ = _tmp0_;
		_tmp1__length1 = 0;
		if (result_length1) {
			*result_length1 = _tmp1__length1;
		}
		result = _tmp1_;
		return result;
	} else {
		GeeIterator** _result_ = NULL;
		GeeIterator** _tmp2_;
		gint _result__length1;
		gint __result__size_;
		GeeIterator** _tmp3_;
		gint _tmp3__length1;
		GeeIterator* _tmp4_;
		GeeIterator** _tmp9_;
		gint _tmp9__length1;
		_tmp2_ = g_new0 (GeeIterator*, forks + 1);
		_result_ = _tmp2_;
		_result__length1 = forks;
		__result__size_ = _result__length1;
		_tmp3_ = _result_;
		_tmp3__length1 = _result__length1;
		_tmp4_ = _g_object_ref0 ((GeeIterator*) self);
		_g_object_unref0 (_tmp3_[0]);
		_tmp3_[0] = _tmp4_;
		{
			guint i = 0U;
			i = (guint) 1;
			{
				gboolean _tmp5_ = FALSE;
				_tmp5_ = TRUE;
				while (TRUE) {
					GeeIterator** _tmp7_;
					gint _tmp7__length1;
					GeeTreeMapSubEntryIterator* _tmp8_;
					if (!_tmp5_) {
						guint _tmp6_;
						_tmp6_ = i;
						i = _tmp6_ + 1;
					}
					_tmp5_ = FALSE;
					if (!(i < forks)) {
						break;
					}
					_tmp7_ = _result_;
					_tmp7__length1 = _result__length1;
					_tmp8_ = gee_tree_map_sub_entry_iterator_new_from_iterator (self->priv->k_type, (GBoxedCopyFunc) self->priv->k_dup_func, (GDestroyNotify) self->priv->k_destroy_func, self->priv->v_type, (GBoxedCopyFunc) self->priv->v_dup_func, (GDestroyNotify) self->priv->v_destroy_func, self);
					_g_object_unref0 (_tmp7_[i]);
					_tmp7_[i] = (GeeIterator*) _tmp8_;
				}
			}
		}
		_tmp9_ = _result_;
		_tmp9__length1 = _result__length1;
		if (result_length1) {
			*result_length1 = _tmp9__length1;
		}
		result = _tmp9_;
		return result;
	}
}

static void
gee_tree_map_sub_entry_iterator_class_init (GeeTreeMapSubEntryIteratorClass * klass,
                                            gpointer klass_data)
{
	gee_tree_map_sub_entry_iterator_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapSubEntryIterator_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_sub_entry_iterator_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_sub_entry_iterator_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_ITERATOR_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_ITERATOR_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_ITERATOR_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_ITERATOR_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_ITERATOR_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_ENTRY_ITERATOR_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}

static GType
gee_tree_map_sub_entry_iterator_gee_traversable_get_g_type (GeeTreeMapSubEntryIterator* self)
{
	return GEE_MAP_TYPE_ENTRY;
}

static GBoxedCopyFunc
gee_tree_map_sub_entry_iterator_gee_traversable_get_g_dup_func (GeeTreeMapSubEntryIterator* self)
{
	return g_object_ref;
}

static GDestroyNotify
gee_tree_map_sub_entry_iterator_gee_traversable_get_g_destroy_func (GeeTreeMapSubEntryIterator* self)
{
	return g_object_unref;
}

static void
gee_tree_map_sub_entry_iterator_gee_traversable_interface_init (GeeTraversableIface * iface,
                                                                gpointer iface_data)
{
	gee_tree_map_sub_entry_iterator_gee_traversable_parent_iface = g_type_interface_peek_parent (iface);
	iface->foreach = (gboolean (*) (GeeTraversable*, GeeForallFunc, gpointer)) gee_tree_map_sub_entry_iterator_real_foreach;
	iface->tee = (GeeIterator** (*) (GeeTraversable*, guint, gint*)) gee_tree_map_sub_entry_iterator_real_tee;
	iface->get_g_type = (GType (*) (GeeTraversable *)) gee_tree_map_sub_entry_iterator_gee_traversable_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeTraversable *)) gee_tree_map_sub_entry_iterator_gee_traversable_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify (*) (GeeTraversable *)) gee_tree_map_sub_entry_iterator_gee_traversable_get_g_destroy_func;
}

static void
gee_tree_map_sub_entry_iterator_gee_iterator_interface_init (GeeIteratorIface * iface,
                                                             gpointer iface_data)
{
	gee_tree_map_sub_entry_iterator_gee_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get = (gpointer (*) (GeeIterator*)) gee_tree_map_sub_entry_iterator_real_get;
	iface->remove = (void (*) (GeeIterator*)) gee_tree_map_sub_entry_iterator_real_remove;
	iface->next = (gboolean (*) (GeeIterator*)) gee_tree_map_sub_node_iterator_next;
	iface->has_next = (gboolean (*) (GeeIterator*)) gee_tree_map_sub_node_iterator_has_next;
	iface->get_valid = (gboolean (*) (GeeIterator *)) gee_tree_map_sub_node_iterator_get_valid;
	iface->get_read_only = (gboolean (*) (GeeIterator *)) gee_tree_map_sub_node_iterator_get_read_only;
}

static GType
gee_tree_map_sub_entry_iterator_gee_bidir_iterator_get_g_type (GeeTreeMapSubEntryIterator* self)
{
	return GEE_MAP_TYPE_ENTRY;
}

static GBoxedCopyFunc
gee_tree_map_sub_entry_iterator_gee_bidir_iterator_get_g_dup_func (GeeTreeMapSubEntryIterator* self)
{
	return g_object_ref;
}

static GDestroyNotify
gee_tree_map_sub_entry_iterator_gee_bidir_iterator_get_g_destroy_func (GeeTreeMapSubEntryIterator* self)
{
	return g_object_unref;
}

static void
gee_tree_map_sub_entry_iterator_gee_bidir_iterator_interface_init (GeeBidirIteratorIface * iface,
                                                                   gpointer iface_data)
{
	gee_tree_map_sub_entry_iterator_gee_bidir_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_g_type = (GType (*) (GeeBidirIterator *)) gee_tree_map_sub_entry_iterator_gee_bidir_iterator_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeBidirIterator *)) gee_tree_map_sub_entry_iterator_gee_bidir_iterator_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify (*) (GeeBidirIterator *)) gee_tree_map_sub_entry_iterator_gee_bidir_iterator_get_g_destroy_func;
	iface->previous = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_sub_node_iterator_previous;
	iface->has_previous = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_sub_node_iterator_has_previous;
	iface->last = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_sub_node_iterator_last;
	iface->first = (gboolean (*) (GeeBidirIterator*)) gee_tree_map_sub_node_iterator_first;
}

static void
gee_tree_map_sub_entry_iterator_instance_init (GeeTreeMapSubEntryIterator * self,
                                               gpointer klass)
{
	self->priv = gee_tree_map_sub_entry_iterator_get_instance_private (self);
}

static GType
gee_tree_map_sub_entry_iterator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapSubEntryIteratorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_sub_entry_iterator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapSubEntryIterator), 0, (GInstanceInitFunc) gee_tree_map_sub_entry_iterator_instance_init, NULL };
	static const GInterfaceInfo gee_traversable_info = { (GInterfaceInitFunc) gee_tree_map_sub_entry_iterator_gee_traversable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_iterator_info = { (GInterfaceInitFunc) gee_tree_map_sub_entry_iterator_gee_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_bidir_iterator_info = { (GInterfaceInitFunc) gee_tree_map_sub_entry_iterator_gee_bidir_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType gee_tree_map_sub_entry_iterator_type_id;
	gee_tree_map_sub_entry_iterator_type_id = g_type_register_static (GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR, "GeeTreeMapSubEntryIterator", &g_define_type_info, 0);
	g_type_add_interface_static (gee_tree_map_sub_entry_iterator_type_id, GEE_TYPE_TRAVERSABLE, &gee_traversable_info);
	g_type_add_interface_static (gee_tree_map_sub_entry_iterator_type_id, GEE_TYPE_ITERATOR, &gee_iterator_info);
	g_type_add_interface_static (gee_tree_map_sub_entry_iterator_type_id, GEE_TYPE_BIDIR_ITERATOR, &gee_bidir_iterator_info);
	GeeTreeMapSubEntryIterator_private_offset = g_type_add_instance_private (gee_tree_map_sub_entry_iterator_type_id, sizeof (GeeTreeMapSubEntryIteratorPrivate));
	return gee_tree_map_sub_entry_iterator_type_id;
}

static GType
gee_tree_map_sub_entry_iterator_get_type (void)
{
	static volatile gsize gee_tree_map_sub_entry_iterator_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_sub_entry_iterator_type_id__once)) {
		GType gee_tree_map_sub_entry_iterator_type_id;
		gee_tree_map_sub_entry_iterator_type_id = gee_tree_map_sub_entry_iterator_get_type_once ();
		g_once_init_leave (&gee_tree_map_sub_entry_iterator_type_id__once, gee_tree_map_sub_entry_iterator_type_id);
	}
	return gee_tree_map_sub_entry_iterator_type_id__once;
}

static void
_vala_gee_tree_map_sub_entry_iterator_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec)
{
	GeeTreeMapSubEntryIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_ENTRY_ITERATOR, GeeTreeMapSubEntryIterator);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_ENTRY_ITERATOR_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_ITERATOR_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_ITERATOR_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_ITERATOR_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_ITERATOR_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_ITERATOR_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_sub_entry_iterator_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec)
{
	GeeTreeMapSubEntryIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_ENTRY_ITERATOR, GeeTreeMapSubEntryIterator);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_ENTRY_ITERATOR_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_ITERATOR_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_ITERATOR_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_ITERATOR_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_ITERATOR_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_ENTRY_ITERATOR_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_map_iterator_get_instance_private (GeeTreeMapMapIterator* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapMapIterator_private_offset);
}

static GeeTreeMapMapIterator*
gee_tree_map_map_iterator_construct (GType object_type,
                                     GType k_type,
                                     GBoxedCopyFunc k_dup_func,
                                     GDestroyNotify k_destroy_func,
                                     GType v_type,
                                     GBoxedCopyFunc v_dup_func,
                                     GDestroyNotify v_destroy_func,
                                     GeeTreeMap* map)
{
	GeeTreeMapMapIterator * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	self = (GeeTreeMapMapIterator*) gee_tree_map_node_iterator_construct (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, map);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapMapIterator*
gee_tree_map_map_iterator_new (GType k_type,
                               GBoxedCopyFunc k_dup_func,
                               GDestroyNotify k_destroy_func,
                               GType v_type,
                               GBoxedCopyFunc v_dup_func,
                               GDestroyNotify v_destroy_func,
                               GeeTreeMap* map)
{
	return gee_tree_map_map_iterator_construct (GEE_TREE_MAP_TYPE_MAP_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map);
}

static gpointer
gee_tree_map_map_iterator_real_get_key (GeeMapIterator* base)
{
	GeeTreeMapMapIterator * self;
	GeeTreeMap* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gconstpointer _tmp4_;
	gpointer _tmp5_;
	gpointer result;
	self = (GeeTreeMapMapIterator*) base;
	_tmp0_ = ((GeeTreeMapNodeIterator*) self)->_map;
	_vala_assert (((GeeTreeMapNodeIterator*) self)->stamp == _tmp0_->priv->stamp, "stamp == _map.stamp");
	_tmp1_ = gee_map_iterator_get_valid ((GeeMapIterator*) self);
	_tmp2_ = _tmp1_;
	_vala_assert (_tmp2_, "valid");
	_tmp3_ = ((GeeTreeMapNodeIterator*) self)->current;
	_tmp4_ = _tmp3_->key;
	_tmp5_ = ((_tmp4_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp4_) : ((gpointer) _tmp4_);
	result = _tmp5_;
	return result;
}

static gpointer
gee_tree_map_map_iterator_real_get_value (GeeMapIterator* base)
{
	GeeTreeMapMapIterator * self;
	GeeTreeMap* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gconstpointer _tmp4_;
	gpointer _tmp5_;
	gpointer result;
	self = (GeeTreeMapMapIterator*) base;
	_tmp0_ = ((GeeTreeMapNodeIterator*) self)->_map;
	_vala_assert (((GeeTreeMapNodeIterator*) self)->stamp == _tmp0_->priv->stamp, "stamp == _map.stamp");
	_tmp1_ = gee_map_iterator_get_valid ((GeeMapIterator*) self);
	_tmp2_ = _tmp1_;
	_vala_assert (_tmp2_, "valid");
	_tmp3_ = ((GeeTreeMapNodeIterator*) self)->current;
	_tmp4_ = _tmp3_->value;
	_tmp5_ = ((_tmp4_ != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) _tmp4_) : ((gpointer) _tmp4_);
	result = _tmp5_;
	return result;
}

static void
gee_tree_map_map_iterator_real_set_value (GeeMapIterator* base,
                                          gconstpointer value)
{
	GeeTreeMapMapIterator * self;
	GeeTreeMap* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gpointer _tmp4_;
	self = (GeeTreeMapMapIterator*) base;
	_tmp0_ = ((GeeTreeMapNodeIterator*) self)->_map;
	_vala_assert (((GeeTreeMapNodeIterator*) self)->stamp == _tmp0_->priv->stamp, "stamp == _map.stamp");
	_tmp1_ = gee_map_iterator_get_valid ((GeeMapIterator*) self);
	_tmp2_ = _tmp1_;
	_vala_assert (_tmp2_, "valid");
	_tmp3_ = ((GeeTreeMapNodeIterator*) self)->current;
	_tmp4_ = ((value != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) value) : ((gpointer) value);
	((_tmp3_->value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_tmp3_->value = (self->priv->v_destroy_func (_tmp3_->value), NULL));
	_tmp3_->value = _tmp4_;
}

static gboolean
gee_tree_map_map_iterator_real_get_read_only (GeeTreeMapNodeIterator* base)
{
	gboolean result;
	GeeTreeMapMapIterator* self;
	self = (GeeTreeMapMapIterator*) base;
	result = FALSE;
	return result;
}

static gboolean
gee_tree_map_map_iterator_real_get_mutable (GeeMapIterator* base)
{
	gboolean result;
	GeeTreeMapMapIterator* self;
	self = (GeeTreeMapMapIterator*) base;
	result = TRUE;
	return result;
}

static void
gee_tree_map_map_iterator_class_init (GeeTreeMapMapIteratorClass * klass,
                                      gpointer klass_data)
{
	gee_tree_map_map_iterator_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapMapIterator_private_offset);
	GEE_TREE_MAP_NODE_ITERATOR_CLASS (klass)->get_read_only = gee_tree_map_map_iterator_real_get_read_only;
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_map_iterator_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_map_iterator_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_MAP_ITERATOR_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_MAP_ITERATOR_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_MAP_ITERATOR_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_MAP_ITERATOR_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_MAP_ITERATOR_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_MAP_ITERATOR_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_MAP_ITERATOR_READ_ONLY_PROPERTY, gee_tree_map_map_iterator_properties[GEE_TREE_MAP_MAP_ITERATOR_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_MAP_ITERATOR_MUTABLE_PROPERTY, gee_tree_map_map_iterator_properties[GEE_TREE_MAP_MAP_ITERATOR_MUTABLE_PROPERTY] = g_param_spec_boolean ("mutable", "mutable", "mutable", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static GType
gee_tree_map_map_iterator_gee_map_iterator_get_k_type (GeeTreeMapMapIterator* self)
{
	return self->priv->k_type;
}

static GBoxedCopyFunc
gee_tree_map_map_iterator_gee_map_iterator_get_k_dup_func (GeeTreeMapMapIterator* self)
{
	return self->priv->k_dup_func;
}

static GDestroyNotify
gee_tree_map_map_iterator_gee_map_iterator_get_k_destroy_func (GeeTreeMapMapIterator* self)
{
	return self->priv->k_destroy_func;
}

static GType
gee_tree_map_map_iterator_gee_map_iterator_get_v_type (GeeTreeMapMapIterator* self)
{
	return self->priv->v_type;
}

static GBoxedCopyFunc
gee_tree_map_map_iterator_gee_map_iterator_get_v_dup_func (GeeTreeMapMapIterator* self)
{
	return self->priv->v_dup_func;
}

static GDestroyNotify
gee_tree_map_map_iterator_gee_map_iterator_get_v_destroy_func (GeeTreeMapMapIterator* self)
{
	return self->priv->v_destroy_func;
}

static void
gee_tree_map_map_iterator_gee_map_iterator_interface_init (GeeMapIteratorIface * iface,
                                                           gpointer iface_data)
{
	gee_tree_map_map_iterator_gee_map_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_key = (gpointer (*) (GeeMapIterator*)) gee_tree_map_map_iterator_real_get_key;
	iface->get_value = (gpointer (*) (GeeMapIterator*)) gee_tree_map_map_iterator_real_get_value;
	iface->set_value = (void (*) (GeeMapIterator*, gconstpointer)) gee_tree_map_map_iterator_real_set_value;
	iface->get_k_type = (GType (*) (GeeMapIterator *)) gee_tree_map_map_iterator_gee_map_iterator_get_k_type;
	iface->get_k_dup_func = (GBoxedCopyFunc (*) (GeeMapIterator *)) gee_tree_map_map_iterator_gee_map_iterator_get_k_dup_func;
	iface->get_k_destroy_func = (GDestroyNotify (*) (GeeMapIterator *)) gee_tree_map_map_iterator_gee_map_iterator_get_k_destroy_func;
	iface->get_v_type = (GType (*) (GeeMapIterator *)) gee_tree_map_map_iterator_gee_map_iterator_get_v_type;
	iface->get_v_dup_func = (GBoxedCopyFunc (*) (GeeMapIterator *)) gee_tree_map_map_iterator_gee_map_iterator_get_v_dup_func;
	iface->get_v_destroy_func = (GDestroyNotify (*) (GeeMapIterator *)) gee_tree_map_map_iterator_gee_map_iterator_get_v_destroy_func;
	iface->next = (gboolean (*) (GeeMapIterator*)) gee_tree_map_node_iterator_next;
	iface->has_next = (gboolean (*) (GeeMapIterator*)) gee_tree_map_node_iterator_has_next;
	iface->unset = (void (*) (GeeMapIterator*)) gee_tree_map_node_iterator_unset;
	iface->get_read_only = gee_tree_map_map_iterator_real_get_read_only;
	iface->get_mutable = gee_tree_map_map_iterator_real_get_mutable;
	iface->get_valid = (gboolean (*) (GeeMapIterator *)) gee_tree_map_node_iterator_get_valid;
}

static GType
gee_tree_map_map_iterator_gee_bidir_map_iterator_get_k_type (GeeTreeMapMapIterator* self)
{
	return self->priv->k_type;
}

static GBoxedCopyFunc
gee_tree_map_map_iterator_gee_bidir_map_iterator_get_k_dup_func (GeeTreeMapMapIterator* self)
{
	return self->priv->k_dup_func;
}

static GDestroyNotify
gee_tree_map_map_iterator_gee_bidir_map_iterator_get_k_destroy_func (GeeTreeMapMapIterator* self)
{
	return self->priv->k_destroy_func;
}

static GType
gee_tree_map_map_iterator_gee_bidir_map_iterator_get_v_type (GeeTreeMapMapIterator* self)
{
	return self->priv->v_type;
}

static GBoxedCopyFunc
gee_tree_map_map_iterator_gee_bidir_map_iterator_get_v_dup_func (GeeTreeMapMapIterator* self)
{
	return self->priv->v_dup_func;
}

static GDestroyNotify
gee_tree_map_map_iterator_gee_bidir_map_iterator_get_v_destroy_func (GeeTreeMapMapIterator* self)
{
	return self->priv->v_destroy_func;
}

static void
gee_tree_map_map_iterator_gee_bidir_map_iterator_interface_init (GeeBidirMapIteratorIface * iface,
                                                                 gpointer iface_data)
{
	gee_tree_map_map_iterator_gee_bidir_map_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_k_type = (GType (*) (GeeBidirMapIterator *)) gee_tree_map_map_iterator_gee_bidir_map_iterator_get_k_type;
	iface->get_k_dup_func = (GBoxedCopyFunc (*) (GeeBidirMapIterator *)) gee_tree_map_map_iterator_gee_bidir_map_iterator_get_k_dup_func;
	iface->get_k_destroy_func = (GDestroyNotify (*) (GeeBidirMapIterator *)) gee_tree_map_map_iterator_gee_bidir_map_iterator_get_k_destroy_func;
	iface->get_v_type = (GType (*) (GeeBidirMapIterator *)) gee_tree_map_map_iterator_gee_bidir_map_iterator_get_v_type;
	iface->get_v_dup_func = (GBoxedCopyFunc (*) (GeeBidirMapIterator *)) gee_tree_map_map_iterator_gee_bidir_map_iterator_get_v_dup_func;
	iface->get_v_destroy_func = (GDestroyNotify (*) (GeeBidirMapIterator *)) gee_tree_map_map_iterator_gee_bidir_map_iterator_get_v_destroy_func;
	iface->has_previous = (gboolean (*) (GeeBidirMapIterator*)) gee_tree_map_node_iterator_has_previous;
	iface->first = (gboolean (*) (GeeBidirMapIterator*)) gee_tree_map_node_iterator_first;
	iface->previous = (gboolean (*) (GeeBidirMapIterator*)) gee_tree_map_node_iterator_previous;
	iface->last = (gboolean (*) (GeeBidirMapIterator*)) gee_tree_map_node_iterator_last;
}

static void
gee_tree_map_map_iterator_instance_init (GeeTreeMapMapIterator * self,
                                         gpointer klass)
{
	self->priv = gee_tree_map_map_iterator_get_instance_private (self);
}

static GType
gee_tree_map_map_iterator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapMapIteratorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_map_iterator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapMapIterator), 0, (GInstanceInitFunc) gee_tree_map_map_iterator_instance_init, NULL };
	static const GInterfaceInfo gee_map_iterator_info = { (GInterfaceInitFunc) gee_tree_map_map_iterator_gee_map_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_bidir_map_iterator_info = { (GInterfaceInitFunc) gee_tree_map_map_iterator_gee_bidir_map_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType gee_tree_map_map_iterator_type_id;
	gee_tree_map_map_iterator_type_id = g_type_register_static (GEE_TREE_MAP_TYPE_NODE_ITERATOR, "GeeTreeMapMapIterator", &g_define_type_info, 0);
	g_type_add_interface_static (gee_tree_map_map_iterator_type_id, GEE_TYPE_MAP_ITERATOR, &gee_map_iterator_info);
	g_type_add_interface_static (gee_tree_map_map_iterator_type_id, GEE_TYPE_BIDIR_MAP_ITERATOR, &gee_bidir_map_iterator_info);
	GeeTreeMapMapIterator_private_offset = g_type_add_instance_private (gee_tree_map_map_iterator_type_id, sizeof (GeeTreeMapMapIteratorPrivate));
	return gee_tree_map_map_iterator_type_id;
}

static GType
gee_tree_map_map_iterator_get_type (void)
{
	static volatile gsize gee_tree_map_map_iterator_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_map_iterator_type_id__once)) {
		GType gee_tree_map_map_iterator_type_id;
		gee_tree_map_map_iterator_type_id = gee_tree_map_map_iterator_get_type_once ();
		g_once_init_leave (&gee_tree_map_map_iterator_type_id__once, gee_tree_map_map_iterator_type_id);
	}
	return gee_tree_map_map_iterator_type_id__once;
}

static void
_vala_gee_tree_map_map_iterator_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec)
{
	GeeTreeMapMapIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_MAP_ITERATOR, GeeTreeMapMapIterator);
	switch (property_id) {
		case GEE_TREE_MAP_MAP_ITERATOR_READ_ONLY_PROPERTY:
		g_value_set_boolean (value, gee_tree_map_node_iterator_get_read_only ((GeeTreeMapNodeIterator*) self));
		break;
		case GEE_TREE_MAP_MAP_ITERATOR_MUTABLE_PROPERTY:
		g_value_set_boolean (value, gee_map_iterator_get_mutable ((GeeMapIterator*) self));
		break;
		case GEE_TREE_MAP_MAP_ITERATOR_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_MAP_ITERATOR_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_MAP_ITERATOR_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_MAP_ITERATOR_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_MAP_ITERATOR_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_MAP_ITERATOR_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_map_iterator_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec)
{
	GeeTreeMapMapIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_MAP_ITERATOR, GeeTreeMapMapIterator);
	switch (property_id) {
		case GEE_TREE_MAP_MAP_ITERATOR_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_MAP_ITERATOR_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_MAP_ITERATOR_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_MAP_ITERATOR_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_MAP_ITERATOR_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_MAP_ITERATOR_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gee_tree_map_sub_map_iterator_get_instance_private (GeeTreeMapSubMapIterator* self)
{
	return G_STRUCT_MEMBER_P (self, GeeTreeMapSubMapIterator_private_offset);
}

static GeeTreeMapSubMapIterator*
gee_tree_map_sub_map_iterator_construct (GType object_type,
                                         GType k_type,
                                         GBoxedCopyFunc k_dup_func,
                                         GDestroyNotify k_destroy_func,
                                         GType v_type,
                                         GBoxedCopyFunc v_dup_func,
                                         GDestroyNotify v_destroy_func,
                                         GeeTreeMap* map,
                                         GeeTreeMapRange* range)
{
	GeeTreeMapSubMapIterator * self = NULL;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (range != NULL, NULL);
	self = (GeeTreeMapSubMapIterator*) gee_tree_map_sub_node_iterator_construct (object_type, k_type, (GBoxedCopyFunc) k_dup_func, (GDestroyNotify) k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, map, range);
	self->priv->k_type = k_type;
	self->priv->k_dup_func = k_dup_func;
	self->priv->k_destroy_func = k_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	return self;
}

static GeeTreeMapSubMapIterator*
gee_tree_map_sub_map_iterator_new (GType k_type,
                                   GBoxedCopyFunc k_dup_func,
                                   GDestroyNotify k_destroy_func,
                                   GType v_type,
                                   GBoxedCopyFunc v_dup_func,
                                   GDestroyNotify v_destroy_func,
                                   GeeTreeMap* map,
                                   GeeTreeMapRange* range)
{
	return gee_tree_map_sub_map_iterator_construct (GEE_TREE_MAP_TYPE_SUB_MAP_ITERATOR, k_type, k_dup_func, k_destroy_func, v_type, v_dup_func, v_destroy_func, map, range);
}

static gpointer
gee_tree_map_sub_map_iterator_real_get_key (GeeMapIterator* base)
{
	GeeTreeMapSubMapIterator * self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	GeeTreeMapNodeIterator* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gconstpointer _tmp4_;
	gpointer _tmp5_;
	gpointer result;
	self = (GeeTreeMapSubMapIterator*) base;
	_tmp0_ = gee_map_iterator_get_valid ((GeeMapIterator*) self);
	_tmp1_ = _tmp0_;
	_vala_assert (_tmp1_, "valid");
	_tmp2_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
	_tmp3_ = _tmp2_->current;
	_tmp4_ = _tmp3_->key;
	_tmp5_ = ((_tmp4_ != NULL) && (self->priv->k_dup_func != NULL)) ? self->priv->k_dup_func ((gpointer) _tmp4_) : ((gpointer) _tmp4_);
	result = _tmp5_;
	return result;
}

static gpointer
gee_tree_map_sub_map_iterator_real_get_value (GeeMapIterator* base)
{
	GeeTreeMapSubMapIterator * self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	GeeTreeMapNodeIterator* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gconstpointer _tmp4_;
	gpointer _tmp5_;
	gpointer result;
	self = (GeeTreeMapSubMapIterator*) base;
	_tmp0_ = gee_map_iterator_get_valid ((GeeMapIterator*) self);
	_tmp1_ = _tmp0_;
	_vala_assert (_tmp1_, "valid");
	_tmp2_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
	_tmp3_ = _tmp2_->current;
	_tmp4_ = _tmp3_->value;
	_tmp5_ = ((_tmp4_ != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) _tmp4_) : ((gpointer) _tmp4_);
	result = _tmp5_;
	return result;
}

static void
gee_tree_map_sub_map_iterator_real_set_value (GeeMapIterator* base,
                                              gconstpointer value)
{
	GeeTreeMapSubMapIterator * self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	GeeTreeMapNodeIterator* _tmp2_;
	GeeTreeMapNode* _tmp3_;
	gpointer _tmp4_;
	self = (GeeTreeMapSubMapIterator*) base;
	_tmp0_ = gee_map_iterator_get_valid ((GeeMapIterator*) self);
	_tmp1_ = _tmp0_;
	_vala_assert (_tmp1_, "valid");
	_tmp2_ = ((GeeTreeMapSubNodeIterator*) self)->iterator;
	_tmp3_ = _tmp2_->current;
	_tmp4_ = ((value != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) value) : ((gpointer) value);
	((_tmp3_->value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (_tmp3_->value = (self->priv->v_destroy_func (_tmp3_->value), NULL));
	_tmp3_->value = _tmp4_;
}

static gboolean
gee_tree_map_sub_map_iterator_real_get_read_only (GeeTreeMapSubNodeIterator* base)
{
	gboolean result;
	GeeTreeMapSubMapIterator* self;
	self = (GeeTreeMapSubMapIterator*) base;
	result = FALSE;
	return result;
}

static gboolean
gee_tree_map_sub_map_iterator_real_get_mutable (GeeMapIterator* base)
{
	gboolean result;
	GeeTreeMapSubMapIterator* self;
	self = (GeeTreeMapSubMapIterator*) base;
	result = TRUE;
	return result;
}

static void
gee_tree_map_sub_map_iterator_class_init (GeeTreeMapSubMapIteratorClass * klass,
                                          gpointer klass_data)
{
	gee_tree_map_sub_map_iterator_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMapSubMapIterator_private_offset);
	GEE_TREE_MAP_SUB_NODE_ITERATOR_CLASS (klass)->get_read_only = gee_tree_map_sub_map_iterator_real_get_read_only;
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_sub_map_iterator_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_sub_map_iterator_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_ITERATOR_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_ITERATOR_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_ITERATOR_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_ITERATOR_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_ITERATOR_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_ITERATOR_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_ITERATOR_READ_ONLY_PROPERTY, gee_tree_map_sub_map_iterator_properties[GEE_TREE_MAP_SUB_MAP_ITERATOR_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SUB_MAP_ITERATOR_MUTABLE_PROPERTY, gee_tree_map_sub_map_iterator_properties[GEE_TREE_MAP_SUB_MAP_ITERATOR_MUTABLE_PROPERTY] = g_param_spec_boolean ("mutable", "mutable", "mutable", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static GType
gee_tree_map_sub_map_iterator_gee_map_iterator_get_k_type (GeeTreeMapSubMapIterator* self)
{
	return self->priv->k_type;
}

static GBoxedCopyFunc
gee_tree_map_sub_map_iterator_gee_map_iterator_get_k_dup_func (GeeTreeMapSubMapIterator* self)
{
	return self->priv->k_dup_func;
}

static GDestroyNotify
gee_tree_map_sub_map_iterator_gee_map_iterator_get_k_destroy_func (GeeTreeMapSubMapIterator* self)
{
	return self->priv->k_destroy_func;
}

static GType
gee_tree_map_sub_map_iterator_gee_map_iterator_get_v_type (GeeTreeMapSubMapIterator* self)
{
	return self->priv->v_type;
}

static GBoxedCopyFunc
gee_tree_map_sub_map_iterator_gee_map_iterator_get_v_dup_func (GeeTreeMapSubMapIterator* self)
{
	return self->priv->v_dup_func;
}

static GDestroyNotify
gee_tree_map_sub_map_iterator_gee_map_iterator_get_v_destroy_func (GeeTreeMapSubMapIterator* self)
{
	return self->priv->v_destroy_func;
}

static void
gee_tree_map_sub_map_iterator_gee_map_iterator_interface_init (GeeMapIteratorIface * iface,
                                                               gpointer iface_data)
{
	gee_tree_map_sub_map_iterator_gee_map_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_key = (gpointer (*) (GeeMapIterator*)) gee_tree_map_sub_map_iterator_real_get_key;
	iface->get_value = (gpointer (*) (GeeMapIterator*)) gee_tree_map_sub_map_iterator_real_get_value;
	iface->set_value = (void (*) (GeeMapIterator*, gconstpointer)) gee_tree_map_sub_map_iterator_real_set_value;
	iface->get_k_type = (GType (*) (GeeMapIterator *)) gee_tree_map_sub_map_iterator_gee_map_iterator_get_k_type;
	iface->get_k_dup_func = (GBoxedCopyFunc (*) (GeeMapIterator *)) gee_tree_map_sub_map_iterator_gee_map_iterator_get_k_dup_func;
	iface->get_k_destroy_func = (GDestroyNotify (*) (GeeMapIterator *)) gee_tree_map_sub_map_iterator_gee_map_iterator_get_k_destroy_func;
	iface->get_v_type = (GType (*) (GeeMapIterator *)) gee_tree_map_sub_map_iterator_gee_map_iterator_get_v_type;
	iface->get_v_dup_func = (GBoxedCopyFunc (*) (GeeMapIterator *)) gee_tree_map_sub_map_iterator_gee_map_iterator_get_v_dup_func;
	iface->get_v_destroy_func = (GDestroyNotify (*) (GeeMapIterator *)) gee_tree_map_sub_map_iterator_gee_map_iterator_get_v_destroy_func;
	iface->next = (gboolean (*) (GeeMapIterator*)) gee_tree_map_sub_node_iterator_next;
	iface->has_next = (gboolean (*) (GeeMapIterator*)) gee_tree_map_sub_node_iterator_has_next;
	iface->unset = (void (*) (GeeMapIterator*)) gee_tree_map_sub_node_iterator_unset;
	iface->get_read_only = gee_tree_map_sub_map_iterator_real_get_read_only;
	iface->get_mutable = gee_tree_map_sub_map_iterator_real_get_mutable;
	iface->get_valid = (gboolean (*) (GeeMapIterator *)) gee_tree_map_sub_node_iterator_get_valid;
}

static GType
gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_get_k_type (GeeTreeMapSubMapIterator* self)
{
	return self->priv->k_type;
}

static GBoxedCopyFunc
gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_get_k_dup_func (GeeTreeMapSubMapIterator* self)
{
	return self->priv->k_dup_func;
}

static GDestroyNotify
gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_get_k_destroy_func (GeeTreeMapSubMapIterator* self)
{
	return self->priv->k_destroy_func;
}

static GType
gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_get_v_type (GeeTreeMapSubMapIterator* self)
{
	return self->priv->v_type;
}

static GBoxedCopyFunc
gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_get_v_dup_func (GeeTreeMapSubMapIterator* self)
{
	return self->priv->v_dup_func;
}

static GDestroyNotify
gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_get_v_destroy_func (GeeTreeMapSubMapIterator* self)
{
	return self->priv->v_destroy_func;
}

static void
gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_interface_init (GeeBidirMapIteratorIface * iface,
                                                                     gpointer iface_data)
{
	gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_k_type = (GType (*) (GeeBidirMapIterator *)) gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_get_k_type;
	iface->get_k_dup_func = (GBoxedCopyFunc (*) (GeeBidirMapIterator *)) gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_get_k_dup_func;
	iface->get_k_destroy_func = (GDestroyNotify (*) (GeeBidirMapIterator *)) gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_get_k_destroy_func;
	iface->get_v_type = (GType (*) (GeeBidirMapIterator *)) gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_get_v_type;
	iface->get_v_dup_func = (GBoxedCopyFunc (*) (GeeBidirMapIterator *)) gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_get_v_dup_func;
	iface->get_v_destroy_func = (GDestroyNotify (*) (GeeBidirMapIterator *)) gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_get_v_destroy_func;
	iface->has_previous = (gboolean (*) (GeeBidirMapIterator*)) gee_tree_map_sub_node_iterator_has_previous;
	iface->first = (gboolean (*) (GeeBidirMapIterator*)) gee_tree_map_sub_node_iterator_first;
	iface->previous = (gboolean (*) (GeeBidirMapIterator*)) gee_tree_map_sub_node_iterator_previous;
	iface->last = (gboolean (*) (GeeBidirMapIterator*)) gee_tree_map_sub_node_iterator_last;
}

static void
gee_tree_map_sub_map_iterator_instance_init (GeeTreeMapSubMapIterator * self,
                                             gpointer klass)
{
	self->priv = gee_tree_map_sub_map_iterator_get_instance_private (self);
}

static GType
gee_tree_map_sub_map_iterator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapSubMapIteratorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_sub_map_iterator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMapSubMapIterator), 0, (GInstanceInitFunc) gee_tree_map_sub_map_iterator_instance_init, NULL };
	static const GInterfaceInfo gee_map_iterator_info = { (GInterfaceInitFunc) gee_tree_map_sub_map_iterator_gee_map_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_bidir_map_iterator_info = { (GInterfaceInitFunc) gee_tree_map_sub_map_iterator_gee_bidir_map_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType gee_tree_map_sub_map_iterator_type_id;
	gee_tree_map_sub_map_iterator_type_id = g_type_register_static (GEE_TREE_MAP_TYPE_SUB_NODE_ITERATOR, "GeeTreeMapSubMapIterator", &g_define_type_info, 0);
	g_type_add_interface_static (gee_tree_map_sub_map_iterator_type_id, GEE_TYPE_MAP_ITERATOR, &gee_map_iterator_info);
	g_type_add_interface_static (gee_tree_map_sub_map_iterator_type_id, GEE_TYPE_BIDIR_MAP_ITERATOR, &gee_bidir_map_iterator_info);
	GeeTreeMapSubMapIterator_private_offset = g_type_add_instance_private (gee_tree_map_sub_map_iterator_type_id, sizeof (GeeTreeMapSubMapIteratorPrivate));
	return gee_tree_map_sub_map_iterator_type_id;
}

static GType
gee_tree_map_sub_map_iterator_get_type (void)
{
	static volatile gsize gee_tree_map_sub_map_iterator_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_sub_map_iterator_type_id__once)) {
		GType gee_tree_map_sub_map_iterator_type_id;
		gee_tree_map_sub_map_iterator_type_id = gee_tree_map_sub_map_iterator_get_type_once ();
		g_once_init_leave (&gee_tree_map_sub_map_iterator_type_id__once, gee_tree_map_sub_map_iterator_type_id);
	}
	return gee_tree_map_sub_map_iterator_type_id__once;
}

static void
_vala_gee_tree_map_sub_map_iterator_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	GeeTreeMapSubMapIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_MAP_ITERATOR, GeeTreeMapSubMapIterator);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_MAP_ITERATOR_READ_ONLY_PROPERTY:
		g_value_set_boolean (value, gee_tree_map_sub_node_iterator_get_read_only ((GeeTreeMapSubNodeIterator*) self));
		break;
		case GEE_TREE_MAP_SUB_MAP_ITERATOR_MUTABLE_PROPERTY:
		g_value_set_boolean (value, gee_map_iterator_get_mutable ((GeeMapIterator*) self));
		break;
		case GEE_TREE_MAP_SUB_MAP_ITERATOR_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_SUB_MAP_ITERATOR_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_SUB_MAP_ITERATOR_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_SUB_MAP_ITERATOR_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_SUB_MAP_ITERATOR_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_SUB_MAP_ITERATOR_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_sub_map_iterator_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	GeeTreeMapSubMapIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TREE_MAP_TYPE_SUB_MAP_ITERATOR, GeeTreeMapSubMapIterator);
	switch (property_id) {
		case GEE_TREE_MAP_SUB_MAP_ITERATOR_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_MAP_ITERATOR_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_MAP_ITERATOR_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_MAP_ITERATOR_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_SUB_MAP_ITERATOR_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_SUB_MAP_ITERATOR_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
gee_tree_map_class_init (GeeTreeMapClass * klass,
                         gpointer klass_data)
{
	gee_tree_map_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GeeTreeMap_private_offset);
	((GeeAbstractMapClass *) klass)->has_key = (gboolean (*) (GeeAbstractMap*, gconstpointer)) gee_tree_map_real_has_key;
	((GeeAbstractMapClass *) klass)->has = (gboolean (*) (GeeAbstractMap*, gconstpointer, gconstpointer)) gee_tree_map_real_has;
	((GeeAbstractMapClass *) klass)->get = (gpointer (*) (GeeAbstractMap*, gconstpointer)) gee_tree_map_real_get;
	((GeeAbstractMapClass *) klass)->set = (void (*) (GeeAbstractMap*, gconstpointer, gconstpointer)) gee_tree_map_real_set;
	((GeeAbstractMapClass *) klass)->unset = (gboolean (*) (GeeAbstractMap*, gconstpointer, gpointer*)) gee_tree_map_real_unset;
	((GeeAbstractMapClass *) klass)->clear = (void (*) (GeeAbstractMap*)) gee_tree_map_real_clear;
	((GeeAbstractSortedMapClass *) klass)->head_map = (GeeSortedMap* (*) (GeeAbstractSortedMap*, gconstpointer)) gee_tree_map_real_head_map;
	((GeeAbstractSortedMapClass *) klass)->tail_map = (GeeSortedMap* (*) (GeeAbstractSortedMap*, gconstpointer)) gee_tree_map_real_tail_map;
	((GeeAbstractSortedMapClass *) klass)->sub_map = (GeeSortedMap* (*) (GeeAbstractSortedMap*, gconstpointer, gconstpointer)) gee_tree_map_real_sub_map;
	((GeeAbstractMapClass *) klass)->map_iterator = (GeeMapIterator* (*) (GeeAbstractMap*)) gee_tree_map_real_map_iterator;
	((GeeAbstractBidirSortedMapClass *) klass)->bidir_map_iterator = (GeeBidirMapIterator* (*) (GeeAbstractBidirSortedMap*)) gee_tree_map_real_bidir_map_iterator;
	GEE_ABSTRACT_MAP_CLASS (klass)->get_size = gee_tree_map_real_get_size;
	GEE_ABSTRACT_MAP_CLASS (klass)->get_read_only = gee_tree_map_real_get_read_only;
	GEE_ABSTRACT_MAP_CLASS (klass)->get_keys = gee_tree_map_real_get_keys;
	GEE_ABSTRACT_MAP_CLASS (klass)->get_values = gee_tree_map_real_get_values;
	GEE_ABSTRACT_MAP_CLASS (klass)->get_entries = gee_tree_map_real_get_entries;
	GEE_ABSTRACT_SORTED_MAP_CLASS (klass)->get_ascending_keys = gee_tree_map_real_get_ascending_keys;
	GEE_ABSTRACT_SORTED_MAP_CLASS (klass)->get_ascending_entries = gee_tree_map_real_get_ascending_entries;
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_tree_map_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_tree_map_set_property;
	G_OBJECT_CLASS (klass)->finalize = gee_tree_map_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_K_TYPE, g_param_spec_gtype ("k-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_K_DUP_FUNC, g_param_spec_pointer ("k-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_K_DESTROY_FUNC, g_param_spec_pointer ("k-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	/**
	 * {@inheritDoc}
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_SIZE_PROPERTY, gee_tree_map_properties[GEE_TREE_MAP_SIZE_PROPERTY] = g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_READ_ONLY_PROPERTY, gee_tree_map_properties[GEE_TREE_MAP_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	 * {@inheritDoc}
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_KEYS_PROPERTY, gee_tree_map_properties[GEE_TREE_MAP_KEYS_PROPERTY] = g_param_spec_object ("keys", "keys", "keys", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	 * {@inheritDoc}
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_VALUES_PROPERTY, gee_tree_map_properties[GEE_TREE_MAP_VALUES_PROPERTY] = g_param_spec_object ("values", "values", "values", GEE_TYPE_COLLECTION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	 * {@inheritDoc}
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ENTRIES_PROPERTY, gee_tree_map_properties[GEE_TREE_MAP_ENTRIES_PROPERTY] = g_param_spec_object ("entries", "entries", "entries", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	 * {@inheritDoc}
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ASCENDING_KEYS_PROPERTY, gee_tree_map_properties[GEE_TREE_MAP_ASCENDING_KEYS_PROPERTY] = g_param_spec_object ("ascending-keys", "ascending-keys", "ascending-keys", GEE_TYPE_SORTED_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	 * {@inheritDoc}
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_TREE_MAP_ASCENDING_ENTRIES_PROPERTY, gee_tree_map_properties[GEE_TREE_MAP_ASCENDING_ENTRIES_PROPERTY] = g_param_spec_object ("ascending-entries", "ascending-entries", "ascending-entries", GEE_TYPE_SORTED_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gee_tree_map_instance_init (GeeTreeMap * self,
                            gpointer klass)
{
	self->priv = gee_tree_map_get_instance_private (self);
	self->priv->_size = 0;
	self->priv->root = NULL;
	self->priv->first = NULL;
	self->priv->last = NULL;
	self->priv->stamp = 0;
}

static void
gee_tree_map_finalize (GObject * obj)
{
	GeeTreeMap * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TYPE_TREE_MAP, GeeTreeMap);
	gee_abstract_map_clear ((GeeAbstractMap*) self);
	_gee_functions_compare_data_func_closure_unref0 (self->priv->_key_compare_func);
	_gee_functions_equal_data_func_closure_unref0 (self->priv->_value_equal_func);
	_gee_tree_map_node_free0 (self->priv->root);
	G_OBJECT_CLASS (gee_tree_map_parent_class)->finalize (obj);
}

/**
 * Left-leaning red-black tree implementation of the {@link Map} interface.
 *
 * This implementation is especially well designed for large quantity of
 * data. The (balanced) tree implementation insure that the set and get
 * methods are in logarithmic complexity.
 *
 * @see HashMap
 */
static GType
gee_tree_map_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GeeTreeMapClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_tree_map_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeTreeMap), 0, (GInstanceInitFunc) gee_tree_map_instance_init, NULL };
	GType gee_tree_map_type_id;
	gee_tree_map_type_id = g_type_register_static (GEE_TYPE_ABSTRACT_BIDIR_SORTED_MAP, "GeeTreeMap", &g_define_type_info, 0);
	GeeTreeMap_private_offset = g_type_add_instance_private (gee_tree_map_type_id, sizeof (GeeTreeMapPrivate));
	return gee_tree_map_type_id;
}

GType
gee_tree_map_get_type (void)
{
	static volatile gsize gee_tree_map_type_id__once = 0;
	if (g_once_init_enter (&gee_tree_map_type_id__once)) {
		GType gee_tree_map_type_id;
		gee_tree_map_type_id = gee_tree_map_get_type_once ();
		g_once_init_leave (&gee_tree_map_type_id__once, gee_tree_map_type_id);
	}
	return gee_tree_map_type_id__once;
}

static void
_vala_gee_tree_map_get_property (GObject * object,
                                 guint property_id,
                                 GValue * value,
                                 GParamSpec * pspec)
{
	GeeTreeMap * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TYPE_TREE_MAP, GeeTreeMap);
	switch (property_id) {
		case GEE_TREE_MAP_SIZE_PROPERTY:
		g_value_set_int (value, gee_abstract_map_get_size ((GeeAbstractMap*) self));
		break;
		case GEE_TREE_MAP_READ_ONLY_PROPERTY:
		g_value_set_boolean (value, gee_abstract_map_get_read_only ((GeeAbstractMap*) self));
		break;
		case GEE_TREE_MAP_KEYS_PROPERTY:
		g_value_take_object (value, gee_abstract_map_get_keys ((GeeAbstractMap*) self));
		break;
		case GEE_TREE_MAP_VALUES_PROPERTY:
		g_value_take_object (value, gee_abstract_map_get_values ((GeeAbstractMap*) self));
		break;
		case GEE_TREE_MAP_ENTRIES_PROPERTY:
		g_value_take_object (value, gee_abstract_map_get_entries ((GeeAbstractMap*) self));
		break;
		case GEE_TREE_MAP_ASCENDING_KEYS_PROPERTY:
		g_value_take_object (value, gee_abstract_sorted_map_get_ascending_keys ((GeeAbstractSortedMap*) self));
		break;
		case GEE_TREE_MAP_ASCENDING_ENTRIES_PROPERTY:
		g_value_take_object (value, gee_abstract_sorted_map_get_ascending_entries ((GeeAbstractSortedMap*) self));
		break;
		case GEE_TREE_MAP_K_TYPE:
		g_value_set_gtype (value, self->priv->k_type);
		break;
		case GEE_TREE_MAP_K_DUP_FUNC:
		g_value_set_pointer (value, self->priv->k_dup_func);
		break;
		case GEE_TREE_MAP_K_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->k_destroy_func);
		break;
		case GEE_TREE_MAP_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case GEE_TREE_MAP_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case GEE_TREE_MAP_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gee_tree_map_set_property (GObject * object,
                                 guint property_id,
                                 const GValue * value,
                                 GParamSpec * pspec)
{
	GeeTreeMap * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TYPE_TREE_MAP, GeeTreeMap);
	switch (property_id) {
		case GEE_TREE_MAP_K_TYPE:
		self->priv->k_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_K_DUP_FUNC:
		self->priv->k_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_K_DESTROY_FUNC:
		self->priv->k_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case GEE_TREE_MAP_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case GEE_TREE_MAP_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

