/* gitg-recursive-scanner.c generated by valac 0.56.19, the Vala compiler
 * generated from gitg-recursive-scanner.vala, do not modify */

/*
 *
 * Copyright (C) 2015 - Jesse van den Kieboom
 *
 * gitg 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 2 of the License, or
 * (at your option) any later version.
 *
 * gitg 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 gitg. If not, see <http://www.gnu.org/licenses/>.
 */

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

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

#define GITG_TYPE_RECURSIVE_SCANNER (gitg_recursive_scanner_get_type ())
#define GITG_RECURSIVE_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_RECURSIVE_SCANNER, GitgRecursiveScanner))
#define GITG_IS_RECURSIVE_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_RECURSIVE_SCANNER))
#define GITG_RECURSIVE_SCANNER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GITG_TYPE_RECURSIVE_SCANNER, GitgRecursiveScannerIface))

typedef struct _GitgRecursiveScanner GitgRecursiveScanner;
typedef struct _GitgRecursiveScannerIface GitgRecursiveScannerIface;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _GitgRecursiveScannerScanVisitFileData GitgRecursiveScannerScanVisitFileData;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _GitgRecursiveScannerScanVisitDirectoryData GitgRecursiveScannerScanVisitDirectoryData;
typedef struct _GitgRecursiveScannerScanData GitgRecursiveScannerScanData;
typedef struct _GitgRecursiveScannerScanRealData GitgRecursiveScannerScanRealData;

struct _GitgRecursiveScannerIface {
	GTypeInterface parent_iface;
	void (*scan_visit_file) (GitgRecursiveScanner* self, GFile* file, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*scan_visit_file_finish) (GitgRecursiveScanner* self, GAsyncResult* _res_);
	void (*scan_visit_directory) (GitgRecursiveScanner* self, GFile* file, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*scan_visit_directory_finish) (GitgRecursiveScanner* self, GAsyncResult* _res_);
};

struct _GitgRecursiveScannerScanVisitFileData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GitgRecursiveScanner* self;
	GFile* file;
	GCancellable* cancellable;
};

struct _GitgRecursiveScannerScanVisitDirectoryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GitgRecursiveScanner* self;
	GFile* file;
	GCancellable* cancellable;
	gboolean result;
};

struct _GitgRecursiveScannerScanData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GitgRecursiveScanner* self;
	GFile* location;
	GCancellable* cancellable;
	GeeHashSet* _tmp0_;
	GeeHashSet* _tmp1_;
};

struct _GitgRecursiveScannerScanRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GitgRecursiveScanner* self;
	GFile* location;
	GCancellable* cancellable;
	GeeHashSet* seen;
	gboolean _tmp0_;
	GFileEnumerator* e;
	GFileEnumerator* _tmp1_;
	GFileEnumerator* _tmp2_;
	GFileEnumerator* _tmp3_;
	gboolean _tmp4_;
	GList* files;
	GList* _tmp5_;
	GFileEnumerator* _tmp6_;
	GList* _tmp7_;
	GList* _tmp8_;
	GList* _tmp9_;
	GList* _tmp10_;
	GList* f_collection;
	GList* f_it;
	GFileInfo* _tmp11_;
	GFileInfo* f;
	GFile* file;
	GFileInfo* _tmp12_;
	const gchar* _tmp13_;
	GFile* _tmp14_;
	GFile* _tmp15_;
	GFile* _tmp16_;
	GFile* _tmp17_;
	GFileInfo* _tmp18_;
	GFile* _tmp19_;
	GFile* _tmp20_;
	GFileEnumerator* _tmp21_;
	GError* _inner_error0_;
};

VALA_EXTERN GType gitg_recursive_scanner_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GitgRecursiveScanner, g_object_unref)
static void gitg_recursive_scanner_real_scan_visit_file_data_free (gpointer _data);
static void gitg_recursive_scanner_real_scan_visit_file (GitgRecursiveScanner* self,
                                                  GFile* file,
                                                  GCancellable* cancellable,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
VALA_EXTERN void gitg_recursive_scanner_scan_visit_file (GitgRecursiveScanner* self,
                                             GFile* file,
                                             GCancellable* cancellable,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
VALA_EXTERN void gitg_recursive_scanner_scan_visit_file_finish (GitgRecursiveScanner* self,
                                                    GAsyncResult* _res_);
static gboolean gitg_recursive_scanner_real_scan_visit_file_co (GitgRecursiveScannerScanVisitFileData* _data_);
VALA_EXTERN gboolean gitg_recursive_scanner_scan_visit_directory_default (GitgRecursiveScanner* self,
                                                              GFile* file);
static void gitg_recursive_scanner_real_scan_visit_directory_data_free (gpointer _data);
static void gitg_recursive_scanner_real_scan_visit_directory (GitgRecursiveScanner* self,
                                                       GFile* file,
                                                       GCancellable* cancellable,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_);
VALA_EXTERN void gitg_recursive_scanner_scan_visit_directory (GitgRecursiveScanner* self,
                                                  GFile* file,
                                                  GCancellable* cancellable,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
VALA_EXTERN gboolean gitg_recursive_scanner_scan_visit_directory_finish (GitgRecursiveScanner* self,
                                                             GAsyncResult* _res_);
static gboolean gitg_recursive_scanner_real_scan_visit_directory_co (GitgRecursiveScannerScanVisitDirectoryData* _data_);
static void gitg_recursive_scanner_scan_data_free (gpointer _data);
VALA_EXTERN void gitg_recursive_scanner_scan (GitgRecursiveScanner* self,
                                  GFile* location,
                                  GCancellable* cancellable,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_);
VALA_EXTERN void gitg_recursive_scanner_scan_finish (GitgRecursiveScanner* self,
                                         GAsyncResult* _res_);
static gboolean gitg_recursive_scanner_scan_co (GitgRecursiveScannerScanData* _data_);
static void gitg_recursive_scanner_scan_real (GitgRecursiveScanner* self,
                                       GFile* location,
                                       GCancellable* cancellable,
                                       GeeHashSet* seen,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_);
static void gitg_recursive_scanner_scan_real_finish (GitgRecursiveScanner* self,
                                              GAsyncResult* _res_);
static guint __lambda154_ (GitgRecursiveScanner* self,
                    GFile* file);
static guint ___lambda154__gee_hash_data_func (gconstpointer v,
                                        gpointer self);
static gboolean __lambda155_ (GitgRecursiveScanner* self,
                       GFile* file,
                       GFile* other);
static gboolean ___lambda155__gee_equal_data_func (gconstpointer a,
                                            gconstpointer b,
                                            gpointer self);
static void gitg_recursive_scanner_scan_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_);
static void gitg_recursive_scanner_scan_real_data_free (gpointer _data);
static gboolean gitg_recursive_scanner_scan_real_co (GitgRecursiveScannerScanRealData* _data_);
static void gitg_recursive_scanner_scan_real_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static GType gitg_recursive_scanner_get_type_once (void);

static void
gitg_recursive_scanner_real_scan_visit_file_data_free (gpointer _data)
{
	GitgRecursiveScannerScanVisitFileData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->file);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (GitgRecursiveScannerScanVisitFileData, _data_);
}

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

static void
gitg_recursive_scanner_real_scan_visit_file (GitgRecursiveScanner* self,
                                             GFile* file,
                                             GCancellable* cancellable,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	GitgRecursiveScannerScanVisitFileData* _data_;
	GitgRecursiveScanner* _tmp0_;
	GFile* _tmp1_;
	GCancellable* _tmp2_;
	g_return_if_fail (file != NULL);
	_data_ = g_slice_new0 (GitgRecursiveScannerScanVisitFileData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, gitg_recursive_scanner_real_scan_visit_file_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (file);
	_g_object_unref0 (_data_->file);
	_data_->file = _tmp1_;
	_tmp2_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	gitg_recursive_scanner_real_scan_visit_file_co (_data_);
}

static void
gitg_recursive_scanner_real_scan_visit_file_finish (GitgRecursiveScanner* self,
                                                    GAsyncResult* _res_)
{
	GitgRecursiveScannerScanVisitFileData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
gitg_recursive_scanner_real_scan_visit_file_co (GitgRecursiveScannerScanVisitFileData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
gitg_recursive_scanner_scan_visit_file (GitgRecursiveScanner* self,
                                        GFile* file,
                                        GCancellable* cancellable,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	GitgRecursiveScannerIface* _iface_;
	_iface_ = GITG_RECURSIVE_SCANNER_GET_INTERFACE (self);
	if (_iface_->scan_visit_file) {
		_iface_->scan_visit_file (self, file, cancellable, _callback_, _user_data_);
	}
}

void
gitg_recursive_scanner_scan_visit_file_finish (GitgRecursiveScanner* self,
                                               GAsyncResult* _res_)
{
	GitgRecursiveScannerIface* _iface_;
	_iface_ = GITG_RECURSIVE_SCANNER_GET_INTERFACE (self);
	if (_iface_->scan_visit_file_finish) {
		_iface_->scan_visit_file_finish (self, _res_);
	}
}

gboolean
gitg_recursive_scanner_scan_visit_directory_default (GitgRecursiveScanner* self,
                                                     GFile* file)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	gboolean result;
	g_return_val_if_fail (file != NULL, FALSE);
	_tmp0_ = g_file_get_basename (file);
	_tmp1_ = _tmp0_;
	_tmp2_ = !g_str_has_prefix (_tmp1_, ".");
	_g_free0 (_tmp1_);
	result = _tmp2_;
	return result;
}

static void
gitg_recursive_scanner_real_scan_visit_directory_data_free (gpointer _data)
{
	GitgRecursiveScannerScanVisitDirectoryData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->file);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (GitgRecursiveScannerScanVisitDirectoryData, _data_);
}

static void
gitg_recursive_scanner_real_scan_visit_directory (GitgRecursiveScanner* self,
                                                  GFile* file,
                                                  GCancellable* cancellable,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_)
{
	GitgRecursiveScannerScanVisitDirectoryData* _data_;
	GitgRecursiveScanner* _tmp0_;
	GFile* _tmp1_;
	GCancellable* _tmp2_;
	g_return_if_fail (file != NULL);
	_data_ = g_slice_new0 (GitgRecursiveScannerScanVisitDirectoryData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, gitg_recursive_scanner_real_scan_visit_directory_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (file);
	_g_object_unref0 (_data_->file);
	_data_->file = _tmp1_;
	_tmp2_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	gitg_recursive_scanner_real_scan_visit_directory_co (_data_);
}

static gboolean
gitg_recursive_scanner_real_scan_visit_directory_finish (GitgRecursiveScanner* self,
                                                         GAsyncResult* _res_)
{
	gboolean result;
	GitgRecursiveScannerScanVisitDirectoryData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		gboolean _tmp0_ = FALSE;
		return _tmp0_;
	}
	result = _data_->result;
	return result;
}

static gboolean
gitg_recursive_scanner_real_scan_visit_directory_co (GitgRecursiveScannerScanVisitDirectoryData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->result = gitg_recursive_scanner_scan_visit_directory_default (_data_->self, _data_->file);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
gitg_recursive_scanner_scan_visit_directory (GitgRecursiveScanner* self,
                                             GFile* file,
                                             GCancellable* cancellable,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	GitgRecursiveScannerIface* _iface_;
	_iface_ = GITG_RECURSIVE_SCANNER_GET_INTERFACE (self);
	if (_iface_->scan_visit_directory) {
		_iface_->scan_visit_directory (self, file, cancellable, _callback_, _user_data_);
	}
}

gboolean
gitg_recursive_scanner_scan_visit_directory_finish (GitgRecursiveScanner* self,
                                                    GAsyncResult* _res_)
{
	GitgRecursiveScannerIface* _iface_;
	_iface_ = GITG_RECURSIVE_SCANNER_GET_INTERFACE (self);
	if (_iface_->scan_visit_directory_finish) {
		return _iface_->scan_visit_directory_finish (self, _res_);
	}
	return FALSE;
}

static void
gitg_recursive_scanner_scan_data_free (gpointer _data)
{
	GitgRecursiveScannerScanData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->location);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (GitgRecursiveScannerScanData, _data_);
}

void
gitg_recursive_scanner_scan (GitgRecursiveScanner* self,
                             GFile* location,
                             GCancellable* cancellable,
                             GAsyncReadyCallback _callback_,
                             gpointer _user_data_)
{
	GitgRecursiveScannerScanData* _data_;
	GitgRecursiveScanner* _tmp0_;
	GFile* _tmp1_;
	GCancellable* _tmp2_;
	g_return_if_fail (location != NULL);
	_data_ = g_slice_new0 (GitgRecursiveScannerScanData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, gitg_recursive_scanner_scan_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (location);
	_g_object_unref0 (_data_->location);
	_data_->location = _tmp1_;
	_tmp2_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	gitg_recursive_scanner_scan_co (_data_);
}

void
gitg_recursive_scanner_scan_finish (GitgRecursiveScanner* self,
                                    GAsyncResult* _res_)
{
	GitgRecursiveScannerScanData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		return;
	}
}

static guint
__lambda154_ (GitgRecursiveScanner* self,
              GFile* file)
{
	guint result;
	g_return_val_if_fail (file != NULL, 0U);
	result = g_file_hash (file);
	return result;
}

static guint
___lambda154__gee_hash_data_func (gconstpointer v,
                                  gpointer self)
{
	guint result;
	result = __lambda154_ ((GitgRecursiveScanner*) self, (GFile*) v);
	return result;
}

static gboolean
__lambda155_ (GitgRecursiveScanner* self,
              GFile* file,
              GFile* other)
{
	gboolean result;
	g_return_val_if_fail (file != NULL, FALSE);
	g_return_val_if_fail (other != NULL, FALSE);
	result = g_file_equal (file, other);
	return result;
}

static gboolean
___lambda155__gee_equal_data_func (gconstpointer a,
                                   gconstpointer b,
                                   gpointer self)
{
	gboolean result;
	result = __lambda155_ ((GitgRecursiveScanner*) self, (GFile*) a, (GFile*) b);
	return result;
}

static void
gitg_recursive_scanner_scan_ready (GObject* source_object,
                                   GAsyncResult* _res_,
                                   gpointer _user_data_)
{
	GitgRecursiveScannerScanData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	gitg_recursive_scanner_scan_co (_data_);
}

static gboolean
gitg_recursive_scanner_scan_co (GitgRecursiveScannerScanData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = gee_hash_set_new (g_file_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, ___lambda154__gee_hash_data_func, g_object_ref (_data_->self), g_object_unref, ___lambda155__gee_equal_data_func, g_object_ref (_data_->self), g_object_unref);
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_state_ = 1;
	gitg_recursive_scanner_scan_real (_data_->self, _data_->location, _data_->cancellable, _data_->_tmp1_, gitg_recursive_scanner_scan_ready, _data_);
	return FALSE;
	_state_1:
	gitg_recursive_scanner_scan_real_finish (_data_->self, _data_->_res_);
	_g_object_unref0 (_data_->_tmp1_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
gitg_recursive_scanner_scan_real_data_free (gpointer _data)
{
	GitgRecursiveScannerScanRealData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->location);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->seen);
	_g_object_unref0 (_data_->self);
	g_slice_free (GitgRecursiveScannerScanRealData, _data_);
}

static void
gitg_recursive_scanner_scan_real (GitgRecursiveScanner* self,
                                  GFile* location,
                                  GCancellable* cancellable,
                                  GeeHashSet* seen,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_)
{
	GitgRecursiveScannerScanRealData* _data_;
	GitgRecursiveScanner* _tmp0_;
	GFile* _tmp1_;
	GCancellable* _tmp2_;
	GeeHashSet* _tmp3_;
	g_return_if_fail (location != NULL);
	g_return_if_fail (seen != NULL);
	_data_ = g_slice_new0 (GitgRecursiveScannerScanRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, gitg_recursive_scanner_scan_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (location);
	_g_object_unref0 (_data_->location);
	_data_->location = _tmp1_;
	_tmp2_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	_tmp3_ = _g_object_ref0 (seen);
	_g_object_unref0 (_data_->seen);
	_data_->seen = _tmp3_;
	gitg_recursive_scanner_scan_real_co (_data_);
}

static void
gitg_recursive_scanner_scan_real_finish (GitgRecursiveScanner* self,
                                         GAsyncResult* _res_)
{
	GitgRecursiveScannerScanRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		return;
	}
}

static void
gitg_recursive_scanner_scan_real_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_)
{
	GitgRecursiveScannerScanRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	gitg_recursive_scanner_scan_real_co (_data_);
}

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

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

static gboolean
gitg_recursive_scanner_scan_real_co (GitgRecursiveScannerScanRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		case 6:
		goto _state_6;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->cancellable != NULL) {
		_data_->_tmp0_ = g_cancellable_is_cancelled (_data_->cancellable);
	} else {
		_data_->_tmp0_ = FALSE;
	}
	if (_data_->_tmp0_) {
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_state_ = 1;
		g_file_enumerate_children_async (_data_->location, G_FILE_ATTRIBUTE_STANDARD_NAME "," G_FILE_ATTRIBUTE_STANDARD_TYPE, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, G_PRIORITY_DEFAULT, _data_->cancellable, gitg_recursive_scanner_scan_real_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp2_ = g_file_enumerate_children_finish (_data_->location, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp1_ = _data_->_tmp2_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp3_ = _data_->_tmp1_;
		_data_->_tmp1_ = NULL;
		_g_object_unref0 (_data_->e);
		_data_->e = _data_->_tmp3_;
		_g_object_unref0 (_data_->_tmp1_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
		_g_object_unref0 (_data_->e);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->e);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	while (TRUE) {
		if (_data_->cancellable == NULL) {
			_data_->_tmp4_ = TRUE;
		} else {
			_data_->_tmp4_ = !g_cancellable_is_cancelled (_data_->cancellable);
		}
		if (!_data_->_tmp4_) {
			break;
		}
		_data_->files = NULL;
		{
			_data_->_tmp6_ = _data_->e;
			_data_->_state_ = 2;
			g_file_enumerator_next_files_async (_data_->_tmp6_, 10, G_PRIORITY_DEFAULT, NULL, gitg_recursive_scanner_scan_real_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp7_ = g_file_enumerator_next_files_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error0_);
			_data_->_tmp5_ = _data_->_tmp7_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch1_g_error;
			}
			_data_->_tmp8_ = _data_->_tmp5_;
			_data_->_tmp5_ = NULL;
			(_data_->files == NULL) ? NULL : (_data_->files = (_g_list_free__g_object_unref0_ (_data_->files), NULL));
			_data_->files = _data_->_tmp8_;
			(_data_->_tmp5_ == NULL) ? NULL : (_data_->_tmp5_ = (_g_list_free__g_object_unref0_ (_data_->_tmp5_), NULL));
		}
		goto __finally1;
		__catch1_g_error:
		{
			g_clear_error (&_data_->_inner_error0_);
		}
		__finally1:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			(_data_->files == NULL) ? NULL : (_data_->files = (_g_list_free__g_object_unref0_ (_data_->files), NULL));
			_g_object_unref0 (_data_->e);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp9_ = _data_->files;
		if (_data_->_tmp9_ == NULL) {
			(_data_->files == NULL) ? NULL : (_data_->files = (_g_list_free__g_object_unref0_ (_data_->files), NULL));
			break;
		}
		_data_->_tmp10_ = _data_->files;
		{
			_data_->f_collection = _data_->_tmp10_;
			for (_data_->f_it = _data_->f_collection; _data_->f_it != NULL; _data_->f_it = _data_->f_it->next) {
				_data_->_tmp11_ = _g_object_ref0 ((GFileInfo*) _data_->f_it->data);
				_data_->f = _data_->_tmp11_;
				{
					_data_->_tmp12_ = _data_->f;
					_data_->_tmp13_ = g_file_info_get_name (_data_->_tmp12_);
					_data_->_tmp14_ = g_file_get_child (_data_->location, _data_->_tmp13_);
					_data_->file = _data_->_tmp14_;
					_data_->_tmp15_ = _data_->file;
					if (gee_abstract_collection_contains ((GeeAbstractCollection*) _data_->seen, _data_->_tmp15_)) {
						_g_object_unref0 (_data_->file);
						_g_object_unref0 (_data_->f);
						continue;
					}
					_data_->_tmp16_ = _data_->file;
					gee_abstract_collection_add ((GeeAbstractCollection*) _data_->seen, _data_->_tmp16_);
					_data_->_tmp17_ = _data_->file;
					_data_->_state_ = 3;
					gitg_recursive_scanner_scan_visit_file (_data_->self, _data_->_tmp17_, _data_->cancellable, gitg_recursive_scanner_scan_real_ready, _data_);
					return FALSE;
					_state_3:
					gitg_recursive_scanner_scan_visit_file_finish (_data_->self, _data_->_res_);
					_data_->_tmp18_ = _data_->f;
					if (g_file_info_get_file_type (_data_->_tmp18_) == G_FILE_TYPE_DIRECTORY) {
						_data_->_tmp19_ = _data_->file;
						_data_->_state_ = 4;
						gitg_recursive_scanner_scan_visit_directory (_data_->self, _data_->_tmp19_, _data_->cancellable, gitg_recursive_scanner_scan_real_ready, _data_);
						return FALSE;
						_state_4:
						if (!gitg_recursive_scanner_scan_visit_directory_finish (_data_->self, _data_->_res_)) {
							_g_object_unref0 (_data_->file);
							_g_object_unref0 (_data_->f);
							continue;
						}
						_data_->_tmp20_ = _data_->file;
						_data_->_state_ = 5;
						gitg_recursive_scanner_scan_real (_data_->self, _data_->_tmp20_, _data_->cancellable, _data_->seen, gitg_recursive_scanner_scan_real_ready, _data_);
						return FALSE;
						_state_5:
						gitg_recursive_scanner_scan_real_finish (_data_->self, _data_->_res_);
					}
					_g_object_unref0 (_data_->file);
					_g_object_unref0 (_data_->f);
				}
			}
		}
		(_data_->files == NULL) ? NULL : (_data_->files = (_g_list_free__g_object_unref0_ (_data_->files), NULL));
	}
	{
		_data_->_tmp21_ = _data_->e;
		_data_->_state_ = 6;
		g_file_enumerator_close_async (_data_->_tmp21_, G_PRIORITY_DEFAULT, _data_->cancellable, gitg_recursive_scanner_scan_real_ready, _data_);
		return FALSE;
		_state_6:
		g_file_enumerator_close_finish (_data_->_tmp21_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch2_g_error;
		}
	}
	goto __finally2;
	__catch2_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
	}
	__finally2:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->e);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->e);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
gitg_recursive_scanner_default_init (GitgRecursiveScannerIface * iface,
                                     gpointer iface_data)
{
	iface->scan_visit_file = gitg_recursive_scanner_real_scan_visit_file;
	iface->scan_visit_file_finish = gitg_recursive_scanner_real_scan_visit_file_finish;
	iface->scan_visit_directory = gitg_recursive_scanner_real_scan_visit_directory;
	iface->scan_visit_directory_finish = gitg_recursive_scanner_real_scan_visit_directory_finish;
}

 G_GNUC_NO_INLINE static GType
gitg_recursive_scanner_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GitgRecursiveScannerIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_recursive_scanner_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gitg_recursive_scanner_type_id;
	gitg_recursive_scanner_type_id = g_type_register_static (G_TYPE_INTERFACE, "GitgRecursiveScanner", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gitg_recursive_scanner_type_id, G_TYPE_OBJECT);
	return gitg_recursive_scanner_type_id;
}

GType
gitg_recursive_scanner_get_type (void)
{
	static gsize gitg_recursive_scanner_type_id__once = 0;
	if (g_once_init_enter (&gitg_recursive_scanner_type_id__once)) {
		GType gitg_recursive_scanner_type_id;
		gitg_recursive_scanner_type_id = gitg_recursive_scanner_get_type_once ();
		g_once_init_leave (&gitg_recursive_scanner_type_id__once, gitg_recursive_scanner_type_id);
	}
	return gitg_recursive_scanner_type_id__once;
}

