/* unit.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from unit.vala, do not modify */

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

#include "calculator.h"
#include <glib.h>
#include <glib-object.h>
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.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

enum  {
	UNIT_MANAGER_0_PROPERTY,
	UNIT_MANAGER_NUM_PROPERTIES
};
static GParamSpec* unit_manager_properties[UNIT_MANAGER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	UNIT_CATEGORY_0_PROPERTY,
	UNIT_CATEGORY_NAME_PROPERTY,
	UNIT_CATEGORY_DISPLAY_NAME_PROPERTY,
	UNIT_CATEGORY_NUM_PROPERTIES
};
static GParamSpec* unit_category_properties[UNIT_CATEGORY_NUM_PROPERTIES];
enum  {
	UNIT_0_PROPERTY,
	UNIT_NAME_PROPERTY,
	UNIT_DISPLAY_NAME_PROPERTY,
	UNIT_NUM_PROPERTIES
};
static GParamSpec* unit_properties[UNIT_NUM_PROPERTIES];

#define TYPE_UNIT_SOLVE_EQUATION (unit_solve_equation_get_type ())
#define UNIT_SOLVE_EQUATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNIT_SOLVE_EQUATION, UnitSolveEquation))
#define UNIT_SOLVE_EQUATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNIT_SOLVE_EQUATION, UnitSolveEquationClass))
#define IS_UNIT_SOLVE_EQUATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNIT_SOLVE_EQUATION))
#define IS_UNIT_SOLVE_EQUATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNIT_SOLVE_EQUATION))
#define UNIT_SOLVE_EQUATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNIT_SOLVE_EQUATION, UnitSolveEquationClass))

typedef struct _UnitSolveEquation UnitSolveEquation;
typedef struct _UnitSolveEquationClass UnitSolveEquationClass;
typedef struct _UnitSolveEquationPrivate UnitSolveEquationPrivate;
enum  {
	UNIT_SOLVE_EQUATION_0_PROPERTY,
	UNIT_SOLVE_EQUATION_NUM_PROPERTIES
};
static GParamSpec* unit_solve_equation_properties[UNIT_SOLVE_EQUATION_NUM_PROPERTIES];

struct _UnitManagerPrivate {
	GList* categories;
};

struct _UnitCategoryPrivate {
	GList* units;
	gchar* _name;
	gchar* _display_name;
};

struct _UnitPrivate {
	gchar* _name;
	gchar* _display_name;
	GList* _symbols;
	gchar* from_function;
	gchar* to_function;
};

struct _UnitSolveEquation {
	Equation parent_instance;
	UnitSolveEquationPrivate * priv;
};

struct _UnitSolveEquationClass {
	EquationClass parent_class;
};

struct _UnitSolveEquationPrivate {
	Number* x;
};

VALA_EXTERN UnitManager* default_unit_manager;
UnitManager* default_unit_manager = NULL;
static gint UnitManager_private_offset;
static gpointer unit_manager_parent_class = NULL;
static gint UnitCategory_private_offset;
static gpointer unit_category_parent_class = NULL;
static gint Unit_private_offset;
static gpointer unit_parent_class = NULL;
static gint UnitSolveEquation_private_offset;
static gpointer unit_solve_equation_parent_class = NULL;

static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static gint __lambda14_ (Currency* a,
                  Currency* b);
static gint ___lambda14__gcompare_func (gconstpointer a,
                                 gconstpointer b);
static void unit_manager_finalize (GObject * obj);
static GType unit_manager_get_type_once (void);
static void unit_category_finalize (GObject * obj);
static GType unit_category_get_type_once (void);
static void _vala_unit_category_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec);
static void _g_free0_ (gpointer var);
static inline void _g_list_free__g_free0_ (GList* self);
static Number* unit_solve_function (Unit* self,
                             const gchar* function,
                             Number* x);
VALA_EXTERN GType unit_solve_equation_get_type (void) G_GNUC_CONST ;
VALA_EXTERN UnitSolveEquation* unit_solve_equation_new (const gchar* function,
                                            Number* x);
VALA_EXTERN UnitSolveEquation* unit_solve_equation_construct (GType object_type,
                                                  const gchar* function,
                                                  Number* x);
static void unit_finalize (GObject * obj);
static GType unit_get_type_once (void);
static void _vala_unit_get_property (GObject * object,
                              guint property_id,
                              GValue * value,
                              GParamSpec * pspec);
static gboolean unit_solve_equation_real_variable_is_defined (Equation* base,
                                                       const gchar* name);
static Number* unit_solve_equation_real_get_variable (Equation* base,
                                               const gchar* name);
static void unit_solve_equation_finalize (GObject * obj);
static GType unit_solve_equation_get_type_once (void);
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 gssize _vala_array_length (gpointer array);

static inline gpointer
unit_manager_get_instance_private (UnitManager* self)
{
	return G_STRUCT_MEMBER_P (self, UnitManager_private_offset);
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

UnitManager*
unit_manager_construct (GType object_type)
{
	UnitManager * self = NULL;
	self = (UnitManager*) g_object_new (object_type, NULL);
	(self->priv->categories == NULL) ? NULL : (self->priv->categories = (_g_list_free__g_object_unref0_ (self->priv->categories), NULL));
	self->priv->categories = NULL;
	return self;
}

UnitManager*
unit_manager_new (void)
{
	return unit_manager_construct (TYPE_UNIT_MANAGER);
}

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

static gint
__lambda14_ (Currency* a,
             Currency* b)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gint _tmp6_;
	gint result;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = currency_get_display_name (a);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = currency_get_display_name (b);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_tmp6_ = g_utf8_collate (_tmp2_, _tmp5_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp2_);
	result = _tmp6_;
	return result;
}

static gint
___lambda14__gcompare_func (gconstpointer a,
                            gconstpointer b)
{
	gint result;
	result = __lambda14_ ((Currency*) a, (Currency*) b);
	return result;
}

UnitManager*
unit_manager_get_default (void)
{
	UnitManager* _tmp0_;
	UnitManager* _tmp3_;
	UnitCategory* angle_category = NULL;
	UnitManager* _tmp4_;
	UnitCategory* _tmp5_;
	UnitCategory* length_category = NULL;
	UnitManager* _tmp6_;
	UnitCategory* _tmp7_;
	UnitCategory* area_category = NULL;
	UnitManager* _tmp8_;
	UnitCategory* _tmp9_;
	UnitCategory* volume_category = NULL;
	UnitManager* _tmp10_;
	UnitCategory* _tmp11_;
	UnitCategory* weight_category = NULL;
	UnitManager* _tmp12_;
	UnitCategory* _tmp13_;
	UnitCategory* speed_category = NULL;
	UnitManager* _tmp14_;
	UnitCategory* _tmp15_;
	UnitCategory* duration_category = NULL;
	UnitManager* _tmp16_;
	UnitCategory* _tmp17_;
	UnitCategory* frequency_category = NULL;
	UnitManager* _tmp18_;
	UnitCategory* _tmp19_;
	UnitCategory* temperature_category = NULL;
	UnitManager* _tmp20_;
	UnitCategory* _tmp21_;
	UnitCategory* energy_category = NULL;
	UnitManager* _tmp22_;
	UnitCategory* _tmp23_;
	UnitCategory* pressure_category = NULL;
	UnitManager* _tmp24_;
	UnitCategory* _tmp25_;
	UnitCategory* digitalstorage_category = NULL;
	UnitManager* _tmp26_;
	UnitCategory* _tmp27_;
	UnitCategory* _tmp28_;
	Unit* _tmp29_;
	Unit* _tmp30_;
	UnitCategory* _tmp31_;
	Unit* _tmp32_;
	Unit* _tmp33_;
	UnitCategory* _tmp34_;
	Unit* _tmp35_;
	Unit* _tmp36_;
	UnitCategory* _tmp37_;
	Unit* _tmp38_;
	Unit* _tmp39_;
	UnitCategory* _tmp40_;
	Unit* _tmp41_;
	Unit* _tmp42_;
	UnitCategory* _tmp43_;
	Unit* _tmp44_;
	Unit* _tmp45_;
	UnitCategory* _tmp46_;
	Unit* _tmp47_;
	Unit* _tmp48_;
	UnitCategory* _tmp49_;
	Unit* _tmp50_;
	Unit* _tmp51_;
	UnitCategory* _tmp52_;
	Unit* _tmp53_;
	Unit* _tmp54_;
	UnitCategory* _tmp55_;
	Unit* _tmp56_;
	Unit* _tmp57_;
	UnitCategory* _tmp58_;
	Unit* _tmp59_;
	Unit* _tmp60_;
	UnitCategory* _tmp61_;
	Unit* _tmp62_;
	Unit* _tmp63_;
	UnitCategory* _tmp64_;
	Unit* _tmp65_;
	Unit* _tmp66_;
	UnitCategory* _tmp67_;
	Unit* _tmp68_;
	Unit* _tmp69_;
	UnitCategory* _tmp70_;
	Unit* _tmp71_;
	Unit* _tmp72_;
	UnitCategory* _tmp73_;
	Unit* _tmp74_;
	Unit* _tmp75_;
	UnitCategory* _tmp76_;
	Unit* _tmp77_;
	Unit* _tmp78_;
	UnitCategory* _tmp79_;
	Unit* _tmp80_;
	Unit* _tmp81_;
	UnitCategory* _tmp82_;
	Unit* _tmp83_;
	Unit* _tmp84_;
	UnitCategory* _tmp85_;
	Unit* _tmp86_;
	Unit* _tmp87_;
	UnitCategory* _tmp88_;
	Unit* _tmp89_;
	Unit* _tmp90_;
	UnitCategory* _tmp91_;
	Unit* _tmp92_;
	Unit* _tmp93_;
	UnitCategory* _tmp94_;
	Unit* _tmp95_;
	Unit* _tmp96_;
	UnitCategory* _tmp97_;
	Unit* _tmp98_;
	Unit* _tmp99_;
	UnitCategory* _tmp100_;
	Unit* _tmp101_;
	Unit* _tmp102_;
	UnitCategory* _tmp103_;
	Unit* _tmp104_;
	Unit* _tmp105_;
	UnitCategory* _tmp106_;
	Unit* _tmp107_;
	Unit* _tmp108_;
	UnitCategory* _tmp109_;
	Unit* _tmp110_;
	Unit* _tmp111_;
	UnitCategory* _tmp112_;
	Unit* _tmp113_;
	Unit* _tmp114_;
	UnitCategory* _tmp115_;
	Unit* _tmp116_;
	Unit* _tmp117_;
	UnitCategory* _tmp118_;
	Unit* _tmp119_;
	Unit* _tmp120_;
	UnitCategory* _tmp121_;
	Unit* _tmp122_;
	Unit* _tmp123_;
	UnitCategory* _tmp124_;
	Unit* _tmp125_;
	Unit* _tmp126_;
	UnitCategory* _tmp127_;
	Unit* _tmp128_;
	Unit* _tmp129_;
	UnitCategory* _tmp130_;
	Unit* _tmp131_;
	Unit* _tmp132_;
	UnitCategory* _tmp133_;
	Unit* _tmp134_;
	Unit* _tmp135_;
	UnitCategory* _tmp136_;
	Unit* _tmp137_;
	Unit* _tmp138_;
	UnitCategory* _tmp139_;
	Unit* _tmp140_;
	Unit* _tmp141_;
	UnitCategory* _tmp142_;
	Unit* _tmp143_;
	Unit* _tmp144_;
	UnitCategory* _tmp145_;
	Unit* _tmp146_;
	Unit* _tmp147_;
	UnitCategory* _tmp148_;
	Unit* _tmp149_;
	Unit* _tmp150_;
	UnitCategory* _tmp151_;
	Unit* _tmp152_;
	Unit* _tmp153_;
	UnitCategory* _tmp154_;
	Unit* _tmp155_;
	Unit* _tmp156_;
	UnitCategory* _tmp157_;
	Unit* _tmp158_;
	Unit* _tmp159_;
	UnitCategory* _tmp160_;
	Unit* _tmp161_;
	Unit* _tmp162_;
	UnitCategory* _tmp163_;
	Unit* _tmp164_;
	Unit* _tmp165_;
	UnitCategory* _tmp166_;
	Unit* _tmp167_;
	Unit* _tmp168_;
	UnitCategory* _tmp169_;
	Unit* _tmp170_;
	Unit* _tmp171_;
	UnitCategory* _tmp172_;
	Unit* _tmp173_;
	Unit* _tmp174_;
	UnitCategory* _tmp175_;
	Unit* _tmp176_;
	Unit* _tmp177_;
	UnitCategory* _tmp178_;
	Unit* _tmp179_;
	Unit* _tmp180_;
	UnitCategory* _tmp181_;
	Unit* _tmp182_;
	Unit* _tmp183_;
	UnitCategory* _tmp184_;
	Unit* _tmp185_;
	Unit* _tmp186_;
	UnitCategory* _tmp187_;
	Unit* _tmp188_;
	Unit* _tmp189_;
	UnitCategory* _tmp190_;
	Unit* _tmp191_;
	Unit* _tmp192_;
	UnitCategory* _tmp193_;
	Unit* _tmp194_;
	Unit* _tmp195_;
	UnitCategory* _tmp196_;
	Unit* _tmp197_;
	Unit* _tmp198_;
	UnitCategory* _tmp199_;
	Unit* _tmp200_;
	Unit* _tmp201_;
	UnitCategory* _tmp202_;
	Unit* _tmp203_;
	Unit* _tmp204_;
	UnitCategory* _tmp205_;
	Unit* _tmp206_;
	Unit* _tmp207_;
	UnitCategory* _tmp208_;
	Unit* _tmp209_;
	Unit* _tmp210_;
	UnitCategory* _tmp211_;
	Unit* _tmp212_;
	Unit* _tmp213_;
	UnitCategory* _tmp214_;
	Unit* _tmp215_;
	Unit* _tmp216_;
	UnitCategory* _tmp217_;
	Unit* _tmp218_;
	Unit* _tmp219_;
	UnitCategory* _tmp220_;
	Unit* _tmp221_;
	Unit* _tmp222_;
	UnitCategory* _tmp223_;
	Unit* _tmp224_;
	Unit* _tmp225_;
	UnitCategory* _tmp226_;
	Unit* _tmp227_;
	Unit* _tmp228_;
	UnitCategory* _tmp229_;
	Unit* _tmp230_;
	Unit* _tmp231_;
	UnitCategory* _tmp232_;
	Unit* _tmp233_;
	Unit* _tmp234_;
	UnitCategory* _tmp235_;
	Unit* _tmp236_;
	Unit* _tmp237_;
	UnitCategory* _tmp238_;
	Unit* _tmp239_;
	Unit* _tmp240_;
	UnitCategory* _tmp241_;
	Unit* _tmp242_;
	Unit* _tmp243_;
	UnitCategory* _tmp244_;
	Unit* _tmp245_;
	Unit* _tmp246_;
	UnitCategory* _tmp247_;
	Unit* _tmp248_;
	Unit* _tmp249_;
	UnitCategory* _tmp250_;
	Unit* _tmp251_;
	Unit* _tmp252_;
	UnitCategory* _tmp253_;
	Unit* _tmp254_;
	Unit* _tmp255_;
	UnitCategory* _tmp256_;
	Unit* _tmp257_;
	Unit* _tmp258_;
	UnitCategory* _tmp259_;
	Unit* _tmp260_;
	Unit* _tmp261_;
	UnitCategory* _tmp262_;
	Unit* _tmp263_;
	Unit* _tmp264_;
	UnitCategory* _tmp265_;
	Unit* _tmp266_;
	Unit* _tmp267_;
	UnitCategory* _tmp268_;
	Unit* _tmp269_;
	Unit* _tmp270_;
	UnitCategory* _tmp271_;
	Unit* _tmp272_;
	Unit* _tmp273_;
	UnitCategory* _tmp274_;
	Unit* _tmp275_;
	Unit* _tmp276_;
	UnitCategory* _tmp277_;
	Unit* _tmp278_;
	Unit* _tmp279_;
	UnitCategory* _tmp280_;
	Unit* _tmp281_;
	Unit* _tmp282_;
	UnitCategory* _tmp283_;
	Unit* _tmp284_;
	Unit* _tmp285_;
	UnitCategory* _tmp286_;
	Unit* _tmp287_;
	Unit* _tmp288_;
	UnitCategory* _tmp289_;
	Unit* _tmp290_;
	Unit* _tmp291_;
	UnitCategory* _tmp292_;
	Unit* _tmp293_;
	Unit* _tmp294_;
	UnitCategory* _tmp295_;
	Unit* _tmp296_;
	Unit* _tmp297_;
	UnitCategory* _tmp298_;
	Unit* _tmp299_;
	Unit* _tmp300_;
	UnitCategory* _tmp301_;
	Unit* _tmp302_;
	Unit* _tmp303_;
	UnitCategory* _tmp304_;
	Unit* _tmp305_;
	Unit* _tmp306_;
	UnitCategory* _tmp307_;
	Unit* _tmp308_;
	Unit* _tmp309_;
	UnitCategory* _tmp310_;
	Unit* _tmp311_;
	Unit* _tmp312_;
	UnitCategory* _tmp313_;
	Unit* _tmp314_;
	Unit* _tmp315_;
	UnitCategory* _tmp316_;
	Unit* _tmp317_;
	Unit* _tmp318_;
	UnitCategory* _tmp319_;
	Unit* _tmp320_;
	Unit* _tmp321_;
	UnitCategory* _tmp322_;
	Unit* _tmp323_;
	Unit* _tmp324_;
	UnitCategory* _tmp325_;
	Unit* _tmp326_;
	Unit* _tmp327_;
	UnitCategory* _tmp328_;
	Unit* _tmp329_;
	Unit* _tmp330_;
	UnitCategory* _tmp331_;
	Unit* _tmp332_;
	Unit* _tmp333_;
	UnitCategory* _tmp334_;
	Unit* _tmp335_;
	Unit* _tmp336_;
	UnitCategory* _tmp337_;
	Unit* _tmp338_;
	Unit* _tmp339_;
	UnitCategory* _tmp340_;
	Unit* _tmp341_;
	Unit* _tmp342_;
	UnitCategory* _tmp343_;
	Unit* _tmp344_;
	Unit* _tmp345_;
	UnitCategory* _tmp346_;
	Unit* _tmp347_;
	Unit* _tmp348_;
	UnitCategory* _tmp349_;
	Unit* _tmp350_;
	Unit* _tmp351_;
	UnitCategory* _tmp352_;
	Unit* _tmp353_;
	Unit* _tmp354_;
	UnitCategory* _tmp355_;
	Unit* _tmp356_;
	Unit* _tmp357_;
	UnitCategory* _tmp358_;
	Unit* _tmp359_;
	Unit* _tmp360_;
	UnitCategory* _tmp361_;
	Unit* _tmp362_;
	Unit* _tmp363_;
	UnitCategory* _tmp364_;
	Unit* _tmp365_;
	Unit* _tmp366_;
	UnitCategory* _tmp367_;
	Unit* _tmp368_;
	Unit* _tmp369_;
	UnitCategory* _tmp370_;
	Unit* _tmp371_;
	Unit* _tmp372_;
	UnitCategory* _tmp373_;
	Unit* _tmp374_;
	Unit* _tmp375_;
	UnitCategory* _tmp376_;
	Unit* _tmp377_;
	Unit* _tmp378_;
	UnitCategory* _tmp379_;
	Unit* _tmp380_;
	Unit* _tmp381_;
	UnitCategory* _tmp382_;
	Unit* _tmp383_;
	Unit* _tmp384_;
	UnitCategory* _tmp385_;
	Unit* _tmp386_;
	Unit* _tmp387_;
	UnitCategory* _tmp388_;
	Unit* _tmp389_;
	Unit* _tmp390_;
	UnitCategory* _tmp391_;
	Unit* _tmp392_;
	Unit* _tmp393_;
	UnitCategory* _tmp394_;
	Unit* _tmp395_;
	Unit* _tmp396_;
	UnitCategory* _tmp397_;
	Unit* _tmp398_;
	Unit* _tmp399_;
	UnitCategory* _tmp400_;
	Unit* _tmp401_;
	Unit* _tmp402_;
	UnitCategory* _tmp403_;
	Unit* _tmp404_;
	Unit* _tmp405_;
	UnitCategory* _tmp406_;
	Unit* _tmp407_;
	Unit* _tmp408_;
	UnitCategory* _tmp409_;
	Unit* _tmp410_;
	Unit* _tmp411_;
	UnitCategory* currency_category = NULL;
	UnitManager* _tmp412_;
	UnitCategory* _tmp413_;
	GList* currencies = NULL;
	CurrencyManager* _tmp414_;
	CurrencyManager* _tmp415_;
	GList* _tmp416_;
	GList* _tmp417_;
	GList* _tmp418_;
	UnitCategory* numberbase_category = NULL;
	UnitManager* _tmp436_;
	UnitCategory* _tmp437_;
	UnitCategory* _tmp438_;
	Unit* _tmp439_;
	Unit* _tmp440_;
	UnitCategory* _tmp441_;
	Unit* _tmp442_;
	Unit* _tmp443_;
	UnitCategory* _tmp444_;
	Unit* _tmp445_;
	Unit* _tmp446_;
	UnitCategory* _tmp447_;
	Unit* _tmp448_;
	Unit* _tmp449_;
	UnitManager* _tmp450_;
	UnitManager* _tmp451_;
	UnitManager* result;
	_tmp0_ = default_unit_manager;
	if (_tmp0_ != NULL) {
		UnitManager* _tmp1_;
		UnitManager* _tmp2_;
		_tmp1_ = default_unit_manager;
		_tmp2_ = _g_object_ref0 (_tmp1_);
		result = _tmp2_;
		return result;
	}
	_tmp3_ = unit_manager_new ();
	_g_object_unref0 (default_unit_manager);
	default_unit_manager = _tmp3_;
	_tmp4_ = default_unit_manager;
	_tmp5_ = unit_manager_add_category (_tmp4_, "angle", _ ("Angle"));
	angle_category = _tmp5_;
	_tmp6_ = default_unit_manager;
	_tmp7_ = unit_manager_add_category (_tmp6_, "length", _ ("Length"));
	length_category = _tmp7_;
	_tmp8_ = default_unit_manager;
	_tmp9_ = unit_manager_add_category (_tmp8_, "area", _ ("Area"));
	area_category = _tmp9_;
	_tmp10_ = default_unit_manager;
	_tmp11_ = unit_manager_add_category (_tmp10_, "volume", _ ("Volume"));
	volume_category = _tmp11_;
	_tmp12_ = default_unit_manager;
	_tmp13_ = unit_manager_add_category (_tmp12_, "weight", _ ("Mass"));
	weight_category = _tmp13_;
	_tmp14_ = default_unit_manager;
	_tmp15_ = unit_manager_add_category (_tmp14_, "speed", _ ("Speed"));
	speed_category = _tmp15_;
	_tmp16_ = default_unit_manager;
	_tmp17_ = unit_manager_add_category (_tmp16_, "duration", _ ("Duration"));
	duration_category = _tmp17_;
	_tmp18_ = default_unit_manager;
	_tmp19_ = unit_manager_add_category (_tmp18_, "frequency", _ ("Frequency"));
	frequency_category = _tmp19_;
	_tmp20_ = default_unit_manager;
	_tmp21_ = unit_manager_add_category (_tmp20_, "temperature", _ ("Temperature"));
	temperature_category = _tmp21_;
	_tmp22_ = default_unit_manager;
	_tmp23_ = unit_manager_add_category (_tmp22_, "energy", _ ("Energy"));
	energy_category = _tmp23_;
	_tmp24_ = default_unit_manager;
	_tmp25_ = unit_manager_add_category (_tmp24_, "pressure", _ ("Pressure"));
	pressure_category = _tmp25_;
	_tmp26_ = default_unit_manager;
	_tmp27_ = unit_manager_add_category (_tmp26_, "digitalstorage", _ ("Digital Storage"));
	digitalstorage_category = _tmp27_;
	_tmp28_ = angle_category;
	_tmp29_ = unit_new ("degree", _ ("Degrees (Decimal)"), "π*x/180", "180x/π", g_dpgettext2 (NULL, "unit-symbols", "degree,degrees,deg"));
	_tmp30_ = _tmp29_;
	unit_category_add_unit (_tmp28_, _tmp30_);
	_g_object_unref0 (_tmp30_);
	_tmp31_ = angle_category;
	_tmp32_ = unit_new ("dms", _ ("Degrees (D°M′S″)"), "π*x/180", "180x/π", "");
	_tmp33_ = _tmp32_;
	unit_category_add_unit (_tmp31_, _tmp33_);
	_g_object_unref0 (_tmp33_);
	_tmp34_ = angle_category;
	_tmp35_ = unit_new ("radian", _ ("Radians"), "x", "x", g_dpgettext2 (NULL, "unit-symbols", "radian,radians,rad"));
	_tmp36_ = _tmp35_;
	unit_category_add_unit (_tmp34_, _tmp36_);
	_g_object_unref0 (_tmp36_);
	_tmp37_ = angle_category;
	_tmp38_ = unit_new ("gradian", _ ("Gradians"), "π*x/200", "200x/π", g_dpgettext2 (NULL, "unit-symbols", "gradian,gradians,grad"));
	_tmp39_ = _tmp38_;
	unit_category_add_unit (_tmp37_, _tmp39_);
	_g_object_unref0 (_tmp39_);
	_tmp40_ = length_category;
	_tmp41_ = unit_new ("parsec", _ ("Parsecs"), "30857000000000000x", "x/30857000000000000", g_dpgettext2 (NULL, "unit-symbols", "parsec,parsecs,pc"));
	_tmp42_ = _tmp41_;
	unit_category_add_unit (_tmp40_, _tmp42_);
	_g_object_unref0 (_tmp42_);
	_tmp43_ = length_category;
	_tmp44_ = unit_new ("lightyear", _ ("Light Years"), "9460730472580800x", "x/9460730472580800", g_dpgettext2 (NULL, "unit-symbols", "lightyear,lightyears,ly"));
	_tmp45_ = _tmp44_;
	unit_category_add_unit (_tmp43_, _tmp45_);
	_g_object_unref0 (_tmp45_);
	_tmp46_ = length_category;
	_tmp47_ = unit_new ("astronomical-unit", _ ("Astronomical Units"), "149597870700x", "x/149597870700", g_dpgettext2 (NULL, "unit-symbols", "au"));
	_tmp48_ = _tmp47_;
	unit_category_add_unit (_tmp46_, _tmp48_);
	_g_object_unref0 (_tmp48_);
	_tmp49_ = length_category;
	_tmp50_ = unit_new ("rack-unit", _ ("Rack Units"), "x/22.49718785151856", "22.49718785151856x", g_dpgettext2 (NULL, "unit-symbols", "U"));
	_tmp51_ = _tmp50_;
	unit_category_add_unit (_tmp49_, _tmp51_);
	_g_object_unref0 (_tmp51_);
	_tmp52_ = length_category;
	_tmp53_ = unit_new ("nautical-mile", _ ("Nautical Miles"), "1852x", "x/1852", g_dpgettext2 (NULL, "unit-symbols", "nmi"));
	_tmp54_ = _tmp53_;
	unit_category_add_unit (_tmp52_, _tmp54_);
	_g_object_unref0 (_tmp54_);
	_tmp55_ = length_category;
	_tmp56_ = unit_new ("mile", _ ("Miles"), "1609.344x", "x/1609.344", g_dpgettext2 (NULL, "unit-symbols", "mile,miles,mi"));
	_tmp57_ = _tmp56_;
	unit_category_add_unit (_tmp55_, _tmp57_);
	_g_object_unref0 (_tmp57_);
	_tmp58_ = length_category;
	_tmp59_ = unit_new ("kilometer", _ ("Kilometers"), "1000x", "x/1000", g_dpgettext2 (NULL, "unit-symbols", "kilometer,kilometers,km,kms"));
	_tmp60_ = _tmp59_;
	unit_category_add_unit (_tmp58_, _tmp60_);
	_g_object_unref0 (_tmp60_);
	_tmp61_ = length_category;
	_tmp62_ = unit_new ("cable", _ ("Cables"), "219.456x", "x/219.456", g_dpgettext2 (NULL, "unit-symbols", "cable,cables,cb"));
	_tmp63_ = _tmp62_;
	unit_category_add_unit (_tmp61_, _tmp63_);
	_g_object_unref0 (_tmp63_);
	_tmp64_ = length_category;
	_tmp65_ = unit_new ("fathom", _ ("Fathoms"), "1.8288x", "x/1.8288", g_dpgettext2 (NULL, "unit-symbols", "fathom,fathoms,ftm"));
	_tmp66_ = _tmp65_;
	unit_category_add_unit (_tmp64_, _tmp66_);
	_g_object_unref0 (_tmp66_);
	_tmp67_ = length_category;
	_tmp68_ = unit_new ("meter", _ ("Meters"), "x", "x", g_dpgettext2 (NULL, "unit-symbols", "meter,meters,m"));
	_tmp69_ = _tmp68_;
	unit_category_add_unit (_tmp67_, _tmp69_);
	_g_object_unref0 (_tmp69_);
	_tmp70_ = length_category;
	_tmp71_ = unit_new ("yard", _ ("Yards"), "0.9144x", "x/0.9144", g_dpgettext2 (NULL, "unit-symbols", "yard,yards,yd"));
	_tmp72_ = _tmp71_;
	unit_category_add_unit (_tmp70_, _tmp72_);
	_g_object_unref0 (_tmp72_);
	_tmp73_ = length_category;
	_tmp74_ = unit_new ("foot", _ ("Feet"), "0.3048x", "x/0.3048", g_dpgettext2 (NULL, "unit-symbols", "foot,feet,ft"));
	_tmp75_ = _tmp74_;
	unit_category_add_unit (_tmp73_, _tmp75_);
	_g_object_unref0 (_tmp75_);
	_tmp76_ = length_category;
	_tmp77_ = unit_new ("inch", _ ("Inches"), "0.0254x", "x/0.0254", g_dpgettext2 (NULL, "unit-symbols", "inch,inches,in"));
	_tmp78_ = _tmp77_;
	unit_category_add_unit (_tmp76_, _tmp78_);
	_g_object_unref0 (_tmp78_);
	_tmp79_ = length_category;
	_tmp80_ = unit_new ("centimeter", _ ("Centimeters"), "x/100", "100x", g_dpgettext2 (NULL, "unit-symbols", "centimeter,centimeters,cm,cms"));
	_tmp81_ = _tmp80_;
	unit_category_add_unit (_tmp79_, _tmp81_);
	_g_object_unref0 (_tmp81_);
	_tmp82_ = length_category;
	_tmp83_ = unit_new ("millimeter", _ ("Millimeters"), "x/1000", "1000x", g_dpgettext2 (NULL, "unit-symbols", "millimeter,millimeters,mm"));
	_tmp84_ = _tmp83_;
	unit_category_add_unit (_tmp82_, _tmp84_);
	_g_object_unref0 (_tmp84_);
	_tmp85_ = length_category;
	_tmp86_ = unit_new ("micrometer", _ ("Micrometers"), "x/1000000", "1000000x", g_dpgettext2 (NULL, "unit-symbols", "micrometer,micrometers,um"));
	_tmp87_ = _tmp86_;
	unit_category_add_unit (_tmp85_, _tmp87_);
	_g_object_unref0 (_tmp87_);
	_tmp88_ = length_category;
	_tmp89_ = unit_new ("nanometer", _ ("Nanometers"), "x/1000000000", "1000000000x", g_dpgettext2 (NULL, "unit-symbols", "nanometer,nanometers,nm"));
	_tmp90_ = _tmp89_;
	unit_category_add_unit (_tmp88_, _tmp90_);
	_g_object_unref0 (_tmp90_);
	_tmp91_ = length_category;
	_tmp92_ = unit_new ("point", _ ("Desktop Publishing Points"), "0.000352777778x", "x/0.000352777778", g_dpgettext2 (NULL, "unit-symbols", "point,pt,points,pts"));
	_tmp93_ = _tmp92_;
	unit_category_add_unit (_tmp91_, _tmp93_);
	_g_object_unref0 (_tmp93_);
	_tmp94_ = speed_category;
	_tmp95_ = unit_new ("kilometers-hour", _ ("Kilometers per Hour"), "x/3.6", "3.6x", g_dpgettext2 (NULL, "unit-symbols", "kilometers per hour,kmph,kmh,kph"));
	_tmp96_ = _tmp95_;
	unit_category_add_unit (_tmp94_, _tmp96_);
	_g_object_unref0 (_tmp96_);
	_tmp97_ = speed_category;
	_tmp98_ = unit_new ("miles-hour", _ ("Miles per Hour"), "x/2.23693629", "2.23693629x", g_dpgettext2 (NULL, "unit-symbols", "milesph,miles per hour,mi/h,miph,mph"));
	_tmp99_ = _tmp98_;
	unit_category_add_unit (_tmp97_, _tmp99_);
	_g_object_unref0 (_tmp99_);
	_tmp100_ = speed_category;
	_tmp101_ = unit_new ("meters-second", _ ("Meters per Second"), "x", "x", g_dpgettext2 (NULL, "unit-symbols", "meters per second,mps"));
	_tmp102_ = _tmp101_;
	unit_category_add_unit (_tmp100_, _tmp102_);
	_g_object_unref0 (_tmp102_);
	_tmp103_ = speed_category;
	_tmp104_ = unit_new ("feet-second", _ ("Feet per Second"), "x/3.28084", "3.28084x", g_dpgettext2 (NULL, "unit-symbols", "fps,feet per second,feetps"));
	_tmp105_ = _tmp104_;
	unit_category_add_unit (_tmp103_, _tmp105_);
	_g_object_unref0 (_tmp105_);
	_tmp106_ = speed_category;
	_tmp107_ = unit_new ("knot", _ ("Knots"), "x/1.94384449", "1.94384449x", g_dpgettext2 (NULL, "unit-symbols", "kt,kn,nd,knot,knots"));
	_tmp108_ = _tmp107_;
	unit_category_add_unit (_tmp106_, _tmp108_);
	_g_object_unref0 (_tmp108_);
	_tmp109_ = area_category;
	_tmp110_ = unit_new ("hectare", _ ("Hectares"), "10000x", "x/10000", g_dpgettext2 (NULL, "unit-symbols", "hectare,hectares,ha"));
	_tmp111_ = _tmp110_;
	unit_category_add_unit (_tmp109_, _tmp111_);
	_g_object_unref0 (_tmp111_);
	_tmp112_ = area_category;
	_tmp113_ = unit_new ("acre", _ ("Acres"), "4046.8564224x", "x/4046.8564224", g_dpgettext2 (NULL, "unit-symbols", "acre,acres"));
	_tmp114_ = _tmp113_;
	unit_category_add_unit (_tmp112_, _tmp114_);
	_g_object_unref0 (_tmp114_);
	_tmp115_ = area_category;
	_tmp116_ = unit_new ("square-mile", _ ("Square Miles"), "2589988.110336x", "x/2589988.110336", g_dpgettext2 (NULL, "unit-symbols", "mi²"));
	_tmp117_ = _tmp116_;
	unit_category_add_unit (_tmp115_, _tmp117_);
	_g_object_unref0 (_tmp117_);
	_tmp118_ = area_category;
	_tmp119_ = unit_new ("square-foot", _ ("Square Feet"), "x/10.763910417", "10.763910417x", g_dpgettext2 (NULL, "unit-symbols", "ft²"));
	_tmp120_ = _tmp119_;
	unit_category_add_unit (_tmp118_, _tmp120_);
	_g_object_unref0 (_tmp120_);
	_tmp121_ = area_category;
	_tmp122_ = unit_new ("square-kilometer", _ ("Square Kilometers"), "1000000x", "0.000001x", g_dpgettext2 (NULL, "unit-symbols", "km²"));
	_tmp123_ = _tmp122_;
	unit_category_add_unit (_tmp121_, _tmp123_);
	_g_object_unref0 (_tmp123_);
	_tmp124_ = area_category;
	_tmp125_ = unit_new ("square-meter", _ ("Square Meters"), "x", "x", g_dpgettext2 (NULL, "unit-symbols", "m²"));
	_tmp126_ = _tmp125_;
	unit_category_add_unit (_tmp124_, _tmp126_);
	_g_object_unref0 (_tmp126_);
	_tmp127_ = area_category;
	_tmp128_ = unit_new ("square-centimeter", _ ("Square Centimeters"), "0.0001x", "10000x", g_dpgettext2 (NULL, "unit-symbols", "cm²"));
	_tmp129_ = _tmp128_;
	unit_category_add_unit (_tmp127_, _tmp129_);
	_g_object_unref0 (_tmp129_);
	_tmp130_ = area_category;
	_tmp131_ = unit_new ("square-millimeter", _ ("Square Millimeters"), "0.000001x", "1000000x", g_dpgettext2 (NULL, "unit-symbols", "mm²"));
	_tmp132_ = _tmp131_;
	unit_category_add_unit (_tmp130_, _tmp132_);
	_g_object_unref0 (_tmp132_);
	_tmp133_ = volume_category;
	_tmp134_ = unit_new ("cubic-meter", _ ("Cubic Meters"), "1000x", "x/1000", g_dpgettext2 (NULL, "unit-symbols", "m³"));
	_tmp135_ = _tmp134_;
	unit_category_add_unit (_tmp133_, _tmp135_);
	_g_object_unref0 (_tmp135_);
	_tmp136_ = volume_category;
	_tmp137_ = unit_new ("imperial-gallon", _ ("British Gallons"), "4.54609x", "x/4.54609", g_dpgettext2 (NULL, "unit-symbols", "imp_gallon,imp_gallons,imp_gal"));
	_tmp138_ = _tmp137_;
	unit_category_add_unit (_tmp136_, _tmp138_);
	_g_object_unref0 (_tmp138_);
	_tmp139_ = volume_category;
	_tmp140_ = unit_new ("gallon", _ ("US Gallons"), "3.785412x", "x/3.785412", g_dpgettext2 (NULL, "unit-symbols", "gallon,gallons,gal"));
	_tmp141_ = _tmp140_;
	unit_category_add_unit (_tmp139_, _tmp141_);
	_g_object_unref0 (_tmp141_);
	_tmp142_ = volume_category;
	_tmp143_ = unit_new ("litre", _ ("Liters"), "x", "x", g_dpgettext2 (NULL, "unit-symbols", "litre,litres,liter,liters,L"));
	_tmp144_ = _tmp143_;
	unit_category_add_unit (_tmp142_, _tmp144_);
	_g_object_unref0 (_tmp144_);
	_tmp145_ = volume_category;
	_tmp146_ = unit_new ("quart", _ ("US Quarts"), "0.9463529x", "x/0.9463529", g_dpgettext2 (NULL, "unit-symbols", "quart,quarts,qt"));
	_tmp147_ = _tmp146_;
	unit_category_add_unit (_tmp145_, _tmp147_);
	_g_object_unref0 (_tmp147_);
	_tmp148_ = volume_category;
	_tmp149_ = unit_new ("imperial-pint", _ ("British Pints"), "0.56826125x", "x/0.56826125", g_dpgettext2 (NULL, "unit-symbols", "imp_pint,imp_pints,imp_pt"));
	_tmp150_ = _tmp149_;
	unit_category_add_unit (_tmp148_, _tmp150_);
	_g_object_unref0 (_tmp150_);
	_tmp151_ = volume_category;
	_tmp152_ = unit_new ("pint", _ ("US Pints"), "0.4731765x", "x/0.4731765", g_dpgettext2 (NULL, "unit-symbols", "pint,pints,pt"));
	_tmp153_ = _tmp152_;
	unit_category_add_unit (_tmp151_, _tmp153_);
	_g_object_unref0 (_tmp153_);
	_tmp154_ = volume_category;
	_tmp155_ = unit_new ("cup", _ ("Metric Cups"), "0.25x", "4x", g_dpgettext2 (NULL, "unit-symbols", "cup,cups,cp"));
	_tmp156_ = _tmp155_;
	unit_category_add_unit (_tmp154_, _tmp156_);
	_g_object_unref0 (_tmp156_);
	_tmp157_ = volume_category;
	_tmp158_ = unit_new ("millilitre", _ ("Milliliters"), "0.001x", "1000x", g_dpgettext2 (NULL, "unit-symbols", "millilitre,millilitres,milliliter,milliliters,mL,cm³"));
	_tmp159_ = _tmp158_;
	unit_category_add_unit (_tmp157_, _tmp159_);
	_g_object_unref0 (_tmp159_);
	_tmp160_ = volume_category;
	_tmp161_ = unit_new ("microlitre", _ ("Microliters"), "0.000001x", "1000000x", g_dpgettext2 (NULL, "unit-symbols", "mm³,μL,uL"));
	_tmp162_ = _tmp161_;
	unit_category_add_unit (_tmp160_, _tmp162_);
	_g_object_unref0 (_tmp162_);
	_tmp163_ = weight_category;
	_tmp164_ = unit_new ("tonne", _ ("Tonnes"), "1000x", "x/1000", g_dpgettext2 (NULL, "unit-symbols", "tonne,tonnes"));
	_tmp165_ = _tmp164_;
	unit_category_add_unit (_tmp163_, _tmp165_);
	_g_object_unref0 (_tmp165_);
	_tmp166_ = weight_category;
	_tmp167_ = unit_new ("kilograms", _ ("Kilograms"), "x", "x", g_dpgettext2 (NULL, "unit-symbols", "kilogram,kilograms,kilogramme,kilogrammes,kg,kgs"));
	_tmp168_ = _tmp167_;
	unit_category_add_unit (_tmp166_, _tmp168_);
	_g_object_unref0 (_tmp168_);
	_tmp169_ = weight_category;
	_tmp170_ = unit_new ("pound", _ ("Pounds"), "0.45359237x", "x/0.45359237", g_dpgettext2 (NULL, "unit-symbols", "pound,pounds,lb,lbs"));
	_tmp171_ = _tmp170_;
	unit_category_add_unit (_tmp169_, _tmp171_);
	_g_object_unref0 (_tmp171_);
	_tmp172_ = weight_category;
	_tmp173_ = unit_new ("ounce", _ ("Ounces"), "0.02834952x", "x/0.02834952", g_dpgettext2 (NULL, "unit-symbols", "ounce,ounces,oz"));
	_tmp174_ = _tmp173_;
	unit_category_add_unit (_tmp172_, _tmp174_);
	_g_object_unref0 (_tmp174_);
	_tmp175_ = weight_category;
	_tmp176_ = unit_new ("troy-ounce", _ ("Troy Ounces"), "0.0311034768x", "x/0.0311034768", g_dpgettext2 (NULL, "unit-symbols", "Troy ounce,Troy ounces,ozt"));
	_tmp177_ = _tmp176_;
	unit_category_add_unit (_tmp175_, _tmp177_);
	_g_object_unref0 (_tmp177_);
	_tmp178_ = weight_category;
	_tmp179_ = unit_new ("gram", _ ("Grams"), "0.001x", "1000x", g_dpgettext2 (NULL, "unit-symbols", "gram,grams,gramme,grammes,g"));
	_tmp180_ = _tmp179_;
	unit_category_add_unit (_tmp178_, _tmp180_);
	_g_object_unref0 (_tmp180_);
	_tmp181_ = weight_category;
	_tmp182_ = unit_new ("milligram", _ ("Milligrams"), "0.000001x", "1000000x", g_dpgettext2 (NULL, "unit-symbols", "milligram,milligrams,milligramme,milligrammes,mg"));
	_tmp183_ = _tmp182_;
	unit_category_add_unit (_tmp181_, _tmp183_);
	_g_object_unref0 (_tmp183_);
	_tmp184_ = weight_category;
	_tmp185_ = unit_new ("microgram", _ ("Micrograms"), "0.000000001x", "1000000000x", g_dpgettext2 (NULL, "unit-symbols", "microgram,micrograms,microgramme,microgrammes,μg,ug"));
	_tmp186_ = _tmp185_;
	unit_category_add_unit (_tmp184_, _tmp186_);
	_g_object_unref0 (_tmp186_);
	_tmp187_ = weight_category;
	_tmp188_ = unit_new ("stone", _ ("Stone"), "6.350293x", "x/6.350293", g_dpgettext2 (NULL, "unit-symbols", "stone,st,stones"));
	_tmp189_ = _tmp188_;
	unit_category_add_unit (_tmp187_, _tmp189_);
	_g_object_unref0 (_tmp189_);
	_tmp190_ = duration_category;
	_tmp191_ = unit_new ("century", _ ("Centuries"), "3155760000x", "x/3155760000", g_dpgettext2 (NULL, "unit-symbols", "century,centuries"));
	_tmp192_ = _tmp191_;
	unit_category_add_unit (_tmp190_, _tmp192_);
	_g_object_unref0 (_tmp192_);
	_tmp193_ = duration_category;
	_tmp194_ = unit_new ("decade", _ ("Decades"), "315576000x", "x/315576000", g_dpgettext2 (NULL, "unit-symbols", "decade,decades"));
	_tmp195_ = _tmp194_;
	unit_category_add_unit (_tmp193_, _tmp195_);
	_g_object_unref0 (_tmp195_);
	_tmp196_ = duration_category;
	_tmp197_ = unit_new ("year", _ ("Years"), "31557600x", "x/31557600", g_dpgettext2 (NULL, "unit-symbols", "year,years"));
	_tmp198_ = _tmp197_;
	unit_category_add_unit (_tmp196_, _tmp198_);
	_g_object_unref0 (_tmp198_);
	_tmp199_ = duration_category;
	_tmp200_ = unit_new ("month", _ ("Months"), "2629800x", "x/2629800", g_dpgettext2 (NULL, "unit-symbols", "month,months"));
	_tmp201_ = _tmp200_;
	unit_category_add_unit (_tmp199_, _tmp201_);
	_g_object_unref0 (_tmp201_);
	_tmp202_ = duration_category;
	_tmp203_ = unit_new ("week", _ ("Weeks"), "604800x", "x/604800", g_dpgettext2 (NULL, "unit-symbols", "week,weeks"));
	_tmp204_ = _tmp203_;
	unit_category_add_unit (_tmp202_, _tmp204_);
	_g_object_unref0 (_tmp204_);
	_tmp205_ = duration_category;
	_tmp206_ = unit_new ("day", _ ("Days"), "86400x", "x/86400", g_dpgettext2 (NULL, "unit-symbols", "day,days"));
	_tmp207_ = _tmp206_;
	unit_category_add_unit (_tmp205_, _tmp207_);
	_g_object_unref0 (_tmp207_);
	_tmp208_ = duration_category;
	_tmp209_ = unit_new ("hour", _ ("Hours"), "3600x", "x/3600", g_dpgettext2 (NULL, "unit-symbols", "hour,hours"));
	_tmp210_ = _tmp209_;
	unit_category_add_unit (_tmp208_, _tmp210_);
	_g_object_unref0 (_tmp210_);
	_tmp211_ = duration_category;
	_tmp212_ = unit_new ("minute", _ ("Minutes"), "60x", "x/60", g_dpgettext2 (NULL, "unit-symbols", "minute,minutes"));
	_tmp213_ = _tmp212_;
	unit_category_add_unit (_tmp211_, _tmp213_);
	_g_object_unref0 (_tmp213_);
	_tmp214_ = duration_category;
	_tmp215_ = unit_new ("second", _ ("Seconds"), "x", "x", g_dpgettext2 (NULL, "unit-symbols", "second,seconds,s"));
	_tmp216_ = _tmp215_;
	unit_category_add_unit (_tmp214_, _tmp216_);
	_g_object_unref0 (_tmp216_);
	_tmp217_ = duration_category;
	_tmp218_ = unit_new ("millisecond", _ ("Milliseconds"), "0.001x", "1000x", g_dpgettext2 (NULL, "unit-symbols", "millisecond,milliseconds,ms"));
	_tmp219_ = _tmp218_;
	unit_category_add_unit (_tmp217_, _tmp219_);
	_g_object_unref0 (_tmp219_);
	_tmp220_ = duration_category;
	_tmp221_ = unit_new ("microsecond", _ ("Microseconds"), "0.000001x", "1000000x", g_dpgettext2 (NULL, "unit-symbols", "microsecond,microseconds,us,μs"));
	_tmp222_ = _tmp221_;
	unit_category_add_unit (_tmp220_, _tmp222_);
	_g_object_unref0 (_tmp222_);
	_tmp223_ = duration_category;
	_tmp224_ = unit_new ("nanosecond", _ ("Nanoseconds"), "0.000000001x", "1000000000x", g_dpgettext2 (NULL, "unit-symbols", "nanosecond,nanoseconds,ns"));
	_tmp225_ = _tmp224_;
	unit_category_add_unit (_tmp223_, _tmp225_);
	_g_object_unref0 (_tmp225_);
	_tmp226_ = temperature_category;
	_tmp227_ = unit_new ("degree-celsius", _ ("Celsius"), "x+273.15", "x-273.15", g_dpgettext2 (NULL, "unit-symbols", "degC,°C,˚C,C,c,Celsius,celsius"));
	_tmp228_ = _tmp227_;
	unit_category_add_unit (_tmp226_, _tmp228_);
	_g_object_unref0 (_tmp228_);
	_tmp229_ = temperature_category;
	_tmp230_ = unit_new ("degree-fahrenheit", _ ("Fahrenheit"), "(x+459.67)*5/9", "x*9/5-459.67", g_dpgettext2 (NULL, "unit-symbols", "degF,°F,˚F,F,f,Fahrenheit,fahrenheit"));
	_tmp231_ = _tmp230_;
	unit_category_add_unit (_tmp229_, _tmp231_);
	_g_object_unref0 (_tmp231_);
	_tmp232_ = temperature_category;
	_tmp233_ = unit_new ("degree-kelvin", _ ("Kelvin"), "x", "x", g_dpgettext2 (NULL, "unit-symbols", "k,K,Kelvin,kelvin"));
	_tmp234_ = _tmp233_;
	unit_category_add_unit (_tmp232_, _tmp234_);
	_g_object_unref0 (_tmp234_);
	_tmp235_ = temperature_category;
	_tmp236_ = unit_new ("degree-rankine", _ ("Rankine"), "x*5/9", "x*9/5", g_dpgettext2 (NULL, "unit-symbols", "degR,°R,˚R,°Ra,˚Ra,r,R,Rankine,rankine"));
	_tmp237_ = _tmp236_;
	unit_category_add_unit (_tmp235_, _tmp237_);
	_g_object_unref0 (_tmp237_);
	_tmp238_ = digitalstorage_category;
	_tmp239_ = unit_new ("bit", _ ("Bits"), "x/8", "8x", g_dpgettext2 (NULL, "unit-symbols", "bit,bits,b"));
	_tmp240_ = _tmp239_;
	unit_category_add_unit (_tmp238_, _tmp240_);
	_g_object_unref0 (_tmp240_);
	_tmp241_ = digitalstorage_category;
	_tmp242_ = unit_new ("byte", _ ("Bytes"), "x", "x", g_dpgettext2 (NULL, "unit-symbols", "byte,bytes,B"));
	_tmp243_ = _tmp242_;
	unit_category_add_unit (_tmp241_, _tmp243_);
	_g_object_unref0 (_tmp243_);
	_tmp244_ = digitalstorage_category;
	_tmp245_ = unit_new ("nibble", _ ("Nibbles"), "x/2", "2x", g_dpgettext2 (NULL, "unit-symbols", "nibble,nibbles"));
	_tmp246_ = _tmp245_;
	unit_category_add_unit (_tmp244_, _tmp246_);
	_g_object_unref0 (_tmp246_);
	_tmp247_ = digitalstorage_category;
	_tmp248_ = unit_new ("kilobit", _ ("Kilobits"), "1000x/8", "8x/1000", g_dpgettext2 (NULL, "unit-symbols", "kilobit,kilobits,kb,Kb"));
	_tmp249_ = _tmp248_;
	unit_category_add_unit (_tmp247_, _tmp249_);
	_g_object_unref0 (_tmp249_);
	_tmp250_ = digitalstorage_category;
	_tmp251_ = unit_new ("kilobyte", _ ("Kilobytes"), "1000x", "x/1000", g_dpgettext2 (NULL, "unit-symbols", "kilobyte,kilobytes,kB,KB"));
	_tmp252_ = _tmp251_;
	unit_category_add_unit (_tmp250_, _tmp252_);
	_g_object_unref0 (_tmp252_);
	_tmp253_ = digitalstorage_category;
	_tmp254_ = unit_new ("kibibit", _ ("Kibibits"), "1024x/8", "8x/1024", g_dpgettext2 (NULL, "unit-symbols", "kibibit,kibibits,Kib"));
	_tmp255_ = _tmp254_;
	unit_category_add_unit (_tmp253_, _tmp255_);
	_g_object_unref0 (_tmp255_);
	_tmp256_ = digitalstorage_category;
	_tmp257_ = unit_new ("kibibyte", _ ("Kibibytes"), "1024x", "x/1024", g_dpgettext2 (NULL, "unit-symbols", "kibibyte,kibibytes,KiB"));
	_tmp258_ = _tmp257_;
	unit_category_add_unit (_tmp256_, _tmp258_);
	_g_object_unref0 (_tmp258_);
	_tmp259_ = digitalstorage_category;
	_tmp260_ = unit_new ("megabit", _ ("Megabits"), "1000000x/8", "8x/1000000", g_dpgettext2 (NULL, "unit-symbols", "megabit,megabits,Mb"));
	_tmp261_ = _tmp260_;
	unit_category_add_unit (_tmp259_, _tmp261_);
	_g_object_unref0 (_tmp261_);
	_tmp262_ = digitalstorage_category;
	_tmp263_ = unit_new ("megabyte", _ ("Megabytes"), "1000000x", "x/1000000", g_dpgettext2 (NULL, "unit-symbols", "megabyte,megabytes,MB"));
	_tmp264_ = _tmp263_;
	unit_category_add_unit (_tmp262_, _tmp264_);
	_g_object_unref0 (_tmp264_);
	_tmp265_ = digitalstorage_category;
	_tmp266_ = unit_new ("mebibit", _ ("Mebibits"), "1048576x/8", "8x/1048576", g_dpgettext2 (NULL, "unit-symbols", "mebibit,mebibits,Mib"));
	_tmp267_ = _tmp266_;
	unit_category_add_unit (_tmp265_, _tmp267_);
	_g_object_unref0 (_tmp267_);
	_tmp268_ = digitalstorage_category;
	_tmp269_ = unit_new ("mebibyte", _ ("Mebibytes"), "1048576x", "x/1048576", g_dpgettext2 (NULL, "unit-symbols", "mebibyte,mebibytes,MiB"));
	_tmp270_ = _tmp269_;
	unit_category_add_unit (_tmp268_, _tmp270_);
	_g_object_unref0 (_tmp270_);
	_tmp271_ = digitalstorage_category;
	_tmp272_ = unit_new ("gigabit", _ ("Gigabits"), "1000000000x/8", "8x/1000000000", g_dpgettext2 (NULL, "unit-symbols", "gigabit,gigabits,Gb"));
	_tmp273_ = _tmp272_;
	unit_category_add_unit (_tmp271_, _tmp273_);
	_g_object_unref0 (_tmp273_);
	_tmp274_ = digitalstorage_category;
	_tmp275_ = unit_new ("gigabyte", _ ("Gigabytes"), "1000000000x", "x/1000000000", g_dpgettext2 (NULL, "unit-symbols", "gigabyte,gigabytes,GB"));
	_tmp276_ = _tmp275_;
	unit_category_add_unit (_tmp274_, _tmp276_);
	_g_object_unref0 (_tmp276_);
	_tmp277_ = digitalstorage_category;
	_tmp278_ = unit_new ("gibibit", _ ("Gibibits"), "1073741824x/8", "8x/1073741824", g_dpgettext2 (NULL, "unit-symbols", "gibibit,gibibits,Gib"));
	_tmp279_ = _tmp278_;
	unit_category_add_unit (_tmp277_, _tmp279_);
	_g_object_unref0 (_tmp279_);
	_tmp280_ = digitalstorage_category;
	_tmp281_ = unit_new ("gibibyte", _ ("Gibibytes"), "1073741824x", "x/1073741824", g_dpgettext2 (NULL, "unit-symbols", "gibibyte,gibibytes,GiB"));
	_tmp282_ = _tmp281_;
	unit_category_add_unit (_tmp280_, _tmp282_);
	_g_object_unref0 (_tmp282_);
	_tmp283_ = digitalstorage_category;
	_tmp284_ = unit_new ("terabit", _ ("Terabits"), "1000000000000x/8", "8x/1000000000000", g_dpgettext2 (NULL, "unit-symbols", "terabit,terabits,Tb"));
	_tmp285_ = _tmp284_;
	unit_category_add_unit (_tmp283_, _tmp285_);
	_g_object_unref0 (_tmp285_);
	_tmp286_ = digitalstorage_category;
	_tmp287_ = unit_new ("terabyte", _ ("Terabytes"), "1000000000000x", "x/1000000000000", g_dpgettext2 (NULL, "unit-symbols", "terabyte,terabytes,TB"));
	_tmp288_ = _tmp287_;
	unit_category_add_unit (_tmp286_, _tmp288_);
	_g_object_unref0 (_tmp288_);
	_tmp289_ = digitalstorage_category;
	_tmp290_ = unit_new ("tebibit", _ ("Tebibits"), "1099511627776x/8", "8x/1099511627776", g_dpgettext2 (NULL, "unit-symbols", "tebibit,tebibits,Tib"));
	_tmp291_ = _tmp290_;
	unit_category_add_unit (_tmp289_, _tmp291_);
	_g_object_unref0 (_tmp291_);
	_tmp292_ = digitalstorage_category;
	_tmp293_ = unit_new ("tebibyte", _ ("Tebibytes"), "1099511627776x", "x/1099511627776", g_dpgettext2 (NULL, "unit-symbols", "tebibyte,tebibytes,TiB"));
	_tmp294_ = _tmp293_;
	unit_category_add_unit (_tmp292_, _tmp294_);
	_g_object_unref0 (_tmp294_);
	_tmp295_ = digitalstorage_category;
	_tmp296_ = unit_new ("petabit", _ ("Petabits"), "1000000000000000x/8", "8x/1000000000000000", g_dpgettext2 (NULL, "unit-symbols", "petabit,petabits,Pb"));
	_tmp297_ = _tmp296_;
	unit_category_add_unit (_tmp295_, _tmp297_);
	_g_object_unref0 (_tmp297_);
	_tmp298_ = digitalstorage_category;
	_tmp299_ = unit_new ("petabyte", _ ("Petabytes"), "1000000000000000x", "x/1000000000000000", g_dpgettext2 (NULL, "unit-symbols", "petabyte,petabytes,PB"));
	_tmp300_ = _tmp299_;
	unit_category_add_unit (_tmp298_, _tmp300_);
	_g_object_unref0 (_tmp300_);
	_tmp301_ = digitalstorage_category;
	_tmp302_ = unit_new ("pebibit", _ ("Pebibits"), "1125899906842624x/8", "8x/1125899906842624", g_dpgettext2 (NULL, "unit-symbols", "pebibit,pebibits,Pib"));
	_tmp303_ = _tmp302_;
	unit_category_add_unit (_tmp301_, _tmp303_);
	_g_object_unref0 (_tmp303_);
	_tmp304_ = digitalstorage_category;
	_tmp305_ = unit_new ("pebibyte", _ ("Pebibytes"), "1125899906842624x", "x/1125899906842624", g_dpgettext2 (NULL, "unit-symbols", "pebibyte,pebibytes,PiB"));
	_tmp306_ = _tmp305_;
	unit_category_add_unit (_tmp304_, _tmp306_);
	_g_object_unref0 (_tmp306_);
	_tmp307_ = digitalstorage_category;
	_tmp308_ = unit_new ("exabit", _ ("Exabits"), "1000000000000000000x/8", "8x/1000000000000000000", g_dpgettext2 (NULL, "unit-symbols", "exabit,exabits,Eb"));
	_tmp309_ = _tmp308_;
	unit_category_add_unit (_tmp307_, _tmp309_);
	_g_object_unref0 (_tmp309_);
	_tmp310_ = digitalstorage_category;
	_tmp311_ = unit_new ("exabyte", _ ("Exabytes"), "1000000000000000000x", "x/1000000000000000000", g_dpgettext2 (NULL, "unit-symbols", "exabyte,exabytes,EB"));
	_tmp312_ = _tmp311_;
	unit_category_add_unit (_tmp310_, _tmp312_);
	_g_object_unref0 (_tmp312_);
	_tmp313_ = digitalstorage_category;
	_tmp314_ = unit_new ("exbibit", _ ("Exbibits"), "1152921504606846976x/8", "8x/1152921504606846976", g_dpgettext2 (NULL, "unit-symbols", "exbibit,exbibits,Eib"));
	_tmp315_ = _tmp314_;
	unit_category_add_unit (_tmp313_, _tmp315_);
	_g_object_unref0 (_tmp315_);
	_tmp316_ = digitalstorage_category;
	_tmp317_ = unit_new ("exbibyte", _ ("Exbibytes"), "1152921504606846976x", "x/1152921504606846976", g_dpgettext2 (NULL, "unit-symbols", "exbibyte,exbibytes,EiB"));
	_tmp318_ = _tmp317_;
	unit_category_add_unit (_tmp316_, _tmp318_);
	_g_object_unref0 (_tmp318_);
	_tmp319_ = digitalstorage_category;
	_tmp320_ = unit_new ("zettabit", _ ("Zettabits"), "1000000000000000000000x/8", "8x/1000000000000000000000", g_dpgettext2 (NULL, "unit-symbols", "zettabit,zettabits,Zb"));
	_tmp321_ = _tmp320_;
	unit_category_add_unit (_tmp319_, _tmp321_);
	_g_object_unref0 (_tmp321_);
	_tmp322_ = digitalstorage_category;
	_tmp323_ = unit_new ("zettabyte", _ ("Zettabytes"), "1000000000000000000000x", "x/1000000000000000000000", g_dpgettext2 (NULL, "unit-symbols", "zettabyte,zettabytes,ZB"));
	_tmp324_ = _tmp323_;
	unit_category_add_unit (_tmp322_, _tmp324_);
	_g_object_unref0 (_tmp324_);
	_tmp325_ = digitalstorage_category;
	_tmp326_ = unit_new ("zebibit", _ ("Zebibits"), "1180591620717411303424x/8", "8x/1180591620717411303424", g_dpgettext2 (NULL, "unit-symbols", "zebibit,zebibits,Zib"));
	_tmp327_ = _tmp326_;
	unit_category_add_unit (_tmp325_, _tmp327_);
	_g_object_unref0 (_tmp327_);
	_tmp328_ = digitalstorage_category;
	_tmp329_ = unit_new ("zebibyte", _ ("Zebibytes"), "1180591620717411303424x", "x/1180591620717411303424", g_dpgettext2 (NULL, "unit-symbols", "zebibyte,zebibytes,ZiB"));
	_tmp330_ = _tmp329_;
	unit_category_add_unit (_tmp328_, _tmp330_);
	_g_object_unref0 (_tmp330_);
	_tmp331_ = digitalstorage_category;
	_tmp332_ = unit_new ("yottabit", _ ("Yottabits"), "1000000000000000000000000x/8", "8x/1000000000000000000000000", g_dpgettext2 (NULL, "unit-symbols", "yottabit,yottabits,Yb"));
	_tmp333_ = _tmp332_;
	unit_category_add_unit (_tmp331_, _tmp333_);
	_g_object_unref0 (_tmp333_);
	_tmp334_ = digitalstorage_category;
	_tmp335_ = unit_new ("yottabyte", _ ("Yottabytes"), "1000000000000000000000000x", "x/1000000000000000000000000", g_dpgettext2 (NULL, "unit-symbols", "yottabyte,yottabytes,YB"));
	_tmp336_ = _tmp335_;
	unit_category_add_unit (_tmp334_, _tmp336_);
	_g_object_unref0 (_tmp336_);
	_tmp337_ = digitalstorage_category;
	_tmp338_ = unit_new ("yobibit", _ ("Yobibits"), "1208925819614629174706176x/8", "8x/1208925819614629174706176", g_dpgettext2 (NULL, "unit-symbols", "yobibit,yobibits,Yib"));
	_tmp339_ = _tmp338_;
	unit_category_add_unit (_tmp337_, _tmp339_);
	_g_object_unref0 (_tmp339_);
	_tmp340_ = digitalstorage_category;
	_tmp341_ = unit_new ("yobibyte", _ ("Yobibytes"), "1208925819614629174706176x", "x/1208925819614629174706176", g_dpgettext2 (NULL, "unit-symbols", "yobibyte,yobibytes,YiB"));
	_tmp342_ = _tmp341_;
	unit_category_add_unit (_tmp340_, _tmp342_);
	_g_object_unref0 (_tmp342_);
	_tmp343_ = frequency_category;
	_tmp344_ = unit_new ("hertz", _ ("Hertz"), "x", "x", g_dpgettext2 (NULL, "unit-symbols", "hertz,Hz"));
	_tmp345_ = _tmp344_;
	unit_category_add_unit (_tmp343_, _tmp345_);
	_g_object_unref0 (_tmp345_);
	_tmp346_ = frequency_category;
	_tmp347_ = unit_new ("kilohertz", _ ("Kilohertz"), "1000x", "x/1000", g_dpgettext2 (NULL, "unit-symbols", "kilohertz,kHz"));
	_tmp348_ = _tmp347_;
	unit_category_add_unit (_tmp346_, _tmp348_);
	_g_object_unref0 (_tmp348_);
	_tmp349_ = frequency_category;
	_tmp350_ = unit_new ("megahertz", _ ("Megahertz"), "1000000x", "x/1000000", g_dpgettext2 (NULL, "unit-symbols", "megahertz,MHz"));
	_tmp351_ = _tmp350_;
	unit_category_add_unit (_tmp349_, _tmp351_);
	_g_object_unref0 (_tmp351_);
	_tmp352_ = frequency_category;
	_tmp353_ = unit_new ("gigahertz", _ ("Gigahertz"), "1000000000x", "x/1000000000", g_dpgettext2 (NULL, "unit-symbols", "gigahertz,GHz"));
	_tmp354_ = _tmp353_;
	unit_category_add_unit (_tmp352_, _tmp354_);
	_g_object_unref0 (_tmp354_);
	_tmp355_ = frequency_category;
	_tmp356_ = unit_new ("terahertz", _ ("Terahertz"), "1000000000000x", "x/1000000000000", g_dpgettext2 (NULL, "unit-symbols", "terahertz,THz"));
	_tmp357_ = _tmp356_;
	unit_category_add_unit (_tmp355_, _tmp357_);
	_g_object_unref0 (_tmp357_);
	_tmp358_ = energy_category;
	_tmp359_ = unit_new ("joule", _ ("Joules"), "x", "x", g_dpgettext2 (NULL, "unit-symbols", "Joule,J,joule,joules"));
	_tmp360_ = _tmp359_;
	unit_category_add_unit (_tmp358_, _tmp360_);
	_g_object_unref0 (_tmp360_);
	_tmp361_ = energy_category;
	_tmp362_ = unit_new ("kilojoule", _ ("Kilojoules"), "1000x", "x/1000", g_dpgettext2 (NULL, "unit-symbols", "KJ,kilojoules,kilojoule"));
	_tmp363_ = _tmp362_;
	unit_category_add_unit (_tmp361_, _tmp363_);
	_g_object_unref0 (_tmp363_);
	_tmp364_ = energy_category;
	_tmp365_ = unit_new ("megajoule", _ ("Megajoules"), "1000000x", "x/1000000", g_dpgettext2 (NULL, "unit-symbols", "MJ,megajoules,megajoule"));
	_tmp366_ = _tmp365_;
	unit_category_add_unit (_tmp364_, _tmp366_);
	_g_object_unref0 (_tmp366_);
	_tmp367_ = energy_category;
	_tmp368_ = unit_new ("kilowatthour", _ ("Kilowatt-Hours"), "3600000x", "x/3600000", g_dpgettext2 (NULL, "unit-symbols", "kwh,kWh,kilowatt-hour,kilowatthour"));
	_tmp369_ = _tmp368_;
	unit_category_add_unit (_tmp367_, _tmp369_);
	_g_object_unref0 (_tmp369_);
	_tmp370_ = energy_category;
	_tmp371_ = unit_new ("btu", _ ("British Thermal Units"), "x*1054.350264489", "x/1054.350264489", g_dpgettext2 (NULL, "unit-symbols", "btu,BTU"));
	_tmp372_ = _tmp371_;
	unit_category_add_unit (_tmp370_, _tmp372_);
	_g_object_unref0 (_tmp372_);
	_tmp373_ = energy_category;
	_tmp374_ = unit_new ("calorie", _ ("Calories"), "x*4.184", "x/4.184", g_dpgettext2 (NULL, "unit-symbols", "calories,calorie,cal"));
	_tmp375_ = _tmp374_;
	unit_category_add_unit (_tmp373_, _tmp375_);
	_g_object_unref0 (_tmp375_);
	_tmp376_ = energy_category;
	_tmp377_ = unit_new ("kilocalorie", _ ("Kilocalories"), "x*4184", "x/4184", g_dpgettext2 (NULL, "unit-symbols", "kilocalories,kilocalorie,kcal"));
	_tmp378_ = _tmp377_;
	unit_category_add_unit (_tmp376_, _tmp378_);
	_g_object_unref0 (_tmp378_);
	_tmp379_ = energy_category;
	_tmp380_ = unit_new ("erg", _ ("Ergs"), "x/10000000", "x*10000000", g_dpgettext2 (NULL, "unit-symbols", "ergs,erg"));
	_tmp381_ = _tmp380_;
	unit_category_add_unit (_tmp379_, _tmp381_);
	_g_object_unref0 (_tmp381_);
	_tmp382_ = energy_category;
	_tmp383_ = unit_new ("ev", _ ("Electron Volts"), "x*1.602176634/10000000000000000000", "x/1.602176634*10000000000000000000", g_dpgettext2 (NULL, "unit-symbols", "electronvolt,electronvolts,ev"));
	_tmp384_ = _tmp383_;
	unit_category_add_unit (_tmp382_, _tmp384_);
	_g_object_unref0 (_tmp384_);
	_tmp385_ = energy_category;
	_tmp386_ = unit_new ("ftlb", _ ("Foot-Pounds"), "x*1.3558179483314004", "x/1.3558179483314004", g_dpgettext2 (NULL, "unit-symbols", "foot-pound,foot-pounds,ft-lb,ft-lbs"));
	_tmp387_ = _tmp386_;
	unit_category_add_unit (_tmp385_, _tmp387_);
	_g_object_unref0 (_tmp387_);
	_tmp388_ = pressure_category;
	_tmp389_ = unit_new ("pascal", _ ("Pascals"), "x", "x", g_dpgettext2 (NULL, "unit-symbols", "Pascal,pascal,Pa"));
	_tmp390_ = _tmp389_;
	unit_category_add_unit (_tmp388_, _tmp390_);
	_g_object_unref0 (_tmp390_);
	_tmp391_ = pressure_category;
	_tmp392_ = unit_new ("kilopascal", _ ("Kilopascals"), "1000x", "x/1000", g_dpgettext2 (NULL, "unit-symbols", "Kilopascal,kilopascal,kPa"));
	_tmp393_ = _tmp392_;
	unit_category_add_unit (_tmp391_, _tmp393_);
	_g_object_unref0 (_tmp393_);
	_tmp394_ = pressure_category;
	_tmp395_ = unit_new ("hectopascal", _ ("Hectopascals"), "100x", "x/100", g_dpgettext2 (NULL, "unit-symbols", "Hectopascal,hectopascal,hPa"));
	_tmp396_ = _tmp395_;
	unit_category_add_unit (_tmp394_, _tmp396_);
	_g_object_unref0 (_tmp396_);
	_tmp397_ = pressure_category;
	_tmp398_ = unit_new ("bar", _ ("Bars"), "100000x", "x/100000", g_dpgettext2 (NULL, "unit-symbols", "Bar,bar"));
	_tmp399_ = _tmp398_;
	unit_category_add_unit (_tmp397_, _tmp399_);
	_g_object_unref0 (_tmp399_);
	_tmp400_ = pressure_category;
	_tmp401_ = unit_new ("atm", _ ("Standard Atmospheres"), "101325x", "x/101325", g_dpgettext2 (NULL, "unit-symbols", "Standard Atmosphere,Standard atmosphere,standard atmosphere,Atm,atm"));
	_tmp402_ = _tmp401_;
	unit_category_add_unit (_tmp400_, _tmp402_);
	_g_object_unref0 (_tmp402_);
	_tmp403_ = pressure_category;
	_tmp404_ = unit_new ("mmhg", _ ("Millimeters of Mercury"), "133.322387415x", "x/133.322387415", g_dpgettext2 (NULL, "unit-symbols", "Millimeter of Mercury,millimeter of mercury,mmHg"));
	_tmp405_ = _tmp404_;
	unit_category_add_unit (_tmp403_, _tmp405_);
	_g_object_unref0 (_tmp405_);
	_tmp406_ = pressure_category;
	_tmp407_ = unit_new ("inhg", _ ("Inches of Mercury"), "3386.38x", "x/3386.38", g_dpgettext2 (NULL, "unit-symbols", "Inch of Mercury,inch of mercury,inHg"));
	_tmp408_ = _tmp407_;
	unit_category_add_unit (_tmp406_, _tmp408_);
	_g_object_unref0 (_tmp408_);
	_tmp409_ = pressure_category;
	_tmp410_ = unit_new ("psi", _ ("Pounds per Square Inch"), "6894.759x", "x/6894.759", g_dpgettext2 (NULL, "unit-symbols", "Pound per Square Inch,pound per square inch,psi"));
	_tmp411_ = _tmp410_;
	unit_category_add_unit (_tmp409_, _tmp411_);
	_g_object_unref0 (_tmp411_);
	_tmp412_ = default_unit_manager;
	_tmp413_ = unit_manager_add_category (_tmp412_, "currency", _ ("Currency"));
	currency_category = _tmp413_;
	_tmp414_ = currency_manager_get_default (TRUE, TRUE);
	_tmp415_ = _tmp414_;
	_tmp416_ = currency_manager_get_currencies (_tmp415_);
	_tmp417_ = _tmp416_;
	_g_object_unref0 (_tmp415_);
	currencies = _tmp417_;
	currencies = g_list_sort (currencies, ___lambda14__gcompare_func);
	_tmp418_ = currencies;
	{
		GList* currency_collection = NULL;
		GList* currency_it = NULL;
		currency_collection = _tmp418_;
		for (currency_it = currency_collection; currency_it != NULL; currency_it = currency_it->next) {
			Currency* _tmp419_;
			Currency* currency = NULL;
			_tmp419_ = _g_object_ref0 ((Currency*) currency_it->data);
			currency = _tmp419_;
			{
				Unit* unit = NULL;
				Currency* _tmp420_;
				gchar* _tmp421_;
				gchar* _tmp422_;
				gchar* _tmp423_;
				Currency* _tmp424_;
				gchar* _tmp425_;
				gchar* _tmp426_;
				gchar* _tmp427_;
				Currency* _tmp428_;
				gchar* _tmp429_;
				gchar* _tmp430_;
				gchar* _tmp431_;
				Unit* _tmp432_;
				Unit* _tmp433_;
				UnitCategory* _tmp434_;
				Unit* _tmp435_;
				_tmp420_ = currency;
				_tmp421_ = currency_get_name (_tmp420_);
				_tmp422_ = _tmp421_;
				_tmp423_ = _tmp422_;
				_tmp424_ = currency;
				_tmp425_ = currency_get_display_name (_tmp424_);
				_tmp426_ = _tmp425_;
				_tmp427_ = _tmp426_;
				_tmp428_ = currency;
				_tmp429_ = currency_get_name (_tmp428_);
				_tmp430_ = _tmp429_;
				_tmp431_ = _tmp430_;
				_tmp432_ = unit_new (_tmp423_, _tmp427_, NULL, NULL, _tmp431_);
				_tmp433_ = _tmp432_;
				_g_free0 (_tmp431_);
				_g_free0 (_tmp427_);
				_g_free0 (_tmp423_);
				unit = _tmp433_;
				_tmp434_ = currency_category;
				_tmp435_ = unit;
				unit_category_add_unit (_tmp434_, _tmp435_);
				_g_object_unref0 (unit);
				_g_object_unref0 (currency);
			}
		}
	}
	_tmp436_ = default_unit_manager;
	_tmp437_ = unit_manager_add_category (_tmp436_, "numberbase", _ ("Number Base"));
	numberbase_category = _tmp437_;
	_tmp438_ = numberbase_category;
	_tmp439_ = unit_new ("2", _ ("Binary"), "x", "x", "");
	_tmp440_ = _tmp439_;
	unit_category_add_unit (_tmp438_, _tmp440_);
	_g_object_unref0 (_tmp440_);
	_tmp441_ = numberbase_category;
	_tmp442_ = unit_new ("8", _ ("Octal"), "x", "x", "");
	_tmp443_ = _tmp442_;
	unit_category_add_unit (_tmp441_, _tmp443_);
	_g_object_unref0 (_tmp443_);
	_tmp444_ = numberbase_category;
	_tmp445_ = unit_new ("10", _ ("Decimal"), "x", "x", "");
	_tmp446_ = _tmp445_;
	unit_category_add_unit (_tmp444_, _tmp446_);
	_g_object_unref0 (_tmp446_);
	_tmp447_ = numberbase_category;
	_tmp448_ = unit_new ("16", _ ("Hexadecimal"), "x", "x", "");
	_tmp449_ = _tmp448_;
	unit_category_add_unit (_tmp447_, _tmp449_);
	_g_object_unref0 (_tmp449_);
	_tmp450_ = default_unit_manager;
	_tmp451_ = _g_object_ref0 (_tmp450_);
	result = _tmp451_;
	_g_object_unref0 (numberbase_category);
	(currencies == NULL) ? NULL : (currencies = (_g_list_free__g_object_unref0_ (currencies), NULL));
	_g_object_unref0 (currency_category);
	_g_object_unref0 (digitalstorage_category);
	_g_object_unref0 (pressure_category);
	_g_object_unref0 (energy_category);
	_g_object_unref0 (temperature_category);
	_g_object_unref0 (frequency_category);
	_g_object_unref0 (duration_category);
	_g_object_unref0 (speed_category);
	_g_object_unref0 (weight_category);
	_g_object_unref0 (volume_category);
	_g_object_unref0 (area_category);
	_g_object_unref0 (length_category);
	_g_object_unref0 (angle_category);
	return result;
}

UnitCategory*
unit_manager_add_category (UnitManager* self,
                           const gchar* name,
                           const gchar* display_name)
{
	UnitCategory* category = NULL;
	UnitCategory* _tmp0_;
	UnitCategory* _tmp1_;
	UnitCategory* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (display_name != NULL, NULL);
	_tmp0_ = unit_category_new (name, display_name);
	category = _tmp0_;
	_tmp1_ = _g_object_ref0 (category);
	self->priv->categories = g_list_append (self->priv->categories, _tmp1_);
	result = category;
	return result;
}

GList*
unit_manager_get_categories (UnitManager* self)
{
	GList* r = NULL;
	GList* _tmp0_;
	GList* result;
	g_return_val_if_fail (self != NULL, NULL);
	r = NULL;
	_tmp0_ = self->priv->categories;
	{
		GList* c_collection = NULL;
		GList* c_it = NULL;
		c_collection = _tmp0_;
		for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
			UnitCategory* _tmp1_;
			UnitCategory* c = NULL;
			_tmp1_ = _g_object_ref0 ((UnitCategory*) c_it->data);
			c = _tmp1_;
			{
				UnitCategory* _tmp2_;
				UnitCategory* _tmp3_;
				_tmp2_ = c;
				_tmp3_ = _g_object_ref0 (_tmp2_);
				r = g_list_append (r, _tmp3_);
				_g_object_unref0 (c);
			}
		}
	}
	result = r;
	return result;
}

UnitCategory*
unit_manager_get_category (UnitManager* self,
                           const gchar* category)
{
	GList* _tmp0_;
	UnitCategory* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (category != NULL, NULL);
	_tmp0_ = self->priv->categories;
	{
		GList* c_collection = NULL;
		GList* c_it = NULL;
		c_collection = _tmp0_;
		for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
			UnitCategory* _tmp1_;
			UnitCategory* c = NULL;
			_tmp1_ = _g_object_ref0 ((UnitCategory*) c_it->data);
			c = _tmp1_;
			{
				UnitCategory* _tmp2_;
				gchar* _tmp3_;
				gchar* _tmp4_;
				gchar* _tmp5_;
				gboolean _tmp6_;
				_tmp2_ = c;
				_tmp3_ = unit_category_get_name (_tmp2_);
				_tmp4_ = _tmp3_;
				_tmp5_ = _tmp4_;
				_tmp6_ = g_strcmp0 (_tmp5_, category) == 0;
				_g_free0 (_tmp5_);
				if (_tmp6_) {
					result = c;
					return result;
				}
				_g_object_unref0 (c);
			}
		}
	}
	result = NULL;
	return result;
}

UnitCategory*
unit_manager_get_category_of_unit (UnitManager* self,
                                   const gchar* name)
{
	gint count = 0;
	UnitCategory* return_category = NULL;
	GList* _tmp0_;
	GList* _tmp8_;
	UnitCategory* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	count = 0;
	return_category = NULL;
	_tmp0_ = self->priv->categories;
	{
		GList* c_collection = NULL;
		GList* c_it = NULL;
		c_collection = _tmp0_;
		for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
			UnitCategory* _tmp1_;
			UnitCategory* c = NULL;
			_tmp1_ = _g_object_ref0 ((UnitCategory*) c_it->data);
			c = _tmp1_;
			{
				Unit* u = NULL;
				UnitCategory* _tmp2_;
				Unit* _tmp3_;
				Unit* _tmp4_;
				_tmp2_ = c;
				_tmp3_ = unit_category_get_unit_by_name (_tmp2_, name, TRUE);
				u = _tmp3_;
				_tmp4_ = u;
				if (_tmp4_ != NULL) {
					UnitCategory* _tmp5_;
					UnitCategory* _tmp6_;
					gint _tmp7_;
					_tmp5_ = c;
					_tmp6_ = _g_object_ref0 (_tmp5_);
					_g_object_unref0 (return_category);
					return_category = _tmp6_;
					_tmp7_ = count;
					count = _tmp7_ + 1;
				}
				_g_object_unref0 (u);
				_g_object_unref0 (c);
			}
		}
	}
	if (count > 1) {
		result = NULL;
		_g_object_unref0 (return_category);
		return result;
	} else {
		if (count == 1) {
			result = return_category;
			return result;
		}
	}
	_tmp8_ = self->priv->categories;
	{
		GList* c_collection = NULL;
		GList* c_it = NULL;
		c_collection = _tmp8_;
		for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
			UnitCategory* _tmp9_;
			UnitCategory* c = NULL;
			_tmp9_ = _g_object_ref0 ((UnitCategory*) c_it->data);
			c = _tmp9_;
			{
				Unit* u = NULL;
				UnitCategory* _tmp10_;
				Unit* _tmp11_;
				Unit* _tmp12_;
				_tmp10_ = c;
				_tmp11_ = unit_category_get_unit_by_name (_tmp10_, name, FALSE);
				u = _tmp11_;
				_tmp12_ = u;
				if (_tmp12_ != NULL) {
					UnitCategory* _tmp13_;
					UnitCategory* _tmp14_;
					gint _tmp15_;
					_tmp13_ = c;
					_tmp14_ = _g_object_ref0 (_tmp13_);
					_g_object_unref0 (return_category);
					return_category = _tmp14_;
					_tmp15_ = count;
					count = _tmp15_ + 1;
				}
				_g_object_unref0 (u);
				_g_object_unref0 (c);
			}
		}
	}
	if (count == 1) {
		result = return_category;
		return result;
	}
	result = NULL;
	_g_object_unref0 (return_category);
	return result;
}

Unit*
unit_manager_get_unit_by_name (UnitManager* self,
                               const gchar* name)
{
	gint count = 0;
	Unit* return_unit = NULL;
	GList* _tmp0_;
	GList* _tmp8_;
	Unit* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	count = 0;
	return_unit = NULL;
	_tmp0_ = self->priv->categories;
	{
		GList* c_collection = NULL;
		GList* c_it = NULL;
		c_collection = _tmp0_;
		for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
			UnitCategory* _tmp1_;
			UnitCategory* c = NULL;
			_tmp1_ = _g_object_ref0 ((UnitCategory*) c_it->data);
			c = _tmp1_;
			{
				Unit* u = NULL;
				UnitCategory* _tmp2_;
				Unit* _tmp3_;
				Unit* _tmp4_;
				_tmp2_ = c;
				_tmp3_ = unit_category_get_unit_by_name (_tmp2_, name, TRUE);
				u = _tmp3_;
				_tmp4_ = u;
				if (_tmp4_ != NULL) {
					Unit* _tmp5_;
					Unit* _tmp6_;
					gint _tmp7_;
					_tmp5_ = u;
					_tmp6_ = _g_object_ref0 (_tmp5_);
					_g_object_unref0 (return_unit);
					return_unit = _tmp6_;
					_tmp7_ = count;
					count = _tmp7_ + 1;
				}
				_g_object_unref0 (u);
				_g_object_unref0 (c);
			}
		}
	}
	if (count > 1) {
		result = NULL;
		_g_object_unref0 (return_unit);
		return result;
	} else {
		if (count == 1) {
			result = return_unit;
			return result;
		}
	}
	_tmp8_ = self->priv->categories;
	{
		GList* c_collection = NULL;
		GList* c_it = NULL;
		c_collection = _tmp8_;
		for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
			UnitCategory* _tmp9_;
			UnitCategory* c = NULL;
			_tmp9_ = _g_object_ref0 ((UnitCategory*) c_it->data);
			c = _tmp9_;
			{
				Unit* u = NULL;
				UnitCategory* _tmp10_;
				Unit* _tmp11_;
				Unit* _tmp12_;
				_tmp10_ = c;
				_tmp11_ = unit_category_get_unit_by_name (_tmp10_, name, FALSE);
				u = _tmp11_;
				_tmp12_ = u;
				if (_tmp12_ != NULL) {
					Unit* _tmp13_;
					Unit* _tmp14_;
					gint _tmp15_;
					_tmp13_ = u;
					_tmp14_ = _g_object_ref0 (_tmp13_);
					_g_object_unref0 (return_unit);
					return_unit = _tmp14_;
					_tmp15_ = count;
					count = _tmp15_ + 1;
				}
				_g_object_unref0 (u);
				_g_object_unref0 (c);
			}
		}
	}
	if (count == 1) {
		result = return_unit;
		return result;
	}
	result = NULL;
	_g_object_unref0 (return_unit);
	return result;
}

Unit*
unit_manager_get_unit_by_symbol (UnitManager* self,
                                 const gchar* symbol)
{
	gint count = 0;
	Unit* return_unit = NULL;
	GList* _tmp0_;
	GList* _tmp8_;
	Unit* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (symbol != NULL, NULL);
	count = 0;
	return_unit = NULL;
	_tmp0_ = self->priv->categories;
	{
		GList* c_collection = NULL;
		GList* c_it = NULL;
		c_collection = _tmp0_;
		for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
			UnitCategory* _tmp1_;
			UnitCategory* c = NULL;
			_tmp1_ = _g_object_ref0 ((UnitCategory*) c_it->data);
			c = _tmp1_;
			{
				Unit* u = NULL;
				UnitCategory* _tmp2_;
				Unit* _tmp3_;
				Unit* _tmp4_;
				_tmp2_ = c;
				_tmp3_ = unit_category_get_unit_by_symbol (_tmp2_, symbol, TRUE);
				u = _tmp3_;
				_tmp4_ = u;
				if (_tmp4_ != NULL) {
					Unit* _tmp5_;
					Unit* _tmp6_;
					gint _tmp7_;
					_tmp5_ = u;
					_tmp6_ = _g_object_ref0 (_tmp5_);
					_g_object_unref0 (return_unit);
					return_unit = _tmp6_;
					_tmp7_ = count;
					count = _tmp7_ + 1;
				}
				_g_object_unref0 (u);
				_g_object_unref0 (c);
			}
		}
	}
	if (count > 1) {
		result = NULL;
		_g_object_unref0 (return_unit);
		return result;
	} else {
		if (count == 1) {
			result = return_unit;
			return result;
		}
	}
	_tmp8_ = self->priv->categories;
	{
		GList* c_collection = NULL;
		GList* c_it = NULL;
		c_collection = _tmp8_;
		for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
			UnitCategory* _tmp9_;
			UnitCategory* c = NULL;
			_tmp9_ = _g_object_ref0 ((UnitCategory*) c_it->data);
			c = _tmp9_;
			{
				Unit* u = NULL;
				UnitCategory* _tmp10_;
				Unit* _tmp11_;
				Unit* _tmp12_;
				_tmp10_ = c;
				_tmp11_ = unit_category_get_unit_by_symbol (_tmp10_, symbol, FALSE);
				u = _tmp11_;
				_tmp12_ = u;
				if (_tmp12_ != NULL) {
					Unit* _tmp13_;
					Unit* _tmp14_;
					gint _tmp15_;
					_tmp13_ = u;
					_tmp14_ = _g_object_ref0 (_tmp13_);
					_g_object_unref0 (return_unit);
					return_unit = _tmp14_;
					_tmp15_ = count;
					count = _tmp15_ + 1;
				}
				_g_object_unref0 (u);
				_g_object_unref0 (c);
			}
		}
	}
	if (count == 1) {
		result = return_unit;
		return result;
	}
	result = NULL;
	_g_object_unref0 (return_unit);
	return result;
}

Unit*
unit_manager_get_defined_unit (UnitManager* self,
                               const gchar* name)
{
	Unit* _tmp0_;
	Unit* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = unit_manager_get_unit_by_symbol (self, name);
	result = _tmp0_;
	return result;
}

Number*
unit_manager_convert_by_symbol (UnitManager* self,
                                Number* x,
                                const gchar* x_symbol,
                                const gchar* z_symbol,
                                Unit** x_unit,
                                Unit** z_unit)
{
	Unit* _vala_x_unit = NULL;
	Unit* _vala_z_unit = NULL;
	GList* _tmp0_;
	Number* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (x != NULL, NULL);
	g_return_val_if_fail (x_symbol != NULL, NULL);
	g_return_val_if_fail (z_symbol != NULL, NULL);
	_tmp0_ = self->priv->categories;
	{
		GList* c_collection = NULL;
		GList* c_it = NULL;
		c_collection = _tmp0_;
		for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
			UnitCategory* _tmp1_;
			UnitCategory* c = NULL;
			_tmp1_ = _g_object_ref0 ((UnitCategory*) c_it->data);
			c = _tmp1_;
			{
				Unit* x_units = NULL;
				UnitCategory* _tmp2_;
				Unit* _tmp3_;
				Unit* _tmp4_;
				Unit* _tmp7_;
				Unit* _tmp8_;
				Unit* z_units = NULL;
				UnitCategory* _tmp9_;
				Unit* _tmp10_;
				Unit* _tmp11_;
				Unit* _tmp14_;
				Unit* _tmp15_;
				gboolean _tmp16_ = FALSE;
				Unit* _tmp17_;
				_tmp2_ = c;
				_tmp3_ = unit_category_get_unit_by_symbol (_tmp2_, x_symbol, TRUE);
				x_units = _tmp3_;
				_tmp4_ = x_units;
				if (_tmp4_ == NULL) {
					UnitCategory* _tmp5_;
					Unit* _tmp6_;
					_tmp5_ = c;
					_tmp6_ = unit_category_get_unit_by_symbol (_tmp5_, x_symbol, FALSE);
					_g_object_unref0 (x_units);
					x_units = _tmp6_;
				}
				_tmp7_ = x_units;
				_tmp8_ = _g_object_ref0 (_tmp7_);
				_g_object_unref0 (_vala_x_unit);
				_vala_x_unit = _tmp8_;
				_tmp9_ = c;
				_tmp10_ = unit_category_get_unit_by_symbol (_tmp9_, z_symbol, TRUE);
				z_units = _tmp10_;
				_tmp11_ = z_units;
				if (_tmp11_ == NULL) {
					UnitCategory* _tmp12_;
					Unit* _tmp13_;
					_tmp12_ = c;
					_tmp13_ = unit_category_get_unit_by_symbol (_tmp12_, z_symbol, FALSE);
					_g_object_unref0 (z_units);
					z_units = _tmp13_;
				}
				_tmp14_ = z_units;
				_tmp15_ = _g_object_ref0 (_tmp14_);
				_g_object_unref0 (_vala_z_unit);
				_vala_z_unit = _tmp15_;
				_tmp17_ = x_units;
				if (_tmp17_ != NULL) {
					Unit* _tmp18_;
					_tmp18_ = z_units;
					_tmp16_ = _tmp18_ != NULL;
				} else {
					_tmp16_ = FALSE;
				}
				if (_tmp16_) {
					UnitCategory* _tmp19_;
					Unit* _tmp20_;
					Unit* _tmp21_;
					Number* _tmp22_;
					_tmp19_ = c;
					_tmp20_ = x_units;
					_tmp21_ = z_units;
					_tmp22_ = unit_category_convert (_tmp19_, x, _tmp20_, _tmp21_);
					result = _tmp22_;
					_g_object_unref0 (z_units);
					_g_object_unref0 (x_units);
					_g_object_unref0 (c);
					if (x_unit) {
						*x_unit = _vala_x_unit;
					} else {
						_g_object_unref0 (_vala_x_unit);
					}
					if (z_unit) {
						*z_unit = _vala_z_unit;
					} else {
						_g_object_unref0 (_vala_z_unit);
					}
					return result;
				}
				_g_object_unref0 (z_units);
				_g_object_unref0 (x_units);
				_g_object_unref0 (c);
			}
		}
	}
	result = NULL;
	if (x_unit) {
		*x_unit = _vala_x_unit;
	} else {
		_g_object_unref0 (_vala_x_unit);
	}
	if (z_unit) {
		*z_unit = _vala_z_unit;
	} else {
		_g_object_unref0 (_vala_z_unit);
	}
	return result;
}

static void
unit_manager_class_init (UnitManagerClass * klass,
                         gpointer klass_data)
{
	unit_manager_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &UnitManager_private_offset);
	G_OBJECT_CLASS (klass)->finalize = unit_manager_finalize;
}

static void
unit_manager_instance_init (UnitManager * self,
                            gpointer klass)
{
	self->priv = unit_manager_get_instance_private (self);
}

static void
unit_manager_finalize (GObject * obj)
{
	UnitManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_UNIT_MANAGER, UnitManager);
	(self->priv->categories == NULL) ? NULL : (self->priv->categories = (_g_list_free__g_object_unref0_ (self->priv->categories), NULL));
	G_OBJECT_CLASS (unit_manager_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
unit_manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (UnitManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unit_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnitManager), 0, (GInstanceInitFunc) unit_manager_instance_init, NULL };
	GType unit_manager_type_id;
	unit_manager_type_id = g_type_register_static (G_TYPE_OBJECT, "UnitManager", &g_define_type_info, 0);
	UnitManager_private_offset = g_type_add_instance_private (unit_manager_type_id, sizeof (UnitManagerPrivate));
	return unit_manager_type_id;
}

GType
unit_manager_get_type (void)
{
	static gsize unit_manager_type_id__once = 0;
	if (g_once_init_enter (&unit_manager_type_id__once)) {
		GType unit_manager_type_id;
		unit_manager_type_id = unit_manager_get_type_once ();
		g_once_init_leave (&unit_manager_type_id__once, unit_manager_type_id);
	}
	return unit_manager_type_id__once;
}

static inline gpointer
unit_category_get_instance_private (UnitCategory* self)
{
	return G_STRUCT_MEMBER_P (self, UnitCategory_private_offset);
}

UnitCategory*
unit_category_construct (GType object_type,
                         const gchar* name,
                         const gchar* display_name)
{
	UnitCategory * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (display_name != NULL, NULL);
	self = (UnitCategory*) g_object_new (object_type, NULL);
	_tmp0_ = g_strdup (name);
	_g_free0 (self->priv->_name);
	self->priv->_name = _tmp0_;
	_tmp1_ = g_strdup (display_name);
	_g_free0 (self->priv->_display_name);
	self->priv->_display_name = _tmp1_;
	(self->priv->units == NULL) ? NULL : (self->priv->units = (_g_list_free__g_object_unref0_ (self->priv->units), NULL));
	self->priv->units = NULL;
	return self;
}

UnitCategory*
unit_category_new (const gchar* name,
                   const gchar* display_name)
{
	return unit_category_construct (TYPE_UNIT_CATEGORY, name, display_name);
}

void
unit_category_add_unit (UnitCategory* self,
                        Unit* unit)
{
	Unit* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (unit != NULL);
	_tmp0_ = _g_object_ref0 (unit);
	self->priv->units = g_list_append (self->priv->units, _tmp0_);
}

Unit*
unit_category_get_unit_by_name (UnitCategory* self,
                                const gchar* name,
                                gboolean case_sensitive)
{
	gint count = 0;
	Unit* return_unit = NULL;
	GList* _tmp0_;
	Unit* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	count = 0;
	return_unit = NULL;
	_tmp0_ = self->priv->units;
	{
		GList* unit_collection = NULL;
		GList* unit_it = NULL;
		unit_collection = _tmp0_;
		for (unit_it = unit_collection; unit_it != NULL; unit_it = unit_it->next) {
			Unit* _tmp1_;
			Unit* unit = NULL;
			_tmp1_ = _g_object_ref0 ((Unit*) unit_it->data);
			unit = _tmp1_;
			{
				gboolean _tmp2_ = FALSE;
				gboolean _tmp3_ = FALSE;
				if (case_sensitive) {
					Unit* _tmp4_;
					gchar* _tmp5_;
					gchar* _tmp6_;
					gchar* _tmp7_;
					_tmp4_ = unit;
					_tmp5_ = unit_get_name (_tmp4_);
					_tmp6_ = _tmp5_;
					_tmp7_ = _tmp6_;
					_tmp3_ = g_strcmp0 (_tmp7_, name) == 0;
					_g_free0 (_tmp7_);
				} else {
					_tmp3_ = FALSE;
				}
				if (_tmp3_) {
					_tmp2_ = TRUE;
				} else {
					gboolean _tmp8_ = FALSE;
					if (!case_sensitive) {
						Unit* _tmp9_;
						gchar* _tmp10_;
						gchar* _tmp11_;
						gchar* _tmp12_;
						gchar* _tmp13_;
						gchar* _tmp14_;
						gchar* _tmp15_;
						gchar* _tmp16_;
						_tmp9_ = unit;
						_tmp10_ = unit_get_name (_tmp9_);
						_tmp11_ = _tmp10_;
						_tmp12_ = _tmp11_;
						_tmp13_ = g_utf8_strdown (_tmp12_, (gssize) -1);
						_tmp14_ = _tmp13_;
						_tmp15_ = g_utf8_strdown (name, (gssize) -1);
						_tmp16_ = _tmp15_;
						_tmp8_ = g_strcmp0 (_tmp14_, _tmp16_) == 0;
						_g_free0 (_tmp16_);
						_g_free0 (_tmp14_);
						_g_free0 (_tmp12_);
					} else {
						_tmp8_ = FALSE;
					}
					_tmp2_ = _tmp8_;
				}
				if (_tmp2_) {
					Unit* _tmp17_;
					Unit* _tmp18_;
					gint _tmp19_;
					_tmp17_ = unit;
					_tmp18_ = _g_object_ref0 (_tmp17_);
					_g_object_unref0 (return_unit);
					return_unit = _tmp18_;
					_tmp19_ = count;
					count = _tmp19_ + 1;
				}
				_g_object_unref0 (unit);
			}
		}
	}
	if (count == 1) {
		result = return_unit;
		return result;
	}
	result = NULL;
	_g_object_unref0 (return_unit);
	return result;
}

Unit*
unit_category_get_unit_by_symbol (UnitCategory* self,
                                  const gchar* symbol,
                                  gboolean case_sensitive)
{
	gint count = 0;
	Unit* return_unit = NULL;
	GList* _tmp0_;
	GList* _tmp6_;
	Unit* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (symbol != NULL, NULL);
	count = 0;
	return_unit = NULL;
	_tmp0_ = self->priv->units;
	{
		GList* unit_collection = NULL;
		GList* unit_it = NULL;
		unit_collection = _tmp0_;
		for (unit_it = unit_collection; unit_it != NULL; unit_it = unit_it->next) {
			Unit* _tmp1_;
			Unit* unit = NULL;
			_tmp1_ = _g_object_ref0 ((Unit*) unit_it->data);
			unit = _tmp1_;
			{
				Unit* _tmp2_;
				_tmp2_ = unit;
				if (unit_matches_symbol (_tmp2_, symbol, TRUE)) {
					Unit* _tmp3_;
					Unit* _tmp4_;
					gint _tmp5_;
					_tmp3_ = unit;
					_tmp4_ = _g_object_ref0 (_tmp3_);
					_g_object_unref0 (return_unit);
					return_unit = _tmp4_;
					_tmp5_ = count;
					count = _tmp5_ + 1;
				}
				_g_object_unref0 (unit);
			}
		}
	}
	if (count > 1) {
		result = NULL;
		_g_object_unref0 (return_unit);
		return result;
	} else {
		if (count == 1) {
			result = return_unit;
			return result;
		}
	}
	_tmp6_ = self->priv->units;
	{
		GList* unit_collection = NULL;
		GList* unit_it = NULL;
		unit_collection = _tmp6_;
		for (unit_it = unit_collection; unit_it != NULL; unit_it = unit_it->next) {
			Unit* _tmp7_;
			Unit* unit = NULL;
			_tmp7_ = _g_object_ref0 ((Unit*) unit_it->data);
			unit = _tmp7_;
			{
				Unit* _tmp8_;
				_tmp8_ = unit;
				if (unit_matches_symbol (_tmp8_, symbol, FALSE)) {
					Unit* _tmp9_;
					Unit* _tmp10_;
					gint _tmp11_;
					_tmp9_ = unit;
					_tmp10_ = _g_object_ref0 (_tmp9_);
					_g_object_unref0 (return_unit);
					return_unit = _tmp10_;
					_tmp11_ = count;
					count = _tmp11_ + 1;
				}
				_g_object_unref0 (unit);
			}
		}
	}
	if (count == 1) {
		result = return_unit;
		return result;
	}
	result = NULL;
	_g_object_unref0 (return_unit);
	return result;
}

GList*
unit_category_get_units (UnitCategory* self)
{
	GList* _tmp0_;
	GList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->units;
	result = _tmp0_;
	return result;
}

Number*
unit_category_convert (UnitCategory* self,
                       Number* x,
                       Unit* x_units,
                       Unit* z_units)
{
	Number* t = NULL;
	Number* _tmp0_;
	Number* _tmp1_;
	Number* _tmp2_;
	Number* _tmp3_;
	Number* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (x != NULL, NULL);
	g_return_val_if_fail (x_units != NULL, NULL);
	g_return_val_if_fail (z_units != NULL, NULL);
	_tmp0_ = unit_convert_from (x_units, x);
	t = _tmp0_;
	_tmp1_ = t;
	if (_tmp1_ == NULL) {
		result = NULL;
		_g_object_unref0 (t);
		return result;
	}
	_tmp2_ = t;
	_tmp3_ = unit_convert_to (z_units, _tmp2_);
	result = _tmp3_;
	_g_object_unref0 (t);
	return result;
}

gchar*
unit_category_get_name (UnitCategory* self)
{
	gchar* result;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

gchar*
unit_category_get_display_name (UnitCategory* self)
{
	gchar* result;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_display_name;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
unit_category_class_init (UnitCategoryClass * klass,
                          gpointer klass_data)
{
	unit_category_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &UnitCategory_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_unit_category_get_property;
	G_OBJECT_CLASS (klass)->finalize = unit_category_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), UNIT_CATEGORY_NAME_PROPERTY, unit_category_properties[UNIT_CATEGORY_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), UNIT_CATEGORY_DISPLAY_NAME_PROPERTY, unit_category_properties[UNIT_CATEGORY_DISPLAY_NAME_PROPERTY] = g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
unit_category_instance_init (UnitCategory * self,
                             gpointer klass)
{
	self->priv = unit_category_get_instance_private (self);
}

static void
unit_category_finalize (GObject * obj)
{
	UnitCategory * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_UNIT_CATEGORY, UnitCategory);
	(self->priv->units == NULL) ? NULL : (self->priv->units = (_g_list_free__g_object_unref0_ (self->priv->units), NULL));
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_display_name);
	G_OBJECT_CLASS (unit_category_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
unit_category_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (UnitCategoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unit_category_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnitCategory), 0, (GInstanceInitFunc) unit_category_instance_init, NULL };
	GType unit_category_type_id;
	unit_category_type_id = g_type_register_static (G_TYPE_OBJECT, "UnitCategory", &g_define_type_info, 0);
	UnitCategory_private_offset = g_type_add_instance_private (unit_category_type_id, sizeof (UnitCategoryPrivate));
	return unit_category_type_id;
}

GType
unit_category_get_type (void)
{
	static gsize unit_category_type_id__once = 0;
	if (g_once_init_enter (&unit_category_type_id__once)) {
		GType unit_category_type_id;
		unit_category_type_id = unit_category_get_type_once ();
		g_once_init_leave (&unit_category_type_id__once, unit_category_type_id);
	}
	return unit_category_type_id__once;
}

static void
_vala_unit_category_get_property (GObject * object,
                                  guint property_id,
                                  GValue * value,
                                  GParamSpec * pspec)
{
	UnitCategory * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_UNIT_CATEGORY, UnitCategory);
	switch (property_id) {
		case UNIT_CATEGORY_NAME_PROPERTY:
		g_value_take_string (value, unit_category_get_name (self));
		break;
		case UNIT_CATEGORY_DISPLAY_NAME_PROPERTY:
		g_value_take_string (value, unit_category_get_display_name (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
unit_get_instance_private (Unit* self)
{
	return G_STRUCT_MEMBER_P (self, Unit_private_offset);
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static inline void
_g_list_free__g_free0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_free0_);
}

Unit*
unit_construct (GType object_type,
                const gchar* name,
                const gchar* display_name,
                const gchar* from_function,
                const gchar* to_function,
                const gchar* symbols)
{
	Unit * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar** symbol_names = NULL;
	gchar** _tmp4_;
	gchar** _tmp5_;
	gint symbol_names_length1;
	gint _symbol_names_size_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (display_name != NULL, NULL);
	g_return_val_if_fail (symbols != NULL, NULL);
	self = (Unit*) g_object_new (object_type, NULL);
	_tmp0_ = g_strdup (name);
	_g_free0 (self->priv->_name);
	self->priv->_name = _tmp0_;
	_tmp1_ = g_strdup (display_name);
	_g_free0 (self->priv->_display_name);
	self->priv->_display_name = _tmp1_;
	_tmp2_ = g_strdup (from_function);
	_g_free0 (self->priv->from_function);
	self->priv->from_function = _tmp2_;
	_tmp3_ = g_strdup (to_function);
	_g_free0 (self->priv->to_function);
	self->priv->to_function = _tmp3_;
	(self->priv->_symbols == NULL) ? NULL : (self->priv->_symbols = (_g_list_free__g_free0_ (self->priv->_symbols), NULL));
	self->priv->_symbols = NULL;
	_tmp5_ = _tmp4_ = g_strsplit (symbols, ",", 0);
	symbol_names = _tmp5_;
	symbol_names_length1 = _vala_array_length (_tmp4_);
	_symbol_names_size_ = symbol_names_length1;
	_tmp6_ = symbol_names;
	_tmp6__length1 = symbol_names_length1;
	{
		gchar** symbol_name_collection = NULL;
		gint symbol_name_collection_length1 = 0;
		gint _symbol_name_collection_size_ = 0;
		gint symbol_name_it = 0;
		symbol_name_collection = _tmp6_;
		symbol_name_collection_length1 = _tmp6__length1;
		for (symbol_name_it = 0; symbol_name_it < symbol_name_collection_length1; symbol_name_it = symbol_name_it + 1) {
			gchar* _tmp7_;
			gchar* symbol_name = NULL;
			_tmp7_ = g_strdup (symbol_name_collection[symbol_name_it]);
			symbol_name = _tmp7_;
			{
				const gchar* _tmp8_;
				gchar* _tmp9_;
				_tmp8_ = symbol_name;
				_tmp9_ = g_strdup (_tmp8_);
				self->priv->_symbols = g_list_append (self->priv->_symbols, _tmp9_);
				_g_free0 (symbol_name);
			}
		}
	}
	symbol_names = (_vala_array_free (symbol_names, symbol_names_length1, (GDestroyNotify) g_free), NULL);
	return self;
}

Unit*
unit_new (const gchar* name,
          const gchar* display_name,
          const gchar* from_function,
          const gchar* to_function,
          const gchar* symbols)
{
	return unit_construct (TYPE_UNIT, name, display_name, from_function, to_function, symbols);
}

gboolean
unit_matches_symbol (Unit* self,
                     const gchar* symbol,
                     gboolean case_sensitive)
{
	GList* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (symbol != NULL, FALSE);
	_tmp0_ = self->priv->_symbols;
	{
		GList* s_collection = NULL;
		GList* s_it = NULL;
		s_collection = _tmp0_;
		for (s_it = s_collection; s_it != NULL; s_it = s_it->next) {
			gchar* _tmp1_;
			gchar* s = NULL;
			_tmp1_ = g_strdup ((const gchar*) s_it->data);
			s = _tmp1_;
			{
				gboolean _tmp2_ = FALSE;
				gboolean _tmp3_ = FALSE;
				if (case_sensitive) {
					const gchar* _tmp4_;
					_tmp4_ = s;
					_tmp3_ = g_strcmp0 (_tmp4_, symbol) == 0;
				} else {
					_tmp3_ = FALSE;
				}
				if (_tmp3_) {
					_tmp2_ = TRUE;
				} else {
					gboolean _tmp5_ = FALSE;
					if (!case_sensitive) {
						const gchar* _tmp6_;
						gchar* _tmp7_;
						gchar* _tmp8_;
						gchar* _tmp9_;
						gchar* _tmp10_;
						_tmp6_ = s;
						_tmp7_ = g_utf8_strdown (_tmp6_, (gssize) -1);
						_tmp8_ = _tmp7_;
						_tmp9_ = g_utf8_strdown (symbol, (gssize) -1);
						_tmp10_ = _tmp9_;
						_tmp5_ = g_strcmp0 (_tmp8_, _tmp10_) == 0;
						_g_free0 (_tmp10_);
						_g_free0 (_tmp8_);
					} else {
						_tmp5_ = FALSE;
					}
					_tmp2_ = _tmp5_;
				}
				if (_tmp2_) {
					result = TRUE;
					_g_free0 (s);
					return result;
				}
				_g_free0 (s);
			}
		}
	}
	result = FALSE;
	return result;
}

GList*
unit_get_symbols (Unit* self)
{
	GList* _tmp0_;
	GList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_symbols;
	result = _tmp0_;
	return result;
}

Number*
unit_convert_from (Unit* self,
                   Number* x)
{
	const gchar* _tmp0_;
	Number* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (x != NULL, NULL);
	_tmp0_ = self->priv->from_function;
	if (_tmp0_ != NULL) {
		const gchar* _tmp1_;
		Number* _tmp2_;
		_tmp1_ = self->priv->from_function;
		_tmp2_ = unit_solve_function (self, _tmp1_, x);
		result = _tmp2_;
		return result;
	} else {
		Number* r = NULL;
		CurrencyManager* _tmp3_;
		CurrencyManager* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		Number* _tmp8_;
		Number* _tmp9_;
		Number* _tmp10_;
		Number* _tmp11_;
		Number* _tmp12_;
		_tmp3_ = currency_manager_get_default (TRUE, TRUE);
		_tmp4_ = _tmp3_;
		_tmp5_ = unit_get_name (self);
		_tmp6_ = _tmp5_;
		_tmp7_ = _tmp6_;
		_tmp8_ = currency_manager_get_value (_tmp4_, _tmp7_);
		_tmp9_ = _tmp8_;
		_g_free0 (_tmp7_);
		_g_object_unref0 (_tmp4_);
		r = _tmp9_;
		_tmp10_ = r;
		if (_tmp10_ == NULL) {
			result = NULL;
			_g_object_unref0 (r);
			return result;
		}
		_tmp11_ = r;
		_tmp12_ = number_divide (x, _tmp11_);
		result = _tmp12_;
		_g_object_unref0 (r);
		return result;
	}
}

Number*
unit_convert_to (Unit* self,
                 Number* x)
{
	const gchar* _tmp0_;
	Number* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (x != NULL, NULL);
	_tmp0_ = self->priv->to_function;
	if (_tmp0_ != NULL) {
		const gchar* _tmp1_;
		Number* _tmp2_;
		_tmp1_ = self->priv->to_function;
		_tmp2_ = unit_solve_function (self, _tmp1_, x);
		result = _tmp2_;
		return result;
	} else {
		Number* r = NULL;
		CurrencyManager* _tmp3_;
		CurrencyManager* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		Number* _tmp8_;
		Number* _tmp9_;
		Number* _tmp10_;
		Number* _tmp11_;
		Number* _tmp12_;
		_tmp3_ = currency_manager_get_default (TRUE, TRUE);
		_tmp4_ = _tmp3_;
		_tmp5_ = unit_get_name (self);
		_tmp6_ = _tmp5_;
		_tmp7_ = _tmp6_;
		_tmp8_ = currency_manager_get_value (_tmp4_, _tmp7_);
		_tmp9_ = _tmp8_;
		_g_free0 (_tmp7_);
		_g_object_unref0 (_tmp4_);
		r = _tmp9_;
		_tmp10_ = r;
		if (_tmp10_ == NULL) {
			result = NULL;
			_g_object_unref0 (r);
			return result;
		}
		_tmp11_ = r;
		_tmp12_ = number_multiply (x, _tmp11_);
		result = _tmp12_;
		_g_object_unref0 (r);
		return result;
	}
}

static Number*
unit_solve_function (Unit* self,
                     const gchar* function,
                     Number* x)
{
	UnitSolveEquation* equation = NULL;
	UnitSolveEquation* _tmp0_;
	UnitSolveEquation* _tmp1_;
	UnitSolveEquation* _tmp2_;
	Number* z = NULL;
	UnitSolveEquation* _tmp3_;
	Number* _tmp4_;
	Number* _tmp5_;
	Number* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (function != NULL, NULL);
	g_return_val_if_fail (x != NULL, NULL);
	_tmp0_ = unit_solve_equation_new (function, x);
	equation = _tmp0_;
	_tmp1_ = equation;
	((Equation*) _tmp1_)->base = 10;
	_tmp2_ = equation;
	((Equation*) _tmp2_)->wordlen = 32;
	_tmp3_ = equation;
	_tmp4_ = equation_parse ((Equation*) _tmp3_, NULL, NULL, NULL, NULL, NULL);
	z = _tmp4_;
	_tmp5_ = z;
	if (_tmp5_ == NULL) {
		g_warning ("unit.vala:488: Failed to convert value: %s", function);
	}
	result = z;
	_g_object_unref0 (equation);
	return result;
}

gchar*
unit_get_name (Unit* self)
{
	gchar* result;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

gchar*
unit_get_display_name (Unit* self)
{
	gchar* result;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_display_name;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
unit_class_init (UnitClass * klass,
                 gpointer klass_data)
{
	unit_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &Unit_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_unit_get_property;
	G_OBJECT_CLASS (klass)->finalize = unit_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), UNIT_NAME_PROPERTY, unit_properties[UNIT_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), UNIT_DISPLAY_NAME_PROPERTY, unit_properties[UNIT_DISPLAY_NAME_PROPERTY] = g_param_spec_string ("display-name", "display-name", "display-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
unit_instance_init (Unit * self,
                    gpointer klass)
{
	self->priv = unit_get_instance_private (self);
}

static void
unit_finalize (GObject * obj)
{
	Unit * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_UNIT, Unit);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_display_name);
	(self->priv->_symbols == NULL) ? NULL : (self->priv->_symbols = (_g_list_free__g_free0_ (self->priv->_symbols), NULL));
	_g_free0 (self->priv->from_function);
	_g_free0 (self->priv->to_function);
	G_OBJECT_CLASS (unit_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
unit_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (UnitClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unit_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Unit), 0, (GInstanceInitFunc) unit_instance_init, NULL };
	GType unit_type_id;
	unit_type_id = g_type_register_static (G_TYPE_OBJECT, "Unit", &g_define_type_info, 0);
	Unit_private_offset = g_type_add_instance_private (unit_type_id, sizeof (UnitPrivate));
	return unit_type_id;
}

GType
unit_get_type (void)
{
	static gsize unit_type_id__once = 0;
	if (g_once_init_enter (&unit_type_id__once)) {
		GType unit_type_id;
		unit_type_id = unit_get_type_once ();
		g_once_init_leave (&unit_type_id__once, unit_type_id);
	}
	return unit_type_id__once;
}

static void
_vala_unit_get_property (GObject * object,
                         guint property_id,
                         GValue * value,
                         GParamSpec * pspec)
{
	Unit * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_UNIT, Unit);
	switch (property_id) {
		case UNIT_NAME_PROPERTY:
		g_value_take_string (value, unit_get_name (self));
		break;
		case UNIT_DISPLAY_NAME_PROPERTY:
		g_value_take_string (value, unit_get_display_name (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
unit_solve_equation_get_instance_private (UnitSolveEquation* self)
{
	return G_STRUCT_MEMBER_P (self, UnitSolveEquation_private_offset);
}

UnitSolveEquation*
unit_solve_equation_construct (GType object_type,
                               const gchar* function,
                               Number* x)
{
	UnitSolveEquation * self = NULL;
	Number* _tmp0_;
	g_return_val_if_fail (function != NULL, NULL);
	g_return_val_if_fail (x != NULL, NULL);
	self = (UnitSolveEquation*) equation_construct (object_type, function);
	_tmp0_ = _g_object_ref0 (x);
	_g_object_unref0 (self->priv->x);
	self->priv->x = _tmp0_;
	return self;
}

UnitSolveEquation*
unit_solve_equation_new (const gchar* function,
                         Number* x)
{
	return unit_solve_equation_construct (TYPE_UNIT_SOLVE_EQUATION, function, x);
}

static gboolean
unit_solve_equation_real_variable_is_defined (Equation* base,
                                              const gchar* name)
{
	UnitSolveEquation * self;
	gboolean result;
	self = (UnitSolveEquation*) base;
	g_return_val_if_fail (name != NULL, FALSE);
	result = TRUE;
	return result;
}

static Number*
unit_solve_equation_real_get_variable (Equation* base,
                                       const gchar* name)
{
	UnitSolveEquation * self;
	Number* _tmp0_;
	Number* _tmp1_;
	Number* result;
	self = (UnitSolveEquation*) base;
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = self->priv->x;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
unit_solve_equation_class_init (UnitSolveEquationClass * klass,
                                gpointer klass_data)
{
	unit_solve_equation_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &UnitSolveEquation_private_offset);
	((EquationClass *) klass)->variable_is_defined = (gboolean (*) (Equation*, const gchar*)) unit_solve_equation_real_variable_is_defined;
	((EquationClass *) klass)->get_variable = (Number* (*) (Equation*, const gchar*)) unit_solve_equation_real_get_variable;
	G_OBJECT_CLASS (klass)->finalize = unit_solve_equation_finalize;
}

static void
unit_solve_equation_instance_init (UnitSolveEquation * self,
                                   gpointer klass)
{
	self->priv = unit_solve_equation_get_instance_private (self);
}

static void
unit_solve_equation_finalize (GObject * obj)
{
	UnitSolveEquation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_UNIT_SOLVE_EQUATION, UnitSolveEquation);
	_g_object_unref0 (self->priv->x);
	G_OBJECT_CLASS (unit_solve_equation_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
unit_solve_equation_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (UnitSolveEquationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unit_solve_equation_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnitSolveEquation), 0, (GInstanceInitFunc) unit_solve_equation_instance_init, NULL };
	GType unit_solve_equation_type_id;
	unit_solve_equation_type_id = g_type_register_static (TYPE_EQUATION, "UnitSolveEquation", &g_define_type_info, 0);
	UnitSolveEquation_private_offset = g_type_add_instance_private (unit_solve_equation_type_id, sizeof (UnitSolveEquationPrivate));
	return unit_solve_equation_type_id;
}

GType
unit_solve_equation_get_type (void)
{
	static gsize unit_solve_equation_type_id__once = 0;
	if (g_once_init_enter (&unit_solve_equation_type_id__once)) {
		GType unit_solve_equation_type_id;
		unit_solve_equation_type_id = unit_solve_equation_get_type_once ();
		g_once_init_leave (&unit_solve_equation_type_id__once, unit_solve_equation_type_id);
	}
	return unit_solve_equation_type_id__once;
}

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);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

