code: def max_impl(uniq_id):
      """Emit C code for pool impl."""
      cc_code = (
          common.common_includes
          + f"""
  
  
  #ifdef __cplusplus
  extern "C"
  #endif
  __attribute__((always_inline)) static inline int32_t max8_reset_{uniq_id}(
      int8_t *res,
      int32_t N) {{
    memset(res, (int8_t)-128, N * sizeof(*res));
    return 0;
  }}
  
  #ifdef __cplusplus
  extern "C"
  #endif
  __attribute__((always_inline)) static inline int32_t max8_loop_{uniq_id}(
      int8_t *arg,
      int8_t *res,
      int32_t N_arg) {{
    int N = N_arg;
  
    for ( int i = 0; i < N; ++ i )
      if ( arg[i] > res[i] )
        res[i] = arg[i];
    return 0;
  }}
  
  #ifdef __cplusplus
  extern "C"
  #endif
  __attribute__((always_inline)) static inline int32_t max8_{uniq_id}(
      int8_t *arg,
      int8_t *res,
      int32_t N_arg) {{
    int N = N_arg;
    int32_t *parg32, *pres32;
    int una_arg = (int32_t)arg & 0x3, una_res = (int32_t)res & 0x3;
    int32_t retcode = 0;
  
    if ( N < 4 || ((una_arg || una_res) && una_arg != una_res) ) {{
      retcode = max8_loop_{uniq_id}(arg, res, N);
      goto out;
    }}
    if ( una_arg ) {{
      int n = (4 - una_arg);
      if ( n > N || (N - n) < 4 )
        n = N;
      retcode = max8_loop_{uniq_id}(arg, res, n);
      N -= n;
      if ( N == 0 )
        goto out;
      arg += n; res += n;
    }}
  
    parg32 = (int32_t *)arg;
    pres32 = (int32_t *)res;
  
    for ( int i = 0; i < N / 4; ++ i ) {{
      int32_t arg32 = *parg32 ++;
      int32_t res32 = *pres32;
      __ssub8(arg32, res32);
      res32 = __sel(arg32, res32);
      *pres32 ++ = res32;
    }}
  
    if ( N & 0x3 ) {{
      retcode = max8_loop_{uniq_id}((int8_t *)parg32, (int8_t *)pres32, N & 0x3);
      goto out;
    }}
  
  out:
    return retcode;
  }}
  
  """
      )
      return cc_code
  
imports: import random
  import string
  import tvm
  from tvm import te
  from .None import common
label_desc: Use image node_id 2 for calling a global function with example usage: max_impl(uniq_id) and returns: cc_code