text: /*
   * Academic License - for use in teaching, academic research, and meeting
   * course requirements at degree granting institutions only.  Not for
   * government, commercial, or other organizational use.
   *
   * _coder_shadowing_latlon_loop_mex.c
   *
   * Code generation for function '_coder_shadowing_latlon_loop_mex'
   *
   */
  
  /* Include files */
  #include "_coder_shadowing_latlon_loop_mex.h"
  #include "_coder_shadowing_latlon_loop_api.h"
  #include "rt_nonfinite.h"
  #include "shadowing_latlon_loop.h"
  #include "shadowing_latlon_loop_data.h"
  #include "shadowing_latlon_loop_initialize.h"
  #include "shadowing_latlon_loop_terminate.h"
  
  /* Variable Definitions */
  static jmp_buf emlrtJBEnviron;
  
  /* Function Definitions */
  void mexFunction(int32_T nlhs, mxArray *plhs[], int32_T nrhs, const mxArray
                   *prhs[])
  {
    emlrtStack st = { NULL,              /* site */
      NULL,                              /* tls */
      NULL                               /* prev */
    };
  
    mexAtExit(&shadowing_latlon_loop_atexit);
  
    /* Initialize the memory manager. */
    omp_init_lock(&emlrtLockGlobal);
    omp_init_nest_lock(&emlrtNestLockGlobal);
  
    /* Module initialization. */
    shadowing_latlon_loop_initialize();
    st.tls = emlrtRootTLSGlobal;
    emlrtSetJmpBuf(&st, &emlrtJBEnviron);
    if (setjmp(emlrtJBEnviron) == 0) {
      /* Dispatch the entry-point. */
      shadowing_latlon_loop_mexFunction(nlhs, plhs, nrhs, prhs);
  
      /* Module termination. */
      shadowing_latlon_loop_terminate();
      omp_destroy_lock(&emlrtLockGlobal);
      omp_destroy_nest_lock(&emlrtNestLockGlobal);
    } else {
      omp_destroy_lock(&emlrtLockGlobal);
      omp_destroy_nest_lock(&emlrtNestLockGlobal);
      emlrtReportParallelRunTimeError(&st);
    }
  }
  
  emlrtCTX mexFunctionCreateRootTLS(void)
  {
    emlrtCreateRootTLS(&emlrtRootTLSGlobal, &emlrtContextGlobal,
                       &emlrtLockerFunction, omp_get_num_procs());
    return emlrtRootTLSGlobal;
  }
  
  void shadowing_latlon_loop_mexFunction(int32_T nlhs, mxArray *plhs[4], int32_T
    nrhs, const mxArray *prhs[21])
  {
    emlrtStack st = { NULL,              /* site */
      NULL,                              /* tls */
      NULL                               /* prev */
    };
  
    const mxArray *outputs[4];
    int32_T b_nlhs;
    st.tls = emlrtRootTLSGlobal;
  
    /* Check for proper number of arguments. */
    if (nrhs != 21) {
      emlrtErrMsgIdAndTxt(&st, "EMLRT:runTime:WrongNumberOfInputs", 5, 12, 21, 4,
                          21, "shadowing_latlon_loop");
    }
  
    if (nlhs > 4) {
      emlrtErrMsgIdAndTxt(&st, "EMLRT:runTime:TooManyOutputArguments", 3, 4, 21,
                          "shadowing_latlon_loop");
    }
  
    /* Call the function. */
    shadowing_latlon_loop_api(prhs, nlhs, outputs);
  
    /* Copy over outputs to the caller. */
    if (nlhs < 1) {
      b_nlhs = 1;
    } else {
      b_nlhs = nlhs;
    }
  
    emlrtReturnArrays(b_nlhs, plhs, outputs);
  }
  
  /* End of code generation (_coder_shadowing_latlon_loop_mex.c) */
  