/* async-locking.c generated by valac 0.17.6.3-6918, the Vala compiler
 * generated from async-locking.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <folks-test.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>


#define TYPE_ASYNC_LOCKING_TESTS (async_locking_tests_get_type ())
#define ASYNC_LOCKING_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ASYNC_LOCKING_TESTS, AsyncLockingTests))
#define ASYNC_LOCKING_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ASYNC_LOCKING_TESTS, AsyncLockingTestsClass))
#define IS_ASYNC_LOCKING_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ASYNC_LOCKING_TESTS))
#define IS_ASYNC_LOCKING_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ASYNC_LOCKING_TESTS))
#define ASYNC_LOCKING_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ASYNC_LOCKING_TESTS, AsyncLockingTestsClass))

typedef struct _AsyncLockingTests AsyncLockingTests;
typedef struct _AsyncLockingTestsClass AsyncLockingTestsClass;
typedef struct _AsyncLockingTestsPrivate AsyncLockingTestsPrivate;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _AsyncLockingTestsLockedIncrementData AsyncLockingTestsLockedIncrementData;
typedef struct _AsyncLockingTestsLockedIncrementSafeData AsyncLockingTestsLockedIncrementSafeData;
typedef struct _AsyncLockingTestsSimulateWorkData AsyncLockingTestsSimulateWorkData;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _AsyncLockingTests {
	FolksTestCase parent_instance;
	AsyncLockingTestsPrivate * priv;
};

struct _AsyncLockingTestsClass {
	FolksTestCaseClass parent_class;
};

struct _AsyncLockingTestsPrivate {
	gint _counter;
	GStaticRecMutex __lock__counter;
	gboolean _counter_increment_pending;
	gint _calls_pending;
	gint _total_calls;
	GMainLoop* _loop;
};

struct _AsyncLockingTestsLockedIncrementData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	AsyncLockingTests* self;
	gint _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	GError * _inner_error_;
};

struct _AsyncLockingTestsLockedIncrementSafeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	AsyncLockingTests* self;
	gint _tmp0_;
	gboolean _tmp1_;
	gint _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	GError * _inner_error_;
};

struct _AsyncLockingTestsSimulateWorkData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	AsyncLockingTests* self;
};


static gpointer async_locking_tests_parent_class = NULL;

GType async_locking_tests_get_type (void) G_GNUC_CONST;
#define ASYNC_LOCKING_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ASYNC_LOCKING_TESTS, AsyncLockingTestsPrivate))
enum  {
	ASYNC_LOCKING_TESTS_DUMMY_PROPERTY
};
AsyncLockingTests* async_locking_tests_new (void);
AsyncLockingTests* async_locking_tests_construct (GType object_type);
void async_locking_tests_test_many_concurrent_funcs (AsyncLockingTests* self);
static void _async_locking_tests_test_many_concurrent_funcs_folks_test_case_test_method (gpointer self);
void async_locking_tests_test_many_concurrent_funcs_safe (AsyncLockingTests* self);
static void _async_locking_tests_test_many_concurrent_funcs_safe_folks_test_case_test_method (gpointer self);
static void async_locking_tests_real_set_up (FolksTestCase* base);
static void async_locking_tests_real_tear_down (FolksTestCase* base);
static gboolean __lambda2_ (AsyncLockingTests* self);
static void async_locking_tests_locked_increment (AsyncLockingTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void async_locking_tests_locked_increment_finish (AsyncLockingTests* self, GAsyncResult* _res_);
static void async_locking_tests_increment_handler (AsyncLockingTests* self, GObject* source, GAsyncResult* _result_);
static void _async_locking_tests_increment_handler_gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static gboolean ___lambda2__gsource_func (gpointer self);
static void async_locking_tests_locked_increment_data_free (gpointer _data);
static gboolean async_locking_tests_locked_increment_co (AsyncLockingTestsLockedIncrementData* _data_);
static void async_locking_tests_simulate_work (AsyncLockingTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void async_locking_tests_simulate_work_finish (AsyncLockingTests* self, GAsyncResult* _res_);
static void async_locking_tests_locked_increment_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static gboolean __lambda3_ (AsyncLockingTests* self);
static void async_locking_tests_locked_increment_safe (AsyncLockingTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void async_locking_tests_locked_increment_safe_finish (AsyncLockingTests* self, GAsyncResult* _res_);
static void async_locking_tests_increment_handler_safe (AsyncLockingTests* self, GObject* source, GAsyncResult* _result_);
static void _async_locking_tests_increment_handler_safe_gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static gboolean ___lambda3__gsource_func (gpointer self);
static void async_locking_tests_locked_increment_safe_data_free (gpointer _data);
static gboolean async_locking_tests_locked_increment_safe_co (AsyncLockingTestsLockedIncrementSafeData* _data_);
static void async_locking_tests_locked_increment_safe_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void async_locking_tests_simulate_work_data_free (gpointer _data);
static gboolean async_locking_tests_simulate_work_co (AsyncLockingTestsSimulateWorkData* _data_);
static void async_locking_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _async_locking_tests_test_many_concurrent_funcs_folks_test_case_test_method (gpointer self) {
#line 18 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	async_locking_tests_test_many_concurrent_funcs (self);
#line 131 "async-locking.c"
}


static void _async_locking_tests_test_many_concurrent_funcs_safe_folks_test_case_test_method (gpointer self) {
#line 19 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	async_locking_tests_test_many_concurrent_funcs_safe (self);
#line 138 "async-locking.c"
}


AsyncLockingTests* async_locking_tests_construct (GType object_type) {
	AsyncLockingTests * self = NULL;
#line 17 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self = (AsyncLockingTests*) folks_test_case_construct (object_type, "AsyncLocking");
#line 18 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "many concurrent funcs", _async_locking_tests_test_many_concurrent_funcs_folks_test_case_test_method, self);
#line 19 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	folks_test_case_add_test ((FolksTestCase*) self, "many concurrent funcs (safe)", _async_locking_tests_test_many_concurrent_funcs_safe_folks_test_case_test_method, self);
#line 15 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	return self;
#line 152 "async-locking.c"
}


AsyncLockingTests* async_locking_tests_new (void) {
#line 15 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	return async_locking_tests_construct (TYPE_ASYNC_LOCKING_TESTS);
#line 159 "async-locking.c"
}


static void async_locking_tests_real_set_up (FolksTestCase* base) {
	AsyncLockingTests * self;
#line 23 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self = (AsyncLockingTests*) base;
#line 25 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self->priv->_counter = 0;
#line 26 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self->priv->_calls_pending = 0;
#line 27 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self->priv->_counter_increment_pending = FALSE;
#line 173 "async-locking.c"
}


static void async_locking_tests_real_tear_down (FolksTestCase* base) {
	AsyncLockingTests * self;
#line 30 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self = (AsyncLockingTests*) base;
#line 181 "async-locking.c"
}


static void _async_locking_tests_increment_handler_gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 44 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	async_locking_tests_increment_handler (self, source_object, res);
#line 44 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_object_unref (self);
#line 190 "async-locking.c"
}


static gboolean __lambda2_ (AsyncLockingTests* self) {
	gboolean result = FALSE;
	{
		gint i;
#line 41 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		i = 0;
#line 200 "async-locking.c"
		{
			gboolean _tmp0_;
#line 41 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			_tmp0_ = TRUE;
#line 41 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			while (TRUE) {
#line 207 "async-locking.c"
				gboolean _tmp1_;
				gint _tmp3_;
				gint _tmp4_;
				gint _tmp5_;
#line 41 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_tmp1_ = _tmp0_;
#line 41 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				if (!_tmp1_) {
#line 216 "async-locking.c"
					gint _tmp2_;
#line 41 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
					_tmp2_ = i;
#line 41 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
					i = _tmp2_ + 1;
#line 222 "async-locking.c"
				}
#line 41 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_tmp0_ = FALSE;
#line 41 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_tmp3_ = i;
#line 41 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_tmp4_ = self->priv->_total_calls;
#line 41 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				if (!(_tmp3_ < _tmp4_)) {
#line 41 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
					break;
#line 234 "async-locking.c"
				}
#line 43 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_tmp5_ = self->priv->_calls_pending;
#line 43 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				self->priv->_calls_pending = _tmp5_ + 1;
#line 44 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				async_locking_tests_locked_increment (self, _async_locking_tests_increment_handler_gasync_ready_callback, g_object_ref (self));
#line 242 "async-locking.c"
			}
		}
	}
#line 47 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	result = FALSE;
#line 47 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	return result;
#line 250 "async-locking.c"
}


static gboolean ___lambda2__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda2_ (self);
#line 39 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	return result;
#line 259 "async-locking.c"
}


void async_locking_tests_test_many_concurrent_funcs (AsyncLockingTests* self) {
	GMainLoop* _tmp0_;
	GMainLoop* _tmp1_;
#line 34 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_return_if_fail (self != NULL);
#line 36 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 36 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_g_main_loop_unref0 (self->priv->_loop);
#line 36 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self->priv->_loop = _tmp0_;
#line 37 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self->priv->_total_calls = 100;
#line 39 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda2__gsource_func, g_object_ref (self), g_object_unref);
#line 50 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp1_ = self->priv->_loop;
#line 50 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_main_loop_run (_tmp1_);
#line 282 "async-locking.c"
}


static void async_locking_tests_increment_handler (AsyncLockingTests* self, GObject* source, GAsyncResult* _result_) {
	GAsyncResult* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
#line 53 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_return_if_fail (self != NULL);
#line 53 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_return_if_fail (_result_ != NULL);
#line 55 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp0_ = _result_;
#line 55 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	async_locking_tests_locked_increment_finish (self, _tmp0_);
#line 58 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp1_ = self->priv->_counter;
#line 58 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_vala_assert (_tmp1_ >= 1, "this._counter >= 1");
#line 60 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp2_ = self->priv->_calls_pending;
#line 60 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self->priv->_calls_pending = _tmp2_ - 1;
#line 61 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp3_ = self->priv->_calls_pending;
#line 61 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	if (_tmp3_ == 0) {
#line 311 "async-locking.c"
		gint _tmp4_;
		GMainLoop* _tmp5_;
#line 63 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		_tmp4_ = self->priv->_counter;
#line 63 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_print ("\n    final counter value: %d " "(would be 1 if this weren't intentionally broken)\n", _tmp4_);
#line 66 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		_tmp5_ = self->priv->_loop;
#line 66 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_main_loop_quit (_tmp5_);
#line 322 "async-locking.c"
	}
}


static void async_locking_tests_locked_increment_data_free (gpointer _data) {
	AsyncLockingTestsLockedIncrementData* _data_;
	_data_ = _data;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_g_object_unref0 (_data_->self);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_slice_free (AsyncLockingTestsLockedIncrementData, _data_);
#line 334 "async-locking.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	return self ? g_object_ref (self) : NULL;
#line 341 "async-locking.c"
}


static void async_locking_tests_locked_increment (AsyncLockingTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	AsyncLockingTestsLockedIncrementData* _data_;
	AsyncLockingTests* _tmp0_;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_ = g_slice_new0 (AsyncLockingTestsLockedIncrementData);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, async_locking_tests_locked_increment);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, async_locking_tests_locked_increment_data_free);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_->self = _tmp0_;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	async_locking_tests_locked_increment_co (_data_);
#line 360 "async-locking.c"
}


static void async_locking_tests_locked_increment_finish (AsyncLockingTests* self, GAsyncResult* _res_) {
	AsyncLockingTestsLockedIncrementData* _data_;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 368 "async-locking.c"
}


static void async_locking_tests_locked_increment_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	AsyncLockingTestsLockedIncrementData* _data_;
#line 80 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_ = _user_data_;
#line 80 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_->_source_object_ = source_object;
#line 80 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_->_res_ = _res_;
#line 80 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	async_locking_tests_locked_increment_co (_data_);
#line 382 "async-locking.c"
}


static gboolean async_locking_tests_locked_increment_co (AsyncLockingTestsLockedIncrementData* _data_) {
#line 70 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	switch (_data_->_state_) {
#line 70 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		case 0:
#line 391 "async-locking.c"
		goto _state_0;
#line 70 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		case 1:
#line 395 "async-locking.c"
		goto _state_1;
		default:
#line 70 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_assert_not_reached ();
#line 400 "async-locking.c"
	}
	_state_0:
	{
#line 72 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		_data_->_tmp0_ = _data_->self->priv->_counter;
#line 72 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_static_rec_mutex_lock (&_data_->self->priv->__lock__counter);
#line 408 "async-locking.c"
		{
#line 74 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			_data_->_tmp1_ = _data_->self->priv->_counter;
#line 74 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			if (_data_->_tmp1_ < 1) {
#line 80 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_data_->_state_ = 1;
#line 80 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				async_locking_tests_simulate_work (_data_->self, async_locking_tests_locked_increment_ready, _data_);
#line 80 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				return FALSE;
#line 420 "async-locking.c"
				_state_1:
#line 80 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				async_locking_tests_simulate_work_finish (_data_->self, _data_->_res_);
#line 85 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_data_->_tmp2_ = _data_->self->priv->_counter;
#line 85 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_data_->self->priv->_counter = _data_->_tmp2_ + 1;
#line 428 "async-locking.c"
			}
		}
		__finally0:
		{
#line 72 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			_data_->_tmp3_ = _data_->self->priv->_counter;
#line 72 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			g_static_rec_mutex_unlock (&_data_->self->priv->__lock__counter);
#line 437 "async-locking.c"
		}
#line 72 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		if (_data_->_inner_error_ != NULL) {
#line 72 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			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);
#line 72 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			g_clear_error (&_data_->_inner_error_);
#line 72 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			return FALSE;
#line 447 "async-locking.c"
		}
	}
#line 70 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	if (_data_->_state_ == 0) {
#line 70 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 454 "async-locking.c"
	} else {
#line 70 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 458 "async-locking.c"
	}
#line 70 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_object_unref (_data_->_async_result);
#line 70 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	return FALSE;
#line 464 "async-locking.c"
}


static void _async_locking_tests_increment_handler_safe_gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 102 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	async_locking_tests_increment_handler_safe (self, source_object, res);
#line 102 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_object_unref (self);
#line 473 "async-locking.c"
}


static gboolean __lambda3_ (AsyncLockingTests* self) {
	gboolean result = FALSE;
	{
		gint i;
#line 99 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		i = 0;
#line 483 "async-locking.c"
		{
			gboolean _tmp0_;
#line 99 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			_tmp0_ = TRUE;
#line 99 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			while (TRUE) {
#line 490 "async-locking.c"
				gboolean _tmp1_;
				gint _tmp3_;
				gint _tmp4_;
				gint _tmp5_;
#line 99 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_tmp1_ = _tmp0_;
#line 99 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				if (!_tmp1_) {
#line 499 "async-locking.c"
					gint _tmp2_;
#line 99 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
					_tmp2_ = i;
#line 99 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
					i = _tmp2_ + 1;
#line 505 "async-locking.c"
				}
#line 99 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_tmp0_ = FALSE;
#line 99 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_tmp3_ = i;
#line 99 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_tmp4_ = self->priv->_total_calls;
#line 99 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				if (!(_tmp3_ < _tmp4_)) {
#line 99 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
					break;
#line 517 "async-locking.c"
				}
#line 101 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_tmp5_ = self->priv->_calls_pending;
#line 101 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				self->priv->_calls_pending = _tmp5_ + 1;
#line 102 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				async_locking_tests_locked_increment_safe (self, _async_locking_tests_increment_handler_safe_gasync_ready_callback, g_object_ref (self));
#line 525 "async-locking.c"
			}
		}
	}
#line 105 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	result = FALSE;
#line 105 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	return result;
#line 533 "async-locking.c"
}


static gboolean ___lambda3__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda3_ (self);
#line 97 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	return result;
#line 542 "async-locking.c"
}


void async_locking_tests_test_many_concurrent_funcs_safe (AsyncLockingTests* self) {
	GMainLoop* _tmp0_;
	GMainLoop* _tmp1_;
#line 90 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_return_if_fail (self != NULL);
#line 92 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 92 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_g_main_loop_unref0 (self->priv->_loop);
#line 92 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self->priv->_loop = _tmp0_;
#line 93 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self->priv->_total_calls = 100;
#line 94 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self->priv->_calls_pending = 0;
#line 95 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self->priv->_counter_increment_pending = FALSE;
#line 97 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda3__gsource_func, g_object_ref (self), g_object_unref);
#line 108 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp1_ = self->priv->_loop;
#line 108 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_main_loop_run (_tmp1_);
#line 569 "async-locking.c"
}


static void async_locking_tests_increment_handler_safe (AsyncLockingTests* self, GObject* source, GAsyncResult* _result_) {
	GAsyncResult* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
#line 111 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_return_if_fail (self != NULL);
#line 111 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_return_if_fail (_result_ != NULL);
#line 114 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp0_ = _result_;
#line 114 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	async_locking_tests_locked_increment_safe_finish (self, _tmp0_);
#line 118 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp1_ = self->priv->_counter;
#line 118 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_vala_assert (_tmp1_ == 1, "this._counter == 1");
#line 120 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp2_ = self->priv->_calls_pending;
#line 120 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self->priv->_calls_pending = _tmp2_ - 1;
#line 121 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp3_ = self->priv->_calls_pending;
#line 121 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	if (_tmp3_ == 0) {
#line 598 "async-locking.c"
		gint _tmp4_;
		gint _tmp5_;
		GMainLoop* _tmp6_;
#line 123 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		_tmp4_ = self->priv->_counter;
#line 123 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_print ("\n    final counter value: %d\n", _tmp4_);
#line 124 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		_tmp5_ = self->priv->_counter;
#line 124 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		_vala_assert (_tmp5_ == 1, "this._counter == 1");
#line 126 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		_tmp6_ = self->priv->_loop;
#line 126 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_main_loop_quit (_tmp6_);
#line 614 "async-locking.c"
	}
}


static void async_locking_tests_locked_increment_safe_data_free (gpointer _data) {
	AsyncLockingTestsLockedIncrementSafeData* _data_;
	_data_ = _data;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_g_object_unref0 (_data_->self);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_slice_free (AsyncLockingTestsLockedIncrementSafeData, _data_);
#line 626 "async-locking.c"
}


static void async_locking_tests_locked_increment_safe (AsyncLockingTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	AsyncLockingTestsLockedIncrementSafeData* _data_;
	AsyncLockingTests* _tmp0_;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_ = g_slice_new0 (AsyncLockingTestsLockedIncrementSafeData);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, async_locking_tests_locked_increment_safe);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, async_locking_tests_locked_increment_safe_data_free);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_->self = _tmp0_;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	async_locking_tests_locked_increment_safe_co (_data_);
#line 645 "async-locking.c"
}


static void async_locking_tests_locked_increment_safe_finish (AsyncLockingTests* self, GAsyncResult* _res_) {
	AsyncLockingTestsLockedIncrementSafeData* _data_;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 653 "async-locking.c"
}


static void async_locking_tests_locked_increment_safe_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	AsyncLockingTestsLockedIncrementSafeData* _data_;
#line 137 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_ = _user_data_;
#line 137 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_->_source_object_ = source_object;
#line 137 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_->_res_ = _res_;
#line 137 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	async_locking_tests_locked_increment_safe_co (_data_);
#line 667 "async-locking.c"
}


static gboolean async_locking_tests_locked_increment_safe_co (AsyncLockingTestsLockedIncrementSafeData* _data_) {
#line 130 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	switch (_data_->_state_) {
#line 130 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		case 0:
#line 676 "async-locking.c"
		goto _state_0;
#line 130 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		case 1:
#line 680 "async-locking.c"
		goto _state_1;
		default:
#line 130 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_assert_not_reached ();
#line 685 "async-locking.c"
	}
	_state_0:
	{
#line 132 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		_data_->_tmp0_ = _data_->self->priv->_counter;
#line 132 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_static_rec_mutex_lock (&_data_->self->priv->__lock__counter);
#line 693 "async-locking.c"
		{
#line 134 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			_data_->_tmp2_ = _data_->self->priv->_counter;
#line 134 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			if (_data_->_tmp2_ < 1) {
#line 134 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_data_->_tmp3_ = _data_->self->priv->_counter_increment_pending;
#line 134 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_data_->_tmp1_ = !_data_->_tmp3_;
#line 703 "async-locking.c"
			} else {
#line 134 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_data_->_tmp1_ = FALSE;
#line 707 "async-locking.c"
			}
#line 134 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			_data_->_tmp4_ = _data_->_tmp1_;
#line 134 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			if (_data_->_tmp4_) {
#line 136 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_data_->self->priv->_counter_increment_pending = TRUE;
#line 137 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_data_->_state_ = 1;
#line 137 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				async_locking_tests_simulate_work (_data_->self, async_locking_tests_locked_increment_safe_ready, _data_);
#line 137 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				return FALSE;
#line 721 "async-locking.c"
				_state_1:
#line 137 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				async_locking_tests_simulate_work_finish (_data_->self, _data_->_res_);
#line 142 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_data_->_tmp5_ = _data_->self->priv->_counter;
#line 142 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
				_data_->self->priv->_counter = _data_->_tmp5_ + 1;
#line 729 "async-locking.c"
			}
		}
		__finally1:
		{
#line 132 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			_data_->_tmp6_ = _data_->self->priv->_counter;
#line 132 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			g_static_rec_mutex_unlock (&_data_->self->priv->__lock__counter);
#line 738 "async-locking.c"
		}
#line 132 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		if (_data_->_inner_error_ != NULL) {
#line 132 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			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);
#line 132 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			g_clear_error (&_data_->_inner_error_);
#line 132 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
			return FALSE;
#line 748 "async-locking.c"
		}
	}
#line 130 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	if (_data_->_state_ == 0) {
#line 130 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 755 "async-locking.c"
	} else {
#line 130 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 759 "async-locking.c"
	}
#line 130 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_object_unref (_data_->_async_result);
#line 130 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	return FALSE;
#line 765 "async-locking.c"
}


static void async_locking_tests_simulate_work_data_free (gpointer _data) {
	AsyncLockingTestsSimulateWorkData* _data_;
	_data_ = _data;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_g_object_unref0 (_data_->self);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_slice_free (AsyncLockingTestsSimulateWorkData, _data_);
#line 776 "async-locking.c"
}


static void async_locking_tests_simulate_work (AsyncLockingTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	AsyncLockingTestsSimulateWorkData* _data_;
	AsyncLockingTests* _tmp0_;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_ = g_slice_new0 (AsyncLockingTestsSimulateWorkData);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, async_locking_tests_simulate_work);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, async_locking_tests_simulate_work_data_free);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_->self = _tmp0_;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	async_locking_tests_simulate_work_co (_data_);
#line 795 "async-locking.c"
}


static void async_locking_tests_simulate_work_finish (AsyncLockingTests* self, GAsyncResult* _res_) {
	AsyncLockingTestsSimulateWorkData* _data_;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 803 "async-locking.c"
}


static gboolean async_locking_tests_simulate_work_co (AsyncLockingTestsSimulateWorkData* _data_) {
#line 147 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	switch (_data_->_state_) {
#line 147 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		case 0:
#line 812 "async-locking.c"
		goto _state_0;
		default:
#line 147 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_assert_not_reached ();
#line 817 "async-locking.c"
	}
	_state_0:
#line 149 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_usleep ((gulong) (50 * 1000));
#line 147 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	if (_data_->_state_ == 0) {
#line 147 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 826 "async-locking.c"
	} else {
#line 147 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 830 "async-locking.c"
	}
#line 147 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_object_unref (_data_->_async_result);
#line 147 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	return FALSE;
#line 836 "async-locking.c"
}


static void async_locking_tests_class_init (AsyncLockingTestsClass * klass) {
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	async_locking_tests_parent_class = g_type_class_peek_parent (klass);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_type_class_add_private (klass, sizeof (AsyncLockingTestsPrivate));
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	FOLKS_TEST_CASE_CLASS (klass)->set_up = async_locking_tests_real_set_up;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = async_locking_tests_real_tear_down;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	G_OBJECT_CLASS (klass)->finalize = async_locking_tests_finalize;
#line 851 "async-locking.c"
}


static void async_locking_tests_instance_init (AsyncLockingTests * self) {
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self->priv = ASYNC_LOCKING_TESTS_GET_PRIVATE (self);
#line 6 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_static_rec_mutex_init (&self->priv->__lock__counter);
#line 860 "async-locking.c"
}


static void async_locking_tests_finalize (GObject* obj) {
	AsyncLockingTests * self;
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ASYNC_LOCKING_TESTS, AsyncLockingTests);
#line 6 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_static_rec_mutex_free (&self->priv->__lock__counter);
#line 10 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_g_main_loop_unref0 (self->priv->_loop);
#line 4 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	G_OBJECT_CLASS (async_locking_tests_parent_class)->finalize (obj);
#line 874 "async-locking.c"
}


GType async_locking_tests_get_type (void) {
	static volatile gsize async_locking_tests_type_id__volatile = 0;
	if (g_once_init_enter (&async_locking_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AsyncLockingTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) async_locking_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AsyncLockingTests), 0, (GInstanceInitFunc) async_locking_tests_instance_init, NULL };
		GType async_locking_tests_type_id;
		async_locking_tests_type_id = g_type_register_static (FOLKS_TYPE_TEST_CASE, "AsyncLockingTests", &g_define_type_info, 0);
		g_once_init_leave (&async_locking_tests_type_id__volatile, async_locking_tests_type_id);
	}
	return async_locking_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* _tmp0_ = NULL;
	GTestSuite* root;
	AsyncLockingTests* _tmp1_;
	AsyncLockingTests* _tmp2_;
	GTestSuite* _tmp3_ = NULL;
#line 155 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_test_init (&args_length1, &args, NULL);
#line 157 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp0_ = g_test_get_root ();
#line 157 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	root = _tmp0_;
#line 158 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp1_ = async_locking_tests_new ();
#line 158 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp2_ = _tmp1_;
#line 158 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_tmp3_ = folks_test_case_get_suite ((FolksTestCase*) _tmp2_);
#line 158 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_test_suite_add_suite (root, _tmp3_);
#line 158 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	_g_object_unref0 (_tmp2_);
#line 160 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_test_run ();
#line 162 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	result = 0;
#line 162 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	return result;
#line 919 "async-locking.c"
}


int main (int argc, char ** argv) {
#line 153 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	g_type_init ();
#line 153 "/home/jpwhiting/devel/collabora/src/gnome/folks/tests/folks/async-locking.vala"
	return _vala_main (argv, argc);
#line 928 "async-locking.c"
}



