/* a11y-profile-manager.c generated by valac 0.30.1, the Vala compiler
 * generated from a11y-profile-manager.vala, do not modify */

/* Copyright (C) 2016 Canonical Ltd.
 * Author: Luke Yelavich <luke.yelavich@canonical.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <a11y-profile-manager.h>
#include <stdio.h>
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include <config.h>
#include <gio/gio.h>

#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define __g_slist_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_slist_free__g_object_unref0_ (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))



void print_profile_list (gboolean detailed);
static void _g_object_unref0_ (gpointer var);
static void _g_slist_free__g_object_unref0_ (GSList* self);
gint _vala_main (gchar** args, int args_length1);


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


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


static void _g_slist_free__g_object_unref0_ (GSList* self) {
	g_slist_foreach (self, (GFunc) _g_object_unref0_, NULL);
	g_slist_free (self);
}


void print_profile_list (gboolean detailed) {
	GSList* profile_list = NULL;
	GSList* _tmp0_ = NULL;
	GSList* _tmp1_ = NULL;
	_tmp0_ = a11y_profile_manager_list_profiles ();
	profile_list = _tmp0_;
	_tmp1_ = profile_list;
	{
		GSList* profile_collection = NULL;
		GSList* profile_it = NULL;
		profile_collection = _tmp1_;
		for (profile_it = profile_collection; profile_it != NULL; profile_it = profile_it->next) {
			A11yProfileManagerProfile* _tmp2_ = NULL;
			A11yProfileManagerProfile* profile = NULL;
			_tmp2_ = _g_object_ref0 ((A11yProfileManagerProfile*) profile_it->data);
			profile = _tmp2_;
			{
				gboolean _tmp3_ = FALSE;
				_tmp3_ = detailed;
				if (_tmp3_) {
					FILE* _tmp4_ = NULL;
					const gchar* _tmp5_ = NULL;
					A11yProfileManagerProfile* _tmp6_ = NULL;
					const gchar* _tmp7_ = NULL;
					const gchar* _tmp8_ = NULL;
					FILE* _tmp9_ = NULL;
					const gchar* _tmp10_ = NULL;
					A11yProfileManagerProfile* _tmp11_ = NULL;
					const gchar* _tmp12_ = NULL;
					const gchar* _tmp13_ = NULL;
					FILE* _tmp14_ = NULL;
					const gchar* _tmp15_ = NULL;
					A11yProfileManagerProfile* _tmp16_ = NULL;
					const gchar* _tmp17_ = NULL;
					const gchar* _tmp18_ = NULL;
					FILE* _tmp19_ = NULL;
					_tmp4_ = stdout;
					_tmp5_ = _ ("Directory name: %s\n");
					_tmp6_ = profile;
					_tmp7_ = a11y_profile_manager_profile_get_dir_name (_tmp6_);
					_tmp8_ = _tmp7_;
					fprintf (_tmp4_, _tmp5_, _tmp8_);
					_tmp9_ = stdout;
					_tmp10_ = _ ("Name: %s\n");
					_tmp11_ = profile;
					_tmp12_ = a11y_profile_manager_profile_get_name (_tmp11_);
					_tmp13_ = _tmp12_;
					fprintf (_tmp9_, _tmp10_, _tmp13_);
					_tmp14_ = stdout;
					_tmp15_ = _ ("Description: %s\n");
					_tmp16_ = profile;
					_tmp17_ = a11y_profile_manager_profile_get_description (_tmp16_);
					_tmp18_ = _tmp17_;
					fprintf (_tmp14_, _tmp15_, _tmp18_);
					_tmp19_ = stdout;
					fprintf (_tmp19_, "\n");
				} else {
					FILE* _tmp20_ = NULL;
					A11yProfileManagerProfile* _tmp21_ = NULL;
					const gchar* _tmp22_ = NULL;
					const gchar* _tmp23_ = NULL;
					_tmp20_ = stdout;
					_tmp21_ = profile;
					_tmp22_ = a11y_profile_manager_profile_get_dir_name (_tmp21_);
					_tmp23_ = _tmp22_;
					fprintf (_tmp20_, "%s\n", _tmp23_);
				}
				_g_object_unref0 (profile);
			}
		}
	}
	__g_slist_free__g_object_unref0_0 (profile_list);
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	gboolean show_version = FALSE;
	gboolean list_profiles = FALSE;
	gboolean list_profiles_detailed = FALSE;
	gboolean get_active_profile = FALSE;
	gboolean deactivate_profile = FALSE;
	gchar* active_profile = NULL;
	gchar* profile_name = NULL;
	gchar* dconf_file = NULL;
	GOptionEntry version_option = {0};
	GOptionEntry _tmp0_ = {0};
	GOptionEntry list_option = {0};
	GOptionEntry _tmp1_ = {0};
	GOptionEntry detail_option = {0};
	GOptionEntry _tmp2_ = {0};
	GOptionEntry get_option = {0};
	GOptionEntry _tmp3_ = {0};
	GOptionEntry set_option = {0};
	GOptionEntry _tmp4_ = {0};
	GOptionEntry dconf_option = {0};
	GOptionEntry _tmp5_ = {0};
	GOptionEntry deact_option = {0};
	GOptionEntry _tmp6_ = {0};
	GOptionEntry nulloption = {0};
	GOptionEntry _tmp7_ = {0};
	GOptionEntry* options = NULL;
	GOptionEntry _tmp8_ = {0};
	GOptionEntry _tmp9_ = {0};
	GOptionEntry _tmp10_ = {0};
	GOptionEntry _tmp11_ = {0};
	GOptionEntry _tmp12_ = {0};
	GOptionEntry _tmp13_ = {0};
	GOptionEntry _tmp14_ = {0};
	GOptionEntry _tmp15_ = {0};
	GOptionEntry* _tmp16_ = NULL;
	gint options_length1 = 0;
	gint _options_size_ = 0;
	GOptionContext* context = NULL;
	const gchar* _tmp17_ = NULL;
	GOptionContext* _tmp18_ = NULL;
	GOptionContext* _tmp19_ = NULL;
	GOptionEntry* _tmp20_ = NULL;
	gint _tmp20__length1 = 0;
	gboolean _tmp30_ = FALSE;
	gboolean _tmp32_ = FALSE;
	gboolean _tmp33_ = FALSE;
	gboolean _tmp34_ = FALSE;
	gboolean _tmp45_ = FALSE;
	const gchar* _tmp68_ = NULL;
	GError * _inner_error_ = NULL;
	setlocale (LC_ALL, "");
	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	textdomain (GETTEXT_PACKAGE);
	show_version = FALSE;
	list_profiles = FALSE;
	list_profiles_detailed = FALSE;
	get_active_profile = FALSE;
	deactivate_profile = FALSE;
	active_profile = NULL;
	profile_name = NULL;
	dconf_file = NULL;
	_tmp0_.long_name = "version";
	_tmp0_.short_name = 'v';
	_tmp0_.flags = 0;
	_tmp0_.arg = G_OPTION_ARG_NONE;
	_tmp0_.arg_data = &show_version;
	_tmp0_.description = "Show release version";
	_tmp0_.arg_description = NULL;
	version_option = _tmp0_;
	_tmp1_.long_name = "list";
	_tmp1_.short_name = 'l';
	_tmp1_.flags = 0;
	_tmp1_.arg = G_OPTION_ARG_NONE;
	_tmp1_.arg_data = &list_profiles;
	_tmp1_.description = "List available accessibility profiles";
	_tmp1_.arg_description = NULL;
	list_option = _tmp1_;
	_tmp2_.long_name = "list-detailed";
	_tmp2_.short_name = 'L';
	_tmp2_.flags = 0;
	_tmp2_.arg = G_OPTION_ARG_NONE;
	_tmp2_.arg_data = &list_profiles_detailed;
	_tmp2_.description = "List available accessibility profiles with more detail";
	_tmp2_.arg_description = NULL;
	detail_option = _tmp2_;
	_tmp3_.long_name = "get";
	_tmp3_.short_name = 'g';
	_tmp3_.flags = 0;
	_tmp3_.arg = G_OPTION_ARG_NONE;
	_tmp3_.arg_data = &get_active_profile;
	_tmp3_.description = "Get the currently active profile";
	_tmp3_.arg_description = NULL;
	get_option = _tmp3_;
	_tmp4_.long_name = "set";
	_tmp4_.short_name = 's';
	_tmp4_.flags = 0;
	_tmp4_.arg = G_OPTION_ARG_STRING;
	_tmp4_.arg_data = &profile_name;
	_tmp4_.description = "Set the active profile, using its directory name, as shown with the -l" \
" or -L option output";
	_tmp4_.arg_description = "DIR";
	set_option = _tmp4_;
	_tmp5_.long_name = "dconf";
	_tmp5_.short_name = 'D';
	_tmp5_.flags = 0;
	_tmp5_.arg = G_OPTION_ARG_STRING;
	_tmp5_.arg_data = &dconf_file;
	_tmp5_.description = "Write profile settings to a file compatible with the dconf utility";
	_tmp5_.arg_description = "FILE";
	dconf_option = _tmp5_;
	_tmp6_.long_name = "deactivate";
	_tmp6_.short_name = 'd';
	_tmp6_.flags = 0;
	_tmp6_.arg = G_OPTION_ARG_NONE;
	_tmp6_.arg_data = &deactivate_profile;
	_tmp6_.description = "Deactivate the currently active profile";
	_tmp6_.arg_description = NULL;
	deact_option = _tmp6_;
	_tmp7_.long_name = NULL;
	nulloption = _tmp7_;
	_tmp8_ = version_option;
	_tmp9_ = list_option;
	_tmp10_ = detail_option;
	_tmp11_ = get_option;
	_tmp12_ = set_option;
	_tmp13_ = dconf_option;
	_tmp14_ = deact_option;
	_tmp15_ = nulloption;
	_tmp16_ = g_new0 (GOptionEntry, 8);
	_tmp16_[0] = _tmp8_;
	_tmp16_[1] = _tmp9_;
	_tmp16_[2] = _tmp10_;
	_tmp16_[3] = _tmp11_;
	_tmp16_[4] = _tmp12_;
	_tmp16_[5] = _tmp13_;
	_tmp16_[6] = _tmp14_;
	_tmp16_[7] = _tmp15_;
	options = _tmp16_;
	options_length1 = 8;
	_options_size_ = options_length1;
	_tmp17_ = _ ("- Accessibility Profile Manager");
	_tmp18_ = g_option_context_new (_tmp17_);
	context = _tmp18_;
	_tmp19_ = context;
	_tmp20_ = options;
	_tmp20__length1 = options_length1;
	g_option_context_add_main_entries (_tmp19_, _tmp20_, GETTEXT_PACKAGE);
	{
		GOptionContext* _tmp21_ = NULL;
		_tmp21_ = context;
		g_option_context_parse (_tmp21_, &args_length1, &args, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		FILE* _tmp22_ = NULL;
		GError* _tmp23_ = NULL;
		const gchar* _tmp24_ = NULL;
		FILE* _tmp25_ = NULL;
		const gchar* _tmp26_ = NULL;
		gchar** _tmp27_ = NULL;
		gint _tmp27__length1 = 0;
		const gchar* _tmp28_ = NULL;
		FILE* _tmp29_ = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp22_ = stderr;
		_tmp23_ = e;
		_tmp24_ = _tmp23_->message;
		fprintf (_tmp22_, "%s\n", _tmp24_);
		_tmp25_ = stderr;
		_tmp26_ = _ ("Run '%s --help' to see a full list of available command line options.");
		_tmp27_ = args;
		_tmp27__length1 = args_length1;
		_tmp28_ = _tmp27_[0];
		fprintf (_tmp25_, _tmp26_, _tmp28_);
		_tmp29_ = stderr;
		fprintf (_tmp29_, "\n");
		result = EXIT_FAILURE;
		_g_error_free0 (e);
		_g_option_context_free0 (context);
		options = (g_free (options), NULL);
		_g_free0 (dconf_file);
		_g_free0 (profile_name);
		_g_free0 (active_profile);
		return result;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_option_context_free0 (context);
		options = (g_free (options), NULL);
		_g_free0 (dconf_file);
		_g_free0 (profile_name);
		_g_free0 (active_profile);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return 0;
	}
	_tmp30_ = show_version;
	if (_tmp30_) {
		FILE* _tmp31_ = NULL;
		_tmp31_ = stderr;
		fprintf (_tmp31_, "accessibility-profile-manager %s\n", VERSION);
	}
	_tmp32_ = list_profiles;
	if (_tmp32_) {
		print_profile_list (FALSE);
	}
	_tmp33_ = list_profiles_detailed;
	if (_tmp33_) {
		print_profile_list (TRUE);
	}
	_tmp34_ = get_active_profile;
	if (_tmp34_) {
		GSettings* profile_settings = NULL;
		GSettings* _tmp35_ = NULL;
		GSettings* _tmp36_ = NULL;
		gchar* _tmp37_ = NULL;
		gboolean _tmp38_ = FALSE;
		const gchar* _tmp39_ = NULL;
		_tmp35_ = g_settings_new ("com.canonical.a11y-profile-manager");
		profile_settings = _tmp35_;
		_tmp36_ = profile_settings;
		_tmp37_ = g_settings_get_string (_tmp36_, "active-profile");
		_g_free0 (active_profile);
		active_profile = _tmp37_;
		_tmp39_ = active_profile;
		if (_tmp39_ != NULL) {
			const gchar* _tmp40_ = NULL;
			_tmp40_ = active_profile;
			_tmp38_ = g_strcmp0 (_tmp40_, "") != 0;
		} else {
			_tmp38_ = FALSE;
		}
		if (_tmp38_) {
			FILE* _tmp41_ = NULL;
			const gchar* _tmp42_ = NULL;
			_tmp41_ = stdout;
			_tmp42_ = active_profile;
			fprintf (_tmp41_, "%s\n", _tmp42_);
		} else {
			FILE* _tmp43_ = NULL;
			const gchar* _tmp44_ = NULL;
			_tmp43_ = stdout;
			_tmp44_ = _ ("There is currently no active profile set.\n");
			fprintf (_tmp43_, "%s", _tmp44_);
		}
		_g_object_unref0 (profile_settings);
	}
	_tmp45_ = deactivate_profile;
	if (_tmp45_) {
		GSettings* profile_settings = NULL;
		GSettings* _tmp46_ = NULL;
		GSettings* _tmp47_ = NULL;
		gchar* _tmp48_ = NULL;
		A11yProfileManagerProfile* profile = NULL;
		gboolean _tmp49_ = FALSE;
		const gchar* _tmp50_ = NULL;
		_tmp46_ = g_settings_new ("com.canonical.a11y-profile-manager");
		profile_settings = _tmp46_;
		_tmp47_ = profile_settings;
		_tmp48_ = g_settings_get_string (_tmp47_, "active-profile");
		_g_free0 (active_profile);
		active_profile = _tmp48_;
		profile = NULL;
		_tmp50_ = active_profile;
		if (_tmp50_ != NULL) {
			const gchar* _tmp51_ = NULL;
			_tmp51_ = active_profile;
			_tmp49_ = g_strcmp0 (_tmp51_, "") != 0;
		} else {
			_tmp49_ = FALSE;
		}
		if (_tmp49_) {
			const gchar* _tmp52_ = NULL;
			A11yProfileManagerProfile* _tmp53_ = NULL;
			gboolean _tmp54_ = FALSE;
			A11yProfileManagerProfile* _tmp55_ = NULL;
			GSettings* _tmp67_ = NULL;
			_tmp52_ = active_profile;
			_tmp53_ = a11y_profile_manager_get_profile_by_dir_name (_tmp52_);
			_g_object_unref0 (profile);
			profile = _tmp53_;
			_tmp55_ = profile;
			if (_tmp55_ != NULL) {
				A11yProfileManagerProfile* _tmp56_ = NULL;
				gboolean _tmp57_ = FALSE;
				gboolean _tmp58_ = FALSE;
				_tmp56_ = profile;
				_tmp57_ = a11y_profile_manager_profile_get_valid (_tmp56_);
				_tmp58_ = _tmp57_;
				_tmp54_ = _tmp58_;
			} else {
				_tmp54_ = FALSE;
			}
			if (_tmp54_) {
				{
					A11yProfileManagerProfile* _tmp59_ = NULL;
					_tmp59_ = profile;
					a11y_profile_manager_profile_reset_settings (_tmp59_, &_inner_error_);
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						goto __catch1_g_error;
					}
				}
				goto __finally1;
				__catch1_g_error:
				{
					GError* e = NULL;
					FILE* _tmp60_ = NULL;
					const gchar* _tmp61_ = NULL;
					A11yProfileManagerProfile* _tmp62_ = NULL;
					const gchar* _tmp63_ = NULL;
					const gchar* _tmp64_ = NULL;
					GError* _tmp65_ = NULL;
					const gchar* _tmp66_ = NULL;
					e = _inner_error_;
					_inner_error_ = NULL;
					_tmp60_ = stdout;
					_tmp61_ = _ ("Unable to reset the settings in the profile %s: %s");
					_tmp62_ = profile;
					_tmp63_ = a11y_profile_manager_profile_get_dir_name (_tmp62_);
					_tmp64_ = _tmp63_;
					_tmp65_ = e;
					_tmp66_ = _tmp65_->message;
					fprintf (_tmp60_, _tmp61_, _tmp64_, _tmp66_);
					result = EXIT_FAILURE;
					_g_error_free0 (e);
					_g_object_unref0 (profile);
					_g_object_unref0 (profile_settings);
					_g_option_context_free0 (context);
					options = (g_free (options), NULL);
					_g_free0 (dconf_file);
					_g_free0 (profile_name);
					_g_free0 (active_profile);
					return result;
				}
				__finally1:
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					_g_object_unref0 (profile);
					_g_object_unref0 (profile_settings);
					_g_option_context_free0 (context);
					options = (g_free (options), NULL);
					_g_free0 (dconf_file);
					_g_free0 (profile_name);
					_g_free0 (active_profile);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
					g_clear_error (&_inner_error_);
					return 0;
				}
			}
			_tmp67_ = profile_settings;
			g_settings_reset (_tmp67_, "active-profile");
			g_settings_sync ();
		}
		_g_object_unref0 (profile);
		_g_object_unref0 (profile_settings);
	}
	_tmp68_ = profile_name;
	if (_tmp68_ != NULL) {
		gboolean profile_set = FALSE;
		A11yProfileManagerProfile* profile = NULL;
		const gchar* _tmp69_ = NULL;
		A11yProfileManagerProfile* _tmp70_ = NULL;
		gboolean _tmp71_ = FALSE;
		gboolean _tmp72_ = FALSE;
		A11yProfileManagerProfile* _tmp73_ = NULL;
		gboolean _tmp94_ = FALSE;
		profile_set = FALSE;
		_tmp69_ = profile_name;
		_tmp70_ = a11y_profile_manager_get_profile_by_dir_name (_tmp69_);
		profile = _tmp70_;
		_tmp73_ = profile;
		if (_tmp73_ != NULL) {
			A11yProfileManagerProfile* _tmp74_ = NULL;
			gboolean _tmp75_ = FALSE;
			gboolean _tmp76_ = FALSE;
			_tmp74_ = profile;
			_tmp75_ = a11y_profile_manager_profile_get_valid (_tmp74_);
			_tmp76_ = _tmp75_;
			_tmp72_ = _tmp76_;
		} else {
			_tmp72_ = FALSE;
		}
		if (_tmp72_) {
			A11yProfileManagerProfile* _tmp77_ = NULL;
			const gchar* _tmp78_ = NULL;
			const gchar* _tmp79_ = NULL;
			const gchar* _tmp80_ = NULL;
			_tmp77_ = profile;
			_tmp78_ = a11y_profile_manager_profile_get_dir_name (_tmp77_);
			_tmp79_ = _tmp78_;
			_tmp80_ = profile_name;
			_tmp71_ = g_strcmp0 (_tmp79_, _tmp80_) == 0;
		} else {
			_tmp71_ = FALSE;
		}
		if (_tmp71_) {
			{
				gboolean _tmp81_ = FALSE;
				const gchar* _tmp82_ = NULL;
				_tmp82_ = dconf_file;
				if (_tmp82_ != NULL) {
					const gchar* _tmp83_ = NULL;
					_tmp83_ = dconf_file;
					_tmp81_ = g_strcmp0 (_tmp83_, "") != 0;
				} else {
					_tmp81_ = FALSE;
				}
				if (_tmp81_) {
					A11yProfileManagerProfile* _tmp84_ = NULL;
					const gchar* _tmp85_ = NULL;
					_tmp84_ = profile;
					_tmp85_ = dconf_file;
					a11y_profile_manager_profile_write_dconf_file (_tmp84_, _tmp85_, &_inner_error_);
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						goto __catch2_g_error;
					}
				} else {
					A11yProfileManagerProfile* _tmp86_ = NULL;
					_tmp86_ = profile;
					a11y_profile_manager_set_active_profile (_tmp86_, &_inner_error_);
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						goto __catch2_g_error;
					}
				}
			}
			goto __finally2;
			__catch2_g_error:
			{
				GError* e = NULL;
				FILE* _tmp87_ = NULL;
				const gchar* _tmp88_ = NULL;
				A11yProfileManagerProfile* _tmp89_ = NULL;
				const gchar* _tmp90_ = NULL;
				const gchar* _tmp91_ = NULL;
				GError* _tmp92_ = NULL;
				const gchar* _tmp93_ = NULL;
				e = _inner_error_;
				_inner_error_ = NULL;
				_tmp87_ = stderr;
				_tmp88_ = _ ("The profile %s cannot be set as the active profile: %s");
				_tmp89_ = profile;
				_tmp90_ = a11y_profile_manager_profile_get_dir_name (_tmp89_);
				_tmp91_ = _tmp90_;
				_tmp92_ = e;
				_tmp93_ = _tmp92_->message;
				fprintf (_tmp87_, _tmp88_, _tmp91_, _tmp93_);
				result = EXIT_FAILURE;
				_g_error_free0 (e);
				_g_object_unref0 (profile);
				_g_option_context_free0 (context);
				options = (g_free (options), NULL);
				_g_free0 (dconf_file);
				_g_free0 (profile_name);
				_g_free0 (active_profile);
				return result;
			}
			__finally2:
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				_g_object_unref0 (profile);
				_g_option_context_free0 (context);
				options = (g_free (options), NULL);
				_g_free0 (dconf_file);
				_g_free0 (profile_name);
				_g_free0 (active_profile);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return 0;
			}
			profile_set = TRUE;
		}
		_tmp94_ = profile_set;
		if (!_tmp94_) {
			FILE* _tmp95_ = NULL;
			const gchar* _tmp96_ = NULL;
			const gchar* _tmp97_ = NULL;
			_tmp95_ = stderr;
			_tmp96_ = _ ("The profile %s cannot be found in the list of available accessibility " \
"profiles.\n");
			_tmp97_ = active_profile;
			fprintf (_tmp95_, _tmp96_, _tmp97_);
			result = EXIT_FAILURE;
			_g_object_unref0 (profile);
			_g_option_context_free0 (context);
			options = (g_free (options), NULL);
			_g_free0 (dconf_file);
			_g_free0 (profile_name);
			_g_free0 (active_profile);
			return result;
		}
		_g_object_unref0 (profile);
	}
	result = EXIT_SUCCESS;
	_g_option_context_free0 (context);
	options = (g_free (options), NULL);
	_g_free0 (dconf_file);
	_g_free0 (profile_name);
	_g_free0 (active_profile);
	return result;
}


int main (int argc, char ** argv) {
#if !GLIB_CHECK_VERSION (2,35,0)
	g_type_init ();
#endif
	return _vala_main (argv, argc);
}



