/* Generated by Cython 0.10.3 on Wed Jan 21 02:19:07 2009 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "structmember.h"
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#if PY_VERSION_HEX < 0x02040000
  #define METH_COEXIST 0
#endif
#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   PyInt_AsLong(o)
  #define PyNumber_Index(o)    PyNumber_Int(o)
  #define PyIndex_Check(o)     PyNumber_Check(o)
#endif
#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)

  typedef struct {
       void *buf;
       PyObject *obj;
       Py_ssize_t len;
       Py_ssize_t itemsize;
       int readonly;
       int ndim;
       char *format;
       Py_ssize_t *shape;
       Py_ssize_t *strides;
       Py_ssize_t *suboffsets;
       void *internal;
  } Py_buffer;

  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_LOCK 0x0002
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)

#endif
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
#endif
#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyString_Type                PyBytes_Type
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define PyBytes_Type                 PyString_Type
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
#else
  #define _USE_MATH_DEFINES
#endif
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
#include <math.h>
#define __PYX_HAVE_API___line_profiler
#include "frameobject.h"
#include "timers.h"
#include "sys/types.h"
#include "stdio.h"


#ifdef __GNUC__
#define INLINE __inline__
#elif _WIN32
#define INLINE __inline
#else
#define INLINE 
#endif

typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/



static int __pyx_skip_dispatch = 0;


/* Type Conversion Predeclarations */

#if PY_MAJOR_VERSION < 3
#define __Pyx_PyBytes_FromString PyString_FromString
#define __Pyx_PyBytes_AsString   PyString_AsString
#else
#define __Pyx_PyBytes_FromString PyBytes_FromString
#define __Pyx_PyBytes_AsString   PyBytes_AsString
#endif

#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static INLINE int __Pyx_PyObject_IsTrue(PyObject* x);
static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x);
static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x);
static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b);

#define __pyx_PyInt_AsLong(x) (PyInt_CheckExact(x) ? PyInt_AS_LONG(x) : PyInt_AsLong(x))
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))

static INLINE unsigned char __pyx_PyInt_unsigned_char(PyObject* x);
static INLINE unsigned short __pyx_PyInt_unsigned_short(PyObject* x);
static INLINE char __pyx_PyInt_char(PyObject* x);
static INLINE short __pyx_PyInt_short(PyObject* x);
static INLINE int __pyx_PyInt_int(PyObject* x);
static INLINE long __pyx_PyInt_long(PyObject* x);
static INLINE signed char __pyx_PyInt_signed_char(PyObject* x);
static INLINE signed short __pyx_PyInt_signed_short(PyObject* x);
static INLINE signed int __pyx_PyInt_signed_int(PyObject* x);
static INLINE signed long __pyx_PyInt_signed_long(PyObject* x);
static INLINE long double __pyx_PyInt_long_double(PyObject* x);
#ifdef __GNUC__
/* Test for GCC > 2.95 */
#if __GNUC__ > 2 ||               (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) 
#define likely(x)   __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#else /* __GNUC__ > 2 ... */
#define likely(x)   (x)
#define unlikely(x) (x)
#endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
#define likely(x)   (x)
#define unlikely(x) (x)
#endif /* __GNUC__ */
    
static PyObject *__pyx_m;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;
static const char **__pyx_f;

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name, PyObject* kw_name); /*proto*/

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/

static INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict,
    const char* function_name, int kw_allowed); /*proto*/

static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (PyList_Append(L, x) < 0) return NULL;
        Py_INCREF(Py_None);
        return Py_None; // this is just to have an accurate signature
    }
    else {
        return PyObject_CallMethod(L, "append", "(O)", x);
    }
}

static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/

static void __Pyx_WriteUnraisable(const char *name); /*proto*/

static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/

static void __Pyx_AddTraceback(const char *funcname); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/

/* Type declarations */

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":53
 * 
 * 
 * cdef class LineTiming:             # <<<<<<<<<<<<<<
 *     """ The timing for a single line.
 *     """
 */

struct __pyx_obj_14_line_profiler_LineTiming {
  PyObject_HEAD
  struct __pyx_vtabstruct_14_line_profiler_LineTiming *__pyx_vtab;
  PyObject *code;
  int lineno;
  long total_time;
  long nhits;
};

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":173
 * 
 * 
 * cdef class LastTime:             # <<<<<<<<<<<<<<
 *     """ Record the last callback call for a given line.
 *     """
 */

struct __pyx_obj_14_line_profiler_LastTime {
  PyObject_HEAD
  int f_lineno;
  PY_LONG_LONG time;
};

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":101
 * 
 * 
 * cdef class LineProfiler:             # <<<<<<<<<<<<<<
 *     """ Time the execution of lines of Python code.
 *     """
 */

struct __pyx_obj_14_line_profiler_LineProfiler {
  PyObject_HEAD
  PyObject *functions;
  PyObject *code_map;
  PyObject *last_time;
  double timer_unit;
  long enable_count;
};


/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":53
 * 
 * 
 * cdef class LineTiming:             # <<<<<<<<<<<<<<
 *     """ The timing for a single line.
 *     """
 */

struct __pyx_vtabstruct_14_line_profiler_LineTiming {
  PyObject *(*hit)(struct __pyx_obj_14_line_profiler_LineTiming *, PY_LONG_LONG);
};
static struct __pyx_vtabstruct_14_line_profiler_LineTiming *__pyx_vtabptr_14_line_profiler_LineTiming;
/* Module declarations from python25 */

/* Module declarations from _line_profiler */

static PyTypeObject *__pyx_ptype_14_line_profiler_LineTiming = 0;
static PyTypeObject *__pyx_ptype_14_line_profiler_LineProfiler = 0;
static PyTypeObject *__pyx_ptype_14_line_profiler_LastTime = 0;
static int __pyx_f_14_line_profiler_python_trace_callback(PyObject *, PyFrameObject *, int, PyObject *); /*proto*/


/* Implementation of _line_profiler */
static char __pyx_k_1[] = " Object to encapsulate line-profile statistics.\n\n    Attributes\n    ----------\n    timings : dict\n        Mapping from (filename, first_lineno, function_name) of the profiled\n        function to a list of (lineno, nhits, total_time) tuples for each\n        profiled line. total_time is an integer in the native units of the\n        timer.\n    unit : float\n        The number of seconds per timer unit.\n    ";
static PyObject *__pyx_int_0;
static char __pyx_k___init__[] = "__init__";
static PyObject *__pyx_kp___init__;
static char __pyx_k_astuple[] = "astuple";
static PyObject *__pyx_kp_astuple;
static char __pyx_k___repr__[] = "__repr__";
static PyObject *__pyx_kp___repr__;
static char __pyx_k_add_function[] = "add_function";
static PyObject *__pyx_kp_add_function;
static char __pyx_k_enable_by_count[] = "enable_by_count";
static PyObject *__pyx_kp_enable_by_count;
static char __pyx_k_disable_by_count[] = "disable_by_count";
static PyObject *__pyx_kp_disable_by_count;
static char __pyx_k___enter__[] = "__enter__";
static PyObject *__pyx_kp___enter__;
static char __pyx_k___exit__[] = "__exit__";
static PyObject *__pyx_kp___exit__;
static char __pyx_k_enable[] = "enable";
static PyObject *__pyx_kp_enable;
static char __pyx_k_disable[] = "disable";
static PyObject *__pyx_kp_disable;
static char __pyx_k_get_stats[] = "get_stats";
static PyObject *__pyx_kp_get_stats;
static char __pyx_k___cinit__[] = "__cinit__";
static PyObject *__pyx_kp___cinit__;
static char __pyx_k_code[] = "code";
static PyObject *__pyx_kp_code;
static char __pyx_k_lineno[] = "lineno";
static PyObject *__pyx_kp_lineno;
static char __pyx_k_self[] = "self";
static PyObject *__pyx_kp_self;
static char __pyx_k_timings[] = "timings";
static PyObject *__pyx_kp_timings;
static char __pyx_k_unit[] = "unit";
static PyObject *__pyx_kp_unit;
static char __pyx_k_func[] = "func";
static PyObject *__pyx_kp_func;
static char __pyx_k_exc_type[] = "exc_type";
static PyObject *__pyx_kp_exc_type;
static char __pyx_k_exc_val[] = "exc_val";
static PyObject *__pyx_kp_exc_val;
static char __pyx_k_exc_tb[] = "exc_tb";
static PyObject *__pyx_kp_exc_tb;
static char __pyx_k_f_lineno[] = "f_lineno";
static PyObject *__pyx_kp_f_lineno;
static char __pyx_k_time[] = "time";
static PyObject *__pyx_kp_time;
static char __pyx_k_LineStats[] = "LineStats";
static PyObject *__pyx_kp_LineStats;
static char __pyx_k_object[] = "object";
static PyObject *__pyx_kp_object;
static char __pyx_k_co_filename[] = "co_filename";
static PyObject *__pyx_kp_co_filename;
static char __pyx_k_co_firstlineno[] = "co_firstlineno";
static PyObject *__pyx_kp_co_firstlineno;
static char __pyx_k_co_name[] = "co_name";
static PyObject *__pyx_kp_co_name;
static char __pyx_k_func_code[] = "func_code";
static PyObject *__pyx_kp_func_code;
static char __pyx_k_AttributeError[] = "AttributeError";
static PyObject *__pyx_kp_AttributeError;
static char __pyx_k_warnings[] = "warnings";
static PyObject *__pyx_kp_warnings;
static char __pyx_k_warn[] = "warn";
static PyObject *__pyx_kp_warn;
static char __pyx_k_append[] = "append";
static PyObject *__pyx_kp_append;
static char __pyx_k_values[] = "values";
static PyObject *__pyx_kp_values;
static char __pyx_k_label[] = "label";
static PyObject *__pyx_kp_label;
static char __pyx_k_sort[] = "sort";
static PyObject *__pyx_kp_sort;
static char __pyx_k_code_map[] = "code_map";
static PyObject *__pyx_kp_code_map;
static char __pyx_k_last_time[] = "last_time";
static PyObject *__pyx_kp_last_time;
static PyObject *__pyx_kp_1;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_kp_2;
static char __pyx_k_2[] = "~";
static PyObject *__pyx_kp_3;
static char __pyx_k_3[] = "<LineTiming for %r\n  lineno: %r\n  nhits: %r\n  total_time: %r>";
static PyObject *__pyx_kp_4;
static char __pyx_k_4[] = "Could not extract a code object for the object %r";

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":41
 * 
 * 
 * def label(code):             # <<<<<<<<<<<<<<
 *     """ Return a (filename, first_lineno, func_name) tuple for a given code
 *     object.
 */

static PyObject *__pyx_pf_14_line_profiler_label(PyObject *__pyx_self, PyObject *__pyx_v_code); /*proto*/
static char __pyx_doc_14_line_profiler_label[] = " Return a (filename, first_lineno, func_name) tuple for a given code\n    object.\n\n    This is the same labelling as used by the cProfile module in Python 2.5.\n    ";
static PyObject *__pyx_pf_14_line_profiler_label(PyObject *__pyx_self, PyObject *__pyx_v_code) {
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  __pyx_self = __pyx_self;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":47
 *     This is the same labelling as used by the cProfile module in Python 2.5.
 *     """
 *     if isinstance(code, str):             # <<<<<<<<<<<<<<
 *         return ('~', 0, code)    # built-in functions ('~' sorts at the end)
 *     else:
 */
  __pyx_1 = PyObject_TypeCheck(__pyx_v_code, ((PyTypeObject *)((PyObject*)&PyString_Type))); 
  if (__pyx_1) {

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":48
 *     """
 *     if isinstance(code, str):
 *         return ('~', 0, code)    # built-in functions ('~' sorts at the end)             # <<<<<<<<<<<<<<
 *     else:
 *         return (code.co_filename, code.co_firstlineno, code.co_name)
 */
    __pyx_2 = PyTuple_New(3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    Py_INCREF(__pyx_kp_2);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_kp_2);
    Py_INCREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_int_0);
    Py_INCREF(__pyx_v_code);
    PyTuple_SET_ITEM(__pyx_2, 2, __pyx_v_code);
    __pyx_r = ((PyObject *)__pyx_2);
    __pyx_2 = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":50
 *         return ('~', 0, code)    # built-in functions ('~' sorts at the end)
 *     else:
 *         return (code.co_filename, code.co_firstlineno, code.co_name)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_code, __pyx_kp_co_filename); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_3 = PyObject_GetAttr(__pyx_v_code, __pyx_kp_co_firstlineno); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_4 = PyObject_GetAttr(__pyx_v_code, __pyx_kp_co_name); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_5 = PyTuple_New(3); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2);
    PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3);
    PyTuple_SET_ITEM(__pyx_5, 2, __pyx_4);
    __pyx_2 = 0;
    __pyx_3 = 0;
    __pyx_4 = 0;
    __pyx_r = ((PyObject *)__pyx_5);
    __pyx_5 = 0;
    goto __pyx_L0;
  }
  __pyx_L5:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("_line_profiler.label");
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":61
 *     cdef public long nhits
 * 
 *     def __init__(self, object code, int lineno):             # <<<<<<<<<<<<<<
 *         self.code = code
 *         self.lineno = lineno
 */

static int __pyx_pf_14_line_profiler_10LineTiming___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_14_line_profiler_10LineTiming___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_code = 0;
  int __pyx_v_lineno;
  int __pyx_r;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_code,&__pyx_kp_lineno,0};
  if (unlikely(__pyx_kwds)) {
    PyObject* values[2] = {0,0};
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_code);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_lineno);
      if (likely(values[1])) kw_args--;
      else {
        __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_code = values[0];
    __pyx_v_lineno = __pyx_PyInt_int(values[1]); if (unlikely((__pyx_v_lineno == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_code = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_lineno = __pyx_PyInt_int(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_lineno == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("_line_profiler.LineTiming.__init__");
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":62
 * 
 *     def __init__(self, object code, int lineno):
 *         self.code = code             # <<<<<<<<<<<<<<
 *         self.lineno = lineno
 *         self.total_time = 0
 */
  Py_INCREF(__pyx_v_code);
  Py_DECREF(((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_v_self)->code);
  ((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_v_self)->code = __pyx_v_code;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":63
 *     def __init__(self, object code, int lineno):
 *         self.code = code
 *         self.lineno = lineno             # <<<<<<<<<<<<<<
 *         self.total_time = 0
 *         self.nhits = 0
 */
  ((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_v_self)->lineno = __pyx_v_lineno;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":64
 *         self.code = code
 *         self.lineno = lineno
 *         self.total_time = 0             # <<<<<<<<<<<<<<
 *         self.nhits = 0
 * 
 */
  ((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_v_self)->total_time = 0;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":65
 *         self.lineno = lineno
 *         self.total_time = 0
 *         self.nhits = 0             # <<<<<<<<<<<<<<
 * 
 *     cdef hit(self, PY_LONG_LONG dt):
 */
  ((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_v_self)->nhits = 0;

  __pyx_r = 0;
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":67
 *         self.nhits = 0
 * 
 *     cdef hit(self, PY_LONG_LONG dt):             # <<<<<<<<<<<<<<
 *         """ Record a line timing.
 *         """
 */

static  PyObject *__pyx_f_14_line_profiler_10LineTiming_hit(struct __pyx_obj_14_line_profiler_LineTiming *__pyx_v_self, PY_LONG_LONG __pyx_v_dt) {
  PyObject *__pyx_r;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":70
 *         """ Record a line timing.
 *         """
 *         self.nhits += 1             # <<<<<<<<<<<<<<
 *         self.total_time += <long>dt
 * 
 */
  __pyx_v_self->nhits += 1;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":71
 *         """
 *         self.nhits += 1
 *         self.total_time += <long>dt             # <<<<<<<<<<<<<<
 * 
 *     def astuple(self):
 */
  __pyx_v_self->total_time += ((long)__pyx_v_dt);

  __pyx_r = Py_None; Py_INCREF(Py_None);
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":73
 *         self.total_time += <long>dt
 * 
 *     def astuple(self):             # <<<<<<<<<<<<<<
 *         """ Convert to a tuple of (lineno, nhits, total_time).
 *         """
 */

static PyObject *__pyx_pf_14_line_profiler_10LineTiming_astuple(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static char __pyx_doc_14_line_profiler_10LineTiming_astuple[] = " Convert to a tuple of (lineno, nhits, total_time).\n        ";
static PyObject *__pyx_pf_14_line_profiler_10LineTiming_astuple(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":76
 *         """ Convert to a tuple of (lineno, nhits, total_time).
 *         """
 *         return (self.lineno, self.nhits, self.total_time)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_v_self)->lineno); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_2 = PyInt_FromLong(((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_v_self)->nhits); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_3 = PyInt_FromLong(((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_v_self)->total_time); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_4 = PyTuple_New(3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
  PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2);
  PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3);
  __pyx_1 = 0;
  __pyx_2 = 0;
  __pyx_3 = 0;
  __pyx_r = ((PyObject *)__pyx_4);
  __pyx_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("_line_profiler.LineTiming.astuple");
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":78
 *         return (self.lineno, self.nhits, self.total_time)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<LineTiming for %r\n  lineno: %r\n  nhits: %r\n  total_time: %r>' % (self.code, self.lineno, self.nhits, <long>self.total_time)
 * 
 */

static PyObject *__pyx_pf_14_line_profiler_10LineTiming___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_14_line_profiler_10LineTiming___repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_t_1 = NULL;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":79
 * 
 *     def __repr__(self):
 *         return '<LineTiming for %r\n  lineno: %r\n  nhits: %r\n  total_time: %r>' % (self.code, self.lineno, self.nhits, <long>self.total_time)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_v_self)->lineno); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_2 = PyInt_FromLong(((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_v_self)->nhits); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_3 = PyInt_FromLong(((long)((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_v_self)->total_time)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_4 = PyTuple_New(4); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_INCREF(((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_v_self)->code);
  PyTuple_SET_ITEM(__pyx_4, 0, ((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_v_self)->code);
  PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1);
  PyTuple_SET_ITEM(__pyx_4, 2, __pyx_2);
  PyTuple_SET_ITEM(__pyx_4, 3, __pyx_3);
  __pyx_1 = 0;
  __pyx_2 = 0;
  __pyx_3 = 0;
  __pyx_t_1 = PyNumber_Remainder(__pyx_kp_3, ((PyObject *)__pyx_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("_line_profiler.LineTiming.__repr__");
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":96
 *         The number of seconds per timer unit.
 *     """
 *     def __init__(self, timings, unit):             # <<<<<<<<<<<<<<
 *         self.timings = timings
 *         self.unit = unit
 */

static PyObject *__pyx_pf_14_line_profiler_9LineStats___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_14_line_profiler_9LineStats___init__ = {"__init__", (PyCFunction)__pyx_pf_14_line_profiler_9LineStats___init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pf_14_line_profiler_9LineStats___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_timings = 0;
  PyObject *__pyx_v_unit = 0;
  PyObject *__pyx_r;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_self,&__pyx_kp_timings,&__pyx_kp_unit,0};
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds)) {
    PyObject* values[3] = {0,0,0};
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_self);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_timings);
      if (likely(values[1])) kw_args--;
      else {
        __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      case  2:
      values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_unit);
      if (likely(values[2])) kw_args--;
      else {
        __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_self = values[0];
    __pyx_v_timings = values[1];
    __pyx_v_unit = values[2];
  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_self = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_timings = PyTuple_GET_ITEM(__pyx_args, 1);
    __pyx_v_unit = PyTuple_GET_ITEM(__pyx_args, 2);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("_line_profiler.LineStats.__init__");
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":97
 *     """
 *     def __init__(self, timings, unit):
 *         self.timings = timings             # <<<<<<<<<<<<<<
 *         self.unit = unit
 * 
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_kp_timings, __pyx_v_timings) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":98
 *     def __init__(self, timings, unit):
 *         self.timings = timings
 *         self.unit = unit             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyObject_SetAttr(__pyx_v_self, __pyx_kp_unit, __pyx_v_unit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("_line_profiler.LineStats.__init__");
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":110
 *     cdef public long enable_count
 * 
 *     def __init__(self, *functions):             # <<<<<<<<<<<<<<
 *         self.functions = []
 *         self.code_map = {}
 */

static int __pyx_pf_14_line_profiler_12LineProfiler___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_14_line_profiler_12LineProfiler___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_functions = 0;
  PyObject *__pyx_v_func;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  Py_ssize_t __pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  Py_INCREF(__pyx_args);
  __pyx_v_functions = __pyx_args;
  __pyx_v_func = Py_None; Py_INCREF(Py_None);

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":111
 * 
 *     def __init__(self, *functions):
 *         self.functions = []             # <<<<<<<<<<<<<<
 *         self.code_map = {}
 *         self.last_time = {}
 */
  __pyx_1 = PyList_New(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->functions);
  ((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->functions = ((PyObject *)__pyx_1);
  __pyx_1 = 0;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":112
 *     def __init__(self, *functions):
 *         self.functions = []
 *         self.code_map = {}             # <<<<<<<<<<<<<<
 *         self.last_time = {}
 *         self.timer_unit = hpTimerUnit()
 */
  __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->code_map);
  ((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->code_map = ((PyObject *)__pyx_1);
  __pyx_1 = 0;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":113
 *         self.functions = []
 *         self.code_map = {}
 *         self.last_time = {}             # <<<<<<<<<<<<<<
 *         self.timer_unit = hpTimerUnit()
 *         self.enable_count = 0
 */
  __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->last_time);
  ((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->last_time = ((PyObject *)__pyx_1);
  __pyx_1 = 0;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":114
 *         self.code_map = {}
 *         self.last_time = {}
 *         self.timer_unit = hpTimerUnit()             # <<<<<<<<<<<<<<
 *         self.enable_count = 0
 *         for func in functions:
 */
  ((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->timer_unit = hpTimerUnit();

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":115
 *         self.last_time = {}
 *         self.timer_unit = hpTimerUnit()
 *         self.enable_count = 0             # <<<<<<<<<<<<<<
 *         for func in functions:
 *             self.add_function(func)
 */
  ((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->enable_count = 0;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":116
 *         self.timer_unit = hpTimerUnit()
 *         self.enable_count = 0
 *         for func in functions:             # <<<<<<<<<<<<<<
 *             self.add_function(func)
 * 
 */
  if (PyList_CheckExact(__pyx_v_functions) || PyTuple_CheckExact(__pyx_v_functions)) {
    __pyx_2 = 0; __pyx_1 = __pyx_v_functions; Py_INCREF(__pyx_1);
  } else {
    __pyx_2 = -1; __pyx_1 = PyObject_GetIter(__pyx_v_functions); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (likely(PyList_CheckExact(__pyx_1))) {
      if (__pyx_2 >= PyList_GET_SIZE(__pyx_1)) break;
      __pyx_3 = PyList_GET_ITEM(__pyx_1, __pyx_2); Py_INCREF(__pyx_3); __pyx_2++;
    } else if (likely(PyTuple_CheckExact(__pyx_1))) {
      if (__pyx_2 >= PyTuple_GET_SIZE(__pyx_1)) break;
      __pyx_3 = PyTuple_GET_ITEM(__pyx_1, __pyx_2); Py_INCREF(__pyx_3); __pyx_2++;
    } else {
      __pyx_3 = PyIter_Next(__pyx_1);
      if (!__pyx_3) {
        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        break;
      }
    }
    Py_DECREF(__pyx_v_func);
    __pyx_v_func = __pyx_3;
    __pyx_3 = 0;

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":117
 *         self.enable_count = 0
 *         for func in functions:
 *             self.add_function(func)             # <<<<<<<<<<<<<<
 * 
 *     def add_function(self, func):
 */
    __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_add_function); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    Py_INCREF(__pyx_v_func);
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_func);
    __pyx_5 = PyObject_Call(__pyx_3, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
  }
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("_line_profiler.LineProfiler.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_functions);
  Py_DECREF(__pyx_v_func);
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":119
 *             self.add_function(func)
 * 
 *     def add_function(self, func):             # <<<<<<<<<<<<<<
 *         """ Record line profiling information for the given Python function.
 *         """
 */

static PyObject *__pyx_pf_14_line_profiler_12LineProfiler_add_function(PyObject *__pyx_v_self, PyObject *__pyx_v_func); /*proto*/
static char __pyx_doc_14_line_profiler_12LineProfiler_add_function[] = " Record line profiling information for the given Python function.\n        ";
static PyObject *__pyx_pf_14_line_profiler_12LineProfiler_add_function(PyObject *__pyx_v_self, PyObject *__pyx_v_func) {
  PyObject *__pyx_v_code;
  PyObject *__pyx_v_warnings;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  int __pyx_2;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  PyObject *__pyx_7 = 0;
  int __pyx_8;
  PyObject *__pyx_t_1 = NULL;
  __pyx_v_code = Py_None; Py_INCREF(Py_None);
  __pyx_v_warnings = Py_None; Py_INCREF(Py_None);

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":122
 *         """ Record line profiling information for the given Python function.
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             code = func.func_code
 *         except AttributeError:
 */
  {
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
    /*try:*/ {

      /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":123
 *         """
 *         try:
 *             code = func.func_code             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             import warnings
 */
      __pyx_1 = PyObject_GetAttr(__pyx_v_func, __pyx_kp_func_code); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      Py_DECREF(__pyx_v_code);
      __pyx_v_code = __pyx_1;
      __pyx_1 = 0;
    }
    Py_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
    Py_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
    Py_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
    goto __pyx_L10_try;
    __pyx_L5_error:;
    Py_XDECREF(__pyx_1); __pyx_1 = 0;

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":124
 *         try:
 *             code = func.func_code
 *         except AttributeError:             # <<<<<<<<<<<<<<
 *             import warnings
 *             warnings.warn("Could not extract a code object for the object %r" % (func,))
 */
    __pyx_2 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_2) {
      __Pyx_AddTraceback("_line_profiler.add_function");
      if (__Pyx_GetException(&__pyx_1, &__pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}

      /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":125
 *             code = func.func_code
 *         except AttributeError:
 *             import warnings             # <<<<<<<<<<<<<<
 *             warnings.warn("Could not extract a code object for the object %r" % (func,))
 *             return
 */
      __pyx_5 = __Pyx_Import(__pyx_kp_warnings, 0); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      Py_DECREF(__pyx_v_warnings);
      __pyx_v_warnings = __pyx_5;
      __pyx_5 = 0;

      /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":126
 *         except AttributeError:
 *             import warnings
 *             warnings.warn("Could not extract a code object for the object %r" % (func,))             # <<<<<<<<<<<<<<
 *             return
 *         if code not in self.code_map:
 */
      __pyx_5 = PyObject_GetAttr(__pyx_v_warnings, __pyx_kp_warn); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      Py_INCREF(__pyx_v_func);
      PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_func);
      __pyx_t_1 = PyNumber_Remainder(__pyx_kp_4, ((PyObject *)__pyx_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      Py_DECREF(((PyObject *)__pyx_6)); __pyx_6 = 0;
      __pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      PyTuple_SET_ITEM(__pyx_6, 0, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_7 = PyObject_Call(__pyx_5, ((PyObject *)__pyx_6), NULL); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      Py_DECREF(((PyObject *)__pyx_6)); __pyx_6 = 0;
      Py_DECREF(__pyx_7); __pyx_7 = 0;

      /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":127
 *             import warnings
 *             warnings.warn("Could not extract a code object for the object %r" % (func,))
 *             return             # <<<<<<<<<<<<<<
 *         if code not in self.code_map:
 *             self.code_map[code] = {}
 */
      __pyx_r = Py_None; Py_INCREF(Py_None);
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      goto __pyx_L8_except_return;
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      goto __pyx_L6_exception_handled;
    }
    __pyx_L7_except_error:;
    Py_XDECREF(__pyx_save_exc_type);
    Py_XDECREF(__pyx_save_exc_value);
    Py_XDECREF(__pyx_save_exc_tb);
    goto __pyx_L1_error;
    __pyx_L8_except_return:;
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    goto __pyx_L0;
    __pyx_L6_exception_handled:;
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
    __pyx_L10_try:;
  }

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":128
 *             warnings.warn("Could not extract a code object for the object %r" % (func,))
 *             return
 *         if code not in self.code_map:             # <<<<<<<<<<<<<<
 *             self.code_map[code] = {}
 *             self.functions.append(func)
 */
  __pyx_8 = (!PySequence_Contains(((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->code_map, __pyx_v_code)); if (unlikely(__pyx_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_8) {

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":129
 *             return
 *         if code not in self.code_map:
 *             self.code_map[code] = {}             # <<<<<<<<<<<<<<
 *             self.functions.append(func)
 * 
 */
    __pyx_5 = PyDict_New(); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyObject_SetItem(((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->code_map, __pyx_v_code, ((PyObject *)__pyx_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    Py_DECREF(((PyObject *)__pyx_5)); __pyx_5 = 0;

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":130
 *         if code not in self.code_map:
 *             self.code_map[code] = {}
 *             self.functions.append(func)             # <<<<<<<<<<<<<<
 * 
 *     def enable_by_count(self):
 */
    __pyx_6 = __Pyx_PyObject_Append(((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->functions, __pyx_v_func); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    goto __pyx_L11;
  }
  __pyx_L11:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  Py_XDECREF(__pyx_7);
  __Pyx_AddTraceback("_line_profiler.LineProfiler.add_function");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_DECREF(__pyx_v_code);
  Py_DECREF(__pyx_v_warnings);
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":132
 *             self.functions.append(func)
 * 
 *     def enable_by_count(self):             # <<<<<<<<<<<<<<
 *         """ Enable the profiler if it hasn't been enabled before.
 *         """
 */

static PyObject *__pyx_pf_14_line_profiler_12LineProfiler_enable_by_count(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static char __pyx_doc_14_line_profiler_12LineProfiler_enable_by_count[] = " Enable the profiler if it hasn't been enabled before.\n        ";
static PyObject *__pyx_pf_14_line_profiler_12LineProfiler_enable_by_count(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":135
 *         """ Enable the profiler if it hasn't been enabled before.
 *         """
 *         if self.enable_count == 0:             # <<<<<<<<<<<<<<
 *             self.enable()
 *         self.enable_count += 1
 */
  __pyx_1 = (((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->enable_count == 0);
  if (__pyx_1) {

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":136
 *         """
 *         if self.enable_count == 0:
 *             self.enable()             # <<<<<<<<<<<<<<
 *         self.enable_count += 1
 * 
 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_enable); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_3 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":137
 *         if self.enable_count == 0:
 *             self.enable()
 *         self.enable_count += 1             # <<<<<<<<<<<<<<
 * 
 *     def disable_by_count(self):
 */
  ((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->enable_count += 1;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("_line_profiler.LineProfiler.enable_by_count");
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":139
 *         self.enable_count += 1
 * 
 *     def disable_by_count(self):             # <<<<<<<<<<<<<<
 *         """ Disable the profiler if the number of disable requests matches the
 *         number of enable requests.
 */

static PyObject *__pyx_pf_14_line_profiler_12LineProfiler_disable_by_count(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static char __pyx_doc_14_line_profiler_12LineProfiler_disable_by_count[] = " Disable the profiler if the number of disable requests matches the\n        number of enable requests.\n        ";
static PyObject *__pyx_pf_14_line_profiler_12LineProfiler_disable_by_count(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":143
 *         number of enable requests.
 *         """
 *         if self.enable_count > 0:             # <<<<<<<<<<<<<<
 *             self.enable_count -= 1
 *             if self.enable_count == 0:
 */
  __pyx_1 = (((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->enable_count > 0);
  if (__pyx_1) {

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":144
 *         """
 *         if self.enable_count > 0:
 *             self.enable_count -= 1             # <<<<<<<<<<<<<<
 *             if self.enable_count == 0:
 *                 self.disable()
 */
    ((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->enable_count -= 1;

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":145
 *         if self.enable_count > 0:
 *             self.enable_count -= 1
 *             if self.enable_count == 0:             # <<<<<<<<<<<<<<
 *                 self.disable()
 * 
 */
    __pyx_1 = (((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->enable_count == 0);
    if (__pyx_1) {

      /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":146
 *             self.enable_count -= 1
 *             if self.enable_count == 0:
 *                 self.disable()             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
 */
      __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_disable); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_3 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      goto __pyx_L6;
    }
    __pyx_L6:;
    goto __pyx_L5;
  }
  __pyx_L5:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("_line_profiler.LineProfiler.disable_by_count");
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":148
 *                 self.disable()
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         self.enable_by_count()
 * 
 */

static PyObject *__pyx_pf_14_line_profiler_12LineProfiler___enter__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_14_line_profiler_12LineProfiler___enter__(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":149
 * 
 *     def __enter__(self):
 *         self.enable_by_count()             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):
 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_enable_by_count); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_2 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("_line_profiler.LineProfiler.__enter__");
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":151
 *         self.enable_by_count()
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):             # <<<<<<<<<<<<<<
 *         self.disable_by_count()
 * 
 */

static PyObject *__pyx_pf_14_line_profiler_12LineProfiler___exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_14_line_profiler_12LineProfiler___exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_exc_type = 0;
  PyObject *__pyx_v_exc_val = 0;
  PyObject *__pyx_v_exc_tb = 0;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_exc_type,&__pyx_kp_exc_val,&__pyx_kp_exc_tb,0};
  if (unlikely(__pyx_kwds)) {
    PyObject* values[3] = {0,0,0};
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_exc_type);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_exc_val);
      if (likely(values[1])) kw_args--;
      else {
        __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      case  2:
      values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_exc_tb);
      if (likely(values[2])) kw_args--;
      else {
        __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_exc_type = values[0];
    __pyx_v_exc_val = values[1];
    __pyx_v_exc_tb = values[2];
  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_exc_type = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_exc_val = PyTuple_GET_ITEM(__pyx_args, 1);
    __pyx_v_exc_tb = PyTuple_GET_ITEM(__pyx_args, 2);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("_line_profiler.LineProfiler.__exit__");
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":152
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):
 *         self.disable_by_count()             # <<<<<<<<<<<<<<
 * 
 *     def enable(self):
 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_disable_by_count); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_2 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("_line_profiler.LineProfiler.__exit__");
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":154
 *         self.disable_by_count()
 * 
 *     def enable(self):             # <<<<<<<<<<<<<<
 *         PyEval_SetTrace(python_trace_callback, self)
 * 
 */

static PyObject *__pyx_pf_14_line_profiler_12LineProfiler_enable(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_14_line_profiler_12LineProfiler_enable(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":155
 * 
 *     def enable(self):
 *         PyEval_SetTrace(python_trace_callback, self)             # <<<<<<<<<<<<<<
 * 
 *     def disable(self):
 */
  PyEval_SetTrace(__pyx_f_14_line_profiler_python_trace_callback, __pyx_v_self);

  __pyx_r = Py_None; Py_INCREF(Py_None);
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":157
 *         PyEval_SetTrace(python_trace_callback, self)
 * 
 *     def disable(self):             # <<<<<<<<<<<<<<
 *         self.last_time = {}
 *         PyEval_SetTrace(NULL, <object>NULL)
 */

static PyObject *__pyx_pf_14_line_profiler_12LineProfiler_disable(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_14_line_profiler_12LineProfiler_disable(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":158
 * 
 *     def disable(self):
 *         self.last_time = {}             # <<<<<<<<<<<<<<
 *         PyEval_SetTrace(NULL, <object>NULL)
 * 
 */
  __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->last_time);
  ((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->last_time = ((PyObject *)__pyx_1);
  __pyx_1 = 0;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":159
 *     def disable(self):
 *         self.last_time = {}
 *         PyEval_SetTrace(NULL, <object>NULL)             # <<<<<<<<<<<<<<
 * 
 *     def get_stats(self):
 */
  PyEval_SetTrace(NULL, ((PyObject *)NULL));

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  Py_XDECREF(__pyx_1);
  __Pyx_AddTraceback("_line_profiler.LineProfiler.disable");
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":161
 *         PyEval_SetTrace(NULL, <object>NULL)
 * 
 *     def get_stats(self):             # <<<<<<<<<<<<<<
 *         """ Return a LineStats object containing the timings.
 *         """
 */

static PyObject *__pyx_pf_14_line_profiler_12LineProfiler_get_stats(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static char __pyx_doc_14_line_profiler_12LineProfiler_get_stats[] = " Return a LineStats object containing the timings.\n        ";
static PyObject *__pyx_pf_14_line_profiler_12LineProfiler_get_stats(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_v_stats;
  PyObject *__pyx_v_code;
  PyObject *__pyx_v_entries;
  PyObject *__pyx_v_key;
  PyObject *__pyx_v_e;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  Py_ssize_t __pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  Py_ssize_t __pyx_6 = 0;
  PyObject *__pyx_7 = 0;
  int __pyx_8;
  __pyx_v_stats = Py_None; Py_INCREF(Py_None);
  __pyx_v_code = Py_None; Py_INCREF(Py_None);
  __pyx_v_entries = Py_None; Py_INCREF(Py_None);
  __pyx_v_key = Py_None; Py_INCREF(Py_None);
  __pyx_v_e = Py_None; Py_INCREF(Py_None);

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":164
 *         """ Return a LineStats object containing the timings.
 *         """
 *         stats = {}             # <<<<<<<<<<<<<<
 *         for code in self.code_map:
 *             entries = self.code_map[code].values()
 */
  __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_v_stats);
  __pyx_v_stats = ((PyObject *)__pyx_1);
  __pyx_1 = 0;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":165
 *         """
 *         stats = {}
 *         for code in self.code_map:             # <<<<<<<<<<<<<<
 *             entries = self.code_map[code].values()
 *             key = label(code)
 */
  if (PyList_CheckExact(((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->code_map) || PyTuple_CheckExact(((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->code_map)) {
    __pyx_2 = 0; __pyx_1 = ((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->code_map; Py_INCREF(__pyx_1);
  } else {
    __pyx_2 = -1; __pyx_1 = PyObject_GetIter(((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->code_map); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (likely(PyList_CheckExact(__pyx_1))) {
      if (__pyx_2 >= PyList_GET_SIZE(__pyx_1)) break;
      __pyx_3 = PyList_GET_ITEM(__pyx_1, __pyx_2); Py_INCREF(__pyx_3); __pyx_2++;
    } else if (likely(PyTuple_CheckExact(__pyx_1))) {
      if (__pyx_2 >= PyTuple_GET_SIZE(__pyx_1)) break;
      __pyx_3 = PyTuple_GET_ITEM(__pyx_1, __pyx_2); Py_INCREF(__pyx_3); __pyx_2++;
    } else {
      __pyx_3 = PyIter_Next(__pyx_1);
      if (!__pyx_3) {
        if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        break;
      }
    }
    Py_DECREF(__pyx_v_code);
    __pyx_v_code = __pyx_3;
    __pyx_3 = 0;

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":166
 *         stats = {}
 *         for code in self.code_map:
 *             entries = self.code_map[code].values()             # <<<<<<<<<<<<<<
 *             key = label(code)
 *             stats[key] = [e.astuple() for e in entries]
 */
    __pyx_3 = PyObject_GetItem(((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->code_map, __pyx_v_code); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_kp_values); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_3 = PyObject_Call(__pyx_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_v_entries);
    __pyx_v_entries = __pyx_3;
    __pyx_3 = 0;

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":167
 *         for code in self.code_map:
 *             entries = self.code_map[code].values()
 *             key = label(code)             # <<<<<<<<<<<<<<
 *             stats[key] = [e.astuple() for e in entries]
 *             stats[key].sort()
 */
    __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_label); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    Py_INCREF(__pyx_v_code);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_code);
    __pyx_5 = PyObject_Call(__pyx_4, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
    Py_DECREF(__pyx_v_key);
    __pyx_v_key = __pyx_5;
    __pyx_5 = 0;

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":168
 *             entries = self.code_map[code].values()
 *             key = label(code)
 *             stats[key] = [e.astuple() for e in entries]             # <<<<<<<<<<<<<<
 *             stats[key].sort()
 *         return LineStats(stats, self.timer_unit)
 */
    __pyx_4 = PyList_New(0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyList_CheckExact(__pyx_v_entries) || PyTuple_CheckExact(__pyx_v_entries)) {
      __pyx_6 = 0; __pyx_3 = __pyx_v_entries; Py_INCREF(__pyx_3);
    } else {
      __pyx_6 = -1; __pyx_3 = PyObject_GetIter(__pyx_v_entries); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    for (;;) {
      if (likely(PyList_CheckExact(__pyx_3))) {
        if (__pyx_6 >= PyList_GET_SIZE(__pyx_3)) break;
        __pyx_5 = PyList_GET_ITEM(__pyx_3, __pyx_6); Py_INCREF(__pyx_5); __pyx_6++;
      } else if (likely(PyTuple_CheckExact(__pyx_3))) {
        if (__pyx_6 >= PyTuple_GET_SIZE(__pyx_3)) break;
        __pyx_5 = PyTuple_GET_ITEM(__pyx_3, __pyx_6); Py_INCREF(__pyx_5); __pyx_6++;
      } else {
        __pyx_5 = PyIter_Next(__pyx_3);
        if (!__pyx_5) {
          if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          break;
        }
      }
      Py_DECREF(__pyx_v_e);
      __pyx_v_e = __pyx_5;
      __pyx_5 = 0;
      __pyx_5 = PyObject_GetAttr(__pyx_v_e, __pyx_kp_astuple); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_7 = PyObject_Call(__pyx_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_8 = PyList_Append(__pyx_4, (PyObject*)__pyx_7); if (unlikely(__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;
    }
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    if (PyObject_SetItem(__pyx_v_stats, __pyx_v_key, ((PyObject *)__pyx_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0;

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":169
 *             key = label(code)
 *             stats[key] = [e.astuple() for e in entries]
 *             stats[key].sort()             # <<<<<<<<<<<<<<
 *         return LineStats(stats, self.timer_unit)
 * 
 */
    __pyx_5 = PyObject_GetItem(__pyx_v_stats, __pyx_v_key); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_7 = PyObject_GetAttr(__pyx_5, __pyx_kp_sort); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_3 = PyObject_Call(__pyx_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
  }
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":170
 *             stats[key] = [e.astuple() for e in entries]
 *             stats[key].sort()
 *         return LineStats(stats, self.timer_unit)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_LineStats); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_5 = PyFloat_FromDouble(((struct __pyx_obj_14_line_profiler_LineProfiler *)__pyx_v_self)->timer_unit); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_7 = PyTuple_New(2); if (unlikely(!__pyx_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_INCREF(__pyx_v_stats);
  PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_stats);
  PyTuple_SET_ITEM(__pyx_7, 1, __pyx_5);
  __pyx_5 = 0;
  __pyx_3 = PyObject_Call(__pyx_4, ((PyObject *)__pyx_7), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  Py_DECREF(((PyObject *)__pyx_7)); __pyx_7 = 0;
  __pyx_r = __pyx_3;
  __pyx_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_7);
  __Pyx_AddTraceback("_line_profiler.LineProfiler.get_stats");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_DECREF(__pyx_v_stats);
  Py_DECREF(__pyx_v_code);
  Py_DECREF(__pyx_v_entries);
  Py_DECREF(__pyx_v_key);
  Py_DECREF(__pyx_v_e);
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":179
 *     cdef PY_LONG_LONG time
 * 
 *     def __cinit__(self, int f_lineno, PY_LONG_LONG time):             # <<<<<<<<<<<<<<
 *         self.f_lineno = f_lineno
 *         self.time = time
 */

static int __pyx_pf_14_line_profiler_8LastTime___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_14_line_profiler_8LastTime___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_f_lineno;
  PY_LONG_LONG __pyx_v_time;
  int __pyx_r;
  static PyObject **__pyx_pyargnames[] = {&__pyx_kp_f_lineno,&__pyx_kp_time,0};
  if (unlikely(__pyx_kwds)) {
    PyObject* values[2] = {0,0};
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      case  0: break;
      default: goto __pyx_L5_argtuple_error;
    }
    switch (PyTuple_GET_SIZE(__pyx_args)) {
      case  0:
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_f_lineno);
      if (likely(values[0])) kw_args--;
      else goto __pyx_L5_argtuple_error;
      case  1:
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_time);
      if (likely(values[1])) kw_args--;
      else {
        __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    }
    if (unlikely(kw_args > 0)) {
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __pyx_v_f_lineno = __pyx_PyInt_int(values[0]); if (unlikely((__pyx_v_f_lineno == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_time = __pyx_PyInt_AsLongLong(values[1]); if (unlikely((__pyx_v_time == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
    goto __pyx_L5_argtuple_error;
  } else {
    __pyx_v_f_lineno = __pyx_PyInt_int(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_f_lineno == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_time = __pyx_PyInt_AsLongLong(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_time == (PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("_line_profiler.LastTime.__cinit__");
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":180
 * 
 *     def __cinit__(self, int f_lineno, PY_LONG_LONG time):
 *         self.f_lineno = f_lineno             # <<<<<<<<<<<<<<
 *         self.time = time
 * 
 */
  ((struct __pyx_obj_14_line_profiler_LastTime *)__pyx_v_self)->f_lineno = __pyx_v_f_lineno;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":181
 *     def __cinit__(self, int f_lineno, PY_LONG_LONG time):
 *         self.f_lineno = f_lineno
 *         self.time = time             # <<<<<<<<<<<<<<
 * 
 * 
 */
  ((struct __pyx_obj_14_line_profiler_LastTime *)__pyx_v_self)->time = __pyx_v_time;

  __pyx_r = 0;
  return __pyx_r;
}

/* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":184
 * 
 * 
 * cdef int python_trace_callback(object self, PyFrameObject *py_frame, int what,             # <<<<<<<<<<<<<<
 *     object arg):
 *     """ The PyEval_SetTrace() callback.
 */

static  int __pyx_f_14_line_profiler_python_trace_callback(PyObject *__pyx_v_self, PyFrameObject *__pyx_v_py_frame, int __pyx_v_what, PyObject *__pyx_v_arg) {
  PyObject *__pyx_v_code;
  PyObject *__pyx_v_line_entries;
  PyObject *__pyx_v_key;
  struct __pyx_obj_14_line_profiler_LineTiming *__pyx_v_entry;
  struct __pyx_obj_14_line_profiler_LastTime *__pyx_v_old;
  PY_LONG_LONG __pyx_v_time;
  int __pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  __pyx_v_code = Py_None; Py_INCREF(Py_None);
  __pyx_v_line_entries = Py_None; Py_INCREF(Py_None);
  __pyx_v_key = Py_None; Py_INCREF(Py_None);
  __pyx_v_entry = ((struct __pyx_obj_14_line_profiler_LineTiming *)Py_None); Py_INCREF(Py_None);
  __pyx_v_old = ((struct __pyx_obj_14_line_profiler_LastTime *)Py_None); Py_INCREF(Py_None);

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":193
 *     cdef PY_LONG_LONG time
 * 
 *     if what == PyTrace_LINE or what == PyTrace_RETURN:             # <<<<<<<<<<<<<<
 *         code = <object>py_frame.f_code
 *         if code in self.code_map:
 */
  __pyx_1 = (__pyx_v_what == PyTrace_LINE);
  if (!__pyx_1) {
    __pyx_1 = (__pyx_v_what == PyTrace_RETURN);
  }
  if (__pyx_1) {

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":194
 * 
 *     if what == PyTrace_LINE or what == PyTrace_RETURN:
 *         code = <object>py_frame.f_code             # <<<<<<<<<<<<<<
 *         if code in self.code_map:
 *             time = hpTimer()
 */
    Py_INCREF(((PyObject *)__pyx_v_py_frame->f_code));
    Py_DECREF(__pyx_v_code);
    __pyx_v_code = ((PyObject *)__pyx_v_py_frame->f_code);

    /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":195
 *     if what == PyTrace_LINE or what == PyTrace_RETURN:
 *         code = <object>py_frame.f_code
 *         if code in self.code_map:             # <<<<<<<<<<<<<<
 *             time = hpTimer()
 *             if code in self.last_time:
 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_code_map); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_1 = (PySequence_Contains(__pyx_2, __pyx_v_code)); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (__pyx_1) {

      /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":196
 *         code = <object>py_frame.f_code
 *         if code in self.code_map:
 *             time = hpTimer()             # <<<<<<<<<<<<<<
 *             if code in self.last_time:
 *                 old = self.last_time[code]
 */
      __pyx_v_time = hpTimer();

      /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":197
 *         if code in self.code_map:
 *             time = hpTimer()
 *             if code in self.last_time:             # <<<<<<<<<<<<<<
 *                 old = self.last_time[code]
 *                 line_entries = self.code_map[code]
 */
      __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_last_time); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_1 = (PySequence_Contains(__pyx_2, __pyx_v_code)); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      if (__pyx_1) {

        /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":198
 *             time = hpTimer()
 *             if code in self.last_time:
 *                 old = self.last_time[code]             # <<<<<<<<<<<<<<
 *                 line_entries = self.code_map[code]
 *                 key = old.f_lineno
 */
        __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_last_time); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_3 = PyObject_GetItem(__pyx_2, __pyx_v_code); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        if (!(__Pyx_TypeTest(__pyx_3, __pyx_ptype_14_line_profiler_LastTime))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        Py_DECREF(((PyObject *)__pyx_v_old));
        __pyx_v_old = ((struct __pyx_obj_14_line_profiler_LastTime *)__pyx_3);
        __pyx_3 = 0;

        /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":199
 *             if code in self.last_time:
 *                 old = self.last_time[code]
 *                 line_entries = self.code_map[code]             # <<<<<<<<<<<<<<
 *                 key = old.f_lineno
 *                 if key not in line_entries:
 */
        __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_code_map); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_3 = PyObject_GetItem(__pyx_2, __pyx_v_code); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        Py_DECREF(__pyx_v_line_entries);
        __pyx_v_line_entries = __pyx_3;
        __pyx_3 = 0;

        /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":200
 *                 old = self.last_time[code]
 *                 line_entries = self.code_map[code]
 *                 key = old.f_lineno             # <<<<<<<<<<<<<<
 *                 if key not in line_entries:
 *                     entry = LineTiming(code, old.f_lineno)
 */
        __pyx_2 = PyInt_FromLong(__pyx_v_old->f_lineno); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        Py_DECREF(__pyx_v_key);
        __pyx_v_key = __pyx_2;
        __pyx_2 = 0;

        /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":201
 *                 line_entries = self.code_map[code]
 *                 key = old.f_lineno
 *                 if key not in line_entries:             # <<<<<<<<<<<<<<
 *                     entry = LineTiming(code, old.f_lineno)
 *                     line_entries[key] = entry
 */
        __pyx_1 = (!PySequence_Contains(__pyx_v_line_entries, __pyx_v_key)); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_1) {

          /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":202
 *                 key = old.f_lineno
 *                 if key not in line_entries:
 *                     entry = LineTiming(code, old.f_lineno)             # <<<<<<<<<<<<<<
 *                     line_entries[key] = entry
 *                 else:
 */
          __pyx_3 = PyInt_FromLong(__pyx_v_old->f_lineno); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_2 = PyTuple_New(2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          Py_INCREF(__pyx_v_code);
          PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_code);
          PyTuple_SET_ITEM(__pyx_2, 1, __pyx_3);
          __pyx_3 = 0;
          __pyx_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_14_line_profiler_LineTiming)), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
          if (!(__Pyx_TypeTest(__pyx_3, __pyx_ptype_14_line_profiler_LineTiming))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          Py_DECREF(((PyObject *)__pyx_v_entry));
          __pyx_v_entry = ((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_3);
          __pyx_3 = 0;

          /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":203
 *                 if key not in line_entries:
 *                     entry = LineTiming(code, old.f_lineno)
 *                     line_entries[key] = entry             # <<<<<<<<<<<<<<
 *                 else:
 *                     entry = line_entries[key]
 */
          if (PyObject_SetItem(__pyx_v_line_entries, __pyx_v_key, ((PyObject *)__pyx_v_entry)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L6;
        }
        /*else*/ {

          /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":205
 *                     line_entries[key] = entry
 *                 else:
 *                     entry = line_entries[key]             # <<<<<<<<<<<<<<
 *                 entry.hit(time - old.time)
 *             if what == PyTrace_LINE:
 */
          __pyx_2 = PyObject_GetItem(__pyx_v_line_entries, __pyx_v_key); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (!(__Pyx_TypeTest(__pyx_2, __pyx_ptype_14_line_profiler_LineTiming))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          Py_DECREF(((PyObject *)__pyx_v_entry));
          __pyx_v_entry = ((struct __pyx_obj_14_line_profiler_LineTiming *)__pyx_2);
          __pyx_2 = 0;
        }
        __pyx_L6:;

        /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":206
 *                 else:
 *                     entry = line_entries[key]
 *                 entry.hit(time - old.time)             # <<<<<<<<<<<<<<
 *             if what == PyTrace_LINE:
 *                 # Get the time again. This way, we don't record much time wasted
 */
        __pyx_3 = ((struct __pyx_vtabstruct_14_line_profiler_LineTiming *)__pyx_v_entry->__pyx_vtab)->hit(__pyx_v_entry, (__pyx_v_time - __pyx_v_old->time)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        goto __pyx_L5;
      }
      __pyx_L5:;

      /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":207
 *                     entry = line_entries[key]
 *                 entry.hit(time - old.time)
 *             if what == PyTrace_LINE:             # <<<<<<<<<<<<<<
 *                 # Get the time again. This way, we don't record much time wasted
 *                 # in this function.
 */
      __pyx_1 = (__pyx_v_what == PyTrace_LINE);
      if (__pyx_1) {

        /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":210
 *                 # Get the time again. This way, we don't record much time wasted
 *                 # in this function.
 *                 self.last_time[code] = LastTime(py_frame.f_lineno, hpTimer())             # <<<<<<<<<<<<<<
 *             else:
 *                 # We are returning from a function, not executing a line. Delete
 */
        __pyx_2 = PyInt_FromLong(__pyx_v_py_frame->f_lineno); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_3 = PyLong_FromLongLong(hpTimer()); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
        PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
        __pyx_2 = 0;
        __pyx_3 = 0;
        __pyx_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_14_line_profiler_LastTime)), ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0;
        __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_last_time); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (PyObject_SetItem(__pyx_3, __pyx_v_code, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":214
 *                 # We are returning from a function, not executing a line. Delete
 *                 # the last_time record.
 *                 del self.last_time[code]             # <<<<<<<<<<<<<<
 * 
 *     return 0
 */
        __pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_kp_last_time); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (PyObject_DelItem(__pyx_4, __pyx_v_code) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        Py_DECREF(__pyx_4); __pyx_4 = 0;
      }
      __pyx_L7:;
      goto __pyx_L4;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":216
 *                 del self.last_time[code]
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 0;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_WriteUnraisable("_line_profiler.python_trace_callback");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_code);
  Py_DECREF(__pyx_v_line_entries);
  Py_DECREF(__pyx_v_key);
  Py_DECREF(__pyx_v_entry);
  Py_DECREF(__pyx_v_old);
  return __pyx_r;
}
static struct __pyx_vtabstruct_14_line_profiler_LineTiming __pyx_vtable_14_line_profiler_LineTiming;

static PyObject *__pyx_tp_new_14_line_profiler_LineTiming(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_14_line_profiler_LineTiming *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_14_line_profiler_LineTiming *)o);
  p->__pyx_vtab = __pyx_vtabptr_14_line_profiler_LineTiming;
  p->code = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_14_line_profiler_LineTiming(PyObject *o) {
  struct __pyx_obj_14_line_profiler_LineTiming *p = (struct __pyx_obj_14_line_profiler_LineTiming *)o;
  Py_XDECREF(p->code);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_14_line_profiler_LineTiming(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_14_line_profiler_LineTiming *p = (struct __pyx_obj_14_line_profiler_LineTiming *)o;
  if (p->code) {
    e = (*v)(p->code, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_14_line_profiler_LineTiming(PyObject *o) {
  struct __pyx_obj_14_line_profiler_LineTiming *p = (struct __pyx_obj_14_line_profiler_LineTiming *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->code);
  p->code = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static struct PyMethodDef __pyx_methods_14_line_profiler_LineTiming[] = {
  {"astuple", (PyCFunction)__pyx_pf_14_line_profiler_10LineTiming_astuple, METH_NOARGS, __pyx_doc_14_line_profiler_10LineTiming_astuple},
  {"__repr__", (PyCFunction)__pyx_pf_14_line_profiler_10LineTiming___repr__, METH_NOARGS|METH_COEXIST, 0},
  {0, 0, 0, 0}
};

static struct PyMemberDef __pyx_members_14_line_profiler_LineTiming[] = {
  {"code", T_OBJECT, offsetof(struct __pyx_obj_14_line_profiler_LineTiming, code), 0, 0},
  {"lineno", T_INT, offsetof(struct __pyx_obj_14_line_profiler_LineTiming, lineno), 0, 0},
  {"total_time", T_LONG, offsetof(struct __pyx_obj_14_line_profiler_LineTiming, total_time), 0, 0},
  {"nhits", T_LONG, offsetof(struct __pyx_obj_14_line_profiler_LineTiming, nhits), 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_LineTiming = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_LineTiming = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_LineTiming = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_LineTiming = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

PyTypeObject __pyx_type_14_line_profiler_LineTiming = {
  PyVarObject_HEAD_INIT(0, 0)
  "_line_profiler.LineTiming", /*tp_name*/
  sizeof(struct __pyx_obj_14_line_profiler_LineTiming), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_14_line_profiler_LineTiming, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  __pyx_pf_14_line_profiler_10LineTiming___repr__, /*tp_repr*/
  &__pyx_tp_as_number_LineTiming, /*tp_as_number*/
  &__pyx_tp_as_sequence_LineTiming, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_LineTiming, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_LineTiming, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  " The timing for a single line.\n    ", /*tp_doc*/
  __pyx_tp_traverse_14_line_profiler_LineTiming, /*tp_traverse*/
  __pyx_tp_clear_14_line_profiler_LineTiming, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_14_line_profiler_LineTiming, /*tp_methods*/
  __pyx_members_14_line_profiler_LineTiming, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_14_line_profiler_10LineTiming___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_14_line_profiler_LineTiming, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};

static PyObject *__pyx_tp_new_14_line_profiler_LineProfiler(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_14_line_profiler_LineProfiler *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_14_line_profiler_LineProfiler *)o);
  p->functions = Py_None; Py_INCREF(Py_None);
  p->code_map = Py_None; Py_INCREF(Py_None);
  p->last_time = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_14_line_profiler_LineProfiler(PyObject *o) {
  struct __pyx_obj_14_line_profiler_LineProfiler *p = (struct __pyx_obj_14_line_profiler_LineProfiler *)o;
  Py_XDECREF(p->functions);
  Py_XDECREF(p->code_map);
  Py_XDECREF(p->last_time);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_14_line_profiler_LineProfiler(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_14_line_profiler_LineProfiler *p = (struct __pyx_obj_14_line_profiler_LineProfiler *)o;
  if (p->functions) {
    e = (*v)(p->functions, a); if (e) return e;
  }
  if (p->code_map) {
    e = (*v)(p->code_map, a); if (e) return e;
  }
  if (p->last_time) {
    e = (*v)(p->last_time, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_14_line_profiler_LineProfiler(PyObject *o) {
  struct __pyx_obj_14_line_profiler_LineProfiler *p = (struct __pyx_obj_14_line_profiler_LineProfiler *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->functions);
  p->functions = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->code_map);
  p->code_map = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->last_time);
  p->last_time = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static struct PyMethodDef __pyx_methods_14_line_profiler_LineProfiler[] = {
  {"add_function", (PyCFunction)__pyx_pf_14_line_profiler_12LineProfiler_add_function, METH_O, __pyx_doc_14_line_profiler_12LineProfiler_add_function},
  {"enable_by_count", (PyCFunction)__pyx_pf_14_line_profiler_12LineProfiler_enable_by_count, METH_NOARGS, __pyx_doc_14_line_profiler_12LineProfiler_enable_by_count},
  {"disable_by_count", (PyCFunction)__pyx_pf_14_line_profiler_12LineProfiler_disable_by_count, METH_NOARGS, __pyx_doc_14_line_profiler_12LineProfiler_disable_by_count},
  {"__enter__", (PyCFunction)__pyx_pf_14_line_profiler_12LineProfiler___enter__, METH_NOARGS, 0},
  {"__exit__", (PyCFunction)__pyx_pf_14_line_profiler_12LineProfiler___exit__, METH_VARARGS|METH_KEYWORDS, 0},
  {"enable", (PyCFunction)__pyx_pf_14_line_profiler_12LineProfiler_enable, METH_NOARGS, 0},
  {"disable", (PyCFunction)__pyx_pf_14_line_profiler_12LineProfiler_disable, METH_NOARGS, 0},
  {"get_stats", (PyCFunction)__pyx_pf_14_line_profiler_12LineProfiler_get_stats, METH_NOARGS, __pyx_doc_14_line_profiler_12LineProfiler_get_stats},
  {0, 0, 0, 0}
};

static struct PyMemberDef __pyx_members_14_line_profiler_LineProfiler[] = {
  {"functions", T_OBJECT, offsetof(struct __pyx_obj_14_line_profiler_LineProfiler, functions), 0, 0},
  {"code_map", T_OBJECT, offsetof(struct __pyx_obj_14_line_profiler_LineProfiler, code_map), 0, 0},
  {"last_time", T_OBJECT, offsetof(struct __pyx_obj_14_line_profiler_LineProfiler, last_time), 0, 0},
  {"timer_unit", T_DOUBLE, offsetof(struct __pyx_obj_14_line_profiler_LineProfiler, timer_unit), 0, 0},
  {"enable_count", T_LONG, offsetof(struct __pyx_obj_14_line_profiler_LineProfiler, enable_count), 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_LineProfiler = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_LineProfiler = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_LineProfiler = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_LineProfiler = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

PyTypeObject __pyx_type_14_line_profiler_LineProfiler = {
  PyVarObject_HEAD_INIT(0, 0)
  "_line_profiler.LineProfiler", /*tp_name*/
  sizeof(struct __pyx_obj_14_line_profiler_LineProfiler), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_14_line_profiler_LineProfiler, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_LineProfiler, /*tp_as_number*/
  &__pyx_tp_as_sequence_LineProfiler, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_LineProfiler, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_LineProfiler, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  " Time the execution of lines of Python code.\n    ", /*tp_doc*/
  __pyx_tp_traverse_14_line_profiler_LineProfiler, /*tp_traverse*/
  __pyx_tp_clear_14_line_profiler_LineProfiler, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_14_line_profiler_LineProfiler, /*tp_methods*/
  __pyx_members_14_line_profiler_LineProfiler, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_14_line_profiler_12LineProfiler___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_14_line_profiler_LineProfiler, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};

static PyObject *__pyx_tp_new_14_line_profiler_LastTime(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  if (__pyx_pf_14_line_profiler_8LastTime___cinit__(o, a, k) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_14_line_profiler_LastTime(PyObject *o) {
  (*Py_TYPE(o)->tp_free)(o);
}

static struct PyMethodDef __pyx_methods_14_line_profiler_LastTime[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_LastTime = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_LastTime = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_LastTime = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_LastTime = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

PyTypeObject __pyx_type_14_line_profiler_LastTime = {
  PyVarObject_HEAD_INIT(0, 0)
  "_line_profiler.LastTime", /*tp_name*/
  sizeof(struct __pyx_obj_14_line_profiler_LastTime), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_14_line_profiler_LastTime, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_LastTime, /*tp_as_number*/
  &__pyx_tp_as_sequence_LastTime, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_LastTime, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_LastTime, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
  " Record the last callback call for a given line.\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_14_line_profiler_LastTime, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_14_line_profiler_LastTime, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};

static struct PyMethodDef __pyx_methods[] = {
  {"label", (PyCFunction)__pyx_pf_14_line_profiler_label, METH_O, __pyx_doc_14_line_profiler_label},
  {0, 0, 0, 0}
};

static void __pyx_init_filenames(void); /*proto*/

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "_line_profiler",
    0, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp___init__, __pyx_k___init__, sizeof(__pyx_k___init__), 1, 1, 1},
  {&__pyx_kp_astuple, __pyx_k_astuple, sizeof(__pyx_k_astuple), 1, 1, 1},
  {&__pyx_kp___repr__, __pyx_k___repr__, sizeof(__pyx_k___repr__), 1, 1, 1},
  {&__pyx_kp_add_function, __pyx_k_add_function, sizeof(__pyx_k_add_function), 1, 1, 1},
  {&__pyx_kp_enable_by_count, __pyx_k_enable_by_count, sizeof(__pyx_k_enable_by_count), 1, 1, 1},
  {&__pyx_kp_disable_by_count, __pyx_k_disable_by_count, sizeof(__pyx_k_disable_by_count), 1, 1, 1},
  {&__pyx_kp___enter__, __pyx_k___enter__, sizeof(__pyx_k___enter__), 1, 1, 1},
  {&__pyx_kp___exit__, __pyx_k___exit__, sizeof(__pyx_k___exit__), 1, 1, 1},
  {&__pyx_kp_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 1, 1, 1},
  {&__pyx_kp_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 1, 1, 1},
  {&__pyx_kp_get_stats, __pyx_k_get_stats, sizeof(__pyx_k_get_stats), 1, 1, 1},
  {&__pyx_kp___cinit__, __pyx_k___cinit__, sizeof(__pyx_k___cinit__), 1, 1, 1},
  {&__pyx_kp_code, __pyx_k_code, sizeof(__pyx_k_code), 1, 1, 1},
  {&__pyx_kp_lineno, __pyx_k_lineno, sizeof(__pyx_k_lineno), 1, 1, 1},
  {&__pyx_kp_self, __pyx_k_self, sizeof(__pyx_k_self), 1, 1, 1},
  {&__pyx_kp_timings, __pyx_k_timings, sizeof(__pyx_k_timings), 1, 1, 1},
  {&__pyx_kp_unit, __pyx_k_unit, sizeof(__pyx_k_unit), 1, 1, 1},
  {&__pyx_kp_func, __pyx_k_func, sizeof(__pyx_k_func), 1, 1, 1},
  {&__pyx_kp_exc_type, __pyx_k_exc_type, sizeof(__pyx_k_exc_type), 1, 1, 1},
  {&__pyx_kp_exc_val, __pyx_k_exc_val, sizeof(__pyx_k_exc_val), 1, 1, 1},
  {&__pyx_kp_exc_tb, __pyx_k_exc_tb, sizeof(__pyx_k_exc_tb), 1, 1, 1},
  {&__pyx_kp_f_lineno, __pyx_k_f_lineno, sizeof(__pyx_k_f_lineno), 1, 1, 1},
  {&__pyx_kp_time, __pyx_k_time, sizeof(__pyx_k_time), 1, 1, 1},
  {&__pyx_kp_LineStats, __pyx_k_LineStats, sizeof(__pyx_k_LineStats), 0, 1, 1},
  {&__pyx_kp_object, __pyx_k_object, sizeof(__pyx_k_object), 1, 1, 1},
  {&__pyx_kp_co_filename, __pyx_k_co_filename, sizeof(__pyx_k_co_filename), 1, 1, 1},
  {&__pyx_kp_co_firstlineno, __pyx_k_co_firstlineno, sizeof(__pyx_k_co_firstlineno), 1, 1, 1},
  {&__pyx_kp_co_name, __pyx_k_co_name, sizeof(__pyx_k_co_name), 1, 1, 1},
  {&__pyx_kp_func_code, __pyx_k_func_code, sizeof(__pyx_k_func_code), 1, 1, 1},
  {&__pyx_kp_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 1, 1, 1},
  {&__pyx_kp_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 1, 1, 1},
  {&__pyx_kp_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 1, 1, 1},
  {&__pyx_kp_append, __pyx_k_append, sizeof(__pyx_k_append), 1, 1, 1},
  {&__pyx_kp_values, __pyx_k_values, sizeof(__pyx_k_values), 1, 1, 1},
  {&__pyx_kp_label, __pyx_k_label, sizeof(__pyx_k_label), 1, 1, 1},
  {&__pyx_kp_sort, __pyx_k_sort, sizeof(__pyx_k_sort), 1, 1, 1},
  {&__pyx_kp_code_map, __pyx_k_code_map, sizeof(__pyx_k_code_map), 1, 1, 1},
  {&__pyx_kp_last_time, __pyx_k_last_time, sizeof(__pyx_k_last_time), 1, 1, 1},
  {&__pyx_kp_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 0},
  {&__pyx_kp_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 0},
  {&__pyx_kp_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 0},
  {&__pyx_kp_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 0},
  {0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_kp_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_kp_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitGlobals(void) {
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC init_line_profiler(void); /*proto*/
PyMODINIT_FUNC init_line_profiler(void)
#else
PyMODINIT_FUNC PyInit__line_profiler(void); /*proto*/
PyMODINIT_FUNC PyInit__line_profiler(void)
#endif
{
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Library function declarations ---*/
  __pyx_init_filenames();
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("_line_profiler", __pyx_methods, 0, 0, PYTHON_API_VERSION);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  #if PY_MAJOR_VERSION < 3
  Py_INCREF(__pyx_m);
  #endif
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME);
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_skip_dispatch = 0;
  /*--- Global init code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  __pyx_vtabptr_14_line_profiler_LineTiming = &__pyx_vtable_14_line_profiler_LineTiming;
  *(void(**)(void))&__pyx_vtable_14_line_profiler_LineTiming.hit = (void(*)(void))__pyx_f_14_line_profiler_10LineTiming_hit;
  if (PyType_Ready(&__pyx_type_14_line_profiler_LineTiming) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_14_line_profiler_LineTiming.tp_dict, __pyx_vtabptr_14_line_profiler_LineTiming) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "LineTiming", (PyObject *)&__pyx_type_14_line_profiler_LineTiming) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_14_line_profiler_LineTiming = &__pyx_type_14_line_profiler_LineTiming;
  if (PyType_Ready(&__pyx_type_14_line_profiler_LineProfiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "LineProfiler", (PyObject *)&__pyx_type_14_line_profiler_LineProfiler) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_14_line_profiler_LineProfiler = &__pyx_type_14_line_profiler_LineProfiler;
  if (PyType_Ready(&__pyx_type_14_line_profiler_LastTime) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "LastTime", (PyObject *)&__pyx_type_14_line_profiler_LastTime) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_14_line_profiler_LastTime = &__pyx_type_14_line_profiler_LastTime;
  /*--- Type import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":83
 * 
 * # Note: this is a regular Python class to allow easy pickling.
 * class LineStats(object):             # <<<<<<<<<<<<<<
 *     """ Object to encapsulate line-profile statistics.
 * 
 */
  __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_builtin_object);
  if (PyDict_SetItemString(((PyObject *)__pyx_1), "__doc__", __pyx_kp_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_3 = __Pyx_CreateClass(((PyObject *)__pyx_2), ((PyObject *)__pyx_1), __pyx_kp_LineStats, "_line_profiler"); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;

  /* "/Users/rkern/hg/line_profiler/_line_profiler.pyx":96
 *         The number of seconds per timer unit.
 *     """
 *     def __init__(self, timings, unit):             # <<<<<<<<<<<<<<
 *         self.timings = timings
 *         self.unit = unit
 */
  __pyx_2 = PyCFunction_New(&__pyx_mdef_14_line_profiler_9LineStats___init__, 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_4 = PyMethod_New(__pyx_2, 0, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (PyObject_SetAttr(__pyx_3, __pyx_kp___init__, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_LineStats, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;

  /* "/Users/rkern/hg/line_profiler/python25.pxd":1
 * # From: Eric Huss <e-huss@netmeridian.com>             # <<<<<<<<<<<<<<
 * #
 * # Here is my latest copy.  It does not cover 100% of the API.  It should be
 */
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
  __pyx_L1_error:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("_line_profiler");
  #if PY_MAJOR_VERSION >= 3
  return NULL;
  #endif
}

static const char *__pyx_filenames[] = {
  "_line_profiler.pyx",
};

/* Runtime support code */

static void __pyx_init_filenames(void) {
  __pyx_f = __pyx_filenames;
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AS_STRING(kw_name));
        #endif
}

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *number, *more_or_less;

    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    number = (num_expected == 1) ? "" : "s";
    PyErr_Format(PyExc_TypeError,
        #if PY_VERSION_HEX < 0x02050000
            "%s() takes %s %d positional argument%s (%d given)",
        #else
            "%s() takes %s %zd positional argument%s (%zd given)",
        #endif
        func_name, more_or_less, num_expected, number, num_found);
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;

    while (PyDict_Next(kwds, &pos, &key, &value)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
        #else
        if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
        #endif
            goto invalid_keyword_type;
        } else {
            name = argnames;
            while (*name && (**name != key)) name++;
            if (*name) {
                if (name < first_kw_arg) goto arg_passed_twice;
                values[name-argnames] = value;
            } else {
                for (name = first_kw_arg; *name; name++) {
                    #if PY_MAJOR_VERSION >= 3
                    if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                        PyUnicode_Compare(**name, key) == 0) break;
                    #else
                    if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                        strcmp(PyString_AS_STRING(**name),
                               PyString_AS_STRING(key)) == 0) break;
                    #endif
                }
                if (*name) {
                    values[name-argnames] = value;
                } else {
                    /* unexpected keyword found */
                    for (name=argnames; name != first_kw_arg; name++) {
                        if (**name == key) goto arg_passed_twice;
                        #if PY_MAJOR_VERSION >= 3
                        if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                            PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
                        #else
                        if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                            strcmp(PyString_AS_STRING(**name),
                                   PyString_AS_STRING(key)) == 0) goto arg_passed_twice;
                        #endif
                    }
                    if (kwds2) {
                        if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                    } else {
                        goto invalid_keyword;
                    }
                }
            }
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, **name);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

static INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #else
        if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key)))
        #endif
            goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    return 0;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}

static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result)
        PyErr_SetObject(PyExc_NameError, name);
    return result;
}

static PyObject *__Pyx_CreateClass(
    PyObject *bases, PyObject *dict, PyObject *name, char *modname)
{
    PyObject *py_modname;
    PyObject *result = 0;

    #if PY_MAJOR_VERSION < 3
    py_modname = PyString_FromString(modname);
    #else
    py_modname = PyUnicode_FromString(modname);
    #endif
    if (!py_modname)
        goto bad;
    if (PyDict_SetItemString(dict, "__module__", py_modname) < 0)
        goto bad;
    #if PY_MAJOR_VERSION < 3
    result = PyClass_New(bases, dict, name);
    #else
    result = PyObject_CallFunctionObjArgs((PyObject *)&PyType_Type, name, bases, dict, NULL);
    #endif
bad:
    Py_XDECREF(py_modname);
    return result;
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
    PyObject *__import__ = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    __import__ = PyObject_GetAttrString(__pyx_b, "__import__");
    if (!__import__)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    module = PyObject_CallFunction(__import__, "OOOO",
        name, global_dict, empty_dict, list);
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(__import__);
    Py_XDECREF(empty_dict);
    return module;
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    __Pyx_ErrFetch(type, value, tb);
    PyErr_NormalizeException(type, value, tb);
    if (PyErr_Occurred())
        goto bad;
    Py_INCREF(*type);
    Py_INCREF(*value);
    Py_INCREF(*tb);
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    /* Make sure tstate is in a consistent state when we XDECREF
    these objects (XDECREF may run arbitrary code). */
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
    return 0;
bad:
    Py_XDECREF(*type);
    Py_XDECREF(*value);
    Py_XDECREF(*tb);
    return -1;
}


static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();

    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}

static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;

    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}


static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (!type) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (obj == Py_None || PyObject_TypeCheck(obj, type))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s",
        Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

static void __Pyx_WriteUnraisable(const char *name) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
}

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
    PyObject *pycobj = 0;
    int result;
    
    pycobj = PyCObject_FromVoidPtr(vtable, 0);
    if (!pycobj)
        goto bad;
    if (PyDict_SetItemString(dict, "__pyx_vtable__", pycobj) < 0)
        goto bad;
    result = 0;
    goto done;

bad:
    result = -1;
done:
    Py_XDECREF(pycobj);
    return result;
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"

static void __Pyx_AddTraceback(const char *funcname) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyObject *empty_string = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;

    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(__pyx_filename);
    #else
    py_srcfile = PyUnicode_FromString(__pyx_filename);
    #endif
    if (!py_srcfile) goto bad;
    if (__pyx_clineno) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    #if PY_MAJOR_VERSION < 3
    empty_string = PyString_FromStringAndSize("", 0);
    #else
    empty_string = PyBytes_FromStringAndSize("", 0);
    #endif
    if (!empty_string) goto bad;
    py_code = PyCode_New(
        0,            /*int argcount,*/
        #if PY_MAJOR_VERSION >= 3
        0,            /*int kwonlyargcount,*/
        #endif
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        empty_string, /*PyObject *code,*/
        __pyx_empty_tuple,  /*PyObject *consts,*/
        __pyx_empty_tuple,  /*PyObject *names,*/
        __pyx_empty_tuple,  /*PyObject *varnames,*/
        __pyx_empty_tuple,  /*PyObject *freevars,*/
        __pyx_empty_tuple,  /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        __pyx_lineno,   /*int firstlineno,*/
        empty_string  /*PyObject *lnotab*/
    );
    if (!py_code) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(empty_string);
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode && (!t->is_identifier)) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_identifier || (t->is_unicode && t->intern)) {
            *t->p = PyUnicode_InternFromString(t->s);
        } else if (t->is_unicode) {
            *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

/* Type Conversion Functions */

static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject* x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}

static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   if (x == Py_True) return 1;
   else if (x == Py_False) return 0;
   else return PyObject_IsTrue(x);
}

static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x) {
    if (PyInt_CheckExact(x)) {
        return PyInt_AS_LONG(x);
    }
    else if (PyLong_CheckExact(x)) {
        return PyLong_AsLongLong(x);
    }
    else {
        PY_LONG_LONG val;
        PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1;
        val = __pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    if (PyInt_CheckExact(x)) {
        long val = PyInt_AS_LONG(x);
        if (unlikely(val < 0)) {
            PyErr_SetString(PyExc_TypeError, "Negative assignment to unsigned type.");
            return (unsigned PY_LONG_LONG)-1;
        }
        return val;
    }
    else if (PyLong_CheckExact(x)) {
        return PyLong_AsUnsignedLongLong(x);
    }
    else {
        PY_LONG_LONG val;
        PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1;
        val = __pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}


static INLINE unsigned char __pyx_PyInt_unsigned_char(PyObject* x) {
    if (sizeof(unsigned char) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        unsigned char val = (unsigned char)long_val;
        if (unlikely((val != long_val)  || (long_val < 0))) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to unsigned char");
            return (unsigned char)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}

static INLINE unsigned short __pyx_PyInt_unsigned_short(PyObject* x) {
    if (sizeof(unsigned short) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        unsigned short val = (unsigned short)long_val;
        if (unlikely((val != long_val)  || (long_val < 0))) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to unsigned short");
            return (unsigned short)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}

static INLINE char __pyx_PyInt_char(PyObject* x) {
    if (sizeof(char) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        char val = (char)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to char");
            return (char)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}

static INLINE short __pyx_PyInt_short(PyObject* x) {
    if (sizeof(short) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        short val = (short)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to short");
            return (short)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}

static INLINE int __pyx_PyInt_int(PyObject* x) {
    if (sizeof(int) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        int val = (int)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to int");
            return (int)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}

static INLINE long __pyx_PyInt_long(PyObject* x) {
    if (sizeof(long) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        long val = (long)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to long");
            return (long)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}

static INLINE signed char __pyx_PyInt_signed_char(PyObject* x) {
    if (sizeof(signed char) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        signed char val = (signed char)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed char");
            return (signed char)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}

static INLINE signed short __pyx_PyInt_signed_short(PyObject* x) {
    if (sizeof(signed short) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        signed short val = (signed short)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed short");
            return (signed short)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}

static INLINE signed int __pyx_PyInt_signed_int(PyObject* x) {
    if (sizeof(signed int) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        signed int val = (signed int)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed int");
            return (signed int)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}

static INLINE signed long __pyx_PyInt_signed_long(PyObject* x) {
    if (sizeof(signed long) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        signed long val = (signed long)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed long");
            return (signed long)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}

static INLINE long double __pyx_PyInt_long_double(PyObject* x) {
    if (sizeof(long double) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        long double val = (long double)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to long double");
            return (long double)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}

