/* gcp-c-compile-args.c generated by valac 0.17.4.20-387e, the Vala compiler
 * generated from gcp-c-compile-args.vala, do not modify */

/*
 * This file is part of gedit-code-assistant.
 *
 * Copyright (C) 2011 - Jesse van den Kieboom
 *
 * gedit-code-assistant 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.
 *
 * gedit-code-assistant 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 gedit-code-assistant.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <gee.h>
#include <gio/gio.h>
#include <gcp.h>
#include <stdlib.h>
#include <string.h>
#include <config.h>
#include <stdio.h>
#include <gobject/gvaluecollector.h>


#define GCP_C_TYPE_COMPILE_ARGS (gcp_c_compile_args_get_type ())
#define GCP_C_COMPILE_ARGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCP_C_TYPE_COMPILE_ARGS, GcpCCompileArgs))
#define GCP_C_COMPILE_ARGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCP_C_TYPE_COMPILE_ARGS, GcpCCompileArgsClass))
#define GCP_C_IS_COMPILE_ARGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCP_C_TYPE_COMPILE_ARGS))
#define GCP_C_IS_COMPILE_ARGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCP_C_TYPE_COMPILE_ARGS))
#define GCP_C_COMPILE_ARGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCP_C_TYPE_COMPILE_ARGS, GcpCCompileArgsClass))

typedef struct _GcpCCompileArgs GcpCCompileArgs;
typedef struct _GcpCCompileArgsClass GcpCCompileArgsClass;
typedef struct _GcpCCompileArgsPrivate GcpCCompileArgsPrivate;

#define GCP_C_COMPILE_ARGS_TYPE_CACHE (gcp_c_compile_args_cache_get_type ())
#define GCP_C_COMPILE_ARGS_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCP_C_COMPILE_ARGS_TYPE_CACHE, GcpCCompileArgsCache))
#define GCP_C_COMPILE_ARGS_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCP_C_COMPILE_ARGS_TYPE_CACHE, GcpCCompileArgsCacheClass))
#define GCP_C_COMPILE_ARGS_IS_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCP_C_COMPILE_ARGS_TYPE_CACHE))
#define GCP_C_COMPILE_ARGS_IS_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCP_C_COMPILE_ARGS_TYPE_CACHE))
#define GCP_C_COMPILE_ARGS_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCP_C_COMPILE_ARGS_TYPE_CACHE, GcpCCompileArgsCacheClass))

typedef struct _GcpCCompileArgsCache GcpCCompileArgsCache;
typedef struct _GcpCCompileArgsCacheClass GcpCCompileArgsCacheClass;

#define GCP_C_COMPILE_ARGS_TYPE_MAKEFILE (gcp_c_compile_args_makefile_get_type ())
#define GCP_C_COMPILE_ARGS_MAKEFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCP_C_COMPILE_ARGS_TYPE_MAKEFILE, GcpCCompileArgsMakefile))
#define GCP_C_COMPILE_ARGS_MAKEFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCP_C_COMPILE_ARGS_TYPE_MAKEFILE, GcpCCompileArgsMakefileClass))
#define GCP_C_COMPILE_ARGS_IS_MAKEFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCP_C_COMPILE_ARGS_TYPE_MAKEFILE))
#define GCP_C_COMPILE_ARGS_IS_MAKEFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCP_C_COMPILE_ARGS_TYPE_MAKEFILE))
#define GCP_C_COMPILE_ARGS_MAKEFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCP_C_COMPILE_ARGS_TYPE_MAKEFILE, GcpCCompileArgsMakefileClass))

typedef struct _GcpCCompileArgsMakefile GcpCCompileArgsMakefile;
typedef struct _GcpCCompileArgsMakefileClass GcpCCompileArgsMakefileClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_match_info_free0(var) ((var == NULL) ? NULL : (var = (g_match_info_free (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
typedef struct _Block2Data Block2Data;
#define _gcp_c_compile_args_makefile_unref0(var) ((var == NULL) ? NULL : (var = (gcp_c_compile_args_makefile_unref (var), NULL)))
typedef struct _GcpCCompileArgsMakefileChangedAsyncData GcpCCompileArgsMakefileChangedAsyncData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _gcp_c_compile_args_cache_unref0(var) ((var == NULL) ? NULL : (var = (gcp_c_compile_args_cache_unref (var), NULL)))
typedef struct _Block3Data Block3Data;
typedef struct _Block4Data Block4Data;
typedef struct _GcpCCompileArgsFindAsyncData GcpCCompileArgsFindAsyncData;
typedef struct _GcpCCompileArgsCachePrivate GcpCCompileArgsCachePrivate;
typedef struct _GcpCCompileArgsParamSpecCache GcpCCompileArgsParamSpecCache;
typedef struct _GcpCCompileArgsMakefilePrivate GcpCCompileArgsMakefilePrivate;
typedef struct _GcpCCompileArgsParamSpecMakefile GcpCCompileArgsParamSpecMakefile;

typedef enum  {
	GCP_C_COMPILE_ARGS_ERROR_MISSING_MAKEFILE,
	GCP_C_COMPILE_ARGS_ERROR_MISSING_TARGET,
	GCP_C_COMPILE_ARGS_ERROR_MISSING_MAKE_OUTPUT
} GcpCCompileArgsError;
#define GCP_C_COMPILE_ARGS_ERROR gcp_c_compile_args_error_quark ()
struct _GcpCCompileArgs {
	GObject parent_instance;
	GcpCCompileArgsPrivate * priv;
};

struct _GcpCCompileArgsClass {
	GObjectClass parent_class;
};

struct _GcpCCompileArgsPrivate {
	GeeHashMap* d_argsCache;
	GStaticRecMutex __lock_d_argsCache;
	GeeHashMap* d_makefileCache;
	GStaticRecMutex __lock_d_makefileCache;
};

struct _Block2Data {
	int _ref_count_;
	GcpCCompileArgs * self;
	GcpCCompileArgsMakefile* makefile;
	gpointer _async_data_;
};

struct _GcpCCompileArgsMakefileChangedAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GcpCCompileArgs* self;
	GcpCCompileArgsMakefile* makefile;
	Block2Data* _data2_;
	GcpCCompileArgsMakefile* _tmp0_;
	GThreadFunc func;
	void* func_target;
	GDestroyNotify func_target_destroy_notify;
	GError * _inner_error_;
};

struct _Block3Data {
	int _ref_count_;
	GcpCCompileArgs * self;
	GFile* file;
};

struct _Block4Data {
	int _ref_count_;
	GcpCCompileArgs * self;
	GFile* file;
	gpointer _async_data_;
};

struct _GcpCCompileArgsFindAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GcpCCompileArgs* self;
	GFile* file;
	Block4Data* _data4_;
	GFile* _tmp0_;
	GThreadFunc func;
	void* func_target;
	GDestroyNotify func_target_destroy_notify;
	GError * _inner_error_;
};

struct _GcpCCompileArgsCache {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GcpCCompileArgsCachePrivate * priv;
};

struct _GcpCCompileArgsCacheClass {
	GTypeClass parent_class;
	void (*finalize) (GcpCCompileArgsCache *self);
};

struct _GcpCCompileArgsCachePrivate {
	GFile* d_source;
	GFile* d_makefile;
	gchar** d_args;
	gint d_args_length1;
	gint _d_args_size_;
};

struct _GcpCCompileArgsParamSpecCache {
	GParamSpec parent_instance;
};

struct _GcpCCompileArgsMakefile {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GcpCCompileArgsMakefilePrivate * priv;
};

struct _GcpCCompileArgsMakefileClass {
	GTypeClass parent_class;
	void (*finalize) (GcpCCompileArgsMakefile *self);
};

struct _GcpCCompileArgsMakefilePrivate {
	GFile* d_file;
	GeeArrayList* d_sources;
	GFileMonitor* d_monitor;
	guint d_timeoutid;
};

struct _GcpCCompileArgsParamSpecMakefile {
	GParamSpec parent_instance;
};


static gpointer gcp_c_compile_args_parent_class = NULL;
static gpointer gcp_c_compile_args_cache_parent_class = NULL;
static GType gcp_c_compile_args_cache_type_id = 0;
static gpointer gcp_c_compile_args_makefile_parent_class = NULL;
static GType gcp_c_compile_args_makefile_type_id = 0;
static GType gcp_c_compile_args_type_id = 0;

GQuark gcp_c_compile_args_error_quark (void);
GType gcp_c_compile_args_get_type (void) G_GNUC_CONST;
GType gcp_c_compile_args_register_type (GTypeModule * module);
static gpointer gcp_c_compile_args_cache_ref (gpointer instance);
static void gcp_c_compile_args_cache_unref (gpointer instance);
static GParamSpec* gcp_c_compile_args_param_spec_cache (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void gcp_c_compile_args_value_set_cache (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void gcp_c_compile_args_value_take_cache (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer gcp_c_compile_args_value_get_cache (const GValue* value) G_GNUC_UNUSED;
GType gcp_c_compile_args_cache_get_type (void) G_GNUC_CONST;
GType gcp_c_compile_args_cache_register_type (GTypeModule * module);
static gpointer gcp_c_compile_args_makefile_ref (gpointer instance);
static void gcp_c_compile_args_makefile_unref (gpointer instance);
static GParamSpec* gcp_c_compile_args_param_spec_makefile (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void gcp_c_compile_args_value_set_makefile (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void gcp_c_compile_args_value_take_makefile (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer gcp_c_compile_args_value_get_makefile (const GValue* value) G_GNUC_UNUSED;
GType gcp_c_compile_args_makefile_get_type (void) G_GNUC_CONST;
GType gcp_c_compile_args_makefile_register_type (GTypeModule * module);
#define GCP_C_COMPILE_ARGS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCP_C_TYPE_COMPILE_ARGS, GcpCCompileArgsPrivate))
enum  {
	GCP_C_COMPILE_ARGS_DUMMY_PROPERTY
};
static GFile* gcp_c_compile_args_makefile_for (GcpCCompileArgs* self, GFile* file, GCancellable* cancellable, GError** error);
static gchar* gcp_c_compile_args_target_from_make (GcpCCompileArgs* self, GFile* makefile, GFile* source, GError** error);
static gchar* gcp_c_compile_args_resolve_relative (GcpCCompileArgs* self, GFile* makefile, GFile* source, const gchar* path);
static gchar** gcp_c_compile_args_filter_flags (GcpCCompileArgs* self, GFile* makefile, GFile* source, gchar** args, int args_length1, int* result_length1);
static gchar** gcp_c_compile_args_flags_from_target (GcpCCompileArgs* self, GFile* makefile, GFile* source, const gchar* target, int* result_length1, GError** error);
static void gcp_c_compile_args_makefile_changed_async_data_free (gpointer _data);
static void gcp_c_compile_args_makefile_changed_async (GcpCCompileArgs* self, GcpCCompileArgsMakefile* makefile, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void gcp_c_compile_args_makefile_changed_finish (GcpCCompileArgs* self, GAsyncResult* _res_);
static gboolean gcp_c_compile_args_makefile_changed_async_co (GcpCCompileArgsMakefileChangedAsyncData* _data_);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static void* __lambda2_ (Block2Data* _data2_);
static GeeArrayList* gcp_c_compile_args_makefile_get_sources (GcpCCompileArgsMakefile* self);
static void gcp_c_compile_args_find_for_makefile (GcpCCompileArgs* self, GFile* makefile, GFile* file);
static GFile* gcp_c_compile_args_makefile_get_file (GcpCCompileArgsMakefile* self);
static gpointer ___lambda2__gthread_func (gpointer self);
static void gcp_c_compile_args_on_makefile_changed (GcpCCompileArgs* self, GcpCCompileArgsMakefile* makefile);
static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value);
static void gcp_c_compile_args_cache_set_args (GcpCCompileArgsCache* self, gchar** value, int value_length1);
static GcpCCompileArgsCache* gcp_c_compile_args_cache_new (GFile* source, GFile* makefile, gchar** args, int args_length1);
static GcpCCompileArgsCache* gcp_c_compile_args_cache_construct (GType object_type, GFile* source, GFile* makefile, gchar** args, int args_length1);
static GcpCCompileArgsMakefile* gcp_c_compile_args_makefile_new (GFile* file);
static GcpCCompileArgsMakefile* gcp_c_compile_args_makefile_construct (GType object_type, GFile* file);
static void gcp_c_compile_args_makefile_add (GcpCCompileArgsMakefile* self, GFile* source);
static void _gcp_c_compile_args_on_makefile_changed_gcp_c_compile_args_makefile_changed (GcpCCompileArgsMakefile* _sender, gpointer self);
static void gcp_c_compile_args_changed_in_idle (GcpCCompileArgs* self, GFile* file);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static gboolean __lambda3_ (Block3Data* _data3_);
static gboolean ___lambda3__gsource_func (gpointer self);
static void gcp_c_compile_args_find_async_data_free (gpointer _data);
static void gcp_c_compile_args_find_async (GcpCCompileArgs* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void gcp_c_compile_args_find_finish (GcpCCompileArgs* self, GAsyncResult* _res_);
static gboolean gcp_c_compile_args_find_async_co (GcpCCompileArgsFindAsyncData* _data_);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
static void* __lambda4_ (Block4Data* _data4_);
static gpointer ___lambda4__gthread_func (gpointer self);
gchar** gcp_c_compile_args_get (GcpCCompileArgs* self, GFile* file, int* result_length1);
static gchar** gcp_c_compile_args_cache_get_args (GcpCCompileArgsCache* self, int* result_length1);
static gchar** _vala_array_dup1 (gchar** self, int length);
void gcp_c_compile_args_monitor (GcpCCompileArgs* self, GFile* file);
static void ___lambda5_ (GcpCCompileArgs* self, GObject* source, GAsyncResult* res);
static void ____lambda5__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
void gcp_c_compile_args_remove_monitor (GcpCCompileArgs* self, GFile* file);
static GFile* gcp_c_compile_args_cache_get_makefile (GcpCCompileArgsCache* self);
static gboolean gcp_c_compile_args_makefile_remove (GcpCCompileArgsMakefile* self, GFile* source);
GcpCCompileArgs* gcp_c_compile_args_new (void);
GcpCCompileArgs* gcp_c_compile_args_construct (GType object_type);
static GObject * gcp_c_compile_args_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static guint _g_file_hash_ghash_func (gconstpointer key);
#define GCP_C_COMPILE_ARGS_CACHE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCP_C_COMPILE_ARGS_TYPE_CACHE, GcpCCompileArgsCachePrivate))
enum  {
	GCP_C_COMPILE_ARGS_CACHE_DUMMY_PROPERTY
};
static gchar** _vala_array_dup2 (gchar** self, int length);
static GFile* gcp_c_compile_args_cache_get_source (GcpCCompileArgsCache* self);
static gchar** _vala_array_dup3 (gchar** self, int length);
static void gcp_c_compile_args_cache_finalize (GcpCCompileArgsCache* obj);
#define GCP_C_COMPILE_ARGS_MAKEFILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCP_C_COMPILE_ARGS_TYPE_MAKEFILE, GcpCCompileArgsMakefilePrivate))
enum  {
	GCP_C_COMPILE_ARGS_MAKEFILE_DUMMY_PROPERTY
};
static void gcp_c_compile_args_makefile_on_makefile_changed (GcpCCompileArgsMakefile* self, GFile* file, GFile* other, GFileMonitorEvent event_type);
static void _gcp_c_compile_args_makefile_on_makefile_changed_g_file_monitor_changed (GFileMonitor* _sender, GFile* file, GFile* other_file, GFileMonitorEvent event_type, gpointer self);
static gboolean gcp_c_compile_args_makefile_on_makefile_timeout (GcpCCompileArgsMakefile* self);
static gboolean _gcp_c_compile_args_makefile_on_makefile_timeout_gsource_func (gpointer self);
static gboolean gcp_c_compile_args_makefile_get_valid (GcpCCompileArgsMakefile* self);
static void gcp_c_compile_args_makefile_finalize (GcpCCompileArgsMakefile* obj);
static void gcp_c_compile_args_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


GQuark gcp_c_compile_args_error_quark (void) {
	return g_quark_from_static_string ("gcp_c_compile_args_error-quark");
}


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


static GFile* gcp_c_compile_args_makefile_for (GcpCCompileArgs* self, GFile* file, GCancellable* cancellable, GError** error) {
	GFile* result = NULL;
	GFile* ret;
	GFile* _tmp0_;
	GFile* _tmp1_ = NULL;
	GFile* par;
	GFile* _tmp15_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (file != NULL, NULL);
	ret = NULL;
	_tmp0_ = file;
	_tmp1_ = g_file_get_parent (_tmp0_);
	par = _tmp1_;
	while (TRUE) {
		gboolean _tmp2_ = FALSE;
		GFile* _tmp3_;
		gboolean _tmp5_;
		GFile* _tmp6_;
		GFile* _tmp7_ = NULL;
		GFile* makefile;
		GFile* _tmp8_;
		GCancellable* _tmp9_;
		gboolean _tmp10_ = FALSE;
		GFile* _tmp13_;
		GFile* _tmp14_ = NULL;
		_tmp3_ = par;
		if (_tmp3_ != NULL) {
			GFile* _tmp4_;
			_tmp4_ = ret;
			_tmp2_ = _tmp4_ == NULL;
		} else {
			_tmp2_ = FALSE;
		}
		_tmp5_ = _tmp2_;
		if (!_tmp5_) {
			break;
		}
		_tmp6_ = par;
		_tmp7_ = g_file_get_child (_tmp6_, "Makefile");
		makefile = _tmp7_;
		_tmp8_ = makefile;
		_tmp9_ = cancellable;
		_tmp10_ = g_file_query_exists (_tmp8_, _tmp9_);
		if (_tmp10_) {
			GFile* _tmp11_;
			GFile* _tmp12_;
			_tmp11_ = makefile;
			_tmp12_ = _g_object_ref0 (_tmp11_);
			_g_object_unref0 (ret);
			ret = _tmp12_;
		}
		_tmp13_ = par;
		_tmp14_ = g_file_get_parent (_tmp13_);
		_g_object_unref0 (par);
		par = _tmp14_;
		_g_object_unref0 (makefile);
	}
	_tmp15_ = ret;
	if (_tmp15_ != NULL) {
		GFile* _tmp16_;
		gchar* _tmp17_ = NULL;
		gchar* _tmp18_;
		GFile* _tmp19_;
		gchar* _tmp20_ = NULL;
		gchar* _tmp21_;
		_tmp16_ = file;
		_tmp17_ = g_file_get_path (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = ret;
		_tmp20_ = g_file_get_path (_tmp19_);
		_tmp21_ = _tmp20_;
		gcp_log_debug ("gcp-c-compile-args.vala:198: Resolved makefile for `%s': `%s'", _tmp18_, _tmp21_);
		_g_free0 (_tmp21_);
		_g_free0 (_tmp18_);
	}
	result = ret;
	_g_object_unref0 (par);
	return result;
}


static gint string_last_index_of_char (const gchar* self, gunichar c, gint start_index) {
	gint result = 0;
	gint _tmp0_;
	gunichar _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* _result_;
	gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = start_index;
	_tmp1_ = c;
	_tmp2_ = g_utf8_strrchr (((gchar*) self) + _tmp0_, (gssize) (-1), _tmp1_);
	_result_ = _tmp2_;
	_tmp3_ = _result_;
	if (_tmp3_ != NULL) {
		gchar* _tmp4_;
		_tmp4_ = _result_;
		result = (gint) (_tmp4_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* _tmp0_;
	glong _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* end;
	gchar* _tmp3_;
	_tmp0_ = str;
	_tmp1_ = maxlen;
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
	end = _tmp2_;
	_tmp3_ = end;
	if (_tmp3_ == NULL) {
		glong _tmp4_;
		_tmp4_ = maxlen;
		result = _tmp4_;
		return result;
	} else {
		gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp5_ = end;
		_tmp6_ = str;
		result = (glong) (_tmp5_ - _tmp6_);
		return result;
	}
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_;
	gboolean _tmp3_;
	glong _tmp9_;
	glong _tmp15_;
	glong _tmp18_;
	glong _tmp19_;
	glong _tmp20_;
	glong _tmp21_;
	glong _tmp22_;
	gchar* _tmp23_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = offset;
	if (_tmp1_ >= ((glong) 0)) {
		glong _tmp2_;
		_tmp2_ = len;
		_tmp0_ = _tmp2_ >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	_tmp3_ = _tmp0_;
	if (_tmp3_) {
		glong _tmp4_;
		glong _tmp5_;
		glong _tmp6_ = 0L;
		_tmp4_ = offset;
		_tmp5_ = len;
		_tmp6_ = string_strnlen ((gchar*) self, _tmp4_ + _tmp5_);
		string_length = _tmp6_;
	} else {
		gint _tmp7_;
		gint _tmp8_;
		_tmp7_ = strlen (self);
		_tmp8_ = _tmp7_;
		string_length = (glong) _tmp8_;
	}
	_tmp9_ = offset;
	if (_tmp9_ < ((glong) 0)) {
		glong _tmp10_;
		glong _tmp11_;
		glong _tmp12_;
		_tmp10_ = string_length;
		_tmp11_ = offset;
		offset = _tmp10_ + _tmp11_;
		_tmp12_ = offset;
		g_return_val_if_fail (_tmp12_ >= ((glong) 0), NULL);
	} else {
		glong _tmp13_;
		glong _tmp14_;
		_tmp13_ = offset;
		_tmp14_ = string_length;
		g_return_val_if_fail (_tmp13_ <= _tmp14_, NULL);
	}
	_tmp15_ = len;
	if (_tmp15_ < ((glong) 0)) {
		glong _tmp16_;
		glong _tmp17_;
		_tmp16_ = string_length;
		_tmp17_ = offset;
		len = _tmp16_ - _tmp17_;
	}
	_tmp18_ = offset;
	_tmp19_ = len;
	_tmp20_ = string_length;
	g_return_val_if_fail ((_tmp18_ + _tmp19_) <= _tmp20_, NULL);
	_tmp21_ = offset;
	_tmp22_ = len;
	_tmp23_ = g_strndup (((gchar*) self) + _tmp21_, (gsize) _tmp22_);
	result = _tmp23_;
	return result;
}


static gchar* gcp_c_compile_args_target_from_make (GcpCCompileArgs* self, GFile* makefile, GFile* source, GError** error) {
	gchar* result = NULL;
	GFile* _tmp0_;
	GFile* _tmp1_ = NULL;
	GFile* wd;
	GFile* _tmp2_;
	gchar* _tmp3_ = NULL;
	gchar* basen;
	const gchar* _tmp4_;
	gint _tmp5_ = 0;
	gint idx;
	gchar* noext = NULL;
	gint _tmp6_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar** _tmp15_ = NULL;
	gchar** args;
	gint args_length1;
	gint _args_size_;
	gchar* outstr = NULL;
	GFile* _tmp16_;
	gchar* _tmp17_ = NULL;
	gchar* _tmp18_;
	gchar** _tmp19_;
	gint _tmp19__length1;
	gchar* _tmp20_ = NULL;
	const gchar* _tmp21_;
	gchar* _tmp22_ = NULL;
	gchar* _tmp23_;
	gchar* _tmp24_ = NULL;
	gchar* _tmp25_;
	gchar* prefreg;
	gchar* _tmp26_;
	gchar* preflessreg;
	const gchar* _tmp27_;
	gchar* _tmp28_ = NULL;
	gchar* _tmp29_;
	gchar* _tmp30_ = NULL;
	gchar* _tmp31_;
	gchar* reg;
	const gchar* _tmp32_;
	GRegex* _tmp33_;
	GRegex* regex;
	GMatchInfo* info = NULL;
	GRegex* _tmp34_;
	const gchar* _tmp35_;
	GMatchInfo* _tmp36_ = NULL;
	gboolean _tmp37_ = FALSE;
	const gchar* _tmp56_;
	gchar* _tmp57_ = NULL;
	gchar* _tmp58_;
	GError* _tmp59_;
	GError* _tmp60_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (makefile != NULL, NULL);
	g_return_val_if_fail (source != NULL, NULL);
	_tmp0_ = makefile;
	_tmp1_ = g_file_get_parent (_tmp0_);
	wd = _tmp1_;
	_tmp2_ = source;
	_tmp3_ = g_file_get_basename (_tmp2_);
	basen = _tmp3_;
	_tmp4_ = basen;
	_tmp5_ = string_last_index_of_char (_tmp4_, (gunichar) '.', 0);
	idx = _tmp5_;
	_tmp6_ = idx;
	if (_tmp6_ >= 0) {
		const gchar* _tmp7_;
		gint _tmp8_;
		gchar* _tmp9_ = NULL;
		_tmp7_ = basen;
		_tmp8_ = idx;
		_tmp9_ = string_substring (_tmp7_, (glong) 0, (glong) _tmp8_);
		_g_free0 (noext);
		noext = _tmp9_;
	} else {
		const gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp10_ = basen;
		_tmp11_ = g_strdup (_tmp10_);
		_g_free0 (noext);
		noext = _tmp11_;
	}
	_tmp12_ = g_strdup ("make");
	_tmp13_ = g_strdup ("-p");
	_tmp14_ = g_strdup ("-n");
	_tmp15_ = g_new0 (gchar*, 4 + 1);
	_tmp15_[0] = _tmp12_;
	_tmp15_[1] = _tmp13_;
	_tmp15_[2] = _tmp14_;
	_tmp15_[3] = NULL;
	args = _tmp15_;
	args_length1 = 4;
	_args_size_ = args_length1;
	_tmp16_ = wd;
	_tmp17_ = g_file_get_path (_tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = args;
	_tmp19__length1 = args_length1;
	g_spawn_sync (_tmp18_, _tmp19_, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, &_tmp20_, NULL, NULL, &_inner_error_);
	_g_free0 (outstr);
	outstr = _tmp20_;
	_g_free0 (_tmp18_);
	if (_inner_error_ != NULL) {
		if (((_inner_error_->domain == G_SPAWN_ERROR) || (_inner_error_->domain == G_REGEX_ERROR)) || (_inner_error_->domain == GCP_C_COMPILE_ARGS_ERROR)) {
			g_propagate_error (error, _inner_error_);
			_g_free0 (outstr);
			args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (noext);
			_g_free0 (basen);
			_g_object_unref0 (wd);
			return NULL;
		} else {
			_g_free0 (outstr);
			args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (noext);
			_g_free0 (basen);
			_g_object_unref0 (wd);
			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 NULL;
		}
	}
	_tmp21_ = noext;
	_tmp22_ = g_regex_escape_string (_tmp21_, -1);
	_tmp23_ = _tmp22_;
	_tmp24_ = g_strdup_printf ("^([^:]*(%s\\.(o|lo)))$", _tmp23_);
	_tmp25_ = _tmp24_;
	_g_free0 (_tmp23_);
	prefreg = _tmp25_;
	_tmp26_ = g_strdup ("^[a-z]+$");
	preflessreg = _tmp26_;
	_tmp27_ = basen;
	_tmp28_ = g_regex_escape_string (_tmp27_, -1);
	_tmp29_ = _tmp28_;
	_tmp30_ = g_strdup_printf ("^([^:\n]*):.*%s", _tmp29_);
	_tmp31_ = _tmp30_;
	_g_free0 (_tmp29_);
	reg = _tmp31_;
	_tmp32_ = reg;
	_tmp33_ = g_regex_new (_tmp32_, G_REGEX_MULTILINE, 0, &_inner_error_);
	regex = _tmp33_;
	if (_inner_error_ != NULL) {
		if (((_inner_error_->domain == G_SPAWN_ERROR) || (_inner_error_->domain == G_REGEX_ERROR)) || (_inner_error_->domain == GCP_C_COMPILE_ARGS_ERROR)) {
			g_propagate_error (error, _inner_error_);
			_g_free0 (reg);
			_g_free0 (preflessreg);
			_g_free0 (prefreg);
			_g_free0 (outstr);
			args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (noext);
			_g_free0 (basen);
			_g_object_unref0 (wd);
			return NULL;
		} else {
			_g_free0 (reg);
			_g_free0 (preflessreg);
			_g_free0 (prefreg);
			_g_free0 (outstr);
			args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (noext);
			_g_free0 (basen);
			_g_object_unref0 (wd);
			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 NULL;
		}
	}
	_tmp34_ = regex;
	_tmp35_ = outstr;
	_tmp37_ = g_regex_match (_tmp34_, _tmp35_, 0, &_tmp36_);
	_g_match_info_free0 (info);
	info = _tmp36_;
	if (_tmp37_) {
		const gchar* _tmp38_;
		GRegex* _tmp39_;
		GRegex* preg;
		const gchar* _tmp40_;
		GRegex* _tmp41_;
		GRegex* lreg;
		gchar* lastmatch;
		const gchar* _tmp55_;
		_tmp38_ = prefreg;
		_tmp39_ = g_regex_new (_tmp38_, 0, 0, &_inner_error_);
		preg = _tmp39_;
		if (_inner_error_ != NULL) {
			if (((_inner_error_->domain == G_SPAWN_ERROR) || (_inner_error_->domain == G_REGEX_ERROR)) || (_inner_error_->domain == GCP_C_COMPILE_ARGS_ERROR)) {
				g_propagate_error (error, _inner_error_);
				_g_match_info_free0 (info);
				_g_regex_unref0 (regex);
				_g_free0 (reg);
				_g_free0 (preflessreg);
				_g_free0 (prefreg);
				_g_free0 (outstr);
				args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (noext);
				_g_free0 (basen);
				_g_object_unref0 (wd);
				return NULL;
			} else {
				_g_match_info_free0 (info);
				_g_regex_unref0 (regex);
				_g_free0 (reg);
				_g_free0 (preflessreg);
				_g_free0 (prefreg);
				_g_free0 (outstr);
				args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (noext);
				_g_free0 (basen);
				_g_object_unref0 (wd);
				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 NULL;
			}
		}
		_tmp40_ = preflessreg;
		_tmp41_ = g_regex_new (_tmp40_, 0, 0, &_inner_error_);
		lreg = _tmp41_;
		if (_inner_error_ != NULL) {
			if (((_inner_error_->domain == G_SPAWN_ERROR) || (_inner_error_->domain == G_REGEX_ERROR)) || (_inner_error_->domain == GCP_C_COMPILE_ARGS_ERROR)) {
				g_propagate_error (error, _inner_error_);
				_g_regex_unref0 (preg);
				_g_match_info_free0 (info);
				_g_regex_unref0 (regex);
				_g_free0 (reg);
				_g_free0 (preflessreg);
				_g_free0 (prefreg);
				_g_free0 (outstr);
				args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (noext);
				_g_free0 (basen);
				_g_object_unref0 (wd);
				return NULL;
			} else {
				_g_regex_unref0 (preg);
				_g_match_info_free0 (info);
				_g_regex_unref0 (regex);
				_g_free0 (reg);
				_g_free0 (preflessreg);
				_g_free0 (prefreg);
				_g_free0 (outstr);
				args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (noext);
				_g_free0 (basen);
				_g_object_unref0 (wd);
				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 NULL;
			}
		}
		lastmatch = NULL;
		while (TRUE) {
			GMatchInfo* _tmp42_;
			gchar* _tmp43_ = NULL;
			gchar* target;
			GRegex* _tmp44_;
			const gchar* _tmp45_;
			gboolean _tmp46_ = FALSE;
			GMatchInfo* _tmp52_;
			gboolean _tmp53_ = FALSE;
			gboolean _tmp54_;
			_tmp42_ = info;
			_tmp43_ = g_match_info_fetch (_tmp42_, 1);
			target = _tmp43_;
			_tmp44_ = preg;
			_tmp45_ = target;
			_tmp46_ = g_regex_match (_tmp44_, _tmp45_, 0, NULL);
			if (_tmp46_) {
				result = target;
				_g_free0 (lastmatch);
				_g_regex_unref0 (lreg);
				_g_regex_unref0 (preg);
				_g_match_info_free0 (info);
				_g_regex_unref0 (regex);
				_g_free0 (reg);
				_g_free0 (preflessreg);
				_g_free0 (prefreg);
				_g_free0 (outstr);
				args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (noext);
				_g_free0 (basen);
				_g_object_unref0 (wd);
				return result;
			} else {
				GRegex* _tmp47_;
				const gchar* _tmp48_;
				gboolean _tmp49_ = FALSE;
				_tmp47_ = lreg;
				_tmp48_ = target;
				_tmp49_ = g_regex_match (_tmp47_, _tmp48_, 0, NULL);
				if (_tmp49_) {
					const gchar* _tmp50_;
					gchar* _tmp51_;
					_tmp50_ = target;
					_tmp51_ = g_strdup (_tmp50_);
					_g_free0 (lastmatch);
					lastmatch = _tmp51_;
				}
			}
			_tmp52_ = info;
			_tmp53_ = g_match_info_next (_tmp52_, &_inner_error_);
			_tmp54_ = _tmp53_;
			if (_inner_error_ != NULL) {
				if (((_inner_error_->domain == G_SPAWN_ERROR) || (_inner_error_->domain == G_REGEX_ERROR)) || (_inner_error_->domain == GCP_C_COMPILE_ARGS_ERROR)) {
					g_propagate_error (error, _inner_error_);
					_g_free0 (target);
					_g_free0 (lastmatch);
					_g_regex_unref0 (lreg);
					_g_regex_unref0 (preg);
					_g_match_info_free0 (info);
					_g_regex_unref0 (regex);
					_g_free0 (reg);
					_g_free0 (preflessreg);
					_g_free0 (prefreg);
					_g_free0 (outstr);
					args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
					_g_free0 (noext);
					_g_free0 (basen);
					_g_object_unref0 (wd);
					return NULL;
				} else {
					_g_free0 (target);
					_g_free0 (lastmatch);
					_g_regex_unref0 (lreg);
					_g_regex_unref0 (preg);
					_g_match_info_free0 (info);
					_g_regex_unref0 (regex);
					_g_free0 (reg);
					_g_free0 (preflessreg);
					_g_free0 (prefreg);
					_g_free0 (outstr);
					args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
					_g_free0 (noext);
					_g_free0 (basen);
					_g_object_unref0 (wd);
					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 NULL;
				}
			}
			if (!_tmp54_) {
				_g_free0 (target);
				break;
			}
			_g_free0 (target);
		}
		_tmp55_ = lastmatch;
		if (_tmp55_ != NULL) {
			result = lastmatch;
			_g_regex_unref0 (lreg);
			_g_regex_unref0 (preg);
			_g_match_info_free0 (info);
			_g_regex_unref0 (regex);
			_g_free0 (reg);
			_g_free0 (preflessreg);
			_g_free0 (prefreg);
			_g_free0 (outstr);
			args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (noext);
			_g_free0 (basen);
			_g_object_unref0 (wd);
			return result;
		}
		_g_free0 (lastmatch);
		_g_regex_unref0 (lreg);
		_g_regex_unref0 (preg);
	}
	_tmp56_ = basen;
	_tmp57_ = g_strdup_printf ("Could not find make target for %s", _tmp56_);
	_tmp58_ = _tmp57_;
	_tmp59_ = g_error_new_literal (GCP_C_COMPILE_ARGS_ERROR, GCP_C_COMPILE_ARGS_ERROR_MISSING_TARGET, _tmp58_);
	_tmp60_ = _tmp59_;
	_g_free0 (_tmp58_);
	_inner_error_ = _tmp60_;
	if (((_inner_error_->domain == G_SPAWN_ERROR) || (_inner_error_->domain == G_REGEX_ERROR)) || (_inner_error_->domain == GCP_C_COMPILE_ARGS_ERROR)) {
		g_propagate_error (error, _inner_error_);
		_g_match_info_free0 (info);
		_g_regex_unref0 (regex);
		_g_free0 (reg);
		_g_free0 (preflessreg);
		_g_free0 (prefreg);
		_g_free0 (outstr);
		args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (noext);
		_g_free0 (basen);
		_g_object_unref0 (wd);
		return NULL;
	} else {
		_g_match_info_free0 (info);
		_g_regex_unref0 (regex);
		_g_free0 (reg);
		_g_free0 (preflessreg);
		_g_free0 (prefreg);
		_g_free0 (outstr);
		args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (noext);
		_g_free0 (basen);
		_g_object_unref0 (wd);
		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 NULL;
	}
	_g_match_info_free0 (info);
	_g_regex_unref0 (regex);
	_g_free0 (reg);
	_g_free0 (preflessreg);
	_g_free0 (prefreg);
	_g_free0 (outstr);
	args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (noext);
	_g_free0 (basen);
	_g_object_unref0 (wd);
}


static gchar* gcp_c_compile_args_resolve_relative (GcpCCompileArgs* self, GFile* makefile, GFile* source, const gchar* path) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GFile* _tmp4_;
	GFile* _tmp5_ = NULL;
	GFile* _tmp6_;
	const gchar* _tmp7_;
	GFile* _tmp8_ = NULL;
	GFile* _tmp9_;
	GFile* ret;
	GFile* _tmp10_;
	gchar* _tmp11_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (makefile != NULL, NULL);
	g_return_val_if_fail (source != NULL, NULL);
	g_return_val_if_fail (path != NULL, NULL);
	_tmp0_ = path;
	_tmp1_ = g_path_is_absolute (_tmp0_);
	if (_tmp1_) {
		const gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp2_ = path;
		_tmp3_ = g_strdup (_tmp2_);
		result = _tmp3_;
		return result;
	}
	_tmp4_ = makefile;
	_tmp5_ = g_file_get_parent (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = path;
	_tmp8_ = g_file_resolve_relative_path (_tmp6_, _tmp7_);
	_tmp9_ = _tmp8_;
	_g_object_unref0 (_tmp6_);
	ret = _tmp9_;
	_tmp10_ = ret;
	_tmp11_ = g_file_get_path (_tmp10_);
	result = _tmp11_;
	_g_object_unref0 (ret);
	return result;
}


static gint string_index_of_char (const gchar* self, gunichar c, gint start_index) {
	gint result = 0;
	gint _tmp0_;
	gunichar _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* _result_;
	gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = start_index;
	_tmp1_ = c;
	_tmp2_ = g_utf8_strchr (((gchar*) self) + _tmp0_, (gssize) (-1), _tmp1_);
	_result_ = _tmp2_;
	_tmp3_ = _result_;
	if (_tmp3_ != NULL) {
		gchar* _tmp4_;
		_tmp4_ = _result_;
		result = (gint) (_tmp4_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}


static gchar string_get (const gchar* self, glong index) {
	gchar result = '\0';
	glong _tmp0_;
	gchar _tmp1_;
	g_return_val_if_fail (self != NULL, '\0');
	_tmp0_ = index;
	_tmp1_ = ((gchar*) self)[_tmp0_];
	result = _tmp1_;
	return result;
}


static gchar** gcp_c_compile_args_filter_flags (GcpCCompileArgs* self, GFile* makefile, GFile* source, gchar** args, int args_length1, int* result_length1) {
	gchar** result = NULL;
	gboolean inexpand;
	gint i;
	GeeArrayList* _tmp0_;
	GeeArrayList* ret;
	GeeArrayList* _tmp53_;
	gint _tmp54_ = 0;
	gpointer* _tmp55_ = NULL;
	gchar** _tmp56_;
	gint _tmp56__length1;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (makefile != NULL, NULL);
	g_return_val_if_fail (source != NULL, NULL);
	inexpand = FALSE;
	i = 0;
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
	ret = _tmp0_;
	while (TRUE) {
		gint _tmp1_;
		gchar** _tmp2_;
		gint _tmp2__length1;
		gchar** _tmp3_;
		gint _tmp3__length1;
		gint _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* a;
		gint _tmp7_;
		const gchar* _tmp8_;
		gint _tmp9_ = 0;
		gboolean _tmp11_;
		const gchar* _tmp12_;
		gchar _tmp13_ = '\0';
		const gchar* _tmp14_;
		gchar _tmp15_ = '\0';
		_tmp1_ = i;
		_tmp2_ = args;
		_tmp2__length1 = args_length1;
		if (!(_tmp1_ < _tmp2__length1)) {
			break;
		}
		_tmp3_ = args;
		_tmp3__length1 = args_length1;
		_tmp4_ = i;
		_tmp5_ = _tmp3_[_tmp4_];
		_tmp6_ = g_strdup (_tmp5_);
		a = _tmp6_;
		_tmp7_ = i;
		i = _tmp7_ + 1;
		_tmp8_ = a;
		_tmp9_ = string_index_of_char (_tmp8_, (gunichar) '`', 0);
		if (_tmp9_ != (-1)) {
			gboolean _tmp10_;
			_tmp10_ = inexpand;
			inexpand = !_tmp10_;
			_g_free0 (a);
			continue;
		}
		_tmp11_ = inexpand;
		if (_tmp11_) {
			_g_free0 (a);
			continue;
		}
		_tmp12_ = a;
		_tmp13_ = string_get (_tmp12_, (glong) 0);
		if (_tmp13_ != '-') {
			_g_free0 (a);
			continue;
		}
		_tmp14_ = a;
		_tmp15_ = string_get (_tmp14_, (glong) 1);
		switch (_tmp15_) {
			case 'I':
			{
				const gchar* _tmp16_;
				gchar _tmp17_ = '\0';
				_tmp16_ = a;
				_tmp17_ = string_get (_tmp16_, (glong) 2);
				if (_tmp17_ != '\0') {
					GeeArrayList* _tmp18_;
					GeeArrayList* _tmp19_;
					GFile* _tmp20_;
					GFile* _tmp21_;
					const gchar* _tmp22_;
					gchar* _tmp23_ = NULL;
					gchar* _tmp24_;
					gchar* _tmp25_ = NULL;
					gchar* _tmp26_;
					_tmp18_ = ret;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp18_, "-I");
					_tmp19_ = ret;
					_tmp20_ = makefile;
					_tmp21_ = source;
					_tmp22_ = a;
					_tmp23_ = string_substring (_tmp22_, (glong) 2, (glong) (-1));
					_tmp24_ = _tmp23_;
					_tmp25_ = gcp_c_compile_args_resolve_relative (self, _tmp20_, _tmp21_, _tmp24_);
					_tmp26_ = _tmp25_;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp19_, _tmp26_);
					_g_free0 (_tmp26_);
					_g_free0 (_tmp24_);
				} else {
					gint _tmp27_;
					gchar** _tmp28_;
					gint _tmp28__length1;
					_tmp27_ = i;
					_tmp28_ = args;
					_tmp28__length1 = args_length1;
					if (_tmp27_ < _tmp28__length1) {
						GeeArrayList* _tmp29_;
						GeeArrayList* _tmp30_;
						GFile* _tmp31_;
						GFile* _tmp32_;
						gchar** _tmp33_;
						gint _tmp33__length1;
						gint _tmp34_;
						const gchar* _tmp35_;
						gchar* _tmp36_ = NULL;
						gchar* _tmp37_;
						gint _tmp38_;
						_tmp29_ = ret;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp29_, "-I");
						_tmp30_ = ret;
						_tmp31_ = makefile;
						_tmp32_ = source;
						_tmp33_ = args;
						_tmp33__length1 = args_length1;
						_tmp34_ = i;
						_tmp35_ = _tmp33_[_tmp34_];
						_tmp36_ = gcp_c_compile_args_resolve_relative (self, _tmp31_, _tmp32_, _tmp35_);
						_tmp37_ = _tmp36_;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp30_, _tmp37_);
						_g_free0 (_tmp37_);
						_tmp38_ = i;
						i = _tmp38_ + 1;
					}
				}
				break;
			}
			case 'D':
			case 'f':
			case 'W':
			{
				const gchar* _tmp39_;
				GeeArrayList* _tmp40_;
				const gchar* _tmp41_;
				gboolean _tmp42_ = FALSE;
				const gchar* _tmp43_;
				gchar _tmp44_ = '\0';
				gboolean _tmp47_;
				_tmp39_ = a;
				gcp_log_debug ("gcp-c-compile-args.vala:359: gcc flag: `%s'", _tmp39_);
				_tmp40_ = ret;
				_tmp41_ = a;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp40_, _tmp41_);
				_tmp43_ = a;
				_tmp44_ = string_get (_tmp43_, (glong) 2);
				if (_tmp44_ == '\0') {
					gint _tmp45_;
					gchar** _tmp46_;
					gint _tmp46__length1;
					_tmp45_ = i;
					_tmp46_ = args;
					_tmp46__length1 = args_length1;
					_tmp42_ = _tmp45_ < _tmp46__length1;
				} else {
					_tmp42_ = FALSE;
				}
				_tmp47_ = _tmp42_;
				if (_tmp47_) {
					GeeArrayList* _tmp48_;
					gchar** _tmp49_;
					gint _tmp49__length1;
					gint _tmp50_;
					const gchar* _tmp51_;
					gint _tmp52_;
					_tmp48_ = ret;
					_tmp49_ = args;
					_tmp49__length1 = args_length1;
					_tmp50_ = i;
					_tmp51_ = _tmp49_[_tmp50_];
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp48_, _tmp51_);
					_tmp52_ = i;
					i = _tmp52_ + 1;
				}
				break;
			}
			default:
			break;
		}
		_g_free0 (a);
	}
	_tmp53_ = ret;
	_tmp55_ = gee_abstract_collection_to_array ((GeeAbstractCollection*) _tmp53_, &_tmp54_);
	_tmp56_ = _tmp55_;
	_tmp56__length1 = _tmp54_;
	if (result_length1) {
		*result_length1 = _tmp56__length1;
	}
	result = _tmp56_;
	_g_object_unref0 (ret);
	return result;
}


static gint string_last_index_of (const gchar* self, const gchar* needle, gint start_index) {
	gint result = 0;
	gint _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* _result_;
	gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (needle != NULL, 0);
	_tmp0_ = start_index;
	_tmp1_ = needle;
	_tmp2_ = g_strrstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_);
	_result_ = _tmp2_;
	_tmp3_ = _result_;
	if (_tmp3_ != NULL) {
		gchar* _tmp4_;
		_tmp4_ = _result_;
		result = (gint) (_tmp4_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}


static gchar** gcp_c_compile_args_flags_from_target (GcpCCompileArgs* self, GFile* makefile, GFile* source, const gchar* target, int* result_length1, GError** error) {
	gchar** result = NULL;
	GFile* _tmp0_;
	GFile* _tmp1_ = NULL;
	GFile* _tmp2_;
	GFile* _tmp3_;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_;
	gchar* relsource;
	gchar* _tmp6_;
	gchar* fakecc;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar** _tmp21_ = NULL;
	gchar** args;
	gint args_length1;
	gint _args_size_;
	gchar* outstr = NULL;
	GFile* _tmp22_;
	GFile* _tmp23_ = NULL;
	GFile* _tmp24_;
	gchar* _tmp25_ = NULL;
	gchar* _tmp26_;
	gchar** _tmp27_;
	gint _tmp27__length1;
	gchar* _tmp28_ = NULL;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	gint _tmp31_ = 0;
	gint idx;
	gint _tmp32_;
	gchar** retargs = NULL;
	gint retargs_length1 = 0;
	gint _retargs_size_ = 0;
	const gchar* _tmp34_;
	gint _tmp35_;
	const gchar* _tmp36_;
	gint _tmp37_;
	gint _tmp38_;
	gchar* _tmp39_ = NULL;
	gchar* _tmp40_;
	gchar** _tmp41_;
	gchar** _tmp42_ = NULL;
	gchar** _tmp43_;
	gint _tmp43__length1;
	gchar** parts;
	gint parts_length1;
	gint _parts_size_;
	gchar** _tmp44_;
	gint _tmp44__length1;
	const gchar* _tmp45_;
	gchar** _tmp46_ = NULL;
	gint _tmp47_ = 0;
	GFile* _tmp48_;
	GFile* _tmp49_;
	gchar** _tmp50_;
	gint _tmp50__length1;
	gint _tmp51_ = 0;
	gchar** _tmp52_ = NULL;
	gchar** _tmp53_;
	gint _tmp53__length1;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (makefile != NULL, NULL);
	g_return_val_if_fail (source != NULL, NULL);
	g_return_val_if_fail (target != NULL, NULL);
	_tmp0_ = makefile;
	_tmp1_ = g_file_get_parent (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = source;
	_tmp4_ = g_file_get_relative_path (_tmp2_, _tmp3_);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp2_);
	relsource = _tmp5_;
	_tmp6_ = g_strdup ("__GCP_COMPILE_ARGS__");
	fakecc = _tmp6_;
	_tmp7_ = g_strdup ("make");
	_tmp8_ = g_strdup ("-s");
	_tmp9_ = g_strdup ("-i");
	_tmp10_ = g_strdup ("-n");
	_tmp11_ = g_strdup ("-W");
	_tmp12_ = relsource;
	_tmp13_ = g_strdup (_tmp12_);
	_tmp14_ = g_strdup ("V=1");
	_tmp15_ = fakecc;
	_tmp16_ = g_strconcat ("CC=", _tmp15_, NULL);
	_tmp17_ = fakecc;
	_tmp18_ = g_strconcat ("CXX=", _tmp17_, NULL);
	_tmp19_ = target;
	_tmp20_ = g_strdup (_tmp19_);
	_tmp21_ = g_new0 (gchar*, 11 + 1);
	_tmp21_[0] = _tmp7_;
	_tmp21_[1] = _tmp8_;
	_tmp21_[2] = _tmp9_;
	_tmp21_[3] = _tmp10_;
	_tmp21_[4] = _tmp11_;
	_tmp21_[5] = _tmp13_;
	_tmp21_[6] = _tmp14_;
	_tmp21_[7] = _tmp16_;
	_tmp21_[8] = _tmp18_;
	_tmp21_[9] = _tmp20_;
	_tmp21_[10] = NULL;
	args = _tmp21_;
	args_length1 = 11;
	_args_size_ = args_length1;
	_tmp22_ = makefile;
	_tmp23_ = g_file_get_parent (_tmp22_);
	_tmp24_ = _tmp23_;
	_tmp25_ = g_file_get_path (_tmp24_);
	_tmp26_ = _tmp25_;
	_tmp27_ = args;
	_tmp27__length1 = args_length1;
	g_spawn_sync (_tmp26_, _tmp27_, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, &_tmp28_, NULL, NULL, &_inner_error_);
	_g_free0 (outstr);
	outstr = _tmp28_;
	_g_free0 (_tmp26_);
	_g_object_unref0 (_tmp24_);
	if (_inner_error_ != NULL) {
		if (((_inner_error_->domain == G_SPAWN_ERROR) || (_inner_error_->domain == GCP_C_COMPILE_ARGS_ERROR)) || (_inner_error_->domain == G_SHELL_ERROR)) {
			g_propagate_error (error, _inner_error_);
			_g_free0 (outstr);
			args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (fakecc);
			_g_free0 (relsource);
			return NULL;
		} else {
			_g_free0 (outstr);
			args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (fakecc);
			_g_free0 (relsource);
			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 NULL;
		}
	}
	_tmp29_ = outstr;
	_tmp30_ = fakecc;
	_tmp31_ = string_last_index_of (_tmp29_, _tmp30_, 0);
	idx = _tmp31_;
	_tmp32_ = idx;
	if (_tmp32_ < 0) {
		GError* _tmp33_;
		_tmp33_ = g_error_new_literal (GCP_C_COMPILE_ARGS_ERROR, GCP_C_COMPILE_ARGS_ERROR_MISSING_MAKE_OUTPUT, "Make output did not contain flags");
		_inner_error_ = _tmp33_;
		if (((_inner_error_->domain == G_SPAWN_ERROR) || (_inner_error_->domain == GCP_C_COMPILE_ARGS_ERROR)) || (_inner_error_->domain == G_SHELL_ERROR)) {
			g_propagate_error (error, _inner_error_);
			_g_free0 (outstr);
			args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (fakecc);
			_g_free0 (relsource);
			return NULL;
		} else {
			_g_free0 (outstr);
			args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (fakecc);
			_g_free0 (relsource);
			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 NULL;
		}
	}
	_tmp34_ = outstr;
	_tmp35_ = idx;
	_tmp36_ = fakecc;
	_tmp37_ = strlen (_tmp36_);
	_tmp38_ = _tmp37_;
	_tmp39_ = string_substring (_tmp34_, (glong) (_tmp35_ + _tmp38_), (glong) (-1));
	_tmp40_ = _tmp39_;
	_tmp42_ = _tmp41_ = g_strsplit (_tmp40_, "\n", 0);
	_tmp43_ = _tmp42_;
	_tmp43__length1 = _vala_array_length (_tmp41_);
	_g_free0 (_tmp40_);
	parts = _tmp43_;
	parts_length1 = _tmp43__length1;
	_parts_size_ = parts_length1;
	_tmp44_ = parts;
	_tmp44__length1 = parts_length1;
	_tmp45_ = _tmp44_[0];
	g_shell_parse_argv (_tmp45_, &_tmp47_, &_tmp46_, &_inner_error_);
	retargs = (_vala_array_free (retargs, retargs_length1, (GDestroyNotify) g_free), NULL);
	retargs = _tmp46_;
	retargs_length1 = _tmp47_;
	_retargs_size_ = retargs_length1;
	if (_inner_error_ != NULL) {
		if (((_inner_error_->domain == G_SPAWN_ERROR) || (_inner_error_->domain == GCP_C_COMPILE_ARGS_ERROR)) || (_inner_error_->domain == G_SHELL_ERROR)) {
			g_propagate_error (error, _inner_error_);
			parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL);
			retargs = (_vala_array_free (retargs, retargs_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (outstr);
			args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (fakecc);
			_g_free0 (relsource);
			return NULL;
		} else {
			parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL);
			retargs = (_vala_array_free (retargs, retargs_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (outstr);
			args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (fakecc);
			_g_free0 (relsource);
			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 NULL;
		}
	}
	_tmp48_ = makefile;
	_tmp49_ = source;
	_tmp50_ = retargs;
	_tmp50__length1 = retargs_length1;
	_tmp52_ = gcp_c_compile_args_filter_flags (self, _tmp48_, _tmp49_, _tmp50_, _tmp50__length1, &_tmp51_);
	_tmp53_ = _tmp52_;
	_tmp53__length1 = _tmp51_;
	if (result_length1) {
		*result_length1 = _tmp53__length1;
	}
	result = _tmp53_;
	parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL);
	retargs = (_vala_array_free (retargs, retargs_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (outstr);
	args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (fakecc);
	_g_free0 (relsource);
	return result;
}


static void gcp_c_compile_args_makefile_changed_async_data_free (gpointer _data) {
	GcpCCompileArgsMakefileChangedAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (GcpCCompileArgsMakefileChangedAsyncData, _data_);
}


static gpointer _gcp_c_compile_args_makefile_ref0 (gpointer self) {
	return self ? gcp_c_compile_args_makefile_ref (self) : NULL;
}


static void gcp_c_compile_args_makefile_changed_async (GcpCCompileArgs* self, GcpCCompileArgsMakefile* makefile, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GcpCCompileArgsMakefileChangedAsyncData* _data_;
	GcpCCompileArgs* _tmp0_;
	GcpCCompileArgsMakefile* _tmp1_;
	GcpCCompileArgsMakefile* _tmp2_;
	_data_ = g_slice_new0 (GcpCCompileArgsMakefileChangedAsyncData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gcp_c_compile_args_makefile_changed_async);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gcp_c_compile_args_makefile_changed_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = makefile;
	_tmp2_ = _gcp_c_compile_args_makefile_ref0 (_tmp1_);
	_data_->makefile = _tmp2_;
	gcp_c_compile_args_makefile_changed_async_co (_data_);
}


static void gcp_c_compile_args_makefile_changed_finish (GcpCCompileArgs* self, GAsyncResult* _res_) {
	GcpCCompileArgsMakefileChangedAsyncData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static Block2Data* block2_data_ref (Block2Data* _data2_) {
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}


static void block2_data_unref (void * _userdata_) {
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		GcpCCompileArgs * self;
		self = _data2_->self;
		_gcp_c_compile_args_makefile_unref0 (_data2_->makefile);
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}


static void* __lambda2_ (Block2Data* _data2_) {
	GcpCCompileArgs * self;
	void* result = NULL;
	self = _data2_->self;
	{
		GcpCCompileArgsMakefile* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _tmp2_;
		GeeArrayList* _tmp3_;
		GeeArrayList* _file_list;
		GeeArrayList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _file_size;
		gint _file_index;
		_tmp0_ = _data2_->makefile;
		_tmp1_ = gcp_c_compile_args_makefile_get_sources (_tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _g_object_ref0 (_tmp2_);
		_file_list = _tmp3_;
		_tmp4_ = _file_list;
		_tmp5_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_file_size = _tmp6_;
		_file_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			gint _tmp9_;
			GeeArrayList* _tmp10_;
			gint _tmp11_;
			gpointer _tmp12_ = NULL;
			GFile* file;
			GcpCCompileArgsMakefile* _tmp13_;
			GFile* _tmp14_;
			GFile* _tmp15_;
			GFile* _tmp16_;
			_tmp7_ = _file_index;
			_file_index = _tmp7_ + 1;
			_tmp8_ = _file_index;
			_tmp9_ = _file_size;
			if (!(_tmp8_ < _tmp9_)) {
				break;
			}
			_tmp10_ = _file_list;
			_tmp11_ = _file_index;
			_tmp12_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, _tmp11_);
			file = (GFile*) _tmp12_;
			_tmp13_ = _data2_->makefile;
			_tmp14_ = gcp_c_compile_args_makefile_get_file (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = file;
			gcp_c_compile_args_find_for_makefile (self, _tmp15_, _tmp16_);
			_g_object_unref0 (file);
		}
		_g_object_unref0 (_file_list);
	}
	result = NULL;
	return result;
}


static gpointer ___lambda2__gthread_func (gpointer self) {
	gpointer result;
	result = __lambda2_ (self);
	return result;
}


static gboolean gcp_c_compile_args_makefile_changed_async_co (GcpCCompileArgsMakefileChangedAsyncData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data2_ = g_slice_new0 (Block2Data);
	_data_->_data2_->_ref_count_ = 1;
	_data_->_data2_->self = g_object_ref (_data_->self);
	_data_->_tmp0_ = _data_->makefile;
	_data_->_data2_->makefile = _data_->_tmp0_;
	_data_->_data2_->_async_data_ = _data_;
	_data_->func = ___lambda2__gthread_func;
	_data_->func_target = block2_data_ref (_data_->_data2_);
	_data_->func_target_destroy_notify = block2_data_unref;
	{
		g_thread_create (_data_->func, _data_->func_target, FALSE, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch0_g_error;
		}
		_data_->_state_ = 1;
		return FALSE;
		_state_1:
		;
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error_);
		_data_->_inner_error_ = NULL;
	}
	__finally0:
	if (_data_->_inner_error_ != NULL) {
		(_data_->func_target_destroy_notify == NULL) ? NULL : (_data_->func_target_destroy_notify (_data_->func_target), NULL);
		_data_->func = NULL;
		_data_->func_target = NULL;
		_data_->func_target_destroy_notify = NULL;
		block2_data_unref (_data_->_data2_);
		_data_->_data2_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	(_data_->func_target_destroy_notify == NULL) ? NULL : (_data_->func_target_destroy_notify (_data_->func_target), NULL);
	_data_->func = NULL;
	_data_->func_target = NULL;
	_data_->func_target_destroy_notify = NULL;
	block2_data_unref (_data_->_data2_);
	_data_->_data2_ = NULL;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void gcp_c_compile_args_on_makefile_changed (GcpCCompileArgs* self, GcpCCompileArgsMakefile* makefile) {
	GcpCCompileArgsMakefile* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (makefile != NULL);
	_tmp0_ = makefile;
	gcp_c_compile_args_makefile_changed_async (self, _tmp0_, NULL, NULL);
}


static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void _gcp_c_compile_args_on_makefile_changed_gcp_c_compile_args_makefile_changed (GcpCCompileArgsMakefile* _sender, gpointer self) {
	gcp_c_compile_args_on_makefile_changed (self, _sender);
}


static void gcp_c_compile_args_find_for_makefile (GcpCCompileArgs* self, GFile* makefile, GFile* file) {
	gchar* target = NULL;
	gchar** _tmp0_ = NULL;
	gchar** args;
	gint args_length1;
	gint _args_size_;
	GFile* _tmp59_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (makefile != NULL);
	g_return_if_fail (file != NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	args = _tmp0_;
	args_length1 = 0;
	_args_size_ = args_length1;
	{
		GFile* _tmp1_;
		GFile* _tmp2_;
		gchar* _tmp3_ = NULL;
		gchar* _tmp4_;
		GFile* _tmp5_;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_;
		const gchar* _tmp8_;
		GFile* _tmp9_;
		GFile* _tmp10_;
		const gchar* _tmp11_;
		gint _tmp12_ = 0;
		gchar** _tmp13_ = NULL;
		gchar** _tmp14_;
		gint _tmp14__length1;
		gint __tmp14__size_;
		gchar** _tmp15_;
		gint _tmp15__length1;
		gchar* _tmp16_;
		gchar** _tmp17_;
		gint _tmp17__length1;
		gchar* _tmp18_ = NULL;
		GFile* _tmp19_;
		gchar* _tmp20_ = NULL;
		gchar* _tmp21_;
		gchar** _tmp22_;
		gint _tmp22__length1;
		gchar* _tmp23_ = NULL;
		gchar* _tmp24_;
		_tmp1_ = makefile;
		_tmp2_ = file;
		_tmp3_ = gcp_c_compile_args_target_from_make (self, _tmp1_, _tmp2_, &_inner_error_);
		_tmp4_ = _tmp3_;
		if (_inner_error_ != NULL) {
			goto __catch1_g_error;
		}
		_g_free0 (target);
		target = _tmp4_;
		_tmp5_ = file;
		_tmp6_ = g_file_get_path (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = target;
		gcp_log_debug ("gcp-c-compile-args.vala:464: Makefile make target for `%s': `%s'", _tmp7_, _tmp8_);
		_g_free0 (_tmp7_);
		_tmp9_ = makefile;
		_tmp10_ = file;
		_tmp11_ = target;
		_tmp13_ = gcp_c_compile_args_flags_from_target (self, _tmp9_, _tmp10_, _tmp11_, &_tmp12_, &_inner_error_);
		_tmp14_ = _tmp13_;
		_tmp14__length1 = _tmp12_;
		__tmp14__size_ = _tmp14__length1;
		if (_inner_error_ != NULL) {
			goto __catch1_g_error;
		}
		args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
		args = _tmp14_;
		args_length1 = _tmp14__length1;
		_args_size_ = args_length1;
		_tmp15_ = args;
		_tmp15__length1 = args_length1;
		_tmp16_ = g_strdup ("-I");
		_vala_array_add1 (&args, &args_length1, &_args_size_, _tmp16_);
		_tmp17_ = args;
		_tmp17__length1 = args_length1;
		_tmp18_ = g_strdup_printf ("/usr/lib/clang/%s/include", LLVM_VERSION);
		_vala_array_add2 (&args, &args_length1, &_args_size_, _tmp18_);
		_tmp19_ = file;
		_tmp20_ = g_file_get_path (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = args;
		_tmp22__length1 = args_length1;
		_tmp23_ = g_strjoinv (", ", _tmp22_);
		_tmp24_ = _tmp23_;
		gcp_log_debug ("gcp-c-compile-args.vala:475: Compile flags for `%s': `%s'", _tmp21_, _tmp24_);
		_g_free0 (_tmp24_);
		_g_free0 (_tmp21_);
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
		FILE* _tmp25_;
		GError* _tmp26_;
		const gchar* _tmp27_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp25_ = stderr;
		_tmp26_ = e;
		_tmp27_ = _tmp26_->message;
		fprintf (_tmp25_, "Makefile error: %s\n", _tmp27_);
		_g_error_free0 (e);
	}
	__finally1:
	if (_inner_error_ != NULL) {
		args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (target);
		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;
	}
	{
		GeeHashMap* _tmp28_;
		_tmp28_ = self->priv->d_makefileCache;
		g_static_rec_mutex_lock (&self->priv->__lock_d_makefileCache);
		{
			{
				GeeHashMap* _tmp29_;
				_tmp29_ = self->priv->d_argsCache;
				g_static_rec_mutex_lock (&self->priv->__lock_d_argsCache);
				{
					GeeHashMap* _tmp30_;
					GFile* _tmp31_;
					gboolean _tmp32_ = FALSE;
					GeeHashMap* _tmp45_;
					GFile* _tmp46_;
					gboolean _tmp47_ = FALSE;
					_tmp30_ = self->priv->d_argsCache;
					_tmp31_ = file;
					_tmp32_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp30_, _tmp31_);
					if (_tmp32_) {
						GeeHashMap* _tmp33_;
						GFile* _tmp34_;
						gpointer _tmp35_ = NULL;
						GcpCCompileArgsCache* _tmp36_;
						gchar** _tmp37_;
						gint _tmp37__length1;
						_tmp33_ = self->priv->d_argsCache;
						_tmp34_ = file;
						_tmp35_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp33_, _tmp34_);
						_tmp36_ = (GcpCCompileArgsCache*) _tmp35_;
						_tmp37_ = args;
						_tmp37__length1 = args_length1;
						gcp_c_compile_args_cache_set_args (_tmp36_, _tmp37_, _tmp37__length1);
						_gcp_c_compile_args_cache_unref0 (_tmp36_);
					} else {
						GFile* _tmp38_;
						GFile* _tmp39_;
						gchar** _tmp40_;
						gint _tmp40__length1;
						GcpCCompileArgsCache* _tmp41_;
						GcpCCompileArgsCache* c;
						GeeHashMap* _tmp42_;
						GFile* _tmp43_;
						GcpCCompileArgsCache* _tmp44_;
						_tmp38_ = file;
						_tmp39_ = makefile;
						_tmp40_ = args;
						_tmp40__length1 = args_length1;
						_tmp41_ = gcp_c_compile_args_cache_new (_tmp38_, _tmp39_, _tmp40_, _tmp40__length1);
						c = _tmp41_;
						_tmp42_ = self->priv->d_argsCache;
						_tmp43_ = file;
						_tmp44_ = c;
						gee_abstract_map_set ((GeeAbstractMap*) _tmp42_, _tmp43_, _tmp44_);
						_gcp_c_compile_args_cache_unref0 (c);
					}
					_tmp45_ = self->priv->d_makefileCache;
					_tmp46_ = makefile;
					_tmp47_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp45_, _tmp46_);
					if (!_tmp47_) {
						GFile* _tmp48_;
						GcpCCompileArgsMakefile* _tmp49_;
						GcpCCompileArgsMakefile* m;
						GcpCCompileArgsMakefile* _tmp50_;
						GFile* _tmp51_;
						GcpCCompileArgsMakefile* _tmp52_;
						GeeHashMap* _tmp53_;
						GFile* _tmp54_;
						GcpCCompileArgsMakefile* _tmp55_;
						_tmp48_ = makefile;
						_tmp49_ = gcp_c_compile_args_makefile_new (_tmp48_);
						m = _tmp49_;
						_tmp50_ = m;
						_tmp51_ = file;
						gcp_c_compile_args_makefile_add (_tmp50_, _tmp51_);
						_tmp52_ = m;
						g_signal_connect_object (_tmp52_, "changed", (GCallback) _gcp_c_compile_args_on_makefile_changed_gcp_c_compile_args_makefile_changed, self, 0);
						_tmp53_ = self->priv->d_makefileCache;
						_tmp54_ = makefile;
						_tmp55_ = m;
						gee_abstract_map_set ((GeeAbstractMap*) _tmp53_, _tmp54_, _tmp55_);
						_gcp_c_compile_args_makefile_unref0 (m);
					}
				}
				__finally3:
				{
					GeeHashMap* _tmp56_;
					_tmp56_ = self->priv->d_argsCache;
					g_static_rec_mutex_unlock (&self->priv->__lock_d_argsCache);
				}
				if (_inner_error_ != NULL) {
					{
						GeeHashMap* _tmp57_;
						_tmp57_ = self->priv->d_makefileCache;
						g_static_rec_mutex_unlock (&self->priv->__lock_d_makefileCache);
					}
					args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
					_g_free0 (target);
					g_critical ("file %s: line %d: unexpected 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;
				}
			}
		}
		__finally2:
		{
			GeeHashMap* _tmp58_;
			_tmp58_ = self->priv->d_makefileCache;
			g_static_rec_mutex_unlock (&self->priv->__lock_d_makefileCache);
		}
		if (_inner_error_ != NULL) {
			args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (target);
			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;
		}
	}
	_tmp59_ = file;
	gcp_c_compile_args_changed_in_idle (self, _tmp59_);
	args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (target);
}


static Block3Data* block3_data_ref (Block3Data* _data3_) {
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		GcpCCompileArgs * self;
		self = _data3_->self;
		_g_object_unref0 (_data3_->file);
		_g_object_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}


static gboolean __lambda3_ (Block3Data* _data3_) {
	GcpCCompileArgs * self;
	gboolean result = FALSE;
	GFile* _tmp0_;
	self = _data3_->self;
	_tmp0_ = _data3_->file;
	g_signal_emit_by_name (self, "arguments-changed", _tmp0_);
	result = FALSE;
	return result;
}


static gboolean ___lambda3__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda3_ (self);
	return result;
}


static void gcp_c_compile_args_changed_in_idle (GcpCCompileArgs* self, GFile* file) {
	Block3Data* _data3_;
	GFile* _tmp0_;
	GFile* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	_data3_ = g_slice_new0 (Block3Data);
	_data3_->_ref_count_ = 1;
	_data3_->self = g_object_ref (self);
	_tmp0_ = file;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_data3_->file = _tmp1_;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda3__gsource_func, block3_data_ref (_data3_), block3_data_unref);
	block3_data_unref (_data3_);
	_data3_ = NULL;
}


static void gcp_c_compile_args_find_async_data_free (gpointer _data) {
	GcpCCompileArgsFindAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (GcpCCompileArgsFindAsyncData, _data_);
}


static void gcp_c_compile_args_find_async (GcpCCompileArgs* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GcpCCompileArgsFindAsyncData* _data_;
	GcpCCompileArgs* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	_data_ = g_slice_new0 (GcpCCompileArgsFindAsyncData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gcp_c_compile_args_find_async);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gcp_c_compile_args_find_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = file;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->file = _tmp2_;
	gcp_c_compile_args_find_async_co (_data_);
}


static void gcp_c_compile_args_find_finish (GcpCCompileArgs* self, GAsyncResult* _res_) {
	GcpCCompileArgsFindAsyncData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static Block4Data* block4_data_ref (Block4Data* _data4_) {
	g_atomic_int_inc (&_data4_->_ref_count_);
	return _data4_;
}


static void block4_data_unref (void * _userdata_) {
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
		GcpCCompileArgs * self;
		self = _data4_->self;
		_g_object_unref0 (_data4_->file);
		_g_object_unref0 (self);
		g_slice_free (Block4Data, _data4_);
	}
}


static void* __lambda4_ (Block4Data* _data4_) {
	GcpCCompileArgs * self;
	void* result = NULL;
	GFile* makefile;
	GFile* _tmp3_;
	GFile* _tmp13_;
	GFile* _tmp14_;
	GError * _inner_error_ = NULL;
	self = _data4_->self;
	makefile = NULL;
	{
		GFile* _tmp0_;
		GFile* _tmp1_ = NULL;
		GFile* _tmp2_;
		_tmp0_ = _data4_->file;
		_tmp1_ = gcp_c_compile_args_makefile_for (self, _tmp0_, NULL, &_inner_error_);
		_tmp2_ = _tmp1_;
		if (_inner_error_ != NULL) {
			goto __catch4_g_error;
		}
		_g_object_unref0 (makefile);
		makefile = _tmp2_;
	}
	goto __finally4;
	__catch4_g_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		_g_object_unref0 (makefile);
		makefile = NULL;
		_g_error_free0 (e);
	}
	__finally4:
	if (_inner_error_ != NULL) {
		_g_object_unref0 (makefile);
		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 NULL;
	}
	_tmp3_ = makefile;
	if (_tmp3_ == NULL) {
		GFile* _tmp4_;
		gchar** _tmp5_ = NULL;
		gchar** _tmp6_;
		gint _tmp6__length1;
		GcpCCompileArgsCache* _tmp7_;
		GcpCCompileArgsCache* _tmp8_;
		GcpCCompileArgsCache* c;
		GeeHashMap* _tmp9_;
		GFile* _tmp10_;
		GcpCCompileArgsCache* _tmp11_;
		GFile* _tmp12_;
		_tmp4_ = _data4_->file;
		_tmp5_ = g_new0 (gchar*, 0 + 1);
		_tmp6_ = _tmp5_;
		_tmp6__length1 = 0;
		_tmp7_ = gcp_c_compile_args_cache_new (_tmp4_, NULL, _tmp6_, 0);
		_tmp8_ = _tmp7_;
		_tmp6_ = (_vala_array_free (_tmp6_, _tmp6__length1, (GDestroyNotify) g_free), NULL);
		c = _tmp8_;
		_tmp9_ = self->priv->d_argsCache;
		_tmp10_ = _data4_->file;
		_tmp11_ = c;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp9_, _tmp10_, _tmp11_);
		_tmp12_ = _data4_->file;
		gcp_c_compile_args_changed_in_idle (self, _tmp12_);
		result = NULL;
		_gcp_c_compile_args_cache_unref0 (c);
		_g_object_unref0 (makefile);
		return result;
	}
	_tmp13_ = makefile;
	_tmp14_ = _data4_->file;
	gcp_c_compile_args_find_for_makefile (self, _tmp13_, _tmp14_);
	{
		GeeHashMap* _tmp15_;
		_tmp15_ = self->priv->d_makefileCache;
		g_static_rec_mutex_lock (&self->priv->__lock_d_makefileCache);
		{
			GeeHashMap* _tmp16_;
			GFile* _tmp17_;
			gboolean _tmp18_ = FALSE;
			_tmp16_ = self->priv->d_makefileCache;
			_tmp17_ = _data4_->file;
			_tmp18_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp16_, _tmp17_);
			if (_tmp18_) {
				GeeHashMap* _tmp19_;
				GFile* _tmp20_;
				gpointer _tmp21_ = NULL;
				GcpCCompileArgsMakefile* _tmp22_;
				GFile* _tmp23_;
				_tmp19_ = self->priv->d_makefileCache;
				_tmp20_ = makefile;
				_tmp21_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp19_, _tmp20_);
				_tmp22_ = (GcpCCompileArgsMakefile*) _tmp21_;
				_tmp23_ = _data4_->file;
				gcp_c_compile_args_makefile_add (_tmp22_, _tmp23_);
				_gcp_c_compile_args_makefile_unref0 (_tmp22_);
			}
		}
		__finally5:
		{
			GeeHashMap* _tmp24_;
			_tmp24_ = self->priv->d_makefileCache;
			g_static_rec_mutex_unlock (&self->priv->__lock_d_makefileCache);
		}
		if (_inner_error_ != NULL) {
			_g_object_unref0 (makefile);
			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 NULL;
		}
	}
	result = NULL;
	_g_object_unref0 (makefile);
	return result;
}


static gpointer ___lambda4__gthread_func (gpointer self) {
	gpointer result;
	result = __lambda4_ (self);
	return result;
}


static gboolean gcp_c_compile_args_find_async_co (GcpCCompileArgsFindAsyncData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data4_ = g_slice_new0 (Block4Data);
	_data_->_data4_->_ref_count_ = 1;
	_data_->_data4_->self = g_object_ref (_data_->self);
	_data_->_tmp0_ = _data_->file;
	_data_->_data4_->file = _data_->_tmp0_;
	_data_->_data4_->_async_data_ = _data_;
	_data_->func = ___lambda4__gthread_func;
	_data_->func_target = block4_data_ref (_data_->_data4_);
	_data_->func_target_destroy_notify = block4_data_unref;
	{
		g_thread_create (_data_->func, _data_->func_target, FALSE, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch6_g_error;
		}
		_data_->_state_ = 1;
		return FALSE;
		_state_1:
		;
	}
	goto __finally6;
	__catch6_g_error:
	{
		g_clear_error (&_data_->_inner_error_);
		_data_->_inner_error_ = NULL;
	}
	__finally6:
	if (_data_->_inner_error_ != NULL) {
		(_data_->func_target_destroy_notify == NULL) ? NULL : (_data_->func_target_destroy_notify (_data_->func_target), NULL);
		_data_->func = NULL;
		_data_->func_target = NULL;
		_data_->func_target_destroy_notify = NULL;
		block4_data_unref (_data_->_data4_);
		_data_->_data4_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	(_data_->func_target_destroy_notify == NULL) ? NULL : (_data_->func_target_destroy_notify (_data_->func_target), NULL);
	_data_->func = NULL;
	_data_->func_target = NULL;
	_data_->func_target_destroy_notify = NULL;
	block4_data_unref (_data_->_data4_);
	_data_->_data4_ = NULL;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static gchar** _vala_array_dup1 (gchar** self, int length) {
	gchar** result;
	int i;
	result = g_new0 (gchar*, length + 1);
	for (i = 0; i < length; i++) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (self[i]);
		result[i] = _tmp0_;
	}
	return result;
}


gchar** gcp_c_compile_args_get (GcpCCompileArgs* self, GFile* file, int* result_length1) {
	gchar** result = NULL;
	gchar** ret;
	gint ret_length1;
	gint _ret_size_;
	gchar** _tmp13_;
	gint _tmp13__length1;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (file != NULL, NULL);
	ret = NULL;
	ret_length1 = 0;
	_ret_size_ = ret_length1;
	{
		GeeHashMap* _tmp0_;
		_tmp0_ = self->priv->d_argsCache;
		g_static_rec_mutex_lock (&self->priv->__lock_d_argsCache);
		{
			GeeHashMap* _tmp1_;
			GFile* _tmp2_;
			gboolean _tmp3_ = FALSE;
			_tmp1_ = self->priv->d_argsCache;
			_tmp2_ = file;
			_tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, _tmp2_);
			if (_tmp3_) {
				GeeHashMap* _tmp4_;
				GFile* _tmp5_;
				gpointer _tmp6_ = NULL;
				GcpCCompileArgsCache* _tmp7_;
				gchar** _tmp8_;
				gint _tmp8__length1;
				gchar** _tmp9_;
				gint _tmp9__length1;
				gchar** _tmp10_;
				gint _tmp10__length1;
				_tmp4_ = self->priv->d_argsCache;
				_tmp5_ = file;
				_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, _tmp5_);
				_tmp7_ = (GcpCCompileArgsCache*) _tmp6_;
				_tmp8_ = gcp_c_compile_args_cache_get_args (_tmp7_, &_tmp8__length1);
				_tmp9_ = _tmp8_;
				_tmp9__length1 = _tmp8__length1;
				_tmp10_ = (_tmp9_ != NULL) ? _vala_array_dup1 (_tmp9_, _tmp9__length1) : ((gpointer) _tmp9_);
				_tmp10__length1 = _tmp9__length1;
				ret = (_vala_array_free (ret, ret_length1, (GDestroyNotify) g_free), NULL);
				ret = _tmp10_;
				ret_length1 = _tmp10__length1;
				_ret_size_ = ret_length1;
				_gcp_c_compile_args_cache_unref0 (_tmp7_);
			} else {
				GFile* _tmp11_;
				_tmp11_ = file;
				gcp_c_compile_args_monitor (self, _tmp11_);
			}
		}
		__finally7:
		{
			GeeHashMap* _tmp12_;
			_tmp12_ = self->priv->d_argsCache;
			g_static_rec_mutex_unlock (&self->priv->__lock_d_argsCache);
		}
		if (_inner_error_ != NULL) {
			ret = (_vala_array_free (ret, ret_length1, (GDestroyNotify) g_free), NULL);
			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 NULL;
		}
	}
	_tmp13_ = ret;
	_tmp13__length1 = ret_length1;
	if (result_length1) {
		*result_length1 = _tmp13__length1;
	}
	result = _tmp13_;
	return result;
}


static void ___lambda5_ (GcpCCompileArgs* self, GObject* source, GAsyncResult* res) {
	GAsyncResult* _tmp0_;
	g_return_if_fail (res != NULL);
	_tmp0_ = res;
	gcp_c_compile_args_find_finish (self, _tmp0_);
}


static void ____lambda5__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	___lambda5_ (self, source_object, res);
	g_object_unref (self);
}


void gcp_c_compile_args_monitor (GcpCCompileArgs* self, GFile* file) {
	gboolean hascache = FALSE;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	{
		GeeHashMap* _tmp0_;
		_tmp0_ = self->priv->d_argsCache;
		g_static_rec_mutex_lock (&self->priv->__lock_d_argsCache);
		{
			GeeHashMap* _tmp1_;
			GFile* _tmp2_;
			gboolean _tmp3_ = FALSE;
			_tmp1_ = self->priv->d_argsCache;
			_tmp2_ = file;
			_tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, _tmp2_);
			hascache = _tmp3_;
		}
		__finally8:
		{
			GeeHashMap* _tmp4_;
			_tmp4_ = self->priv->d_argsCache;
			g_static_rec_mutex_unlock (&self->priv->__lock_d_argsCache);
		}
		if (_inner_error_ != NULL) {
			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;
		}
	}
	if (hascache) {
		GFile* _tmp5_;
		_tmp5_ = file;
		g_signal_emit_by_name (self, "arguments-changed", _tmp5_);
	} else {
		GFile* _tmp6_;
		_tmp6_ = file;
		gcp_c_compile_args_find_async (self, _tmp6_, ____lambda5__gasync_ready_callback, g_object_ref (self));
	}
}


void gcp_c_compile_args_remove_monitor (GcpCCompileArgs* self, GFile* file) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	{
		GeeHashMap* _tmp0_;
		_tmp0_ = self->priv->d_argsCache;
		g_static_rec_mutex_lock (&self->priv->__lock_d_argsCache);
		{
			GeeHashMap* _tmp1_;
			GFile* _tmp2_;
			gboolean _tmp3_ = FALSE;
			_tmp1_ = self->priv->d_argsCache;
			_tmp2_ = file;
			_tmp3_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, _tmp2_);
			if (_tmp3_) {
				GeeHashMap* _tmp4_;
				GFile* _tmp5_;
				gpointer _tmp6_ = NULL;
				GcpCCompileArgsCache* c;
				GeeHashMap* _tmp27_;
				GFile* _tmp28_;
				_tmp4_ = self->priv->d_argsCache;
				_tmp5_ = file;
				_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, _tmp5_);
				c = (GcpCCompileArgsCache*) _tmp6_;
				{
					GeeHashMap* _tmp7_;
					_tmp7_ = self->priv->d_makefileCache;
					g_static_rec_mutex_lock (&self->priv->__lock_d_makefileCache);
					{
						GeeHashMap* _tmp8_;
						GcpCCompileArgsCache* _tmp9_;
						GFile* _tmp10_;
						GFile* _tmp11_;
						gboolean _tmp12_ = FALSE;
						_tmp8_ = self->priv->d_makefileCache;
						_tmp9_ = c;
						_tmp10_ = gcp_c_compile_args_cache_get_makefile (_tmp9_);
						_tmp11_ = _tmp10_;
						_tmp12_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp8_, _tmp11_);
						if (_tmp12_) {
							GeeHashMap* _tmp13_;
							GcpCCompileArgsCache* _tmp14_;
							GFile* _tmp15_;
							GFile* _tmp16_;
							gpointer _tmp17_ = NULL;
							GcpCCompileArgsMakefile* m;
							GcpCCompileArgsMakefile* _tmp18_;
							GFile* _tmp19_;
							gboolean _tmp20_ = FALSE;
							_tmp13_ = self->priv->d_makefileCache;
							_tmp14_ = c;
							_tmp15_ = gcp_c_compile_args_cache_get_makefile (_tmp14_);
							_tmp16_ = _tmp15_;
							_tmp17_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp13_, _tmp16_);
							m = (GcpCCompileArgsMakefile*) _tmp17_;
							_tmp18_ = m;
							_tmp19_ = file;
							_tmp20_ = gcp_c_compile_args_makefile_remove (_tmp18_, _tmp19_);
							if (_tmp20_) {
								GeeHashMap* _tmp21_;
								GcpCCompileArgsCache* _tmp22_;
								GFile* _tmp23_;
								GFile* _tmp24_;
								_tmp21_ = self->priv->d_makefileCache;
								_tmp22_ = c;
								_tmp23_ = gcp_c_compile_args_cache_get_makefile (_tmp22_);
								_tmp24_ = _tmp23_;
								gee_abstract_map_unset ((GeeAbstractMap*) _tmp21_, _tmp24_, NULL);
							}
							_gcp_c_compile_args_makefile_unref0 (m);
						}
					}
					__finally10:
					{
						GeeHashMap* _tmp25_;
						_tmp25_ = self->priv->d_makefileCache;
						g_static_rec_mutex_unlock (&self->priv->__lock_d_makefileCache);
					}
					if (_inner_error_ != NULL) {
						_gcp_c_compile_args_cache_unref0 (c);
						_gcp_c_compile_args_cache_unref0 (c);
						{
							GeeHashMap* _tmp26_;
							_tmp26_ = self->priv->d_argsCache;
							g_static_rec_mutex_unlock (&self->priv->__lock_d_argsCache);
						}
						g_critical ("file %s: line %d: unexpected 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;
					}
				}
				_tmp27_ = self->priv->d_argsCache;
				_tmp28_ = file;
				gee_abstract_map_unset ((GeeAbstractMap*) _tmp27_, _tmp28_, NULL);
				_gcp_c_compile_args_cache_unref0 (c);
			}
		}
		__finally9:
		{
			GeeHashMap* _tmp29_;
			_tmp29_ = self->priv->d_argsCache;
			g_static_rec_mutex_unlock (&self->priv->__lock_d_argsCache);
		}
		if (_inner_error_ != NULL) {
			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;
		}
	}
}


GcpCCompileArgs* gcp_c_compile_args_construct (GType object_type) {
	GcpCCompileArgs * self = NULL;
	self = (GcpCCompileArgs*) g_object_new (object_type, NULL);
	return self;
}


GcpCCompileArgs* gcp_c_compile_args_new (void) {
	return gcp_c_compile_args_construct (GCP_C_TYPE_COMPILE_ARGS);
}


static guint _g_file_hash_ghash_func (gconstpointer key) {
	guint result;
	result = g_file_hash (key);
	return result;
}


static GObject * gcp_c_compile_args_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	GcpCCompileArgs * self;
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	parent_class = G_OBJECT_CLASS (gcp_c_compile_args_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GCP_C_TYPE_COMPILE_ARGS, GcpCCompileArgs);
	_tmp0_ = gee_hash_map_new (G_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, g_object_unref, GCP_C_COMPILE_ARGS_TYPE_CACHE, (GBoxedCopyFunc) gcp_c_compile_args_cache_ref, gcp_c_compile_args_cache_unref, _g_file_hash_ghash_func, (GEqualFunc) g_file_equal, NULL);
	_g_object_unref0 (self->priv->d_argsCache);
	self->priv->d_argsCache = _tmp0_;
	_tmp1_ = gee_hash_map_new (G_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, g_object_unref, GCP_C_COMPILE_ARGS_TYPE_MAKEFILE, (GBoxedCopyFunc) gcp_c_compile_args_makefile_ref, gcp_c_compile_args_makefile_unref, _g_file_hash_ghash_func, (GEqualFunc) g_file_equal, NULL);
	_g_object_unref0 (self->priv->d_makefileCache);
	self->priv->d_makefileCache = _tmp1_;
	return obj;
}


static gchar** _vala_array_dup2 (gchar** self, int length) {
	gchar** result;
	int i;
	result = g_new0 (gchar*, length + 1);
	for (i = 0; i < length; i++) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (self[i]);
		result[i] = _tmp0_;
	}
	return result;
}


static GcpCCompileArgsCache* gcp_c_compile_args_cache_construct (GType object_type, GFile* source, GFile* makefile, gchar** args, int args_length1) {
	GcpCCompileArgsCache* self = NULL;
	GFile* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	GFile* _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	gchar** _tmp5_;
	gint _tmp5__length1;
	g_return_val_if_fail (source != NULL, NULL);
	self = (GcpCCompileArgsCache*) g_type_create_instance (object_type);
	_tmp0_ = source;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->d_source);
	self->priv->d_source = _tmp1_;
	_tmp2_ = makefile;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->priv->d_makefile);
	self->priv->d_makefile = _tmp3_;
	_tmp4_ = args;
	_tmp4__length1 = args_length1;
	_tmp5_ = (_tmp4_ != NULL) ? _vala_array_dup2 (_tmp4_, _tmp4__length1) : ((gpointer) _tmp4_);
	_tmp5__length1 = _tmp4__length1;
	self->priv->d_args = (_vala_array_free (self->priv->d_args, self->priv->d_args_length1, (GDestroyNotify) g_free), NULL);
	self->priv->d_args = _tmp5_;
	self->priv->d_args_length1 = _tmp5__length1;
	self->priv->_d_args_size_ = self->priv->d_args_length1;
	return self;
}


static GcpCCompileArgsCache* gcp_c_compile_args_cache_new (GFile* source, GFile* makefile, gchar** args, int args_length1) {
	return gcp_c_compile_args_cache_construct (GCP_C_COMPILE_ARGS_TYPE_CACHE, source, makefile, args, args_length1);
}


static GFile* gcp_c_compile_args_cache_get_makefile (GcpCCompileArgsCache* self) {
	GFile* result;
	GFile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->d_makefile;
	result = _tmp0_;
	return result;
}


static GFile* gcp_c_compile_args_cache_get_source (GcpCCompileArgsCache* self) {
	GFile* result;
	GFile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->d_source;
	result = _tmp0_;
	return result;
}


static gchar** gcp_c_compile_args_cache_get_args (GcpCCompileArgsCache* self, int* result_length1) {
	gchar** result;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint _tmp1__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->d_args;
	_tmp0__length1 = self->priv->d_args_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}


static gchar** _vala_array_dup3 (gchar** self, int length) {
	gchar** result;
	int i;
	result = g_new0 (gchar*, length + 1);
	for (i = 0; i < length; i++) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (self[i]);
		result[i] = _tmp0_;
	}
	return result;
}


static void gcp_c_compile_args_cache_set_args (GcpCCompileArgsCache* self, gchar** value, int value_length1) {
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint _tmp1__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp0__length1 = value_length1;
	_tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup3 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
	_tmp1__length1 = _tmp0__length1;
	self->priv->d_args = (_vala_array_free (self->priv->d_args, self->priv->d_args_length1, (GDestroyNotify) g_free), NULL);
	self->priv->d_args = _tmp1_;
	self->priv->d_args_length1 = _tmp1__length1;
	self->priv->_d_args_size_ = self->priv->d_args_length1;
}


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


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


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


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


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


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


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


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


static void gcp_c_compile_args_value_set_cache (GValue* value, gpointer v_object) {
	GcpCCompileArgsCache* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GCP_C_COMPILE_ARGS_TYPE_CACHE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GCP_C_COMPILE_ARGS_TYPE_CACHE));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		gcp_c_compile_args_cache_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		gcp_c_compile_args_cache_unref (old);
	}
}


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


static void gcp_c_compile_args_cache_class_init (GcpCCompileArgsCacheClass * klass) {
	gcp_c_compile_args_cache_parent_class = g_type_class_peek_parent (klass);
	GCP_C_COMPILE_ARGS_CACHE_CLASS (klass)->finalize = gcp_c_compile_args_cache_finalize;
	g_type_class_add_private (klass, sizeof (GcpCCompileArgsCachePrivate));
}


static void gcp_c_compile_args_cache_instance_init (GcpCCompileArgsCache * self) {
	self->priv = GCP_C_COMPILE_ARGS_CACHE_GET_PRIVATE (self);
	self->ref_count = 1;
}


static void gcp_c_compile_args_cache_finalize (GcpCCompileArgsCache* obj) {
	GcpCCompileArgsCache * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GCP_C_COMPILE_ARGS_TYPE_CACHE, GcpCCompileArgsCache);
	_g_object_unref0 (self->priv->d_source);
	_g_object_unref0 (self->priv->d_makefile);
	self->priv->d_args = (_vala_array_free (self->priv->d_args, self->priv->d_args_length1, (GDestroyNotify) g_free), NULL);
}


GType gcp_c_compile_args_cache_get_type (void) {
	return gcp_c_compile_args_cache_type_id;
}


GType gcp_c_compile_args_cache_register_type (GTypeModule * module) {
	static const GTypeValueTable g_define_type_value_table = { gcp_c_compile_args_value_cache_init, gcp_c_compile_args_value_cache_free_value, gcp_c_compile_args_value_cache_copy_value, gcp_c_compile_args_value_cache_peek_pointer, "p", gcp_c_compile_args_value_cache_collect_value, "p", gcp_c_compile_args_value_cache_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (GcpCCompileArgsCacheClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gcp_c_compile_args_cache_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GcpCCompileArgsCache), 0, (GInstanceInitFunc) gcp_c_compile_args_cache_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	gcp_c_compile_args_cache_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GcpCCompileArgsCache", &g_define_type_info, &g_define_type_fundamental_info, 0);
	return gcp_c_compile_args_cache_type_id;
}


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


static void gcp_c_compile_args_cache_unref (gpointer instance) {
	GcpCCompileArgsCache* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		GCP_C_COMPILE_ARGS_CACHE_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


static void _gcp_c_compile_args_makefile_on_makefile_changed_g_file_monitor_changed (GFileMonitor* _sender, GFile* file, GFile* other_file, GFileMonitorEvent event_type, gpointer self) {
	gcp_c_compile_args_makefile_on_makefile_changed (self, file, other_file, event_type);
}


static GcpCCompileArgsMakefile* gcp_c_compile_args_makefile_construct (GType object_type, GFile* file) {
	GcpCCompileArgsMakefile* self = NULL;
	GFile* _tmp0_;
	GFile* _tmp1_;
	GeeArrayList* _tmp5_;
	GFileMonitor* _tmp6_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (file != NULL, NULL);
	self = (GcpCCompileArgsMakefile*) g_type_create_instance (object_type);
	_tmp0_ = file;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->d_file);
	self->priv->d_file = _tmp1_;
	self->priv->d_timeoutid = (guint) 0;
	_g_object_unref0 (self->priv->d_monitor);
	self->priv->d_monitor = NULL;
	{
		GFile* _tmp2_;
		GFileMonitor* _tmp3_ = NULL;
		GFileMonitor* _tmp4_;
		_tmp2_ = file;
		_tmp3_ = g_file_monitor (_tmp2_, G_FILE_MONITOR_NONE, NULL, &_inner_error_);
		_tmp4_ = _tmp3_;
		if (_inner_error_ != NULL) {
			goto __catch11_g_error;
		}
		_g_object_unref0 (self->priv->d_monitor);
		self->priv->d_monitor = _tmp4_;
	}
	goto __finally11;
	__catch11_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (_error_);
		return self;
	}
	__finally11:
	if (_inner_error_ != NULL) {
		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 NULL;
	}
	_tmp5_ = gee_array_list_new (G_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
	_g_object_unref0 (self->priv->d_sources);
	self->priv->d_sources = _tmp5_;
	_tmp6_ = self->priv->d_monitor;
	g_signal_connect (_tmp6_, "changed", (GCallback) _gcp_c_compile_args_makefile_on_makefile_changed_g_file_monitor_changed, self);
	return self;
}


static GcpCCompileArgsMakefile* gcp_c_compile_args_makefile_new (GFile* file) {
	return gcp_c_compile_args_makefile_construct (GCP_C_COMPILE_ARGS_TYPE_MAKEFILE, file);
}


static void gcp_c_compile_args_makefile_add (GcpCCompileArgsMakefile* self, GFile* source) {
	GeeArrayList* _tmp0_;
	GFile* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (source != NULL);
	_tmp0_ = self->priv->d_sources;
	_tmp1_ = source;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, _tmp1_);
}


static gboolean gcp_c_compile_args_makefile_remove (GcpCCompileArgsMakefile* self, GFile* source) {
	gboolean result = FALSE;
	GeeArrayList* _tmp0_;
	GFile* _tmp1_;
	GeeArrayList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (source != NULL, FALSE);
	_tmp0_ = self->priv->d_sources;
	_tmp1_ = source;
	gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp0_, _tmp1_);
	_tmp2_ = self->priv->d_sources;
	_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	result = _tmp4_ == 0;
	return result;
}


static gboolean _gcp_c_compile_args_makefile_on_makefile_timeout_gsource_func (gpointer self) {
	gboolean result;
	result = gcp_c_compile_args_makefile_on_makefile_timeout (self);
	return result;
}


static void gcp_c_compile_args_makefile_on_makefile_changed (GcpCCompileArgsMakefile* self, GFile* file, GFile* other, GFileMonitorEvent event_type) {
	gboolean _tmp0_ = FALSE;
	GFileMonitorEvent _tmp1_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	_tmp1_ = event_type;
	if (_tmp1_ == G_FILE_MONITOR_EVENT_CHANGED) {
		_tmp0_ = TRUE;
	} else {
		GFileMonitorEvent _tmp2_;
		_tmp2_ = event_type;
		_tmp0_ = _tmp2_ == G_FILE_MONITOR_EVENT_CREATED;
	}
	_tmp3_ = _tmp0_;
	if (_tmp3_) {
		guint _tmp4_;
		guint _tmp6_ = 0U;
		_tmp4_ = self->priv->d_timeoutid;
		if (_tmp4_ != ((guint) 0)) {
			guint _tmp5_;
			_tmp5_ = self->priv->d_timeoutid;
			g_source_remove (_tmp5_);
		}
		_tmp6_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, _gcp_c_compile_args_makefile_on_makefile_timeout_gsource_func, gcp_c_compile_args_makefile_ref (self), gcp_c_compile_args_makefile_unref);
		self->priv->d_timeoutid = _tmp6_;
	}
}


static gboolean gcp_c_compile_args_makefile_on_makefile_timeout (GcpCCompileArgsMakefile* self) {
	gboolean result = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	self->priv->d_timeoutid = (guint) 0;
	g_signal_emit_by_name (self, "changed");
	result = FALSE;
	return result;
}


static gboolean gcp_c_compile_args_makefile_get_valid (GcpCCompileArgsMakefile* self) {
	gboolean result;
	GFileMonitor* _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->d_monitor;
	result = _tmp0_ != NULL;
	return result;
}


static GeeArrayList* gcp_c_compile_args_makefile_get_sources (GcpCCompileArgsMakefile* self) {
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->d_sources;
	result = _tmp0_;
	return result;
}


static GFile* gcp_c_compile_args_makefile_get_file (GcpCCompileArgsMakefile* self) {
	GFile* result;
	GFile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->d_file;
	result = _tmp0_;
	return result;
}


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


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


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


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


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


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


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


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


static void gcp_c_compile_args_value_set_makefile (GValue* value, gpointer v_object) {
	GcpCCompileArgsMakefile* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GCP_C_COMPILE_ARGS_TYPE_MAKEFILE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GCP_C_COMPILE_ARGS_TYPE_MAKEFILE));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		gcp_c_compile_args_makefile_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		gcp_c_compile_args_makefile_unref (old);
	}
}


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


static void gcp_c_compile_args_makefile_class_init (GcpCCompileArgsMakefileClass * klass) {
	gcp_c_compile_args_makefile_parent_class = g_type_class_peek_parent (klass);
	GCP_C_COMPILE_ARGS_MAKEFILE_CLASS (klass)->finalize = gcp_c_compile_args_makefile_finalize;
	g_type_class_add_private (klass, sizeof (GcpCCompileArgsMakefilePrivate));
	g_signal_new ("changed", GCP_C_COMPILE_ARGS_TYPE_MAKEFILE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}


static void gcp_c_compile_args_makefile_instance_init (GcpCCompileArgsMakefile * self) {
	self->priv = GCP_C_COMPILE_ARGS_MAKEFILE_GET_PRIVATE (self);
	self->ref_count = 1;
}


static void gcp_c_compile_args_makefile_finalize (GcpCCompileArgsMakefile* obj) {
	GcpCCompileArgsMakefile * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GCP_C_COMPILE_ARGS_TYPE_MAKEFILE, GcpCCompileArgsMakefile);
	_g_object_unref0 (self->priv->d_file);
	_g_object_unref0 (self->priv->d_sources);
	_g_object_unref0 (self->priv->d_monitor);
}


GType gcp_c_compile_args_makefile_get_type (void) {
	return gcp_c_compile_args_makefile_type_id;
}


GType gcp_c_compile_args_makefile_register_type (GTypeModule * module) {
	static const GTypeValueTable g_define_type_value_table = { gcp_c_compile_args_value_makefile_init, gcp_c_compile_args_value_makefile_free_value, gcp_c_compile_args_value_makefile_copy_value, gcp_c_compile_args_value_makefile_peek_pointer, "p", gcp_c_compile_args_value_makefile_collect_value, "p", gcp_c_compile_args_value_makefile_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (GcpCCompileArgsMakefileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gcp_c_compile_args_makefile_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GcpCCompileArgsMakefile), 0, (GInstanceInitFunc) gcp_c_compile_args_makefile_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	gcp_c_compile_args_makefile_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GcpCCompileArgsMakefile", &g_define_type_info, &g_define_type_fundamental_info, 0);
	return gcp_c_compile_args_makefile_type_id;
}


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


static void gcp_c_compile_args_makefile_unref (gpointer instance) {
	GcpCCompileArgsMakefile* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		GCP_C_COMPILE_ARGS_MAKEFILE_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


static void gcp_c_compile_args_class_init (GcpCCompileArgsClass * klass) {
	gcp_c_compile_args_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GcpCCompileArgsPrivate));
	G_OBJECT_CLASS (klass)->constructor = gcp_c_compile_args_constructor;
	G_OBJECT_CLASS (klass)->finalize = gcp_c_compile_args_finalize;
	g_signal_new ("arguments_changed", GCP_C_TYPE_COMPILE_ARGS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_FILE);
}


static void gcp_c_compile_args_instance_init (GcpCCompileArgs * self) {
	self->priv = GCP_C_COMPILE_ARGS_GET_PRIVATE (self);
	g_static_rec_mutex_init (&self->priv->__lock_d_argsCache);
	g_static_rec_mutex_init (&self->priv->__lock_d_makefileCache);
}


static void gcp_c_compile_args_finalize (GObject* obj) {
	GcpCCompileArgs * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GCP_C_TYPE_COMPILE_ARGS, GcpCCompileArgs);
	g_static_rec_mutex_free (&self->priv->__lock_d_argsCache);
	_g_object_unref0 (self->priv->d_argsCache);
	g_static_rec_mutex_free (&self->priv->__lock_d_makefileCache);
	_g_object_unref0 (self->priv->d_makefileCache);
	G_OBJECT_CLASS (gcp_c_compile_args_parent_class)->finalize (obj);
}


GType gcp_c_compile_args_get_type (void) {
	return gcp_c_compile_args_type_id;
}


GType gcp_c_compile_args_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (GcpCCompileArgsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gcp_c_compile_args_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GcpCCompileArgs), 0, (GInstanceInitFunc) gcp_c_compile_args_instance_init, NULL };
	gcp_c_compile_args_type_id = g_type_module_register_type (module, G_TYPE_OBJECT, "GcpCCompileArgs", &g_define_type_info, 0);
	return gcp_c_compile_args_type_id;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int 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, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


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



