// AUTO-GENERATED by autogen.sh; DO NOT EDIT

#include "runtime.h"
#include "map.h"

#line 9 "../../../gcc-5.1.0/libgo/runtime/map.goc"
typedef struct __go_map Hmap; 
typedef struct __go_hash_iter hiter; 
bool runtime_mapaccess2(MapType* t, Hmap* h, byte* key, byte* val) __asm__ (GOSYM_PREFIX "runtime.mapaccess2");
bool runtime_mapaccess2(MapType* t, Hmap* h, byte* key, byte* val)
{
  bool present;
#line 14 "../../../gcc-5.1.0/libgo/runtime/map.goc"

	byte *mapval;
	size_t valsize;

	mapval = __go_map_index(h, key, 0);
	valsize = t->__val_type->__size;
	if (mapval == nil) {
		__builtin_memset(val, 0, valsize);
		present = 0;
	} else {
		__builtin_memcpy(val, mapval, valsize);
		present = 1;
	}
return present;
}
void runtime_mapassign2(Hmap* h, byte* key, byte* val, bool p) __asm__ (GOSYM_PREFIX "runtime.mapassign2");
void runtime_mapassign2(Hmap* h, byte* key, byte* val, bool p)
{
#line 31 "../../../gcc-5.1.0/libgo/runtime/map.goc"

	if (!p) {
		__go_map_delete(h, key);
	} else {
		byte *mapval;
		size_t valsize;

		mapval = __go_map_index(h, key, 1);
		valsize = h->__descriptor->__map_descriptor->__val_type->__size;
		__builtin_memcpy(mapval, val, valsize);
	}
}
void runtime_mapdelete(Hmap* h, byte* key) __asm__ (GOSYM_PREFIX "runtime.mapdelete");
void runtime_mapdelete(Hmap* h, byte* key)
{
#line 46 "../../../gcc-5.1.0/libgo/runtime/map.goc"

	__go_map_delete(h, key);
}
void runtime_mapiterinit(Hmap* h, hiter* it) __asm__ (GOSYM_PREFIX "runtime.mapiterinit");
void runtime_mapiterinit(Hmap* h, hiter* it)
{
#line 52 "../../../gcc-5.1.0/libgo/runtime/map.goc"

	__go_mapiterinit(h, it);
}
void runtime_mapiternext(hiter* it) __asm__ (GOSYM_PREFIX "runtime.mapiternext");
void runtime_mapiternext(hiter* it)
{
#line 58 "../../../gcc-5.1.0/libgo/runtime/map.goc"

	__go_mapiternext(it);
}
void runtime_mapiter1(hiter* it, byte* key) __asm__ (GOSYM_PREFIX "runtime.mapiter1");
void runtime_mapiter1(hiter* it, byte* key)
{
#line 64 "../../../gcc-5.1.0/libgo/runtime/map.goc"

	__go_mapiter1(it, key);
}
void runtime_mapiter2(hiter* it, byte* key, byte* val) __asm__ (GOSYM_PREFIX "runtime.mapiter2");
void runtime_mapiter2(hiter* it, byte* key, byte* val)
{
#line 70 "../../../gcc-5.1.0/libgo/runtime/map.goc"

	__go_mapiter2(it, key, val);
}
