#ifndef __X10_ARRAY_ARRAY_H
#define __X10_ARRAY_ARRAY_H

#include <x10rt.h>


#define X10_LANG_OBJECT_H_NODEPS
#include <x10/lang/Object.h>
#undef X10_LANG_OBJECT_H_NODEPS
#define X10_LANG_FUN_0_1_H_NODEPS
#include <x10/lang/Fun_0_1.h>
#undef X10_LANG_FUN_0_1_H_NODEPS
namespace x10 { namespace array { 
class Point;
} } 
#define X10_LANG_ITERABLE_H_NODEPS
#include <x10/lang/Iterable.h>
#undef X10_LANG_ITERABLE_H_NODEPS
#define X10_UTIL_INDEXEDMEMORYCHUNK_H_NODEPS
#include <x10/util/IndexedMemoryChunk.h>
#undef X10_UTIL_INDEXEDMEMORYCHUNK_H_NODEPS
#define X10_ARRAY_RECTLAYOUT_H_NODEPS
#include <x10/array/RectLayout.h>
#undef X10_ARRAY_RECTLAYOUT_H_NODEPS
#define X10_LANG_INT_H_NODEPS
#include <x10/lang/Int.h>
#undef X10_LANG_INT_H_NODEPS
#define X10_LANG_BOOLEAN_H_NODEPS
#include <x10/lang/Boolean.h>
#undef X10_LANG_BOOLEAN_H_NODEPS
namespace x10 { namespace array { 
class Region;
} } 
namespace x10 { namespace lang { 
class Int;
} } 
namespace x10 { namespace lang { 
class Boolean;
} } 
namespace x10 { namespace util { 
template<class TPMGL(T)> class IndexedMemoryChunk;
} } 
namespace x10 { namespace array { 
class RectLayout;
} } 
namespace x10 { namespace compiler { 
class Inline;
} } 
namespace x10 { namespace compiler { 
class CompilerFlags;
} } 
namespace x10 { namespace lang { 
class FailedDynamicCheckException;
} } 
namespace x10 { namespace lang { 
template<class TPMGL(T)> class Iterator;
} } 
namespace x10 { namespace lang { 
class IllegalArgumentException;
} } 
namespace x10 { namespace array { 
class RectRegion1D;
} } 
namespace x10 { namespace array { 
template<class TPMGL(T)> class RemoteArray;
} } 
namespace x10 { namespace lang { 
template<class TPMGL(T)> class GlobalRef;
} } 
namespace x10 { namespace lang { 
class String;
} } 
namespace x10 { namespace util { 
class StringBuilder;
} } 
namespace x10 { namespace lang { 
class Math;
} } 
namespace x10 { namespace array { 
template<class TPMGL(T31869)> class Array__Anonymous__13465;
} } 
namespace x10 { namespace array { 
template<class TPMGL(T31871)> class Array__Anonymous__13753;
} } 
namespace x10 { namespace lang { 
template<class TPMGL(T)> class Sequence;
} } 
namespace x10 { namespace array { 
template<class TPMGL(T31873)> class Array__Anonymous__14087;
} } 
namespace x10 { namespace compiler { 
class Native;
} } 
namespace x10 { namespace lang { 
template<class TPMGL(Z1), class TPMGL(Z2), class TPMGL(U)> class Fun_0_2;
} } 
namespace x10 { namespace util { 
template<class TPMGL(T)> class RemoteIndexedMemoryChunk;
} } 
namespace x10 { namespace lang { 
class Runtime;
} } 
namespace x10 { namespace lang { 
class Place;
} } 
namespace x10 { namespace lang { 
template<class TPMGL(U)> class Fun_0_0;
} } 
namespace x10 { namespace lang { 
class ArrayIndexOutOfBoundsException;
} } 
namespace x10 { namespace compiler { 
class NoInline;
} } 
namespace x10 { namespace compiler { 
class NoReturn;
} } 
namespace x10 { namespace array { 

template<class TPMGL(T)> class Array;
template <> class Array<void>;
template<class TPMGL(T)> class Array : public x10::lang::Object   {
    public:
    RTT_H_DECLS_CLASS
    
    x10aux::ref<x10::array::Region> FMGL(region);
    
    x10_int FMGL(rank);
    
    x10_boolean FMGL(rect);
    
    x10_boolean FMGL(zeroBased);
    
    x10_boolean FMGL(rail);
    
    x10_int FMGL(size);
    
    static x10aux::itable_entry _itables[4];
    
    virtual x10aux::itable_entry* _getITables() { return _itables; }
    
    static typename x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(T)>::template itable<x10::array::Array<TPMGL(T)> > _itable_0;
    
    static x10::lang::Any::itable<x10::array::Array<TPMGL(T)> > _itable_1;
    
    static typename x10::lang::Iterable<x10aux::ref<x10::array::Point> >::template itable<x10::array::Array<TPMGL(T)> > _itable_2;
    
    x10::util::IndexedMemoryChunk<TPMGL(T) > FMGL(raw);
    
    x10::array::RectLayout FMGL(layout);
    
    virtual x10::util::IndexedMemoryChunk<TPMGL(T) > raw();
    void _constructor(x10aux::ref<x10::array::Region> reg);
    
    static x10aux::ref<x10::array::Array<TPMGL(T)> > _make(x10aux::ref<x10::array::Region> reg);
    
    void _constructor(x10aux::ref<x10::array::Region> reg, x10aux::ref<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(T)> > init);
    
    static x10aux::ref<x10::array::Array<TPMGL(T)> > _make(x10aux::ref<x10::array::Region> reg,
                                                           x10aux::ref<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(T)> > init);
    
    void _constructor(x10aux::ref<x10::array::Region> reg, TPMGL(T) init);
    
    static x10aux::ref<x10::array::Array<TPMGL(T)> > _make(x10aux::ref<x10::array::Region> reg,
                                                           TPMGL(T) init);
    
    void _constructor(x10aux::ref<x10::array::Region> reg,
                      x10::util::IndexedMemoryChunk<TPMGL(T) > backingStore);
    
    static x10aux::ref<x10::array::Array<TPMGL(T)> > _make(
             x10aux::ref<x10::array::Region> reg, x10::util::IndexedMemoryChunk<TPMGL(T) > backingStore);
    
    void _constructor(x10::util::IndexedMemoryChunk<TPMGL(T) > backingStore);
    
    static x10aux::ref<x10::array::Array<TPMGL(T)> > _make(
             x10::util::IndexedMemoryChunk<TPMGL(T) > backingStore);
    
    void _constructor(x10_int size);
    
    static x10aux::ref<x10::array::Array<TPMGL(T)> > _make(
             x10_int size);
    
    void _constructor(x10_int size, x10aux::ref<x10::lang::Fun_0_1<x10_int, TPMGL(T)> > init);
    
    static x10aux::ref<x10::array::Array<TPMGL(T)> > _make(
             x10_int size, x10aux::ref<x10::lang::Fun_0_1<x10_int, TPMGL(T)> > init);
    
    void _constructor(x10_int size, TPMGL(T) init);
    
    static x10aux::ref<x10::array::Array<TPMGL(T)> > _make(
             x10_int size, TPMGL(T) init);
    
    void _constructor(x10aux::ref<x10::array::Array<TPMGL(T)> > init);
    
    static x10aux::ref<x10::array::Array<TPMGL(T)> > _make(
             x10aux::ref<x10::array::Array<TPMGL(T)> > init);
    
    void _constructor(x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > init);
    
    static x10aux::ref<x10::array::Array<TPMGL(T)> > _make(
             x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > init);
    
    virtual x10aux::ref<x10::lang::String> toString();
    virtual x10aux::ref<x10::lang::Iterator<x10aux::ref<x10::array::Point> > >
      iterator();
    virtual x10aux::ref<x10::lang::Iterable<TPMGL(T)> > values(
      );
    virtual x10aux::ref<x10::lang::Sequence<TPMGL(T)> > sequence(
      );
    virtual TPMGL(T) __apply(x10_int i0);
    virtual TPMGL(T) __apply(x10_int i0, x10_int i1);
    virtual TPMGL(T) __apply(x10_int i0, x10_int i1, x10_int i2);
    virtual TPMGL(T) __apply(x10_int i0, x10_int i1, x10_int i2,
                             x10_int i3);
    virtual TPMGL(T) __apply(x10aux::ref<x10::array::Point> pt);
    virtual TPMGL(T) __set(x10_int i0, TPMGL(T) v);
    virtual TPMGL(T) __set(x10_int i0, x10_int i1, TPMGL(T) v);
    virtual TPMGL(T) __set(x10_int i0, x10_int i1, x10_int i2,
                           TPMGL(T) v);
    virtual TPMGL(T) __set(x10_int i0, x10_int i1, x10_int i2,
                           x10_int i3, TPMGL(T) v);
    virtual TPMGL(T) __set(x10aux::ref<x10::array::Point> p,
                           TPMGL(T) v);
    virtual void fill(TPMGL(T) v);
    virtual void clear();
    template<class TPMGL(U)> x10aux::ref<x10::array::Array<TPMGL(U)> >
      map(x10aux::ref<x10::lang::Fun_0_1<TPMGL(T), TPMGL(U)> > op);
    template<class TPMGL(U)> x10aux::ref<x10::array::Array<TPMGL(U)> >
      map(x10aux::ref<x10::array::Array<TPMGL(U)> > dst, x10aux::ref<x10::lang::Fun_0_1<TPMGL(T), TPMGL(U)> > op);
    template<class TPMGL(U)> x10aux::ref<x10::array::Array<TPMGL(U)> >
      map(x10aux::ref<x10::array::Array<TPMGL(U)> > dst, x10aux::ref<x10::array::Region> filter,
          x10aux::ref<x10::lang::Fun_0_1<TPMGL(T), TPMGL(U)> > op);
    template<class TPMGL(S), class TPMGL(U)> x10aux::ref<x10::array::Array<TPMGL(S)> >
      map(x10aux::ref<x10::array::Array<TPMGL(U)> > src, x10aux::ref<x10::lang::Fun_0_2<TPMGL(T), TPMGL(U), TPMGL(S)> > op);
    template<class TPMGL(S), class TPMGL(U)> x10aux::ref<x10::array::Array<TPMGL(S)> >
      map(x10aux::ref<x10::array::Array<TPMGL(S)> > dst, x10aux::ref<x10::array::Array<TPMGL(U)> > src,
          x10aux::ref<x10::lang::Fun_0_2<TPMGL(T), TPMGL(U), TPMGL(S)> > op);
    template<class TPMGL(S), class TPMGL(U)> x10aux::ref<x10::array::Array<TPMGL(S)> >
      map(x10aux::ref<x10::array::Array<TPMGL(S)> > dst, x10aux::ref<x10::array::Array<TPMGL(U)> > src,
          x10aux::ref<x10::array::Region> filter, x10aux::ref<x10::lang::Fun_0_2<TPMGL(T), TPMGL(U), TPMGL(S)> > op);
    template<class TPMGL(U)> TPMGL(U) reduce(x10aux::ref<x10::lang::Fun_0_2<TPMGL(U), TPMGL(T), TPMGL(U)> > op,
                                             TPMGL(U) unit);
    template<class TPMGL(U)> x10aux::ref<x10::array::Array<TPMGL(U)> >
      scan(x10aux::ref<x10::lang::Fun_0_2<TPMGL(U), TPMGL(T), TPMGL(U)> > op,
           TPMGL(U) unit);
    template<class TPMGL(U)> x10aux::ref<x10::array::Array<TPMGL(U)> >
      scan(x10aux::ref<x10::array::Array<TPMGL(U)> > dst,
           x10aux::ref<x10::lang::Fun_0_2<TPMGL(U), TPMGL(T), TPMGL(U)> > op,
           TPMGL(U) unit);
    virtual x10aux::ref<x10::array::Array<TPMGL(T)> > x10__array__Array____x10__array__Array__this(
      );
    
    // Serialization
    public: static const x10aux::serialization_id_t _serialization_id;
    
    public: x10aux::serialization_id_t _get_serialization_id() {
         return _serialization_id;
    }
    
    public: virtual void _serialize_body(x10aux::serialization_buffer& buf);
    
    public: static x10aux::ref<x10::lang::Reference> _deserializer(x10aux::deserialization_buffer& buf);
    
    public: void _deserialize_body(x10aux::deserialization_buffer& buf);
    
};
template <> class Array<void> : public x10::lang::Object {
    public:
    static x10aux::RuntimeType rtt;
    static const x10aux::RuntimeType* getRTT() { return & rtt; }
    template<class TPMGL(T)> static void asyncCopy(x10aux::ref<x10::array::Array<TPMGL(T)> > src,
                                                   x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > dst);
    
    template<class TPMGL(T)> static void asyncCopy(x10aux::ref<x10::array::Array<TPMGL(T)> > src,
                                                   x10aux::ref<x10::array::Point> srcPoint,
                                                   x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > dst,
                                                   x10aux::ref<x10::array::Point> dstPoint,
                                                   x10_int numElems);
    
    template<class TPMGL(T)> static void asyncCopy(x10aux::ref<x10::array::Array<TPMGL(T)> > src,
                                                   x10_int srcIndex,
                                                   x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > dst,
                                                   x10_int dstIndex,
                                                   x10_int numElems);
    
    template<class TPMGL(T)> static void asyncCopy(x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > src,
                                                   x10aux::ref<x10::array::Array<TPMGL(T)> > dst);
    
    template<class TPMGL(T)> static void asyncCopy(x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > src,
                                                   x10aux::ref<x10::array::Point> srcPoint,
                                                   x10aux::ref<x10::array::Array<TPMGL(T)> > dst,
                                                   x10aux::ref<x10::array::Point> dstPoint,
                                                   x10_int numElems);
    
    template<class TPMGL(T)> static void asyncCopy(x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > src,
                                                   x10_int srcIndex,
                                                   x10aux::ref<x10::array::Array<TPMGL(T)> > dst,
                                                   x10_int dstIndex,
                                                   x10_int numElems);
    
    template<class TPMGL(T)> static void copy(x10aux::ref<x10::array::Array<TPMGL(T)> > src,
                                              x10aux::ref<x10::array::Array<TPMGL(T)> > dst);
    
    template<class TPMGL(T)> static void copy(x10aux::ref<x10::array::Array<TPMGL(T)> > src,
                                              x10aux::ref<x10::array::Point> srcPoint,
                                              x10aux::ref<x10::array::Array<TPMGL(T)> > dst,
                                              x10aux::ref<x10::array::Point> dstPoint,
                                              x10_int numElems);
    
    template<class TPMGL(T)> static void copy(x10aux::ref<x10::array::Array<TPMGL(T)> > src,
                                              x10_int srcIndex,
                                              x10aux::ref<x10::array::Array<TPMGL(T)> > dst,
                                              x10_int dstIndex,
                                              x10_int numElems);
    
    static void raiseBoundsError(x10_int i0) X10_PRAGMA_NORETURN ;
    
    static void raiseBoundsError(x10_int i0, x10_int i1) X10_PRAGMA_NORETURN ;
    
    static void raiseBoundsError(x10_int i0, x10_int i1, x10_int i2) X10_PRAGMA_NORETURN ;
    
    static void raiseBoundsError(x10_int i0, x10_int i1, x10_int i2,
                                 x10_int i3) X10_PRAGMA_NORETURN ;
    
    static void raiseBoundsError(x10aux::ref<x10::array::Point> pt) X10_PRAGMA_NORETURN ;
    
    
};

} } 
#endif // X10_ARRAY_ARRAY_H

namespace x10 { namespace array { 
template<class TPMGL(T)> class Array;
} } 

#ifndef X10_ARRAY_ARRAY_H_NODEPS
#define X10_ARRAY_ARRAY_H_NODEPS
#include <x10/lang/Object.h>
#include <x10/lang/Fun_0_1.h>
#include <x10/array/Point.h>
#include <x10/lang/Iterable.h>
#include <x10/array/Region.h>
#include <x10/lang/Int.h>
#include <x10/lang/Boolean.h>
#include <x10/util/IndexedMemoryChunk.h>
#include <x10/array/RectLayout.h>
#include <x10/compiler/Inline.h>
#include <x10/compiler/CompilerFlags.h>
#include <x10/lang/FailedDynamicCheckException.h>
#include <x10/lang/Iterator.h>
#include <x10/lang/IllegalArgumentException.h>
#include <x10/array/RectRegion1D.h>
#include <x10/array/RemoteArray.h>
#include <x10/lang/GlobalRef.h>
#include <x10/lang/String.h>
#include <x10/util/StringBuilder.h>
#include <x10/lang/Math.h>
#include <x10/array/Array__Anonymous__13465.h>
#include <x10/array/Array__Anonymous__13753.h>
#include <x10/lang/Sequence.h>
#include <x10/array/Array__Anonymous__14087.h>
#include <x10/compiler/Native.h>
#include <x10/lang/Fun_0_2.h>
#include <x10/util/RemoteIndexedMemoryChunk.h>
#include <x10/lang/Runtime.h>
#include <x10/lang/Place.h>
#include <x10/lang/Fun_0_0.h>
#include <x10/lang/ArrayIndexOutOfBoundsException.h>
#include <x10/compiler/NoInline.h>
#include <x10/compiler/NoReturn.h>
#ifndef X10_ARRAY_ARRAY__CLOSURE__1_CLOSURE
#define X10_ARRAY_ARRAY__CLOSURE__1_CLOSURE
#include <x10/lang/Closure.h>
#include <x10/lang/Fun_0_1.h>
template<class TPMGL(T), class TPMGL(U)> class x10_array_Array__closure__1 : public x10::lang::Closure {
    public:
    
    static typename x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(U)>::template itable <x10_array_Array__closure__1<TPMGL(T),TPMGL(U) > > _itable;
    static x10aux::itable_entry _itables[2];
    
    virtual x10aux::itable_entry* _getITables() { return _itables; }
    
    // closure body
    TPMGL(U) __apply(x10aux::ref<x10::array::Point> p) {
        
        //#line 650 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
        return x10::lang::Fun_0_1<TPMGL(T), TPMGL(U)>::__apply(x10aux::nullCheck(op), 
          saved_this->x10::array::Array<TPMGL(T)>::__apply(p));
        
    }
    
    // captured environment
    x10aux::ref<x10::lang::Fun_0_1<TPMGL(T), TPMGL(U)> > op;
    x10aux::ref<x10::array::Array<TPMGL(T)> > saved_this;
    
    x10aux::serialization_id_t _get_serialization_id() {
        return _serialization_id;
    }
    
    void _serialize_body(x10aux::serialization_buffer &buf) {
        buf.write(this->op);
        buf.write(this->saved_this);
    }
    
    template<class __T> static x10aux::ref<__T> _deserialize(x10aux::deserialization_buffer &buf) {
        x10_array_Array__closure__1<TPMGL(T),TPMGL(U) >* storage = x10aux::alloc<x10_array_Array__closure__1<TPMGL(T),TPMGL(U) > >();
        buf.record_reference(x10aux::ref<x10_array_Array__closure__1<TPMGL(T),TPMGL(U) > >(storage));
        x10aux::ref<x10::lang::Fun_0_1<TPMGL(T), TPMGL(U)> > that_op = buf.read<x10aux::ref<x10::lang::Fun_0_1<TPMGL(T), TPMGL(U)> > >();
        x10aux::ref<x10::array::Array<TPMGL(T)> > that_saved_this = buf.read<x10aux::ref<x10::array::Array<TPMGL(T)> > >();
        x10aux::ref<x10_array_Array__closure__1<TPMGL(T),TPMGL(U) > > this_ = new (storage) x10_array_Array__closure__1<TPMGL(T),TPMGL(U) >(that_op, that_saved_this);
        return this_;
    }
    
    x10_array_Array__closure__1(x10aux::ref<x10::lang::Fun_0_1<TPMGL(T), TPMGL(U)> > op, x10aux::ref<x10::array::Array<TPMGL(T)> > saved_this) : op(op), saved_this(saved_this) { }
    
    static const x10aux::serialization_id_t _serialization_id;
    
    static const x10aux::RuntimeType* getRTT() { return x10aux::getRTT<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(U)> >(); }
    virtual const x10aux::RuntimeType *_type() const { return x10aux::getRTT<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(U)> >(); }
    
    x10aux::ref<x10::lang::String> toString() {
        return x10aux::string_utils::lit(this->toNativeString());
    }
    
    const char* toNativeString() {
        return "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10:650";
    }

};

template<class TPMGL(T), class TPMGL(U)> typename x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(U)>::template itable <x10_array_Array__closure__1<TPMGL(T),TPMGL(U) > >x10_array_Array__closure__1<TPMGL(T),TPMGL(U) >::_itable(&x10::lang::Reference::equals, &x10::lang::Closure::hashCode, &x10_array_Array__closure__1<TPMGL(T),TPMGL(U) >::__apply, &x10_array_Array__closure__1<TPMGL(T),TPMGL(U) >::toString, &x10::lang::Closure::typeName);
template<class TPMGL(T), class TPMGL(U)> x10aux::itable_entry x10_array_Array__closure__1<TPMGL(T),TPMGL(U) >::_itables[2] = {x10aux::itable_entry(&x10aux::getRTT<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(U)> >, &x10_array_Array__closure__1<TPMGL(T),TPMGL(U) >::_itable),x10aux::itable_entry(NULL, NULL)};

template<class TPMGL(T), class TPMGL(U)> const x10aux::serialization_id_t x10_array_Array__closure__1<TPMGL(T),TPMGL(U) >::_serialization_id = 
    x10aux::DeserializationDispatcher::addDeserializer(x10_array_Array__closure__1<TPMGL(T),TPMGL(U) >::template _deserialize<x10::lang::Reference>,x10aux::CLOSURE_KIND_NOT_ASYNC);

#endif // X10_ARRAY_ARRAY__CLOSURE__1_CLOSURE
#ifndef X10_ARRAY_ARRAY__CLOSURE__2_CLOSURE
#define X10_ARRAY_ARRAY__CLOSURE__2_CLOSURE
#include <x10/lang/Closure.h>
#include <x10/lang/Fun_0_1.h>
template<class TPMGL(T), class TPMGL(S), class TPMGL(U)> class x10_array_Array__closure__2 : public x10::lang::Closure {
    public:
    
    static typename x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(S)>::template itable <x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) > > _itable;
    static x10aux::itable_entry _itables[2];
    
    virtual x10aux::itable_entry* _getITables() { return _itables; }
    
    // closure body
    TPMGL(S) __apply(x10aux::ref<x10::array::Point> p) {
        
        //#line 721 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
        return x10::lang::Fun_0_2<TPMGL(T), TPMGL(U), TPMGL(S)>::__apply(x10aux::nullCheck(op), 
          saved_this->x10::array::Array<TPMGL(T)>::__apply(p), x10aux::nullCheck(src)->x10::array::Array<TPMGL(U)>::__apply(
                                                                 p));
        
    }
    
    // captured environment
    x10aux::ref<x10::lang::Fun_0_2<TPMGL(T), TPMGL(U), TPMGL(S)> > op;
    x10aux::ref<x10::array::Array<TPMGL(T)> > saved_this;
    x10aux::ref<x10::array::Array<TPMGL(U)> > src;
    
    x10aux::serialization_id_t _get_serialization_id() {
        return _serialization_id;
    }
    
    void _serialize_body(x10aux::serialization_buffer &buf) {
        buf.write(this->op);
        buf.write(this->saved_this);
        buf.write(this->src);
    }
    
    template<class __T> static x10aux::ref<__T> _deserialize(x10aux::deserialization_buffer &buf) {
        x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) >* storage = x10aux::alloc<x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) > >();
        buf.record_reference(x10aux::ref<x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) > >(storage));
        x10aux::ref<x10::lang::Fun_0_2<TPMGL(T), TPMGL(U), TPMGL(S)> > that_op = buf.read<x10aux::ref<x10::lang::Fun_0_2<TPMGL(T), TPMGL(U), TPMGL(S)> > >();
        x10aux::ref<x10::array::Array<TPMGL(T)> > that_saved_this = buf.read<x10aux::ref<x10::array::Array<TPMGL(T)> > >();
        x10aux::ref<x10::array::Array<TPMGL(U)> > that_src = buf.read<x10aux::ref<x10::array::Array<TPMGL(U)> > >();
        x10aux::ref<x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) > > this_ = new (storage) x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) >(that_op, that_saved_this, that_src);
        return this_;
    }
    
    x10_array_Array__closure__2(x10aux::ref<x10::lang::Fun_0_2<TPMGL(T), TPMGL(U), TPMGL(S)> > op, x10aux::ref<x10::array::Array<TPMGL(T)> > saved_this, x10aux::ref<x10::array::Array<TPMGL(U)> > src) : op(op), saved_this(saved_this), src(src) { }
    
    static const x10aux::serialization_id_t _serialization_id;
    
    static const x10aux::RuntimeType* getRTT() { return x10aux::getRTT<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(S)> >(); }
    virtual const x10aux::RuntimeType *_type() const { return x10aux::getRTT<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(S)> >(); }
    
    x10aux::ref<x10::lang::String> toString() {
        return x10aux::string_utils::lit(this->toNativeString());
    }
    
    const char* toNativeString() {
        return "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10:721";
    }

};

template<class TPMGL(T), class TPMGL(S), class TPMGL(U)> typename x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(S)>::template itable <x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) > >x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) >::_itable(&x10::lang::Reference::equals, &x10::lang::Closure::hashCode, &x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) >::__apply, &x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) >::toString, &x10::lang::Closure::typeName);
template<class TPMGL(T), class TPMGL(S), class TPMGL(U)> x10aux::itable_entry x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) >::_itables[2] = {x10aux::itable_entry(&x10aux::getRTT<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(S)> >, &x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) >::_itable),x10aux::itable_entry(NULL, NULL)};

template<class TPMGL(T), class TPMGL(S), class TPMGL(U)> const x10aux::serialization_id_t x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) >::_serialization_id = 
    x10aux::DeserializationDispatcher::addDeserializer(x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) >::template _deserialize<x10::lang::Reference>,x10aux::CLOSURE_KIND_NOT_ASYNC);

#endif // X10_ARRAY_ARRAY__CLOSURE__2_CLOSURE
#ifndef X10_ARRAY_ARRAY_H_GENERICS
#define X10_ARRAY_ARRAY_H_GENERICS
#ifndef X10_ARRAY_ARRAY_H_map_17
#define X10_ARRAY_ARRAY_H_map_17
template<class TPMGL(T)> template<class TPMGL(U)> x10aux::ref<x10::array::Array<TPMGL(U)> >
  x10::array::Array<TPMGL(T)>::map(x10aux::ref<x10::lang::Fun_0_1<TPMGL(T), TPMGL(U)> > op) {
    
    //#line 650 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return x10::array::Array<TPMGL(U)>::_make(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                FMGL(region),
                                              x10aux::ref<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(U)> >(x10aux::ref<x10_array_Array__closure__1<TPMGL(T),TPMGL(U) > >(new (x10aux::alloc<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(U)> >(sizeof(x10_array_Array__closure__1<TPMGL(T),TPMGL(U)>)))x10_array_Array__closure__1<TPMGL(T),TPMGL(U)>(op, this))));
    
}
#endif // X10_ARRAY_ARRAY_H_map_17
#ifndef X10_ARRAY_ARRAY_H_map_18
#define X10_ARRAY_ARRAY_H_map_18
template<class TPMGL(T)> template<class TPMGL(U)> x10aux::ref<x10::array::Array<TPMGL(U)> >
  x10::array::Array<TPMGL(T)>::map(x10aux::ref<x10::array::Array<TPMGL(U)> > dst,
                                   x10aux::ref<x10::lang::Fun_0_1<TPMGL(T), TPMGL(U)> > op) {
    
    //#line 669 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
          FMGL(rect)) {
        
        //#line 673 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10_int i31929min32034 = ((x10_int)0);
        
        //#line 673 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10_int i31929max32035 = ((x10_int) (((((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                 FMGL(raw))->length()) - (((x10_int)1))));
        
        //#line 673 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
        {
            x10_int i32036;
            for (
                 //#line 673 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                 i32036 = i31929min32034; ((i32036) <= (i31929max32035));
                 
                 //#line 673 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
                 i32036 = ((x10_int) ((i32036) + (((x10_int)1)))))
            {
                
                //#line 673 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                x10_int i32037 = i32036;
                
                //#line 674 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
                (x10aux::nullCheck(dst)->FMGL(raw))->__set(i32037, x10::lang::Fun_0_1<TPMGL(T), TPMGL(U)>::__apply(x10aux::nullCheck(op), 
                  (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                     FMGL(raw))->__apply(i32037)));
            }
        }
        
    } else {
        
        //#line 677 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
        {
            x10aux::ref<x10::lang::Iterator<x10aux::ref<x10::array::Point> > > p31945;
            for (
                 //#line 677 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                 p31945 = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                            FMGL(region)->iterator(); x10::lang::Iterator<x10aux::ref<x10::array::Point> >::hasNext(x10aux::nullCheck(p31945));
                 ) {
                
                //#line 677 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                x10aux::ref<x10::array::Point> p = x10::lang::Iterator<x10aux::ref<x10::array::Point> >::next(x10aux::nullCheck(p31945));
                
                //#line 678 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
                x10aux::nullCheck(dst)->x10::array::Array<TPMGL(U)>::__set(
                  p, x10::lang::Fun_0_1<TPMGL(T), TPMGL(U)>::__apply(x10aux::nullCheck(op), 
                    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->x10::array::Array<TPMGL(T)>::__apply(
                      p)));
            }
        }
        
    }
    
    //#line 681 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return dst;
    
}
#endif // X10_ARRAY_ARRAY_H_map_18
#ifndef X10_ARRAY_ARRAY_H_map_19
#define X10_ARRAY_ARRAY_H_map_19
template<class TPMGL(T)> template<class TPMGL(U)> x10aux::ref<x10::array::Array<TPMGL(U)> >
  x10::array::Array<TPMGL(T)>::map(x10aux::ref<x10::array::Array<TPMGL(U)> > dst,
                                   x10aux::ref<x10::array::Region> filter,
                                   x10aux::ref<x10::lang::Fun_0_1<TPMGL(T), TPMGL(U)> > op) {
    
    //#line 700 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10aux::ref<x10::array::Region> fregion = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                FMGL(region)->__and(
                                                filter);
    
    //#line 701 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
    {
        x10aux::ref<x10::lang::Iterator<x10aux::ref<x10::array::Point> > > p31947;
        for (
             //#line 701 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
             p31947 = x10aux::nullCheck(fregion)->iterator();
             x10::lang::Iterator<x10aux::ref<x10::array::Point> >::hasNext(x10aux::nullCheck(p31947));
             ) {
            
            //#line 701 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
            x10aux::ref<x10::array::Point> p = x10::lang::Iterator<x10aux::ref<x10::array::Point> >::next(x10aux::nullCheck(p31947));
            
            //#line 702 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
            x10aux::nullCheck(dst)->x10::array::Array<TPMGL(U)>::__set(
              p, x10::lang::Fun_0_1<TPMGL(T), TPMGL(U)>::__apply(x10aux::nullCheck(op), 
                ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->x10::array::Array<TPMGL(T)>::__apply(
                  p)));
        }
    }
    
    //#line 704 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return dst;
    
}
#endif // X10_ARRAY_ARRAY_H_map_19
#ifndef X10_ARRAY_ARRAY_H_map_20
#define X10_ARRAY_ARRAY_H_map_20
template<class TPMGL(T)> template<class TPMGL(S), class TPMGL(U)>
x10aux::ref<x10::array::Array<TPMGL(S)> > x10::array::Array<TPMGL(T)>::map(
  x10aux::ref<x10::array::Array<TPMGL(U)> > src, x10aux::ref<x10::lang::Fun_0_2<TPMGL(T), TPMGL(U), TPMGL(S)> > op) {
    
    //#line 721 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return x10::array::Array<TPMGL(S)>::_make(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                FMGL(region),
                                              x10aux::ref<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(S)> >(x10aux::ref<x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U) > >(new (x10aux::alloc<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(S)> >(sizeof(x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U)>)))x10_array_Array__closure__2<TPMGL(T),TPMGL(S),TPMGL(U)>(op, this, src))));
    
}
#endif // X10_ARRAY_ARRAY_H_map_20
#ifndef X10_ARRAY_ARRAY_H_map_21
#define X10_ARRAY_ARRAY_H_map_21
template<class TPMGL(T)> template<class TPMGL(S), class TPMGL(U)>
x10aux::ref<x10::array::Array<TPMGL(S)> > x10::array::Array<TPMGL(T)>::map(
  x10aux::ref<x10::array::Array<TPMGL(S)> > dst, x10aux::ref<x10::array::Array<TPMGL(U)> > src,
  x10aux::ref<x10::lang::Fun_0_2<TPMGL(T), TPMGL(U), TPMGL(S)> > op) {
    
    //#line 740 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
          FMGL(rect)) {
        
        //#line 744 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10_int i31949min32038 = ((x10_int)0);
        
        //#line 744 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10_int i31949max32039 = ((x10_int) (((((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                 FMGL(raw))->length()) - (((x10_int)1))));
        
        //#line 744 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
        {
            x10_int i32040;
            for (
                 //#line 744 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                 i32040 = i31949min32038; ((i32040) <= (i31949max32039));
                 
                 //#line 744 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
                 i32040 = ((x10_int) ((i32040) + (((x10_int)1)))))
            {
                
                //#line 744 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                x10_int i32041 = i32040;
                
                //#line 745 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
                (x10aux::nullCheck(dst)->FMGL(raw))->__set(i32041, x10::lang::Fun_0_2<TPMGL(T), TPMGL(U), TPMGL(S)>::__apply(x10aux::nullCheck(op), 
                  (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                     FMGL(raw))->__apply(i32041), (x10aux::nullCheck(src)->
                                                     FMGL(raw))->__apply(i32041)));
            }
        }
        
    } else {
        
        //#line 748 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
        {
            x10aux::ref<x10::lang::Iterator<x10aux::ref<x10::array::Point> > > p31965;
            for (
                 //#line 748 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                 p31965 = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                            FMGL(region)->iterator(); x10::lang::Iterator<x10aux::ref<x10::array::Point> >::hasNext(x10aux::nullCheck(p31965));
                 ) {
                
                //#line 748 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                x10aux::ref<x10::array::Point> p = x10::lang::Iterator<x10aux::ref<x10::array::Point> >::next(x10aux::nullCheck(p31965));
                
                //#line 749 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
                x10aux::nullCheck(dst)->x10::array::Array<TPMGL(S)>::__set(
                  p, x10::lang::Fun_0_2<TPMGL(T), TPMGL(U), TPMGL(S)>::__apply(x10aux::nullCheck(op), 
                    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->x10::array::Array<TPMGL(T)>::__apply(
                      p), x10aux::nullCheck(src)->x10::array::Array<TPMGL(U)>::__apply(
                            p)));
            }
        }
        
    }
    
    //#line 752 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return dst;
    
}
#endif // X10_ARRAY_ARRAY_H_map_21
#ifndef X10_ARRAY_ARRAY_H_map_22
#define X10_ARRAY_ARRAY_H_map_22
template<class TPMGL(T)> template<class TPMGL(S), class TPMGL(U)>
x10aux::ref<x10::array::Array<TPMGL(S)> > x10::array::Array<TPMGL(T)>::map(
  x10aux::ref<x10::array::Array<TPMGL(S)> > dst, x10aux::ref<x10::array::Array<TPMGL(U)> > src,
  x10aux::ref<x10::array::Region> filter, x10aux::ref<x10::lang::Fun_0_2<TPMGL(T), TPMGL(U), TPMGL(S)> > op) {
    
    //#line 772 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10aux::ref<x10::array::Region> fregion = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                FMGL(region)->__and(
                                                filter);
    
    //#line 773 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
    {
        x10aux::ref<x10::lang::Iterator<x10aux::ref<x10::array::Point> > > p31967;
        for (
             //#line 773 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
             p31967 = x10aux::nullCheck(fregion)->iterator();
             x10::lang::Iterator<x10aux::ref<x10::array::Point> >::hasNext(x10aux::nullCheck(p31967));
             ) {
            
            //#line 773 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
            x10aux::ref<x10::array::Point> p = x10::lang::Iterator<x10aux::ref<x10::array::Point> >::next(x10aux::nullCheck(p31967));
            
            //#line 774 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
            x10aux::nullCheck(dst)->x10::array::Array<TPMGL(S)>::__set(
              p, x10::lang::Fun_0_2<TPMGL(T), TPMGL(U), TPMGL(S)>::__apply(x10aux::nullCheck(op), 
                ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->x10::array::Array<TPMGL(T)>::__apply(
                  p), x10aux::nullCheck(src)->x10::array::Array<TPMGL(U)>::__apply(
                        p)));
        }
    }
    
    //#line 776 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return dst;
    
}
#endif // X10_ARRAY_ARRAY_H_map_22
#ifndef X10_ARRAY_ARRAY_H_reduce_23
#define X10_ARRAY_ARRAY_H_reduce_23
template<class TPMGL(T)> template<class TPMGL(U)> TPMGL(U)
  x10::array::Array<TPMGL(T)>::reduce(x10aux::ref<x10::lang::Fun_0_2<TPMGL(U), TPMGL(T), TPMGL(U)> > op,
                                      TPMGL(U) unit) {
    
    //#line 795 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    TPMGL(U) accum = unit;
    
    //#line 796 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
          FMGL(rect)) {
        
        //#line 800 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10_int i31969min32042 = ((x10_int)0);
        
        //#line 800 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10_int i31969max32043 = ((x10_int) (((((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                 FMGL(raw))->length()) - (((x10_int)1))));
        
        //#line 800 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
        {
            x10_int i32044;
            for (
                 //#line 800 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                 i32044 = i31969min32042; ((i32044) <= (i31969max32043));
                 
                 //#line 800 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
                 i32044 = ((x10_int) ((i32044) + (((x10_int)1)))))
            {
                
                //#line 800 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                x10_int i32045 = i32044;
                
                //#line 801 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
                accum = x10::lang::Fun_0_2<TPMGL(U), TPMGL(T), TPMGL(U)>::__apply(x10aux::nullCheck(op), 
                  accum, (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                            FMGL(raw))->__apply(i32045));
            }
        }
        
    } else {
        
        //#line 804 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
        {
            x10aux::ref<x10::lang::Iterator<x10aux::ref<x10::array::Point> > > p31985;
            for (
                 //#line 804 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                 p31985 = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                            FMGL(region)->iterator(); x10::lang::Iterator<x10aux::ref<x10::array::Point> >::hasNext(x10aux::nullCheck(p31985));
                 ) {
                
                //#line 804 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                x10aux::ref<x10::array::Point> p = x10::lang::Iterator<x10aux::ref<x10::array::Point> >::next(x10aux::nullCheck(p31985));
                
                //#line 805 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
                accum = x10::lang::Fun_0_2<TPMGL(U), TPMGL(T), TPMGL(U)>::__apply(x10aux::nullCheck(op), 
                  accum, ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->x10::array::Array<TPMGL(T)>::__apply(
                           p));
            }
        }
        
    }
    
    //#line 808 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return accum;
    
}
#endif // X10_ARRAY_ARRAY_H_reduce_23
#ifndef X10_ARRAY_ARRAY_H_scan_24
#define X10_ARRAY_ARRAY_H_scan_24
template<class TPMGL(T)> template<class TPMGL(U)> x10aux::ref<x10::array::Array<TPMGL(U)> >
  x10::array::Array<TPMGL(T)>::scan(x10aux::ref<x10::lang::Fun_0_2<TPMGL(U), TPMGL(T), TPMGL(U)> > op,
                                    TPMGL(U) unit) {
    
    //#line 826 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->template scan<TPMGL(U) >(
             x10::array::Array<TPMGL(U)>::_make(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                  FMGL(region)),
             op, unit);
    
}
#endif // X10_ARRAY_ARRAY_H_scan_24
#ifndef X10_ARRAY_ARRAY_H_scan_25
#define X10_ARRAY_ARRAY_H_scan_25
template<class TPMGL(T)> template<class TPMGL(U)> x10aux::ref<x10::array::Array<TPMGL(U)> >
  x10::array::Array<TPMGL(T)>::scan(x10aux::ref<x10::array::Array<TPMGL(U)> > dst,
                                    x10aux::ref<x10::lang::Fun_0_2<TPMGL(U), TPMGL(T), TPMGL(U)> > op,
                                    TPMGL(U) unit) {
    
    //#line 844 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    TPMGL(U) accum = unit;
    
    //#line 845 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
    {
        x10aux::ref<x10::lang::Iterator<x10aux::ref<x10::array::Point> > > p31987;
        for (
             //#line 845 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
             p31987 = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                        FMGL(region)->iterator(); x10::lang::Iterator<x10aux::ref<x10::array::Point> >::hasNext(x10aux::nullCheck(p31987));
             ) {
            
            //#line 845 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
            x10aux::ref<x10::array::Point> p = x10::lang::Iterator<x10aux::ref<x10::array::Point> >::next(x10aux::nullCheck(p31987));
            
            //#line 846 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
            accum = x10::lang::Fun_0_2<TPMGL(U), TPMGL(T), TPMGL(U)>::__apply(x10aux::nullCheck(op), 
              accum, ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->x10::array::Array<TPMGL(T)>::__apply(
                       p));
            
            //#line 847 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
            x10aux::nullCheck(dst)->x10::array::Array<TPMGL(U)>::__set(
              p, accum);
        }
    }
    
    //#line 849 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return dst;
    
}
#endif // X10_ARRAY_ARRAY_H_scan_25
#endif // X10_ARRAY_ARRAY_H_GENERICS
#ifndef X10_ARRAY_ARRAY_H_IMPLEMENTATION
#define X10_ARRAY_ARRAY_H_IMPLEMENTATION
#include <x10/array/Array.h>

#ifndef X10_ARRAY_ARRAY__CLOSURE__3_CLOSURE
#define X10_ARRAY_ARRAY__CLOSURE__3_CLOSURE
#include <x10/lang/Closure.h>
#include <x10/lang/Fun_0_0.h>
template<class TPMGL(T)> class x10_array_Array__closure__3 : public x10::lang::Closure {
    public:
    
    static typename x10::lang::Fun_0_0<x10_int>::template itable <x10_array_Array__closure__3<TPMGL(T) > > _itable;
    static x10aux::itable_entry _itables[2];
    
    virtual x10aux::itable_entry* _getITables() { return _itables; }
    
    // closure body
    x10_int __apply() {
        
        //#line 910 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
        return x10aux::nullCheck((gra)->__apply())->FMGL(region)->indexOf(
                 dstPoint);
        
    }
    
    // captured environment
    x10::lang::GlobalRef<x10aux::ref<x10::array::Array<TPMGL(T)> > > gra;
    x10aux::ref<x10::array::Point> dstPoint;
    
    x10aux::serialization_id_t _get_serialization_id() {
        return _serialization_id;
    }
    
    void _serialize_body(x10aux::serialization_buffer &buf) {
        buf.write(this->gra);
        buf.write(this->dstPoint);
    }
    
    template<class __T> static x10aux::ref<__T> _deserialize(x10aux::deserialization_buffer &buf) {
        x10_array_Array__closure__3<TPMGL(T) >* storage = x10aux::alloc<x10_array_Array__closure__3<TPMGL(T) > >();
        buf.record_reference(x10aux::ref<x10_array_Array__closure__3<TPMGL(T) > >(storage));
        x10::lang::GlobalRef<x10aux::ref<x10::array::Array<TPMGL(T)> > > that_gra = buf.read<x10::lang::GlobalRef<x10aux::ref<x10::array::Array<TPMGL(T)> > > >();
        x10aux::ref<x10::array::Point> that_dstPoint = buf.read<x10aux::ref<x10::array::Point> >();
        x10aux::ref<x10_array_Array__closure__3<TPMGL(T) > > this_ = new (storage) x10_array_Array__closure__3<TPMGL(T) >(that_gra, that_dstPoint);
        return this_;
    }
    
    x10_array_Array__closure__3(x10::lang::GlobalRef<x10aux::ref<x10::array::Array<TPMGL(T)> > > gra, x10aux::ref<x10::array::Point> dstPoint) : gra(gra), dstPoint(dstPoint) { }
    
    static const x10aux::serialization_id_t _serialization_id;
    
    static const x10aux::RuntimeType* getRTT() { return x10aux::getRTT<x10::lang::Fun_0_0<x10_int> >(); }
    virtual const x10aux::RuntimeType *_type() const { return x10aux::getRTT<x10::lang::Fun_0_0<x10_int> >(); }
    
    x10aux::ref<x10::lang::String> toString() {
        return x10aux::string_utils::lit(this->toNativeString());
    }
    
    const char* toNativeString() {
        return "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10:910";
    }

};

template<class TPMGL(T)> typename x10::lang::Fun_0_0<x10_int>::template itable <x10_array_Array__closure__3<TPMGL(T) > >x10_array_Array__closure__3<TPMGL(T) >::_itable(&x10::lang::Reference::equals, &x10::lang::Closure::hashCode, &x10_array_Array__closure__3<TPMGL(T) >::__apply, &x10_array_Array__closure__3<TPMGL(T) >::toString, &x10::lang::Closure::typeName);
template<class TPMGL(T)> x10aux::itable_entry x10_array_Array__closure__3<TPMGL(T) >::_itables[2] = {x10aux::itable_entry(&x10aux::getRTT<x10::lang::Fun_0_0<x10_int> >, &x10_array_Array__closure__3<TPMGL(T) >::_itable),x10aux::itable_entry(NULL, NULL)};

template<class TPMGL(T)> const x10aux::serialization_id_t x10_array_Array__closure__3<TPMGL(T) >::_serialization_id = 
    x10aux::DeserializationDispatcher::addDeserializer(x10_array_Array__closure__3<TPMGL(T) >::template _deserialize<x10::lang::Reference>,x10aux::CLOSURE_KIND_NOT_ASYNC);

#endif // X10_ARRAY_ARRAY__CLOSURE__3_CLOSURE
#ifndef X10_ARRAY_ARRAY__CLOSURE__4_CLOSURE
#define X10_ARRAY_ARRAY__CLOSURE__4_CLOSURE
#include <x10/lang/Closure.h>
#include <x10/lang/Fun_0_0.h>
template<class TPMGL(T)> class x10_array_Array__closure__4 : public x10::lang::Closure {
    public:
    
    static typename x10::lang::Fun_0_0<x10_int>::template itable <x10_array_Array__closure__4<TPMGL(T) > > _itable;
    static x10aux::itable_entry _itables[2];
    
    virtual x10aux::itable_entry* _getITables() { return _itables; }
    
    // closure body
    x10_int __apply() {
        
        //#line 1020 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
        return x10aux::nullCheck((gra)->__apply())->FMGL(region)->indexOf(
                 srcPoint);
        
    }
    
    // captured environment
    x10::lang::GlobalRef<x10aux::ref<x10::array::Array<TPMGL(T)> > > gra;
    x10aux::ref<x10::array::Point> srcPoint;
    
    x10aux::serialization_id_t _get_serialization_id() {
        return _serialization_id;
    }
    
    void _serialize_body(x10aux::serialization_buffer &buf) {
        buf.write(this->gra);
        buf.write(this->srcPoint);
    }
    
    template<class __T> static x10aux::ref<__T> _deserialize(x10aux::deserialization_buffer &buf) {
        x10_array_Array__closure__4<TPMGL(T) >* storage = x10aux::alloc<x10_array_Array__closure__4<TPMGL(T) > >();
        buf.record_reference(x10aux::ref<x10_array_Array__closure__4<TPMGL(T) > >(storage));
        x10::lang::GlobalRef<x10aux::ref<x10::array::Array<TPMGL(T)> > > that_gra = buf.read<x10::lang::GlobalRef<x10aux::ref<x10::array::Array<TPMGL(T)> > > >();
        x10aux::ref<x10::array::Point> that_srcPoint = buf.read<x10aux::ref<x10::array::Point> >();
        x10aux::ref<x10_array_Array__closure__4<TPMGL(T) > > this_ = new (storage) x10_array_Array__closure__4<TPMGL(T) >(that_gra, that_srcPoint);
        return this_;
    }
    
    x10_array_Array__closure__4(x10::lang::GlobalRef<x10aux::ref<x10::array::Array<TPMGL(T)> > > gra, x10aux::ref<x10::array::Point> srcPoint) : gra(gra), srcPoint(srcPoint) { }
    
    static const x10aux::serialization_id_t _serialization_id;
    
    static const x10aux::RuntimeType* getRTT() { return x10aux::getRTT<x10::lang::Fun_0_0<x10_int> >(); }
    virtual const x10aux::RuntimeType *_type() const { return x10aux::getRTT<x10::lang::Fun_0_0<x10_int> >(); }
    
    x10aux::ref<x10::lang::String> toString() {
        return x10aux::string_utils::lit(this->toNativeString());
    }
    
    const char* toNativeString() {
        return "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10:1020";
    }

};

template<class TPMGL(T)> typename x10::lang::Fun_0_0<x10_int>::template itable <x10_array_Array__closure__4<TPMGL(T) > >x10_array_Array__closure__4<TPMGL(T) >::_itable(&x10::lang::Reference::equals, &x10::lang::Closure::hashCode, &x10_array_Array__closure__4<TPMGL(T) >::__apply, &x10_array_Array__closure__4<TPMGL(T) >::toString, &x10::lang::Closure::typeName);
template<class TPMGL(T)> x10aux::itable_entry x10_array_Array__closure__4<TPMGL(T) >::_itables[2] = {x10aux::itable_entry(&x10aux::getRTT<x10::lang::Fun_0_0<x10_int> >, &x10_array_Array__closure__4<TPMGL(T) >::_itable),x10aux::itable_entry(NULL, NULL)};

template<class TPMGL(T)> const x10aux::serialization_id_t x10_array_Array__closure__4<TPMGL(T) >::_serialization_id = 
    x10aux::DeserializationDispatcher::addDeserializer(x10_array_Array__closure__4<TPMGL(T) >::template _deserialize<x10::lang::Reference>,x10aux::CLOSURE_KIND_NOT_ASYNC);

#endif // X10_ARRAY_ARRAY__CLOSURE__4_CLOSURE

//#line 59 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.PropertyDecl_c

//#line 64 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.PropertyDecl_c

//#line 69 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.PropertyDecl_c

//#line 74 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.PropertyDecl_c

//#line 79 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.PropertyDecl_c

//#line 85 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.PropertyDecl_c
template<class TPMGL(T)> typename x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(T)>::template itable<x10::array::Array<TPMGL(T)> >  x10::array::Array<TPMGL(T)>::_itable_0(&x10::array::Array<TPMGL(T)>::equals, &x10::array::Array<TPMGL(T)>::hashCode, &x10::array::Array<TPMGL(T)>::__apply, &x10::array::Array<TPMGL(T)>::toString, &x10::array::Array<TPMGL(T)>::typeName);
template<class TPMGL(T)> x10::lang::Any::itable<x10::array::Array<TPMGL(T)> >  x10::array::Array<TPMGL(T)>::_itable_1(&x10::array::Array<TPMGL(T)>::equals, &x10::array::Array<TPMGL(T)>::hashCode, &x10::array::Array<TPMGL(T)>::toString, &x10::array::Array<TPMGL(T)>::typeName);
template<class TPMGL(T)> typename x10::lang::Iterable<x10aux::ref<x10::array::Point> >::template itable<x10::array::Array<TPMGL(T)> >  x10::array::Array<TPMGL(T)>::_itable_2(&x10::array::Array<TPMGL(T)>::equals, &x10::array::Array<TPMGL(T)>::hashCode, &x10::array::Array<TPMGL(T)>::iterator, &x10::array::Array<TPMGL(T)>::toString, &x10::array::Array<TPMGL(T)>::typeName);
template<class TPMGL(T)> x10aux::itable_entry x10::array::Array<TPMGL(T)>::_itables[4] = {x10aux::itable_entry(&x10aux::getRTT<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(T)> >, &_itable_0), x10aux::itable_entry(&x10aux::getRTT<x10::lang::Any>, &_itable_1), x10aux::itable_entry(&x10aux::getRTT<x10::lang::Iterable<x10aux::ref<x10::array::Point> > >, &_itable_2), x10aux::itable_entry(NULL, (void*)x10aux::getRTT<x10::array::Array<TPMGL(T)> >())};

//#line 97 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10FieldDecl_c
/**
     * The backing storage for the array's elements
     */

//#line 102 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10FieldDecl_c
/**
     * Helper struct that encapsulates layout calculation for non-rail Arrays.
     */

//#line 120 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> x10::util::IndexedMemoryChunk<TPMGL(T) > x10::array::Array<TPMGL(T)>::raw(
  ) {
    
    //#line 120 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw);
    
}

//#line 128 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorDecl_c
template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::_constructor(
                           x10aux::ref<x10::array::Region> reg) {
    
    //#line 128 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorCall_c
    (this)->::x10::lang::Object::_constructor();
    
    //#line 130 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.AssignPropertyCall_c
    FMGL(region) = (__extension__ ({
        
        //#line 130 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> __desugarer__var__0__32014 =
          reg;
        
        //#line 130 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> ret32015;
        
        //#line 130 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
        if (!((!x10aux::struct_equals(__desugarer__var__0__32014,
                                      X10_NULL)))) {
            
            //#line 130 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
            if (true) {
                
                //#line 130 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
                x10aux::throwException(x10aux::nullCheck(x10::lang::FailedDynamicCheckException::_make(x10aux::string_utils::lit("x10.array.Region{self!=null}"))));
            }
            
        }
        
        //#line 130 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
        ret32015 = __desugarer__var__0__32014;
        ret32015;
    }))
    ;
    FMGL(rank) = x10aux::nullCheck(reg)->FMGL(rank);
    FMGL(rect) = x10aux::nullCheck(reg)->FMGL(rect);
    FMGL(zeroBased) = x10aux::nullCheck(reg)->FMGL(zeroBased);
    FMGL(rail) = x10aux::nullCheck(reg)->FMGL(rail);
    FMGL(size) = x10aux::nullCheck(reg)->size();
    
    //#line 132 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(layout) =
      x10::array::RectLayout::_make(reg);
    
    //#line 133 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int n = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                  FMGL(layout)->x10::array::RectLayout::size();
    
    //#line 134 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw) =
      x10::util::IndexedMemoryChunk<void>::allocate<TPMGL(T) >(n, 8, false, true);
}
template<class TPMGL(T)> x10aux::ref<x10::array::Array<TPMGL(T)> > x10::array::Array<TPMGL(T)>::_make(
                           x10aux::ref<x10::array::Region> reg)
{
    x10aux::ref<x10::array::Array<TPMGL(T)> > this_ = new (memset(x10aux::alloc<x10::array::Array<TPMGL(T)> >(), 0, sizeof(x10::array::Array<TPMGL(T)>))) x10::array::Array<TPMGL(T)>();
    this_->_constructor(reg);
    return this_;
}



//#line 153 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorDecl_c
template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::_constructor(
                           x10aux::ref<x10::array::Region> reg,
                           x10aux::ref<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(T)> > init) {
    
    //#line 153 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorCall_c
    (this)->::x10::lang::Object::_constructor();
    
    //#line 155 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.AssignPropertyCall_c
    FMGL(region) = (__extension__ ({
        
        //#line 155 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> __desugarer__var__1__32016 =
          reg;
        
        //#line 155 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> ret32017;
        
        //#line 155 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
        if (!((!x10aux::struct_equals(__desugarer__var__1__32016,
                                      X10_NULL)))) {
            
            //#line 155 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
            if (true) {
                
                //#line 155 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
                x10aux::throwException(x10aux::nullCheck(x10::lang::FailedDynamicCheckException::_make(x10aux::string_utils::lit("x10.array.Region{self!=null}"))));
            }
            
        }
        
        //#line 155 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
        ret32017 = __desugarer__var__1__32016;
        ret32017;
    }))
    ;
    FMGL(rank) = x10aux::nullCheck(reg)->FMGL(rank);
    FMGL(rect) = x10aux::nullCheck(reg)->FMGL(rect);
    FMGL(zeroBased) = x10aux::nullCheck(reg)->FMGL(zeroBased);
    FMGL(rail) = x10aux::nullCheck(reg)->FMGL(rail);
    FMGL(size) = x10aux::nullCheck(reg)->size();
    
    //#line 157 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(layout) =
      x10::array::RectLayout::_make(reg);
    
    //#line 158 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int n = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                  FMGL(layout)->x10::array::RectLayout::size();
    
    //#line 159 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10::util::IndexedMemoryChunk<TPMGL(T) > r = x10::util::IndexedMemoryChunk<void>::allocate<TPMGL(T) >(n, 8, false, false);
    
    //#line 160 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
    {
        x10aux::ref<x10::lang::Iterator<x10aux::ref<x10::array::Point> > > p31875;
        for (
             //#line 160 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
             p31875 = x10aux::nullCheck(reg)->iterator();
             x10::lang::Iterator<x10aux::ref<x10::array::Point> >::hasNext(x10aux::nullCheck(p31875));
             ) {
            
            //#line 160 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
            x10aux::ref<x10::array::Point> p = x10::lang::Iterator<x10aux::ref<x10::array::Point> >::next(x10aux::nullCheck(p31875));
            
            //#line 161 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
            (r)->__set(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                         FMGL(layout)->x10::array::RectLayout::offset(
                         p), x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(T)>::__apply(x10aux::nullCheck(init), 
              p));
        }
    }
    
    //#line 163 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw) =
      r;
}
template<class TPMGL(T)> x10aux::ref<x10::array::Array<TPMGL(T)> > x10::array::Array<TPMGL(T)>::_make(
                           x10aux::ref<x10::array::Region> reg,
                           x10aux::ref<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(T)> > init)
{
    x10aux::ref<x10::array::Array<TPMGL(T)> > this_ = new (memset(x10aux::alloc<x10::array::Array<TPMGL(T)> >(), 0, sizeof(x10::array::Array<TPMGL(T)>))) x10::array::Array<TPMGL(T)>();
    this_->_constructor(reg, init);
    return this_;
}



//#line 173 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorDecl_c
template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::_constructor(
                           x10aux::ref<x10::array::Region> reg,
                           TPMGL(T) init) {
    
    //#line 173 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorCall_c
    (this)->::x10::lang::Object::_constructor();
    
    //#line 175 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.AssignPropertyCall_c
    FMGL(region) = (__extension__ ({
        
        //#line 175 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> __desugarer__var__2__32018 =
          reg;
        
        //#line 175 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> ret32019;
        
        //#line 175 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
        if (!((!x10aux::struct_equals(__desugarer__var__2__32018,
                                      X10_NULL)))) {
            
            //#line 175 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
            if (true) {
                
                //#line 175 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
                x10aux::throwException(x10aux::nullCheck(x10::lang::FailedDynamicCheckException::_make(x10aux::string_utils::lit("x10.array.Region{self!=null}"))));
            }
            
        }
        
        //#line 175 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
        ret32019 = __desugarer__var__2__32018;
        ret32019;
    }))
    ;
    FMGL(rank) = x10aux::nullCheck(reg)->FMGL(rank);
    FMGL(rect) = x10aux::nullCheck(reg)->FMGL(rect);
    FMGL(zeroBased) = x10aux::nullCheck(reg)->FMGL(zeroBased);
    FMGL(rail) = x10aux::nullCheck(reg)->FMGL(rail);
    FMGL(size) = x10aux::nullCheck(reg)->size();
    
    //#line 177 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(layout) =
      x10::array::RectLayout::_make(reg);
    
    //#line 178 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int n = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                  FMGL(layout)->x10::array::RectLayout::size();
    
    //#line 179 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10::util::IndexedMemoryChunk<TPMGL(T) > r = x10::util::IndexedMemoryChunk<void>::allocate<TPMGL(T) >(n, 8, false, false);
    
    //#line 180 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (x10aux::nullCheck(reg)->FMGL(rect)) {
        
        //#line 183 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
        {
            x10_int i;
            for (
                 //#line 183 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                 i = ((x10_int)0); ((i) < (n)); 
                                                //#line 183 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
                                                i = ((x10_int) ((i) + (((x10_int)1)))))
            {
                
                //#line 184 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
                (r)->__set(i, init);
            }
        }
        
    } else {
        
        //#line 187 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
        {
            x10aux::ref<x10::lang::Iterator<x10aux::ref<x10::array::Point> > > p31877;
            for (
                 //#line 187 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                 p31877 = x10aux::nullCheck(reg)->iterator();
                 x10::lang::Iterator<x10aux::ref<x10::array::Point> >::hasNext(x10aux::nullCheck(p31877));
                 ) {
                
                //#line 187 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                x10aux::ref<x10::array::Point> p = x10::lang::Iterator<x10aux::ref<x10::array::Point> >::next(x10aux::nullCheck(p31877));
                
                //#line 188 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
                (r)->__set(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                             FMGL(layout)->x10::array::RectLayout::offset(
                             p), init);
            }
        }
        
    }
    
    //#line 191 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw) =
      r;
}
template<class TPMGL(T)> x10aux::ref<x10::array::Array<TPMGL(T)> > x10::array::Array<TPMGL(T)>::_make(
                           x10aux::ref<x10::array::Region> reg,
                           TPMGL(T) init) {
    x10aux::ref<x10::array::Array<TPMGL(T)> > this_ = new (memset(x10aux::alloc<x10::array::Array<TPMGL(T)> >(), 0, sizeof(x10::array::Array<TPMGL(T)>))) x10::array::Array<TPMGL(T)>();
    this_->_constructor(reg, init);
    return this_;
}



//#line 205 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorDecl_c
template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::_constructor(
                           x10aux::ref<x10::array::Region> reg,
                           x10::util::IndexedMemoryChunk<TPMGL(T) > backingStore) {
    
    //#line 205 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorCall_c
    (this)->::x10::lang::Object::_constructor();
    
    //#line 207 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.AssignPropertyCall_c
    FMGL(region) = (__extension__ ({
        
        //#line 207 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> __desugarer__var__3__32020 =
          reg;
        
        //#line 207 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> ret32021;
        
        //#line 207 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
        if (!((!x10aux::struct_equals(__desugarer__var__3__32020,
                                      X10_NULL)))) {
            
            //#line 207 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
            if (true) {
                
                //#line 207 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
                x10aux::throwException(x10aux::nullCheck(x10::lang::FailedDynamicCheckException::_make(x10aux::string_utils::lit("x10.array.Region{self!=null}"))));
            }
            
        }
        
        //#line 207 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
        ret32021 = __desugarer__var__3__32020;
        ret32021;
    }))
    ;
    FMGL(rank) = x10aux::nullCheck(reg)->FMGL(rank);
    FMGL(rect) = x10aux::nullCheck(reg)->FMGL(rect);
    FMGL(zeroBased) = x10aux::nullCheck(reg)->FMGL(zeroBased);
    FMGL(rail) = x10aux::nullCheck(reg)->FMGL(rail);
    FMGL(size) = x10aux::nullCheck(reg)->size();
    
    //#line 209 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(layout) =
      x10::array::RectLayout::_make(reg);
    
    //#line 210 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int n = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                  FMGL(layout)->x10::array::RectLayout::size();
    
    //#line 211 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((n) > ((backingStore)->length()))) {
        
        //#line 212 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
        x10aux::throwException(x10aux::nullCheck(x10::lang::IllegalArgumentException::_make(x10aux::string_utils::lit("backingStore too small"))));
    }
    
    //#line 214 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw) =
      backingStore;
}
template<class TPMGL(T)> x10aux::ref<x10::array::Array<TPMGL(T)> > x10::array::Array<TPMGL(T)>::_make(
                           x10aux::ref<x10::array::Region> reg,
                           x10::util::IndexedMemoryChunk<TPMGL(T) > backingStore)
{
    x10aux::ref<x10::array::Array<TPMGL(T)> > this_ = new (memset(x10aux::alloc<x10::array::Array<TPMGL(T)> >(), 0, sizeof(x10::array::Array<TPMGL(T)>))) x10::array::Array<TPMGL(T)>();
    this_->_constructor(reg, backingStore);
    return this_;
}



//#line 224 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorDecl_c
template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::_constructor(
                           x10::util::IndexedMemoryChunk<TPMGL(T) > backingStore) {
    
    //#line 224 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorCall_c
    (this)->::x10::lang::Object::_constructor();
    
    //#line 226 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10aux::ref<x10::array::Region> myReg = (__extension__ ({
        
        //#line 226 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> __desugarer__var__4__32000 =
          x10aux::class_cast<x10aux::ref<x10::array::Region> >(x10::array::RectRegion1D::_make(((x10_int)0),
                                                                                               ((x10_int) (((backingStore)->length()) - (((x10_int)1))))));
        
        //#line 226 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> ret32001;
        
        //#line 226 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
        if (!((x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__4__32000)->
                                       FMGL(rank), ((x10_int)1))) &&
            (x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__4__32000)->
                                     FMGL(zeroBased), true)) &&
            (x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__4__32000)->
                                     FMGL(rect), true)) &&
            (x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__4__32000)->
                                     FMGL(rail), true)) &&
            (!x10aux::struct_equals(__desugarer__var__4__32000,
                                    X10_NULL)))) {
            
            //#line 226 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
            if (true) {
                
                //#line 226 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
                x10aux::throwException(x10aux::nullCheck(x10::lang::FailedDynamicCheckException::_make(x10aux::string_utils::lit("x10.array.Region{self.rank==1, self.zeroBased==true, self.rect==true, self.rail==true, self!=null}"))));
            }
            
        }
        
        //#line 226 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
        ret32001 = __desugarer__var__4__32000;
        ret32001;
    }))
    ;
    
    //#line 228 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.AssignPropertyCall_c
    FMGL(region) = myReg;
    FMGL(rank) = ((x10_int)1);
    FMGL(rect) = true;
    FMGL(zeroBased) = true;
    FMGL(rail) = true;
    FMGL(size) = (backingStore)->length();
    
    //#line 230 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(layout) =
      x10::array::RectLayout::_make(myReg);
    
    //#line 231 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int n = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                  FMGL(layout)->x10::array::RectLayout::size();
    
    //#line 232 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((n) > ((backingStore)->length()))) {
        
        //#line 233 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
        x10aux::throwException(x10aux::nullCheck(x10::lang::IllegalArgumentException::_make(x10aux::string_utils::lit("backingStore too small"))));
    }
    
    //#line 235 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw) =
      backingStore;
}
template<class TPMGL(T)> x10aux::ref<x10::array::Array<TPMGL(T)> > x10::array::Array<TPMGL(T)>::_make(
                           x10::util::IndexedMemoryChunk<TPMGL(T) > backingStore)
{
    x10aux::ref<x10::array::Array<TPMGL(T)> > this_ = new (memset(x10aux::alloc<x10::array::Array<TPMGL(T)> >(), 0, sizeof(x10::array::Array<TPMGL(T)>))) x10::array::Array<TPMGL(T)>();
    this_->_constructor(backingStore);
    return this_;
}



//#line 242 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorDecl_c
template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::_constructor(
                           x10_int size) {
    
    //#line 242 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorCall_c
    (this)->::x10::lang::Object::_constructor();
    
    //#line 244 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10aux::ref<x10::array::Region> myReg = (__extension__ ({
        
        //#line 244 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> __desugarer__var__5__32003 =
          x10aux::class_cast<x10aux::ref<x10::array::Region> >(x10::array::RectRegion1D::_make(((x10_int)0),
                                                                                               ((x10_int) ((size) - (((x10_int)1))))));
        
        //#line 244 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> ret32004;
        
        //#line 244 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
        if (!((x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__5__32003)->
                                       FMGL(rank), ((x10_int)1))) &&
            (x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__5__32003)->
                                     FMGL(zeroBased), true)) &&
            (x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__5__32003)->
                                     FMGL(rect), true)) &&
            (x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__5__32003)->
                                     FMGL(rail), true)) &&
            (!x10aux::struct_equals(__desugarer__var__5__32003,
                                    X10_NULL)))) {
            
            //#line 244 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
            if (true) {
                
                //#line 244 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
                x10aux::throwException(x10aux::nullCheck(x10::lang::FailedDynamicCheckException::_make(x10aux::string_utils::lit("x10.array.Region{self.rank==1, self.zeroBased==true, self.rect==true, self.rail==true, self!=null}"))));
            }
            
        }
        
        //#line 244 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
        ret32004 = __desugarer__var__5__32003;
        ret32004;
    }))
    ;
    
    //#line 246 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.AssignPropertyCall_c
    FMGL(region) = myReg;
    FMGL(rank) = ((x10_int)1);
    FMGL(rect) = true;
    FMGL(zeroBased) = true;
    FMGL(rail) = true;
    FMGL(size) = size;
    
    //#line 248 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(layout) =
      x10::array::RectLayout::_make(((x10_int)0), ((x10_int) ((size) - (((x10_int)1)))));
    
    //#line 249 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int n = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                  FMGL(layout)->x10::array::RectLayout::size();
    
    //#line 250 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw) =
      x10::util::IndexedMemoryChunk<void>::allocate<TPMGL(T) >(n, 8, false, true);
}
template<class TPMGL(T)> x10aux::ref<x10::array::Array<TPMGL(T)> > x10::array::Array<TPMGL(T)>::_make(
                           x10_int size) {
    x10aux::ref<x10::array::Array<TPMGL(T)> > this_ = new (memset(x10aux::alloc<x10::array::Array<TPMGL(T)> >(), 0, sizeof(x10::array::Array<TPMGL(T)>))) x10::array::Array<TPMGL(T)>();
    this_->_constructor(size);
    return this_;
}



//#line 270 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorDecl_c
template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::_constructor(
                           x10_int size, x10aux::ref<x10::lang::Fun_0_1<x10_int, TPMGL(T)> > init) {
    
    //#line 270 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorCall_c
    (this)->::x10::lang::Object::_constructor();
    
    //#line 272 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10aux::ref<x10::array::Region> myReg = (__extension__ ({
        
        //#line 272 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> __desugarer__var__6__32006 =
          x10aux::class_cast<x10aux::ref<x10::array::Region> >(x10::array::RectRegion1D::_make(((x10_int)0),
                                                                                               ((x10_int) ((size) - (((x10_int)1))))));
        
        //#line 272 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> ret32007;
        
        //#line 272 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
        if (!((x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__6__32006)->
                                       FMGL(zeroBased), true)) &&
            (x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__6__32006)->
                                     FMGL(rail), true)) &&
            (x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__6__32006)->
                                     FMGL(rank), ((x10_int)1))) &&
            (x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__6__32006)->
                                     FMGL(rect), true)) &&
            (!x10aux::struct_equals(__desugarer__var__6__32006,
                                    X10_NULL)))) {
            
            //#line 272 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
            if (true) {
                
                //#line 272 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
                x10aux::throwException(x10aux::nullCheck(x10::lang::FailedDynamicCheckException::_make(x10aux::string_utils::lit("x10.array.Region{self.zeroBased==true, self.rail==true, self.rank==1, self.rect==true, self!=null}"))));
            }
            
        }
        
        //#line 272 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
        ret32007 = __desugarer__var__6__32006;
        ret32007;
    }))
    ;
    
    //#line 273 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.AssignPropertyCall_c
    FMGL(region) = myReg;
    FMGL(rank) = ((x10_int)1);
    FMGL(rect) = true;
    FMGL(zeroBased) = true;
    FMGL(rail) = true;
    FMGL(size) = size;
    
    //#line 275 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(layout) =
      x10::array::RectLayout::_make(((x10_int)0), ((x10_int) ((size) - (((x10_int)1)))));
    
    //#line 276 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int n = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                  FMGL(layout)->x10::array::RectLayout::size();
    
    //#line 277 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10::util::IndexedMemoryChunk<TPMGL(T) > r = x10::util::IndexedMemoryChunk<void>::allocate<TPMGL(T) >(n, 8, false, false);
    
    //#line 278 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int i31879min32022 = ((x10_int)0);
    
    //#line 278 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int i31879max32023 = ((x10_int) ((size) - (((x10_int)1))));
    
    //#line 278 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
    {
        x10_int i32024;
        for (
             //#line 278 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
             i32024 = i31879min32022; ((i32024) <= (i31879max32023));
             
             //#line 278 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
             i32024 = ((x10_int) ((i32024) + (((x10_int)1)))))
        {
            
            //#line 278 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
            x10_int i32025 = i32024;
            
            //#line 279 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
            (r)->__set(i32025, x10::lang::Fun_0_1<x10_int, TPMGL(T)>::__apply(x10aux::nullCheck(init), 
              i32025));
        }
    }
    
    //#line 281 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw) =
      r;
}
template<class TPMGL(T)> x10aux::ref<x10::array::Array<TPMGL(T)> > x10::array::Array<TPMGL(T)>::_make(
                           x10_int size, x10aux::ref<x10::lang::Fun_0_1<x10_int, TPMGL(T)> > init)
{
    x10aux::ref<x10::array::Array<TPMGL(T)> > this_ = new (memset(x10aux::alloc<x10::array::Array<TPMGL(T)> >(), 0, sizeof(x10::array::Array<TPMGL(T)>))) x10::array::Array<TPMGL(T)>();
    this_->_constructor(size, init);
    return this_;
}



//#line 292 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorDecl_c
template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::_constructor(
                           x10_int size, TPMGL(T) init) {
    
    //#line 292 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorCall_c
    (this)->::x10::lang::Object::_constructor();
    
    //#line 294 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10aux::ref<x10::array::Region> myReg = (__extension__ ({
        
        //#line 294 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> __desugarer__var__7__32009 =
          x10aux::class_cast<x10aux::ref<x10::array::Region> >(x10::array::RectRegion1D::_make(((x10_int)0),
                                                                                               ((x10_int) ((size) - (((x10_int)1))))));
        
        //#line 294 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::array::Region> ret32010;
        
        //#line 294 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
        if (!((x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__7__32009)->
                                       FMGL(rank), ((x10_int)1))) &&
            (x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__7__32009)->
                                     FMGL(zeroBased), true)) &&
            (x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__7__32009)->
                                     FMGL(rect), true)) &&
            (x10aux::struct_equals(x10aux::nullCheck(__desugarer__var__7__32009)->
                                     FMGL(rail), true)) &&
            (!x10aux::struct_equals(__desugarer__var__7__32009,
                                    X10_NULL)))) {
            
            //#line 294 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
            if (true) {
                
                //#line 294 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
                x10aux::throwException(x10aux::nullCheck(x10::lang::FailedDynamicCheckException::_make(x10aux::string_utils::lit("x10.array.Region{self.rank==1, self.zeroBased==true, self.rect==true, self.rail==true, self!=null}"))));
            }
            
        }
        
        //#line 294 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
        ret32010 = __desugarer__var__7__32009;
        ret32010;
    }))
    ;
    
    //#line 296 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.AssignPropertyCall_c
    FMGL(region) = myReg;
    FMGL(rank) = ((x10_int)1);
    FMGL(rect) = true;
    FMGL(zeroBased) = true;
    FMGL(rail) = true;
    FMGL(size) = size;
    
    //#line 298 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(layout) =
      x10::array::RectLayout::_make(((x10_int)0), ((x10_int) ((size) - (((x10_int)1)))));
    
    //#line 299 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int n = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                  FMGL(layout)->x10::array::RectLayout::size();
    
    //#line 300 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10::util::IndexedMemoryChunk<TPMGL(T) > r = x10::util::IndexedMemoryChunk<void>::allocate<TPMGL(T) >(n, 8, false, false);
    
    //#line 301 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int i31895min32026 = ((x10_int)0);
    
    //#line 301 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int i31895max32027 = ((x10_int) ((size) - (((x10_int)1))));
    
    //#line 301 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
    {
        x10_int i32028;
        for (
             //#line 301 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
             i32028 = i31895min32026; ((i32028) <= (i31895max32027));
             
             //#line 301 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
             i32028 = ((x10_int) ((i32028) + (((x10_int)1)))))
        {
            
            //#line 301 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
            x10_int i32029 = i32028;
            
            //#line 302 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
            (r)->__set(i32029, init);
        }
    }
    
    //#line 304 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw) =
      r;
}
template<class TPMGL(T)> x10aux::ref<x10::array::Array<TPMGL(T)> > x10::array::Array<TPMGL(T)>::_make(
                           x10_int size, TPMGL(T) init) {
    x10aux::ref<x10::array::Array<TPMGL(T)> > this_ = new (memset(x10aux::alloc<x10::array::Array<TPMGL(T)> >(), 0, sizeof(x10::array::Array<TPMGL(T)>))) x10::array::Array<TPMGL(T)>();
    this_->_constructor(size, init);
    return this_;
}



//#line 313 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorDecl_c
template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::_constructor(
                           x10aux::ref<x10::array::Array<TPMGL(T)> > init) {
    
    //#line 313 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorCall_c
    (this)->::x10::lang::Object::_constructor();
    
    //#line 315 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.AssignPropertyCall_c
    FMGL(region) = x10aux::nullCheck(init)->FMGL(region);
    FMGL(rank) = x10aux::nullCheck(init)->FMGL(rank);
    FMGL(rect) = x10aux::nullCheck(init)->FMGL(rect);
    FMGL(zeroBased) = x10aux::nullCheck(init)->FMGL(zeroBased);
    FMGL(rail) = x10aux::nullCheck(init)->FMGL(rail);
    FMGL(size) = x10aux::nullCheck(init)->FMGL(size);
    
    //#line 316 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(layout) =
      x10::array::RectLayout::_make(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                      FMGL(region));
    
    //#line 317 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int n = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                  FMGL(layout)->x10::array::RectLayout::size();
    
    //#line 318 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10::util::IndexedMemoryChunk<TPMGL(T) > r = x10::util::IndexedMemoryChunk<void>::allocate<TPMGL(T) >(n, 8, false, false);
    
    //#line 319 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    x10::util::IndexedMemoryChunk<void>::copy<TPMGL(T) >(x10aux::nullCheck(init)->
                                                           FMGL(raw),((x10_int)0),r,((x10_int)0),n);
    
    //#line 320 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw) =
      r;
}
template<class TPMGL(T)> x10aux::ref<x10::array::Array<TPMGL(T)> > x10::array::Array<TPMGL(T)>::_make(
                           x10aux::ref<x10::array::Array<TPMGL(T)> > init)
{
    x10aux::ref<x10::array::Array<TPMGL(T)> > this_ = new (memset(x10aux::alloc<x10::array::Array<TPMGL(T)> >(), 0, sizeof(x10::array::Array<TPMGL(T)>))) x10::array::Array<TPMGL(T)>();
    this_->_constructor(init);
    return this_;
}



//#line 329 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorDecl_c
template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::_constructor(
                           x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > init) {
    
    //#line 331 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorCall_c
    (this)->::x10::array::Array<TPMGL(T)>::_constructor((x10aux::nullCheck(init)->
                                                           FMGL(array))->__apply());
    
}
template<class TPMGL(T)> x10aux::ref<x10::array::Array<TPMGL(T)> > x10::array::Array<TPMGL(T)>::_make(
                           x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > init)
{
    x10aux::ref<x10::array::Array<TPMGL(T)> > this_ = new (memset(x10aux::alloc<x10::array::Array<TPMGL(T)> >(), 0, sizeof(x10::array::Array<TPMGL(T)>))) x10::array::Array<TPMGL(T)>();
    this_->_constructor(init);
    return this_;
}



//#line 339 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> x10aux::ref<x10::lang::String> x10::array::Array<TPMGL(T)>::toString(
  ) {
    
    //#line 340 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
          FMGL(rail)) {
        
        //#line 341 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10aux::ref<x10::util::StringBuilder> sb = x10::util::StringBuilder::_make();
        
        //#line 342 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
        sb->add(x10aux::string_utils::lit("["));
        
        //#line 343 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10_int sz = x10::lang::Math::min(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                            FMGL(size), ((x10_int)10));
        
        //#line 344 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
        {
            x10_int i;
            for (
                 //#line 344 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                 i = ((x10_int)0); ((i) < (sz)); 
                                                 //#line 344 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
                                                 i = ((x10_int) ((i) + (((x10_int)1)))))
            {
                
                //#line 345 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
                if (((i) > (((x10_int)0)))) {
                    
                    //#line 345 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
                    sb->add(x10aux::string_utils::lit(","));
                }
                
                //#line 346 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
                sb->add(((x10aux::string_utils::lit("")) + ((((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                               FMGL(raw))->__apply(i))));
            }
        }
        
        //#line 348 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
        if (((sz) < (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                       FMGL(size)))) {
            
            //#line 348 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
            sb->add(((((x10aux::string_utils::lit("...(omitted ")) + (((x10_int) ((((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                                                     FMGL(size)) - (sz)))))) + (x10aux::string_utils::lit(" elements)"))));
        }
        
        //#line 349 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
        sb->add(x10aux::string_utils::lit("]"));
        
        //#line 350 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
        return sb->toString();
        
    } else {
        
        //#line 352 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
        return ((((x10aux::string_utils::lit("Array(")) + (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                             FMGL(region)))) + (x10aux::string_utils::lit(")")));
        
    }
    
}

//#line 362 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> x10aux::ref<x10::lang::Iterator<x10aux::ref<x10::array::Point> > >
  x10::array::Array<TPMGL(T)>::iterator() {
    
    //#line 362 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
             FMGL(region)->iterator();
    
}

//#line 370 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> x10aux::ref<x10::lang::Iterable<TPMGL(T)> >
  x10::array::Array<TPMGL(T)>::values() {
    
    //#line 371 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
          FMGL(rect)) {
        
        //#line 372 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
        return x10::array::Array__Anonymous__13465<TPMGL(T)>::_make(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this));
        
    } else {
        
        //#line 380 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
        return x10::array::Array__Anonymous__13753<TPMGL(T)>::_make(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this));
        
    }
    
}

//#line 390 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> x10aux::ref<x10::lang::Sequence<TPMGL(T)> >
  x10::array::Array<TPMGL(T)>::sequence() {
    
    //#line 390 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return x10::array::Array__Anonymous__14087<TPMGL(T)>::_make(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this));
    
}

//#line 408 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> TPMGL(T) x10::array::Array<TPMGL(T)>::__apply(
  x10_int i0) {
    
    //#line 410 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
          FMGL(rail)) {
        
        //#line 412 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
        return (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                  FMGL(raw))->__apply(i0);
        
    } else {
        
        //#line 414 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
        if (BOUNDS_CHECK_BOOL && !(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                     FMGL(region)->contains(
                                     i0))) {
            
            //#line 415 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
            x10::array::Array<void>::raiseBoundsError(i0);
        }
        
        //#line 417 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
        return (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                  FMGL(raw))->__apply(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                        FMGL(layout)->x10::array::RectLayout::offset(
                                        i0));
        
    }
    
}

//#line 432 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> TPMGL(T) x10::array::Array<TPMGL(T)>::__apply(
  x10_int i0, x10_int i1) {
    
    //#line 433 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (BOUNDS_CHECK_BOOL && !(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                 FMGL(region)->contains(i0,
                                                        i1)))
    {
        
        //#line 434 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
        x10::array::Array<void>::raiseBoundsError(i0, i1);
    }
    
    //#line 436 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
              FMGL(raw))->__apply(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                    FMGL(layout)->x10::array::RectLayout::offset(
                                    i0, i1));
    
}

//#line 451 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> TPMGL(T) x10::array::Array<TPMGL(T)>::__apply(
  x10_int i0, x10_int i1, x10_int i2) {
    
    //#line 452 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (BOUNDS_CHECK_BOOL && !(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                 FMGL(region)->contains(i0,
                                                        i1,
                                                        i2)))
    {
        
        //#line 453 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
        x10::array::Array<void>::raiseBoundsError(i0, i1,
                                                  i2);
    }
    
    //#line 455 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
              FMGL(raw))->__apply(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                    FMGL(layout)->x10::array::RectLayout::offset(
                                    i0, i1, i2));
    
}

//#line 471 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> TPMGL(T) x10::array::Array<TPMGL(T)>::__apply(
  x10_int i0, x10_int i1, x10_int i2, x10_int i3) {
    
    //#line 472 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (BOUNDS_CHECK_BOOL && !(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                 FMGL(region)->contains(i0,
                                                        i1,
                                                        i2,
                                                        i3)))
    {
        
        //#line 473 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
        x10::array::Array<void>::raiseBoundsError(i0, i1,
                                                  i2, i3);
    }
    
    //#line 475 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
              FMGL(raw))->__apply(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                    FMGL(layout)->x10::array::RectLayout::offset(
                                    i0, i1, i2, i3));
    
}

//#line 487 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> TPMGL(T) x10::array::Array<TPMGL(T)>::__apply(
  x10aux::ref<x10::array::Point> pt) {
    
    //#line 488 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (BOUNDS_CHECK_BOOL && !(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                 FMGL(region)->contains(pt)))
    {
        
        //#line 489 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
        x10::array::Array<void>::raiseBoundsError(pt);
    }
    
    //#line 491 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
              FMGL(raw))->__apply(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                    FMGL(layout)->x10::array::RectLayout::offset(
                                    pt));
    
}

//#line 507 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> TPMGL(T) x10::array::Array<TPMGL(T)>::__set(
  x10_int i0, TPMGL(T) v) {
    
    //#line 509 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
          FMGL(rail)) {
        
        //#line 511 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
        (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
           FMGL(raw))->__set(i0, v);
    } else {
        
        //#line 513 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
        if (BOUNDS_CHECK_BOOL && !(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                     FMGL(region)->contains(
                                     i0))) {
            
            //#line 514 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
            x10::array::Array<void>::raiseBoundsError(i0);
        }
        
        //#line 516 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
        (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
           FMGL(raw))->__set(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                               FMGL(layout)->x10::array::RectLayout::offset(
                               i0), v);
    }
    
    //#line 518 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return v;
    
}

//#line 534 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> TPMGL(T) x10::array::Array<TPMGL(T)>::__set(
  x10_int i0, x10_int i1, TPMGL(T) v) {
    
    //#line 535 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (BOUNDS_CHECK_BOOL && !(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                 FMGL(region)->contains(i0,
                                                        i1)))
    {
        
        //#line 536 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
        x10::array::Array<void>::raiseBoundsError(i0, i1);
    }
    
    //#line 538 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw))->__set(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                                            FMGL(layout)->x10::array::RectLayout::offset(
                                                                            i0,
                                                                            i1), v);
    
    //#line 539 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return v;
    
}

//#line 556 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> TPMGL(T) x10::array::Array<TPMGL(T)>::__set(
  x10_int i0, x10_int i1, x10_int i2, TPMGL(T) v) {
    
    //#line 557 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (BOUNDS_CHECK_BOOL && !(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                 FMGL(region)->contains(i0,
                                                        i1,
                                                        i2)))
    {
        
        //#line 558 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
        x10::array::Array<void>::raiseBoundsError(i0, i1,
                                                  i2);
    }
    
    //#line 560 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw))->__set(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                                            FMGL(layout)->x10::array::RectLayout::offset(
                                                                            i0,
                                                                            i1,
                                                                            i2), v);
    
    //#line 561 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return v;
    
}

//#line 579 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> TPMGL(T) x10::array::Array<TPMGL(T)>::__set(
  x10_int i0, x10_int i1, x10_int i2, x10_int i3, TPMGL(T) v) {
    
    //#line 580 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (BOUNDS_CHECK_BOOL && !(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                 FMGL(region)->contains(i0,
                                                        i1,
                                                        i2,
                                                        i3)))
    {
        
        //#line 581 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
        x10::array::Array<void>::raiseBoundsError(i0, i1,
                                                  i2, i3);
    }
    
    //#line 583 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw))->__set(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                                            FMGL(layout)->x10::array::RectLayout::offset(
                                                                            i0,
                                                                            i1,
                                                                            i2,
                                                                            i3), v);
    
    //#line 584 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return v;
    
}

//#line 598 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> TPMGL(T) x10::array::Array<TPMGL(T)>::__set(
  x10aux::ref<x10::array::Point> p, TPMGL(T) v) {
    
    //#line 599 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (BOUNDS_CHECK_BOOL && !(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                 FMGL(region)->contains(p)))
    {
        
        //#line 600 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
        x10::array::Array<void>::raiseBoundsError(p);
    }
    
    //#line 602 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw))->__set(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                                            FMGL(layout)->x10::array::RectLayout::offset(
                                                                            p), v);
    
    //#line 603 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return v;
    
}

//#line 612 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::fill(
  TPMGL(T) v) {
    
    //#line 613 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
          FMGL(rect)) {
        
        //#line 617 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10_int i31911min32030 = ((x10_int)0);
        
        //#line 617 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
        x10_int i31911max32031 = ((x10_int) (((((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                 FMGL(raw))->length()) - (((x10_int)1))));
        
        //#line 617 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
        {
            x10_int i32032;
            for (
                 //#line 617 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                 i32032 = i31911min32030; ((i32032) <= (i31911max32031));
                 
                 //#line 617 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10LocalAssign_c
                 i32032 = ((x10_int) ((i32032) + (((x10_int)1)))))
            {
                
                //#line 617 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                x10_int i32033 = i32032;
                
                //#line 618 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
                (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                   FMGL(raw))->__set(i32033, v);
            }
        }
        
    } else {
        
        //#line 621 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.For_c
        {
            x10aux::ref<x10::lang::Iterator<x10aux::ref<x10::array::Point> > > p31927;
            for (
                 //#line 621 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                 p31927 = ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                            FMGL(region)->iterator(); x10::lang::Iterator<x10aux::ref<x10::array::Point> >::hasNext(x10aux::nullCheck(p31927));
                 ) {
                
                //#line 621 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
                x10aux::ref<x10::array::Point> p = x10::lang::Iterator<x10aux::ref<x10::array::Point> >::next(x10aux::nullCheck(p31927));
                
                //#line 622 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
                (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                   FMGL(raw))->__set(((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                       FMGL(layout)->x10::array::RectLayout::offset(
                                       p), v);
            }
        }
        
    }
    
}

//#line 632 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::clear(
  ) {
    
    //#line 633 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->FMGL(raw))->clear(((x10_int)0), (((x10aux::ref<x10::array::Array<TPMGL(T)> >)this)->
                                                                                           FMGL(raw))->length());
}

//#line 649 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 667 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 699 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 720 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 738 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 771 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 792 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 825 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 843 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 874 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 906 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 950 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 984 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 1016 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 1060 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 1084 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 1107 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 1140 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 1153 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 1156 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 1159 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 1162 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 1165 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c

//#line 55 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T)> x10aux::ref<x10::array::Array<TPMGL(T)> >
  x10::array::Array<TPMGL(T)>::x10__array__Array____x10__array__Array__this(
  ) {
    
    //#line 55 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return ((x10aux::ref<x10::array::Array<TPMGL(T)> >)this);
    
}
template<class TPMGL(T)> const x10aux::serialization_id_t x10::array::Array<TPMGL(T)>::_serialization_id = 
    x10aux::DeserializationDispatcher::addDeserializer(x10::array::Array<TPMGL(T)>::_deserializer, x10aux::CLOSURE_KIND_NOT_ASYNC);

template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::_serialize_body(x10aux::serialization_buffer& buf) {
    x10::lang::Object::_serialize_body(buf);
    buf.write(this->FMGL(raw));
    buf.write(this->FMGL(layout));
    buf.write(this->FMGL(region));
    buf.write(this->FMGL(rank));
    buf.write(this->FMGL(rect));
    buf.write(this->FMGL(zeroBased));
    buf.write(this->FMGL(rail));
    buf.write(this->FMGL(size));
    
}

template<class TPMGL(T)> x10aux::ref<x10::lang::Reference> x10::array::Array<TPMGL(T)>::_deserializer(x10aux::deserialization_buffer& buf) {
    x10aux::ref<x10::array::Array<TPMGL(T)> > this_ = new (memset(x10aux::alloc<x10::array::Array<TPMGL(T)> >(), 0, sizeof(x10::array::Array<TPMGL(T)>))) x10::array::Array<TPMGL(T)>();
    buf.record_reference(this_);
    this_->_deserialize_body(buf);
    return this_;
}

template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::_deserialize_body(x10aux::deserialization_buffer& buf) {
    x10::lang::Object::_deserialize_body(buf);
    FMGL(raw) = buf.read<x10::util::IndexedMemoryChunk<TPMGL(T) > >();
    FMGL(layout) = buf.read<x10::array::RectLayout>();
    FMGL(region) = buf.read<x10aux::ref<x10::array::Region> >();
    FMGL(rank) = buf.read<x10_int>();
    FMGL(rect) = buf.read<x10_boolean>();
    FMGL(zeroBased) = buf.read<x10_boolean>();
    FMGL(rail) = buf.read<x10_boolean>();
    FMGL(size) = buf.read<x10_int>();
}

template<class TPMGL(T)> x10aux::RuntimeType x10::array::Array<TPMGL(T)>::rtt;
template<class TPMGL(T)> void x10::array::Array<TPMGL(T)>::_initRTT() {
    const x10aux::RuntimeType *canonical = x10aux::getRTT<x10::array::Array<void> >();
    if (rtt.initStageOne(canonical)) return;
    const x10aux::RuntimeType* parents[3] = { x10aux::getRTT<x10::lang::Object>(), x10aux::getRTT<x10::lang::Fun_0_1<x10aux::ref<x10::array::Point>, TPMGL(T)> >(), x10aux::getRTT<x10::lang::Iterable<x10aux::ref<x10::array::Point> > >()};
    const x10aux::RuntimeType* params[1] = { x10aux::getRTT<TPMGL(T)>()};
    x10aux::RuntimeType::Variance variances[1] = { x10aux::RuntimeType::invariant};
    const char *baseName = "x10.array.Array";
    rtt.initStageTwo(baseName, x10aux::RuntimeType::class_kind, 3, parents, 1, params, variances);
}
template<class TPMGL(T)> void x10::array::Array<void>::asyncCopy(x10aux::ref<x10::array::Array<TPMGL(T)> > src,
                                                                 x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > dst)
{
    
    //#line 875 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if ((!x10aux::struct_equals((x10aux::nullCheck(src)->
                                   FMGL(raw))->length(), (x10aux::nullCheck(dst)->
                                                            FMGL(rawData))->length())))
    {
        
        //#line 875 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
        x10aux::throwException(x10aux::nullCheck(x10::lang::IllegalArgumentException::_make(x10aux::string_utils::lit("source and destination do not have equal size"))));
    }
    
    //#line 876 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    x10::util::IndexedMemoryChunk<void>::asyncCopy<TPMGL(T) >(x10aux::nullCheck(src)->
                                                                FMGL(raw),((x10_int)0),x10aux::nullCheck(dst)->
                                                                                         FMGL(rawData),((x10_int)0),(x10aux::nullCheck(src)->
                                                                                                                       FMGL(raw))->length());
}
template<class TPMGL(T)> void x10::array::Array<void>::asyncCopy(x10aux::ref<x10::array::Array<TPMGL(T)> > src,
                                                                 x10aux::ref<x10::array::Point> srcPoint,
                                                                 x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > dst,
                                                                 x10aux::ref<x10::array::Point> dstPoint,
                                                                 x10_int numElems)
{
    
    //#line 909 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10::lang::GlobalRef<x10aux::ref<x10::array::Array<TPMGL(T)> > > gra =
      x10aux::nullCheck(dst)->FMGL(array);
    
    //#line 910 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int dstIndex = x10::lang::Runtime::template evalAt<x10_int >(
                         x10::lang::Place::place((gra)->location),
                         x10aux::ref<x10::lang::Fun_0_0<x10_int> >(x10aux::ref<x10_array_Array__closure__3<TPMGL(T) > >(new (x10aux::alloc<x10::lang::Fun_0_0<x10_int> >(sizeof(x10_array_Array__closure__3<TPMGL(T)>)))x10_array_Array__closure__3<TPMGL(T)>(gra, dstPoint))));
    
    //#line 911 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    x10::array::Array<void>::template asyncCopy<TPMGL(T) >(
      src, x10aux::nullCheck(src)->FMGL(region)->indexOf(
             srcPoint), dst, dstIndex, numElems);
}
template<class TPMGL(T)> void x10::array::Array<void>::asyncCopy(x10aux::ref<x10::array::Array<TPMGL(T)> > src,
                                                                 x10_int srcIndex,
                                                                 x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > dst,
                                                                 x10_int dstIndex,
                                                                 x10_int numElems)
{
    
    //#line 953 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((srcIndex) < (((x10_int)0))) || ((((x10_int) ((srcIndex) + (numElems)))) > ((x10aux::nullCheck(src)->
                                                                                        FMGL(raw))->length())))
    {
        
        //#line 954 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
        x10aux::throwException(x10aux::nullCheck(x10::lang::IllegalArgumentException::_make(x10aux::string_utils::lit("Specified range is beyond bounds of source array"))));
    }
    
    //#line 956 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((dstIndex) < (((x10_int)0))) || ((((x10_int) ((dstIndex) + (numElems)))) > ((x10aux::nullCheck(dst)->
                                                                                        FMGL(rawData))->length())))
    {
        
        //#line 957 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
        x10aux::throwException(x10aux::nullCheck(x10::lang::IllegalArgumentException::_make(x10aux::string_utils::lit("Specified range is beyond bounds of destination array"))));
    }
    
    //#line 959 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    x10::util::IndexedMemoryChunk<void>::asyncCopy<TPMGL(T) >(x10aux::nullCheck(src)->
                                                                FMGL(raw),srcIndex,x10aux::nullCheck(dst)->
                                                                                     FMGL(rawData),dstIndex,numElems);
}
template<class TPMGL(T)> void x10::array::Array<void>::asyncCopy(x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > src,
                                                                 x10aux::ref<x10::array::Array<TPMGL(T)> > dst)
{
    
    //#line 985 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if ((!x10aux::struct_equals((x10aux::nullCheck(src)->
                                   FMGL(rawData))->length(),
                                (x10aux::nullCheck(dst)->
                                   FMGL(raw))->length())))
    {
        
        //#line 985 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
        x10aux::throwException(x10aux::nullCheck(x10::lang::IllegalArgumentException::_make(x10aux::string_utils::lit("source and destination do not have equal size"))));
    }
    
    //#line 986 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    x10::util::IndexedMemoryChunk<void>::asyncCopy<TPMGL(T) >(x10aux::nullCheck(src)->
                                                                FMGL(rawData),((x10_int)0),x10aux::nullCheck(dst)->
                                                                                             FMGL(raw),((x10_int)0),(x10aux::nullCheck(dst)->
                                                                                                                       FMGL(raw))->length());
}
template<class TPMGL(T)> void x10::array::Array<void>::asyncCopy(x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > src,
                                                                 x10aux::ref<x10::array::Point> srcPoint,
                                                                 x10aux::ref<x10::array::Array<TPMGL(T)> > dst,
                                                                 x10aux::ref<x10::array::Point> dstPoint,
                                                                 x10_int numElems)
{
    
    //#line 1019 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10::lang::GlobalRef<x10aux::ref<x10::array::Array<TPMGL(T)> > > gra =
      x10aux::nullCheck(src)->FMGL(array);
    
    //#line 1020 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10LocalDecl_c
    x10_int srcIndex = x10::lang::Runtime::template evalAt<x10_int >(
                         x10::lang::Place::place((gra)->location),
                         x10aux::ref<x10::lang::Fun_0_0<x10_int> >(x10aux::ref<x10_array_Array__closure__4<TPMGL(T) > >(new (x10aux::alloc<x10::lang::Fun_0_0<x10_int> >(sizeof(x10_array_Array__closure__4<TPMGL(T)>)))x10_array_Array__closure__4<TPMGL(T)>(gra, srcPoint))));
    
    //#line 1021 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    x10::array::Array<void>::template asyncCopy<TPMGL(T) >(
      src, srcIndex, dst, x10aux::nullCheck(dst)->FMGL(region)->indexOf(
                            dstPoint), numElems);
}
template<class TPMGL(T)> void x10::array::Array<void>::asyncCopy(x10aux::ref<x10::array::RemoteArray<TPMGL(T)> > src,
                                                                 x10_int srcIndex,
                                                                 x10aux::ref<x10::array::Array<TPMGL(T)> > dst,
                                                                 x10_int dstIndex,
                                                                 x10_int numElems)
{
    
    //#line 1063 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((srcIndex) < (((x10_int)0))) || ((((x10_int) ((srcIndex) + (numElems)))) > ((x10aux::nullCheck(src)->
                                                                                        FMGL(rawData))->length())))
    {
        
        //#line 1064 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
        x10aux::throwException(x10aux::nullCheck(x10::lang::IllegalArgumentException::_make(x10aux::string_utils::lit("Specified range is beyond bounds of source array"))));
    }
    
    //#line 1066 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((dstIndex) < (((x10_int)0))) || ((((x10_int) ((dstIndex) + (numElems)))) > ((x10aux::nullCheck(dst)->
                                                                                        FMGL(raw))->length())))
    {
        
        //#line 1067 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
        x10aux::throwException(x10aux::nullCheck(x10::lang::IllegalArgumentException::_make(x10aux::string_utils::lit("Specified range is beyond bounds of destination array"))));
    }
    
    //#line 1069 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    x10::util::IndexedMemoryChunk<void>::asyncCopy<TPMGL(T) >(x10aux::nullCheck(src)->
                                                                FMGL(rawData),srcIndex,x10aux::nullCheck(dst)->
                                                                                         FMGL(raw),dstIndex,numElems);
}
template<class TPMGL(T)> void x10::array::Array<void>::copy(x10aux::ref<x10::array::Array<TPMGL(T)> > src,
                                                            x10aux::ref<x10::array::Array<TPMGL(T)> > dst)
{
    
    //#line 1085 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if ((!x10aux::struct_equals((x10aux::nullCheck(src)->
                                   FMGL(raw))->length(), (x10aux::nullCheck(dst)->
                                                            FMGL(raw))->length())))
    {
        
        //#line 1085 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
        x10aux::throwException(x10aux::nullCheck(x10::lang::IllegalArgumentException::_make(x10aux::string_utils::lit("source and destination do not have equal size"))));
    }
    
    //#line 1086 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    x10::util::IndexedMemoryChunk<void>::copy<TPMGL(T) >(x10aux::nullCheck(src)->
                                                           FMGL(raw),((x10_int)0),x10aux::nullCheck(dst)->
                                                                                    FMGL(raw),((x10_int)0),(x10aux::nullCheck(src)->
                                                                                                              FMGL(raw))->length());
}
template<class TPMGL(T)> void x10::array::Array<void>::copy(x10aux::ref<x10::array::Array<TPMGL(T)> > src,
                                                            x10aux::ref<x10::array::Point> srcPoint,
                                                            x10aux::ref<x10::array::Array<TPMGL(T)> > dst,
                                                            x10aux::ref<x10::array::Point> dstPoint,
                                                            x10_int numElems)
{
    
    //#line 1110 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    x10::array::Array<void>::template copy<TPMGL(T) >(src,
                                                      x10aux::nullCheck(src)->
                                                        FMGL(region)->indexOf(
                                                        srcPoint),
                                                      dst,
                                                      x10aux::nullCheck(dst)->
                                                        FMGL(region)->indexOf(
                                                        dstPoint),
                                                      numElems);
}
template<class TPMGL(T)> void x10::array::Array<void>::copy(x10aux::ref<x10::array::Array<TPMGL(T)> > src,
                                                            x10_int srcIndex,
                                                            x10aux::ref<x10::array::Array<TPMGL(T)> > dst,
                                                            x10_int dstIndex,
                                                            x10_int numElems)
{
    
    //#line 1143 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((srcIndex) < (((x10_int)0))) || ((((x10_int) ((srcIndex) + (numElems)))) > ((x10aux::nullCheck(src)->
                                                                                        FMGL(raw))->length())))
    {
        
        //#line 1144 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
        x10aux::throwException(x10aux::nullCheck(x10::lang::IllegalArgumentException::_make(x10aux::string_utils::lit("Specified range is beyond bounds of source array"))));
    }
    
    //#line 1146 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10If_c
    if (((dstIndex) < (((x10_int)0))) || ((((x10_int) ((dstIndex) + (numElems)))) > ((x10aux::nullCheck(dst)->
                                                                                        FMGL(raw))->length())))
    {
        
        //#line 1147 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": polyglot.ast.Throw_c
        x10aux::throwException(x10aux::nullCheck(x10::lang::IllegalArgumentException::_make(x10aux::string_utils::lit("Specified range is beyond bounds of destination array"))));
    }
    
    //#line 1149 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10Call_c
    x10::util::IndexedMemoryChunk<void>::copy<TPMGL(T) >(x10aux::nullCheck(src)->
                                                           FMGL(raw),srcIndex,x10aux::nullCheck(dst)->
                                                                                FMGL(raw),dstIndex,numElems);
}
#endif // X10_ARRAY_ARRAY_H_IMPLEMENTATION
#endif // __X10_ARRAY_ARRAY_H_NODEPS
