/* 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 "valacodegen.h"
#include <vala.h>
#include <glib.h>
#include <valaccode.h>
#include <stdlib.h>
#include <string.h>
#include <valagee.h>
#include <glib-object.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

#define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_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_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))

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);
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,
                                                    gboolean initializer);
static GType vala_ccode_assignment_module_get_type_once (void);

static gpointer
_vala_ccode_node_ref0 (gpointer self)
{
	return self ? vala_ccode_node_ref (self) : NULL;
}

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

static ValaTargetValue*
vala_ccode_assignment_module_emit_simple_assignment (ValaCCodeAssignmentModule* self,
                                                     ValaAssignment* assignment)
{
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaDataType* _tmp2_;
	ValaDataType* _tmp3_;
	ValaAssignmentOperator _tmp12_;
	ValaAssignmentOperator _tmp13_;
	gboolean _tmp74_ = FALSE;
	ValaExpression* _tmp75_;
	ValaExpression* _tmp76_;
	ValaDataType* _tmp77_;
	ValaDataType* _tmp78_;
	ValaTargetValue* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (assignment != NULL, NULL);
	_tmp0_ = vala_assignment_get_left (assignment);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_expression_get_value_type (_tmp1_);
	_tmp3_ = _tmp2_;
	if (vala_ccode_base_module_requires_destroy (_tmp3_)) {
		ValaCCodeFunction* _tmp4_;
		ValaCCodeFunction* _tmp5_;
		ValaExpression* _tmp6_;
		ValaExpression* _tmp7_;
		ValaTargetValue* _tmp8_;
		ValaTargetValue* _tmp9_;
		ValaCCodeExpression* _tmp10_;
		ValaCCodeExpression* _tmp11_;
		_tmp4_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp5_ = _tmp4_;
		_tmp6_ = vala_assignment_get_left (assignment);
		_tmp7_ = _tmp6_;
		_tmp8_ = vala_expression_get_target_value (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = vala_ccode_base_module_destroy_value ((ValaCCodeBaseModule*) self, _tmp9_, FALSE);
		_tmp11_ = _tmp10_;
		vala_ccode_function_add_expression (_tmp5_, _tmp11_);
		_vala_ccode_node_unref0 (_tmp11_);
	}
	_tmp12_ = vala_assignment_get_operator (assignment);
	_tmp13_ = _tmp12_;
	if (_tmp13_ == VALA_ASSIGNMENT_OPERATOR_SIMPLE) {
		ValaExpression* _tmp14_;
		ValaExpression* _tmp15_;
		ValaTargetValue* _tmp16_;
		ValaTargetValue* _tmp17_;
		ValaExpression* _tmp18_;
		ValaExpression* _tmp19_;
		ValaTargetValue* _tmp20_;
		ValaTargetValue* _tmp21_;
		ValaSourceReference* _tmp22_;
		ValaSourceReference* _tmp23_;
		_tmp14_ = vala_assignment_get_left (assignment);
		_tmp15_ = _tmp14_;
		_tmp16_ = vala_expression_get_target_value (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = vala_assignment_get_right (assignment);
		_tmp19_ = _tmp18_;
		_tmp20_ = vala_expression_get_target_value (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = vala_code_node_get_source_reference ((ValaCodeNode*) assignment);
		_tmp23_ = _tmp22_;
		vala_ccode_base_module_store_value ((ValaCCodeBaseModule*) self, _tmp17_, _tmp21_, _tmp23_);
	} else {
		ValaCCodeAssignmentOperator cop = 0;
		ValaAssignmentOperator _tmp24_;
		ValaAssignmentOperator _tmp25_;
		ValaCCodeExpression* codenode = NULL;
		ValaExpression* _tmp64_;
		ValaExpression* _tmp65_;
		ValaCCodeExpression* _tmp66_;
		ValaExpression* _tmp67_;
		ValaExpression* _tmp68_;
		ValaCCodeExpression* _tmp69_;
		ValaCCodeAssignment* _tmp70_;
		ValaCCodeFunction* _tmp71_;
		ValaCCodeFunction* _tmp72_;
		ValaCCodeExpression* _tmp73_;
		_tmp24_ = vala_assignment_get_operator (assignment);
		_tmp25_ = _tmp24_;
		switch (_tmp25_) {
			case VALA_ASSIGNMENT_OPERATOR_BITWISE_OR:
			{
				cop = VALA_CCODE_ASSIGNMENT_OPERATOR_BITWISE_OR;
				break;
			}
			case VALA_ASSIGNMENT_OPERATOR_BITWISE_AND:
			{
				cop = VALA_CCODE_ASSIGNMENT_OPERATOR_BITWISE_AND;
				break;
			}
			case VALA_ASSIGNMENT_OPERATOR_BITWISE_XOR:
			{
				cop = VALA_CCODE_ASSIGNMENT_OPERATOR_BITWISE_XOR;
				break;
			}
			case VALA_ASSIGNMENT_OPERATOR_ADD:
			{
				cop = VALA_CCODE_ASSIGNMENT_OPERATOR_ADD;
				break;
			}
			case VALA_ASSIGNMENT_OPERATOR_SUB:
			{
				cop = VALA_CCODE_ASSIGNMENT_OPERATOR_SUB;
				break;
			}
			case VALA_ASSIGNMENT_OPERATOR_MUL:
			{
				cop = VALA_CCODE_ASSIGNMENT_OPERATOR_MUL;
				break;
			}
			case VALA_ASSIGNMENT_OPERATOR_DIV:
			{
				cop = VALA_CCODE_ASSIGNMENT_OPERATOR_DIV;
				break;
			}
			case VALA_ASSIGNMENT_OPERATOR_PERCENT:
			{
				ValaCCodeExpression* cleft = NULL;
				ValaExpression* _tmp26_;
				ValaExpression* _tmp27_;
				ValaCCodeExpression* _tmp28_;
				ValaCCodeExpression* _tmp29_;
				ValaCCodeExpression* cright = NULL;
				ValaExpression* _tmp30_;
				ValaExpression* _tmp31_;
				ValaCCodeExpression* _tmp32_;
				ValaCCodeExpression* _tmp33_;
				ValaDataType* _tmp34_;
				ValaDataType* _tmp35_;
				ValaDataType* _tmp36_;
				_tmp26_ = vala_assignment_get_left (assignment);
				_tmp27_ = _tmp26_;
				_tmp28_ = vala_get_cvalue (_tmp27_);
				_tmp29_ = _vala_ccode_node_ref0 (_tmp28_);
				cleft = _tmp29_;
				_tmp30_ = vala_assignment_get_right (assignment);
				_tmp31_ = _tmp30_;
				_tmp32_ = vala_get_cvalue (_tmp31_);
				_tmp33_ = _vala_ccode_node_ref0 (_tmp32_);
				cright = _tmp33_;
				_tmp34_ = vala_expression_get_value_type ((ValaExpression*) assignment);
				_tmp35_ = _tmp34_;
				_tmp36_ = ((ValaCCodeBaseModule*) self)->double_type;
				if (vala_data_type_equals (_tmp35_, _tmp36_)) {
					ValaCCodeFile* _tmp37_;
					ValaCCodeFunctionCall* ccall = NULL;
					ValaCCodeIdentifier* _tmp38_;
					ValaCCodeIdentifier* _tmp39_;
					ValaCCodeFunctionCall* _tmp40_;
					ValaCCodeFunctionCall* _tmp41_;
					ValaCCodeFunctionCall* _tmp42_;
					ValaCCodeExpression* _tmp43_;
					ValaCCodeFunctionCall* _tmp44_;
					ValaCCodeExpression* _tmp45_;
					ValaExpression* _tmp46_;
					ValaExpression* _tmp47_;
					ValaCCodeFunctionCall* _tmp48_;
					_tmp37_ = ((ValaCCodeBaseModule*) self)->cfile;
					vala_ccode_file_add_include (_tmp37_, "math.h", FALSE);
					_tmp38_ = vala_ccode_identifier_new ("fmod");
					_tmp39_ = _tmp38_;
					_tmp40_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp39_);
					_tmp41_ = _tmp40_;
					_vala_ccode_node_unref0 (_tmp39_);
					ccall = _tmp41_;
					_tmp42_ = ccall;
					_tmp43_ = cleft;
					vala_ccode_function_call_add_argument (_tmp42_, _tmp43_);
					_tmp44_ = ccall;
					_tmp45_ = cright;
					vala_ccode_function_call_add_argument (_tmp44_, _tmp45_);
					_tmp46_ = vala_assignment_get_right (assignment);
					_tmp47_ = _tmp46_;
					_tmp48_ = ccall;
					vala_set_cvalue (_tmp47_, (ValaCCodeExpression*) _tmp48_);
					cop = VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE;
					_vala_ccode_node_unref0 (ccall);
				} else {
					ValaDataType* _tmp49_;
					ValaDataType* _tmp50_;
					ValaDataType* _tmp51_;
					_tmp49_ = vala_expression_get_value_type ((ValaExpression*) assignment);
					_tmp50_ = _tmp49_;
					_tmp51_ = ((ValaCCodeBaseModule*) self)->float_type;
					if (vala_data_type_equals (_tmp50_, _tmp51_)) {
						ValaCCodeFile* _tmp52_;
						ValaCCodeFunctionCall* ccall = NULL;
						ValaCCodeIdentifier* _tmp53_;
						ValaCCodeIdentifier* _tmp54_;
						ValaCCodeFunctionCall* _tmp55_;
						ValaCCodeFunctionCall* _tmp56_;
						ValaCCodeFunctionCall* _tmp57_;
						ValaCCodeExpression* _tmp58_;
						ValaCCodeFunctionCall* _tmp59_;
						ValaCCodeExpression* _tmp60_;
						ValaExpression* _tmp61_;
						ValaExpression* _tmp62_;
						ValaCCodeFunctionCall* _tmp63_;
						_tmp52_ = ((ValaCCodeBaseModule*) self)->cfile;
						vala_ccode_file_add_include (_tmp52_, "math.h", FALSE);
						_tmp53_ = vala_ccode_identifier_new ("fmodf");
						_tmp54_ = _tmp53_;
						_tmp55_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp54_);
						_tmp56_ = _tmp55_;
						_vala_ccode_node_unref0 (_tmp54_);
						ccall = _tmp56_;
						_tmp57_ = ccall;
						_tmp58_ = cleft;
						vala_ccode_function_call_add_argument (_tmp57_, _tmp58_);
						_tmp59_ = ccall;
						_tmp60_ = cright;
						vala_ccode_function_call_add_argument (_tmp59_, _tmp60_);
						_tmp61_ = vala_assignment_get_right (assignment);
						_tmp62_ = _tmp61_;
						_tmp63_ = ccall;
						vala_set_cvalue (_tmp62_, (ValaCCodeExpression*) _tmp63_);
						cop = VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE;
						_vala_ccode_node_unref0 (ccall);
					} else {
						cop = VALA_CCODE_ASSIGNMENT_OPERATOR_PERCENT;
					}
				}
				_vala_ccode_node_unref0 (cright);
				_vala_ccode_node_unref0 (cleft);
				break;
			}
			case VALA_ASSIGNMENT_OPERATOR_SHIFT_LEFT:
			{
				cop = VALA_CCODE_ASSIGNMENT_OPERATOR_SHIFT_LEFT;
				break;
			}
			case VALA_ASSIGNMENT_OPERATOR_SHIFT_RIGHT:
			{
				cop = VALA_CCODE_ASSIGNMENT_OPERATOR_SHIFT_RIGHT;
				break;
			}
			default:
			{
				g_assert_not_reached ();
			}
		}
		_tmp64_ = vala_assignment_get_left (assignment);
		_tmp65_ = _tmp64_;
		_tmp66_ = vala_get_cvalue (_tmp65_);
		_tmp67_ = vala_assignment_get_right (assignment);
		_tmp68_ = _tmp67_;
		_tmp69_ = vala_get_cvalue (_tmp68_);
		_tmp70_ = vala_ccode_assignment_new (_tmp66_, _tmp69_, cop);
		codenode = (ValaCCodeExpression*) _tmp70_;
		_tmp71_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp72_ = _tmp71_;
		_tmp73_ = codenode;
		vala_ccode_function_add_expression (_tmp72_, _tmp73_);
		_vala_ccode_node_unref0 (codenode);
	}
	_tmp75_ = vala_assignment_get_left (assignment);
	_tmp76_ = _tmp75_;
	_tmp77_ = vala_expression_get_value_type (_tmp76_);
	_tmp78_ = _tmp77_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp78_, VALA_TYPE_ARRAY_TYPE)) {
		ValaExpression* _tmp79_;
		ValaExpression* _tmp80_;
		ValaDataType* _tmp81_;
		ValaDataType* _tmp82_;
		gboolean _tmp83_;
		gboolean _tmp84_;
		_tmp79_ = vala_assignment_get_left (assignment);
		_tmp80_ = _tmp79_;
		_tmp81_ = vala_expression_get_value_type (_tmp80_);
		_tmp82_ = _tmp81_;
		_tmp83_ = vala_array_type_get_inline_allocated (G_TYPE_CHECK_INSTANCE_CAST (_tmp82_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
		_tmp84_ = _tmp83_;
		_tmp74_ = _tmp84_;
	} else {
		_tmp74_ = FALSE;
	}
	if (_tmp74_) {
		ValaVariable* variable = NULL;
		ValaExpression* _tmp85_;
		ValaExpression* _tmp86_;
		ValaSymbol* _tmp87_;
		ValaSymbol* _tmp88_;
		ValaVariable* _tmp89_;
		ValaExpression* _tmp90_;
		ValaExpression* _tmp91_;
		ValaTargetValue* _tmp92_;
		ValaTargetValue* _tmp93_;
		ValaTargetValue* _tmp94_;
		_tmp85_ = vala_assignment_get_left (assignment);
		_tmp86_ = _tmp85_;
		_tmp87_ = vala_expression_get_symbol_reference (_tmp86_);
		_tmp88_ = _tmp87_;
		variable = G_TYPE_CHECK_INSTANCE_CAST (_tmp88_, VALA_TYPE_VARIABLE, ValaVariable);
		_tmp89_ = variable;
		_tmp90_ = vala_assignment_get_left (assignment);
		_tmp91_ = _tmp90_;
		_tmp92_ = vala_expression_get_target_value (_tmp91_);
		_tmp93_ = _tmp92_;
		_tmp94_ = vala_ccode_base_module_load_variable ((ValaCCodeBaseModule*) self, _tmp89_, _tmp93_, NULL);
		result = _tmp94_;
		return result;
	} else {
		ValaExpression* _tmp95_;
		ValaExpression* _tmp96_;
		ValaTargetValue* _tmp97_;
		ValaTargetValue* _tmp98_;
		ValaTargetValue* _tmp99_;
		_tmp95_ = vala_assignment_get_left (assignment);
		_tmp96_ = _tmp95_;
		_tmp97_ = vala_expression_get_target_value (_tmp96_);
		_tmp98_ = _tmp97_;
		_tmp99_ = _vala_target_value_ref0 (_tmp98_);
		result = _tmp99_;
		return result;
	}
}

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

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

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_;
	gboolean _tmp1_ = FALSE;
	gboolean capturing_parameter_in_coroutine = FALSE;
	ValaDataType* param_type = NULL;
	ValaDataType* _tmp2_;
	ValaDataType* _tmp3_;
	ValaDataType* _tmp4_;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_;
	gboolean _tmp7_;
	ValaDataType* _tmp22_;
	ValaTargetValue* _tmp27_;
	ValaTargetValue* _tmp28_;
	ValaTargetValue* _tmp29_;
	self = (ValaCCodeAssignmentModule*) base;
	g_return_if_fail (param != NULL);
	g_return_if_fail (_value != NULL);
	_tmp0_ = _vala_target_value_ref0 (_value);
	value = _tmp0_;
	if (capturing_parameter) {
		_tmp1_ = vala_ccode_base_module_is_in_coroutine ((ValaCCodeBaseModule*) self);
	} else {
		_tmp1_ = FALSE;
	}
	capturing_parameter_in_coroutine = _tmp1_;
	_tmp2_ = vala_variable_get_variable_type ((ValaVariable*) param);
	_tmp3_ = _tmp2_;
	_tmp4_ = vala_data_type_copy (_tmp3_);
	param_type = _tmp4_;
	_tmp6_ = vala_parameter_get_captured (param);
	_tmp7_ = _tmp6_;
	if (_tmp7_) {
		_tmp5_ = TRUE;
	} else {
		_tmp5_ = vala_ccode_base_module_is_in_coroutine ((ValaCCodeBaseModule*) self);
	}
	if (_tmp5_) {
		gboolean _tmp8_ = FALSE;
		ValaDataType* _tmp9_;
		gboolean _tmp10_;
		gboolean _tmp11_;
		_tmp9_ = param_type;
		_tmp10_ = vala_data_type_get_value_owned (_tmp9_);
		_tmp11_ = _tmp10_;
		if (!_tmp11_) {
			ValaDataType* _tmp12_;
			_tmp12_ = param_type;
			_tmp8_ = !vala_ccode_base_module_no_implicit_copy ((ValaCCodeBaseModule*) self, _tmp12_);
		} else {
			_tmp8_ = FALSE;
		}
		if (_tmp8_) {
			ValaDataType* _tmp13_;
			gboolean old_coroutine = FALSE;
			gboolean _tmp16_ = FALSE;
			ValaDataType* _tmp17_;
			_tmp13_ = param_type;
			vala_data_type_set_value_owned (_tmp13_, TRUE);
			old_coroutine = vala_ccode_base_module_is_in_coroutine ((ValaCCodeBaseModule*) self);
			if (old_coroutine) {
				ValaMethod* _tmp14_;
				ValaMethod* _tmp15_;
				_tmp14_ = vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self);
				_tmp15_ = _tmp14_;
				vala_method_set_coroutine (_tmp15_, FALSE);
			}
			_tmp17_ = param_type;
			if (vala_ccode_base_module_requires_copy (_tmp17_)) {
				_tmp16_ = !capturing_parameter_in_coroutine;
			} else {
				_tmp16_ = FALSE;
			}
			if (_tmp16_) {
				ValaTargetValue* _tmp18_;
				ValaTargetValue* _tmp19_;
				_tmp18_ = value;
				_tmp19_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, _tmp18_, (ValaCodeNode*) param);
				_vala_target_value_unref0 (value);
				value = _tmp19_;
			}
			if (old_coroutine) {
				ValaMethod* _tmp20_;
				ValaMethod* _tmp21_;
				_tmp20_ = vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self);
				_tmp21_ = _tmp20_;
				vala_method_set_coroutine (_tmp21_, TRUE);
			}
		}
	}
	_tmp22_ = param_type;
	if (vala_ccode_base_module_requires_destroy (_tmp22_)) {
		ValaCCodeFunction* _tmp23_;
		ValaCCodeFunction* _tmp24_;
		ValaCCodeExpression* _tmp25_;
		ValaCCodeExpression* _tmp26_;
		_tmp23_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp24_ = _tmp23_;
		_tmp25_ = vala_ccode_base_module_destroy_parameter ((ValaCCodeBaseModule*) self, param);
		_tmp26_ = _tmp25_;
		vala_ccode_function_add_expression (_tmp24_, _tmp26_);
		_vala_ccode_node_unref0 (_tmp26_);
	}
	_tmp27_ = vala_ccode_base_module_get_parameter_cvalue ((ValaCCodeBaseModule*) self, param);
	_tmp28_ = _tmp27_;
	_tmp29_ = value;
	vala_ccode_base_module_store_value ((ValaCCodeBaseModule*) self, _tmp28_, _tmp29_, source_reference);
	_vala_target_value_unref0 (_tmp28_);
	_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,
                                               gboolean initializer)
{
	ValaCCodeAssignmentModule * self;
	ValaTargetValue* lvalue = NULL;
	ValaTargetValue* _tmp0_;
	ValaDataType* type = NULL;
	ValaTargetValue* _tmp1_;
	ValaDataType* _tmp2_;
	ValaDataType* _tmp3_;
	ValaDataType* _tmp4_;
	ValaTargetValue* _tmp5_;
	ValaDataType* _tmp6_;
	ValaDataType* _tmp7_;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	gboolean _tmp22_ = FALSE;
	gboolean _tmp23_ = FALSE;
	gboolean _tmp24_ = FALSE;
	ValaTargetValue* _tmp38_;
	self = (ValaCCodeAssignmentModule*) base;
	g_return_if_fail (field != NULL);
	g_return_if_fail (value != NULL);
	_tmp0_ = vala_ccode_base_module_get_field_cvalue ((ValaCCodeBaseModule*) self, field, instance);
	lvalue = _tmp0_;
	_tmp1_ = lvalue;
	_tmp2_ = vala_target_value_get_value_type (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _vala_code_node_ref0 (_tmp3_);
	type = _tmp4_;
	_tmp5_ = lvalue;
	_tmp6_ = vala_target_value_get_actual_value_type (_tmp5_);
	_tmp7_ = _tmp6_;
	if (_tmp7_ != NULL) {
		ValaTargetValue* _tmp8_;
		ValaDataType* _tmp9_;
		ValaDataType* _tmp10_;
		ValaDataType* _tmp11_;
		_tmp8_ = lvalue;
		_tmp9_ = vala_target_value_get_actual_value_type (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = _vala_code_node_ref0 (_tmp10_);
		_vala_code_node_unref0 (type);
		type = _tmp11_;
	}
	if (!initializer) {
		gboolean _tmp14_ = FALSE;
		ValaDataType* _tmp15_;
		ValaDataType* _tmp16_;
		_tmp15_ = vala_variable_get_variable_type ((ValaVariable*) field);
		_tmp16_ = _tmp15_;
		if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, VALA_TYPE_DELEGATE_TYPE)) {
			_tmp14_ = TRUE;
		} else {
			_tmp14_ = vala_get_ccode_delegate_target ((ValaCodeNode*) field);
		}
		_tmp13_ = _tmp14_;
	} else {
		_tmp13_ = FALSE;
	}
	if (_tmp13_) {
		ValaDataType* _tmp17_;
		_tmp17_ = type;
		_tmp12_ = vala_ccode_base_module_requires_destroy (_tmp17_);
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		ValaCCodeFunction* _tmp18_;
		ValaCCodeFunction* _tmp19_;
		ValaCCodeExpression* _tmp20_;
		ValaCCodeExpression* _tmp21_;
		_tmp18_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp19_ = _tmp18_;
		_tmp20_ = vala_ccode_base_module_destroy_field ((ValaCCodeBaseModule*) self, field, instance);
		_tmp21_ = _tmp20_;
		vala_ccode_function_add_expression (_tmp19_, _tmp21_);
		_vala_ccode_node_unref0 (_tmp21_);
	}
	if (initializer) {
		_tmp24_ = instance != NULL;
	} else {
		_tmp24_ = FALSE;
	}
	if (_tmp24_) {
		_tmp23_ = vala_get_ccode_delegate_target ((ValaCodeNode*) field);
	} else {
		_tmp23_ = FALSE;
	}
	if (_tmp23_) {
		ValaCCodeExpression* _tmp25_;
		ValaCCodeExpression* _tmp26_;
		_tmp25_ = vala_ccode_base_module_get_delegate_target_cvalue ((ValaCCodeBaseModule*) self, value);
		_tmp26_ = _tmp25_;
		_tmp22_ = _tmp26_ == NULL;
		_vala_ccode_node_unref0 (_tmp26_);
	} else {
		_tmp22_ = FALSE;
	}
	if (_tmp22_) {
		ValaDelegateType* delegate_type = NULL;
		ValaDataType* _tmp27_;
		ValaDataType* _tmp28_;
		gboolean _tmp29_ = FALSE;
		ValaDelegateType* _tmp30_;
		_tmp27_ = vala_variable_get_variable_type ((ValaVariable*) field);
		_tmp28_ = _tmp27_;
		delegate_type = G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, VALA_TYPE_DELEGATE_TYPE) ? ((ValaDelegateType*) _tmp28_) : NULL;
		_tmp30_ = delegate_type;
		if (_tmp30_ != NULL) {
			ValaDelegateType* _tmp31_;
			ValaDelegate* _tmp32_;
			ValaDelegate* _tmp33_;
			gboolean _tmp34_;
			gboolean _tmp35_;
			_tmp31_ = delegate_type;
			_tmp32_ = vala_delegate_type_get_delegate_symbol (_tmp31_);
			_tmp33_ = _tmp32_;
			_tmp34_ = vala_delegate_get_has_target (_tmp33_);
			_tmp35_ = _tmp34_;
			_tmp29_ = _tmp35_;
		} else {
			_tmp29_ = FALSE;
		}
		if (_tmp29_) {
			ValaCCodeExpression* _tmp36_;
			ValaCCodeExpression* _tmp37_;
			_tmp36_ = vala_get_cvalue_ (instance);
			_tmp37_ = _vala_ccode_node_ref0 (_tmp36_);
			_vala_ccode_node_unref0 (G_TYPE_CHECK_INSTANCE_CAST (value, VALA_TYPE_GLIB_VALUE, ValaGLibValue)->delegate_target_cvalue);
			G_TYPE_CHECK_INSTANCE_CAST (value, VALA_TYPE_GLIB_VALUE, ValaGLibValue)->delegate_target_cvalue = _tmp37_;
		}
	}
	_tmp38_ = lvalue;
	vala_ccode_base_module_store_value ((ValaCCodeBaseModule*) self, _tmp38_, value, source_reference);
	_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,
                                         gpointer klass_data)
{
	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*, gboolean)) vala_ccode_assignment_module_real_store_field;
}

static void
vala_ccode_assignment_module_instance_init (ValaCCodeAssignmentModule * self,
                                            gpointer klass)
{
}

/**
 * The link between an assignment and generated code.
 */
static GType
vala_ccode_assignment_module_get_type_once (void)
{
	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);
	return vala_ccode_assignment_module_type_id;
}

GType
vala_ccode_assignment_module_get_type (void)
{
	static volatile gsize vala_ccode_assignment_module_type_id__once = 0;
	if (g_once_init_enter (&vala_ccode_assignment_module_type_id__once)) {
		GType vala_ccode_assignment_module_type_id;
		vala_ccode_assignment_module_type_id = vala_ccode_assignment_module_get_type_once ();
		g_once_init_leave (&vala_ccode_assignment_module_type_id__once, vala_ccode_assignment_module_type_id);
	}
	return vala_ccode_assignment_module_type_id__once;
}

