/* valaccodeassignmentmodule.c generated by valac, the Vala compiler
 * generated from valaccodeassignmentmodule.vala, do not modify */

/* valaccodeassignmentmodule.vala
 *
 * Copyright (C) 2006-2010  Jürg Billeter
 * Copyright (C) 2006-2008  Raffaele Sandrini
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library 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
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Jürg Billeter <j@bitron.ch>
 *	Raffaele Sandrini <raffaele@sandrini.ch>
 */

#include <glib.h>
#include <glib-object.h>
#include "valacodegen.h"
#include <vala.h>
#include <valaccode.h>
#include <stdlib.h>
#include <string.h>
#include <valagee.h>

#define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_node_unref (var), NULL)))
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define _vala_target_value_unref0(var) ((var == NULL) ? NULL : (var = (vala_target_value_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define VALA_TYPE_GLIB_VALUE (vala_glib_value_get_type ())
#define VALA_GLIB_VALUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_GLIB_VALUE, ValaGLibValue))
#define VALA_GLIB_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_GLIB_VALUE, ValaGLibValueClass))
#define VALA_IS_GLIB_VALUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_GLIB_VALUE))
#define VALA_IS_GLIB_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_GLIB_VALUE))
#define VALA_GLIB_VALUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_GLIB_VALUE, ValaGLibValueClass))

typedef struct _ValaGLibValue ValaGLibValue;
typedef struct _ValaGLibValueClass ValaGLibValueClass;
typedef struct _ValaGLibValuePrivate ValaGLibValuePrivate;

struct _ValaGLibValue {
	ValaTargetValue parent_instance;
	ValaGLibValuePrivate * priv;
	ValaCCodeExpression* cvalue;
	gboolean lvalue;
	gboolean non_null;
	gchar* ctype;
	ValaList* array_length_cvalues;
	ValaCCodeExpression* array_size_cvalue;
	gboolean array_null_terminated;
	ValaCCodeExpression* array_length_cexpr;
	ValaCCodeExpression* delegate_target_cvalue;
	ValaCCodeExpression* delegate_target_destroy_notify_cvalue;
};

struct _ValaGLibValueClass {
	ValaTargetValueClass parent_class;
};


static gpointer vala_ccode_assignment_module_parent_class = NULL;

static ValaTargetValue* vala_ccode_assignment_module_emit_simple_assignment (ValaCCodeAssignmentModule* self, ValaAssignment* assignment);
static void vala_ccode_assignment_module_real_visit_assignment (ValaCodeVisitor* base, ValaAssignment* assignment);
static void vala_ccode_assignment_module_real_store_value (ValaCCodeBaseModule* base, ValaTargetValue* lvalue, ValaTargetValue* value, ValaSourceReference* source_reference);
G_GNUC_INTERNAL GType vala_glib_value_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static void vala_ccode_assignment_module_real_store_local (ValaCodeGenerator* base, ValaLocalVariable* local, ValaTargetValue* value, gboolean initializer, ValaSourceReference* source_reference);
static void vala_ccode_assignment_module_real_store_parameter (ValaCodeGenerator* base, ValaParameter* param, ValaTargetValue* _value, gboolean capturing_parameter, ValaSourceReference* source_reference);
static void vala_ccode_assignment_module_real_store_field (ValaCodeGenerator* base, ValaField* field, ValaTargetValue* instance, ValaTargetValue* value, ValaSourceReference* source_reference);


static gpointer _vala_code_node_ref0 (gpointer self) {
	return self ? vala_code_node_ref (self) : NULL;
}


static ValaTargetValue* vala_ccode_assignment_module_emit_simple_assignment (ValaCCodeAssignmentModule* self, ValaAssignment* assignment) {
	ValaTargetValue* result = NULL;
	ValaVariable* variable = NULL;
	ValaAssignment* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	ValaSymbol* _tmp3_;
	ValaSymbol* _tmp4_;
	ValaVariable* _tmp5_;
	ValaAssignment* _tmp6_;
	ValaExpression* _tmp7_;
	ValaExpression* _tmp8_;
	ValaDataType* _tmp9_;
	ValaDataType* _tmp10_;
	gboolean _tmp11_;
	ValaAssignment* _tmp21_;
	ValaAssignmentOperator _tmp22_;
	ValaAssignmentOperator _tmp23_;
	gboolean _tmp83_ = FALSE;
	ValaAssignment* _tmp84_;
	ValaExpression* _tmp85_;
	ValaExpression* _tmp86_;
	ValaDataType* _tmp87_;
	ValaDataType* _tmp88_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (assignment != NULL, NULL);
	_tmp0_ = assignment;
	_tmp1_ = vala_assignment_get_left (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = vala_expression_get_symbol_reference (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, VALA_TYPE_VARIABLE, ValaVariable));
	variable = _tmp5_;
	_tmp6_ = assignment;
	_tmp7_ = vala_assignment_get_left (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = vala_expression_get_value_type (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, _tmp10_);
	if (_tmp11_) {
		ValaCCodeFunction* _tmp12_;
		ValaCCodeFunction* _tmp13_;
		ValaAssignment* _tmp14_;
		ValaExpression* _tmp15_;
		ValaExpression* _tmp16_;
		ValaTargetValue* _tmp17_;
		ValaTargetValue* _tmp18_;
		ValaCCodeExpression* _tmp19_;
		ValaCCodeExpression* _tmp20_;
		_tmp12_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp13_ = _tmp12_;
		_tmp14_ = assignment;
		_tmp15_ = vala_assignment_get_left (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = vala_expression_get_target_value (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = vala_ccode_base_module_destroy_value ((ValaCCodeBaseModule*) self, _tmp18_, FALSE);
		_tmp20_ = _tmp19_;
		vala_ccode_function_add_expression (_tmp13_, _tmp20_);
		_vala_ccode_node_unref0 (_tmp20_);
	}
	_tmp21_ = assignment;
	_tmp22_ = vala_assignment_get_operator (_tmp21_);
	_tmp23_ = _tmp22_;
	if (_tmp23_ == VALA_ASSIGNMENT_OPERATOR_SIMPLE) {
		ValaAssignment* _tmp24_;
		ValaExpression* _tmp25_;
		ValaExpression* _tmp26_;
		ValaTargetValue* _tmp27_;
		ValaTargetValue* _tmp28_;
		ValaAssignment* _tmp29_;
		ValaExpression* _tmp30_;
		ValaExpression* _tmp31_;
		ValaTargetValue* _tmp32_;
		ValaTargetValue* _tmp33_;
		ValaAssignment* _tmp34_;
		ValaSourceReference* _tmp35_;
		ValaSourceReference* _tmp36_;
		_tmp24_ = assignment;
		_tmp25_ = vala_assignment_get_left (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp27_ = vala_expression_get_target_value (_tmp26_);
		_tmp28_ = _tmp27_;
		_tmp29_ = assignment;
		_tmp30_ = vala_assignment_get_right (_tmp29_);
		_tmp31_ = _tmp30_;
		_tmp32_ = vala_expression_get_target_value (_tmp31_);
		_tmp33_ = _tmp32_;
		_tmp34_ = assignment;
		_tmp35_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp34_);
		_tmp36_ = _tmp35_;
		vala_ccode_base_module_store_value ((ValaCCodeBaseModule*) self, _tmp28_, _tmp33_, _tmp36_);
	} else {
		ValaCCodeAssignmentOperator cop = 0;
		ValaAssignment* _tmp37_;
		ValaAssignmentOperator _tmp38_;
		ValaAssignmentOperator _tmp39_;
		ValaCCodeExpression* codenode = NULL;
		ValaAssignment* _tmp67_;
		ValaExpression* _tmp68_;
		ValaExpression* _tmp69_;
		ValaCCodeExpression* _tmp70_;
		ValaCCodeExpression* _tmp71_;
		ValaAssignment* _tmp72_;
		ValaExpression* _tmp73_;
		ValaExpression* _tmp74_;
		ValaCCodeExpression* _tmp75_;
		ValaCCodeExpression* _tmp76_;
		ValaCCodeAssignmentOperator _tmp77_;
		ValaCCodeAssignment* _tmp78_;
		ValaCCodeExpression* _tmp79_;
		ValaCCodeFunction* _tmp80_;
		ValaCCodeFunction* _tmp81_;
		ValaCCodeExpression* _tmp82_;
		_tmp37_ = assignment;
		_tmp38_ = vala_assignment_get_operator (_tmp37_);
		_tmp39_ = _tmp38_;
		if (_tmp39_ == VALA_ASSIGNMENT_OPERATOR_BITWISE_OR) {
			cop = VALA_CCODE_ASSIGNMENT_OPERATOR_BITWISE_OR;
		} else {
			ValaAssignment* _tmp40_;
			ValaAssignmentOperator _tmp41_;
			ValaAssignmentOperator _tmp42_;
			_tmp40_ = assignment;
			_tmp41_ = vala_assignment_get_operator (_tmp40_);
			_tmp42_ = _tmp41_;
			if (_tmp42_ == VALA_ASSIGNMENT_OPERATOR_BITWISE_AND) {
				cop = VALA_CCODE_ASSIGNMENT_OPERATOR_BITWISE_AND;
			} else {
				ValaAssignment* _tmp43_;
				ValaAssignmentOperator _tmp44_;
				ValaAssignmentOperator _tmp45_;
				_tmp43_ = assignment;
				_tmp44_ = vala_assignment_get_operator (_tmp43_);
				_tmp45_ = _tmp44_;
				if (_tmp45_ == VALA_ASSIGNMENT_OPERATOR_BITWISE_XOR) {
					cop = VALA_CCODE_ASSIGNMENT_OPERATOR_BITWISE_XOR;
				} else {
					ValaAssignment* _tmp46_;
					ValaAssignmentOperator _tmp47_;
					ValaAssignmentOperator _tmp48_;
					_tmp46_ = assignment;
					_tmp47_ = vala_assignment_get_operator (_tmp46_);
					_tmp48_ = _tmp47_;
					if (_tmp48_ == VALA_ASSIGNMENT_OPERATOR_ADD) {
						cop = VALA_CCODE_ASSIGNMENT_OPERATOR_ADD;
					} else {
						ValaAssignment* _tmp49_;
						ValaAssignmentOperator _tmp50_;
						ValaAssignmentOperator _tmp51_;
						_tmp49_ = assignment;
						_tmp50_ = vala_assignment_get_operator (_tmp49_);
						_tmp51_ = _tmp50_;
						if (_tmp51_ == VALA_ASSIGNMENT_OPERATOR_SUB) {
							cop = VALA_CCODE_ASSIGNMENT_OPERATOR_SUB;
						} else {
							ValaAssignment* _tmp52_;
							ValaAssignmentOperator _tmp53_;
							ValaAssignmentOperator _tmp54_;
							_tmp52_ = assignment;
							_tmp53_ = vala_assignment_get_operator (_tmp52_);
							_tmp54_ = _tmp53_;
							if (_tmp54_ == VALA_ASSIGNMENT_OPERATOR_MUL) {
								cop = VALA_CCODE_ASSIGNMENT_OPERATOR_MUL;
							} else {
								ValaAssignment* _tmp55_;
								ValaAssignmentOperator _tmp56_;
								ValaAssignmentOperator _tmp57_;
								_tmp55_ = assignment;
								_tmp56_ = vala_assignment_get_operator (_tmp55_);
								_tmp57_ = _tmp56_;
								if (_tmp57_ == VALA_ASSIGNMENT_OPERATOR_DIV) {
									cop = VALA_CCODE_ASSIGNMENT_OPERATOR_DIV;
								} else {
									ValaAssignment* _tmp58_;
									ValaAssignmentOperator _tmp59_;
									ValaAssignmentOperator _tmp60_;
									_tmp58_ = assignment;
									_tmp59_ = vala_assignment_get_operator (_tmp58_);
									_tmp60_ = _tmp59_;
									if (_tmp60_ == VALA_ASSIGNMENT_OPERATOR_PERCENT) {
										cop = VALA_CCODE_ASSIGNMENT_OPERATOR_PERCENT;
									} else {
										ValaAssignment* _tmp61_;
										ValaAssignmentOperator _tmp62_;
										ValaAssignmentOperator _tmp63_;
										_tmp61_ = assignment;
										_tmp62_ = vala_assignment_get_operator (_tmp61_);
										_tmp63_ = _tmp62_;
										if (_tmp63_ == VALA_ASSIGNMENT_OPERATOR_SHIFT_LEFT) {
											cop = VALA_CCODE_ASSIGNMENT_OPERATOR_SHIFT_LEFT;
										} else {
											ValaAssignment* _tmp64_;
											ValaAssignmentOperator _tmp65_;
											ValaAssignmentOperator _tmp66_;
											_tmp64_ = assignment;
											_tmp65_ = vala_assignment_get_operator (_tmp64_);
											_tmp66_ = _tmp65_;
											if (_tmp66_ == VALA_ASSIGNMENT_OPERATOR_SHIFT_RIGHT) {
												cop = VALA_CCODE_ASSIGNMENT_OPERATOR_SHIFT_RIGHT;
											} else {
												g_assert_not_reached ();
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
		_tmp67_ = assignment;
		_tmp68_ = vala_assignment_get_left (_tmp67_);
		_tmp69_ = _tmp68_;
		_tmp70_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp69_);
		_tmp71_ = _tmp70_;
		_tmp72_ = assignment;
		_tmp73_ = vala_assignment_get_right (_tmp72_);
		_tmp74_ = _tmp73_;
		_tmp75_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp74_);
		_tmp76_ = _tmp75_;
		_tmp77_ = cop;
		_tmp78_ = vala_ccode_assignment_new (_tmp71_, _tmp76_, _tmp77_);
		_tmp79_ = (ValaCCodeExpression*) _tmp78_;
		_vala_ccode_node_unref0 (_tmp76_);
		_vala_ccode_node_unref0 (_tmp71_);
		codenode = _tmp79_;
		_tmp80_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp81_ = _tmp80_;
		_tmp82_ = codenode;
		vala_ccode_function_add_expression (_tmp81_, _tmp82_);
		_vala_ccode_node_unref0 (codenode);
	}
	_tmp84_ = assignment;
	_tmp85_ = vala_assignment_get_left (_tmp84_);
	_tmp86_ = _tmp85_;
	_tmp87_ = vala_expression_get_value_type (_tmp86_);
	_tmp88_ = _tmp87_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp88_, VALA_TYPE_ARRAY_TYPE)) {
		ValaAssignment* _tmp89_;
		ValaExpression* _tmp90_;
		ValaExpression* _tmp91_;
		ValaDataType* _tmp92_;
		ValaDataType* _tmp93_;
		gboolean _tmp94_;
		gboolean _tmp95_;
		_tmp89_ = assignment;
		_tmp90_ = vala_assignment_get_left (_tmp89_);
		_tmp91_ = _tmp90_;
		_tmp92_ = vala_expression_get_value_type (_tmp91_);
		_tmp93_ = _tmp92_;
		_tmp94_ = vala_array_type_get_inline_allocated (G_TYPE_CHECK_INSTANCE_CAST (_tmp93_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
		_tmp95_ = _tmp94_;
		_tmp83_ = _tmp95_;
	} else {
		_tmp83_ = FALSE;
	}
	if (_tmp83_) {
		ValaVariable* _tmp96_;
		ValaAssignment* _tmp97_;
		ValaExpression* _tmp98_;
		ValaExpression* _tmp99_;
		ValaTargetValue* _tmp100_;
		ValaTargetValue* _tmp101_;
		ValaTargetValue* _tmp102_;
		_tmp96_ = variable;
		_tmp97_ = assignment;
		_tmp98_ = vala_assignment_get_left (_tmp97_);
		_tmp99_ = _tmp98_;
		_tmp100_ = vala_expression_get_target_value (_tmp99_);
		_tmp101_ = _tmp100_;
		_tmp102_ = vala_ccode_base_module_load_variable ((ValaCCodeBaseModule*) self, _tmp96_, _tmp101_);
		result = _tmp102_;
		_vala_code_node_unref0 (variable);
		return result;
	} else {
		ValaAssignment* _tmp103_;
		ValaExpression* _tmp104_;
		ValaExpression* _tmp105_;
		ValaTargetValue* _tmp106_;
		ValaTargetValue* _tmp107_;
		ValaAssignment* _tmp108_;
		ValaTargetValue* _tmp109_;
		_tmp103_ = assignment;
		_tmp104_ = vala_assignment_get_left (_tmp103_);
		_tmp105_ = _tmp104_;
		_tmp106_ = vala_expression_get_target_value (_tmp105_);
		_tmp107_ = _tmp106_;
		_tmp108_ = assignment;
		_tmp109_ = vala_ccode_base_module_store_temp_value ((ValaCCodeBaseModule*) self, _tmp107_, (ValaCodeNode*) _tmp108_, NULL);
		result = _tmp109_;
		_vala_code_node_unref0 (variable);
		return result;
	}
	_vala_code_node_unref0 (variable);
}


static void vala_ccode_assignment_module_real_visit_assignment (ValaCodeVisitor* base, ValaAssignment* assignment) {
	ValaCCodeAssignmentModule * self;
	gboolean _tmp0_ = FALSE;
	ValaAssignment* _tmp1_;
	ValaExpression* _tmp2_;
	ValaExpression* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	ValaAssignment* _tmp12_;
	ValaExpression* _tmp13_;
	ValaExpression* _tmp14_;
	ValaSymbol* _tmp15_;
	ValaSymbol* _tmp16_;
	self = (ValaCCodeAssignmentModule*) base;
	g_return_if_fail (assignment != NULL);
	_tmp1_ = assignment;
	_tmp2_ = vala_assignment_get_left (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = vala_code_node_get_error ((ValaCodeNode*) _tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_) {
		_tmp0_ = TRUE;
	} else {
		ValaAssignment* _tmp6_;
		ValaExpression* _tmp7_;
		ValaExpression* _tmp8_;
		gboolean _tmp9_;
		gboolean _tmp10_;
		_tmp6_ = assignment;
		_tmp7_ = vala_assignment_get_right (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = vala_code_node_get_error ((ValaCodeNode*) _tmp8_);
		_tmp10_ = _tmp9_;
		_tmp0_ = _tmp10_;
	}
	if (_tmp0_) {
		ValaAssignment* _tmp11_;
		_tmp11_ = assignment;
		vala_code_node_set_error ((ValaCodeNode*) _tmp11_, TRUE);
		return;
	}
	_tmp12_ = assignment;
	_tmp13_ = vala_assignment_get_left (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = vala_expression_get_symbol_reference (_tmp14_);
	_tmp16_ = _tmp15_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, VALA_TYPE_PROPERTY)) {
		ValaMemberAccess* ma = NULL;
		ValaAssignment* _tmp17_;
		ValaExpression* _tmp18_;
		ValaExpression* _tmp19_;
		ValaMemberAccess* _tmp20_;
		ValaProperty* prop = NULL;
		ValaAssignment* _tmp21_;
		ValaExpression* _tmp22_;
		ValaExpression* _tmp23_;
		ValaSymbol* _tmp24_;
		ValaSymbol* _tmp25_;
		ValaProperty* _tmp26_;
		ValaProperty* _tmp27_;
		ValaMemberAccess* _tmp28_;
		ValaExpression* _tmp29_;
		ValaExpression* _tmp30_;
		ValaAssignment* _tmp31_;
		ValaExpression* _tmp32_;
		ValaExpression* _tmp33_;
		ValaTargetValue* _tmp34_;
		ValaTargetValue* _tmp35_;
		ValaAssignment* _tmp36_;
		ValaAssignment* _tmp37_;
		ValaExpression* _tmp38_;
		ValaExpression* _tmp39_;
		ValaTargetValue* _tmp40_;
		ValaTargetValue* _tmp41_;
		_tmp17_ = assignment;
		_tmp18_ = vala_assignment_get_left (_tmp17_);
		_tmp19_ = _tmp18_;
		_tmp20_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, VALA_TYPE_MEMBER_ACCESS) ? ((ValaMemberAccess*) _tmp19_) : NULL);
		ma = _tmp20_;
		_tmp21_ = assignment;
		_tmp22_ = vala_assignment_get_left (_tmp21_);
		_tmp23_ = _tmp22_;
		_tmp24_ = vala_expression_get_symbol_reference (_tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, VALA_TYPE_PROPERTY, ValaProperty));
		prop = _tmp26_;
		_tmp27_ = prop;
		_tmp28_ = ma;
		_tmp29_ = vala_member_access_get_inner (_tmp28_);
		_tmp30_ = _tmp29_;
		_tmp31_ = assignment;
		_tmp32_ = vala_assignment_get_right (_tmp31_);
		_tmp33_ = _tmp32_;
		_tmp34_ = vala_expression_get_target_value (_tmp33_);
		_tmp35_ = _tmp34_;
		vala_ccode_base_module_store_property ((ValaCCodeBaseModule*) self, _tmp27_, _tmp30_, _tmp35_);
		_tmp36_ = assignment;
		_tmp37_ = assignment;
		_tmp38_ = vala_assignment_get_right (_tmp37_);
		_tmp39_ = _tmp38_;
		_tmp40_ = vala_expression_get_target_value (_tmp39_);
		_tmp41_ = _tmp40_;
		vala_expression_set_target_value ((ValaExpression*) _tmp36_, _tmp41_);
		_vala_code_node_unref0 (prop);
		_vala_code_node_unref0 (ma);
	} else {
		gboolean _tmp42_ = FALSE;
		ValaAssignment* _tmp43_;
		ValaExpression* _tmp44_;
		ValaExpression* _tmp45_;
		ValaSymbol* _tmp46_;
		ValaSymbol* _tmp47_;
		_tmp43_ = assignment;
		_tmp44_ = vala_assignment_get_left (_tmp43_);
		_tmp45_ = _tmp44_;
		_tmp46_ = vala_expression_get_symbol_reference (_tmp45_);
		_tmp47_ = _tmp46_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp47_, VALA_TYPE_VARIABLE)) {
			ValaAssignment* _tmp48_;
			ValaExpression* _tmp49_;
			ValaExpression* _tmp50_;
			ValaSymbol* _tmp51_;
			ValaSymbol* _tmp52_;
			ValaAssignment* _tmp53_;
			ValaExpression* _tmp54_;
			ValaExpression* _tmp55_;
			gboolean _tmp56_;
			_tmp48_ = assignment;
			_tmp49_ = vala_assignment_get_left (_tmp48_);
			_tmp50_ = _tmp49_;
			_tmp51_ = vala_expression_get_symbol_reference (_tmp50_);
			_tmp52_ = _tmp51_;
			_tmp53_ = assignment;
			_tmp54_ = vala_assignment_get_right (_tmp53_);
			_tmp55_ = _tmp54_;
			_tmp56_ = vala_ccode_base_module_is_simple_struct_creation ((ValaCCodeBaseModule*) self, G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, VALA_TYPE_VARIABLE, ValaVariable), _tmp55_);
			_tmp42_ = _tmp56_;
		} else {
			_tmp42_ = FALSE;
		}
		if (_tmp42_) {
		} else {
			ValaAssignment* _tmp57_;
			ValaAssignment* _tmp58_;
			ValaTargetValue* _tmp59_;
			ValaTargetValue* _tmp60_;
			_tmp57_ = assignment;
			_tmp58_ = assignment;
			_tmp59_ = vala_ccode_assignment_module_emit_simple_assignment (self, _tmp58_);
			_tmp60_ = _tmp59_;
			vala_expression_set_target_value ((ValaExpression*) _tmp57_, _tmp60_);
			_vala_target_value_unref0 (_tmp60_);
		}
	}
}


static gpointer _vala_target_value_ref0 (gpointer self) {
	return self ? vala_target_value_ref (self) : NULL;
}


static void vala_ccode_assignment_module_real_store_value (ValaCCodeBaseModule* base, ValaTargetValue* lvalue, ValaTargetValue* value, ValaSourceReference* source_reference) {
	ValaCCodeAssignmentModule * self;
	ValaArrayType* array_type = NULL;
	ValaTargetValue* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	ValaArrayType* _tmp3_;
	gboolean _tmp4_ = FALSE;
	ValaArrayType* _tmp5_;
	ValaCCodeExpression* cexpr = NULL;
	ValaTargetValue* _tmp47_;
	ValaCCodeExpression* _tmp48_;
	ValaTargetValue* _tmp49_;
	gchar* _tmp50_;
	gchar* _tmp51_;
	gboolean _tmp52_;
	ValaCCodeFunction* _tmp58_;
	ValaCCodeFunction* _tmp59_;
	ValaTargetValue* _tmp60_;
	ValaCCodeExpression* _tmp61_;
	ValaCCodeExpression* _tmp62_;
	ValaCCodeExpression* _tmp63_;
	gboolean _tmp64_ = FALSE;
	ValaArrayType* _tmp65_;
	ValaDelegateType* delegate_type = NULL;
	ValaTargetValue* _tmp133_;
	ValaDataType* _tmp134_;
	ValaDataType* _tmp135_;
	ValaDelegateType* _tmp136_;
	gboolean _tmp137_ = FALSE;
	ValaDelegateType* _tmp138_;
	self = (ValaCCodeAssignmentModule*) base;
	g_return_if_fail (lvalue != NULL);
	g_return_if_fail (value != NULL);
	_tmp0_ = lvalue;
	_tmp1_ = vala_target_value_get_value_type (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALA_TYPE_ARRAY_TYPE) ? ((ValaArrayType*) _tmp2_) : NULL);
	array_type = _tmp3_;
	_tmp5_ = array_type;
	if (_tmp5_ != NULL) {
		ValaArrayType* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		_tmp6_ = array_type;
		_tmp7_ = vala_array_type_get_fixed_length (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp4_ = _tmp8_;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		ValaCCodeFile* _tmp9_;
		ValaCCodeFunctionCall* sizeof_call = NULL;
		ValaCCodeIdentifier* _tmp10_;
		ValaCCodeIdentifier* _tmp11_;
		ValaCCodeFunctionCall* _tmp12_;
		ValaCCodeFunctionCall* _tmp13_;
		ValaCCodeFunctionCall* _tmp14_;
		ValaArrayType* _tmp15_;
		ValaDataType* _tmp16_;
		ValaDataType* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		ValaCCodeIdentifier* _tmp20_;
		ValaCCodeIdentifier* _tmp21_;
		ValaCCodeBinaryExpression* size = NULL;
		ValaArrayType* _tmp22_;
		ValaExpression* _tmp23_;
		ValaExpression* _tmp24_;
		ValaCCodeExpression* _tmp25_;
		ValaCCodeExpression* _tmp26_;
		ValaCCodeFunctionCall* _tmp27_;
		ValaCCodeBinaryExpression* _tmp28_;
		ValaCCodeBinaryExpression* _tmp29_;
		ValaCCodeFunctionCall* ccopy = NULL;
		ValaCCodeIdentifier* _tmp30_;
		ValaCCodeIdentifier* _tmp31_;
		ValaCCodeFunctionCall* _tmp32_;
		ValaCCodeFunctionCall* _tmp33_;
		ValaCCodeFunctionCall* _tmp34_;
		ValaTargetValue* _tmp35_;
		ValaCCodeExpression* _tmp36_;
		ValaCCodeExpression* _tmp37_;
		ValaCCodeFunctionCall* _tmp38_;
		ValaTargetValue* _tmp39_;
		ValaCCodeExpression* _tmp40_;
		ValaCCodeExpression* _tmp41_;
		ValaCCodeFunctionCall* _tmp42_;
		ValaCCodeBinaryExpression* _tmp43_;
		ValaCCodeFunction* _tmp44_;
		ValaCCodeFunction* _tmp45_;
		ValaCCodeFunctionCall* _tmp46_;
		_tmp9_ = ((ValaCCodeBaseModule*) self)->cfile;
		vala_ccode_file_add_include (_tmp9_, "string.h", FALSE);
		_tmp10_ = vala_ccode_identifier_new ("sizeof");
		_tmp11_ = _tmp10_;
		_tmp12_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp11_);
		_tmp13_ = _tmp12_;
		_vala_ccode_node_unref0 (_tmp11_);
		sizeof_call = _tmp13_;
		_tmp14_ = sizeof_call;
		_tmp15_ = array_type;
		_tmp16_ = vala_array_type_get_element_type (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = vala_get_ccode_name ((ValaCodeNode*) _tmp17_);
		_tmp19_ = _tmp18_;
		_tmp20_ = vala_ccode_identifier_new (_tmp19_);
		_tmp21_ = _tmp20_;
		vala_ccode_function_call_add_argument (_tmp14_, (ValaCCodeExpression*) _tmp21_);
		_vala_ccode_node_unref0 (_tmp21_);
		_g_free0 (_tmp19_);
		_tmp22_ = array_type;
		_tmp23_ = vala_array_type_get_length (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = vala_ccode_base_module_get_ccodenode ((ValaCCodeBaseModule*) self, _tmp24_);
		_tmp26_ = _tmp25_;
		_tmp27_ = sizeof_call;
		_tmp28_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, _tmp26_, (ValaCCodeExpression*) _tmp27_);
		_tmp29_ = _tmp28_;
		_vala_ccode_node_unref0 (_tmp26_);
		size = _tmp29_;
		_tmp30_ = vala_ccode_identifier_new ("memcpy");
		_tmp31_ = _tmp30_;
		_tmp32_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp31_);
		_tmp33_ = _tmp32_;
		_vala_ccode_node_unref0 (_tmp31_);
		ccopy = _tmp33_;
		_tmp34_ = ccopy;
		_tmp35_ = lvalue;
		_tmp36_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp35_);
		_tmp37_ = _tmp36_;
		vala_ccode_function_call_add_argument (_tmp34_, _tmp37_);
		_vala_ccode_node_unref0 (_tmp37_);
		_tmp38_ = ccopy;
		_tmp39_ = value;
		_tmp40_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp39_);
		_tmp41_ = _tmp40_;
		vala_ccode_function_call_add_argument (_tmp38_, _tmp41_);
		_vala_ccode_node_unref0 (_tmp41_);
		_tmp42_ = ccopy;
		_tmp43_ = size;
		vala_ccode_function_call_add_argument (_tmp42_, (ValaCCodeExpression*) _tmp43_);
		_tmp44_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp45_ = _tmp44_;
		_tmp46_ = ccopy;
		vala_ccode_function_add_expression (_tmp45_, (ValaCCodeExpression*) _tmp46_);
		_vala_ccode_node_unref0 (ccopy);
		_vala_ccode_node_unref0 (size);
		_vala_ccode_node_unref0 (sizeof_call);
		_vala_code_node_unref0 (array_type);
		return;
	}
	_tmp47_ = value;
	_tmp48_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp47_);
	cexpr = _tmp48_;
	_tmp49_ = lvalue;
	_tmp50_ = vala_ccode_base_module_get_ctype ((ValaCCodeBaseModule*) self, _tmp49_);
	_tmp51_ = _tmp50_;
	_tmp52_ = _tmp51_ != NULL;
	_g_free0 (_tmp51_);
	if (_tmp52_) {
		ValaCCodeExpression* _tmp53_;
		ValaTargetValue* _tmp54_;
		gchar* _tmp55_;
		gchar* _tmp56_;
		ValaCCodeCastExpression* _tmp57_;
		_tmp53_ = cexpr;
		_tmp54_ = lvalue;
		_tmp55_ = vala_ccode_base_module_get_ctype ((ValaCCodeBaseModule*) self, _tmp54_);
		_tmp56_ = _tmp55_;
		_tmp57_ = vala_ccode_cast_expression_new (_tmp53_, _tmp56_);
		_vala_ccode_node_unref0 (cexpr);
		cexpr = (ValaCCodeExpression*) _tmp57_;
		_g_free0 (_tmp56_);
	}
	_tmp58_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp59_ = _tmp58_;
	_tmp60_ = lvalue;
	_tmp61_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp60_);
	_tmp62_ = _tmp61_;
	_tmp63_ = cexpr;
	vala_ccode_function_add_assignment (_tmp59_, _tmp62_, _tmp63_);
	_vala_ccode_node_unref0 (_tmp62_);
	_tmp65_ = array_type;
	if (_tmp65_ != NULL) {
		ValaTargetValue* _tmp66_;
		ValaList* _tmp67_;
		_tmp66_ = lvalue;
		_tmp67_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, VALA_TYPE_GLIB_VALUE, ValaGLibValue)->array_length_cvalues;
		_tmp64_ = _tmp67_ != NULL;
	} else {
		_tmp64_ = FALSE;
	}
	if (_tmp64_) {
		ValaGLibValue* glib_value = NULL;
		ValaTargetValue* _tmp68_;
		ValaGLibValue* _tmp69_;
		ValaGLibValue* _tmp70_;
		ValaList* _tmp71_;
		gboolean _tmp118_ = FALSE;
		ValaArrayType* _tmp119_;
		gint _tmp120_;
		gint _tmp121_;
		_tmp68_ = value;
		_tmp69_ = _vala_target_value_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp68_, VALA_TYPE_GLIB_VALUE, ValaGLibValue));
		glib_value = _tmp69_;
		_tmp70_ = glib_value;
		_tmp71_ = _tmp70_->array_length_cvalues;
		if (_tmp71_ != NULL) {
			{
				gint dim = 0;
				dim = 1;
				{
					gboolean _tmp72_ = FALSE;
					_tmp72_ = TRUE;
					while (TRUE) {
						gint _tmp74_;
						ValaArrayType* _tmp75_;
						gint _tmp76_;
						gint _tmp77_;
						ValaCCodeFunction* _tmp78_;
						ValaCCodeFunction* _tmp79_;
						ValaTargetValue* _tmp80_;
						gint _tmp81_;
						ValaCCodeExpression* _tmp82_;
						ValaCCodeExpression* _tmp83_;
						ValaTargetValue* _tmp84_;
						gint _tmp85_;
						ValaCCodeExpression* _tmp86_;
						ValaCCodeExpression* _tmp87_;
						if (!_tmp72_) {
							gint _tmp73_;
							_tmp73_ = dim;
							dim = _tmp73_ + 1;
						}
						_tmp72_ = FALSE;
						_tmp74_ = dim;
						_tmp75_ = array_type;
						_tmp76_ = vala_array_type_get_rank (_tmp75_);
						_tmp77_ = _tmp76_;
						if (!(_tmp74_ <= _tmp77_)) {
							break;
						}
						_tmp78_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
						_tmp79_ = _tmp78_;
						_tmp80_ = lvalue;
						_tmp81_ = dim;
						_tmp82_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp80_, _tmp81_);
						_tmp83_ = _tmp82_;
						_tmp84_ = value;
						_tmp85_ = dim;
						_tmp86_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp84_, _tmp85_);
						_tmp87_ = _tmp86_;
						vala_ccode_function_add_assignment (_tmp79_, _tmp83_, _tmp87_);
						_vala_ccode_node_unref0 (_tmp87_);
						_vala_ccode_node_unref0 (_tmp83_);
					}
				}
			}
		} else {
			ValaGLibValue* _tmp88_;
			gboolean _tmp89_;
			_tmp88_ = glib_value;
			_tmp89_ = _tmp88_->array_null_terminated;
			if (_tmp89_) {
				ValaCCodeFunctionCall* len_call = NULL;
				ValaCCodeIdentifier* _tmp90_;
				ValaCCodeIdentifier* _tmp91_;
				ValaCCodeFunctionCall* _tmp92_;
				ValaCCodeFunctionCall* _tmp93_;
				ValaCCodeFunctionCall* _tmp94_;
				ValaTargetValue* _tmp95_;
				ValaCCodeExpression* _tmp96_;
				ValaCCodeExpression* _tmp97_;
				ValaCCodeFunction* _tmp98_;
				ValaCCodeFunction* _tmp99_;
				ValaTargetValue* _tmp100_;
				ValaCCodeExpression* _tmp101_;
				ValaCCodeExpression* _tmp102_;
				ValaCCodeFunctionCall* _tmp103_;
				((ValaCCodeBaseModule*) self)->requires_array_length = TRUE;
				_tmp90_ = vala_ccode_identifier_new ("_vala_array_length");
				_tmp91_ = _tmp90_;
				_tmp92_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp91_);
				_tmp93_ = _tmp92_;
				_vala_ccode_node_unref0 (_tmp91_);
				len_call = _tmp93_;
				_tmp94_ = len_call;
				_tmp95_ = value;
				_tmp96_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp95_);
				_tmp97_ = _tmp96_;
				vala_ccode_function_call_add_argument (_tmp94_, _tmp97_);
				_vala_ccode_node_unref0 (_tmp97_);
				_tmp98_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp99_ = _tmp98_;
				_tmp100_ = lvalue;
				_tmp101_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp100_, 1);
				_tmp102_ = _tmp101_;
				_tmp103_ = len_call;
				vala_ccode_function_add_assignment (_tmp99_, _tmp102_, (ValaCCodeExpression*) _tmp103_);
				_vala_ccode_node_unref0 (_tmp102_);
				_vala_ccode_node_unref0 (len_call);
			} else {
				{
					gint dim = 0;
					dim = 1;
					{
						gboolean _tmp104_ = FALSE;
						_tmp104_ = TRUE;
						while (TRUE) {
							gint _tmp106_;
							ValaArrayType* _tmp107_;
							gint _tmp108_;
							gint _tmp109_;
							ValaCCodeFunction* _tmp110_;
							ValaCCodeFunction* _tmp111_;
							ValaTargetValue* _tmp112_;
							gint _tmp113_;
							ValaCCodeExpression* _tmp114_;
							ValaCCodeExpression* _tmp115_;
							ValaCCodeConstant* _tmp116_;
							ValaCCodeConstant* _tmp117_;
							if (!_tmp104_) {
								gint _tmp105_;
								_tmp105_ = dim;
								dim = _tmp105_ + 1;
							}
							_tmp104_ = FALSE;
							_tmp106_ = dim;
							_tmp107_ = array_type;
							_tmp108_ = vala_array_type_get_rank (_tmp107_);
							_tmp109_ = _tmp108_;
							if (!(_tmp106_ <= _tmp109_)) {
								break;
							}
							_tmp110_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
							_tmp111_ = _tmp110_;
							_tmp112_ = lvalue;
							_tmp113_ = dim;
							_tmp114_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp112_, _tmp113_);
							_tmp115_ = _tmp114_;
							_tmp116_ = vala_ccode_constant_new ("-1");
							_tmp117_ = _tmp116_;
							vala_ccode_function_add_assignment (_tmp111_, _tmp115_, (ValaCCodeExpression*) _tmp117_);
							_vala_ccode_node_unref0 (_tmp117_);
							_vala_ccode_node_unref0 (_tmp115_);
						}
					}
				}
			}
		}
		_tmp119_ = array_type;
		_tmp120_ = vala_array_type_get_rank (_tmp119_);
		_tmp121_ = _tmp120_;
		if (_tmp121_ == 1) {
			ValaTargetValue* _tmp122_;
			ValaCCodeExpression* _tmp123_;
			ValaCCodeExpression* _tmp124_;
			_tmp122_ = lvalue;
			_tmp123_ = vala_ccode_base_module_get_array_size_cvalue ((ValaCCodeBaseModule*) self, _tmp122_);
			_tmp124_ = _tmp123_;
			_tmp118_ = _tmp124_ != NULL;
			_vala_ccode_node_unref0 (_tmp124_);
		} else {
			_tmp118_ = FALSE;
		}
		if (_tmp118_) {
			ValaCCodeFunction* _tmp125_;
			ValaCCodeFunction* _tmp126_;
			ValaTargetValue* _tmp127_;
			ValaCCodeExpression* _tmp128_;
			ValaCCodeExpression* _tmp129_;
			ValaTargetValue* _tmp130_;
			ValaCCodeExpression* _tmp131_;
			ValaCCodeExpression* _tmp132_;
			_tmp125_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp126_ = _tmp125_;
			_tmp127_ = lvalue;
			_tmp128_ = vala_ccode_base_module_get_array_size_cvalue ((ValaCCodeBaseModule*) self, _tmp127_);
			_tmp129_ = _tmp128_;
			_tmp130_ = lvalue;
			_tmp131_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp130_, 1);
			_tmp132_ = _tmp131_;
			vala_ccode_function_add_assignment (_tmp126_, _tmp129_, _tmp132_);
			_vala_ccode_node_unref0 (_tmp132_);
			_vala_ccode_node_unref0 (_tmp129_);
		}
		_vala_target_value_unref0 (glib_value);
	}
	_tmp133_ = lvalue;
	_tmp134_ = vala_target_value_get_value_type (_tmp133_);
	_tmp135_ = _tmp134_;
	_tmp136_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp135_, VALA_TYPE_DELEGATE_TYPE) ? ((ValaDelegateType*) _tmp135_) : NULL);
	delegate_type = _tmp136_;
	_tmp138_ = delegate_type;
	if (_tmp138_ != NULL) {
		ValaDelegateType* _tmp139_;
		ValaDelegate* _tmp140_;
		ValaDelegate* _tmp141_;
		gboolean _tmp142_;
		gboolean _tmp143_;
		_tmp139_ = delegate_type;
		_tmp140_ = vala_delegate_type_get_delegate_symbol (_tmp139_);
		_tmp141_ = _tmp140_;
		_tmp142_ = vala_delegate_get_has_target (_tmp141_);
		_tmp143_ = _tmp142_;
		_tmp137_ = _tmp143_;
	} else {
		_tmp137_ = FALSE;
	}
	if (_tmp137_) {
		ValaCCodeExpression* lvalue_target = NULL;
		ValaTargetValue* _tmp144_;
		ValaCCodeExpression* _tmp145_;
		ValaCCodeExpression* rvalue_target = NULL;
		ValaTargetValue* _tmp146_;
		ValaCCodeExpression* _tmp147_;
		ValaCCodeExpression* _tmp148_;
		_tmp144_ = lvalue;
		_tmp145_ = vala_ccode_base_module_get_delegate_target_cvalue ((ValaCCodeBaseModule*) self, _tmp144_);
		lvalue_target = _tmp145_;
		_tmp146_ = value;
		_tmp147_ = vala_ccode_base_module_get_delegate_target_cvalue ((ValaCCodeBaseModule*) self, _tmp146_);
		rvalue_target = _tmp147_;
		_tmp148_ = lvalue_target;
		if (_tmp148_ != NULL) {
			ValaCCodeExpression* _tmp149_;
			ValaCCodeExpression* lvalue_destroy_notify = NULL;
			ValaTargetValue* _tmp160_;
			ValaCCodeExpression* _tmp161_;
			ValaCCodeExpression* rvalue_destroy_notify = NULL;
			ValaTargetValue* _tmp162_;
			ValaCCodeExpression* _tmp163_;
			ValaCCodeExpression* _tmp164_;
			_tmp149_ = rvalue_target;
			if (_tmp149_ != NULL) {
				ValaCCodeFunction* _tmp150_;
				ValaCCodeFunction* _tmp151_;
				ValaCCodeExpression* _tmp152_;
				ValaCCodeExpression* _tmp153_;
				_tmp150_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp151_ = _tmp150_;
				_tmp152_ = lvalue_target;
				_tmp153_ = rvalue_target;
				vala_ccode_function_add_assignment (_tmp151_, _tmp152_, _tmp153_);
			} else {
				ValaSourceReference* _tmp154_;
				ValaCCodeFunction* _tmp155_;
				ValaCCodeFunction* _tmp156_;
				ValaCCodeExpression* _tmp157_;
				ValaCCodeInvalidExpression* _tmp158_;
				ValaCCodeInvalidExpression* _tmp159_;
				_tmp154_ = source_reference;
				vala_report_error (_tmp154_, "Assigning delegate without required target in scope");
				_tmp155_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
				_tmp156_ = _tmp155_;
				_tmp157_ = lvalue_target;
				_tmp158_ = vala_ccode_invalid_expression_new ();
				_tmp159_ = _tmp158_;
				vala_ccode_function_add_assignment (_tmp156_, _tmp157_, (ValaCCodeExpression*) _tmp159_);
				_vala_ccode_node_unref0 (_tmp159_);
			}
			_tmp160_ = lvalue;
			_tmp161_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cvalue ((ValaCCodeBaseModule*) self, _tmp160_);
			lvalue_destroy_notify = _tmp161_;
			_tmp162_ = value;
			_tmp163_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cvalue ((ValaCCodeBaseModule*) self, _tmp162_);
			rvalue_destroy_notify = _tmp163_;
			_tmp164_ = lvalue_destroy_notify;
			if (_tmp164_ != NULL) {
				ValaCCodeExpression* _tmp165_;
				_tmp165_ = rvalue_destroy_notify;
				if (_tmp165_ != NULL) {
					ValaCCodeFunction* _tmp166_;
					ValaCCodeFunction* _tmp167_;
					ValaCCodeExpression* _tmp168_;
					ValaCCodeExpression* _tmp169_;
					_tmp166_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
					_tmp167_ = _tmp166_;
					_tmp168_ = lvalue_destroy_notify;
					_tmp169_ = rvalue_destroy_notify;
					vala_ccode_function_add_assignment (_tmp167_, _tmp168_, _tmp169_);
				} else {
					ValaCCodeFunction* _tmp170_;
					ValaCCodeFunction* _tmp171_;
					ValaCCodeExpression* _tmp172_;
					ValaCCodeConstant* _tmp173_;
					ValaCCodeConstant* _tmp174_;
					_tmp170_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
					_tmp171_ = _tmp170_;
					_tmp172_ = lvalue_destroy_notify;
					_tmp173_ = vala_ccode_constant_new ("NULL");
					_tmp174_ = _tmp173_;
					vala_ccode_function_add_assignment (_tmp171_, _tmp172_, (ValaCCodeExpression*) _tmp174_);
					_vala_ccode_node_unref0 (_tmp174_);
				}
			}
			_vala_ccode_node_unref0 (rvalue_destroy_notify);
			_vala_ccode_node_unref0 (lvalue_destroy_notify);
		}
		_vala_ccode_node_unref0 (rvalue_target);
		_vala_ccode_node_unref0 (lvalue_target);
	}
	_vala_code_node_unref0 (delegate_type);
	_vala_ccode_node_unref0 (cexpr);
	_vala_code_node_unref0 (array_type);
}


static void vala_ccode_assignment_module_real_store_local (ValaCodeGenerator* base, ValaLocalVariable* local, ValaTargetValue* value, gboolean initializer, ValaSourceReference* source_reference) {
	ValaCCodeAssignmentModule * self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	ValaLocalVariable* _tmp11_;
	ValaTargetValue* _tmp12_;
	ValaTargetValue* _tmp13_;
	ValaTargetValue* _tmp14_;
	ValaSourceReference* _tmp15_;
	self = (ValaCCodeAssignmentModule*) base;
	g_return_if_fail (local != NULL);
	g_return_if_fail (value != NULL);
	_tmp1_ = initializer;
	if (!_tmp1_) {
		ValaLocalVariable* _tmp2_;
		ValaDataType* _tmp3_;
		ValaDataType* _tmp4_;
		gboolean _tmp5_;
		_tmp2_ = local;
		_tmp3_ = vala_variable_get_variable_type ((ValaVariable*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, _tmp4_);
		_tmp0_ = _tmp5_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		ValaCCodeFunction* _tmp6_;
		ValaCCodeFunction* _tmp7_;
		ValaLocalVariable* _tmp8_;
		ValaCCodeExpression* _tmp9_;
		ValaCCodeExpression* _tmp10_;
		_tmp6_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp7_ = _tmp6_;
		_tmp8_ = local;
		_tmp9_ = vala_ccode_base_module_destroy_local ((ValaCCodeBaseModule*) self, _tmp8_);
		_tmp10_ = _tmp9_;
		vala_ccode_function_add_expression (_tmp7_, _tmp10_);
		_vala_ccode_node_unref0 (_tmp10_);
	}
	_tmp11_ = local;
	_tmp12_ = vala_ccode_base_module_get_local_cvalue ((ValaCCodeBaseModule*) self, _tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = value;
	_tmp15_ = source_reference;
	vala_ccode_base_module_store_value ((ValaCCodeBaseModule*) self, _tmp13_, _tmp14_, _tmp15_);
	_vala_target_value_unref0 (_tmp13_);
}


static void vala_ccode_assignment_module_real_store_parameter (ValaCodeGenerator* base, ValaParameter* param, ValaTargetValue* _value, gboolean capturing_parameter, ValaSourceReference* source_reference) {
	ValaCCodeAssignmentModule * self;
	ValaTargetValue* value = NULL;
	ValaTargetValue* _tmp0_;
	ValaTargetValue* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_;
	gboolean capturing_parameter_in_coroutine = FALSE;
	ValaDataType* param_type = NULL;
	ValaParameter* _tmp5_;
	ValaDataType* _tmp6_;
	ValaDataType* _tmp7_;
	ValaDataType* _tmp8_;
	gboolean _tmp9_ = FALSE;
	ValaParameter* _tmp10_;
	gboolean _tmp11_;
	gboolean _tmp12_;
	ValaDataType* _tmp35_;
	gboolean _tmp36_;
	ValaParameter* _tmp42_;
	ValaTargetValue* _tmp43_;
	ValaTargetValue* _tmp44_;
	ValaTargetValue* _tmp45_;
	ValaSourceReference* _tmp46_;
	self = (ValaCCodeAssignmentModule*) base;
	g_return_if_fail (param != NULL);
	g_return_if_fail (_value != NULL);
	_tmp0_ = _value;
	_tmp1_ = _vala_target_value_ref0 (_tmp0_);
	value = _tmp1_;
	_tmp3_ = capturing_parameter;
	if (_tmp3_) {
		gboolean _tmp4_;
		_tmp4_ = vala_ccode_base_module_is_in_coroutine ((ValaCCodeBaseModule*) self);
		_tmp2_ = _tmp4_;
	} else {
		_tmp2_ = FALSE;
	}
	capturing_parameter_in_coroutine = _tmp2_;
	_tmp5_ = param;
	_tmp6_ = vala_variable_get_variable_type ((ValaVariable*) _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = vala_data_type_copy (_tmp7_);
	param_type = _tmp8_;
	_tmp10_ = param;
	_tmp11_ = vala_parameter_get_captured (_tmp10_);
	_tmp12_ = _tmp11_;
	if (_tmp12_) {
		_tmp9_ = TRUE;
	} else {
		gboolean _tmp13_;
		_tmp13_ = vala_ccode_base_module_is_in_coroutine ((ValaCCodeBaseModule*) self);
		_tmp9_ = _tmp13_;
	}
	if (_tmp9_) {
		gboolean _tmp14_ = FALSE;
		ValaDataType* _tmp15_;
		gboolean _tmp16_;
		gboolean _tmp17_;
		_tmp15_ = param_type;
		_tmp16_ = vala_data_type_get_value_owned (_tmp15_);
		_tmp17_ = _tmp16_;
		if (!_tmp17_) {
			ValaDataType* _tmp18_;
			gboolean _tmp19_;
			_tmp18_ = param_type;
			_tmp19_ = vala_ccode_base_module_no_implicit_copy ((ValaCCodeBaseModule*) self, _tmp18_);
			_tmp14_ = !_tmp19_;
		} else {
			_tmp14_ = FALSE;
		}
		if (_tmp14_) {
			ValaDataType* _tmp20_;
			gboolean old_coroutine = FALSE;
			gboolean _tmp21_;
			gboolean _tmp22_;
			gboolean _tmp25_ = FALSE;
			ValaDataType* _tmp26_;
			gboolean _tmp27_;
			gboolean _tmp32_;
			_tmp20_ = param_type;
			vala_data_type_set_value_owned (_tmp20_, TRUE);
			_tmp21_ = vala_ccode_base_module_is_in_coroutine ((ValaCCodeBaseModule*) self);
			old_coroutine = _tmp21_;
			_tmp22_ = old_coroutine;
			if (_tmp22_) {
				ValaMethod* _tmp23_;
				ValaMethod* _tmp24_;
				_tmp23_ = vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self);
				_tmp24_ = _tmp23_;
				vala_method_set_coroutine (_tmp24_, FALSE);
			}
			_tmp26_ = param_type;
			_tmp27_ = vala_ccode_base_module_requires_copy ((ValaCCodeBaseModule*) self, _tmp26_);
			if (_tmp27_) {
				gboolean _tmp28_;
				_tmp28_ = capturing_parameter_in_coroutine;
				_tmp25_ = !_tmp28_;
			} else {
				_tmp25_ = FALSE;
			}
			if (_tmp25_) {
				ValaTargetValue* _tmp29_;
				ValaParameter* _tmp30_;
				ValaTargetValue* _tmp31_;
				_tmp29_ = value;
				_tmp30_ = param;
				_tmp31_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, _tmp29_, (ValaCodeNode*) _tmp30_);
				_vala_target_value_unref0 (value);
				value = _tmp31_;
			}
			_tmp32_ = old_coroutine;
			if (_tmp32_) {
				ValaMethod* _tmp33_;
				ValaMethod* _tmp34_;
				_tmp33_ = vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self);
				_tmp34_ = _tmp33_;
				vala_method_set_coroutine (_tmp34_, TRUE);
			}
		}
	}
	_tmp35_ = param_type;
	_tmp36_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, _tmp35_);
	if (_tmp36_) {
		ValaCCodeFunction* _tmp37_;
		ValaCCodeFunction* _tmp38_;
		ValaParameter* _tmp39_;
		ValaCCodeExpression* _tmp40_;
		ValaCCodeExpression* _tmp41_;
		_tmp37_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp38_ = _tmp37_;
		_tmp39_ = param;
		_tmp40_ = vala_ccode_base_module_destroy_parameter ((ValaCCodeBaseModule*) self, _tmp39_);
		_tmp41_ = _tmp40_;
		vala_ccode_function_add_expression (_tmp38_, _tmp41_);
		_vala_ccode_node_unref0 (_tmp41_);
	}
	_tmp42_ = param;
	_tmp43_ = vala_ccode_base_module_get_parameter_cvalue ((ValaCCodeBaseModule*) self, _tmp42_);
	_tmp44_ = _tmp43_;
	_tmp45_ = value;
	_tmp46_ = source_reference;
	vala_ccode_base_module_store_value ((ValaCCodeBaseModule*) self, _tmp44_, _tmp45_, _tmp46_);
	_vala_target_value_unref0 (_tmp44_);
	_vala_code_node_unref0 (param_type);
	_vala_target_value_unref0 (value);
}


static void vala_ccode_assignment_module_real_store_field (ValaCodeGenerator* base, ValaField* field, ValaTargetValue* instance, ValaTargetValue* value, ValaSourceReference* source_reference) {
	ValaCCodeAssignmentModule * self;
	ValaTargetValue* lvalue = NULL;
	ValaField* _tmp0_;
	ValaTargetValue* _tmp1_;
	ValaTargetValue* _tmp2_;
	ValaDataType* type = NULL;
	ValaTargetValue* _tmp3_;
	ValaDataType* _tmp4_;
	ValaDataType* _tmp5_;
	ValaDataType* _tmp6_;
	ValaTargetValue* _tmp7_;
	ValaDataType* _tmp8_;
	ValaDataType* _tmp9_;
	ValaDataType* _tmp14_;
	gboolean _tmp15_;
	ValaTargetValue* _tmp22_;
	ValaTargetValue* _tmp23_;
	ValaSourceReference* _tmp24_;
	self = (ValaCCodeAssignmentModule*) base;
	g_return_if_fail (field != NULL);
	g_return_if_fail (value != NULL);
	_tmp0_ = field;
	_tmp1_ = instance;
	_tmp2_ = vala_ccode_base_module_get_field_cvalue ((ValaCCodeBaseModule*) self, _tmp0_, _tmp1_);
	lvalue = _tmp2_;
	_tmp3_ = lvalue;
	_tmp4_ = vala_target_value_get_value_type (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _vala_code_node_ref0 (_tmp5_);
	type = _tmp6_;
	_tmp7_ = lvalue;
	_tmp8_ = vala_target_value_get_actual_value_type (_tmp7_);
	_tmp9_ = _tmp8_;
	if (_tmp9_ != NULL) {
		ValaTargetValue* _tmp10_;
		ValaDataType* _tmp11_;
		ValaDataType* _tmp12_;
		ValaDataType* _tmp13_;
		_tmp10_ = lvalue;
		_tmp11_ = vala_target_value_get_actual_value_type (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = _vala_code_node_ref0 (_tmp12_);
		_vala_code_node_unref0 (type);
		type = _tmp13_;
	}
	_tmp14_ = type;
	_tmp15_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, _tmp14_);
	if (_tmp15_) {
		ValaCCodeFunction* _tmp16_;
		ValaCCodeFunction* _tmp17_;
		ValaField* _tmp18_;
		ValaTargetValue* _tmp19_;
		ValaCCodeExpression* _tmp20_;
		ValaCCodeExpression* _tmp21_;
		_tmp16_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp17_ = _tmp16_;
		_tmp18_ = field;
		_tmp19_ = instance;
		_tmp20_ = vala_ccode_base_module_destroy_field ((ValaCCodeBaseModule*) self, _tmp18_, _tmp19_);
		_tmp21_ = _tmp20_;
		vala_ccode_function_add_expression (_tmp17_, _tmp21_);
		_vala_ccode_node_unref0 (_tmp21_);
	}
	_tmp22_ = lvalue;
	_tmp23_ = value;
	_tmp24_ = source_reference;
	vala_ccode_base_module_store_value ((ValaCCodeBaseModule*) self, _tmp22_, _tmp23_, _tmp24_);
	_vala_code_node_unref0 (type);
	_vala_target_value_unref0 (lvalue);
}


ValaCCodeAssignmentModule* vala_ccode_assignment_module_construct (GType object_type) {
	ValaCCodeAssignmentModule* self = NULL;
	self = (ValaCCodeAssignmentModule*) vala_ccode_member_access_module_construct (object_type);
	return self;
}


ValaCCodeAssignmentModule* vala_ccode_assignment_module_new (void) {
	return vala_ccode_assignment_module_construct (VALA_TYPE_CCODE_ASSIGNMENT_MODULE);
}


static void vala_ccode_assignment_module_class_init (ValaCCodeAssignmentModuleClass * klass) {
	vala_ccode_assignment_module_parent_class = g_type_class_peek_parent (klass);
	((ValaCodeVisitorClass *) klass)->visit_assignment = (void (*) (ValaCodeVisitor *, ValaAssignment*)) vala_ccode_assignment_module_real_visit_assignment;
	((ValaCCodeBaseModuleClass *) klass)->store_value = (void (*) (ValaCCodeBaseModule *, ValaTargetValue*, ValaTargetValue*, ValaSourceReference*)) vala_ccode_assignment_module_real_store_value;
	((ValaCodeGeneratorClass *) klass)->store_local = (void (*) (ValaCodeGenerator *, ValaLocalVariable*, ValaTargetValue*, gboolean, ValaSourceReference*)) vala_ccode_assignment_module_real_store_local;
	((ValaCodeGeneratorClass *) klass)->store_parameter = (void (*) (ValaCodeGenerator *, ValaParameter*, ValaTargetValue*, gboolean, ValaSourceReference*)) vala_ccode_assignment_module_real_store_parameter;
	((ValaCodeGeneratorClass *) klass)->store_field = (void (*) (ValaCodeGenerator *, ValaField*, ValaTargetValue*, ValaTargetValue*, ValaSourceReference*)) vala_ccode_assignment_module_real_store_field;
}


static void vala_ccode_assignment_module_instance_init (ValaCCodeAssignmentModule * self) {
}


/**
 * The link between an assignment and generated code.
 */
GType vala_ccode_assignment_module_get_type (void) {
	static volatile gsize vala_ccode_assignment_module_type_id__volatile = 0;
	if (g_once_init_enter (&vala_ccode_assignment_module_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValaCCodeAssignmentModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_ccode_assignment_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaCCodeAssignmentModule), 0, (GInstanceInitFunc) vala_ccode_assignment_module_instance_init, NULL };
		GType vala_ccode_assignment_module_type_id;
		vala_ccode_assignment_module_type_id = g_type_register_static (VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE, "ValaCCodeAssignmentModule", &g_define_type_info, 0);
		g_once_init_leave (&vala_ccode_assignment_module_type_id__volatile, vala_ccode_assignment_module_type_id);
	}
	return vala_ccode_assignment_module_type_id__volatile;
}



