package __builtin__
import (
	πg "grumpy"
	π_reflect "reflect"
)
func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseException) {
	ßBuiltins := πg.InternStr("Builtins")
	ßglobals := πg.InternStr("globals")
	ßiteritems := πg.InternStr("iteritems")
	ßk := πg.InternStr("k")
	ßv := πg.InternStr("v")
	var πTemp001 *πg.Object
	_ = πTemp001
	var πTemp002 map[string]*πg.Object
	_ = πTemp002
	var πTemp003 *πg.Object
	_ = πTemp003
	var πTemp004 *πg.Object
	_ = πTemp004
	var πTemp005 *πg.Object
	_ = πTemp005
	var πTemp006 *πg.Object
	_ = πTemp006
	var πTemp007 *πg.Object
	_ = πTemp007
	var πTemp008 *πg.Object
	_ = πTemp008
	var πTemp009 *πg.Object
	_ = πTemp009
	var πE *πg.BaseException; _ = πE
	for ; πF.State() >= 0; πF.PopCheckpoint() {
		switch πF.State() {
		case 0:
		default: panic("unexpected function state")
		}
		// line 15: """Built-in Python identifiers."""
		πF.SetLineno(15)
		// line 19: from __go__.grumpy import Builtins
		πF.SetLineno(19)
		πTemp002 = map[string]*πg.Object{}
		if πTemp003, πE = πg.WrapNative(πF, π_reflect.ValueOf(πg.Builtins)); πE != nil {
			continue
		}
		πTemp002["Builtins"] = πTemp003
		if πTemp001, πE = πg.ImportNativeModule(πF, "__go__.grumpy", πTemp002); πE != nil {
			continue
		}
		if πTemp003, πE = πg.GetAttr(πF, πTemp001, ßBuiltins, nil); πE != nil {
			continue
		}
		if πE = πF.Globals().SetItem(πF, ßBuiltins.ToObject(), πTemp003); πE != nil {
			continue
		}
		// line 22: for k, v in Builtins.iteritems():
		πF.SetLineno(22)
		if πTemp001, πE = πg.ResolveGlobal(πF, ßBuiltins); πE != nil {
			continue
		}
		if πTemp003, πE = πg.GetAttr(πF, πTemp001, ßiteritems, nil); πE != nil {
			continue
		}
		if πTemp001, πE = πTemp003.Call(πF, nil, nil); πE != nil {
			continue
		}
		if πTemp003, πE = πg.Iter(πF, πTemp001); πE != nil {
			continue
		}
	Label1:
		if πTemp004, πE = πg.Next(πF, πTemp003); πE != nil {
			isStop, exc := πg.IsInstance(πF, πE.ToObject(), πg.StopIterationType.ToObject())
			if exc != nil {
				πE = exc
				continue
			}
			if !isStop {
				continue
			}
			πE = nil
			πF.RestoreExc(nil, nil)
			goto Label2
		}
		if πE = πg.Tie(πF, πg.TieTarget{Children: []πg.TieTarget{πg.TieTarget{Target: &πTemp005}, πg.TieTarget{Target: &πTemp006}}}, πTemp004); πE != nil {
			continue
		}
		if πE = πF.Globals().SetItem(πF, ßk.ToObject(), πTemp005); πE != nil {
			continue
		}
		if πE = πF.Globals().SetItem(πF, ßv.ToObject(), πTemp006); πE != nil {
			continue
		}
		// line 23: globals()[k] = v
		πF.SetLineno(23)
		if πTemp005, πE = πg.ResolveGlobal(πF, ßv); πE != nil {
			continue
		}
		if πE = πg.Tie(πF, πg.TieTarget{Target: &πTemp006}, πTemp005); πE != nil {
			continue
		}
		if πTemp007, πE = πg.ResolveGlobal(πF, ßglobals); πE != nil {
			continue
		}
		if πTemp008, πE = πTemp007.Call(πF, nil, nil); πE != nil {
			continue
		}
		if πTemp009, πE = πg.ResolveGlobal(πF, ßk); πE != nil {
			continue
		}
		πTemp007 = πTemp009
		if πE = πg.SetItem(πF, πTemp008, πTemp007, πTemp006); πE != nil {
			continue
		}
		goto Label1
		goto Label2
	Label2:
		return nil, nil
	}
	return nil, πE
}
var Code *πg.Code
func init() {
	Code = πg.NewCode("<module>", "lib/__builtin__.py", nil, 0, initModule)
}
