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

/*-
 * Copyright (c) 2017-2018 elementary LLC. (https://elementary.io)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

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

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define CODE_WIDGETS_SOURCE_LIST_TYPE_ITEM (code_widgets_source_list_item_get_type ())
#define CODE_WIDGETS_SOURCE_LIST_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CODE_WIDGETS_SOURCE_LIST_TYPE_ITEM, CodeWidgetsSourceListItem))
#define CODE_WIDGETS_SOURCE_LIST_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CODE_WIDGETS_SOURCE_LIST_TYPE_ITEM, CodeWidgetsSourceListItemClass))
#define CODE_WIDGETS_SOURCE_LIST_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CODE_WIDGETS_SOURCE_LIST_TYPE_ITEM))
#define CODE_WIDGETS_SOURCE_LIST_IS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CODE_WIDGETS_SOURCE_LIST_TYPE_ITEM))
#define CODE_WIDGETS_SOURCE_LIST_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CODE_WIDGETS_SOURCE_LIST_TYPE_ITEM, CodeWidgetsSourceListItemClass))

typedef struct _CodeWidgetsSourceListItem CodeWidgetsSourceListItem;
typedef struct _CodeWidgetsSourceListItemClass CodeWidgetsSourceListItemClass;

#define CODE_WIDGETS_SOURCE_LIST_TYPE_EXPANDABLE_ITEM (code_widgets_source_list_expandable_item_get_type ())
#define CODE_WIDGETS_SOURCE_LIST_EXPANDABLE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CODE_WIDGETS_SOURCE_LIST_TYPE_EXPANDABLE_ITEM, CodeWidgetsSourceListExpandableItem))
#define CODE_WIDGETS_SOURCE_LIST_EXPANDABLE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CODE_WIDGETS_SOURCE_LIST_TYPE_EXPANDABLE_ITEM, CodeWidgetsSourceListExpandableItemClass))
#define CODE_WIDGETS_SOURCE_LIST_IS_EXPANDABLE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CODE_WIDGETS_SOURCE_LIST_TYPE_EXPANDABLE_ITEM))
#define CODE_WIDGETS_SOURCE_LIST_IS_EXPANDABLE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CODE_WIDGETS_SOURCE_LIST_TYPE_EXPANDABLE_ITEM))
#define CODE_WIDGETS_SOURCE_LIST_EXPANDABLE_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CODE_WIDGETS_SOURCE_LIST_TYPE_EXPANDABLE_ITEM, CodeWidgetsSourceListExpandableItemClass))

typedef struct _CodeWidgetsSourceListExpandableItem CodeWidgetsSourceListExpandableItem;
typedef struct _CodeWidgetsSourceListExpandableItemClass CodeWidgetsSourceListExpandableItemClass;

#define SCRATCH_SERVICES_TYPE_VALA_SYMBOL_ITEM (scratch_services_vala_symbol_item_get_type ())
#define SCRATCH_SERVICES_VALA_SYMBOL_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SCRATCH_SERVICES_TYPE_VALA_SYMBOL_ITEM, ScratchServicesValaSymbolItem))
#define SCRATCH_SERVICES_VALA_SYMBOL_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SCRATCH_SERVICES_TYPE_VALA_SYMBOL_ITEM, ScratchServicesValaSymbolItemClass))
#define SCRATCH_SERVICES_IS_VALA_SYMBOL_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCRATCH_SERVICES_TYPE_VALA_SYMBOL_ITEM))
#define SCRATCH_SERVICES_IS_VALA_SYMBOL_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SCRATCH_SERVICES_TYPE_VALA_SYMBOL_ITEM))
#define SCRATCH_SERVICES_VALA_SYMBOL_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SCRATCH_SERVICES_TYPE_VALA_SYMBOL_ITEM, ScratchServicesValaSymbolItemClass))

typedef struct _ScratchServicesValaSymbolItem ScratchServicesValaSymbolItem;
typedef struct _ScratchServicesValaSymbolItemClass ScratchServicesValaSymbolItemClass;
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

VALA_EXTERN GType code_widgets_source_list_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CodeWidgetsSourceListItem, g_object_unref)
VALA_EXTERN gint scratch_services_vala_comparison_sort_function (CodeWidgetsSourceListItem* str1,
                                                     CodeWidgetsSourceListItem* str2);
VALA_EXTERN GType code_widgets_source_list_expandable_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CodeWidgetsSourceListExpandableItem, g_object_unref)
VALA_EXTERN GType scratch_services_vala_symbol_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ScratchServicesValaSymbolItem, g_object_unref)
VALA_EXTERN const gchar* code_widgets_source_list_item_get_name (CodeWidgetsSourceListItem* self);
VALA_EXTERN ValaSymbol* scratch_services_vala_symbol_item_get_symbol (ScratchServicesValaSymbolItem* self);
VALA_EXTERN gint scratch_services_vala_comparison_compare_class (ValaClass* s,
                                                     ValaSymbol* s2);
VALA_EXTERN gint scratch_services_vala_comparison_compare_constant (ValaConstant* s,
                                                        ValaSymbol* s2);
VALA_EXTERN gint scratch_services_vala_comparison_compare_delegate (ValaDelegate* s,
                                                        ValaSymbol* s2);
VALA_EXTERN gint scratch_services_vala_comparison_compare_constructor (ValaConstructor* s,
                                                           ValaSymbol* s2);
VALA_EXTERN gint scratch_services_vala_comparison_compare_destructor (ValaDestructor* s,
                                                          ValaSymbol* s2);
VALA_EXTERN gint scratch_services_vala_comparison_compare_creationmethod (ValaCreationMethod* s,
                                                              ValaSymbol* s2);
VALA_EXTERN gint scratch_services_vala_comparison_compare_enum (ValaEnum* s,
                                                    ValaSymbol* s2);
VALA_EXTERN gint scratch_services_vala_comparison_compare_field (ValaField* s,
                                                     ValaSymbol* s2);
VALA_EXTERN gint scratch_services_vala_comparison_compare_interface (ValaInterface* s,
                                                         ValaSymbol* s2);
VALA_EXTERN gint scratch_services_vala_comparison_compare_method (ValaMethod* s,
                                                      ValaSymbol* s2);
VALA_EXTERN gint scratch_services_vala_comparison_compare_namespace (ValaNamespace* s,
                                                         ValaSymbol* s2);
VALA_EXTERN gint scratch_services_vala_comparison_compare_property (ValaProperty* s,
                                                        ValaSymbol* s2);
VALA_EXTERN gint scratch_services_vala_comparison_compare_signal (ValaSignal* s,
                                                      ValaSymbol* s2);
VALA_EXTERN gint scratch_services_vala_comparison_compare_struct (ValaStruct* s,
                                                      ValaSymbol* s2);

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

static gpointer
_vala_code_node_ref0 (gpointer self)
{
	return self ? vala_code_node_ref (self) : NULL;
}

gint
scratch_services_vala_comparison_sort_function (CodeWidgetsSourceListItem* str1,
                                                CodeWidgetsSourceListItem* str2)
{
	gboolean _tmp0_ = FALSE;
	ScratchServicesValaSymbolItem* a = NULL;
	ScratchServicesValaSymbolItem* _tmp5_;
	ScratchServicesValaSymbolItem* b = NULL;
	ScratchServicesValaSymbolItem* _tmp6_;
	ValaSymbol* sa = NULL;
	ScratchServicesValaSymbolItem* _tmp7_;
	ValaSymbol* _tmp8_;
	ValaSymbol* _tmp9_;
	ValaSymbol* _tmp10_;
	ValaSymbol* sb = NULL;
	ScratchServicesValaSymbolItem* _tmp11_;
	ValaSymbol* _tmp12_;
	ValaSymbol* _tmp13_;
	ValaSymbol* _tmp14_;
	ValaSymbol* _tmp15_;
	const gchar* _tmp57_;
	const gchar* _tmp58_;
	const gchar* _tmp59_;
	const gchar* _tmp60_;
	gint result;
	g_return_val_if_fail (str1 != NULL, -1);
	g_return_val_if_fail (str2 != NULL, -1);
	if (SCRATCH_SERVICES_IS_VALA_SYMBOL_ITEM (str1)) {
		_tmp0_ = SCRATCH_SERVICES_IS_VALA_SYMBOL_ITEM (str2);
	} else {
		_tmp0_ = FALSE;
	}
	if (!_tmp0_) {
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp1_ = code_widgets_source_list_item_get_name (str1);
		_tmp2_ = _tmp1_;
		_tmp3_ = code_widgets_source_list_item_get_name (str2);
		_tmp4_ = _tmp3_;
		result = g_utf8_collate (_tmp2_, _tmp4_);
		return result;
	}
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (str1, SCRATCH_SERVICES_TYPE_VALA_SYMBOL_ITEM, ScratchServicesValaSymbolItem));
	a = _tmp5_;
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (str2, SCRATCH_SERVICES_TYPE_VALA_SYMBOL_ITEM, ScratchServicesValaSymbolItem));
	b = _tmp6_;
	_tmp7_ = a;
	_tmp8_ = scratch_services_vala_symbol_item_get_symbol (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = _vala_code_node_ref0 (_tmp9_);
	sa = _tmp10_;
	_tmp11_ = b;
	_tmp12_ = scratch_services_vala_symbol_item_get_symbol (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = _vala_code_node_ref0 (_tmp13_);
	sb = _tmp14_;
	_tmp15_ = sa;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, VALA_TYPE_CLASS)) {
		ValaSymbol* _tmp16_;
		ValaSymbol* _tmp17_;
		_tmp16_ = sa;
		_tmp17_ = sb;
		result = scratch_services_vala_comparison_compare_class (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, VALA_TYPE_CLASS, ValaClass), _tmp17_);
		_vala_code_node_unref0 (sb);
		_vala_code_node_unref0 (sa);
		_g_object_unref0 (b);
		_g_object_unref0 (a);
		return result;
	} else {
		ValaSymbol* _tmp18_;
		_tmp18_ = sa;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, VALA_TYPE_CONSTANT)) {
			ValaSymbol* _tmp19_;
			ValaSymbol* _tmp20_;
			_tmp19_ = sa;
			_tmp20_ = sb;
			result = scratch_services_vala_comparison_compare_constant (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, VALA_TYPE_CONSTANT, ValaConstant), _tmp20_);
			_vala_code_node_unref0 (sb);
			_vala_code_node_unref0 (sa);
			_g_object_unref0 (b);
			_g_object_unref0 (a);
			return result;
		} else {
			ValaSymbol* _tmp21_;
			_tmp21_ = sa;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, VALA_TYPE_DELEGATE)) {
				ValaSymbol* _tmp22_;
				ValaSymbol* _tmp23_;
				_tmp22_ = sa;
				_tmp23_ = sb;
				result = scratch_services_vala_comparison_compare_delegate (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, VALA_TYPE_DELEGATE, ValaDelegate), _tmp23_);
				_vala_code_node_unref0 (sb);
				_vala_code_node_unref0 (sa);
				_g_object_unref0 (b);
				_g_object_unref0 (a);
				return result;
			} else {
				ValaSymbol* _tmp24_;
				_tmp24_ = sa;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, VALA_TYPE_CONSTRUCTOR)) {
					ValaSymbol* _tmp25_;
					ValaSymbol* _tmp26_;
					_tmp25_ = sa;
					_tmp26_ = sb;
					result = scratch_services_vala_comparison_compare_constructor (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, VALA_TYPE_CONSTRUCTOR, ValaConstructor), _tmp26_);
					_vala_code_node_unref0 (sb);
					_vala_code_node_unref0 (sa);
					_g_object_unref0 (b);
					_g_object_unref0 (a);
					return result;
				} else {
					ValaSymbol* _tmp27_;
					_tmp27_ = sa;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp27_, VALA_TYPE_DESTRUCTOR)) {
						ValaSymbol* _tmp28_;
						ValaSymbol* _tmp29_;
						_tmp28_ = sa;
						_tmp29_ = sb;
						result = scratch_services_vala_comparison_compare_destructor (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, VALA_TYPE_DESTRUCTOR, ValaDestructor), _tmp29_);
						_vala_code_node_unref0 (sb);
						_vala_code_node_unref0 (sa);
						_g_object_unref0 (b);
						_g_object_unref0 (a);
						return result;
					} else {
						ValaSymbol* _tmp30_;
						_tmp30_ = sa;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp30_, VALA_TYPE_CREATION_METHOD)) {
							ValaSymbol* _tmp31_;
							ValaSymbol* _tmp32_;
							_tmp31_ = sa;
							_tmp32_ = sb;
							result = scratch_services_vala_comparison_compare_creationmethod (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, VALA_TYPE_CREATION_METHOD, ValaCreationMethod), _tmp32_);
							_vala_code_node_unref0 (sb);
							_vala_code_node_unref0 (sa);
							_g_object_unref0 (b);
							_g_object_unref0 (a);
							return result;
						} else {
							ValaSymbol* _tmp33_;
							_tmp33_ = sa;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp33_, VALA_TYPE_ENUM)) {
								ValaSymbol* _tmp34_;
								ValaSymbol* _tmp35_;
								_tmp34_ = sa;
								_tmp35_ = sb;
								result = scratch_services_vala_comparison_compare_enum (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, VALA_TYPE_ENUM, ValaEnum), _tmp35_);
								_vala_code_node_unref0 (sb);
								_vala_code_node_unref0 (sa);
								_g_object_unref0 (b);
								_g_object_unref0 (a);
								return result;
							} else {
								ValaSymbol* _tmp36_;
								_tmp36_ = sa;
								if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp36_, VALA_TYPE_FIELD)) {
									ValaSymbol* _tmp37_;
									ValaSymbol* _tmp38_;
									_tmp37_ = sa;
									_tmp38_ = sb;
									result = scratch_services_vala_comparison_compare_field (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, VALA_TYPE_FIELD, ValaField), _tmp38_);
									_vala_code_node_unref0 (sb);
									_vala_code_node_unref0 (sa);
									_g_object_unref0 (b);
									_g_object_unref0 (a);
									return result;
								} else {
									ValaSymbol* _tmp39_;
									_tmp39_ = sa;
									if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp39_, VALA_TYPE_INTERFACE)) {
										ValaSymbol* _tmp40_;
										ValaSymbol* _tmp41_;
										_tmp40_ = sa;
										_tmp41_ = sb;
										result = scratch_services_vala_comparison_compare_interface (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, VALA_TYPE_INTERFACE, ValaInterface), _tmp41_);
										_vala_code_node_unref0 (sb);
										_vala_code_node_unref0 (sa);
										_g_object_unref0 (b);
										_g_object_unref0 (a);
										return result;
									} else {
										ValaSymbol* _tmp42_;
										_tmp42_ = sa;
										if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp42_, VALA_TYPE_METHOD)) {
											ValaSymbol* _tmp43_;
											ValaSymbol* _tmp44_;
											_tmp43_ = sa;
											_tmp44_ = sb;
											result = scratch_services_vala_comparison_compare_method (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, VALA_TYPE_METHOD, ValaMethod), _tmp44_);
											_vala_code_node_unref0 (sb);
											_vala_code_node_unref0 (sa);
											_g_object_unref0 (b);
											_g_object_unref0 (a);
											return result;
										} else {
											ValaSymbol* _tmp45_;
											_tmp45_ = sa;
											if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp45_, VALA_TYPE_NAMESPACE)) {
												ValaSymbol* _tmp46_;
												ValaSymbol* _tmp47_;
												_tmp46_ = sa;
												_tmp47_ = sb;
												result = scratch_services_vala_comparison_compare_namespace (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, VALA_TYPE_NAMESPACE, ValaNamespace), _tmp47_);
												_vala_code_node_unref0 (sb);
												_vala_code_node_unref0 (sa);
												_g_object_unref0 (b);
												_g_object_unref0 (a);
												return result;
											} else {
												ValaSymbol* _tmp48_;
												_tmp48_ = sa;
												if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp48_, VALA_TYPE_PROPERTY)) {
													ValaSymbol* _tmp49_;
													ValaSymbol* _tmp50_;
													_tmp49_ = sa;
													_tmp50_ = sb;
													result = scratch_services_vala_comparison_compare_property (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, VALA_TYPE_PROPERTY, ValaProperty), _tmp50_);
													_vala_code_node_unref0 (sb);
													_vala_code_node_unref0 (sa);
													_g_object_unref0 (b);
													_g_object_unref0 (a);
													return result;
												} else {
													ValaSymbol* _tmp51_;
													_tmp51_ = sa;
													if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp51_, VALA_TYPE_SIGNAL)) {
														ValaSymbol* _tmp52_;
														ValaSymbol* _tmp53_;
														_tmp52_ = sa;
														_tmp53_ = sb;
														result = scratch_services_vala_comparison_compare_signal (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, VALA_TYPE_SIGNAL, ValaSignal), _tmp53_);
														_vala_code_node_unref0 (sb);
														_vala_code_node_unref0 (sa);
														_g_object_unref0 (b);
														_g_object_unref0 (a);
														return result;
													} else {
														ValaSymbol* _tmp54_;
														_tmp54_ = sa;
														if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp54_, VALA_TYPE_STRUCT)) {
															ValaSymbol* _tmp55_;
															ValaSymbol* _tmp56_;
															_tmp55_ = sa;
															_tmp56_ = sb;
															result = scratch_services_vala_comparison_compare_struct (G_TYPE_CHECK_INSTANCE_CAST (_tmp55_, VALA_TYPE_STRUCT, ValaStruct), _tmp56_);
															_vala_code_node_unref0 (sb);
															_vala_code_node_unref0 (sa);
															_g_object_unref0 (b);
															_g_object_unref0 (a);
															return result;
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp57_ = code_widgets_source_list_item_get_name (str1);
	_tmp58_ = _tmp57_;
	_tmp59_ = code_widgets_source_list_item_get_name (str2);
	_tmp60_ = _tmp59_;
	result = g_utf8_collate (_tmp58_, _tmp60_);
	_vala_code_node_unref0 (sb);
	_vala_code_node_unref0 (sa);
	_g_object_unref0 (b);
	_g_object_unref0 (a);
	return result;
}

gint
scratch_services_vala_comparison_compare_class (ValaClass* s,
                                                ValaSymbol* s2)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	g_return_val_if_fail (s2 != NULL, -1);
	if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTANT)) {
		result = 1;
		return result;
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DELEGATE)) {
			result = 1;
			return result;
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CREATION_METHOD)) {
				result = 1;
				return result;
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTRUCTOR)) {
					result = 1;
					return result;
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DESTRUCTOR)) {
						result = 1;
						return result;
					} else {
						if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_ENUM)) {
							result = 1;
							return result;
						} else {
							if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_FIELD)) {
								result = 1;
								return result;
							} else {
								if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_INTERFACE)) {
									result = 1;
									return result;
								} else {
									if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_METHOD)) {
										result = 1;
										return result;
									} else {
										if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_NAMESPACE)) {
											result = 1;
											return result;
										} else {
											if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_PROPERTY)) {
												result = 1;
												return result;
											} else {
												if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_SIGNAL)) {
													result = 1;
													return result;
												} else {
													if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_STRUCT)) {
														result = 1;
														return result;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp0_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_symbol_get_name (s2);
	_tmp3_ = _tmp2_;
	result = g_utf8_collate (_tmp1_, _tmp3_);
	return result;
}

gint
scratch_services_vala_comparison_compare_constant (ValaConstant* s,
                                                   ValaSymbol* s2)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	g_return_val_if_fail (s2 != NULL, -1);
	if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CLASS)) {
		result = -1;
		return result;
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DELEGATE)) {
			result = -1;
			return result;
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CREATION_METHOD)) {
				result = -1;
				return result;
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTRUCTOR)) {
					result = -1;
					return result;
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DESTRUCTOR)) {
						result = -1;
						return result;
					} else {
						if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_ENUM)) {
							result = 1;
							return result;
						} else {
							if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_FIELD)) {
								result = -1;
								return result;
							} else {
								if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_INTERFACE)) {
									result = -1;
									return result;
								} else {
									if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_METHOD)) {
										result = -1;
										return result;
									} else {
										if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_NAMESPACE)) {
											result = -1;
											return result;
										} else {
											if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_PROPERTY)) {
												result = -1;
												return result;
											} else {
												if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_SIGNAL)) {
													result = -1;
													return result;
												} else {
													if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_STRUCT)) {
														result = -1;
														return result;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp0_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_symbol_get_name (s2);
	_tmp3_ = _tmp2_;
	result = g_utf8_collate (_tmp1_, _tmp3_);
	return result;
}

gint
scratch_services_vala_comparison_compare_delegate (ValaDelegate* s,
                                                   ValaSymbol* s2)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	g_return_val_if_fail (s2 != NULL, -1);
	if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTANT)) {
		result = 1;
		return result;
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CLASS)) {
			result = -1;
			return result;
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CREATION_METHOD)) {
				result = 1;
				return result;
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTRUCTOR)) {
					result = 1;
					return result;
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DESTRUCTOR)) {
						result = 1;
						return result;
					} else {
						if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_ENUM)) {
							result = 1;
							return result;
						} else {
							if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_FIELD)) {
								result = 1;
								return result;
							} else {
								if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_INTERFACE)) {
									result = -1;
									return result;
								} else {
									if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_METHOD)) {
										result = -1;
										return result;
									} else {
										if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_NAMESPACE)) {
											result = -1;
											return result;
										} else {
											if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_PROPERTY)) {
												result = 1;
												return result;
											} else {
												if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_SIGNAL)) {
													result = 1;
													return result;
												} else {
													if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_STRUCT)) {
														result = -1;
														return result;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp0_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_symbol_get_name (s2);
	_tmp3_ = _tmp2_;
	result = g_utf8_collate (_tmp1_, _tmp3_);
	return result;
}

gint
scratch_services_vala_comparison_compare_constructor (ValaConstructor* s,
                                                      ValaSymbol* s2)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	g_return_val_if_fail (s2 != NULL, -1);
	if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTANT)) {
		result = 1;
		return result;
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DELEGATE)) {
			result = -1;
			return result;
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CLASS)) {
				result = -1;
				return result;
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CREATION_METHOD)) {
					result = 1;
					return result;
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DESTRUCTOR)) {
						result = -1;
						return result;
					} else {
						if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_ENUM)) {
							result = 1;
							return result;
						} else {
							if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_FIELD)) {
								result = 1;
								return result;
							} else {
								if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_INTERFACE)) {
									result = -1;
									return result;
								} else {
									if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_METHOD)) {
										result = -1;
										return result;
									} else {
										if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_NAMESPACE)) {
											result = -1;
											return result;
										} else {
											if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_PROPERTY)) {
												result = 1;
												return result;
											} else {
												if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_SIGNAL)) {
													result = 1;
													return result;
												} else {
													if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_STRUCT)) {
														result = -1;
														return result;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp0_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_symbol_get_name (s2);
	_tmp3_ = _tmp2_;
	result = g_utf8_collate (_tmp1_, _tmp3_);
	return result;
}

gint
scratch_services_vala_comparison_compare_destructor (ValaDestructor* s,
                                                     ValaSymbol* s2)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	g_return_val_if_fail (s2 != NULL, -1);
	if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTANT)) {
		result = 1;
		return result;
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DELEGATE)) {
			result = -1;
			return result;
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CREATION_METHOD)) {
				result = 1;
				return result;
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTRUCTOR)) {
					result = 1;
					return result;
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CLASS)) {
						result = -1;
						return result;
					} else {
						if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_ENUM)) {
							result = 1;
							return result;
						} else {
							if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_FIELD)) {
								result = 1;
								return result;
							} else {
								if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_INTERFACE)) {
									result = -1;
									return result;
								} else {
									if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_METHOD)) {
										result = -1;
										return result;
									} else {
										if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_NAMESPACE)) {
											result = -1;
											return result;
										} else {
											if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_PROPERTY)) {
												result = 1;
												return result;
											} else {
												if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_SIGNAL)) {
													result = 1;
													return result;
												} else {
													if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_STRUCT)) {
														result = -1;
														return result;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp0_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_symbol_get_name (s2);
	_tmp3_ = _tmp2_;
	result = g_utf8_collate (_tmp1_, _tmp3_);
	return result;
}

gint
scratch_services_vala_comparison_compare_creationmethod (ValaCreationMethod* s,
                                                         ValaSymbol* s2)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	g_return_val_if_fail (s2 != NULL, -1);
	if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTANT)) {
		result = 1;
		return result;
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DELEGATE)) {
			result = -1;
			return result;
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CLASS)) {
				result = -1;
				return result;
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTRUCTOR)) {
					result = -1;
					return result;
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DESTRUCTOR)) {
						result = -1;
						return result;
					} else {
						if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_ENUM)) {
							result = 1;
							return result;
						} else {
							if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_FIELD)) {
								result = 1;
								return result;
							} else {
								if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_INTERFACE)) {
									result = -1;
									return result;
								} else {
									if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_METHOD)) {
										result = -1;
										return result;
									} else {
										if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_NAMESPACE)) {
											result = -1;
											return result;
										} else {
											if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_PROPERTY)) {
												result = 1;
												return result;
											} else {
												if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_SIGNAL)) {
													result = 1;
													return result;
												} else {
													if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_STRUCT)) {
														result = -1;
														return result;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp0_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp1_ = _tmp0_;
	if (g_strcmp0 (_tmp1_, ".new") == 0) {
		result = -1;
		return result;
	}
	_tmp2_ = vala_symbol_get_name (s2);
	_tmp3_ = _tmp2_;
	if (g_strcmp0 (_tmp3_, ".new") == 0) {
		result = 1;
		return result;
	}
	_tmp4_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp5_ = _tmp4_;
	_tmp6_ = vala_symbol_get_name (s2);
	_tmp7_ = _tmp6_;
	result = g_utf8_collate (_tmp5_, _tmp7_);
	return result;
}

gint
scratch_services_vala_comparison_compare_enum (ValaEnum* s,
                                               ValaSymbol* s2)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	g_return_val_if_fail (s2 != NULL, -1);
	if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTANT)) {
		result = -1;
		return result;
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DELEGATE)) {
			result = -1;
			return result;
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CREATION_METHOD)) {
				result = -1;
				return result;
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTRUCTOR)) {
					result = -1;
					return result;
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DESTRUCTOR)) {
						result = -1;
						return result;
					} else {
						if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CLASS)) {
							result = -1;
							return result;
						} else {
							if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_FIELD)) {
								result = -1;
								return result;
							} else {
								if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_INTERFACE)) {
									result = -1;
									return result;
								} else {
									if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_METHOD)) {
										result = -1;
										return result;
									} else {
										if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_NAMESPACE)) {
											result = 1;
											return result;
										} else {
											if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_PROPERTY)) {
												result = -1;
												return result;
											} else {
												if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_SIGNAL)) {
													result = -1;
													return result;
												} else {
													if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_STRUCT)) {
														result = -1;
														return result;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp0_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_symbol_get_name (s2);
	_tmp3_ = _tmp2_;
	result = g_utf8_collate (_tmp1_, _tmp3_);
	return result;
}

gint
scratch_services_vala_comparison_compare_field (ValaField* s,
                                                ValaSymbol* s2)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	g_return_val_if_fail (s2 != NULL, -1);
	if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTANT)) {
		result = 1;
		return result;
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DELEGATE)) {
			result = -1;
			return result;
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CREATION_METHOD)) {
				result = -1;
				return result;
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTRUCTOR)) {
					result = -1;
					return result;
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DESTRUCTOR)) {
						result = -1;
						return result;
					} else {
						if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_ENUM)) {
							result = -1;
							return result;
						} else {
							if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CLASS)) {
								result = -1;
								return result;
							} else {
								if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_INTERFACE)) {
									result = -1;
									return result;
								} else {
									if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_METHOD)) {
										result = -1;
										return result;
									} else {
										if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_NAMESPACE)) {
											result = -1;
											return result;
										} else {
											if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_PROPERTY)) {
												result = -1;
												return result;
											} else {
												if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_SIGNAL)) {
													result = -1;
													return result;
												} else {
													if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_STRUCT)) {
														result = -1;
														return result;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp0_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_symbol_get_name (s2);
	_tmp3_ = _tmp2_;
	result = g_utf8_collate (_tmp1_, _tmp3_);
	return result;
}

gint
scratch_services_vala_comparison_compare_interface (ValaInterface* s,
                                                    ValaSymbol* s2)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	g_return_val_if_fail (s2 != NULL, -1);
	if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTANT)) {
		result = 1;
		return result;
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DELEGATE)) {
			result = -1;
			return result;
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CREATION_METHOD)) {
				result = -1;
				return result;
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTRUCTOR)) {
					result = -1;
					return result;
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DESTRUCTOR)) {
						result = -1;
						return result;
					} else {
						if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_ENUM)) {
							result = 1;
							return result;
						} else {
							if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_FIELD)) {
								result = 1;
								return result;
							} else {
								if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CLASS)) {
									result = -1;
									return result;
								} else {
									if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_METHOD)) {
										result = -1;
										return result;
									} else {
										if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_NAMESPACE)) {
											result = 1;
											return result;
										} else {
											if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_PROPERTY)) {
												result = 1;
												return result;
											} else {
												if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_SIGNAL)) {
													result = 1;
													return result;
												} else {
													if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_STRUCT)) {
														result = -1;
														return result;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp0_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_symbol_get_name (s2);
	_tmp3_ = _tmp2_;
	result = g_utf8_collate (_tmp1_, _tmp3_);
	return result;
}

gint
scratch_services_vala_comparison_compare_method (ValaMethod* s,
                                                 ValaSymbol* s2)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	g_return_val_if_fail (s2 != NULL, -1);
	if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTANT)) {
		result = 1;
		return result;
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DELEGATE)) {
			result = 1;
			return result;
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CREATION_METHOD)) {
				result = 1;
				return result;
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTRUCTOR)) {
					result = 1;
					return result;
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DESTRUCTOR)) {
						result = 1;
						return result;
					} else {
						if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_ENUM)) {
							result = 1;
							return result;
						} else {
							if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_FIELD)) {
								result = 1;
								return result;
							} else {
								if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_INTERFACE)) {
									result = -1;
									return result;
								} else {
									if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CLASS)) {
										result = -1;
										return result;
									} else {
										if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_NAMESPACE)) {
											result = -1;
											return result;
										} else {
											if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_PROPERTY)) {
												result = 1;
												return result;
											} else {
												if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_SIGNAL)) {
													result = 1;
													return result;
												} else {
													if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_STRUCT)) {
														result = -1;
														return result;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp0_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_symbol_get_name (s2);
	_tmp3_ = _tmp2_;
	result = g_utf8_collate (_tmp1_, _tmp3_);
	return result;
}

gint
scratch_services_vala_comparison_compare_namespace (ValaNamespace* s,
                                                    ValaSymbol* s2)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	g_return_val_if_fail (s2 != NULL, -1);
	if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTANT)) {
		result = -1;
		return result;
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DELEGATE)) {
			result = -1;
			return result;
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CREATION_METHOD)) {
				result = -1;
				return result;
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTRUCTOR)) {
					result = -1;
					return result;
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DESTRUCTOR)) {
						result = -1;
						return result;
					} else {
						if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_ENUM)) {
							result = -1;
							return result;
						} else {
							if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_FIELD)) {
								result = -1;
								return result;
							} else {
								if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_INTERFACE)) {
									result = -1;
									return result;
								} else {
									if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_METHOD)) {
										result = -1;
										return result;
									} else {
										if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CLASS)) {
											result = -1;
											return result;
										} else {
											if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_PROPERTY)) {
												result = -1;
												return result;
											} else {
												if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_SIGNAL)) {
													result = -1;
													return result;
												} else {
													if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_STRUCT)) {
														result = -1;
														return result;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp0_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_symbol_get_name (s2);
	_tmp3_ = _tmp2_;
	result = g_utf8_collate (_tmp1_, _tmp3_);
	return result;
}

gint
scratch_services_vala_comparison_compare_property (ValaProperty* s,
                                                   ValaSymbol* s2)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	g_return_val_if_fail (s2 != NULL, -1);
	if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTANT)) {
		result = 1;
		return result;
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DELEGATE)) {
			result = -1;
			return result;
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CREATION_METHOD)) {
				result = -1;
				return result;
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTRUCTOR)) {
					result = -1;
					return result;
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DESTRUCTOR)) {
						result = -1;
						return result;
					} else {
						if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_ENUM)) {
							result = -1;
							return result;
						} else {
							if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_FIELD)) {
								result = 1;
								return result;
							} else {
								if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_INTERFACE)) {
									result = -1;
									return result;
								} else {
									if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_METHOD)) {
										result = -1;
										return result;
									} else {
										if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_NAMESPACE)) {
											result = -1;
											return result;
										} else {
											if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CLASS)) {
												result = -1;
												return result;
											} else {
												if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_SIGNAL)) {
													result = -1;
													return result;
												} else {
													if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_STRUCT)) {
														result = -1;
														return result;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp0_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_symbol_get_name (s2);
	_tmp3_ = _tmp2_;
	result = g_utf8_collate (_tmp1_, _tmp3_);
	return result;
}

gint
scratch_services_vala_comparison_compare_signal (ValaSignal* s,
                                                 ValaSymbol* s2)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	g_return_val_if_fail (s2 != NULL, -1);
	if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTANT)) {
		result = 1;
		return result;
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DELEGATE)) {
			result = -1;
			return result;
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CREATION_METHOD)) {
				result = -1;
				return result;
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTRUCTOR)) {
					result = -1;
					return result;
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DESTRUCTOR)) {
						result = -1;
						return result;
					} else {
						if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_ENUM)) {
							result = -1;
							return result;
						} else {
							if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_FIELD)) {
								result = 1;
								return result;
							} else {
								if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_INTERFACE)) {
									result = -1;
									return result;
								} else {
									if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_METHOD)) {
										result = -1;
										return result;
									} else {
										if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_NAMESPACE)) {
											result = -1;
											return result;
										} else {
											if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_PROPERTY)) {
												result = 1;
												return result;
											} else {
												if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CLASS)) {
													result = -1;
													return result;
												} else {
													if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_STRUCT)) {
														result = -1;
														return result;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp0_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_symbol_get_name (s2);
	_tmp3_ = _tmp2_;
	result = g_utf8_collate (_tmp1_, _tmp3_);
	return result;
}

gint
scratch_services_vala_comparison_compare_struct (ValaStruct* s,
                                                 ValaSymbol* s2)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint result;
	g_return_val_if_fail (s != NULL, -1);
	g_return_val_if_fail (s2 != NULL, -1);
	if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTANT)) {
		result = -1;
		return result;
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DELEGATE)) {
			result = -1;
			return result;
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CREATION_METHOD)) {
				result = -1;
				return result;
			} else {
				if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CONSTRUCTOR)) {
					result = -1;
					return result;
				} else {
					if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_DESTRUCTOR)) {
						result = -1;
						return result;
					} else {
						if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_ENUM)) {
							result = 1;
							return result;
						} else {
							if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_FIELD)) {
								result = -1;
								return result;
							} else {
								if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_INTERFACE)) {
									result = 1;
									return result;
								} else {
									if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_METHOD)) {
										result = -1;
										return result;
									} else {
										if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_NAMESPACE)) {
											result = 1;
											return result;
										} else {
											if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_PROPERTY)) {
												result = -1;
												return result;
											} else {
												if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_SIGNAL)) {
													result = -1;
													return result;
												} else {
													if (G_TYPE_CHECK_INSTANCE_TYPE (s2, VALA_TYPE_CLASS)) {
														result = -1;
														return result;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp0_ = vala_symbol_get_name ((ValaSymbol*) s);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_symbol_get_name (s2);
	_tmp3_ = _tmp2_;
	result = g_utf8_collate (_tmp1_, _tmp3_);
	return result;
}

