
static gboolean tracker_bus_connection_real_query_async_co (TrackerBusConnectionQueryAsyncData* data) {
	switch (data->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		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->_data2_->_async_data_ = data;
	data->_tmp0_ = NULL;
	data->_tmp1_ = NULL;
	tracker_bus_connection_pipe (data->self, &data->_tmp0_, &data->_tmp1_, &data->_inner_error_);
	_g_object_unref0 (data->input);
	data->input = data->_tmp0_;
	_g_object_unref0 (data->output);
	data->output = data->_tmp1_;
	if (data->_inner_error_ != NULL) {
		if (((data->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (data->_inner_error_->domain == G_IO_ERROR)) || (data->_inner_error_->domain == G_DBUS_ERROR)) {
			g_simple_async_result_set_from_error (data->_async_result, data->_inner_error_);
			g_error_free (data->_inner_error_);
			_g_object_unref0 (data->output);
			_g_object_unref0 (data->input);
			block2_data_unref (data->_data2_);
			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;
		} else {
			_g_object_unref0 (data->output);
			_g_object_unref0 (data->input);
			block2_data_unref (data->_data2_);
			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->_data2_->dbus_res = NULL;
	data->_data2_->received_result = FALSE;
	tracker_bus_steroids_query (tracker_bus_connection_steroids_object, data->sparql, data->output, data->cancellable, __lambda0__gasync_ready_callback, block2_data_ref (data->_data2_));
	data->_tmp2_ = NULL;
	_g_object_unref0 (data->output);
	data->output = data->_tmp2_;
	data->_tmp3_ = NULL;
	data->_tmp3_ = (GMemoryOutputStream*) g_memory_output_stream_new (NULL, 0, _g_realloc_grealloc_func, _g_free_gdestroy_notify);
	data->mem_stream = data->_tmp3_;
	data->_state_ = 1;
	g_output_stream_splice_async ((GOutputStream*) data->mem_stream, (GInputStream*) data->input, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, G_PRIORITY_DEFAULT, data->cancellable, tracker_bus_connection_query_async_ready, data);
	return FALSE;
	_state_1:
	g_output_stream_splice_finish ((GOutputStream*) data->mem_stream, data->_res_, &data->_inner_error_);
	if (data->_inner_error_ != NULL) {
		if (((data->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (data->_inner_error_->domain == G_IO_ERROR)) || (data->_inner_error_->domain == G_DBUS_ERROR)) {
			g_simple_async_result_set_from_error (data->_async_result, data->_inner_error_);
			g_error_free (data->_inner_error_);
			_g_object_unref0 (data->mem_stream);
			_g_object_unref0 (data->output);
			_g_object_unref0 (data->input);
			block2_data_unref (data->_data2_);
			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;
		} else {
			_g_object_unref0 (data->mem_stream);
			_g_object_unref0 (data->output);
			_g_object_unref0 (data->input);
			block2_data_unref (data->_data2_);
			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->_data2_->received_result = TRUE;
	if (data->_data2_->dbus_res == NULL) {
		data->_state_ = 2;
		return FALSE;
		_state_2:
		;
	}
	data->_tmp5_ = NULL;
	data->_tmp5_ = tracker_bus_steroids_query_finish (tracker_bus_connection_steroids_object, data->_data2_->dbus_res, &data->_tmp4_, &data->_inner_error_);
	data->_tmp6_ = data->_tmp5_;
	data->variable_names_length1 = data->_tmp4_;
	data->_variable_names_size_ = data->variable_names_length1;
	data->variable_names = data->_tmp6_;
	if (data->_inner_error_ != NULL) {
		if (((data->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (data->_inner_error_->domain == G_IO_ERROR)) || (data->_inner_error_->domain == G_DBUS_ERROR)) {
			g_simple_async_result_set_from_error (data->_async_result, data->_inner_error_);
			g_error_free (data->_inner_error_);
			_g_object_unref0 (data->mem_stream);
			_g_object_unref0 (data->output);
			_g_object_unref0 (data->input);
			block2_data_unref (data->_data2_);
			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;
		} else {
			_g_object_unref0 (data->mem_stream);
			_g_object_unref0 (data->output);
			_g_object_unref0 (data->input);
			block2_data_unref (data->_data2_);
			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;
		}
	}
	g_output_stream_close ((GOutputStream*) data->mem_stream, NULL, &data->_inner_error_);
	if (data->_inner_error_ != NULL) {
		if (((data->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (data->_inner_error_->domain == G_IO_ERROR)) || (data->_inner_error_->domain == G_DBUS_ERROR)) {
			g_simple_async_result_set_from_error (data->_async_result, data->_inner_error_);
			g_error_free (data->_inner_error_);
			data->variable_names = (_vala_array_free (data->variable_names, data->variable_names_length1, (GDestroyNotify) g_free), NULL);
			_g_object_unref0 (data->mem_stream);
			_g_object_unref0 (data->output);
			_g_object_unref0 (data->input);
			block2_data_unref (data->_data2_);
			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;
		} else {
			data->variable_names = (_vala_array_free (data->variable_names, data->variable_names_length1, (GDestroyNotify) g_free), NULL);
			_g_object_unref0 (data->mem_stream);
			_g_object_unref0 (data->output);
			_g_object_unref0 (data->input);
			block2_data_unref (data->_data2_);
			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->_tmp7_ = NULL;
	data->_tmp7_ = g_memory_output_stream_steal_data (data->mem_stream);
	data->_tmp8_ = g_memory_output_stream_get_data_size (data->mem_stream);
	data->_tmp9_ = NULL;
	data->_tmp9_ = tracker_bus_fd_cursor_new (data->_tmp7_, data->_tmp8_, data->variable_names, data->variable_names_length1);
	data->result = (TrackerSparqlCursor*) data->_tmp9_;
	data->variable_names = (_vala_array_free (data->variable_names, data->variable_names_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (data->mem_stream);
	_g_object_unref0 (data->output);
	_g_object_unref0 (data->input);
	block2_data_unref (data->_data2_);
	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;
	data->variable_names = (_vala_array_free (data->variable_names, data->variable_names_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (data->mem_stream);
	_g_object_unref0 (data->output);
	_g_object_unref0 (data->input);
	block2_data_unref (data->_data2_);
	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;
}

