package operator
import (
	πg "grumpy"
)
func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseException) {
	ßeq := πg.InternStr("eq")
	ßge := πg.InternStr("ge")
	ßgt := πg.InternStr("gt")
	ßitemgetter := πg.InternStr("itemgetter")
	ßle := πg.InternStr("le")
	ßlen := πg.InternStr("len")
	ßlt := πg.InternStr("lt")
	ßne := πg.InternStr("ne")
	ßtuple := πg.InternStr("tuple")
	var πTemp001 *πg.Object
	_ = πTemp001
	var πTemp002 []πg.FunctionArg
	_ = π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 πE *πg.BaseException; _ = πE
	for ; πF.State() >= 0; πF.PopCheckpoint() {
		switch πF.State() {
		case 0:
		default: panic("unexpected function state")
		}
		// line 1: def eq(a, b):
		πF.SetLineno(1)
		πTemp002 = make([]πg.FunctionArg, 2)
		πTemp002[0] = πg.FunctionArg{Name: "a", Def: nil}
		πTemp002[1] = πg.FunctionArg{Name: "b", Def: nil}
		πTemp001 = πg.NewFunction(πg.NewCode("eq", "lib/operator.py", πTemp002, 0, func(πF *πg.Frame, πArgs []*πg.Object) (*πg.Object, *πg.BaseException) {
			var µa *πg.Object = πArgs[0]; _ = µa
			var µb *πg.Object = πArgs[1]; _ = µb
			var πTemp001 *πg.Object
			_ = πTemp001
			var πE *πg.BaseException; _ = πE
			for ; πF.State() >= 0; πF.PopCheckpoint() {
				switch πF.State() {
				case 0:
				default: panic("unexpected function state")
				}
				// line 2: return a == b
				πF.SetLineno(2)
				if πE = πg.CheckLocal(πF, µa, "a"); πE != nil {
					continue
				}
				if πE = πg.CheckLocal(πF, µb, "b"); πE != nil {
					continue
				}
				if πTemp001, πE = πg.Eq(πF, µa, µb); πE != nil {
					continue
				}
				return πTemp001, nil
				return nil, nil
			}
			return nil, πE
		}), πF.Globals()).ToObject()
		if πE = πF.Globals().SetItem(πF, ßeq.ToObject(), πTemp001); πE != nil {
			continue
		}
		// line 5: def le(a, b):
		πF.SetLineno(5)
		πTemp002 = make([]πg.FunctionArg, 2)
		πTemp002[0] = πg.FunctionArg{Name: "a", Def: nil}
		πTemp002[1] = πg.FunctionArg{Name: "b", Def: nil}
		πTemp003 = πg.NewFunction(πg.NewCode("le", "lib/operator.py", πTemp002, 0, func(πF *πg.Frame, πArgs []*πg.Object) (*πg.Object, *πg.BaseException) {
			var µa *πg.Object = πArgs[0]; _ = µa
			var µb *πg.Object = πArgs[1]; _ = µb
			var πTemp001 *πg.Object
			_ = πTemp001
			var πE *πg.BaseException; _ = πE
			for ; πF.State() >= 0; πF.PopCheckpoint() {
				switch πF.State() {
				case 0:
				default: panic("unexpected function state")
				}
				// line 6: return a <= b
				πF.SetLineno(6)
				if πE = πg.CheckLocal(πF, µa, "a"); πE != nil {
					continue
				}
				if πE = πg.CheckLocal(πF, µb, "b"); πE != nil {
					continue
				}
				if πTemp001, πE = πg.LE(πF, µa, µb); πE != nil {
					continue
				}
				return πTemp001, nil
				return nil, nil
			}
			return nil, πE
		}), πF.Globals()).ToObject()
		if πE = πF.Globals().SetItem(πF, ßle.ToObject(), πTemp003); πE != nil {
			continue
		}
		// line 9: def lt(a, b):
		πF.SetLineno(9)
		πTemp002 = make([]πg.FunctionArg, 2)
		πTemp002[0] = πg.FunctionArg{Name: "a", Def: nil}
		πTemp002[1] = πg.FunctionArg{Name: "b", Def: nil}
		πTemp004 = πg.NewFunction(πg.NewCode("lt", "lib/operator.py", πTemp002, 0, func(πF *πg.Frame, πArgs []*πg.Object) (*πg.Object, *πg.BaseException) {
			var µa *πg.Object = πArgs[0]; _ = µa
			var µb *πg.Object = πArgs[1]; _ = µb
			var πTemp001 *πg.Object
			_ = πTemp001
			var πE *πg.BaseException; _ = πE
			for ; πF.State() >= 0; πF.PopCheckpoint() {
				switch πF.State() {
				case 0:
				default: panic("unexpected function state")
				}
				// line 10: return a < b
				πF.SetLineno(10)
				if πE = πg.CheckLocal(πF, µa, "a"); πE != nil {
					continue
				}
				if πE = πg.CheckLocal(πF, µb, "b"); πE != nil {
					continue
				}
				if πTemp001, πE = πg.LT(πF, µa, µb); πE != nil {
					continue
				}
				return πTemp001, nil
				return nil, nil
			}
			return nil, πE
		}), πF.Globals()).ToObject()
		if πE = πF.Globals().SetItem(πF, ßlt.ToObject(), πTemp004); πE != nil {
			continue
		}
		// line 13: def ge(a, b):
		πF.SetLineno(13)
		πTemp002 = make([]πg.FunctionArg, 2)
		πTemp002[0] = πg.FunctionArg{Name: "a", Def: nil}
		πTemp002[1] = πg.FunctionArg{Name: "b", Def: nil}
		πTemp005 = πg.NewFunction(πg.NewCode("ge", "lib/operator.py", πTemp002, 0, func(πF *πg.Frame, πArgs []*πg.Object) (*πg.Object, *πg.BaseException) {
			var µa *πg.Object = πArgs[0]; _ = µa
			var µb *πg.Object = πArgs[1]; _ = µb
			var πTemp001 *πg.Object
			_ = πTemp001
			var πE *πg.BaseException; _ = πE
			for ; πF.State() >= 0; πF.PopCheckpoint() {
				switch πF.State() {
				case 0:
				default: panic("unexpected function state")
				}
				// line 14: return a >= b
				πF.SetLineno(14)
				if πE = πg.CheckLocal(πF, µa, "a"); πE != nil {
					continue
				}
				if πE = πg.CheckLocal(πF, µb, "b"); πE != nil {
					continue
				}
				if πTemp001, πE = πg.GE(πF, µa, µb); πE != nil {
					continue
				}
				return πTemp001, nil
				return nil, nil
			}
			return nil, πE
		}), πF.Globals()).ToObject()
		if πE = πF.Globals().SetItem(πF, ßge.ToObject(), πTemp005); πE != nil {
			continue
		}
		// line 17: def gt(a, b):
		πF.SetLineno(17)
		πTemp002 = make([]πg.FunctionArg, 2)
		πTemp002[0] = πg.FunctionArg{Name: "a", Def: nil}
		πTemp002[1] = πg.FunctionArg{Name: "b", Def: nil}
		πTemp006 = πg.NewFunction(πg.NewCode("gt", "lib/operator.py", πTemp002, 0, func(πF *πg.Frame, πArgs []*πg.Object) (*πg.Object, *πg.BaseException) {
			var µa *πg.Object = πArgs[0]; _ = µa
			var µb *πg.Object = πArgs[1]; _ = µb
			var πTemp001 *πg.Object
			_ = πTemp001
			var πE *πg.BaseException; _ = πE
			for ; πF.State() >= 0; πF.PopCheckpoint() {
				switch πF.State() {
				case 0:
				default: panic("unexpected function state")
				}
				// line 18: return a > b
				πF.SetLineno(18)
				if πE = πg.CheckLocal(πF, µa, "a"); πE != nil {
					continue
				}
				if πE = πg.CheckLocal(πF, µb, "b"); πE != nil {
					continue
				}
				if πTemp001, πE = πg.GT(πF, µa, µb); πE != nil {
					continue
				}
				return πTemp001, nil
				return nil, nil
			}
			return nil, πE
		}), πF.Globals()).ToObject()
		if πE = πF.Globals().SetItem(πF, ßgt.ToObject(), πTemp006); πE != nil {
			continue
		}
		// line 21: def itemgetter(*items):
		πF.SetLineno(21)
		πTemp002 = make([]πg.FunctionArg, 0)
		πTemp007 = πg.NewFunction(πg.NewCode("itemgetter", "lib/operator.py", πTemp002, πg.CodeFlagVarArg, func(πF *πg.Frame, πArgs []*πg.Object) (*πg.Object, *πg.BaseException) {
			var µitems *πg.Object = πArgs[0]; _ = µitems
			var µitem *πg.Object = πg.UnboundLocal; _ = µitem
			var µg *πg.Object = πg.UnboundLocal; _ = µg
			var πTemp001 *πg.Object
			_ = πTemp001
			var πTemp002 []*πg.Object
			_ = πTemp002
			var πTemp003 *πg.Object
			_ = πTemp003
			var πTemp004 *πg.Object
			_ = πTemp004
			var πTemp005 bool
			_ = πTemp005
			var πTemp006 []πg.FunctionArg
			_ = πTemp006
			var πE *πg.BaseException; _ = πE
			for ; πF.State() >= 0; πF.PopCheckpoint() {
				switch πF.State() {
				case 0:
				default: panic("unexpected function state")
				}
				πTemp002 = πF.MakeArgs(1)
				if πE = πg.CheckLocal(πF, µitems, "items"); πE != nil {
					continue
				}
				πTemp002[0] = µitems
				if πTemp003, πE = πg.ResolveGlobal(πF, ßlen); πE != nil {
					continue
				}
				if πTemp004, πE = πTemp003.Call(πF, πTemp002, nil); πE != nil {
					continue
				}
				πF.FreeArgs(πTemp002)
				if πTemp001, πE = πg.Eq(πF, πTemp004, πg.NewInt(1).ToObject()); πE != nil {
					continue
				}
				if πTemp005, πE = πg.IsTrue(πF, πTemp001); πE != nil {
					return nil, πE
				}
				if πTemp005 {
					goto Label1
				}
				goto Label2
				// line 22: if len(items) == 1:
				πF.SetLineno(22)
			Label1:
				// line 23: item = items[0]
				πF.SetLineno(23)
				πTemp001 = πg.NewInt(0).ToObject()
				if πE = πg.CheckLocal(πF, µitems, "items"); πE != nil {
					continue
				}
				if πTemp003, πE = πg.GetItem(πF, µitems, πTemp001); πE != nil {
					continue
				}
				µitem = πTemp003
				// line 24: def g(obj):
				πF.SetLineno(24)
				πTemp006 = make([]πg.FunctionArg, 1)
				πTemp006[0] = πg.FunctionArg{Name: "obj", Def: nil}
				πTemp001 = πg.NewFunction(πg.NewCode("g", "lib/operator.py", πTemp006, 0, func(πF *πg.Frame, πArgs []*πg.Object) (*πg.Object, *πg.BaseException) {
					var µobj *πg.Object = πArgs[0]; _ = µobj
					var πTemp001 *πg.Object
					_ = πTemp001
					var πTemp002 *πg.Object
					_ = πTemp002
					var πE *πg.BaseException; _ = πE
					for ; πF.State() >= 0; πF.PopCheckpoint() {
						switch πF.State() {
						case 0:
						default: panic("unexpected function state")
						}
						// line 25: return obj[item]
						πF.SetLineno(25)
						if πE = πg.CheckLocal(πF, µitem, "item"); πE != nil {
							continue
						}
						πTemp001 = µitem
						if πE = πg.CheckLocal(πF, µobj, "obj"); πE != nil {
							continue
						}
						if πTemp002, πE = πg.GetItem(πF, µobj, πTemp001); πE != nil {
							continue
						}
						return πTemp002, nil
						return nil, nil
					}
					return nil, πE
				}), πF.Globals()).ToObject()
				µg = πTemp001
				goto Label3
			Label2:
				// line 27: def g(obj):
				πF.SetLineno(27)
				πTemp006 = make([]πg.FunctionArg, 1)
				πTemp006[0] = πg.FunctionArg{Name: "obj", Def: nil}
				πTemp003 = πg.NewFunction(πg.NewCode("g", "lib/operator.py", πTemp006, 0, func(πF *πg.Frame, πArgs []*πg.Object) (*πg.Object, *πg.BaseException) {
					var µobj *πg.Object = πArgs[0]; _ = µobj
					var πTemp001 []*πg.Object
					_ = πTemp001
					var πTemp002 *πg.Object
					_ = πTemp002
					var πTemp003 []πg.FunctionArg
					_ = πTemp003
					var πTemp004 *πg.Object
					_ = πTemp004
					var πTemp005 *πg.Object
					_ = πTemp005
					var πE *πg.BaseException; _ = πE
					for ; πF.State() >= 0; πF.PopCheckpoint() {
						switch πF.State() {
						case 0:
						default: panic("unexpected function state")
						}
						// line 28: return tuple(obj[item] for item in items)
						πF.SetLineno(28)
						πTemp001 = πF.MakeArgs(1)
						πTemp003 = make([]πg.FunctionArg, 0)
						πTemp002 = πg.NewFunction(πg.NewCode("<generator>", "lib/operator.py", πTemp003, 0, func(πF *πg.Frame, πArgs []*πg.Object) (*πg.Object, *πg.BaseException) {
							var µitem *πg.Object = πg.UnboundLocal; _ = µitem
							var πTemp001 *πg.Object
							_ = πTemp001
							var πTemp002 *πg.Object
							_ = πTemp002
							var πTemp003 *πg.Object
							_ = πTemp003
							var πTemp004 *πg.Object
							_ = πTemp004
							return πg.NewGenerator(πF, func(πSent *πg.Object) (*πg.Object, *πg.BaseException) {
								var πE *πg.BaseException; _ = πE
								for ; πF.State() >= 0; πF.PopCheckpoint() {
									switch πF.State() {
									case 0:
									case 3: goto Label3
									default: panic("unexpected function state")
									}
									if πE = πg.CheckLocal(πF, µitems, "items"); πE != nil {
										continue
									}
									if πTemp001, πE = πg.Iter(πF, µitems); πE != nil {
										continue
									}
								Label1:
									if πTemp002, πE = πg.Next(πF, πTemp001); π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
									}
									µitem = πTemp002
									if πE = πg.CheckLocal(πF, µitem, "item"); πE != nil {
										continue
									}
									πTemp003 = µitem
									if πE = πg.CheckLocal(πF, µobj, "obj"); πE != nil {
										continue
									}
									if πTemp004, πE = πg.GetItem(πF, µobj, πTemp003); πE != nil {
										continue
									}
									πF.PushCheckpoint(3)
									return πTemp004, nil
								Label3:
									πTemp003 = πSent
									goto Label1
									goto Label2
								Label2:
									return nil, nil
								}
								return nil, πE
							}).ToObject(), nil
						}), πF.Globals()).ToObject()
						if πTemp004, πE = πTemp002.Call(πF, nil, nil); πE != nil {
							continue
						}
						πTemp001[0] = πTemp004
						if πTemp004, πE = πg.ResolveGlobal(πF, ßtuple); πE != nil {
							continue
						}
						if πTemp005, πE = πTemp004.Call(πF, πTemp001, nil); πE != nil {
							continue
						}
						πF.FreeArgs(πTemp001)
						return πTemp005, nil
						return nil, nil
					}
					return nil, πE
				}), πF.Globals()).ToObject()
				µg = πTemp003
				goto Label3
			Label3:
				// line 29: return g
				πF.SetLineno(29)
				if πE = πg.CheckLocal(πF, µg, "g"); πE != nil {
					continue
				}
				return µg, nil
				return nil, nil
			}
			return nil, πE
		}), πF.Globals()).ToObject()
		if πE = πF.Globals().SetItem(πF, ßitemgetter.ToObject(), πTemp007); πE != nil {
			continue
		}
		// line 32: def ne(a, b):
		πF.SetLineno(32)
		πTemp002 = make([]πg.FunctionArg, 2)
		πTemp002[0] = πg.FunctionArg{Name: "a", Def: nil}
		πTemp002[1] = πg.FunctionArg{Name: "b", Def: nil}
		πTemp008 = πg.NewFunction(πg.NewCode("ne", "lib/operator.py", πTemp002, 0, func(πF *πg.Frame, πArgs []*πg.Object) (*πg.Object, *πg.BaseException) {
			var µa *πg.Object = πArgs[0]; _ = µa
			var µb *πg.Object = πArgs[1]; _ = µb
			var πTemp001 *πg.Object
			_ = πTemp001
			var πE *πg.BaseException; _ = πE
			for ; πF.State() >= 0; πF.PopCheckpoint() {
				switch πF.State() {
				case 0:
				default: panic("unexpected function state")
				}
				// line 33: return a != b
				πF.SetLineno(33)
				if πE = πg.CheckLocal(πF, µa, "a"); πE != nil {
					continue
				}
				if πE = πg.CheckLocal(πF, µb, "b"); πE != nil {
					continue
				}
				if πTemp001, πE = πg.NE(πF, µa, µb); πE != nil {
					continue
				}
				return πTemp001, nil
				return nil, nil
			}
			return nil, πE
		}), πF.Globals()).ToObject()
		if πE = πF.Globals().SetItem(πF, ßne.ToObject(), πTemp008); πE != nil {
			continue
		}
		return nil, nil
	}
	return nil, πE
}
var Code *πg.Code
func init() {
	Code = πg.NewCode("<module>", "lib/operator.py", nil, 0, initModule)
}
